commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 Author: Linus Torvalds Date: Sun Nov 12 10:46:13 2017 -0800 Linux 4.14 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 152bbb43b30ced1b32e9ed6f5ba2ac448de725b6 Merge: 69581c7 b8347c21 Author: Linus Torvalds Date: Sun Nov 12 10:12:41 2017 -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: - make KGDB work again which got broken by the conversion of WARN() to #UD. The WARN fixup needs to run before the notifier callchain, otherwise KGDB tries to handle it and crashes. - disable KASAN in the ORC unwinder to prevent false positive KASAN warnings - prevent default mapping above 47bit when 5 level page tables are enabled - make the delay calibration optimization work correctly, which had the conditionals the wrong way around and was operating on data which was not yet updated. - remove the bogus X86_TRAP_BP trap init from the default IDT init table, which broke 32bit int3 handling by overwriting the correct int3 setup. - replace this_cpu* with boot_cpu_data access in the preemptible oprofile init code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/debug: Handle warnings before the notifier chain, to fix KGDB crash x86/mm: Fix ELF_ET_DYN_BASE for 5-level paging x86/idt: Remove X86_TRAP_BP initialization in idt_setup_traps() x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context x86/unwind: Disable KASAN checking in the ORC unwinder x86/smpboot: Make optimization of delay calibration work correctly commit 69581c74721f40b2e21667197a135120844c03b7 Merge: b395456 505ee76 Author: Linus Torvalds Date: Sun Nov 12 09:43:53 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tool fixes from Thomas Gleixner: "A small set of fixes for perf tool: - synchronize the i915 drm header to avoid the 'out of date' warning - make sure that perf trace cleans up its temporary files on exit - unbreak the build with newer flex versions - add missing braces in the eBPF parsing rules" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tooling/headers: Sync the tools/include/uapi/drm/i915_drm.h UAPI header perf trace: Call machine__exit() at exit perf tools: Fix eBPF event specification parsing perf tools: Add "reject" option for parse-events.l commit b39545684a90ef3374abc0969d64c7bc540d128d Merge: ca91659 92d2882 Author: Linus Torvalds Date: Sat Nov 11 09:10:39 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Use after free in vlan, from Cong Wang. 2) Handle NAPI poll with a zero budget properly in mlx5 driver, from Saeed Mahameed. 3) If DMA mapping fails in mlx5 driver, NULL out page, from Inbar Karmy. 4) Handle overrun in RX FIFO of sun4i CAN driver, from Gerhard Bertelsmann. 5) Missing return in mdb and vlan prepare phase of DSA layer, from Vivien Didelot. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: vlan: fix a use-after-free in vlan_device_event() net: dsa: return after vlan prepare phase net: dsa: return after mdb prepare phase can: ifi: Fix transmitter delay calculation tcp: fix tcp_fastretrans_alert warning tcp: gso: avoid refcount_t warning from tcp_gso_segment() can: peak: Add support for new PCIe/M2 CAN FD interfaces can: sun4i: handle overrun in RX FIFO can: c_can: don't indicate triple sampling support for D_CAN net/mlx5e: Increase Striding RQ minimum size limit to 4 multi-packet WQEs net/mlx5e: Set page to null in case dma mapping fails net/mlx5e: Fix napi poll with zero budget net/mlx5: Cancel health poll before sending panic teardown command net/mlx5: Loop over temp list to release delay events rds: ib: Fix NULL pointer dereference in debug code commit 92d28828179675176cd90293699b394b6d22ce68 Merge: be234ba 4f71167 Author: David S. Miller Date: Sat Nov 11 21:52:01 2017 +0900 Merge tag 'linux-can-fixes-for-4.14-20171110' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-11-10 this is a pull request for net/master. The first patch by Richard Schütz for the c_can driver removes the false indication to support triple sampling for d_can. Gerhard Bertelsmann's patch for the sun4i driver improves the RX overrun handling. The patch by Stephane Grosjean for the peak_canfd driver adds the PCI ids for various new PCIe/M2 interfaces. Marek Vasut's patch for the ifi driver fix transmitter delay calculation. ==================== Signed-off-by: David S. Miller commit be234ba93c61927fd881e7c033a1cf31237d2742 Merge: 052d41c d1c61e6 Author: David S. Miller Date: Sat Nov 11 19:40:05 2017 +0900 Merge tag 'mlx5-fixes-2017-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-11-08 The following series includes some fixes for mlx5 core and etherent driver. Sorry for the late submission but as you can see i have some very critical fixes below that i would like them merged into this RC. Please pull and let me know if there is any problem. For -stable: ('net/mlx5e: Set page to null in case dma mapping fails') kernels >= 4.13 ('net/mlx5: FPGA, return -EINVAL if size is zero') kernels >= 4.13 ('net/mlx5: Cancel health poll before sending panic teardown command') kernels >= 4.13 V1->V2: - Fix Reviewed-by tag of the 2nd patch. - Drop the FPGA 0 size fix, it needs some more change log info. ==================== Signed-off-by: David S. Miller commit 052d41c01b3a2e3371d66de569717353af489d63 Author: Cong Wang Date: Thu Nov 9 16:43:13 2017 -0800 vlan: fix a use-after-free in vlan_device_event() After refcnt reaches zero, vlan_vid_del() could free dev->vlan_info via RCU: RCU_INIT_POINTER(dev->vlan_info, NULL); call_rcu(&vlan_info->rcu, vlan_info_rcu_free); However, the pointer 'grp' still points to that memory since it is set before vlan_vid_del(): vlan_info = rtnl_dereference(dev->vlan_info); if (!vlan_info) goto out; grp = &vlan_info->grp; Depends on when that RCU callback is scheduled, we could trigger a use-after-free in vlan_group_for_each_dev() right following this vlan_vid_del(). Fix it by moving vlan_vid_del() before setting grp. This is also symmetric to the vlan_vid_add() we call in vlan_device_event(). Reported-by: Fengguang Wu Fixes: efc73f4bbc23 ("net: Fix memory leak - vlan_info struct") Cc: Alexander Duyck Cc: Linus Torvalds Cc: Girish Moodalbail Signed-off-by: Cong Wang Reviewed-by: Girish Moodalbail Tested-by: Fengguang Wu Signed-off-by: David S. Miller net/8021q/vlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 505ee76761062a1872b024140e886b7136a6c1d5 Author: Ingo Molnar Date: Sat Nov 11 09:06:57 2017 +0100 tooling/headers: Sync the tools/include/uapi/drm/i915_drm.h UAPI header Last minute upstream update to one of the UAPI headers - sync it with tooling, to address this 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: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/include/uapi/drm/i915_drm.h | 1 + 1 file changed, 1 insertion(+) commit 529b3ca8323e282485b7c880e4cd26eaba15934f Merge: ca91659 33974a4 Author: Ingo Molnar Date: Sat Nov 11 09:03:59 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. Signed-off-by: Ingo Molnar commit 2118df93b5e1742931da358c2b8804c46fd64490 Author: Vivien Didelot Date: Wed Nov 8 10:50:10 2017 -0500 net: dsa: return after vlan prepare phase The current code does not return after successfully preparing the VLAN addition on every ports member of a it. Fix this. Fixes: 1ca4aa9cd4cc ("net: dsa: check VLAN capability of every switch") Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/switch.c | 2 ++ 1 file changed, 2 insertions(+) commit b0b38a1c6684b10dd0462bef4fef038917115012 Author: Vivien Didelot Date: Wed Nov 8 10:49:56 2017 -0500 net: dsa: return after mdb prepare phase The current code does not return after successfully preparing the MDB addition on every ports member of a multicast group. Fix this. Fixes: a1a6b7ea7f2d ("net: dsa: add cross-chip multicast support") Reported-by: Egil Hjelmeland Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/switch.c | 2 ++ 1 file changed, 2 insertions(+) commit ca91659962303d4fd5211a5e4e13df5cbb11e744 Merge: 60cfc98 1e37f2f Author: Linus Torvalds Date: Fri Nov 10 14:18:24 2017 -0800 Merge tag 'ceph-for-4.14-rc9' of git://github.com/ceph/ceph-client Pull ceph gix from Ilya Dryomov: "Memory allocation flags fix, marked for stable" * tag 'ceph-for-4.14-rc9' of git://github.com/ceph/ceph-client: rbd: use GFP_NOIO for parent stat and data requests commit 60cfc98b242cd89f6d9ec69ca40c38e8d1d80ed8 Merge: 5cf2360 26dd633 Author: Linus Torvalds Date: Fri Nov 10 14:14:23 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer updates from Dmitry Torokhov: - a new ACPI ID for Elan touchpad found in yet another Ideapad model - Synaptics RMI4 will allow binding to controllers reporting SMB version 3 (note that we are not adding any new ACPI IDs to the Synaptics PS/2 drover so unless user explicitly enables intertouch support there is no user-visible change) - a fixup to TSC 2004/5 touchscreen driver to mark input devices as "direct" to help userspace identify the type of device they are dealing with * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - RMI4 can also use SMBUS version 3 Input: tsc200x-core - set INPUT_PROP_DIRECT Input: elan_i2c - add ELAN060C to the ACPI table commit 5cf2360ba6eceee13ac2e72f4c21fdd31613f59b Merge: a579e94 d850a25 Author: Linus Torvalds Date: Fri Nov 10 12:24:42 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fix from Radim Krčmář: "Fix PPC HV host crash that can occur as a result of resizing the guest hashed page table" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: PPC: Book3S HV: Fix exclusion between HPT resizing and other HPT updates commit a579e949378eab7b992d2bf942b655ca407f2948 Merge: 085c17f b084116 Author: Linus Torvalds Date: Fri Nov 10 12:21:15 2017 -0800 Merge tag 'mips_fixes_4.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS fixes from James Hogan: "A final few MIPS fixes for 4.14: - fix BMIPS NULL pointer dereference (4.7) - fix AR7 early GPIO init allocation failure (3.19) - fix dead serial output on certain AR7 platforms (2.6.35)" * tag 'mips_fixes_4.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MIPS: AR7: Ensure that serial ports are properly set up MIPS: AR7: Defer registration of GPIO MIPS: BMIPS: Fix missing cbr address commit 085c17ff6bacccb45201098e71f95675e08f0e17 Author: Maciej W. Rozycki Date: Fri Nov 10 20:05:24 2017 +0000 .mailmap: Add Maciej W. Rozycki's Imagination e-mail address Following my recent transition from Imagination Technologies to the=20 reincarnated MIPS company add a .mailmap mapping for my work address, so that `scripts/get_maintainer.pl' gets it right for past commits. Signed-off-by: Maciej W. Rozycki Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit ea0ee33988778fb73e4f45e7c73fb735787e2f32 Author: Linus Torvalds Date: Fri Nov 10 11:19:11 2017 -0800 Revert "x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo" This reverts commit 941f5f0f6ef5338814145cf2b813cf1f98873e2f. Sadly, it turns out that we really can't just do the cross-CPU IPI to all CPU's to get their proper frequencies, because it's much too expensive on systems with lots of cores. So we'll have to revert this for now, and revisit it using a smarter model (probably doing one system-wide IPI at open time, and doing all the frequency calculations in parallel). Reported-by: WANG Chao Reported-by: Ingo Molnar Cc: Rafael J Wysocki Cc: stable@kernel.org Signed-off-by: Linus Torvalds arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/aperfmperf.c | 11 ++++------- arch/x86/kernel/cpu/proc.c | 4 +--- 3 files changed, 6 insertions(+), 11 deletions(-) commit 3e81277a6edd6b568c3a091a372dfe6368697b21 Merge: 1c9dbd4 60ccb31 Author: Linus Torvalds Date: Fri Nov 10 09:59:41 2017 -0800 Merge tag 'drm-fixes-for-v4.14-rc9' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Last few patches to wrap up. Two i915 fixes that are on their way to stable, one vmware black screen bug, and one const patch that I was going to drop, but it was clearly a pretty safe one liner" * tag 'drm-fixes-for-v4.14-rc9' of git://people.freedesktop.org/~airlied/linux: drm/i915: Deconstruct struct sgt_dma initialiser drm/i915: Reject unknown syncobj flags drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue drm/vmwgfx: constify vmw_fence_ops commit 4f7116757b4bd99e4ef2636c7d957a6d63035d11 Author: Marek Vasut Date: Fri Nov 10 11:22:39 2017 +0100 can: ifi: Fix transmitter delay calculation The CANFD transmitter delay calculation formula was updated in the latest software drop from IFI and improves the behavior of the IFI CANFD core during bitrate switching. Use the new formula to improve stability of the CANFD operation. Signed-off-by: Marek Vasut Cc: Markus Marb Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0eb96bf754d7fa6635aa0b0f6650c74b8a6b1cc9 Author: Yuchung Cheng Date: Tue Nov 7 15:33:43 2017 -0800 tcp: fix tcp_fastretrans_alert warning This patch fixes the cause of an WARNING indicatng TCP has pending retransmission in Open state in tcp_fastretrans_alert(). The root cause is a bad interaction between path mtu probing, if enabled, and the RACK loss detection. Upong receiving a SACK above the sequence of the MTU probing packet, RACK could mark the probe packet lost in tcp_fastretrans_alert(), prior to calling tcp_simple_retransmit(). tcp_simple_retransmit() only enters Loss state if it newly marks the probe packet lost. If the probe packet is already identified as lost by RACK, the sender remains in Open state with some packets marked lost and retransmitted. Then the next SACK would trigger the warning. The likely scenario is that the probe packet was lost due to its size or network congestion. The actual impact of this warning is small by potentially entering fast recovery an ACK later. The simple fix is always entering recovery (Loss) state if some packet is marked lost during path MTU probing. Fixes: a0370b3f3f2c ("tcp: enable RACK loss detection to trigger recovery") Reported-by: Oleksandr Natalenko Reported-by: Alexei Starovoitov Reported-by: Roman Gushchin Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7ec318feeed10a64c0359ec4d10889cb4defa39a Author: Eric Dumazet Date: Tue Nov 7 15:15:04 2017 -0800 tcp: gso: avoid refcount_t warning from tcp_gso_segment() When a GSO skb of truesize O is segmented into 2 new skbs of truesize N1 and N2, we want to transfer socket ownership to the new fresh skbs. In order to avoid expensive atomic operations on a cache line subject to cache bouncing, we replace the sequence : refcount_add(N1, &sk->sk_wmem_alloc); refcount_add(N2, &sk->sk_wmem_alloc); // repeated by number of segments refcount_sub(O, &sk->sk_wmem_alloc); by a single refcount_add(sum_of(N) - O, &sk->sk_wmem_alloc); Problem is : In some pathological cases, sum(N) - O might be a negative number, and syzkaller bot was apparently able to trigger this trace [1] atomic_t was ok with this construct, but we need to take care of the negative delta with refcount_t [1] refcount_t: saturated; leaking memory. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 8404 at lib/refcount.c:77 refcount_add_not_zero+0x198/0x200 lib/refcount.c:77 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 8404 Comm: syz-executor2 Not tainted 4.14.0-rc5-mm1+ #20 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 panic+0x1e4/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:refcount_add_not_zero+0x198/0x200 lib/refcount.c:77 RSP: 0018:ffff8801c606e3a0 EFLAGS: 00010282 RAX: 0000000000000026 RBX: 0000000000001401 RCX: 0000000000000000 RDX: 0000000000000026 RSI: ffffc900036fc000 RDI: ffffed0038c0dc68 RBP: ffff8801c606e430 R08: 0000000000000001 R09: 0000000000000000 R10: ffff8801d97f5eba R11: 0000000000000000 R12: ffff8801d5acf73c R13: 1ffff10038c0dc75 R14: 00000000ffffffff R15: 00000000fffff72f refcount_add+0x1b/0x60 lib/refcount.c:101 tcp_gso_segment+0x10d0/0x16b0 net/ipv4/tcp_offload.c:155 tcp4_gso_segment+0xd4/0x310 net/ipv4/tcp_offload.c:51 inet_gso_segment+0x60c/0x11c0 net/ipv4/af_inet.c:1271 skb_mac_gso_segment+0x33f/0x660 net/core/dev.c:2749 __skb_gso_segment+0x35f/0x7f0 net/core/dev.c:2821 skb_gso_segment include/linux/netdevice.h:3971 [inline] validate_xmit_skb+0x4ba/0xb20 net/core/dev.c:3074 __dev_queue_xmit+0xe49/0x2070 net/core/dev.c:3497 dev_queue_xmit+0x17/0x20 net/core/dev.c:3538 neigh_hh_output include/net/neighbour.h:471 [inline] neigh_output include/net/neighbour.h:479 [inline] ip_finish_output2+0xece/0x1460 net/ipv4/ip_output.c:229 ip_finish_output+0x85e/0xd10 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:238 [inline] ip_output+0x1cc/0x860 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:459 [inline] ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124 ip_queue_xmit+0x8c6/0x18e0 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x1ab7/0x3840 net/ipv4/tcp_output.c:1137 tcp_write_xmit+0x663/0x4de0 net/ipv4/tcp_output.c:2341 __tcp_push_pending_frames+0xa0/0x250 net/ipv4/tcp_output.c:2513 tcp_push_pending_frames include/net/tcp.h:1722 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5050 [inline] tcp_rcv_established+0x8c7/0x18a0 net/ipv4/tcp_input.c:5497 tcp_v4_do_rcv+0x2ab/0x7d0 net/ipv4/tcp_ipv4.c:1460 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:2776 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+0x31c/0x890 net/socket.c:2048 __sys_sendmmsg+0x1e6/0x5f0 net/socket.c:2138 Fixes: 14afee4b6092 ("net: convert sock.sk_wmem_alloc from atomic_t to refcount_t") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv4/tcp_offload.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4cbdd0ee67191481ec57ceed94febdfef95c9f25 Author: Stephane Grosjean Date: Thu Nov 9 14:42:14 2017 +0100 can: peak: Add support for new PCIe/M2 CAN FD interfaces This adds support for the following PEAK-System CAN FD interfaces: PCAN-cPCIe FD CAN FD Interface for cPCI Serial (2 or 4 channels) PCAN-PCIe/104-Express CAN FD Interface for PCIe/104-Express (1, 2 or 4 ch.) PCAN-miniPCIe FD CAN FD Interface for PCIe Mini (1, 2 or 4 channels) PCAN-PCIe FD OEM CAN FD Interface for PCIe OEM version (1, 2 or 4 ch.) PCAN-M.2 CAN FD Interface for M.2 (1 or 2 channels) Like the PCAN-PCIe FD interface, all of these boards run the same IP Core that is able to handle CAN FD (see also http://www.peak-system.com). Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/peak_canfd/peak_pciefd_main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 4dcf924c2eda0c47a5c53b7703e3dc65ddaa8920 Author: Gerhard Bertelsmann Date: Mon Nov 6 18:16:56 2017 +0100 can: sun4i: handle overrun in RX FIFO SUN4Is CAN IP has a 64 byte deep FIFO buffer. If the buffer is not drained fast enough (overrun) it's getting mangled. Already received frames are dropped - the data can't be restored. Signed-off-by: Gerhard Bertelsmann Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/sun4i_can.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit fb5f0b3ef69b95e665e4bbe8a3de7201f09f1071 Author: Richard Schütz Date: Sun Oct 29 13:03:22 2017 +0100 can: c_can: don't indicate triple sampling support for D_CAN The D_CAN controller doesn't provide a triple sampling mode, so don't set the CAN_CTRLMODE_3_SAMPLES flag in ctrlmode_supported. Currently enabling triple sampling is a no-op. Signed-off-by: Richard Schütz Cc: linux-stable # >= v3.6 Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can_pci.c | 1 - drivers/net/can/c_can/c_can_platform.c | 1 - 2 files changed, 2 deletions(-) commit b8347c2196492f4e1cccde3d92fda1cc2cc7de7e Author: Alexander Shishkin Date: Mon Jul 24 13:04:28 2017 +0300 x86/debug: Handle warnings before the notifier chain, to fix KGDB crash Commit: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") turned warnings into UD0, but the fixup code only runs after the notify_die() chain. This is a problem, in particular, with kgdb, which kicks in as if it was a BUG(). Fix this by running the fixup code before the notifier chain in the invalid op handler path. Signed-off-by: Alexander Shishkin Tested-by: Ilya Dryomov Acked-by: Daniel Thompson Acked-by: Thomas Gleixner Cc: Jason Wessel Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Richard Weinberger Cc: # v4.12+ Link: http://lkml.kernel.org/r/20170724100428.19173-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d1c61e6d79ea0d4d53dc18bcd2db30ef2d99cfa7 Author: Eugenia Emantayev Date: Thu Jan 12 17:11:45 2017 +0200 net/mlx5e: Increase Striding RQ minimum size limit to 4 multi-packet WQEs This is to prevent the case of working with a single MPWQE (1 WQE is always reserved as RQ is linked-list). When the WQE is fully consumed, HW should still have available buffer in order not to drop packets. Fixes: 461017cb006a ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)") Signed-off-by: Eugenia Emantayev Reviewed-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e50b2619538ea0224c037f6fa746023089e0654 Author: Inbar Karmy Date: Sun Oct 15 17:30:59 2017 +0300 net/mlx5e: Set page to null in case dma mapping fails Currently, when dma mapping fails, put_page is called, but the page is not set to null. Later, in the page_reuse treatment in mlx5e_free_rx_descs(), mlx5e_page_release() is called for the second time, improperly doing dma_unmap (for a non-mapped address) and an extra put_page. Prevent this by nullifying the page pointer when dma_map fails. Fixes: accd58833237 ("net/mlx5e: Introduce RX Page-Reuse") Signed-off-by: Inbar Karmy Reviewed-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2a8d6065e7b90ad9d5540650944d802b0f86bdfe Author: Saeed Mahameed Date: Tue Oct 31 15:34:00 2017 -0700 net/mlx5e: Fix napi poll with zero budget napi->poll can be called with budget 0, e.g. in netpoll scenarios where the caller only wants to poll TX rings (poll_one_napi@net/core/netpoll.c). The below commit changed RX polling from "while" loop to "do {} while", which caused to ignore the initial budget and handle at least one RX packet. This fixes the following warning: [ 2852.049194] mlx5e_napi_poll+0x0/0x260 [mlx5_core] exceeded budget in poll [ 2852.049195] ------------[ cut here ]------------ [ 2852.049195] WARNING: CPU: 0 PID: 25691 at net/core/netpoll.c:171 netpoll_poll_dev+0x18a/0x1a0 Fixes: 4b7dfc992514 ("net/mlx5e: Early-return on empty completion queues") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Reported-by: Martin KaFai Lau Tested-by: Martin KaFai Lau Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d2aa060d40fa060e963f9a356d43481e43ba3dac Author: Huy Nguyen Date: Tue Sep 26 15:11:56 2017 -0500 net/mlx5: Cancel health poll before sending panic teardown command After the panic teardown firmware command, health_care detects the error in PCI bus and calls the mlx5_pci_err_detected. This health_care flow is no longer needed because the panic teardown firmware command will bring down the PCI bus communication with the HCA. The solution is to cancel the health care timer and its pending workqueue request before sending panic teardown firmware command. Kernel trace: mlx5_core 0033:01:00.0: Shutdown was called mlx5_core 0033:01:00.0: health_care:154:(pid 9304): handling bad device here mlx5_core 0033:01:00.0: mlx5_handle_bad_state:114:(pid 9304): NIC state 1 mlx5_core 0033:01:00.0: mlx5_pci_err_detected was called mlx5_core 0033:01:00.0: mlx5_enter_error_state:96:(pid 9304): start mlx5_3:mlx5_ib_event:3061:(pid 9304): warning: event on port 0 mlx5_core 0033:01:00.0: mlx5_enter_error_state:104:(pid 9304): end Unable to handle kernel paging request for data at address 0x0000003f Faulting instruction address: 0xc0080000434b8c80 Fixes: 8812c24d28f4 ('net/mlx5: Add fast unload support in shutdown flow') Signed-off-by: Huy Nguyen Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b8cce68bf1f1b773ac1a535707f968512b3c1e5f Author: Huy Nguyen Date: Sun Oct 29 22:40:56 2017 -0500 net/mlx5: Loop over temp list to release delay events list_splice_init initializing waiting_events_list after splicing it to temp list, therefore we should loop over temp list to fire the events. Fixes: 4ca637a20a52 ("net/mlx5: Delay events till mlx5 interface's add complete for pci resume") Signed-off-by: Huy Nguyen Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cb483a5cc84b497afb51a6c5dfb5a38a0b67086 Author: Håkon Bugge Date: Tue Nov 7 16:33:34 2017 +0100 rds: ib: Fix NULL pointer dereference in debug code rds_ib_recv_refill() is a function that refills an IB receive queue. It can be called from both the CQE handler (tasklet) and a worker thread. Just after the call to ib_post_recv(), a debug message is printed with rdsdebug(): ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, recv->r_ibinc, sg_page(&recv->r_frag->f_sg), (long) ib_sg_dma_address( ic->i_cm_id->device, &recv->r_frag->f_sg), ret); Now consider an invocation of rds_ib_recv_refill() from the worker thread, which is preemptible. Further, assume that the worker thread is preempted between the ib_post_recv() and rdsdebug() statements. Then, if the preemption is due to a receive CQE event, the rds_ib_recv_cqe_handler() will be invoked. This function processes receive completions, including freeing up data structures, such as the recv->r_frag. In this scenario, rds_ib_recv_cqe_handler() will process the receive WR posted above. That implies, that the recv->r_frag has been freed before the above rdsdebug() statement has been executed. When it is later executed, we will have a NULL pointer dereference: [ 4088.068008] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [ 4088.076754] IP: rds_ib_recv_refill+0x87/0x620 [rds_rdma] [ 4088.082686] PGD 0 P4D 0 [ 4088.085515] Oops: 0000 [#1] SMP [ 4088.089015] Modules linked in: rds_rdma(OE) rds(OE) rpcsec_gss_krb5(E) nfsv4(E) dns_resolver(E) nfs(E) fscache(E) mlx4_ib(E) ib_ipoib(E) rdma_ucm(E) ib_ucm(E) ib_uverbs(E) ib_umad(E) rdma_cm(E) ib_cm(E) iw_cm(E) ib_core(E) binfmt_misc(E) sb_edac(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) ghash_clmulni_intel(E) pcbc(E) aesni_intel(E) crypto_simd(E) iTCO_wdt(E) glue_helper(E) iTCO_vendor_support(E) sg(E) cryptd(E) pcspkr(E) ipmi_si(E) ipmi_devintf(E) ipmi_msghandler(E) shpchp(E) ioatdma(E) i2c_i801(E) wmi(E) lpc_ich(E) mei_me(E) mei(E) mfd_core(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) ip_tables(E) ext4(E) mbcache(E) jbd2(E) fscrypto(E) mgag200(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) [ 4088.168486] fb_sys_fops(E) ahci(E) ixgbe(E) libahci(E) ttm(E) mdio(E) ptp(E) pps_core(E) drm(E) sd_mod(E) libata(E) crc32c_intel(E) mlx4_core(E) i2c_core(E) dca(E) megaraid_sas(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) [last unloaded: rds] [ 4088.193442] CPU: 20 PID: 1244 Comm: kworker/20:2 Tainted: G OE 4.14.0-rc7.master.20171105.ol7.x86_64 #1 [ 4088.205097] Hardware name: Oracle Corporation ORACLE SERVER X5-2L/ASM,MOBO TRAY,2U, BIOS 31110000 03/03/2017 [ 4088.216074] Workqueue: ib_cm cm_work_handler [ib_cm] [ 4088.221614] task: ffff885fa11d0000 task.stack: ffffc9000e598000 [ 4088.228224] RIP: 0010:rds_ib_recv_refill+0x87/0x620 [rds_rdma] [ 4088.234736] RSP: 0018:ffffc9000e59bb68 EFLAGS: 00010286 [ 4088.240568] RAX: 0000000000000000 RBX: ffffc9002115d050 RCX: ffffc9002115d050 [ 4088.248535] RDX: ffffffffa0521380 RSI: ffffffffa0522158 RDI: ffffffffa0525580 [ 4088.256498] RBP: ffffc9000e59bbf8 R08: 0000000000000005 R09: 0000000000000000 [ 4088.264465] R10: 0000000000000339 R11: 0000000000000001 R12: 0000000000000000 [ 4088.272433] R13: ffff885f8c9d8000 R14: ffffffff81a0a060 R15: ffff884676268000 [ 4088.280397] FS: 0000000000000000(0000) GS:ffff885fbec80000(0000) knlGS:0000000000000000 [ 4088.289434] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4088.295846] CR2: 0000000000000020 CR3: 0000000001e09005 CR4: 00000000001606e0 [ 4088.303816] Call Trace: [ 4088.306557] rds_ib_cm_connect_complete+0xe0/0x220 [rds_rdma] [ 4088.312982] ? __dynamic_pr_debug+0x8c/0xb0 [ 4088.317664] ? __queue_work+0x142/0x3c0 [ 4088.321944] rds_rdma_cm_event_handler+0x19e/0x250 [rds_rdma] [ 4088.328370] cma_ib_handler+0xcd/0x280 [rdma_cm] [ 4088.333522] cm_process_work+0x25/0x120 [ib_cm] [ 4088.338580] cm_work_handler+0xd6b/0x17aa [ib_cm] [ 4088.343832] process_one_work+0x149/0x360 [ 4088.348307] worker_thread+0x4d/0x3e0 [ 4088.352397] kthread+0x109/0x140 [ 4088.355996] ? rescuer_thread+0x380/0x380 [ 4088.360467] ? kthread_park+0x60/0x60 [ 4088.364563] ret_from_fork+0x25/0x30 [ 4088.368548] Code: 48 89 45 90 48 89 45 98 eb 4d 0f 1f 44 00 00 48 8b 43 08 48 89 d9 48 c7 c2 80 13 52 a0 48 c7 c6 58 21 52 a0 48 c7 c7 80 55 52 a0 <4c> 8b 48 20 44 89 64 24 08 48 8b 40 30 49 83 e1 fc 48 89 04 24 [ 4088.389612] RIP: rds_ib_recv_refill+0x87/0x620 [rds_rdma] RSP: ffffc9000e59bb68 [ 4088.397772] CR2: 0000000000000020 [ 4088.401505] ---[ end trace fe922e6ccf004431 ]--- This bug was provoked by compiling rds out-of-tree with EXTRA_CFLAGS="-DRDS_DEBUG -DDEBUG" and inserting an artificial delay between the rdsdebug() and ib_ib_port_recv() statements: /* XXX when can this fail? */ ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); + if (can_wait) + usleep_range(1000, 5000); rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, recv->r_ibinc, sg_page(&recv->r_frag->f_sg), (long) ib_sg_dma_address( The fix is simply to move the rdsdebug() statement up before the ib_post_recv() and remove the printing of ret, which is taken care of anyway by the non-debug code. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Reviewed-by: Wei Lin Guay Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_recv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1c9dbd4615fd751e5e0b99807a3c7c8612e28e20 Merge: 5cff368 60fdb44 Author: Linus Torvalds Date: Thu Nov 9 18:26:51 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "2 fixes" * emailed patches from Andrew Morton : MAINTAINERS: update TPM driver infrastructure changes sysctl: add register_sysctl() dummy helper commit 60fdb44a23cbc5d8db224577e14ea667d7c53478 Author: Jarkko Sakkinen Date: Thu Nov 9 13:38:21 2017 -0800 MAINTAINERS: update TPM driver infrastructure changes [akpm@linux-foundation.org: alpha-sort CREDITS, per Randy] Link: http://lkml.kernel.org/r/20170915223811.21368-1-jarkko.sakkinen@linux.intel.com Signed-off-by: Jarkko Sakkinen Cc: Marcel Selhorst Cc: Ashley Lai Cc: Mimi Zohar Cc: Jarkko Sakkinen Cc: Boris Brezillon Cc: Borislav Petkov Cc: Håvard Skinnemoen Cc: Martin Kepplinger Cc: Pavel Machek Cc: Geert Uytterhoeven Cc: Hans-Christian Noren Egtvedt Cc: Arnaldo Carvalho de Melo Cc: Gertjan van Wingerde Cc: Greg Kroah-Hartman Cc: David S. Miller Cc: Mauro Carvalho Chehab Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds CREDITS | 9 ++++++++- MAINTAINERS | 13 ++----------- 2 files changed, 10 insertions(+), 12 deletions(-) commit e609a6b85182f8a479d265839d3ff9aad2e67b18 Author: Arnd Bergmann Date: Thu Nov 9 13:38:18 2017 -0800 sysctl: add register_sysctl() dummy helper register_sysctl() has been around for five years with commit fea478d4101a ("sysctl: Add register_sysctl for normal sysctl users") but now that arm64 started using it, I ran into a compile error: arch/arm64/kernel/armv8_deprecated.c: In function 'register_insn_emulation_sysctl': arch/arm64/kernel/armv8_deprecated.c:257:2: error: implicit declaration of function 'register_sysctl' This adds a inline function like we already have for register_sysctl_paths() and register_sysctl_table(). Link: http://lkml.kernel.org/r/20171106133700.558647-1-arnd@arndb.de Fixes: 38b9aeb32fa7 ("arm64: Port deprecated instruction emulation to new sysctl interface") Signed-off-by: Arnd Bergmann Reviewed-by: Dave Martin Acked-by: Kees Cook Acked-by: Will Deacon Cc: Catalin Marinas Cc: "Luis R. Rodriguez" Cc: Alex Benne Cc: Arnd Bergmann Cc: "Eric W. Biederman" Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sysctl.h | 5 +++++ 1 file changed, 5 insertions(+) commit 5cff3684192773a2c2b1102acd10b99aaa6a3f67 Merge: e7a7912 6b7be52 Author: Linus Torvalds Date: Thu Nov 9 17:43:27 2017 -0800 Merge tag 'pci-v4.14-fixes-7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI maintainership updates from Bjorn Helgaas: "Update MAINTAINERS for HiSilicon, Microsemi Switchtec, and native host bridge drivers (Gabriele Paoloni, Sebastian Andrzej Siewior). Note that starting with changes intended for v4.16, Lorenzo Pieralisi will maintain the drivers/pci/{dwc,endpoint,host} directories. My intent is to continue to merge those changes via my tree, so this should be transparent to you" * tag 'pci-v4.14-fixes-7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: MAINTAINERS: Add Lorenzo Pieralisi for PCI host bridge drivers MAINTAINERS: Remove Gabriele Paoloni as HiSilicon PCI maintainer MAINTAINERS: Remove Stephen Bates as Microsemi Switchtec maintainer commit e7a7912a91cc1a274fab17f8a66b1e9dcfe00047 Merge: 3fefc31 b9dd05c Author: Linus Torvalds Date: Thu Nov 9 17:41:39 2017 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Last ARM fix for 4.14. This plugs a hole in dump_instr(), which, with certain conditions satisfied, can dump instructions from kernel space" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8720/1: ensure dump_instr() checks addr_limit commit 3fefc31843cfe2b5f072efe11ed9ccaf6a7a5092 Merge: d93d4ce e029b9b Author: Linus Torvalds Date: Thu Nov 9 11:16:28 2017 -0800 Merge tag 'pm-final-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull final power management fixes from Rafael Wysocki: "These fix a regression in the schedutil cpufreq governor introduced by a recent change and blacklist Dell XPS13 9360 from using the Low Power S0 Idle _DSM interface which triggers serious problems on one of these machines. Specifics: - Prevent the schedutil cpufreq governor from using the utilization of a wrong CPU in some cases which started to happen after one of the recent changes in it (Chris Redpath). - Blacklist Dell XPS13 9360 from using the Low Power S0 Idle _DSM interface as that causes serious issue (related to NVMe) to appear on one of these machines, even though the other Dells XPS13 9360 in somewhat different HW configurations behave correctly (Rafael Wysocki)" * tag 'pm-final-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360 cpufreq: schedutil: Examine the correct CPU when we update util commit d93d4ce103fdd6c6689e94cfbd0316b027d6ead2 Merge: d1041cd 75ee94b Author: Linus Torvalds Date: Thu Nov 9 09:58:11 2017 -0800 Merge tag 'sound-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The amount of the changes isn't as quite small as wished, nevertheless they are straight fixes that deserve merging to 4.14 final. Most of fixes are about ALSA core bugs spotted by fuzzer: a follow-up fix for the previous nested rwsem patch, a fix to avoid the resource hogs due to too many concurrent ALSA timer invocations, and a fix for a crash with SYSEX MIDI transfer over OSS sequencer emulation that is used by none but fuzzer. The rest are usual HD-audio and USB-audio device-specific quirks, which are safe to apply" * tag 'sound-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - fix headset mic problem for Dell machines with alc274 ALSA: seq: Fix OSS sysex delivery in OSS emulation ALSA: seq: Avoid invalid lockdep class warning ALSA: timer: Limit max instances per timer ALSA: usb-audio: support new Amanero Combo384 firmware version commit d1041cdc60bc122aac09f822aad1ff6c5cb84406 Merge: 87df261 6a17280 Author: Linus Torvalds Date: Thu Nov 9 09:31:34 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix use-after-free in IPSEC input parsing, desintation address pointer was loaded before pskb_may_pull() which can change the SKB data pointers. From Florian Westphal. 2) Stack out-of-bounds read in xfrm_state_find(), from Steffen Klassert. 3) IPVS state of SKB is not properly reset when moving between namespaces, from Ye Yin. 4) Fix crash in asix driver suspend and resume, from Andrey Konovalov. 5) Don't deliver ipv6 l2tp tunnel packets to ipv4 l2tp tunnels, and vice versa, from Guillaume Nault. 6) Fix DSACK undo on non-dup ACKs, from Priyaranjan Jha. 7) Fix regression in bond_xmit_hash()'s behavior after the TCP port selection changes back in 4.2, from Hangbin Liu. 8) Two divide by zero bugs in USB networking drivers when parsing descriptors, from Bjorn Mork. 9) Fix bonding slaves being stuck in BOND_LINK_FAIL state, from Jay Vosburgh. 10) Missing skb_reset_mac_header() in qmi_wwan, from Kristian Evensen. 11) Fix the destruction of tc action object races properly, from Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (31 commits) cls_u32: use tcf_exts_get_net() before call_rcu() cls_tcindex: use tcf_exts_get_net() before call_rcu() cls_rsvp: use tcf_exts_get_net() before call_rcu() cls_route: use tcf_exts_get_net() before call_rcu() cls_matchall: use tcf_exts_get_net() before call_rcu() cls_fw: use tcf_exts_get_net() before call_rcu() cls_flower: use tcf_exts_get_net() before call_rcu() cls_flow: use tcf_exts_get_net() before call_rcu() cls_cgroup: use tcf_exts_get_net() before call_rcu() cls_bpf: use tcf_exts_get_net() before call_rcu() cls_basic: use tcf_exts_get_net() before call_rcu() net_sched: introduce tcf_exts_get_net() and tcf_exts_put_net() Revert "net_sched: hold netns refcnt for each action" net: usb: asix: fill null-ptr-deref in asix_suspend Revert "net: usb: asix: fill null-ptr-deref in asix_suspend" qmi_wwan: Add missing skb_reset_mac_header-call bonding: fix slave stuck in BOND_LINK_FAIL state qrtr: Move to postcore_initcall net: qmi_wwan: fix divide by 0 on bad descriptors net: cdc_ether: fix divide by 0 on bad descriptors ... commit be739f4b5ddece74ef25e2304b17a7fd24575e9b Author: Kirill A. Shutemov Date: Tue Nov 7 13:38:04 2017 +0300 x86/mm: Fix ELF_ET_DYN_BASE for 5-level paging On machines with 5-level paging we don't want to allocate mapping above 47-bit unless user explicitly asked for it. See b569bab78d8d ("x86/mm: Prepare to expose larger address space to userspace") for details. c715b72c1ba4 ("mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes") broke the behaviour. After the commit elf binary and heap got mapped above 47-bits. Use DEFAULT_MAP_WINDOW instead of TASK_SIZE to determine ELF_ET_DYN_BASE so it's forced to be below 47-bits unconditionally. Fixes: c715b72c1ba4 ("mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Acked-by: Michal Hocko Cc: Kees Cook Cc: Nicholas Piggin Cc: linux-mm@kvack.org Cc: Andrew Morton Link: https://lkml.kernel.org/r/20171107103804.47341-1-kirill.shutemov@linux.intel.com arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33974a414ce2324554f75dbd204ff0868f499e32 Author: Andrei Vagin Date: Tue Nov 7 16:22:45 2017 -0800 perf trace: Call machine__exit() at exit Otherwise 'perf trace' leaves a temporary file /tmp/perf-vdso.so-XXXXXX. $ perf trace -o log true $ ls -l /tmp/perf-vdso.* -rw------- 1 root root 8192 Nov 8 03:08 /tmp/perf-vdso.so-5bCpD0 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-1-avagin@openvz.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a271bfaf30ce8f7f57c6b65c47bff6d306d0b758 Author: Jiri Olsa Date: Thu Nov 9 10:02:10 2017 +0100 perf tools: Fix eBPF event specification parsing Looks like I've reached the new level of stupidity, adding missing braces. Committer testing: Given the following eBPF C filter, that will add a record when it returns true, i.e. when the tv_nsec variable is > 2000ns, should be built and installed via sys_bpf(), but fails to do so before this patch: # cat filter.c #include #define SEC(NAME) __attribute__((section(NAME), used)) SEC("func=hrtimer_nanosleep rqtp->tv_nsec") int func(void *ctx, int err, long nsec) { return nsec > 1000; } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; # # perf trace -e nanosleep,filter.c usleep 1 invalid or unsupported event: 'filter.c' Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events # And works again after it is applied, the nothing is inserted when the co # perf trace -e *sleep,filter.c usleep 1 0.000 ( 0.066 ms): usleep/23994 nanosleep(rqtp: 0x7ffead94a0d0) = 0 # perf trace -e *sleep,filter.c usleep 2 0.000 ( 0.008 ms): usleep/24378 nanosleep(rqtp: 0x7fffa021ba50) ... 0.008 ( ): perf_bpf_probe:func:(ffffffffb410cb30) tv_nsec=2000) 0.000 ( 0.066 ms): usleep/24378 ... [continued]: nanosleep()) = 0 # The intent of 9445464bb831 is kept: # perf stat -e 'cpu/uops_executed.core,krava/' true event syntax error: '..cuted.core,krava/' \___ unknown term valid terms: cmask,pc,event,edge,in_tx,any,ldlat,inv,umask,in_tx_cp,offcore_rsp,config,config1,config2,name,period Run 'perf list' for a list of valid events Usage: perf stat [] [] -e, --event event selector. use 'perf list' to list available events # # perf stat -e 'cpu/uops_executed.core,period=1/' true Performance counter stats for 'true': 808,332 cpu/uops_executed.core,period=1/ 0.002997237 seconds time elapsed # Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Fixes: 9445464bb831 ("perf tools: Unwind properly location after REJECT") Link: http://lkml.kernel.org/n/tip-diea0ihbwpxfw6938huv3whj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6af53b7d6fa40262c16753fe2781a3e792d5e1b Author: Jiri Olsa Date: Wed Nov 8 16:43:09 2017 +0100 perf tools: Add "reject" option for parse-events.l Arnaldo reported broken builds in some distros using a newer flex release, 2.6.4, found in Alpine Linux 3.6 and Edge, with flex not spotting the REJECT macro: CC /tmp/build/perf/util/parse-events-flex.o util/parse-events.l: In function 'parse_events_lex': /tmp/build/perf/util/parse-events-flex.c:4734:16: error: \ 'reject_used_but_not_detected' undeclared (first use in this function) It's happening because we put the REJECT under another USER_REJECT macro in following commit: 9445464bb831 perf tools: Unwind properly location after REJECT Fortunately flex provides option for force it to use REJECT, adding it to parse-events.l. Reported-by: Arnaldo Carvalho de Melo Reported-by: Markus Trippelsdorf Signed-off-by: Jiri Olsa Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Fixes: 9445464bb831 ("perf tools: Unwind properly location after REJECT") Link: http://lkml.kernel.org/n/tip-7kdont984mw12ijk7rji6b8p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 1 + 1 file changed, 1 insertion(+) commit 1e37f2f84680fa7f8394fd444b6928e334495ccc Author: Ilya Dryomov Date: Mon Nov 6 11:33:36 2017 +0100 rbd: use GFP_NOIO for parent stat and data requests rbd_img_obj_exists_submit() and rbd_img_obj_parent_read_full() are on the writeback path for cloned images -- we attempt a stat on the parent object to see if it exists and potentially read it in to call copyup. GFP_NOIO should be used instead of GFP_KERNEL here. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/22014 Signed-off-by: Ilya Dryomov Reviewed-by: David Disseldorp drivers/block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75ee94b20b46459e3d29f5ac2c3af3cebdeef777 Author: Hui Wang Date: Thu Nov 9 08:48:08 2017 +0800 ALSA: hda - fix headset mic problem for Dell machines with alc274 Confirmed with Kailang of Realtek, the pin 0x19 is for Headset Mic, and the pin 0x1a is for Headphone Mic, he suggested to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to fix this problem. And we verified applying this FIXUP can fix this problem. Cc: Cc: Kailang Yang Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6a17280247458ac2c302200e2d6ae36656f75bc6 Merge: 623859a c9f3f81 Author: David S. Miller Date: Thu Nov 9 10:58:35 2017 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-11-09 1) Fix a use after free due to a reallocated skb head. From Florian Westphal. 2) Fix sporadic lookup failures on labeled IPSEC. From Florian Westphal. 3) Fix a stack out of bounds when a socket policy is applied to an IPv6 socket that sends IPv4 packets. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 60ccb31bd680469ee0db92b0b6594d79bd13ff87 Merge: 17208f1 423a8a9 Author: Dave Airlie Date: Thu Nov 9 11:17:32 2017 +1000 Merge tag 'drm-intel-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix possible NULL dereference (Chris). - Avoid miss usage of syncobj by rejecting unknown flags (Tvrtko). * tag 'drm-intel-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Deconstruct struct sgt_dma initialiser drm/i915: Reject unknown syncobj flags commit 623859ae06b85cabba79ce78f0d49e67783d4c34 Merge: 8f56246 35c55fc Author: David S. Miller Date: Thu Nov 9 10:03:10 2017 +0900 Merge branch 'net-sched-race-fix' Cong Wang says: ==================== net_sched: close the race between call_rcu() and cleanup_net() This patchset tries to fix the race between call_rcu() and cleanup_net() again. Without holding the netns refcnt the tc_action_net_exit() in netns workqueue could be called before filter destroy works in tc filter workqueue. This patchset moves the netns refcnt from tc actions to tcf_exts, without breaking per-netns tc actions. Patch 1 reverts the previous fix, patch 2 introduces two new API's to help to address the bug and the rest patches switch to the new API's. Please see each patch for details. I was not able to reproduce this bug, but now after adding some delay in filter destroy work I manage to trigger the crash. After this patchset, the crash is not reproducible any more and the debugging printk's show the order is expected too. ==================== Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Reported-by: Lucas Bates Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 35c55fc156d85a396a975fc17636f560fc02fd65 Author: Cong Wang Date: Mon Nov 6 13:47:30 2017 -0800 cls_u32: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_u32.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f2b751053ee9314e82c178f6ca0fee7e160fac95 Author: Cong Wang Date: Mon Nov 6 13:47:29 2017 -0800 cls_tcindex: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_tcindex.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 96585063a27f0704dcf7a09f8b78edd6a8973965 Author: Cong Wang Date: Mon Nov 6 13:47:28 2017 -0800 cls_rsvp: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_rsvp.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 3fd51de5e3ba447624a08a8ba29f90d94f0fe909 Author: Cong Wang Date: Mon Nov 6 13:47:27 2017 -0800 cls_route: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_route.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 57767e785321a427b8cdd282db2b8b33cd218ffa Author: Cong Wang Date: Mon Nov 6 13:47:26 2017 -0800 cls_matchall: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_matchall.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d5f984f5af1d926bc9c7a7f90e7a1e1e313a8ba7 Author: Cong Wang Date: Mon Nov 6 13:47:25 2017 -0800 cls_fw: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_fw.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 0dadc117ac8bc78d8144e862ac8ad23f342f9ea8 Author: Cong Wang Date: Mon Nov 6 13:47:24 2017 -0800 cls_flower: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_flower.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 22f7cec93f0af86c4b66bf34a977da9d7cef076e Author: Cong Wang Date: Mon Nov 6 13:47:23 2017 -0800 cls_flow: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_flow.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit ed1481681414e4d4264ad46864d5c1da5ff6ccb1 Author: Cong Wang Date: Mon Nov 6 13:47:22 2017 -0800 cls_cgroup: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_cgroup.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit aae2c35ec89252639a97769fa72dbbf8f1cc3107 Author: Cong Wang Date: Mon Nov 6 13:47:21 2017 -0800 cls_bpf: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_bpf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0b2a59894b7657fab46b50f176bd772aa495044f Author: Cong Wang Date: Mon Nov 6 13:47:20 2017 -0800 cls_basic: use tcf_exts_get_net() before call_rcu() Hold netns refcnt before call_rcu() and release it after the tcf_exts_destroy() is done. Note, on ->destroy() path we have to respect the return value of tcf_exts_get_net(), on other paths it should always return true, so we don't need to care. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_basic.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e4b95c41df36befcfd117210900cd790bc2cd048 Author: Cong Wang Date: Mon Nov 6 13:47:19 2017 -0800 net_sched: introduce tcf_exts_get_net() and tcf_exts_put_net() Instead of holding netns refcnt in tc actions, we can minimize the holding time by saving it in struct tcf_exts instead. This means we can just hold netns refcnt right before call_rcu() and release it after tcf_exts_destroy() is done. However, because on netns cleanup path we call tcf_proto_destroy() too, obviously we can not hold netns for a zero refcnt, in this case we have to do cleanup synchronously. It is fine for RCU too, the caller cleanup_net() already waits for a grace period. For other cases, refcnt is non-zero and we can safely grab it as normal and release it after we are done. This patch provides two new API for each filter to use: tcf_exts_get_net() and tcf_exts_put_net(). And all filters now can use the following pattern: void __destroy_filter() { tcf_exts_destroy(); tcf_exts_put_net(); // <== release netns refcnt kfree(); } void some_work() { rtnl_lock(); __destroy_filter(); rtnl_unlock(); } void some_rcu_callback() { tcf_queue_work(some_work); } if (tcf_exts_get_net()) // <== hold netns refcnt call_rcu(some_rcu_callback); else __destroy_filter(); Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/pkt_cls.h | 24 ++++++++++++++++++++++++ net/sched/cls_api.c | 1 + 2 files changed, 25 insertions(+) commit c7e460ce55724d4e4e22d3126e5c47273819c53a Author: Cong Wang Date: Mon Nov 6 13:47:18 2017 -0800 Revert "net_sched: hold netns refcnt for each action" This reverts commit ceffcc5e254b450e6159f173e4538215cebf1b59. If we hold that refcnt, the netns can never be destroyed until all actions are destroyed by user, this breaks our netns design which we expect all actions are destroyed when we destroy the whole netns. Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 4 +--- net/sched/act_api.c | 2 -- net/sched/act_bpf.c | 2 +- net/sched/act_connmark.c | 2 +- net/sched/act_csum.c | 2 +- net/sched/act_gact.c | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_ipt.c | 4 ++-- net/sched/act_mirred.c | 2 +- net/sched/act_nat.c | 2 +- net/sched/act_pedit.c | 2 +- net/sched/act_police.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/act_simple.c | 2 +- net/sched/act_skbedit.c | 2 +- net/sched/act_skbmod.c | 2 +- net/sched/act_tunnel_key.c | 2 +- net/sched/act_vlan.c | 2 +- 18 files changed, 18 insertions(+), 22 deletions(-) commit 8f5624629105589bcc23d0e51cc01bd8103d09a5 Author: Andrey Konovalov Date: Mon Nov 6 13:26:46 2017 +0100 net: usb: asix: fill null-ptr-deref in asix_suspend When asix_suspend() is called dev->driver_priv might not have been assigned a value, so we need to check that it's not NULL. Similar issue is present in asix_resume(), this patch fixes it as well. Found by syzkaller. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc4-43422-geccacdd69a8c #400 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event task: ffff88006bb36300 task.stack: ffff88006bba8000 RIP: 0010:asix_suspend+0x76/0xc0 drivers/net/usb/asix_devices.c:629 RSP: 0018:ffff88006bbae718 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff880061ba3b80 RCX: 1ffff1000c34d644 RDX: 0000000000000001 RSI: 0000000000000402 RDI: 0000000000000008 RBP: ffff88006bbae738 R08: 1ffff1000d775cad R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800630a8b40 R13: 0000000000000000 R14: 0000000000000402 R15: ffff880061ba3b80 FS: 0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff33cf89000 CR3: 0000000061c0a000 CR4: 00000000000006f0 Call Trace: usb_suspend_interface drivers/usb/core/driver.c:1209 usb_suspend_both+0x27f/0x7e0 drivers/usb/core/driver.c:1314 usb_runtime_suspend+0x41/0x120 drivers/usb/core/driver.c:1852 __rpm_callback+0x339/0xb60 drivers/base/power/runtime.c:334 rpm_callback+0x106/0x220 drivers/base/power/runtime.c:461 rpm_suspend+0x465/0x1980 drivers/base/power/runtime.c:596 __pm_runtime_suspend+0x11e/0x230 drivers/base/power/runtime.c:1009 pm_runtime_put_sync_autosuspend ./include/linux/pm_runtime.h:251 usb_new_device+0xa37/0x1020 drivers/usb/core/hub.c:2487 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: 8d 7c 24 20 48 89 fa 48 c1 ea 03 80 3c 02 00 75 5b 48 b8 00 00 00 00 00 fc ff df 4d 8b 6c 24 20 49 8d 7d 08 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 34 4d 8b 6d 08 4d 85 ed 74 0b e8 26 2b 51 fd 4c RIP: asix_suspend+0x76/0xc0 RSP: ffff88006bbae718 ---[ end trace dfc4f5649284342c ]--- Signed-off-by: Andrey Konovalov Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a8e6b48fbf534028ce4031d0d035e7e72779cef Author: David S. Miller Date: Thu Nov 9 09:21:44 2017 +0900 Revert "net: usb: asix: fill null-ptr-deref in asix_suspend" This reverts commit baedf68a068ca29624f241426843635920f16e1d. There is an updated version of this fix which covers the problem more thoroughly. Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e029b9bf1221f200319541cd6861912b89345665 Merge: 71630b7 d62d813 Author: Rafael J. Wysocki Date: Thu Nov 9 00:07:56 2017 +0100 Merge branch 'pm-cpufreq-sched' * pm-cpufreq-sched: cpufreq: schedutil: Examine the correct CPU when we update util commit 87df26175e67c26ccdd3a002fbbb8cde78e28a19 Author: Jiri Kosina Date: Wed Nov 8 21:18:18 2017 +0100 x86/mm: Unbreak modules that rely on external PAGE_KERNEL availability Commit 7744ccdbc16f0 ("x86/mm: Add Secure Memory Encryption (SME) support") as a side-effect made PAGE_KERNEL all of a sudden unavailable to modules which can't make use of EXPORT_SYMBOL_GPL() symbols. This is because once SME is enabled, sme_me_mask (which is introduced as EXPORT_SYMBOL_GPL) makes its way to PAGE_KERNEL through _PAGE_ENC, causing imminent build failure for all the modules which make use of all the EXPORT-SYMBOL()-exported API (such as vmap(), __vmalloc(), remap_pfn_range(), ...). Exporting (as EXPORT_SYMBOL()) interfaces (and having done so for ages) that take pgprot_t argument, while making it impossible to -- all of a sudden -- pass PAGE_KERNEL to it, feels rather incosistent. Restore the original behavior and make it possible to pass PAGE_KERNEL to all its EXPORT_SYMBOL() consumers. [ This is all so not wonderful. We shouldn't need that "sme_me_mask" access at all in all those places that really don't care about that level of detail, and just want _PAGE_KERNEL or whatever. We have some similar issues with _PAGE_CACHE_WP and _PAGE_NOCACHE, both of which hide a "cachemode2protval()" call, and which also ends up using another EXPORT_SYMBOL(), but at least that only triggers for the much more rare cases. Maybe we could move these dynamic page table bits to be generated much deeper down in the VM layer, instead of hiding them in the macros that everybody uses. So this all would merit some cleanup. But not today. - Linus ] Cc: Tom Lendacky Signed-off-by: Jiri Kosina Despised-by: Thomas Gleixner Signed-off-by: Linus Torvalds arch/x86/mm/mem_encrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0cd64b02aa854d68ce517cb7da1fe4e4fff2653 Author: Yonghong Song Date: Wed Nov 8 11:28:45 2017 -0800 x86/idt: Remove X86_TRAP_BP initialization in idt_setup_traps() Commit b70543a0b2b6("x86/idt: Move regular trap init to tables") moves regular trap init for each trap vector into a table based initialization. It introduced the initialization for vector X86_TRAP_BP which was not in the code which it replaced. This breaks uprobe functionality for x86_32; the probed program segfaults instead of handling the probe proper. The reason for this is that TRAP_BP is set up as system interrupt gate (DPL3) in the early IDT and then replaced by a regular interrupt gate (DPL0) in idt_setup_traps(). The DPL0 restriction causes the int3 trap to fail with a #GP resulting in a SIGSEGV of the probed program. On 64bit this does not cause a problem because the IDT entry is replaced with a system interrupt gate (DPL3) with interrupt stack afterwards. Remove X86_TRAP_BP from the def_idts table which is used in idt_setup_traps(). Remove a redundant entry for X86_TRAP_NMI in def_idts while at it. Tested on both x86_64 and x86_32. [ tglx: Amended changelog with a description of the root cause ] Fixes: b70543a0b2b6("x86/idt: Move regular trap init to tables") Reported-and-tested-by: Yonghong Song Signed-off-by: Yonghong Song Signed-off-by: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Cc: ast@fb.com Cc: oleg@redhat.com Cc: luto@kernel.org Cc: kernel-team@fb.com Link: https://lkml.kernel.org/r/20171108192845.552709-1-yhs@fb.com arch/x86/kernel/idt.c | 2 -- 1 file changed, 2 deletions(-) commit d6a2cf07f0c91e339d2c53f1e1ca6e731af2e72a Merge: f7dc4c9 624f5ab Author: Linus Torvalds Date: Wed Nov 8 11:21:52 2017 -0800 Merge branch 'fixes-v4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling fix from James Morris: "Fix by Eric Biggers for the keys subsystem" * 'fixes-v4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] commit f7dc4c9a855a13dbb33294c9fc94f17af03f6291 Author: John Johansen Date: Wed Nov 8 08:09:52 2017 -0800 apparmor: fix off-by-one comparison on MAXMAPPED_SIG This came in yesterday, and I have verified our regression tests were missing this and it can cause an oops. Please apply. There is a an off-by-one comparision on sig against MAXMAPPED_SIG that can lead to a read outside the sig_map array if sig is MAXMAPPED_SIG. Fix this. Verified that the check is an out of bounds case that can cause an oops. Revised: add comparison fix to second case Fixes: cd1dbf76b23d ("apparmor: add the ability to mediate signals") Signed-off-by: Colin Ian King Signed-off-by: John Johansen Signed-off-by: Linus Torvalds security/apparmor/ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 423a8a942e95493b73228ba6a3f176dcc7f35fa9 Author: Chris Wilson Date: Mon Nov 6 21:11:28 2017 +0000 drm/i915: Deconstruct struct sgt_dma initialiser gcc-4.4 complains about: struct sgt_dma iter = { .sg = vma->pages->sgl, .dma = sg_dma_address(iter.sg), .max = iter.dma + iter.sg->length, }; drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen8_ppgtt_insert_4lvl’: drivers/gpu/drm/i915/i915_gem_gtt.c:938: error: ‘iter.sg’ is used uninitialized in this function drivers/gpu/drm/i915/i915_gem_gtt.c:939: error: ‘iter.dma’ is used uninitialized in this function and worse generates invalid code that triggers a GPF: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915] PGD 0 Oops: 0000 [#1] SMP Modules linked in: snd_aloop nf_conntrack_ipv6 nf_defrag_ipv6 nf_log_ipv6 ip6table_filter ip6_tables ctr ccm xt_state nf_log_ipv4 nf_log_common xt_LOG xt_limit xt_recent xt_owner xt_addrtype iptable_filter ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c ip_tables dm_mod vhost_net macvtap macvlan vhost tun kvm_intel kvm irqbypass uas usb_storage hid_multitouch btusb btrtl uvcvideo videobuf2_v4l2 videobuf2_core videodev media videobuf2_vmalloc videobuf2_memops sg ppdev dell_wmi sparse_keymap mei_wdt sd_mod iTCO_wdt iTCO_vendor_support rtsx_pci_ms memstick rtsx_pci_sdmmc mmc_core dell_smm_hwmon hwmon dell_laptop dell_smbios dcdbas joydev input_leds hci_uart btintel btqca btbcm bluetooth parport_pc parport i2c_hid intel_lpss_acpi intel_lpss pcspkr wmi int3400_thermal acpi_thermal_rel dell_rbtn mei_me mei snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ahci libahci acpi_pad xhci_pci xhci_hcd snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore int3403_thermal arc4 e1000e ptp pps_core i2c_i801 iwlmvm mac80211 rtsx_pci iwlwifi cfg80211 rfkill intel_pch_thermal processor_thermal_device int340x_thermal_zone intel_soc_dts_iosf i915 video fjes CPU: 2 PID: 2408 Comm: X Not tainted 4.10.0-rc5+ #1 Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.11.3 11/09/2016 task: ffff880219fe4740 task.stack: ffffc90005f98000 RIP: 0010:gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915] RSP: 0018:ffffc90005f9b8c8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8802167d8000 RCX: 0000000000000001 RDX: 00000000ffff7000 RSI: ffff880219f94140 RDI: ffff880228444000 RBP: ffffc90005f9b948 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000080 R13: 0000000000000001 R14: ffffc90005f9bcd7 R15: ffff88020c9a83c0 FS: 00007fb53e1ee920(0000) GS:ffff88024dd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 000000022ef95000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ppgtt_bind_vma+0x40/0x50 [i915] i915_vma_bind+0xcb/0x1c0 [i915] __i915_vma_do_pin+0x6e/0xd0 [i915] i915_gem_execbuffer_reserve_vma+0x162/0x1d0 [i915] i915_gem_execbuffer_reserve+0x4fc/0x510 [i915] ? __kmalloc+0x134/0x250 ? i915_gem_wait_for_error+0x25/0x100 [i915] ? i915_gem_wait_for_error+0x25/0x100 [i915] i915_gem_do_execbuffer+0x2df/0xa00 [i915] ? drm_malloc_gfp.clone.0+0x42/0x80 [i915] ? path_put+0x22/0x30 ? __check_object_size+0x62/0x1f0 ? terminate_walk+0x44/0x90 i915_gem_execbuffer2+0x95/0x1e0 [i915] drm_ioctl+0x243/0x490 ? handle_pte_fault+0x1d7/0x220 ? i915_gem_do_execbuffer+0xa00/0xa00 [i915] ? handle_mm_fault+0x10d/0x2a0 vfs_ioctl+0x18/0x30 do_vfs_ioctl+0x14b/0x3f0 SyS_ioctl+0x92/0xa0 entry_SYSCALL_64_fastpath+0x1a/0xa9 RIP: 0033:0x7fb53b4fcb77 RSP: 002b:00007ffe0c572898 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb53e17c038 RCX: 00007fb53b4fcb77 RDX: 00007ffe0c572900 RSI: 0000000040406469 RDI: 000000000000000b RBP: 00007fb5376d67e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000028 R11: 0000000000003246 R12: 0000000000000000 R13: 0000000000000000 R14: 000055eecb314d00 R15: 000055eecb315460 Code: 0f 84 5d ff ff ff eb a2 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 58 0f 1f 44 00 00 31 c0 89 4d b0 <4c> 8b 60 10 44 8b 70 0c 48 89 d0 4c 8b 2e 48 c1 e8 27 25 ff 01 RIP: gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915] RSP: ffffc90005f9b8c8 CR2: 0000000000000010 Recent gccs, such as 4.9, 6.3 or 7.2, do not generate the warning nor do they explode on use. If we manually create the struct using locals from the stack, this should eliminate this issue, and does not alter code generation with gcc-7.2. Fixes: 894ccebee2b0 ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()") Reported-by: Kelly French Signed-off-by: Chris Wilson Cc: Kelly French Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171106211128.12538-1-chris@chris-wilson.co.uk Tested-by: Kelly French Reviewed-by: Tvrtko Ursulin (cherry picked from commit 5684514ba9dc6d7aa932cc53d97d866b2386221f) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_gtt.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 40a4884512d5bf9ed3a9cb162b8a7ec3306b6cfc Author: Tvrtko Ursulin Date: Tue Oct 31 10:23:25 2017 +0000 drm/i915: Reject unknown syncobj flags We have to reject unknown flags for uAPI considerations, and also because the curent implementation limits their i915 storage space to two bits. v2: (Chris Wilson) * Fix fail in ABI check. * Added unknown flags and BUILD_BUG_ON. v3: * Use ARCH_KMALLOC_MINALIGN instead of alignof. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: cf6e7bac6357 ("drm/i915: Add support for drm syncobjs") Cc: Jason Ekstrand Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171031102326.9738-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit ebcaa1ff8b59097805d548fe7a676f194625c033) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 ++++++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 9 insertions(+) commit b084116f8587b222a2c5ef6dcd846f40f24b9420 Author: Oswald Buddenhagen Date: Sun Oct 29 16:27:20 2017 +0100 MIPS: AR7: Ensure that serial ports are properly set up Without UPF_FIXED_TYPE, the data from the PORT_AR7 uart_config entry is never copied, resulting in a dead port. Fixes: 154615d55459 ("MIPS: AR7: Use correct UART port type") Signed-off-by: Oswald Buddenhagen [jonas.gorski: add Fixes tag] Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Cc: Ralf Baechle Cc: Greg Kroah-Hartman Cc: Yoshihiro YUNOMAE Cc: Nicolas Schichan Cc: Oswald Buddenhagen Cc: linux-mips@linux-mips.org Cc: linux-serial@vger.kernel.org Cc: Patchwork: https://patchwork.linux-mips.org/patch/17543/ Signed-off-by: James Hogan arch/mips/ar7/platform.c | 1 + 1 file changed, 1 insertion(+) commit 6b7be529634bbfbf6395f23217a66d731fbed0a0 Author: Bjorn Helgaas Date: Wed Nov 8 08:49:49 2017 -0600 MAINTAINERS: Add Lorenzo Pieralisi for PCI host bridge drivers Add Lorenzo Pieralisi as maintainer for PCI native host bridge drivers and the endpoint driver framework. Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 624f5ab8720b3371367327a822c267699c1823b8 Author: Eric Biggers Date: Tue Nov 7 22:29:02 2017 +0000 KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] syzkaller reported a NULL pointer dereference in asn1_ber_decoder(). It can be reproduced by the following command, assuming CONFIG_PKCS7_TEST_KEY=y: keyctl add pkcs7_test desc '' @s The bug is that if the data buffer is empty, an integer underflow occurs in the following check: if (unlikely(dp >= datalen - 1)) goto data_overrun_error; This results in the NULL data pointer being dereferenced. Fix it by checking for 'datalen - dp < 2' instead. Also fix the similar check for 'dp >= datalen - n' later in the same function. That one possibly could result in a buffer overread. The NULL pointer dereference was reproducible using the "pkcs7_test" key type but not the "asymmetric" key type because the "asymmetric" key type checks for a 0-length payload before calling into the ASN.1 decoder but the "pkcs7_test" key type does not. The bug report was: BUG: unable to handle kernel NULL pointer dereference at (null) IP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233 PGD 7b708067 P4D 7b708067 PUD 7b6ee067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: CPU: 0 PID: 522 Comm: syz-executor1 Not tainted 4.14.0-rc8 #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.3-20171021_125229-anatol 04/01/2014 task: ffff9b6b3798c040 task.stack: ffff9b6b37970000 RIP: 0010:asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233 RSP: 0018:ffff9b6b37973c78 EFLAGS: 00010216 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000021c RDX: ffffffff814a04ed RSI: ffffb1524066e000 RDI: ffffffff910759e0 RBP: ffff9b6b37973d60 R08: 0000000000000001 R09: ffff9b6b3caa4180 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f10ed1f2700(0000) GS:ffff9b6b3ea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000007b6f3000 CR4: 00000000000006f0 Call Trace: pkcs7_parse_message+0xee/0x240 crypto/asymmetric_keys/pkcs7_parser.c:139 verify_pkcs7_signature+0x33/0x180 certs/system_keyring.c:216 pkcs7_preparse+0x41/0x70 crypto/asymmetric_keys/pkcs7_key_type.c:63 key_create_or_update+0x180/0x530 security/keys/key.c:855 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0xbf/0x250 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4585c9 RSP: 002b:00007f10ed1f1bd8 EFLAGS: 00000216 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007f10ed1f2700 RCX: 00000000004585c9 RDX: 0000000020000000 RSI: 0000000020008ffb RDI: 0000000020008000 RBP: 0000000000000000 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00007fff1b2260ae R13: 00007fff1b2260af R14: 00007f10ed1f2700 R15: 0000000000000000 Code: dd ca ff 48 8b 45 88 48 83 e8 01 4c 39 f0 0f 86 a8 07 00 00 e8 53 dd ca ff 49 8d 46 01 48 89 85 58 ff ff ff 48 8b 85 60 ff ff ff <42> 0f b6 0c 30 89 c8 88 8d 75 ff ff ff 83 e0 1f 89 8d 28 ff ff RIP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233 RSP: ffff9b6b37973c78 CR2: 0000000000000000 Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") Reported-by: syzbot Cc: # v3.7+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris lib/asn1_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d850a255d5b961fbe085f06ddd116910378b78f1 Merge: 39dae59 38c53af Author: Radim Krčmář Date: Wed Nov 8 14:08:59 2017 +0100 Merge tag 'kvm-ppc-fixes-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc PPC KVM fixes for 4.14 Just one fix here for a host crash that can occur with HV KVM as a result of resizing the guest hashed page table (HPT). commit e6b03ab63b4d270e0249f96536fde632409dc1dc Author: Jonas Gorski Date: Sun Oct 29 16:27:19 2017 +0100 MIPS: AR7: Defer registration of GPIO When called from prom init code, ar7_gpio_init() will fail as it will call gpiochip_add() which relies on a working kmalloc() to alloc the gpio_desc array and kmalloc is not useable yet at prom init time. Move ar7_gpio_init() to ar7_register_devices() (a device_initcall) where kmalloc works. Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array") Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Cc: Ralf Baechle Cc: Greg Kroah-Hartman Cc: Yoshihiro YUNOMAE Cc: Nicolas Schichan Cc: linux-mips@linux-mips.org Cc: linux-serial@vger.kernel.org Cc: # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/17542/ Signed-off-by: James Hogan arch/mips/ar7/platform.c | 4 ++++ arch/mips/ar7/prom.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) commit a743bbeef27b9176987ec0cb7f906ab0ab52d1da Author: Borislav Petkov Date: Tue Nov 7 18:53:07 2017 +0100 x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context The warning below says it all: BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1 caller is __this_cpu_preempt_check CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc8 #4 Call Trace: dump_stack check_preemption_disabled ? do_early_param __this_cpu_preempt_check arch_perfmon_init op_nmi_init ? alloc_pci_root_info oprofile_arch_init oprofile_init do_one_initcall ... These accessors should not have been used in the first place: it is PPro so no mixed silicon revisions and thus it can simply use boot_cpu_data. Reported-by: Fengguang Wu Tested-by: Fengguang Wu Fix-creation-mandated-by: Linus Torvalds Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Robert Richter Cc: x86@kernel.org Cc: stable@vger.kernel.org arch/x86/oprofile/op_model_ppro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 881125bfe65bb772f34f4fcb04a35dfe117e186a Author: Josh Poimboeuf Date: Tue Nov 7 20:19:34 2017 -0600 x86/unwind: Disable KASAN checking in the ORC unwinder Fengguang reported a KASAN warning: Kprobe smoke test: started ================================================================== BUG: KASAN: stack-out-of-bounds in deref_stack_reg+0xb5/0x11a Read of size 8 at addr ffff8800001c7cd8 by task swapper/1 CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.0-rc8 #26 Call Trace: <#DB> ... save_trace+0xd9/0x1d3 mark_lock+0x5f7/0xdc3 __lock_acquire+0x6b4/0x38ef lock_acquire+0x1a1/0x2aa _raw_spin_lock_irqsave+0x46/0x55 kretprobe_table_lock+0x1a/0x42 pre_handler_kretprobe+0x3f5/0x521 kprobe_int3_handler+0x19c/0x25f do_int3+0x61/0x142 int3+0x30/0x60 [...] The ORC unwinder got confused by some kprobes changes, which isn't surprising since the runtime code no longer matches vmlinux and the stack was modified for kretprobes. Until we have a way for generated code to register changes with the unwinder, these types of warnings are inevitable. So just disable KASAN checks for stack accesses in the ORC unwinder. Reported-by: Fengguang Wu Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thiago Jung Bauermann Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171108021934.zbl6unh5hpugybc5@treble Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_orc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0de0add10e587effa880c741c9413c874f16be91 Author: Kristian Evensen Date: Tue Nov 7 13:47:56 2017 +0100 qmi_wwan: Add missing skb_reset_mac_header-call When we receive a packet on a QMI device in raw IP mode, we should call skb_reset_mac_header() to ensure that skb->mac_header contains a valid offset in the packet. While it shouldn't really matter, the packets have no MAC header and the interface is configured as-such, it seems certain parts of the network stack expects a "good" value in skb->mac_header. Without the skb_reset_mac_header() call added in this patch, for example shaping traffic (using tc) triggers the following oops on the first received packet: [ 303.642957] skbuff: skb_under_panic: text:8f137918 len:177 put:67 head:8e4b0f00 data:8e4b0eff tail:0x8e4b0fb0 end:0x8e4b1520 dev:wwan0 [ 303.655045] Kernel bug detected[#1]: [ 303.658622] CPU: 1 PID: 1002 Comm: logd Not tainted 4.9.58 #0 [ 303.664339] task: 8fdf05e0 task.stack: 8f15c000 [ 303.668844] $ 0 : 00000000 00000001 0000007a 00000000 [ 303.674062] $ 4 : 8149a2fc 8149a2fc 8149ce20 00000000 [ 303.679284] $ 8 : 00000030 3878303a 31623465 20303235 [ 303.684510] $12 : ded731e3 2626a277 00000000 03bd0000 [ 303.689747] $16 : 8ef62b40 00000043 8f137918 804db5fc [ 303.694978] $20 : 00000001 00000004 8fc13800 00000003 [ 303.700215] $24 : 00000001 8024ab10 [ 303.705442] $28 : 8f15c000 8fc19cf0 00000043 802cc920 [ 303.710664] Hi : 00000000 [ 303.713533] Lo : 74e58000 [ 303.716436] epc : 802cc920 skb_panic+0x58/0x5c [ 303.721046] ra : 802cc920 skb_panic+0x58/0x5c [ 303.725639] Status: 11007c03 KERNEL EXL IE [ 303.729823] Cause : 50800024 (ExcCode 09) [ 303.733817] PrId : 0001992f (MIPS 1004Kc) [ 303.737892] Modules linked in: rt2800pci rt2800mmio rt2800lib qcserial ppp_async option usb_wwan rt2x00pci rt2x00mmio rt2x00lib rndis_host qmi_wwan ppp_generic nf_nat_pptp nf_conntrack_pptp nf_conntrack_ipv6 mt76x2i Process logd (pid: 1002, threadinfo=8f15c000, task=8fdf05e0, tls=77b3eee4) [ 303.962509] Stack : 00000000 80408990 8f137918 000000b1 00000043 8e4b0f00 8e4b0eff 8e4b0fb0 [ 303.970871] 8e4b1520 8fec1800 00000043 802cd2a4 6e000045 00000043 00000000 8ef62000 [ 303.979219] 8eef5d00 8ef62b40 8fea7300 8f137918 00000000 00000000 0002bb01 793e5664 [ 303.987568] 8ef08884 00000001 8fea7300 00000002 8fc19e80 8eef5d00 00000006 00000003 [ 303.995934] 00000000 8030ba90 00000003 77ab3fd0 8149dc80 8004d1bc 8f15c000 8f383700 [ 304.004324] ... [ 304.006767] Call Trace: [ 304.009241] [<802cc920>] skb_panic+0x58/0x5c [ 304.013504] [<802cd2a4>] skb_push+0x78/0x90 [ 304.017783] [<8f137918>] 0x8f137918 [ 304.021269] Code: 00602825 0c02a3b4 24842888 <000c000d> 8c870060 8c8200a0 0007382b 00070336 8c88005c [ 304.031034] [ 304.032805] ---[ end trace b778c482b3f0bda9 ]--- [ 304.041384] Kernel panic - not syncing: Fatal exception in interrupt [ 304.051975] Rebooting in 3 seconds.. While the oops is for a 4.9-kernel, I was able to trigger the same oops with net-next as of yesterday. Fixes: 32f7adf633b9 ("net: qmi_wwan: support "raw IP" mode") Signed-off-by: Kristian Evensen Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 055db6957e4735b16cd2fa94a5bbfb754c9b8023 Author: Jay Vosburgh Date: Tue Nov 7 19:50:07 2017 +0900 bonding: fix slave stuck in BOND_LINK_FAIL state The bonding miimon logic has a flaw, in that a failure of the rtnl_trylock can cause a slave to become permanently stuck in BOND_LINK_FAIL state. The sequence of events to cause this is as follows: 1) bond_miimon_inspect finds that a slave's link is down, and so calls bond_propose_link_state, setting slave->new_link_state to BOND_LINK_FAIL, then sets slave->new_link to BOND_LINK_DOWN and returns non-zero. 2) In bond_mii_monitor, the rtnl_trylock fails, and the timer is rescheduled. No change is committed. 3) bond_miimon_inspect is called again, but this time the slave from step 1 has recovered. slave->new_link is reset to NOCHANGE, and, as slave->link was never changed, the switch enters the BOND_LINK_UP case, and does nothing. The pending BOND_LINK_FAIL state from step 1 remains pending, as new_link_state is not reset. 4) The state from step 3 persists until another slave changes link state and causes bond_miimon_inspect to return non-zero. At this point, the BOND_LINK_FAIL state change on the slave from steps 1-3 is committed, and the slave will remain stuck in BOND_LINK_FAIL state even though it is actually link up. The remedy for this is to initialize new_link_state on each entry to bond_miimon_inspect, as is already done with new_link. Fixes: fb9eb899a6dc ("bonding: handle link transition from FAIL to UP correctly") Reported-by: Alex Sidorenko Reviewed-by: Jarod Wilson Signed-off-by: Jay Vosburgh Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) commit b7e732fa3171318418524b776b841b4024933b2b Author: Bjorn Andersson Date: Mon Nov 6 20:50:35 2017 -0800 qrtr: Move to postcore_initcall Registering qrtr with module_init makes the ability of typical platform code to create AF_QIPCRTR socket during probe a matter of link order luck. Moving qrtr to postcore_initcall() avoids this. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fd078337201cf7468f53c3d9ef81ff78cb6df3b Author: Bjørn Mork Date: Mon Nov 6 15:32:18 2017 +0100 net: qmi_wwan: fix divide by 0 on bad descriptors A CDC Ethernet functional descriptor with wMaxSegmentSize = 0 will cause a divide error in usbnet_probe: divide error: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc8-44453-g1fdc1a82c34f #56 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event task: ffff88006bef5c00 task.stack: ffff88006bf60000 RIP: 0010:usbnet_update_max_qlen+0x24d/0x390 drivers/net/usb/usbnet.c:355 RSP: 0018:ffff88006bf67508 EFLAGS: 00010246 RAX: 00000000000163c8 RBX: ffff8800621fce40 RCX: ffff8800621fcf34 RDX: 0000000000000000 RSI: ffffffff837ecb7a RDI: ffff8800621fcf34 RBP: ffff88006bf67520 R08: ffff88006bef5c00 R09: ffffed000c43f881 R10: ffffed000c43f880 R11: ffff8800621fc406 R12: 0000000000000003 R13: ffffffff85c71de0 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88006ca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe9c0d6dac CR3: 00000000614f4000 CR4: 00000000000006f0 Call Trace: usbnet_probe+0x18b5/0x2790 drivers/net/usb/usbnet.c:1783 qmi_wwan_probe+0x133/0x220 drivers/net/usb/qmi_wwan.c:1338 usb_probe_interface+0x324/0x940 drivers/usb/core/driver.c:361 really_probe drivers/base/dd.c:413 driver_probe_device+0x522/0x740 drivers/base/dd.c:557 Fix by simply ignoring the bogus descriptor, as it is optional for QMI devices anyway. Fixes: 423ce8caab7e ("net: usb: qmi_wwan: New driver for Huawei QMI based WWAN devices") Reported-by: Andrey Konovalov Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cb80187ba065d7decad7c6614e35e07aec8a974 Author: Bjørn Mork Date: Mon Nov 6 15:37:22 2017 +0100 net: cdc_ether: fix divide by 0 on bad descriptors Setting dev->hard_mtu to 0 will cause a divide error in usbnet_probe. Protect against devices with bogus CDC Ethernet functional descriptors by ignoring a zero wMaxSegmentSize. Signed-off-by: Bjørn Mork Acked-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38c53af853069adf87181684370d7b8866d6387b Author: Paul Mackerras Date: Wed Nov 8 14:44:04 2017 +1100 KVM: PPC: Book3S HV: Fix exclusion between HPT resizing and other HPT updates Commit 5e9859699aba ("KVM: PPC: Book3S HV: Outline of KVM-HV HPT resizing implementation", 2016-12-20) added code that tries to exclude any use or update of the hashed page table (HPT) while the HPT resizing code is iterating through all the entries in the HPT. It does this by taking the kvm->lock mutex, clearing the kvm->arch.hpte_setup_done flag and then sending an IPI to all CPUs in the host. The idea is that any VCPU task that tries to enter the guest will see that the hpte_setup_done flag is clear and therefore call kvmppc_hv_setup_htab_rma, which also takes the kvm->lock mutex and will therefore block until we release kvm->lock. However, any VCPU that is already in the guest, or is handling a hypervisor page fault or hypercall, can re-enter the guest without rechecking the hpte_setup_done flag. The IPI will cause a guest exit of any VCPUs that are currently in the guest, but does not prevent those VCPU tasks from immediately re-entering the guest. The result is that after resize_hpt_rehash_hpte() has made a HPTE absent, a hypervisor page fault can occur and make that HPTE present again. This includes updating the rmap array for the guest real page, meaning that we now have a pointer in the rmap array which connects with pointers in the old rev array but not the new rev array. In fact, if the HPT is being reduced in size, the pointer in the rmap array could point outside the bounds of the new rev array. If that happens, we can get a host crash later on such as this one: [91652.628516] Unable to handle kernel paging request for data at address 0xd0000000157fb10c [91652.628668] Faulting instruction address: 0xc0000000000e2640 [91652.628736] Oops: Kernel access of bad area, sig: 11 [#1] [91652.628789] LE SMP NR_CPUS=1024 NUMA PowerNV [91652.628847] Modules linked in: binfmt_misc vhost_net vhost tap xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables ses enclosure scsi_transport_sas i2c_opal ipmi_powernv ipmi_devintf i2c_core ipmi_msghandler powernv_op_panel nfsd auth_rpcgss oid_registry nfs_acl lockd grace sunrpc kvm_hv kvm_pr kvm scsi_dh_alua dm_service_time dm_multipath tg3 ptp pps_core [last unloaded: stap_552b612747aec2da355051e464fa72a1_14259] [91652.629566] CPU: 136 PID: 41315 Comm: CPU 21/KVM Tainted: G O 4.14.0-1.rc4.dev.gitb27fc5c.el7.centos.ppc64le #1 [91652.629684] task: c0000007a419e400 task.stack: c0000000028d8000 [91652.629750] NIP: c0000000000e2640 LR: d00000000c36e498 CTR: c0000000000e25f0 [91652.629829] REGS: c0000000028db5d0 TRAP: 0300 Tainted: G O (4.14.0-1.rc4.dev.gitb27fc5c.el7.centos.ppc64le) [91652.629932] MSR: 900000010280b033 CR: 44022422 XER: 00000000 [91652.630034] CFAR: d00000000c373f84 DAR: d0000000157fb10c DSISR: 40000000 SOFTE: 1 [91652.630034] GPR00: d00000000c36e498 c0000000028db850 c000000001403900 c0000007b7960000 [91652.630034] GPR04: d0000000117fb100 d000000007ab00d8 000000000033bb10 0000000000000000 [91652.630034] GPR08: fffffffffffffe7f 801001810073bb10 d00000000e440000 d00000000c373f70 [91652.630034] GPR12: c0000000000e25f0 c00000000fdb9400 f000000003b24680 0000000000000000 [91652.630034] GPR16: 00000000000004fb 00007ff7081a0000 00000000000ec91a 000000000033bb10 [91652.630034] GPR20: 0000000000010000 00000000001b1190 0000000000000001 0000000000010000 [91652.630034] GPR24: c0000007b7ab8038 d0000000117fb100 0000000ec91a1190 c000001e6a000000 [91652.630034] GPR28: 00000000033bb100 000000000073bb10 c0000007b7960000 d0000000157fb100 [91652.630735] NIP [c0000000000e2640] kvmppc_add_revmap_chain+0x50/0x120 [91652.630806] LR [d00000000c36e498] kvmppc_book3s_hv_page_fault+0xbb8/0xc40 [kvm_hv] [91652.630884] Call Trace: [91652.630913] [c0000000028db850] [c0000000028db8b0] 0xc0000000028db8b0 (unreliable) [91652.630996] [c0000000028db8b0] [d00000000c36e498] kvmppc_book3s_hv_page_fault+0xbb8/0xc40 [kvm_hv] [91652.631091] [c0000000028db9e0] [d00000000c36a078] kvmppc_vcpu_run_hv+0xdf8/0x1300 [kvm_hv] [91652.631179] [c0000000028dbb30] [d00000000c2248c4] kvmppc_vcpu_run+0x34/0x50 [kvm] [91652.631266] [c0000000028dbb50] [d00000000c220d54] kvm_arch_vcpu_ioctl_run+0x114/0x2a0 [kvm] [91652.631351] [c0000000028dbbd0] [d00000000c2139d8] kvm_vcpu_ioctl+0x598/0x7a0 [kvm] [91652.631433] [c0000000028dbd40] [c0000000003832e0] do_vfs_ioctl+0xd0/0x8c0 [91652.631501] [c0000000028dbde0] [c000000000383ba4] SyS_ioctl+0xd4/0x130 [91652.631569] [c0000000028dbe30] [c00000000000b8e0] system_call+0x58/0x6c [91652.631635] Instruction dump: [91652.631676] fba1ffe8 fbc1fff0 fbe1fff8 f8010010 f821ffa1 2fa70000 793d0020 e9432110 [91652.631814] 7bbf26e4 7c7e1b78 7feafa14 409e0094 <807f000c> 786326e4 7c6a1a14 93a40008 [91652.631959] ---[ end trace ac85ba6db72e5b2e ]--- To fix this, we tighten up the way that the hpte_setup_done flag is checked to ensure that it does provide the guarantee that the resizing code needs. In kvmppc_run_core(), we check the hpte_setup_done flag after disabling interrupts and refuse to enter the guest if it is clear (for a HPT guest). The code that checks hpte_setup_done and calls kvmppc_hv_setup_htab_rma() is moved from kvmppc_vcpu_run_hv() to a point inside the main loop in kvmppc_run_vcpu(), ensuring that we don't just spin endlessly calling kvmppc_run_core() while hpte_setup_done is clear, but instead have a chance to block on the kvm->lock mutex. Finally we also check hpte_setup_done inside the region in kvmppc_book3s_hv_page_fault() where the HPTE is locked and we are about to update the HPTE, and bail out if it is clear. If another CPU is inside kvm_vm_ioctl_resize_hpt_commit) and has cleared hpte_setup_done, then we know that either we are looking at a HPTE that resize_hpt_rehash_hpte() has not yet processed, which is OK, or else we will see hpte_setup_done clear and refuse to update it, because of the full barrier formed by the unlock of the HPTE in resize_hpt_rehash_hpte() combined with the locking of the HPTE in kvmppc_book3s_hv_page_fault(). Fixes: 5e9859699aba ("KVM: PPC: Book3S HV: Outline of KVM-HV HPT resizing implementation") Cc: stable@vger.kernel.org # v4.10+ Reported-by: Satheesh Rajendran Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 10 ++++++++++ arch/powerpc/kvm/book3s_hv.c | 29 +++++++++++++++++++---------- 2 files changed, 29 insertions(+), 10 deletions(-) commit b5f862180d7011d9575d0499fa37f0f25b423b12 Author: Hangbin Liu Date: Mon Nov 6 09:01:57 2017 +0800 bonding: discard lowest hash bit for 802.3ad layer3+4 After commit 07f4c90062f8 ("tcp/dccp: try to not exhaust ip_local_port_range in connect()"), we will try to use even ports for connect(). Then if an application (seen clearly with iperf) opens multiple streams to the same destination IP and port, each stream will be given an even source port. So the bonding driver's simple xmit_hash_policy based on layer3+4 addressing will always hash all these streams to the same interface. And the total throughput will limited to a single slave. Change the tcp code will impact the whole tcp behavior, only for bonding usage. Paolo Abeni suggested fix this by changing the bonding code only, which should be more reasonable, and less impact. Fix this by discarding the lowest hash bit because it contains little entropy. After the fix we can re-balance between slaves. Signed-off-by: Paolo Abeni Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26dd633e437dca218547ccbeacc71fe8a620b6f6 Author: Yiannis Marangos Date: Tue Nov 7 16:23:11 2017 -0800 Input: synaptics-rmi4 - RMI4 can also use SMBUS version 3 Some Synaptics devices, such as LEN0073, use SMBUS version 3. Signed-off-by: Yiannis Marangos Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_smbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eca253912f734927005500da7d646536064b3ed3 Author: Martin Kepplinger Date: Tue Nov 7 16:20:49 2017 -0800 Input: tsc200x-core - set INPUT_PROP_DIRECT If INPUT_PROP_DIRECT is set, userspace doesn't have to fall back to old ways of identifying touchscreen devices. In order to identify a touchscreen device, Android for example, seems to already depend on INPUT_PROP_DIRECT to be present in drivers. udev still checks for either BTN_TOUCH or INPUT_PROP_DIRECT. Checking for BTN_TOUCH however can quite easily lead to false positives; it's a code that not only touchscreen device drivers use. According to the documentation, touchscreen drivers should have this property set and in order to make life easy for userspace, let's set it. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc200x-core.c | 1 + 1 file changed, 1 insertion(+) commit cdea6a30c2689cc33b34c6691b57cca277f0c5dc Author: Kai-Heng Feng Date: Tue Nov 7 16:19:24 2017 -0800 Input: elan_i2c - add ELAN060C to the ACPI table ELAN060C touchpad uses elan_i2c as its driver. It can be found on Lenovo ideapad 320-14AST. BugLink: https://bugs.launchpad.net/bugs/1727544 Signed-off-by: Kai-Heng Feng Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+) commit 39a4b86f0de4ce5024985a56fc39b16194b04313 Author: Gustavo A. R. Silva Date: Sat Nov 4 22:54:53 2017 -0500 net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action hn is being kfree'd in mlx5e_del_l2_from_hash and then dereferenced by accessing hn->ai.addr Fix this by copying the MAC address into a local variable for its safe use in all possible execution paths within function mlx5e_execute_l2_action. Addresses-Coverity-ID: 1417789 Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS") Signed-off-by: Gustavo A. R. Silva Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 13c249a94f525fe4c757d28854049780b25605c4 Author: Marc Zyngier Date: Sat Nov 4 12:33:47 2017 +0000 net: mvpp2: Prevent userspace from changing TX affinities The mvpp2 driver can't cope at all with the TX affinities being changed from userspace, and spit an endless stream of [ 91.779920] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing [ 91.779930] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing [ 91.780402] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing [ 91.780406] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing [ 91.780415] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing [ 91.780418] mvpp2 f4000000.ethernet eth2: wrong cpu on the end of Tx processing rendering the box completely useless (I've measured around 600k interrupts/s on a 8040 box) once irqbalance kicks in and start doing its job. Obviously, the driver was never designed with this in mind. So let's work around the problem by preventing userspace from interacting with these interrupts altogether. Signed-off-by: Marc Zyngier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ++++ 1 file changed, 4 insertions(+) commit e806fa6bad186d7d353509b5a909abcf3a1e968b Author: Gabriele Paoloni Date: Tue Nov 7 18:37:54 2017 -0600 MAINTAINERS: Remove Gabriele Paoloni as HiSilicon PCI maintainer Gabriele is now moving to a different role, so remove him as HiSilicon PCI maintainer. Signed-off-by: Gabriele Paoloni [bhelgaas: Thanks for all your help, Gabriele, and best wishes!] Signed-off-by: Bjorn Helgaas Acked-by: Zhou Wang MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit c18475a41a13504928fc57e423f42e264844c5ad Author: Sebastian Andrzej Siewior Date: Tue Nov 7 18:37:38 2017 -0600 MAINTAINERS: Remove Stephen Bates as Microsemi Switchtec maintainer Just sent an email there and received an autoreply because he no longer works there. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Bjorn Helgaas MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit ea4b3afe1eac8f88bb453798a084fba47a1f155a Author: Jaedon Shin Date: Fri Jun 16 20:03:01 2017 +0900 MIPS: BMIPS: Fix missing cbr address Fix NULL pointer access in BMIPS3300 RAC flush. Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Kevin Cernekee Cc: linux-mips@linux-mips.org Cc: # 4.7+ Patchwork: https://patchwork.linux-mips.org/patch/16423/ Signed-off-by: James Hogan arch/mips/kernel/smp-bmips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbc3edf7d7731d7a22c483c679700589bab936a3 Author: Borislav Petkov Date: Tue Nov 7 17:37:24 2017 +0100 drivers/ide-cd: Handle missing driver data during status check gracefully The 0day bot reports the below failure which happens occasionally, with their randconfig testing (once every ~100 boots). The Code points at the private pointer ->driver_data being NULL, which hints at a race of sorts where the private driver_data descriptor has disappeared by the time we get to run the workqueue. So let's check that pointer before we continue with issuing the command to the drive. This fix is of the brown paper bag nature but considering that IDE is long deprecated, let's do that so that random testing which happens to enable CONFIG_IDE during randconfig builds, doesn't fail because of this. Besides, failing the TEST_UNIT_READY command because the drive private data is gone is something which we could simply do anyway, to denote that there was a problem communicating with the device. BUG: unable to handle kernel NULL pointer dereference at 000001c0 IP: cdrom_check_status *pde = 00000000 Oops: 0000 [#1] SMP CPU: 1 PID: 155 Comm: kworker/1:2 Not tainted 4.14.0-rc8 #127 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Workqueue: events_freezable_power_ disk_events_workfn task: 4fe90980 task.stack: 507ac000 EIP: cdrom_check_status+0x2c/0x90 EFLAGS: 00210246 CPU: 1 EAX: 00000000 EBX: 4fefec00 ECX: 00000000 EDX: 00000000 ESI: 00000003 EDI: ffffffff EBP: 467a9340 ESP: 507aded0 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 CR0: 80050033 CR2: 000001c0 CR3: 06e0f000 CR4: 00000690 Call Trace: ? ide_cdrom_check_events_real ? cdrom_check_events ? disk_check_events ? process_one_work ? process_one_work ? worker_thread ? kthread ? process_one_work ? __kthread_create_on_node ? ret_from_fork Code: 53 83 ec 14 89 c3 89 d1 be 03 00 00 00 65 a1 14 00 00 00 89 44 24 10 31 c0 8b 43 18 c7 44 24 04 00 00 00 00 c7 04 24 00 00 00 00 <8a> 80 c0 01 00 00 c7 44 24 08 00 00 00 00 83 e0 03 c7 44 24 0c EIP: cdrom_check_status+0x2c/0x90 SS:ESP: 0068:507aded0 CR2: 00000000000001c0 ---[ end trace 2410e586dd8f88b2 ]--- Reported-and-tested-by: Fengguang Wu Signed-off-by: Borislav Petkov Cc: "David S. Miller" Cc: Jens Axboe Cc: Bart Van Assche Signed-off-by: Linus Torvalds drivers/ide/ide-cd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a817e73fe693f0718b6210f4b959478877fb2e2f Author: Linus Torvalds Date: Tue Nov 7 09:04:32 2017 -0800 Revert "scsi: make 'state' device attribute pollable" This reverts commit 8a97712e5314aefe16b3ffb4583a34deaa49de04. This commit added a call to sysfs_notify() from within scsi_device_set_state(), which in turn turns out to make libata very unhappy, because ata_eh_detach_dev() does spin_lock_irqsave(ap->lock, flags); .. if (ata_scsi_offline_dev(dev)) { dev->flags |= ATA_DFLAG_DETACHED; ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG; } and ata_scsi_offline_dev() then does that scsi_device_set_state() to set it offline. So now we called sysfs_notify() from within a spinlocked region, which really doesn't work. The 0day robot reported this as: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 because sysfs_notify() ends up calling kernfs_find_and_get_ns() which then does mutex_lock(&kernfs_mutex).. The pollability of the device state isn't critical, so revert this all for now, and maybe we'll do it differently in the future. Reported-by: Fengguang Wu Acked-by: Tejun Heo Acked-by: Martin K. Petersen Acked-by: Hannes Reinecke Signed-off-by: Linus Torvalds drivers/scsi/scsi_lib.c | 3 --- drivers/scsi/scsi_transport_srp.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) commit 132d358b183ac6ad8b3fea32ad5e0663456d18d1 Author: Takashi Iwai Date: Tue Nov 7 16:05:24 2017 +0100 ALSA: seq: Fix OSS sysex delivery in OSS emulation The SYSEX event delivery in OSS sequencer emulation assumed that the event is encoded in the variable-length data with the straight buffering. This was the normal behavior in the past, but during the development, the chained buffers were introduced for carrying more data, while the OSS code was left intact. As a result, when a SYSEX event with the chained buffer data is passed to OSS sequencer port, it may end up with the wrong memory access, as if it were having a too large buffer. This patch addresses the bug, by applying the buffer data expansion by the generic snd_seq_dump_var_event() helper function. Reported-by: syzbot Reported-by: Mark Salyzyn Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_midi.c | 4 +--- sound/core/seq/oss/seq_oss_readq.c | 29 +++++++++++++++++++++++++++++ sound/core/seq/oss/seq_oss_readq.h | 2 ++ 3 files changed, 32 insertions(+), 3 deletions(-) commit 76ce7cfe35ef58f34e6ba85327afb5fbf6c3ff9b Author: Pavel Tatashin Date: Fri Oct 27 20:11:00 2017 -0400 x86/smpboot: Make optimization of delay calibration work correctly If the TSC has constant frequency then the delay calibration can be skipped when it has been calibrated for a package already. This is checked in calibrate_delay_is_known(), but that function is buggy in two aspects: It returns 'false' if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC) which is obviously the reverse of the intended check and the check for the sibling mask cannot work either because the topology links have not been set up yet. Correct the condition and move the call to set_cpu_sibling_map() before invoking calibrate_delay() so the sibling check works correctly. [ tglx: Rewrote changelong ] Fixes: c25323c07345 ("x86/tsc: Use topology functions") Signed-off-by: Pavel Tatashin Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: bob.picco@oracle.com Cc: steven.sistare@oracle.com Cc: daniel.m.jordan@oracle.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171028001100.26603-1-pasha.tatashin@oracle.com arch/x86/kernel/smpboot.c | 11 ++++++----- arch/x86/kernel/tsc.c | 8 +++----- 2 files changed, 9 insertions(+), 10 deletions(-) commit 17208f1dec433b60eb9b427c17598adc431ab6de Merge: 39dae59 cef7503 Author: Dave Airlie Date: Tue Nov 7 17:01:39 2017 +1000 Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes One vmwgfx blackscreen fix and trivial patch. * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue drm/vmwgfx: constify vmw_fence_ops commit 71630b7a832f699d6a6764ae75797e4e743ae348 Author: Rafael J. Wysocki Date: Mon Nov 6 23:56:57 2017 +0100 ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360 At least one Dell XPS13 9360 is reported to have serious issues with the Low Power S0 Idle _DSM interface and since this machine model generally can do ACPI S3 just fine, add a blacklist entry to disable that interface for Dell XPS13 9360. Fixes: 8110dd281e15 (ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196907 Reported-by: Paul Menzel Tested-by: Paul Menzel Signed-off-by: Rafael J. Wysocki Cc: 4.13+ # 4.13+ drivers/acpi/sleep.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e4880bc5dfb1f02b152e62a894b5c6f3e995b3cf Merge: 136fc5c cef572a Author: Linus Torvalds Date: Mon Nov 6 12:26:49 2017 -0800 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "Another fix for a really old bug. It only affects drain_workqueue() which isn't used often and even then triggers only during a pretty small race window, so it isn't too surprising that it stayed hidden for so long. The fix is straight-forward and low-risk. Kudos to Li Bin for reporting and fixing the bug" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fix NULL pointer dereference commit 136fc5c41f349296db1910677bb7402b0eeff376 Author: Tobin C. Harding Date: Mon Nov 6 16:19:27 2017 +1100 scripts: add leaking_addresses.pl Currently we are leaking addresses from the kernel to user space. This script is an attempt to find some of those leakages. Script parses `dmesg` output and /proc and /sys files for hex strings that look like kernel addresses. Only works for 64 bit kernels, the reason being that kernel addresses on 64 bit kernels have 'ffff' as the leading bit pattern making greping possible. On 32 kernels we don't have this luxury. Scripts is _slightly_ smarter than a straight grep, we check for false positives (all 0's or all 1's, and vsyscall start/finish addresses). [ I think there is a lot of room for improvement here, but it's already useful, so I'm merging it as-is. The whole "hash %p format" series is expected to go into 4.15, but will not fix %x users, and will not incentivize people to look at what they are leaking. - Linus ] Signed-off-by: Tobin C. Harding Signed-off-by: Linus Torvalds MAINTAINERS | 5 + scripts/leaking_addresses.pl | 305 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 310 insertions(+) commit 3510c7aa069aa83a2de6dab2b41401a198317bdc Author: Takashi Iwai Date: Mon Nov 6 20:16:50 2017 +0100 ALSA: seq: Avoid invalid lockdep class warning The recent fix for adding rwsem nesting annotation was using the given "hop" argument as the lock subclass key. Although the idea itself works, it may trigger a kernel warning like: BUG: looking up invalid subclass: 8 .... since the lockdep has a smaller number of subclasses (8) than we currently allow for the hops there (10). The current definition is merely a sanity check for avoiding the too deep delivery paths, and the 8 hops are already enough. So, as a quick fix, just follow the max hops as same as the max lockdep subclasses. Fixes: 1f20f9ff57ca ("ALSA: seq: Fix nested rwsem annotation for lockdep splat") Reported-by: syzbot Cc: Signed-off-by: Takashi Iwai include/sound/seq_kernel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af903dcd31e1b345d858ca2af9a84ed61c960b57 Merge: 39dae59 441f99c Author: Linus Torvalds Date: Mon Nov 6 09:05:03 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 an unaligned panic in x86/sha-mb and a bug in ccm that triggers with certain underlying implementations" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccm - preserve the IV buffer crypto: x86/sha1-mb - fix panic due to unaligned access crypto: x86/sha256-mb - fix panic due to unaligned access commit b9dd05c7002ee0ca8b676428b2268c26399b5e31 Author: Mark Rutland Date: Thu Nov 2 18:44:28 2017 +0100 ARM: 8720/1: ensure dump_instr() checks addr_limit When CONFIG_DEBUG_USER is enabled, it's possible for a user to deliberately trigger dump_instr() with a chosen kernel address. Let's avoid problems resulting from this by using get_user() rather than __get_user(), ensuring that we don't erroneously access kernel memory. So that we can use the same code to dump user instructions and kernel instructions, the common dumping code is factored out to __dump_instr(), with the fs manipulated appropriately in dump_instr() around calls to this. Signed-off-by: Mark Rutland Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/kernel/traps.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 9b7d869ee5a77ed4a462372bb89af622e705bfb8 Author: Takashi Iwai Date: Sun Nov 5 10:07:43 2017 +0100 ALSA: timer: Limit max instances per timer Currently we allow unlimited number of timer instances, and it may bring the system hogging way too much CPU when too many timer instances are opened and processed concurrently. This may end up with a soft-lockup report as triggered by syzkaller, especially when hrtimer backend is deployed. Since such insane number of instances aren't demanded by the normal use case of ALSA sequencer and it merely opens a risk only for abuse, this patch introduces the upper limit for the number of instances per timer backend. As default, it's set to 1000, but for the fine-grained timer like hrtimer, it's set to 100. Reported-by: syzbot Tested-by: Jérôme Glisse Cc: Signed-off-by: Takashi Iwai include/sound/timer.h | 2 ++ sound/core/hrtimer.c | 1 + sound/core/timer.c | 67 +++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 57 insertions(+), 13 deletions(-) commit 39dae59d66acd86d1de24294bd2f343fd5e7a625 Author: Linus Torvalds Date: Sun Nov 5 13:05:14 2017 -0800 Linux 4.14-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b3499d752fc292f37503e5c3a5e5df4f7e76d42 Merge: b21172c eda9cec Author: Linus Torvalds Date: Sun Nov 5 12:14:50 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: "Two fixes: - A PCID related revert that fixes power management and performance regressions. - The module loader robustization and sanity check commit is rather fresh, but it looked like a good idea to apply because of the hidden data corruption problem such invalid modules could cause" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/module: Detect and skip invalid relocations Revert "x86/mm: Stop calling leave_mm() in idle code" commit b21172cf6dc6e2af21346e774ea2e7c784de30bd Merge: 9d9cc4a 7298f08 Author: Linus Torvalds Date: Sun Nov 5 12:12:51 2017 -0800 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Ingo Molnar: "Fix an RCU warning that triggers when /dev/mcelog is used" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mcelog: Get rid of RCU remnants commit 9d9cc4aa004edc996ce560e57b1154f658681c05 Merge: c84e6d0 fb7df12 Author: Linus Torvalds Date: Sun Nov 5 11:44:39 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: "Various fixes: - synchronize kernel and tooling headers - cgroup support fix - two tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/headers: Synchronize kernel ABI headers perf/cgroup: Fix perf cgroup hierarchy support perf tools: Unwind properly location after REJECT perf symbols: Fix memory corruption because of zero length symbols commit c84e6d01eed16afa41a1c4ad9a6bd6a8bfe67af0 Merge: b772b8e c9bb863 Author: Linus Torvalds Date: Sun Nov 5 11:43:20 2017 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "An irqchip driver init fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-mvebu-gicp: Add missing spin_lock init commit b772b8e3abb9e14f39a97a5e318e466ce96d8daf Merge: 3131dc4 ec1e1b6 Author: Linus Torvalds Date: Sun Nov 5 11:02:15 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: - workaround for gcc asm handling - futex race fixes - objtool build warning fix - two watchdog fixes: a crash fix (revert) and a bug fix for /proc/sys/kernel/watchdog_thresh handling. * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Prevent GCC from merging annotate_unreachable(), take 2 objtool: Resync objtool's instruction decoder source code copy with the kernel's latest version watchdog/hardlockup/perf: Use atomics to track in-use cpu counter watchdog/harclockup/perf: Revert a33d44843d45 ("watchdog/hardlockup/perf: Simplify deferred event destroy") futex: Fix more put_pi_state() vs. exit_pi_state_list() races commit 3131dc46729a60144acc90baebc55e8dce1516ff Merge: 2d63499 e1b48c2 Author: Linus Torvalds Date: Sun Nov 5 10:21:06 2017 -0800 Merge tag 'enforcement-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull enforcement statement update from Greg KH: "Documentation: enforcement-statement: name updates Here are 12 patches for the kernel-enforcement-statement.rst file that add new names, fix the ordering of them, remove a duplicate, and remove some company markings that wished to be removed. All of these have passed the 0-day testing, even-though it is just a documentation file update :)" * tag 'enforcement-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: Add Frank Rowand to list of enforcement statement endorsers doc: add Willy Tarreau to the list of enforcement statement endorsers Documentation: Add Tim Bird to list of enforcement statement endorsers Documentation: Add my name to kernel enforcement statement Documentation: kernel-enforcement-statement.rst: proper sort names Documentation: Add Arm Ltd to kernel-enforcement-statement.rst Documentation: kernel-enforcement-statement.rst: Remove Red Hat markings Documentation: Add myself to the enforcement statement list Documentation: Sign kernel enforcement statement Add ack for Trond Myklebust to the enforcement statement Documentation: update kernel enforcement support list Documentation: add my name to supporters commit d09b9e60e06d431b008a878c4b1d48d6cce816ef Author: Priyaranjan Jha Date: Fri Nov 3 17:46:55 2017 -0700 tcp: fix DSACK-based undo on non-duplicate ACK Fixes DSACK-based undo when sender is in Open State and an ACK advances snd_una. Example scenario: - Sender goes into recovery and makes some spurious rtx. - It comes out of recovery and enters into open state. - It sends some more packets, let's say 4. - The receiver sends an ACK for the first two, but this ACK is lost. - The sender receives ack for first two, and DSACK for previous spurious rtx. Signed-off-by: Priyaranjan Jha Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Acked-by: Yousuk Seung Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f7dc9ae4a7aece9fbc3e6637bdfa38b36bcdf09 Author: Guillaume Nault Date: Fri Nov 3 16:49:00 2017 +0100 l2tp: don't use l2tp_tunnel_find() in l2tp_ip and l2tp_ip6 Using l2tp_tunnel_find() in l2tp_ip_recv() is wrong for two reasons: * It doesn't take a reference on the returned tunnel, which makes the call racy wrt. concurrent tunnel deletion. * The lookup is only based on the tunnel identifier, so it can return a tunnel that doesn't match the packet's addresses or protocol. For example, a packet sent to an L2TPv3 over IPv6 tunnel can be delivered to an L2TPv2 over UDPv4 tunnel. This is worse than a simple cross-talk: when delivering the packet to an L2TP over UDP tunnel, the corresponding socket is UDP, where ->sk_backlog_rcv() is NULL. Calling sk_receive_skb() will then crash the kernel by trying to execute this callback. And l2tp_tunnel_find() isn't even needed here. __l2tp_ip_bind_lookup() properly checks the socket binding and connection settings. It was used as a fallback mechanism for finding tunnels that didn't have their data path registered yet. But it's not limited to this case and can be used to replace l2tp_tunnel_find() in the general case. Fix l2tp_ip6 in the same way. Fixes: 0d76751fad77 ("l2tp: Add L2TPv3 IP encapsulation (no UDP) support") Fixes: a32e0eec7042 ("l2tp: introduce L2TPv3 IP encapsulation support for IPv6") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 24 +++++++++--------------- net/l2tp/l2tp_ip6.c | 24 +++++++++--------------- 2 files changed, 18 insertions(+), 30 deletions(-) commit eda9cec4c9a12208a6f69fbe68f72a6311d50032 Author: Josh Poimboeuf Date: Fri Nov 3 07:58:54 2017 -0500 x86/module: Detect and skip invalid relocations There have been some cases where external tooling (e.g., kpatch-build) creates a corrupt relocation which targets the wrong address. This is a silent failure which can corrupt memory in unexpected places. On x86, the bytes of data being overwritten by relocations are always initialized to zero beforehand. Use that knowledge to add sanity checks to detect such cases before they corrupt memory. Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jeyu@kernel.org Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/37450d6c6225e54db107fba447ce9e56e5f758e9.1509713553.git.jpoimboe@redhat.com [ Restructured the messages, as it's unclear whether the relocation or the target is corrupted. ] Signed-off-by: Ingo Molnar arch/x86/kernel/module.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2d6349944d967129c1da3c47287376f10121dbe1 Merge: f0a32ee dad46753 Author: Linus Torvalds Date: Sat Nov 4 14:26:30 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - omit EFI memory map sorting, which was recently introduced, but caused problems with the decompressor due to additional sections being emitted. - avoid unaligned load fault-generating instructions in the decompressor by switching to a private unaligned implementation. - add a symbol into the decompressor to further debug non-boot situations (ld's documentation is extremely poor for how "." works, ld doesn't seem to follow its own documentation!) - parse endian information to sparse * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: add debug ".edata_real" symbol ARM: 8716/1: pass endianness info to sparse efi/libstub: arm: omit sorting of the UEFI memory map ARM: 8715/1: add a private asm/unaligned.h commit f0a32ee42f73a7e6229d6dd68d222a507447acd7 Merge: b1878b8 b33c873 Author: Linus Torvalds Date: Sat Nov 4 11:44:55 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Fixes for interrupt controller emulation in ARM/ARM64 and x86, plus a one-liner x86 KVM guest fix" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Update APICv on APIC reset KVM: VMX: Do not fully reset PI descriptor on vCPU reset kvm: Return -ENODEV from update_persistent_clock KVM: arm/arm64: vgic-its: Check GITS_BASER Valid bit before saving tables KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value KVM: arm/arm64: vgic-its: Fix return value for device table restore arm/arm64: kvm: Disable branch profiling in HYP code arm/arm64: kvm: Move initialization completion message arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort KVM: arm64: its: Fix missing dynamic allocation check in scan_its_table commit b1878b857c732830ec38204196f99e4236b57b6e Merge: dab30d5 da984d7 Author: Linus Torvalds Date: Sat Nov 4 11:33:28 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Only two patches came in over the last two weeks: Uniphier USB support needs additional clocks enabled (on both 32-bit and 64-bit ARM), and a Marvell MVEBU stability issue has been fixed" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: mvebu: pl310-cache disable double-linefill arm64: dts: uniphier: add STDMAC clock to EHCI nodes ARM: dts: uniphier: add STDMAC clock to EHCI nodes commit dab30d5531c9ee7c42c4448afa0030c86e55df19 Merge: e50f82f ca208b5 Author: Linus Torvalds Date: Sat Nov 4 11:31:02 2017 -0700 Merge tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS fixes from James Hogan: "A selection of important MIPS fixes for 4.14, and some MAINTAINERS / email address updates: Maintainership updates: - imgtec.com -> mips.com email addresses (this trivially updates comments in quite a few files, as well as MAINTAINERS) - Pistachio SoC maintainership update Fixes: - NI 169445 build (new platform in 4.14) - EVA regression (4.14) - SMP-CPS build & preemption regressions (4.14) - SMP/hotplug deadlock & race (deadlock reintroduced 4.13) - ebpf_jit error return (4.13) - SMP-CMP build regressions (4.11 and 4.14) - bad UASM microMIPS encoding (3.16) - CM definitions (3.15)" [ I had taken the email address updates separately, because I didn't expect James to send a pull request, so those got applied twice. - Linus] * tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MIPS: Update email address for Marcin Nowakowski MIPS: smp-cmp: Fix vpe_id build error MAINTAINERS: Update Pistachio platform maintainers MIPS: smp-cmp: Use right include for task_struct MIPS: Update Goldfish RTC driver maintainer email address MIPS: Update RINT emulation maintainer email address MIPS: CPS: Fix use of current_cpu_data in preemptible code MIPS: SMP: Fix deadlock & online race MIPS: bpf: Fix a typo in build_one_insn() MIPS: microMIPS: Fix incorrect mask in insn_table_MM MIPS: Fix CM region target definitions MIPS: generic: Fix compilation error from include asm/mips-cpc.h MIPS: Fix exception entry when CONFIG_EVA enabled MIPS: generic: Fix NI 169445 its build Update MIPS email addresses commit d62d813c0d714a2d0aaf3d796a7a51ae60bf5470 Author: Chris Redpath Date: Fri Nov 3 13:36:42 2017 +0000 cpufreq: schedutil: Examine the correct CPU when we update util After commit 674e75411fc2 (sched: cpufreq: Allow remote cpufreq callbacks) we stopped to always read the utilization for the CPU we are running the governor on, and instead we read it for the CPU which we've been told has updated utilization. This is stored in sugov_cpu->cpu. The value is set in sugov_register() but we clear it in sugov_start() which leads to always looking at the utilization of CPU0 instead of the correct one. Fix this by consolidating the initialization code into sugov_start(). Fixes: 674e75411fc2 (sched: cpufreq: Allow remote cpufreq callbacks) Signed-off-by: Chris Redpath Reviewed-by: Patrick Bellasi Reviewed-by: Brendan Jackman Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ec1e1b6109171d1890a437481c35b2b56d2327b8 Author: Josh Poimboeuf Date: Fri Nov 3 17:19:41 2017 -0500 objtool: Prevent GCC from merging annotate_unreachable(), take 2 This fixes the following warning with GCC 4.6: mm/migrate.o: warning: objtool: migrate_misplaced_transhuge_page()+0x71: unreachable instruction The problem is that the compiler merged identical annotate_unreachable() inline asm blocks, resulting in a missing 'unreachable' annotation. This problem happened before, and was partially fixed with: 3d1e236022cc ("objtool: Prevent GCC from merging annotate_unreachable()") That commit tried to ensure that each instance of the annotate_unreachable() inline asm statement has a unique label. It used the __LINE__ macro to generate the label number. However, even the line number isn't necessarily unique when used in an inline function with multiple callers (in this case, __alloc_pages_node()'s use of VM_BUG_ON). Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Fixes: 3d1e236022cc ("objtool: Prevent GCC from merging annotate_unreachable()") Link: http://lkml.kernel.org/r/20171103221941.cajpwszir7ujxyc4@treble Signed-off-by: Ingo Molnar include/linux/compiler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 675357362aeba19688440eb1aaa7991067f73b12 Author: Andy Lutomirski Date: Sat Nov 4 04:16:12 2017 -0700 Revert "x86/mm: Stop calling leave_mm() in idle code" This reverts commit 43858b4f25cf0adc5c2ca9cf5ce5fdf2532941e5. The reason I removed the leave_mm() calls in question is because the heuristic wasn't needed after that patch. With the original version of my PCID series, we never flushed a "lazy cpu" (i.e. a CPU running kernel thread) due a flush on the loaded mm. Unfortunately, that caused architectural issues, so now I've reinstated these flushes on non-PCID systems in: commit b956575bed91 ("x86/mm: Flush more aggressively in lazy TLB mode"). That, in turn, gives us a power management and occasionally performance regression as compared to old kernels: a process that goes into a deep idle state on a given CPU and gets its mm flushed due to activity on a different CPU will wake the idle CPU. Reinstate the old ugly heuristic: if a CPU goes into ACPI C3 or an intel_idle state that is likely to cause a TLB flush gets its mm switched to init_mm before going idle. FWIW, this heuristic is lousy. Whether we should change CR3 before idle isn't a good hint except insofar as the performance hit is a bit lower if the TLB is getting flushed by the idle code anyway. What we really want to know is whether we anticipate being idle long enough that the mm is likely to be flushed before we wake up. This is more a matter of the expected latency than the idle state that gets chosen. This heuristic also completely fails on systems that don't know whether the TLB will be flushed (e.g. AMD systems?). OTOH it may be a bit obsolete anyway -- PCID systems don't presently benefit from this heuristic at all. We also shouldn't do this callback from innermost bit of the idle code due to the RCU nastiness it causes. All the information need is available before rcu_idle_enter() needs to happen. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov 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 Fixes: 43858b4f25cf "x86/mm: Stop calling leave_mm() in idle code" Link: http://lkml.kernel.org/r/c513bbd4e653747213e05bc7062de000bf0202a5.1509793738.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/ia64/include/asm/acpi.h | 2 ++ arch/x86/include/asm/acpi.h | 2 ++ arch/x86/mm/tlb.c | 17 ++++++++++++++--- drivers/acpi/processor_idle.c | 2 ++ drivers/idle/intel_idle.c | 9 +++++---- 5 files changed, 25 insertions(+), 7 deletions(-) commit baedf68a068ca29624f241426843635920f16e1d Author: Andrey Konovalov Date: Thu Nov 2 21:26:59 2017 +0100 net: usb: asix: fill null-ptr-deref in asix_suspend When asix_suspend() is called dev->driver_priv might not have been assigned a value, so we need to check that it's not NULL. Found by syzkaller. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc4-43422-geccacdd69a8c #400 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event task: ffff88006bb36300 task.stack: ffff88006bba8000 RIP: 0010:asix_suspend+0x76/0xc0 drivers/net/usb/asix_devices.c:629 RSP: 0018:ffff88006bbae718 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff880061ba3b80 RCX: 1ffff1000c34d644 RDX: 0000000000000001 RSI: 0000000000000402 RDI: 0000000000000008 RBP: ffff88006bbae738 R08: 1ffff1000d775cad R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800630a8b40 R13: 0000000000000000 R14: 0000000000000402 R15: ffff880061ba3b80 FS: 0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff33cf89000 CR3: 0000000061c0a000 CR4: 00000000000006f0 Call Trace: usb_suspend_interface drivers/usb/core/driver.c:1209 usb_suspend_both+0x27f/0x7e0 drivers/usb/core/driver.c:1314 usb_runtime_suspend+0x41/0x120 drivers/usb/core/driver.c:1852 __rpm_callback+0x339/0xb60 drivers/base/power/runtime.c:334 rpm_callback+0x106/0x220 drivers/base/power/runtime.c:461 rpm_suspend+0x465/0x1980 drivers/base/power/runtime.c:596 __pm_runtime_suspend+0x11e/0x230 drivers/base/power/runtime.c:1009 pm_runtime_put_sync_autosuspend ./include/linux/pm_runtime.h:251 usb_new_device+0xa37/0x1020 drivers/usb/core/hub.c:2487 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: 8d 7c 24 20 48 89 fa 48 c1 ea 03 80 3c 02 00 75 5b 48 b8 00 00 00 00 00 fc ff df 4d 8b 6c 24 20 49 8d 7d 08 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 34 4d 8b 6d 08 4d 85 ed 74 0b e8 26 2b 51 fd 4c RIP: asix_suspend+0x76/0xc0 RSP: ffff88006bbae718 ---[ end trace dfc4f5649284342c ]--- Signed-off-by: Andrey Konovalov Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b5ec1a5f9738ee7bf8f5ec0526e75e00362c48f Author: Ye Yin Date: Thu Oct 26 16:57:05 2017 +0800 netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed When run ipvs in two different network namespace at the same host, and one ipvs transport network traffic to the other network namespace ipvs. 'ipvs_property' flag will make the second ipvs take no effect. So we should clear 'ipvs_property' when SKB network namespace changed. Fixes: 621e84d6f373 ("dev: introduce skb_scrub_packet()") Signed-off-by: Ye Yin Signed-off-by: Wei Zhou Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: David S. Miller include/linux/skbuff.h | 7 +++++++ net/core/skbuff.c | 1 + 2 files changed, 8 insertions(+) commit 24de79e5008a928beb2c7ccc2396f15065613363 Author: Ganesh Goudar Date: Thu Nov 2 19:26:22 2017 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number to 1.16.63.0. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1b48c209ebf99487f9941193b6c4e0a684a7c8c Author: Frank Rowand Date: Fri Nov 3 12:50:58 2017 -0700 Documentation: Add Frank Rowand to list of enforcement statement endorsers Add my name to the list. Signed-off-by: Frank Rowand Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 707f5a0ff5e5c21422d5fb8797782d3fe8b51f35 Author: Willy Tarreau Date: Fri Nov 3 07:54:11 2017 +0100 doc: add Willy Tarreau to the list of enforcement statement endorsers add me to the list. Signed-off-by: Willy Tarreau Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit fb7df12d645cfba6a76a45fdcc7e3f7fbbcda661 Author: Ingo Molnar Date: Fri Nov 3 12:18:37 2017 +0100 tools/headers: Synchronize kernel ABI headers After the SPDX license tags were added a number of tooling headers got out of sync with their kernel variants, generating lots of build warnings. Sync them: - tools/arch/x86/include/asm/disabled-features.h, tools/arch/x86/include/asm/required-features.h, tools/include/linux/hash.h: Remove the SPDX tag where the kernel version does not have it. - tools/include/asm-generic/bitops/__fls.h, tools/include/asm-generic/bitops/arch_hweight.h, tools/include/asm-generic/bitops/const_hweight.h, tools/include/asm-generic/bitops/fls.h, tools/include/asm-generic/bitops/fls64.h, tools/include/uapi/asm-generic/ioctls.h, tools/include/uapi/asm-generic/mman-common.h, tools/include/uapi/sound/asound.h, tools/include/uapi/linux/kvm.h, tools/include/uapi/linux/perf_event.h, tools/include/uapi/linux/sched.h, tools/include/uapi/linux/vhost.h, tools/include/uapi/sound/asound.h: Add the SPDX tag of the respective kernel header. - tools/include/uapi/linux/bpf_common.h, tools/include/uapi/linux/fcntl.h, tools/include/uapi/linux/hw_breakpoint.h, tools/include/uapi/linux/mman.h, tools/include/uapi/linux/stat.h, Change the tag to the kernel header version: -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ Also sync other header details: - include/uapi/sound/asound.h: Fix pointless end of line whitespace noise the header grew in this cycle. - tools/arch/x86/lib/memcpy_64.S: Sync the code and add tools/include/asm/export.h with dummy wrappers to support building the kernel side code in a tooling header environment. - tools/include/uapi/asm-generic/mman.h, tools/include/uapi/linux/bpf.h: Sync other details that don't impact tooling's use of the ABIs. Acked-by: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Namhyung Kim Cc: Jiri Olsa Cc: Stephen Rothwell Signed-off-by: Ingo Molnar include/uapi/sound/asound.h | 6 +++--- tools/arch/x86/include/asm/disabled-features.h | 1 - tools/arch/x86/include/asm/required-features.h | 1 - tools/arch/x86/include/uapi/asm/unistd.h | 1 + tools/arch/x86/lib/memcpy_64.S | 5 ++++- tools/include/asm-generic/bitops/__fls.h | 1 + tools/include/asm-generic/bitops/arch_hweight.h | 1 + tools/include/asm-generic/bitops/const_hweight.h | 1 + tools/include/asm-generic/bitops/fls.h | 1 + tools/include/asm-generic/bitops/fls64.h | 1 + tools/include/asm/export.h | 7 +++++++ tools/include/linux/hash.h | 1 - tools/include/uapi/asm-generic/ioctls.h | 1 + tools/include/uapi/asm-generic/mman-common.h | 1 + tools/include/uapi/asm-generic/mman.h | 4 ++-- tools/include/uapi/linux/bpf.h | 4 ++-- tools/include/uapi/linux/bpf_common.h | 2 +- tools/include/uapi/linux/fcntl.h | 2 +- tools/include/uapi/linux/hw_breakpoint.h | 2 +- tools/include/uapi/linux/kvm.h | 1 + tools/include/uapi/linux/mman.h | 2 +- tools/include/uapi/linux/perf_event.h | 1 + tools/include/uapi/linux/sched.h | 1 + tools/include/uapi/linux/stat.h | 2 +- tools/include/uapi/linux/vhost.h | 1 + tools/include/uapi/sound/asound.h | 1 + 26 files changed, 36 insertions(+), 16 deletions(-) commit da0db32bbe816085d7f7f9cebfc825e55eff811f Author: Josh Poimboeuf Date: Fri Nov 3 09:31:43 2017 -0500 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 Reported-by: Stephen Rothwell Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/013315a808ccf5580abc293808827c8e2b5e1354.1509719152.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk | 1 + 1 file changed, 1 insertion(+) commit 649e441f49d4bfb717e9467950891dc452f4e063 Merge: 42f930d 5cb0512 Author: Ingo Molnar Date: Sat Nov 4 08:53:04 2017 +0100 Merge branch 'linus' into core/urgent, to pick up dependent commits We want to fix an objtool build warning that got introduced in the latest upstream kernel. Signed-off-by: Ingo Molnar commit e50f82f809243f849122e06b8119da9dc00fc765 Merge: d4c2e9f 6f29c244 Author: Linus Torvalds Date: Fri Nov 3 18:10:23 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a couple of fixups to the sparse-keymap module and the Microchip AR1021 touchscreen driver" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: sparse-keymap - send sync event for KE_SW/KE_VSW Input: ar1021_i2c - set INPUT_PROP_DIRECT commit d4c2e9fca5b7db8d315d93a072e65d0847f8e0c5 Merge: 81ca2ca db9d79f Author: Linus Torvalds Date: Fri Nov 3 13:56:15 2017 -0700 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 fix for USB clks on Uniphier PXs3 SoCs" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: uniphier: fix clock data for PXs3 commit 6f29c244075c12713b4d8c32a2707fa4604bf60d Author: Stefan Brüns Date: Fri Nov 3 12:17:40 2017 -0700 Input: sparse-keymap - send sync event for KE_SW/KE_VSW Sync events are sent by sparse_keymap_report_entry for normal KEY_* events, and are generated by several drivers after generating SW_* events, so sparse_keymap_report_entry should do the same. Without the sync, events are accumulated in the kernel. Currently, no driver uses sparse-keymap for SW_* events, but it is required for the intel-vbtn platform driver to generate SW_TABLET_MODE events. Signed-off-by: Stefan Brüns Signed-off-by: Dmitry Torokhov drivers/input/sparse-keymap.c | 1 + 1 file changed, 1 insertion(+) commit 53f0b7f0dfd5fc560047fa26e36b7b0426287705 Author: Martin Kepplinger Date: Thu Nov 2 16:51:28 2017 -0700 Input: ar1021_i2c - set INPUT_PROP_DIRECT If INPUT_PROP_DIRECT is set, userspace doesn't have to fall back to old ways of identifying touchscreen devices. Let's add it. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 1 + 1 file changed, 1 insertion(+) commit 81ca2caefc6db1df942bdf845a2a74a60842d543 Merge: 01073ac 777a45b Author: Linus Torvalds Date: Fri Nov 3 10:36:43 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile fixes from Chris Metcalf: "Two one-line bug fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: Implement ->set_state_oneshot_stopped() tile: pass machine size to sparse commit 01073ac1b18f2a936b40607fec8dac887218efb7 Merge: 866ba84 e2532b4 Author: Linus Torvalds Date: Fri Nov 3 10:26:40 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One minor fix in the error leg of the qla2xxx driver (it oopses the system if we get an error trying to start the internal kernel thread). The fix is minor because the problem isn't often encountered in the field (although it can be induced by inserting the module in a low memory environment)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix oops in qla2x00_probe_one error path commit 777a45b458660b18d7d7c3e0d874d08650c99cd2 Author: Chris Metcalf Date: Fri Nov 3 13:20:54 2017 -0400 arch/tile: Implement ->set_state_oneshot_stopped() set_state_oneshot_stopped() is called by the clkevt core, when the next event is required at an expiry time of 'KTIME_MAX'. This normally happens with NO_HZ_{IDLE|FULL} in both LOWRES/HIGHRES modes. This patch makes the clockevent device to stop on such an event, to avoid spurious interrupts, as explained by: commit 8fff52fd5093 ("clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state"). Signed-off-by: Chris Metcalf arch/tile/kernel/time.c | 1 + 1 file changed, 1 insertion(+) commit 866ba84ea30f94838251f74becf3cfe3c2d5c0f9 Merge: 3f46540 7ecb37f Author: Linus Torvalds Date: Fri Nov 3 09:25:53 2017 -0700 Merge tag 'powerpc-4.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 4.14. This is bigger than I like to send at rc7, but that's at least partly because I didn't send any fixes last week. If it wasn't for the IMC driver, which is new and getting heavy testing, the diffstat would look a bit better. I've also added ftrace on big endian to my test suite, so we shouldn't break that again in future. - A fix to the handling of misaligned paste instructions (P9 only), where a change to a #define has caused the check for the instruction to always fail. - The preempt handling was unbalanced in the radix THP flush (P9 only). Though we don't generally use preempt we want to keep it working as much as possible. - Two fixes for IMC (P9 only), one when booting with restricted number of CPUs and one in the error handling when initialisation fails due to firmware etc. - A revert to fix function_graph on big endian machines, and then a rework of the reverted patch to fix kprobes blacklist handling on big endian machines. Thanks to: Anju T Sudhakar, Guilherme G. Piccoli, Madhavan Srinivasan, Naveen N. Rao, Nicholas Piggin, Paul Mackerras" * tag 'powerpc-4.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf: Fix core-imc hotplug callback failure during imc initialization powerpc/kprobes: Dereference function pointers only if the address does not belong to kernel text Revert "powerpc64/elfv1: Only dereference function descriptor for non-text symbols" powerpc/64s/radix: Fix preempt imbalance in TLB flush powerpc: Fix check for copy/paste instructions in alignment handler powerpc/perf: Fix IMC allocation routine commit 3f46540ee7015ad2e3665e68b0b22c48ce9f99e5 Merge: e65a139 9d9491a Author: Linus Torvalds Date: Fri Nov 3 09:19:20 2017 -0700 Merge tag 'mmc-v4.14-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "Fix dw_mmc request timeout issues" * tag 'mmc-v4.14-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: dw_mmc: Fix the DTO timeout calculation mmc: dw_mmc: Add locking to the CTO timer mmc: dw_mmc: Fix the CTO timeout calculation mmc: dw_mmc: cancel the CTO timer after a voltage switch commit e65a139d5b10cd92ce44d4200c14bc16d416594e Merge: 7ba3ebf 9cc0696 Author: Linus Torvalds Date: Fri Nov 3 09:14:22 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: - one nouveau regression fix - some amdgpu fixes for stable to fix hangs on some harvested Polaris GPUs - a set of KASAN and regression fixes for i915, their CI system seems to be working pretty well now. * tag 'drm-fixes-for-v4.14-rc8' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: allow harvesting check for Polaris VCE drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting drm/i915: Check incoming alignment for unfenced buffers (on i915gm) drm/nouveau/kms/nv50: use the correct state for base channel notifier setup drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr) drm/i915: Hold rcu_read_lock when iterating over the radixtree (objects) drm/i915/edp: read edp display control registers unconditionally drm/i915: Do not rely on wm preservation for ILK watermarks drm/i915: Cancel the modeset retry work during modeset cleanup commit 7ba3ebff9c09fa461e7c2d186b81f7af61910abe Merge: f0395d5 93824c8 Author: Linus Torvalds Date: Fri Nov 3 09:09:21 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Hopefully this is the last batch of networking fixes for 4.14 Fingers crossed... 1) Fix stmmac to use the proper sized OF property read, from Bhadram Varka. 2) Fix use after free in net scheduler tc action code, from Cong Wang. 3) Fix SKB control block mangling in tcp_make_synack(). 4) Use proper locking in fib_dump_info(), from Florian Westphal. 5) Fix IPG encodings in systemport driver, from Florian Fainelli. 6) Fix division by zero in NV TCP congestion control module, from Konstantin Khlebnikov. 7) Fix use after free in nf_reject_ipv4, from Tejaswi Tanikella" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: systemport: Correct IPG length settings tcp: do not mangle skb->cb[] in tcp_make_synack() fib: fib_dump_info can no longer use __in_dev_get_rtnl stmmac: use of_property_read_u32 instead of read_u8 net_sched: hold netns refcnt for each action net_sched: acquire RTNL in tc_action_net_exit() net: vrf: correct FRA_L3MDEV encode type tcp_nv: fix division by zero in tcpnv_acked() netfilter: nf_reject_ipv4: Fix use-after-free in send_reset netfilter: nft_set_hash: disable fast_ops for 2-len keys commit f0395d5b4d691164a6e4d107590636db80b29bf6 Merge: fb615d6 2628bd6 Author: Linus Torvalds Date: Fri Nov 3 09:03:50 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton : mm, swap: fix race between swap count continuation operations mm/huge_memory.c: deposit page table when copying a PMD migration entry initramfs: fix initramfs rebuilds w/ compression after disabling fs/hugetlbfs/inode.c: fix hwpoison reserve accounting ocfs2: fstrim: Fix start offset of first cluster group during fstrim mm, /proc/pid/pagemap: fix soft dirty marking for PMD migration entry userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size commit fb615d61b5583db92e3793709b97e35dc9499c2a Author: Paul Burton Date: Wed Oct 25 17:04:33 2017 -0700 Update MIPS email addresses MIPS will soon not be a part of Imagination Technologies, and as such many @imgtec.com email addresses will no longer be valid. This patch updates the addresses for those who: - Have 10 or more patches in mainline authored using an @imgtec.com email address, or any patches dated within the past year. - Are still with Imagination but leaving as part of the MIPS business unit, as determined from an internal email address list. - Haven't already updated their email address (ie. JamesH) or expressed a desire to be excluded (ie. Maciej). - Acked v2 or earlier of this patch, which leaves Deng-Cheng, Matt & myself. New addresses are of the form firstname.lastname@mips.com, and all verified against an internal email address list. An entry is added to .mailmap for each person such that get_maintainer.pl will report the new addresses rather than @imgtec.com addresses which will soon be dead. Instances of the affected addresses throughout the tree are then mechanically replaced with the new @mips.com address. Signed-off-by: Paul Burton Cc: Deng-Cheng Zhu Cc: Deng-Cheng Zhu Acked-by: Dengcheng Zhu Cc: Matt Redfearn Cc: Matt Redfearn Acked-by: Matt Redfearn Cc: Andrew Morton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Signed-off-by: Linus Torvalds .mailmap | 3 +++ Documentation/ABI/testing/sysfs-class-remoteproc | 4 ++-- MAINTAINERS | 6 +++--- arch/mips/generic/Makefile | 2 +- arch/mips/generic/Platform | 2 +- arch/mips/generic/board-sead3.c | 2 +- arch/mips/generic/init.c | 2 +- arch/mips/generic/irq.c | 2 +- arch/mips/generic/proc.c | 2 +- arch/mips/generic/yamon-dt.c | 2 +- arch/mips/include/asm/dsemul.h | 2 +- arch/mips/include/asm/maar.h | 2 +- arch/mips/include/asm/mach-malta/malta-dtshim.h | 2 +- arch/mips/include/asm/mach-malta/malta-pm.h | 2 +- arch/mips/include/asm/machine.h | 2 +- arch/mips/include/asm/mips-cm.h | 2 +- arch/mips/include/asm/mips-cpc.h | 2 +- arch/mips/include/asm/mips-cps.h | 2 +- arch/mips/include/asm/mips-gic.h | 2 +- arch/mips/include/asm/msa.h | 2 +- arch/mips/include/asm/pm-cps.h | 2 +- arch/mips/include/asm/smp-cps.h | 2 +- arch/mips/include/asm/yamon-dt.h | 2 +- arch/mips/kernel/cmpxchg.c | 2 +- arch/mips/kernel/cps-vec-ns16550.S | 2 +- arch/mips/kernel/cps-vec.S | 2 +- arch/mips/kernel/elf.c | 2 +- arch/mips/kernel/mips-cm.c | 2 +- arch/mips/kernel/mips-cpc.c | 2 +- arch/mips/kernel/pm-cps.c | 2 +- arch/mips/kernel/relocate.c | 2 +- arch/mips/kernel/smp-cps.c | 2 +- arch/mips/mm/sc-debugfs.c | 2 +- arch/mips/mti-malta/malta-dt.c | 2 +- arch/mips/mti-malta/malta-dtshim.c | 2 +- arch/mips/mti-malta/malta-pm.c | 2 +- arch/mips/pci/pci-generic.c | 2 +- arch/mips/tools/generic-board-config.sh | 2 +- drivers/auxdisplay/img-ascii-lcd.c | 2 +- drivers/clk/imgtec/clk-boston.c | 2 +- drivers/clk/ingenic/cgu.c | 2 +- drivers/clk/ingenic/cgu.h | 2 +- drivers/clk/ingenic/jz4740-cgu.c | 2 +- drivers/clk/ingenic/jz4780-cgu.c | 2 +- drivers/cpuidle/cpuidle-cps.c | 2 +- drivers/power/reset/piix4-poweroff.c | 4 ++-- 46 files changed, 52 insertions(+), 49 deletions(-) commit 941f5f0f6ef5338814145cf2b813cf1f98873e2f Author: Rafael J. Wysocki Date: Fri Nov 3 16:35:49 2017 +0100 x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo Commit 890da9cf0983 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"") is not sufficient to restore the previous behavior of "cpu MHz" in /proc/cpuinfo on x86 due to some changes made after the commit it has reverted. To address this, make the code in question use arch_freq_get_on_cpu() which also is used by cpufreq for reporting the current frequency of CPUs and since that function doesn't really depend on cpufreq in any way, drop the CONFIG_CPU_FREQ dependency for the object file containing it. Also refactor arch_freq_get_on_cpu() somewhat to avoid IPIs and return cached values right away if it is called very often over a short time (to prevent user space from triggering IPI storms through it). Fixes: 890da9cf0983 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"") Cc: stable@kernel.org # 4.13 - together with 890da9cf0983 Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/aperfmperf.c | 11 +++++++---- arch/x86/kernel/cpu/proc.c | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) commit 2628bd6fc052bd85e9864dae4de494d8a6313391 Author: Huang Ying Date: Thu Nov 2 15:59:50 2017 -0700 mm, swap: fix race between swap count continuation operations One page may store a set of entries of the sis->swap_map (swap_info_struct->swap_map) in multiple swap clusters. If some of the entries has sis->swap_map[offset] > SWAP_MAP_MAX, multiple pages will be used to store the set of entries of the sis->swap_map. And the pages are linked with page->lru. This is called swap count continuation. To access the pages which store the set of entries of the sis->swap_map simultaneously, previously, sis->lock is used. But to improve the scalability of __swap_duplicate(), swap cluster lock may be used in swap_count_continued() now. This may race with add_swap_count_continuation() which operates on a nearby swap cluster, in which the sis->swap_map entries are stored in the same page. The race can cause wrong swap count in practice, thus cause unfreeable swap entries or software lockup, etc. To fix the race, a new spin lock called cont_lock is added to struct swap_info_struct to protect the swap count continuation page list. This is a lock at the swap device level, so the scalability isn't very well. But it is still much better than the original sis->lock, because it is only acquired/released when swap count continuation is used. Which is considered rare in practice. If it turns out that the scalability becomes an issue for some workloads, we can split the lock into some more fine grained locks. Link: http://lkml.kernel.org/r/20171017081320.28133-1-ying.huang@intel.com Fixes: 235b62176712 ("mm/swap: add cluster lock") Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Shaohua Li Cc: Tim Chen Cc: Michal Hocko Cc: Aaron Lu Cc: Dave Hansen Cc: Andi Kleen Cc: Minchan Kim Cc: Hugh Dickins Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 ++++ mm/swapfile.c | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) commit dd8a67f9a37c74b61e5e050924ceec9ffb4f8c3c Author: Zi Yan Date: Thu Nov 2 15:59:47 2017 -0700 mm/huge_memory.c: deposit page table when copying a PMD migration entry We need to deposit pre-allocated PTE page table when a PMD migration entry is copied in copy_huge_pmd(). Otherwise, we will leak the pre-allocated page and cause a NULL pointer dereference later in zap_huge_pmd(). The missing counters during PMD migration entry copy process are added as well. The bug report is here: https://lkml.org/lkml/2017/10/29/214 Link: http://lkml.kernel.org/r/20171030144636.4836-1-zi.yan@sent.com Fixes: 84c3fc4e9c563 ("mm: thp: check pmd migration entry in common path") Signed-off-by: Zi Yan Reported-by: Fengguang Wu Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 3 +++ 1 file changed, 3 insertions(+) commit e08b1877452a0055c65f6394163ce5a0fbd720a3 Author: Florian Fainelli Date: Thu Nov 2 15:59:44 2017 -0700 initramfs: fix initramfs rebuilds w/ compression after disabling This is a follow-up to commit 57ddfdaa9a72 ("initramfs: fix disabling of initramfs (and its compression)"). This particular commit fixed the use case where we build the kernel with an initramfs with no compression, and then we build the kernel with no initramfs. Now this still left us with the same case as described here: http://lkml.kernel.org/r/20170521033337.6197-1-f.fainelli@gmail.com not working with initramfs compression. This can be seen by the following steps/timestamps: https://www.spinics.net/lists/kernel/msg2598153.html .initramfs_data.cpio.gz.cmd is correct: cmd_usr/initramfs_data.cpio.gz := /bin/bash ./scripts/gen_initramfs_list.sh -o usr/initramfs_data.cpio.gz -u 1000 -g 1000 /home/fainelli/work/uclinux-rootfs/romfs /home/fainelli/work/uclinux-rootfs/misc/initramfs.dev and was generated the first time we did generate the gzip initramfs, so the command has not changed, nor its arguments, so we just don't call it, no initramfs cpio is re-generated as a consequence. The fix for this problem is just to properly keep track of the .initramfs_cpio_data.d file by suffixing it with the compression extension. This takes care of properly tracking dependencies such that the initramfs get (re)generated any time files are added/deleted etc. Link: http://lkml.kernel.org/r/20170930033936.6722-1-f.fainelli@gmail.com Fixes: db2aa7fd15e8 ("initramfs: allow again choice of the embedded initramfs compression algorithm") Fixes: 9e3596b0c653 ("kbuild: initramfs cleanup, set target from Kconfig") Signed-off-by: Florian Fainelli Cc: "Francisco Blas Izquierdo Riera (klondike)" Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds usr/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ab615a5b879292e83653be60aa82113f7c6f462d Author: Mike Kravetz Date: Thu Nov 2 15:59:41 2017 -0700 fs/hugetlbfs/inode.c: fix hwpoison reserve accounting Calling madvise(MADV_HWPOISON) on a hugetlbfs page will result in bad (negative) reserved huge page counts. This may not happen immediately, but may happen later when the underlying file is removed or filesystem unmounted. For example: AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 1 HugePages_Free: 0 HugePages_Rsvd: 18446744073709551615 HugePages_Surp: 0 Hugepagesize: 2048 kB In routine hugetlbfs_error_remove_page(), hugetlb_fix_reserve_counts is called after remove_huge_page. hugetlb_fix_reserve_counts is designed to only be called/used only if a failure is returned from hugetlb_unreserve_pages. Therefore, call hugetlb_unreserve_pages as required and only call hugetlb_fix_reserve_counts in the unlikely event that hugetlb_unreserve_pages returns an error. Link: http://lkml.kernel.org/r/20171019230007.17043-2-mike.kravetz@oracle.com Fixes: 78bb920344b8 ("mm: hwpoison: dissolve in-use hugepage in unrecoverable memory error") Signed-off-by: Mike Kravetz Acked-by: Naoya Horiguchi Cc: Michal Hocko Cc: Aneesh Kumar Cc: Anshuman Khandual Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 105ddc93f06ebe3e553f58563d11ed63dbcd59f0 Author: Ashish Samant Date: Thu Nov 2 15:59:37 2017 -0700 ocfs2: fstrim: Fix start offset of first cluster group during fstrim The first cluster group descriptor is not stored at the start of the group but at an offset from the start. We need to take this into account while doing fstrim on the first cluster group. Otherwise we will wrongly start fstrim a few blocks after the desired start block and the range can cross over into the next cluster group and zero out the group descriptor there. This can cause filesytem corruption that cannot be fixed by fsck. Link: http://lkml.kernel.org/r/1507835579-7308-1-git-send-email-ashish.samant@oracle.com Signed-off-by: Ashish Samant Reviewed-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit b83d7e432399d44454411dec5c25afb5c4469e96 Author: Huang Ying Date: Thu Nov 2 15:59:34 2017 -0700 mm, /proc/pid/pagemap: fix soft dirty marking for PMD migration entry When the pagetable is walked in the implementation of /proc//pagemap, pmd_soft_dirty() is used for both the PMD huge page map and the PMD migration entries. That is wrong, pmd_swp_soft_dirty() should be used for the PMD migration entries instead because the different page table entry flag is used. As a result, /proc/pid/pagemap may report incorrect soft dirty information for PMD migration entries. Link: http://lkml.kernel.org/r/20171017081818.31795-1-ying.huang@intel.com Fixes: 84c3fc4e9c56 ("mm: thp: check pmd migration entry in common path") Signed-off-by: "Huang, Ying" Acked-by: Kirill A. Shutemov Acked-by: Naoya Horiguchi Cc: Michal Hocko Cc: David Rientjes Cc: Arnd Bergmann Cc: Hugh Dickins Cc: "Jérôme Glisse" Cc: Daniel Colascione Cc: Zi Yan Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1e3921471354244f70fe268586ff94a97a6dd4df Author: Andrea Arcangeli Date: Thu Nov 2 15:59:29 2017 -0700 userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size This oops: kernel BUG at fs/hugetlbfs/inode.c:484! RIP: remove_inode_hugepages+0x3d0/0x410 Call Trace: hugetlbfs_setattr+0xd9/0x130 notify_change+0x292/0x410 do_truncate+0x65/0xa0 do_sys_ftruncate.constprop.3+0x11a/0x180 SyS_ftruncate+0xe/0x10 tracesys+0xd9/0xde was caused by the lack of i_size check in hugetlb_mcopy_atomic_pte. mmap() can still succeed beyond the end of the i_size after vmtruncate zapped vmas in those ranges, but the faults must not succeed, and that includes UFFDIO_COPY. We could differentiate the retval to userland to represent a SIGBUS like a page fault would do (vs SIGSEGV), but it doesn't seem very useful and we'd need to pick a random retval as there's no meaningful syscall retval that would differentiate from SIGSEGV and SIGBUS, there's just -EFAULT. Link: http://lkml.kernel.org/r/20171016223914.2421-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reviewed-by: Mike Kravetz Cc: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 441f99c90497e15aa3ad1dbabd56187e29614348 Author: Romain Izard Date: Tue Oct 31 15:42:35 2017 +0100 crypto: ccm - preserve the IV buffer The IV buffer used during CCM operations is used twice, during both the hashing step and the ciphering step. When using a hardware accelerator that updates the contents of the IV buffer at the end of ciphering operations, the value will be modified. In the decryption case, the subsequent setup of the hashing algorithm will interpret the updated IV instead of the original value, which can lead to out-of-bounds writes. Reuse the idata buffer, only used in the hashing step, to preserve the IV's value during the ciphering step in the decryption case. Signed-off-by: Romain Izard Reviewed-by: Tudor Ambarus Cc: Signed-off-by: Herbert Xu crypto/ccm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d041b557792c85677f17e08eee535eafbd6b9aa2 Author: Andrey Ryabinin Date: Mon Oct 16 18:51:31 2017 +0300 crypto: x86/sha1-mb - fix panic due to unaligned access struct sha1_ctx_mgr allocated in sha1_mb_mod_init() via kzalloc() and later passed in sha1_mb_flusher_mgr_flush_avx2() function where instructions vmovdqa used to access the struct. vmovdqa requires 16-bytes aligned argument, but nothing guarantees that struct sha1_ctx_mgr will have that alignment. Unaligned vmovdqa will generate GP fault. Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment requirements. Fixes: 2249cbb53ead ("crypto: sha-mb - SHA1 multibuffer submit and flush routines for AVX2") Signed-off-by: Andrey Ryabinin Cc: Signed-off-by: Herbert Xu arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5dfeaac15f2b1abb5a53c9146041c7235eb9aa04 Author: Andrey Ryabinin Date: Mon Oct 16 18:51:30 2017 +0300 crypto: x86/sha256-mb - fix panic due to unaligned access struct sha256_ctx_mgr allocated in sha256_mb_mod_init() via kzalloc() and later passed in sha256_mb_flusher_mgr_flush_avx2() function where instructions vmovdqa used to access the struct. vmovdqa requires 16-bytes aligned argument, but nothing guarantees that struct sha256_ctx_mgr will have that alignment. Unaligned vmovdqa will generate GP fault. Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment requirements. Fixes: a377c6b1876e ("crypto: sha256-mb - submit/flush routines for AVX2") Reported-by: Josh Poimboeuf Signed-off-by: Andrey Ryabinin Cc: Acked-by: Tim Chen Signed-off-by: Herbert Xu arch/x86/crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c9f3f813d462c72dbe412cee6a5cbacf13c4ad5e Author: Steffen Klassert Date: Thu Nov 2 08:10:17 2017 +0100 xfrm: Fix stack-out-of-bounds read in xfrm_state_find. 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 using the addresses from the template unconditionally. Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 294cbd05e32990c3b1a62be27441fc719edebbab Merge: be96b31 5cb0512 Author: Ingo Molnar Date: Fri Nov 3 12:30:12 2017 +0100 Merge branch 'linus' into perf/urgent, to pick up dependent commits Signed-off-by: Ingo Molnar commit cf37966751747727629fe51fd4a1d4edd8457c60 Author: Florian Westphal Date: Thu Nov 2 16:46:01 2017 +0100 xfrm: do unconditional template resolution before pcpu cache check Stephen Smalley says: Since 4.14-rc1, the selinux-testsuite has been encountering sporadic failures during testing of labeled IPSEC. git bisect pointed to commit ec30d ("xfrm: add xdst pcpu cache"). The xdst pcpu cache is only checking that the policies are the same, but does not validate that the policy, state, and flow match with respect to security context labeling. As a result, the wrong SA could be used and the receiver could end up performing permission checking and providing SO_PEERSEC or SCM_SECURITY values for the wrong security context. This fix makes it so that we always do the template resolution, and then checks that the found states match those in the pcpu bundle. This has the disadvantage of doing a bit more work (lookup in state hash table) if we can reuse the xdst entry (we only avoid xdst alloc/free) but we don't add a lot of extra work in case we can't reuse. xfrm_pol_dead() check is removed, reasoning is that xfrm_tmpl_resolve does all needed checks. Cc: Paul Moore Fixes: ec30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache") Reported-by: Stephen Smalley Tested-by: Stephen Smalley Signed-off-by: Florian Westphal Acked-by: Paul Moore Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit e16e437024abdbb8d08d8371fb2d9c99522df136 Author: Bird, Timothy Date: Thu Nov 2 20:30:46 2017 +0000 Documentation: Add Tim Bird to list of enforcement statement endorsers Add my name to the list. Signed-off-by: Tim Bird Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 93824c80bf47ebe087414b3a40ca0ff9aab7d1fb Author: Florian Fainelli Date: Thu Nov 2 16:08:40 2017 -0700 net: systemport: Correct IPG length settings Due to a documentation mistake, the IPG length was set to 0x12 while it should have been 12 (decimal). This would affect short packet (64B typically) performance since the IPG was bigger than necessary. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3b11775033dc87c3d161996c54507b15ba26414a Author: Eric Dumazet Date: Thu Nov 2 12:30:25 2017 -0700 tcp: do not mangle skb->cb[] in tcp_make_synack() Christoph Paasch sent a patch to address the following issue : tcp_make_synack() is leaving some TCP private info in skb->cb[], then send the packet by other means than tcp_transmit_skb() tcp_transmit_skb() makes sure to clear skb->cb[] to not confuse IPv4/IPV6 stacks, but we have no such cleanup for SYNACK. tcp_make_synack() should not use tcp_init_nondata_skb() : tcp_init_nondata_skb() really should be limited to skbs put in write/rtx queues (the ones that are only sent via tcp_transmit_skb()) This patch fixes the issue and should even save few cpu cycles ;) Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") Signed-off-by: Eric Dumazet Reported-by: Christoph Paasch Reviewed-by: Christoph Paasch Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 25dd169aea6553aea548197a5d4580bbdeda1c85 Author: Florian Westphal Date: Thu Nov 2 16:02:20 2017 +0100 fib: fib_dump_info can no longer use __in_dev_get_rtnl syzbot reported yet another regression added with DOIT_UNLOCKED. When nexthop is marked as dead, fib_dump_info uses __in_dev_get_rtnl(): ./include/linux/inetdevice.h:230 suspicious rcu_dereference_protected() usage! rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz-executor2/23859: #0: (rcu_read_lock){....}, at: [] inet_rtm_getroute+0xaa0/0x2d70 net/ipv4/route.c:2738 [..] lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4665 __in_dev_get_rtnl include/linux/inetdevice.h:230 [inline] fib_dump_info+0x1136/0x13d0 net/ipv4/fib_semantics.c:1377 inet_rtm_getroute+0xf97/0x2d70 net/ipv4/route.c:2785 .. This isn't safe anymore, callers either hold RTNL mutex or rcu read lock, so these spots must use rcu_dereference_rtnl() or plain rcu_derefence() (plus unconditional rcu read lock). This does the latter. Fixes: 394f51abb3d04f ("ipv4: route: set ipv4 RTM_GETROUTE to not use rtnl") Reported-by: syzbot Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e73b49ebd9deeb0ff2cd9ac6fd9c72a433d1e062 Author: Bhadram Varka Date: Thu Nov 2 12:52:13 2017 +0530 stmmac: use of_property_read_u32 instead of read_u8 Numbers in DT are stored in “cells” which are 32-bits in size. of_property_read_u8 does not work properly because of endianness problem. This causes it to always return 0 with little-endian architectures. Fix it by using of_property_read_u32() OF API. Signed-off-by: Bhadram Varka Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 16 ++++++++-------- include/linux/stmmac.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) commit 2f2b1ae24ce69c7cb03f80a2b77dfd3f9d164626 Merge: 74784da ceffcc5 Author: David S. Miller Date: Fri Nov 3 10:30:39 2017 +0900 Merge branch 'net-sched-use-after-free' Cong Wang says: ==================== net_sched: fix a use-after-free for tc actions This patchset fixes a use-after-free reported by Lucas and closes potential races too. Please see each patch for details. ==================== Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit ceffcc5e254b450e6159f173e4538215cebf1b59 Author: Cong Wang Date: Wed Nov 1 10:23:50 2017 -0700 net_sched: hold netns refcnt for each action TC actions have been destroyed asynchronously for a long time, previously in a RCU callback and now in a workqueue. If we don't hold a refcnt for its netns, we could use the per netns data structure, struct tcf_idrinfo, after it has been freed by netns workqueue. Hold refcnt to ensure netns destroy happens after all actions are gone. Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Reported-by: Lucas Bates Tested-by: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 4 +++- net/sched/act_api.c | 2 ++ net/sched/act_bpf.c | 2 +- net/sched/act_connmark.c | 2 +- net/sched/act_csum.c | 2 +- net/sched/act_gact.c | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_ipt.c | 4 ++-- net/sched/act_mirred.c | 2 +- net/sched/act_nat.c | 2 +- net/sched/act_pedit.c | 2 +- net/sched/act_police.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/act_simple.c | 2 +- net/sched/act_skbedit.c | 2 +- net/sched/act_skbmod.c | 2 +- net/sched/act_tunnel_key.c | 2 +- net/sched/act_vlan.c | 2 +- 18 files changed, 22 insertions(+), 18 deletions(-) commit a159d3c4b8291998c018f0dbddd4678315264a1e Author: Cong Wang Date: Wed Nov 1 10:23:49 2017 -0700 net_sched: acquire RTNL in tc_action_net_exit() I forgot to acquire RTNL in tc_action_net_exit() which leads that action ops->cleanup() is not always called with RTNL. This usually is not a big deal because this function is called after all netns refcnt are gone, but given RTNL protects more than just actions, add it for safety and consistency. Also add an assertion to catch other potential bugs. Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Reported-by: Lucas Bates Tested-by: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 2 ++ net/sched/act_api.c | 2 ++ 2 files changed, 4 insertions(+) commit 7ecb37f62fe58e3e4d9b03443b92d213b2c108ce Author: Madhavan Srinivasan Date: Thu Nov 2 17:42:26 2017 +0530 powerpc/perf: Fix core-imc hotplug callback failure during imc initialization Call trace observed during boot: nest_capp0_imc performance monitor hardware support registered nest_capp1_imc performance monitor hardware support registered core_imc memory allocation for cpu 56 failed Unable to handle kernel paging request for data at address 0xffa400010 Faulting instruction address: 0xc000000000bf3294 0:mon> e cpu 0x0: Vector: 300 (Data Access) at [c000000ff38ff8d0] pc: c000000000bf3294: mutex_lock+0x34/0x90 lr: c000000000bf3288: mutex_lock+0x28/0x90 sp: c000000ff38ffb50 msr: 9000000002009033 dar: ffa400010 dsisr: 80000 current = 0xc000000ff383de00 paca = 0xc000000007ae0000 softe: 0 irq_happened: 0x01 pid = 13, comm = cpuhp/0 Linux version 4.11.0-39.el7a.ppc64le (mockbuild@ppc-058.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Oct 3 07:42:44 EDT 2017 0:mon> t [c000000ff38ffb80] c0000000002ddfac perf_pmu_migrate_context+0xac/0x470 [c000000ff38ffc40] c00000000011385c ppc_core_imc_cpu_offline+0x1ac/0x1e0 [c000000ff38ffc90] c000000000125758 cpuhp_invoke_callback+0x198/0x5d0 [c000000ff38ffd00] c00000000012782c cpuhp_thread_fun+0x8c/0x3d0 [c000000ff38ffd60] c0000000001678d0 smpboot_thread_fn+0x290/0x2a0 [c000000ff38ffdc0] c00000000015ee78 kthread+0x168/0x1b0 [c000000ff38ffe30] c00000000000b368 ret_from_kernel_thread+0x5c/0x74 While registering the cpuhoplug callbacks for core-imc, if we fails in the cpuhotplug online path for any random core (either because opal call to initialize the core-imc counters fails or because memory allocation fails for that core), ppc_core_imc_cpu_offline() will get invoked for other cpus who successfully returned from cpuhotplug online path. But in the ppc_core_imc_cpu_offline() path we are trying to migrate the event context, when core-imc counters are not even initialized. Thus creating the above stack dump. Add a check to see if core-imc counters are enabled or not in the cpuhotplug offline path before migrating the context to handle this failing scenario. Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support") Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5cb0512c02ecd7e6214e912e4c150f4219ac78e0 Author: Linus Torvalds Date: Thu Nov 2 14:10:37 2017 -0700 Kbuild: don't pass "-C" to preprocessor when processing linker scripts For some odd historical reason, we preprocessed the linker scripts with "-C", which keeps comments around. That makes no sense, since the comments are not meaningful for the build anyway. And it actually breaks things, since linker scripts can't have C++ style "//" comments in them, so keeping comments after preprocessing now limits us in odd and surprising ways in our header files for no good reason. The -C option goes back to pre-git and pre-bitkeeper times, but seems to have been historically used (along with "-traditional") for some odd-ball architectures (ia64, MIPS and SH). It probably didn't matter back then either, but might possibly have been used to minimize the difference between the original file and the pre-processed result. The reason for this may be lost in time, but let's not perpetuate it only because we can't remember why we did this crazy thing. This was triggered by the recent addition of SPDX lines to the source tree, where people apparently were confused about why header files couldn't use the C++ comment format. Cc: Thomas Gleixner Cc: Greg KH Signed-off-by: Linus Torvalds scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 890da9cf098364b11a7f7f5c22fa652531624d03 Author: Linus Torvalds Date: Thu Nov 2 14:06:32 2017 -0700 Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"" This reverts commit 51204e0639c49ada02fd823782ad673b6326d748. There wasn't really any good reason for it, and people are complaining (rightly) that it broke existing practice. Cc: Len Brown Cc: Thomas Gleixner Cc: Rafael J. Wysocki Signed-off-by: Linus Torvalds arch/x86/kernel/cpu/proc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6daa0839235df0d8933b7d72aee2b956b72d3c1b Merge: ead7515 7a7003b Author: Linus Torvalds Date: Thu Nov 2 12:01:26 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Check addr_limit in arm64 __dump_instr()" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: ensure __dump_instr() checks addr_limit commit 7a7003b1da010d2b0d1dc8bf21c10f5c73b389f1 Author: Mark Rutland Date: Thu Nov 2 16:12:03 2017 +0000 arm64: ensure __dump_instr() checks addr_limit It's possible for a user to deliberately trigger __dump_instr with a chosen kernel address. Let's avoid problems resulting from this by using get_user() rather than __get_user(), ensuring that we don't erroneously access kernel memory. Where we use __dump_instr() on kernel text, we already switch to KERNEL_DS, so this shouldn't adversely affect those cases. Fixes: 60ffc30d5652810d ("arm64: Exception handling") Cc: stable@vger.kernel.org Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b33c87328364e803d74e703d8e47821740dbfa87 Merge: 4191db2 c2385ea Author: Paolo Bonzini Date: Thu Nov 2 18:37:42 2017 +0100 Merge tag 'kvm-arm-fixes-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM Fixes for v4.14 - Fixes a number of issues with saving/restoring the ITS - Fixes a bug in KVM/ARM when branch profiling is enabled in Hyp mode - Fixes an emulation bug for 32-bit guests when injecting aborts - Fixes a failure to check if a kmalloc succeeds in the ITS emulation commit 4191db26b714e077e6faddd82d575ae4a8ae7d63 Author: Jan H. Schönherr Date: Wed Oct 25 16:43:27 2017 +0200 KVM: x86: Update APICv on APIC reset In kvm_apic_set_state() we update the hardware virtualized APIC after the full APIC state has been overwritten. Do the same, when the full APIC state has been reset in kvm_lapic_reset(). This updates some hardware state that was previously forgotten, as far as I can tell. Also, this allows removing some APIC-related reset code from vmx_vcpu_reset(). Signed-off-by: Jan H. Schönherr Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 +++++ arch/x86/kvm/vmx.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit a4888486c5d755118a3c8a30416d7e0febdfb298 Author: Jan H. Schönherr Date: Wed Oct 25 16:43:26 2017 +0200 KVM: VMX: Do not fully reset PI descriptor on vCPU reset Parts of the posted interrupt descriptor configure host behavior, such as the notification vector and destination. Overwriting them with zero as done during vCPU reset breaks posted interrupts. KVM (re-)writes these fields on certain occasions and belatedly fixes the situation in many cases. However, if you have a guest configured with "idle=poll", for example, the fields might stay zero forever. Do not reset the full descriptor in vmx_vcpu_reset(). Instead, reset only the outstanding notifications and leave everything else untouched. Signed-off-by: Jan H. Schönherr Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 008755209ce1ae86c0f562a44810b57d9ea31a71 Author: Jason Gunthorpe Date: Tue Oct 31 14:28:09 2017 -0600 kvm: Return -ENODEV from update_persistent_clock kvm does not support setting the RTC, so the correct result is -ENODEV. Returning -1 will cause sync_cmos_clock to keep trying to set the RTC every second. Signed-off-by: Jason Gunthorpe Signed-off-by: Paolo Bonzini arch/x86/kernel/kvmclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead751507de86d90fa250431e9990a8b881f713c Merge: fdebad1 e2be04c Author: Linus Torvalds Date: Thu Nov 2 10:04:46 2017 -0700 Merge tag 'spdx_identifiers-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull initial SPDX identifiers from Greg KH: "License cleanup: add SPDX license identifiers to some files Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart Reviewed-by: Philippe Ombredanne Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman " * tag 'spdx_identifiers-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: License cleanup: add SPDX license identifier to uapi header files with a license License cleanup: add SPDX license identifier to uapi header files with no license License cleanup: add SPDX GPL-2.0 license identifier to files with no license commit fdebad11e50ea05597af09cfc71f874cba0c3886 Merge: 0f07e10 a323335 Author: Linus Torvalds Date: Thu Nov 2 09:33:23 2017 -0700 Merge tag 'linux-kselftest-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fix from Shuah Khan: "This consists of a single fix to a regression to printing individual test results to the console. An earlier commit changed it to printing just the summary of results, which will negatively impact users that rely on console log to look at the individual test failures. This fix makes it optional to print summary and by default results get printed to the console" * tag 'linux-kselftest-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: lib.mk: print individual test results to console by default commit 0f07e10f8eebfd1081265f869cbb52a9d16e46f0 Merge: 6965f1a a53a0ab Author: Linus Torvalds Date: Thu Nov 2 07:45:48 2017 -0700 Merge tag 'sound-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Unfortunately we still have received a significant amount of changes at the late stage, but at least all are small and clear fixes. There are two fixes for ALSA core stuff, yet another timer race fix and sequencer lockdep annotation fix. Both are spotted by syzkaller, and not too serious but better to paper over quickly. All other commits are about ASoC drivers, most notably, a revert of RT5514 hotword control that was included in 4.14-rc (due to a kind of abuse of kctl TLV ABI), together with topology API fixes and other device-specific small fixes that should go for stable, too" * tag 'sound-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix nested rwsem annotation for lockdep splat ALSA: timer: Add missing mutex lock for compat ioctls ASoC: rt5616: fix 0x91 default value ASoC: rt5659: connect LOUT Amp with Charge Pump ASoC: rt5659: register power bit of LOUT Amp ASoC: rt5663: Change the dev getting function in rt5663_irq ASoC: rt5514: Revert Hotword Model control ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()' ASoC: topology: Fix a potential NULL pointer dereference in 'soc_tplg_dapm_widget_denum_create()' ASoC: rt5514-spi: check irq status to schedule data copy ASoC: adau17x1: Workaround for noise bug in ADC commit 6965f1aa7142a2989733c6ec53cc42ae97fd7f9d Merge: e78c38f6 2eb9eab Author: Linus Torvalds Date: Thu Nov 2 07:43:40 2017 -0700 Merge branch 'fixes-v4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling fixes from James Morris: "Fixes for the Keys subsystem by Eric Biggers" * 'fixes-v4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: fix out-of-bounds read during ASN.1 parsing KEYS: trusted: fix writing past end of buffer in trusted_read() KEYS: return full count in keyring_read() if buffer is too small commit e78c38f6bdd900b2ad9ac9df8eff58b745dc5b3c Author: Jiri Slaby Date: Mon Oct 23 13:41:51 2017 +0200 futex: futex_wake_op, do not fail on invalid op In commit 30d6e0a4190d ("futex: Remove duplicated code and fix undefined behaviour"), I let FUTEX_WAKE_OP to fail on invalid op. Namely when op should be considered as shift and the shift is out of range (< 0 or > 31). But strace's test suite does this madness: futex(0x7fabd78bcffc, 0x5, 0xfacefeed, 0xb, 0x7fabd78bcffc, 0xa0caffee); futex(0x7fabd78bcffc, 0x5, 0xfacefeed, 0xb, 0x7fabd78bcffc, 0xbadfaced); futex(0x7fabd78bcffc, 0x5, 0xfacefeed, 0xb, 0x7fabd78bcffc, 0xffffffff); When I pick the first 0xa0caffee, it decodes as: 0x80000000 & 0xa0caffee: oparg is shift 0x70000000 & 0xa0caffee: op is FUTEX_OP_OR 0x0f000000 & 0xa0caffee: cmp is FUTEX_OP_CMP_EQ 0x00fff000 & 0xa0caffee: oparg is sign-extended 0xcaf = -849 0x00000fff & 0xa0caffee: cmparg is sign-extended 0xfee = -18 That means the op tries to do this: (futex |= (1 << (-849))) == -18 which is completely bogus. The new check of op in the code is: if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) { if (oparg < 0 || oparg > 31) return -EINVAL; oparg = 1 << oparg; } which results obviously in the "Invalid argument" errno: FAIL: futex =========== futex(0x7fabd78bcffc, 0x5, 0xfacefeed, 0xb, 0x7fabd78bcffc, 0xa0caffee) = -1: Invalid argument futex.test: failed test: ../futex failed with code 1 So let us soften the failure to print only a (ratelimited) message, crop the value and continue as if it were right. When userspace keeps up, we can switch this to return -EINVAL again. [v2] Do not return 0 immediatelly, proceed with the cropped value. 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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ca208b5f19cb2a298804d0c17ac5a9bf194f0b28 Author: Marcin Nowakowski Date: Thu Nov 2 11:45:11 2017 +0100 MIPS: Update email address for Marcin Nowakowski MIPS is no longer part of Imagination Technologies and my @imgtec.com address will soon stop working. Update any files containing my address as well as the .mailmap to point to my new @mips.com address. Signed-off-by: Marcin Nowakowski Patchwork: https://patchwork.linux-mips.org/patch/17579/ Signed-off-by: James Hogan .mailmap | 1 + arch/mips/generic/kexec.c | 2 +- arch/mips/kernel/probes-common.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit cb79a180f2e7eb51de5a4848652893197637bccb Author: Florian Westphal Date: Wed Nov 1 20:30:49 2017 +0100 xfrm: defer daddr pointer assignment after spi parsing syzbot reports: BUG: KASAN: use-after-free in __xfrm_state_lookup+0x695/0x6b0 Read of size 4 at addr ffff8801d434e538 by task syzkaller647520/2991 [..] __xfrm_state_lookup+0x695/0x6b0 net/xfrm/xfrm_state.c:833 xfrm_state_lookup+0x8a/0x160 net/xfrm/xfrm_state.c:1592 xfrm_input+0x8e5/0x22f0 net/xfrm/xfrm_input.c:302 The use-after-free is the ipv4 destination address, which points to an skb head area that has been reallocated: pskb_expand_head+0x36b/0x1210 net/core/skbuff.c:1494 __pskb_pull_tail+0x14a/0x17c0 net/core/skbuff.c:1877 pskb_may_pull include/linux/skbuff.h:2102 [inline] xfrm_parse_spi+0x3d3/0x4d0 net/xfrm/xfrm_input.c:170 xfrm_input+0xce2/0x22f0 net/xfrm/xfrm_input.c:291 so the real bug is that xfrm_parse_spi() uses pskb_may_pull, but for now do smaller workaround that makes xfrm_input fetch daddr after spi parsing. Reported-by: syzbot Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2be04c7f9958dde770eeb8b30e829ca969b37bb Author: Greg Kroah-Hartman Date: Wed Nov 1 15:09:13 2017 +0100 License cleanup: add SPDX license identifier to uapi header files with a license Many user space API headers have licensing information, which is either incomplete, badly formatted or just a shorthand for referring to the license under which the file is supposed to be. This makes it hard for compliance tools to determine the correct license. Update these files with an SPDX license identifier. The identifier was chosen based on the license information in the file. GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license identifier with the added 'WITH Linux-syscall-note' exception, which is the officially assigned exception identifier for the kernel syscall exception: NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". This exception makes it possible to include GPL headers into non GPL code, without confusing license compliance tools. Headers which have either explicit dual licensing or are just licensed under a non GPL license are updated with the corresponding SPDX identifier and the GPLv2 with syscall exception identifier. The format is: ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE) SPDX license identifiers are a legally binding shorthand, which can be used instead of the full boiler plate text. The update does not remove existing license information as this has to be done on a case by case basis and the copyright holders might have to be consulted. This will happen in a separate step. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. See the previous patch in this series for the methodology of how this patch was researched. Reviewed-by: Kate Stewart Reviewed-by: Philippe Ombredanne Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/alpha/include/uapi/asm/poll.h | 1 + arch/arc/include/uapi/asm/byteorder.h | 1 + arch/arc/include/uapi/asm/cachectl.h | 1 + arch/arc/include/uapi/asm/elf.h | 1 + arch/arc/include/uapi/asm/page.h | 1 + arch/arc/include/uapi/asm/ptrace.h | 1 + arch/arc/include/uapi/asm/sigcontext.h | 1 + arch/arc/include/uapi/asm/signal.h | 1 + arch/arc/include/uapi/asm/swab.h | 1 + arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/include/uapi/asm/posix_types.h | 1 + arch/arm/include/uapi/asm/ptrace.h | 1 + arch/arm/include/uapi/asm/setup.h | 1 + arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/auxvec.h | 1 + arch/arm64/include/uapi/asm/bitsperlong.h | 1 + arch/arm64/include/uapi/asm/byteorder.h | 1 + arch/arm64/include/uapi/asm/fcntl.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/kvm.h | 1 + arch/arm64/include/uapi/asm/param.h | 1 + arch/arm64/include/uapi/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/setup.h | 1 + arch/arm64/include/uapi/asm/sigcontext.h | 1 + arch/arm64/include/uapi/asm/siginfo.h | 1 + arch/arm64/include/uapi/asm/signal.h | 1 + arch/arm64/include/uapi/asm/stat.h | 1 + arch/arm64/include/uapi/asm/statfs.h | 1 + arch/arm64/include/uapi/asm/ucontext.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/blackfin/include/uapi/asm/bfin_sport.h | 1 + arch/blackfin/include/uapi/asm/cachectl.h | 1 + arch/blackfin/include/uapi/asm/fcntl.h | 1 + arch/blackfin/include/uapi/asm/fixed_code.h | 1 + arch/blackfin/include/uapi/asm/poll.h | 1 + arch/blackfin/include/uapi/asm/posix_types.h | 1 + arch/blackfin/include/uapi/asm/ptrace.h | 1 + arch/blackfin/include/uapi/asm/sigcontext.h | 1 + arch/blackfin/include/uapi/asm/siginfo.h | 1 + arch/blackfin/include/uapi/asm/stat.h | 1 + arch/blackfin/include/uapi/asm/swab.h | 1 + arch/blackfin/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/ptrace.h | 1 + arch/c6x/include/uapi/asm/sigcontext.h | 1 + arch/c6x/include/uapi/asm/swab.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/frv/include/uapi/asm/ipcbuf.h | 1 + arch/frv/include/uapi/asm/ptrace.h | 1 + arch/frv/include/uapi/asm/registers.h | 1 + arch/frv/include/uapi/asm/setup.h | 1 + arch/frv/include/uapi/asm/sigcontext.h | 1 + arch/frv/include/uapi/asm/types.h | 1 + arch/hexagon/include/uapi/asm/bitsperlong.h | 1 + arch/hexagon/include/uapi/asm/byteorder.h | 1 + arch/hexagon/include/uapi/asm/param.h | 1 + arch/hexagon/include/uapi/asm/ptrace.h | 1 + arch/hexagon/include/uapi/asm/setup.h | 1 + arch/hexagon/include/uapi/asm/sigcontext.h | 1 + arch/hexagon/include/uapi/asm/signal.h | 1 + arch/hexagon/include/uapi/asm/swab.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/ia64/include/uapi/asm/poll.h | 1 + arch/m32r/include/uapi/asm/ptrace.h | 1 + arch/m68k/include/uapi/asm/bootinfo.h | 1 + arch/m68k/include/uapi/asm/setup.h | 1 + arch/metag/include/uapi/asm/unistd.h | 1 + arch/microblaze/include/uapi/asm/elf.h | 1 + arch/microblaze/include/uapi/asm/ptrace.h | 1 + arch/microblaze/include/uapi/asm/setup.h | 1 + arch/microblaze/include/uapi/asm/sigcontext.h | 1 + arch/microblaze/include/uapi/asm/unistd.h | 1 + arch/mips/include/uapi/asm/auxvec.h | 1 + arch/mips/include/uapi/asm/bitfield.h | 1 + arch/mips/include/uapi/asm/break.h | 1 + arch/mips/include/uapi/asm/byteorder.h | 1 + arch/mips/include/uapi/asm/cachectl.h | 1 + arch/mips/include/uapi/asm/errno.h | 1 + arch/mips/include/uapi/asm/fcntl.h | 1 + arch/mips/include/uapi/asm/inst.h | 1 + arch/mips/include/uapi/asm/ioctl.h | 1 + arch/mips/include/uapi/asm/ioctls.h | 1 + arch/mips/include/uapi/asm/kvm.h | 1 + arch/mips/include/uapi/asm/mman.h | 1 + arch/mips/include/uapi/asm/param.h | 1 + arch/mips/include/uapi/asm/posix_types.h | 1 + arch/mips/include/uapi/asm/ptrace.h | 1 + arch/mips/include/uapi/asm/reg.h | 1 + arch/mips/include/uapi/asm/resource.h | 1 + arch/mips/include/uapi/asm/sgidefs.h | 1 + arch/mips/include/uapi/asm/sigcontext.h | 1 + arch/mips/include/uapi/asm/siginfo.h | 1 + arch/mips/include/uapi/asm/signal.h | 1 + arch/mips/include/uapi/asm/socket.h | 1 + arch/mips/include/uapi/asm/sockios.h | 1 + arch/mips/include/uapi/asm/stat.h | 1 + arch/mips/include/uapi/asm/statfs.h | 1 + arch/mips/include/uapi/asm/swab.h | 1 + arch/mips/include/uapi/asm/sysmips.h | 1 + arch/mips/include/uapi/asm/termbits.h | 1 + arch/mips/include/uapi/asm/termios.h | 1 + arch/mips/include/uapi/asm/types.h | 1 + arch/mips/include/uapi/asm/unistd.h | 1 + arch/mn10300/include/uapi/asm/ioctl.h | 1 + arch/mn10300/include/uapi/asm/param.h | 1 + arch/mn10300/include/uapi/asm/posix_types.h | 1 + arch/mn10300/include/uapi/asm/ptrace.h | 1 + arch/mn10300/include/uapi/asm/sigcontext.h | 1 + arch/mn10300/include/uapi/asm/signal.h | 1 + arch/mn10300/include/uapi/asm/swab.h | 1 + arch/mn10300/include/uapi/asm/types.h | 1 + arch/mn10300/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/byteorder.h | 1 + arch/nios2/include/uapi/asm/elf.h | 1 + arch/nios2/include/uapi/asm/ptrace.h | 1 + arch/nios2/include/uapi/asm/sigcontext.h | 1 + arch/nios2/include/uapi/asm/signal.h | 1 + arch/nios2/include/uapi/asm/swab.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/elf.h | 1 + arch/openrisc/include/uapi/asm/param.h | 1 + arch/openrisc/include/uapi/asm/ptrace.h | 1 + arch/openrisc/include/uapi/asm/sigcontext.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/parisc/include/uapi/asm/ioctl.h | 1 + arch/powerpc/include/uapi/asm/byteorder.h | 1 + arch/powerpc/include/uapi/asm/eeh.h | 1 + arch/powerpc/include/uapi/asm/elf.h | 1 + arch/powerpc/include/uapi/asm/epapr_hcalls.h | 1 + arch/powerpc/include/uapi/asm/ipcbuf.h | 1 + arch/powerpc/include/uapi/asm/kvm.h | 1 + arch/powerpc/include/uapi/asm/kvm_para.h | 1 + arch/powerpc/include/uapi/asm/mman.h | 1 + arch/powerpc/include/uapi/asm/nvram.h | 1 + arch/powerpc/include/uapi/asm/opal-prd.h | 1 + arch/powerpc/include/uapi/asm/perf_event.h | 1 + arch/powerpc/include/uapi/asm/ps3fb.h | 1 + arch/powerpc/include/uapi/asm/ptrace.h | 1 + arch/powerpc/include/uapi/asm/sembuf.h | 1 + arch/powerpc/include/uapi/asm/shmbuf.h | 1 + arch/powerpc/include/uapi/asm/sigcontext.h | 1 + arch/powerpc/include/uapi/asm/siginfo.h | 1 + arch/powerpc/include/uapi/asm/socket.h | 1 + arch/powerpc/include/uapi/asm/spu_info.h | 1 + arch/powerpc/include/uapi/asm/stat.h | 1 + arch/powerpc/include/uapi/asm/swab.h | 1 + arch/powerpc/include/uapi/asm/termbits.h | 1 + arch/powerpc/include/uapi/asm/termios.h | 1 + arch/powerpc/include/uapi/asm/types.h | 1 + arch/powerpc/include/uapi/asm/unistd.h | 1 + arch/s390/include/uapi/asm/kvm.h | 1 + arch/s390/include/uapi/asm/kvm_para.h | 1 + arch/s390/include/uapi/asm/kvm_perf.h | 1 + arch/s390/include/uapi/asm/kvm_virtio.h | 1 + arch/s390/include/uapi/asm/virtio-ccw.h | 1 + arch/s390/include/uapi/asm/zcrypt.h | 1 + arch/sh/include/uapi/asm/unistd_64.h | 1 + arch/tile/include/uapi/arch/abi.h | 1 + arch/tile/include/uapi/arch/chip.h | 1 + arch/tile/include/uapi/arch/chip_tilegx.h | 1 + arch/tile/include/uapi/arch/chip_tilepro.h | 1 + arch/tile/include/uapi/arch/icache.h | 1 + arch/tile/include/uapi/arch/interrupts.h | 1 + arch/tile/include/uapi/arch/interrupts_32.h | 1 + arch/tile/include/uapi/arch/interrupts_64.h | 1 + arch/tile/include/uapi/arch/intreg.h | 1 + arch/tile/include/uapi/arch/opcode.h | 1 + arch/tile/include/uapi/arch/opcode_tilegx.h | 1 + arch/tile/include/uapi/arch/opcode_tilepro.h | 1 + arch/tile/include/uapi/arch/sim.h | 1 + arch/tile/include/uapi/arch/sim_def.h | 1 + arch/tile/include/uapi/arch/spr_def.h | 1 + arch/tile/include/uapi/arch/spr_def_32.h | 1 + arch/tile/include/uapi/arch/spr_def_64.h | 1 + arch/tile/include/uapi/asm/auxvec.h | 1 + arch/tile/include/uapi/asm/bitsperlong.h | 1 + arch/tile/include/uapi/asm/byteorder.h | 1 + arch/tile/include/uapi/asm/cachectl.h | 1 + arch/tile/include/uapi/asm/hardwall.h | 1 + arch/tile/include/uapi/asm/mman.h | 1 + arch/tile/include/uapi/asm/ptrace.h | 1 + arch/tile/include/uapi/asm/setup.h | 1 + arch/tile/include/uapi/asm/sigcontext.h | 1 + arch/tile/include/uapi/asm/siginfo.h | 1 + arch/tile/include/uapi/asm/signal.h | 1 + arch/tile/include/uapi/asm/swab.h | 1 + arch/tile/include/uapi/asm/unistd.h | 1 + arch/unicore32/include/uapi/asm/byteorder.h | 1 + arch/unicore32/include/uapi/asm/ptrace.h | 1 + arch/unicore32/include/uapi/asm/sigcontext.h | 1 + arch/unicore32/include/uapi/asm/unistd.h | 1 + arch/x86/include/uapi/asm/ist.h | 1 + arch/x86/include/uapi/asm/mtrr.h | 1 + arch/x86/include/uapi/asm/vmx.h | 1 + arch/xtensa/include/uapi/asm/ioctls.h | 1 + arch/xtensa/include/uapi/asm/ipcbuf.h | 1 + arch/xtensa/include/uapi/asm/mman.h | 1 + arch/xtensa/include/uapi/asm/msgbuf.h | 1 + arch/xtensa/include/uapi/asm/param.h | 1 + arch/xtensa/include/uapi/asm/poll.h | 1 + arch/xtensa/include/uapi/asm/posix_types.h | 1 + arch/xtensa/include/uapi/asm/ptrace.h | 1 + arch/xtensa/include/uapi/asm/sembuf.h | 1 + arch/xtensa/include/uapi/asm/setup.h | 1 + arch/xtensa/include/uapi/asm/shmbuf.h | 1 + arch/xtensa/include/uapi/asm/sigcontext.h | 1 + arch/xtensa/include/uapi/asm/signal.h | 1 + arch/xtensa/include/uapi/asm/socket.h | 1 + arch/xtensa/include/uapi/asm/sockios.h | 1 + arch/xtensa/include/uapi/asm/stat.h | 1 + arch/xtensa/include/uapi/asm/swab.h | 1 + arch/xtensa/include/uapi/asm/termbits.h | 1 + arch/xtensa/include/uapi/asm/types.h | 1 + include/uapi/drm/armada_drm.h | 1 + include/uapi/drm/etnaviv_drm.h | 1 + include/uapi/drm/exynos_drm.h | 1 + include/uapi/drm/omap_drm.h | 1 + include/uapi/linux/am437x-vpfe.h | 1 + include/uapi/linux/android/binder.h | 1 + include/uapi/linux/apm_bios.h | 1 + include/uapi/linux/aspeed-lpc-ctrl.h | 1 + include/uapi/linux/audit.h | 1 + include/uapi/linux/auto_dev-ioctl.h | 1 + include/uapi/linux/auto_fs.h | 1 + include/uapi/linux/auto_fs4.h | 1 + include/uapi/linux/b1lli.h | 1 + include/uapi/linux/blkzoned.h | 1 + include/uapi/linux/bpf.h | 1 + include/uapi/linux/bpf_perf_event.h | 1 + include/uapi/linux/bt-bmc.h | 1 + include/uapi/linux/btrfs.h | 1 + include/uapi/linux/caif/caif_socket.h | 1 + include/uapi/linux/caif/if_caif.h | 1 + include/uapi/linux/can.h | 1 + include/uapi/linux/can/bcm.h | 1 + include/uapi/linux/can/error.h | 1 + include/uapi/linux/can/gw.h | 1 + include/uapi/linux/can/netlink.h | 1 + include/uapi/linux/can/raw.h | 1 + include/uapi/linux/capi.h | 1 + include/uapi/linux/cec-funcs.h | 1 + include/uapi/linux/cec.h | 1 + include/uapi/linux/cgroupstats.h | 1 + include/uapi/linux/cifs/cifs_mount.h | 1 + include/uapi/linux/cn_proc.h | 1 + include/uapi/linux/coff.h | 1 + include/uapi/linux/connector.h | 1 + include/uapi/linux/cryptouser.h | 1 + include/uapi/linux/cycx_cfm.h | 1 + include/uapi/linux/dcbnl.h | 1 + include/uapi/linux/devlink.h | 1 + include/uapi/linux/dlm.h | 1 + include/uapi/linux/dlm_device.h | 1 + include/uapi/linux/dlm_netlink.h | 1 + include/uapi/linux/dlm_plock.h | 1 + include/uapi/linux/dlmconstants.h | 1 + include/uapi/linux/dm-ioctl.h | 1 + include/uapi/linux/dm-log-userspace.h | 1 + include/uapi/linux/dma-buf.h | 1 + include/uapi/linux/dqblk_xfs.h | 1 + include/uapi/linux/dvb/audio.h | 1 + include/uapi/linux/dvb/ca.h | 1 + include/uapi/linux/dvb/dmx.h | 1 + include/uapi/linux/dvb/frontend.h | 1 + include/uapi/linux/dvb/net.h | 1 + include/uapi/linux/dvb/osd.h | 1 + include/uapi/linux/dvb/version.h | 1 + include/uapi/linux/dvb/video.h | 1 + include/uapi/linux/edd.h | 1 + include/uapi/linux/elf-fdpic.h | 1 + include/uapi/linux/eventpoll.h | 1 + include/uapi/linux/fsl_hypervisor.h | 1 + include/uapi/linux/fuse.h | 1 + include/uapi/linux/gameport.h | 1 + include/uapi/linux/genwqe/genwqe_card.h | 1 + include/uapi/linux/gfs2_ondisk.h | 1 + include/uapi/linux/gigaset_dev.h | 1 + include/uapi/linux/gpio.h | 1 + include/uapi/linux/hash_info.h | 1 + include/uapi/linux/hdlc.h | 1 + include/uapi/linux/hid.h | 1 + include/uapi/linux/hiddev.h | 1 + include/uapi/linux/hidraw.h | 1 + include/uapi/linux/hsi/cs-protocol.h | 1 + include/uapi/linux/hsi/hsi_char.h | 1 + include/uapi/linux/hsr_netlink.h | 1 + include/uapi/linux/hyperv.h | 1 + include/uapi/linux/hysdn_if.h | 1 + include/uapi/linux/i2c-dev.h | 1 + include/uapi/linux/i2c.h | 1 + include/uapi/linux/i2o-dev.h | 1 + include/uapi/linux/i8k.h | 1 + include/uapi/linux/icmp.h | 1 + include/uapi/linux/if.h | 1 + include/uapi/linux/if_alg.h | 1 + include/uapi/linux/if_arcnet.h | 1 + include/uapi/linux/if_arp.h | 1 + include/uapi/linux/if_bonding.h | 1 + include/uapi/linux/if_bridge.h | 1 + include/uapi/linux/if_cablemodem.h | 1 + include/uapi/linux/if_eql.h | 1 + include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_fc.h | 1 + include/uapi/linux/if_fddi.h | 1 + include/uapi/linux/if_frad.h | 1 + include/uapi/linux/if_hippi.h | 1 + include/uapi/linux/if_infiniband.h | 1 + include/uapi/linux/if_macsec.h | 1 + include/uapi/linux/if_plip.h | 1 + include/uapi/linux/if_pppol2tp.h | 1 + include/uapi/linux/if_pppox.h | 1 + include/uapi/linux/if_team.h | 1 + include/uapi/linux/if_tun.h | 1 + include/uapi/linux/if_vlan.h | 1 + include/uapi/linux/if_x25.h | 1 + include/uapi/linux/igmp.h | 1 + include/uapi/linux/iio/events.h | 1 + include/uapi/linux/iio/types.h | 1 + include/uapi/linux/in.h | 1 + include/uapi/linux/in6.h | 1 + include/uapi/linux/input-event-codes.h | 1 + include/uapi/linux/input.h | 1 + include/uapi/linux/ip.h | 1 + include/uapi/linux/ipmi.h | 1 + include/uapi/linux/ipmi_msgdefs.h | 1 + include/uapi/linux/ipv6_route.h | 1 + include/uapi/linux/irda.h | 1 + include/uapi/linux/isdn.h | 1 + include/uapi/linux/isdn/capicmd.h | 1 + include/uapi/linux/isdn_divertif.h | 1 + include/uapi/linux/isdn_ppp.h | 1 + include/uapi/linux/isdnif.h | 1 + include/uapi/linux/ivtv.h | 1 + include/uapi/linux/ivtvfb.h | 1 + include/uapi/linux/ixjuser.h | 1 + include/uapi/linux/joystick.h | 1 + include/uapi/linux/kcm.h | 1 + include/uapi/linux/keyctl.h | 1 + include/uapi/linux/lightnvm.h | 1 + include/uapi/linux/llc.h | 1 + include/uapi/linux/loop.h | 1 + include/uapi/linux/map_to_7segment.h | 1 + include/uapi/linux/max2175.h | 1 + include/uapi/linux/mdio.h | 1 + include/uapi/linux/media-bus-format.h | 1 + include/uapi/linux/media.h | 1 + include/uapi/linux/mei.h | 1 + include/uapi/linux/meye.h | 1 + include/uapi/linux/mic_common.h | 1 + include/uapi/linux/mic_ioctl.h | 1 + include/uapi/linux/mmtimer.h | 1 + include/uapi/linux/mpls_iptunnel.h | 1 + include/uapi/linux/mqueue.h | 1 + include/uapi/linux/n_r3964.h | 1 + include/uapi/linux/nbd-netlink.h | 1 + include/uapi/linux/nbd.h | 1 + include/uapi/linux/net.h | 1 + include/uapi/linux/net_namespace.h | 1 + include/uapi/linux/netdevice.h | 1 + include/uapi/linux/netfilter/ipset/ip_set.h | 1 + include/uapi/linux/netfilter/xt_AUDIT.h | 1 + include/uapi/linux/netfilter/xt_CHECKSUM.h | 1 + include/uapi/linux/netfilter/xt_DSCP.h | 1 + include/uapi/linux/netfilter/xt_IDLETIMER.h | 1 + include/uapi/linux/netfilter/xt_NFQUEUE.h | 1 + include/uapi/linux/netfilter/xt_connmark.h | 1 + include/uapi/linux/netfilter/xt_conntrack.h | 1 + include/uapi/linux/netfilter/xt_dscp.h | 1 + include/uapi/linux/netfilter/xt_ecn.h | 1 + include/uapi/linux/netfilter/xt_osf.h | 1 + include/uapi/linux/netfilter_arp.h | 1 + include/uapi/linux/netfilter_decnet.h | 1 + include/uapi/linux/netfilter_ipv4.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_ECN.h | 1 + include/uapi/linux/netfilter_ipv6.h | 1 + include/uapi/linux/nfsd/cld.h | 1 + include/uapi/linux/nilfs2_api.h | 1 + include/uapi/linux/nilfs2_ondisk.h | 1 + include/uapi/linux/nvme_ioctl.h | 1 + include/uapi/linux/omap3isp.h | 1 + include/uapi/linux/omapfb.h | 1 + include/uapi/linux/openvswitch.h | 1 + include/uapi/linux/perf_event.h | 1 + include/uapi/linux/pg.h | 1 + include/uapi/linux/phantom.h | 1 + include/uapi/linux/phonet.h | 1 + include/uapi/linux/pktcdvd.h | 1 + include/uapi/linux/posix_acl.h | 1 + include/uapi/linux/posix_acl_xattr.h | 1 + include/uapi/linux/ppdev.h | 1 + include/uapi/linux/ppp-comp.h | 1 + include/uapi/linux/ppp-ioctl.h | 1 + include/uapi/linux/ppp_defs.h | 1 + include/uapi/linux/pps.h | 1 + include/uapi/linux/ptp_clock.h | 1 + include/uapi/linux/raid/md_p.h | 1 + include/uapi/linux/raid/md_u.h | 1 + include/uapi/linux/rds.h | 1 + include/uapi/linux/rio_cm_cdev.h | 1 + include/uapi/linux/rio_mport_cdev.h | 1 + include/uapi/linux/route.h | 1 + include/uapi/linux/rpmsg.h | 1 + include/uapi/linux/scif_ioctl.h | 1 + include/uapi/linux/sctp.h | 1 + include/uapi/linux/sdla.h | 1 + include/uapi/linux/sed-opal.h | 1 + include/uapi/linux/seg6.h | 1 + include/uapi/linux/seg6_iptunnel.h | 1 + include/uapi/linux/selinux_netlink.h | 1 + include/uapi/linux/serial.h | 1 + include/uapi/linux/serial_core.h | 1 + include/uapi/linux/serial_reg.h | 1 + include/uapi/linux/serio.h | 1 + include/uapi/linux/smiapp.h | 1 + include/uapi/linux/sockios.h | 1 + include/uapi/linux/sonypi.h | 1 + include/uapi/linux/spi/spidev.h | 1 + include/uapi/linux/stm.h | 1 + include/uapi/linux/switchtec_ioctl.h | 1 + include/uapi/linux/sync_file.h | 1 + include/uapi/linux/synclink.h | 1 + include/uapi/linux/taskstats.h | 1 + include/uapi/linux/tc_act/tc_bpf.h | 1 + include/uapi/linux/tc_act/tc_skbedit.h | 1 + include/uapi/linux/tc_act/tc_skbmod.h | 1 + include/uapi/linux/tc_act/tc_tunnel_key.h | 1 + include/uapi/linux/tc_act/tc_vlan.h | 1 + include/uapi/linux/tcp.h | 1 + include/uapi/linux/telephony.h | 1 + include/uapi/linux/tipc.h | 1 + include/uapi/linux/tipc_config.h | 1 + include/uapi/linux/tipc_netlink.h | 1 + include/uapi/linux/tls.h | 1 + include/uapi/linux/toshiba.h | 1 + include/uapi/linux/udf_fs_i.h | 1 + include/uapi/linux/udp.h | 1 + include/uapi/linux/uhid.h | 1 + include/uapi/linux/uinput.h | 1 + include/uapi/linux/uio.h | 1 + include/uapi/linux/uleds.h | 1 + include/uapi/linux/ultrasound.h | 1 + include/uapi/linux/usb/audio.h | 1 + include/uapi/linux/usb/cdc-wdm.h | 1 + include/uapi/linux/usb/g_printer.h | 1 + include/uapi/linux/usb/midi.h | 1 + include/uapi/linux/usbdevice_fs.h | 1 + include/uapi/linux/userio.h | 1 + include/uapi/linux/uuid.h | 1 + include/uapi/linux/v4l2-common.h | 1 + include/uapi/linux/v4l2-controls.h | 1 + include/uapi/linux/v4l2-dv-timings.h | 1 + include/uapi/linux/v4l2-mediabus.h | 1 + include/uapi/linux/v4l2-subdev.h | 1 + include/uapi/linux/vfio.h | 1 + include/uapi/linux/videodev2.h | 1 + include/uapi/linux/vm_sockets.h | 1 + include/uapi/linux/vtpm_proxy.h | 1 + include/uapi/linux/xilinx-v4l2-controls.h | 1 + include/uapi/linux/zorro.h | 1 + include/uapi/misc/cxl.h | 1 + include/uapi/mtd/mtd-abi.h | 1 + include/uapi/mtd/mtd-user.h | 1 + include/uapi/mtd/nftl-user.h | 1 + include/uapi/mtd/ubi-user.h | 1 + include/uapi/rdma/bnxt_re-abi.h | 1 + include/uapi/rdma/cxgb3-abi.h | 1 + include/uapi/rdma/cxgb4-abi.h | 1 + include/uapi/rdma/hfi/hfi1_ioctl.h | 1 + include/uapi/rdma/hfi/hfi1_user.h | 1 + include/uapi/rdma/hns-abi.h | 1 + include/uapi/rdma/ib_user_cm.h | 1 + include/uapi/rdma/ib_user_mad.h | 1 + include/uapi/rdma/ib_user_sa.h | 1 + include/uapi/rdma/ib_user_verbs.h | 1 + include/uapi/rdma/mlx4-abi.h | 1 + include/uapi/rdma/mlx5-abi.h | 1 + include/uapi/rdma/mthca-abi.h | 1 + include/uapi/rdma/nes-abi.h | 1 + include/uapi/rdma/ocrdma-abi.h | 1 + include/uapi/rdma/qedr-abi.h | 1 + include/uapi/rdma/rdma_user_cm.h | 1 + include/uapi/rdma/rdma_user_ioctl.h | 1 + include/uapi/rdma/rdma_user_rxe.h | 1 + include/uapi/rdma/vmw_pvrdma-abi.h | 1 + include/uapi/scsi/cxlflash_ioctl.h | 1 + include/uapi/scsi/fc/fc_els.h | 1 + include/uapi/scsi/fc/fc_fs.h | 1 + include/uapi/scsi/fc/fc_gs.h | 1 + include/uapi/scsi/fc/fc_ns.h | 1 + include/uapi/scsi/scsi_bsg_fc.h | 1 + include/uapi/scsi/scsi_netlink.h | 1 + include/uapi/scsi/scsi_netlink_fc.h | 1 + include/uapi/sound/asequencer.h | 1 + include/uapi/sound/asoc.h | 1 + include/uapi/sound/asound.h | 1 + include/uapi/sound/asound_fm.h | 1 + include/uapi/sound/compress_offload.h | 1 + include/uapi/sound/compress_params.h | 1 + include/uapi/sound/emu10k1.h | 1 + include/uapi/sound/hdsp.h | 1 + include/uapi/sound/hdspm.h | 1 + include/uapi/sound/sb16_csp.h | 1 + include/uapi/sound/sfnt_info.h | 1 + include/uapi/sound/snd_sst_tokens.h | 1 + include/uapi/sound/tlv.h | 1 + include/uapi/sound/usb_stream.h | 1 + include/uapi/video/sisfb.h | 1 + include/uapi/xen/evtchn.h | 1 + include/uapi/xen/gntdev.h | 1 + include/uapi/xen/privcmd.h | 1 + tools/arch/arm/include/uapi/asm/kvm.h | 1 + tools/arch/arm64/include/uapi/asm/bitsperlong.h | 1 + tools/arch/arm64/include/uapi/asm/kvm.h | 1 + tools/arch/hexagon/include/uapi/asm/bitsperlong.h | 1 + tools/arch/mips/include/uapi/asm/bitsperlong.h | 1 + tools/arch/mips/include/uapi/asm/kvm.h | 1 + tools/arch/powerpc/include/uapi/asm/kvm.h | 1 + tools/arch/s390/include/uapi/asm/kvm.h | 1 + tools/arch/s390/include/uapi/asm/kvm_perf.h | 1 + tools/arch/tile/include/uapi/asm/bitsperlong.h | 1 + tools/arch/x86/include/uapi/asm/svm.h | 1 + tools/arch/x86/include/uapi/asm/vmx.h | 1 + 522 files changed, 522 insertions(+) commit 6f52b16c5b29b89d92c0e7236f4655dc8491ad70 Author: Greg Kroah-Hartman Date: Wed Nov 1 15:08:43 2017 +0100 License cleanup: add SPDX license identifier to uapi header files with no license Many user space API headers are missing licensing information, which makes it hard for compliance tools to determine the correct license. By default are files without license information under the default license of the kernel, which is GPLV2. Marking them GPLV2 would exclude them from being included in non GPLV2 code, which is obviously not intended. The user space API headers fall under the syscall exception which is in the kernels COPYING file: NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". otherwise syscall usage would not be possible. Update the files which contain no license information with an SPDX license identifier. The chosen identifier is 'GPL-2.0 WITH Linux-syscall-note' which is the officially assigned identifier for the Linux syscall exception. SPDX license identifiers are a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. See the previous patch in this series for the methodology of how this patch was researched. Reviewed-by: Kate Stewart Reviewed-by: Philippe Ombredanne Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/alpha/include/uapi/asm/a.out.h | 1 + arch/alpha/include/uapi/asm/auxvec.h | 1 + arch/alpha/include/uapi/asm/bitsperlong.h | 1 + arch/alpha/include/uapi/asm/byteorder.h | 1 + arch/alpha/include/uapi/asm/compiler.h | 1 + arch/alpha/include/uapi/asm/console.h | 1 + arch/alpha/include/uapi/asm/errno.h | 1 + arch/alpha/include/uapi/asm/fcntl.h | 1 + arch/alpha/include/uapi/asm/fpu.h | 1 + arch/alpha/include/uapi/asm/gentrap.h | 1 + arch/alpha/include/uapi/asm/ioctl.h | 1 + arch/alpha/include/uapi/asm/ioctls.h | 1 + arch/alpha/include/uapi/asm/ipcbuf.h | 1 + arch/alpha/include/uapi/asm/kvm_para.h | 1 + arch/alpha/include/uapi/asm/mman.h | 1 + arch/alpha/include/uapi/asm/msgbuf.h | 1 + arch/alpha/include/uapi/asm/pal.h | 1 + arch/alpha/include/uapi/asm/param.h | 1 + arch/alpha/include/uapi/asm/posix_types.h | 1 + arch/alpha/include/uapi/asm/ptrace.h | 1 + arch/alpha/include/uapi/asm/reg.h | 1 + arch/alpha/include/uapi/asm/regdef.h | 1 + arch/alpha/include/uapi/asm/resource.h | 1 + arch/alpha/include/uapi/asm/sembuf.h | 1 + arch/alpha/include/uapi/asm/setup.h | 1 + arch/alpha/include/uapi/asm/shmbuf.h | 1 + arch/alpha/include/uapi/asm/sigcontext.h | 1 + arch/alpha/include/uapi/asm/siginfo.h | 1 + arch/alpha/include/uapi/asm/signal.h | 1 + arch/alpha/include/uapi/asm/socket.h | 1 + arch/alpha/include/uapi/asm/sockios.h | 1 + arch/alpha/include/uapi/asm/stat.h | 1 + arch/alpha/include/uapi/asm/statfs.h | 1 + arch/alpha/include/uapi/asm/swab.h | 1 + arch/alpha/include/uapi/asm/sysinfo.h | 1 + arch/alpha/include/uapi/asm/termbits.h | 1 + arch/alpha/include/uapi/asm/termios.h | 1 + arch/alpha/include/uapi/asm/types.h | 1 + arch/alpha/include/uapi/asm/unistd.h | 1 + arch/arm/include/uapi/asm/auxvec.h | 1 + arch/arm/include/uapi/asm/byteorder.h | 1 + arch/arm/include/uapi/asm/fcntl.h | 1 + arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/include/uapi/asm/ioctls.h | 1 + arch/arm/include/uapi/asm/kvm_para.h | 1 + arch/arm/include/uapi/asm/perf_regs.h | 1 + arch/arm/include/uapi/asm/sigcontext.h | 1 + arch/arm/include/uapi/asm/signal.h | 1 + arch/arm/include/uapi/asm/stat.h | 1 + arch/arm/include/uapi/asm/statfs.h | 1 + arch/arm/include/uapi/asm/swab.h | 1 + arch/arm/include/uapi/asm/types.h | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 1 + arch/arm64/include/uapi/asm/posix_types.h | 1 + arch/blackfin/include/uapi/asm/byteorder.h | 1 + arch/blackfin/include/uapi/asm/ioctls.h | 1 + arch/blackfin/include/uapi/asm/signal.h | 1 + arch/c6x/include/uapi/asm/byteorder.h | 1 + arch/c6x/include/uapi/asm/setup.h | 1 + arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h | 1 + arch/cris/include/uapi/arch-v10/arch/svinto.h | 1 + arch/cris/include/uapi/arch-v10/arch/user.h | 1 + arch/cris/include/uapi/arch-v32/arch/cryptocop.h | 1 + arch/cris/include/uapi/arch-v32/arch/user.h | 1 + arch/cris/include/uapi/asm/byteorder.h | 1 + arch/cris/include/uapi/asm/elf.h | 1 + arch/cris/include/uapi/asm/elf_v10.h | 1 + arch/cris/include/uapi/asm/elf_v32.h | 1 + arch/cris/include/uapi/asm/ethernet.h | 1 + arch/cris/include/uapi/asm/etraxgpio.h | 1 + arch/cris/include/uapi/asm/ioctls.h | 1 + arch/cris/include/uapi/asm/param.h | 1 + arch/cris/include/uapi/asm/posix_types.h | 1 + arch/cris/include/uapi/asm/ptrace.h | 1 + arch/cris/include/uapi/asm/ptrace_v10.h | 1 + arch/cris/include/uapi/asm/ptrace_v32.h | 1 + arch/cris/include/uapi/asm/rs485.h | 1 + arch/cris/include/uapi/asm/setup.h | 1 + arch/cris/include/uapi/asm/sigcontext.h | 1 + arch/cris/include/uapi/asm/signal.h | 1 + arch/cris/include/uapi/asm/stat.h | 1 + arch/cris/include/uapi/asm/sync_serial.h | 1 + arch/cris/include/uapi/asm/termbits.h | 1 + arch/cris/include/uapi/asm/termios.h | 1 + arch/cris/include/uapi/asm/unistd.h | 1 + arch/frv/include/uapi/asm/bitsperlong.h | 1 + arch/frv/include/uapi/asm/byteorder.h | 1 + arch/frv/include/uapi/asm/errno.h | 1 + arch/frv/include/uapi/asm/fcntl.h | 1 + arch/frv/include/uapi/asm/ioctl.h | 1 + arch/frv/include/uapi/asm/ioctls.h | 1 + arch/frv/include/uapi/asm/kvm_para.h | 1 + arch/frv/include/uapi/asm/mman.h | 1 + arch/frv/include/uapi/asm/msgbuf.h | 1 + arch/frv/include/uapi/asm/param.h | 1 + arch/frv/include/uapi/asm/poll.h | 1 + arch/frv/include/uapi/asm/posix_types.h | 1 + arch/frv/include/uapi/asm/resource.h | 1 + arch/frv/include/uapi/asm/sembuf.h | 1 + arch/frv/include/uapi/asm/shmbuf.h | 1 + arch/frv/include/uapi/asm/siginfo.h | 1 + arch/frv/include/uapi/asm/signal.h | 1 + arch/frv/include/uapi/asm/socket.h | 1 + arch/frv/include/uapi/asm/sockios.h | 1 + arch/frv/include/uapi/asm/stat.h | 1 + arch/frv/include/uapi/asm/statfs.h | 1 + arch/frv/include/uapi/asm/swab.h | 1 + arch/frv/include/uapi/asm/termbits.h | 1 + arch/frv/include/uapi/asm/termios.h | 1 + arch/frv/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/bitsperlong.h | 1 + arch/h8300/include/uapi/asm/byteorder.h | 1 + arch/h8300/include/uapi/asm/ptrace.h | 1 + arch/h8300/include/uapi/asm/sigcontext.h | 1 + arch/h8300/include/uapi/asm/signal.h | 1 + arch/hexagon/include/uapi/asm/kvm_para.h | 1 + arch/hexagon/include/uapi/asm/registers.h | 1 + arch/hexagon/include/uapi/asm/user.h | 1 + arch/ia64/include/uapi/asm/auxvec.h | 1 + arch/ia64/include/uapi/asm/bitsperlong.h | 1 + arch/ia64/include/uapi/asm/break.h | 1 + arch/ia64/include/uapi/asm/byteorder.h | 1 + arch/ia64/include/uapi/asm/cmpxchg.h | 1 + arch/ia64/include/uapi/asm/errno.h | 1 + arch/ia64/include/uapi/asm/fcntl.h | 1 + arch/ia64/include/uapi/asm/fpu.h | 1 + arch/ia64/include/uapi/asm/gcc_intrin.h | 1 + arch/ia64/include/uapi/asm/ia64regs.h | 1 + arch/ia64/include/uapi/asm/intel_intrin.h | 1 + arch/ia64/include/uapi/asm/intrinsics.h | 1 + arch/ia64/include/uapi/asm/ioctl.h | 1 + arch/ia64/include/uapi/asm/ioctls.h | 1 + arch/ia64/include/uapi/asm/ipcbuf.h | 1 + arch/ia64/include/uapi/asm/mman.h | 1 + arch/ia64/include/uapi/asm/msgbuf.h | 1 + arch/ia64/include/uapi/asm/param.h | 1 + arch/ia64/include/uapi/asm/perfmon.h | 1 + arch/ia64/include/uapi/asm/perfmon_default_smpl.h | 1 + arch/ia64/include/uapi/asm/posix_types.h | 1 + arch/ia64/include/uapi/asm/ptrace.h | 1 + arch/ia64/include/uapi/asm/ptrace_offsets.h | 1 + arch/ia64/include/uapi/asm/resource.h | 1 + arch/ia64/include/uapi/asm/rse.h | 1 + arch/ia64/include/uapi/asm/sembuf.h | 1 + arch/ia64/include/uapi/asm/setup.h | 1 + arch/ia64/include/uapi/asm/shmbuf.h | 1 + arch/ia64/include/uapi/asm/sigcontext.h | 1 + arch/ia64/include/uapi/asm/siginfo.h | 1 + arch/ia64/include/uapi/asm/signal.h | 1 + arch/ia64/include/uapi/asm/socket.h | 1 + arch/ia64/include/uapi/asm/sockios.h | 1 + arch/ia64/include/uapi/asm/stat.h | 1 + arch/ia64/include/uapi/asm/statfs.h | 1 + arch/ia64/include/uapi/asm/swab.h | 1 + arch/ia64/include/uapi/asm/termbits.h | 1 + arch/ia64/include/uapi/asm/termios.h | 1 + arch/ia64/include/uapi/asm/types.h | 1 + arch/ia64/include/uapi/asm/ucontext.h | 1 + arch/ia64/include/uapi/asm/unistd.h | 1 + arch/ia64/include/uapi/asm/ustack.h | 1 + arch/m32r/include/uapi/asm/bitsperlong.h | 1 + arch/m32r/include/uapi/asm/byteorder.h | 1 + arch/m32r/include/uapi/asm/errno.h | 1 + arch/m32r/include/uapi/asm/fcntl.h | 1 + arch/m32r/include/uapi/asm/ioctl.h | 1 + arch/m32r/include/uapi/asm/ioctls.h | 1 + arch/m32r/include/uapi/asm/ipcbuf.h | 1 + arch/m32r/include/uapi/asm/msgbuf.h | 1 + arch/m32r/include/uapi/asm/param.h | 1 + arch/m32r/include/uapi/asm/poll.h | 1 + arch/m32r/include/uapi/asm/posix_types.h | 1 + arch/m32r/include/uapi/asm/resource.h | 1 + arch/m32r/include/uapi/asm/sembuf.h | 1 + arch/m32r/include/uapi/asm/setup.h | 1 + arch/m32r/include/uapi/asm/shmbuf.h | 1 + arch/m32r/include/uapi/asm/sigcontext.h | 1 + arch/m32r/include/uapi/asm/signal.h | 1 + arch/m32r/include/uapi/asm/socket.h | 1 + arch/m32r/include/uapi/asm/sockios.h | 1 + arch/m32r/include/uapi/asm/stat.h | 1 + arch/m32r/include/uapi/asm/statfs.h | 1 + arch/m32r/include/uapi/asm/swab.h | 1 + arch/m32r/include/uapi/asm/termbits.h | 1 + arch/m32r/include/uapi/asm/termios.h | 1 + arch/m32r/include/uapi/asm/unistd.h | 1 + arch/m68k/include/uapi/asm/a.out.h | 1 + arch/m68k/include/uapi/asm/bootinfo-amiga.h | 1 + arch/m68k/include/uapi/asm/bootinfo-apollo.h | 1 + arch/m68k/include/uapi/asm/bootinfo-atari.h | 1 + arch/m68k/include/uapi/asm/bootinfo-hp300.h | 1 + arch/m68k/include/uapi/asm/bootinfo-mac.h | 1 + arch/m68k/include/uapi/asm/bootinfo-q40.h | 1 + arch/m68k/include/uapi/asm/bootinfo-vme.h | 1 + arch/m68k/include/uapi/asm/byteorder.h | 1 + arch/m68k/include/uapi/asm/cachectl.h | 1 + arch/m68k/include/uapi/asm/fcntl.h | 1 + arch/m68k/include/uapi/asm/ioctls.h | 1 + arch/m68k/include/uapi/asm/param.h | 1 + arch/m68k/include/uapi/asm/poll.h | 1 + arch/m68k/include/uapi/asm/posix_types.h | 1 + arch/m68k/include/uapi/asm/ptrace.h | 1 + arch/m68k/include/uapi/asm/sigcontext.h | 1 + arch/m68k/include/uapi/asm/signal.h | 1 + arch/m68k/include/uapi/asm/stat.h | 1 + arch/m68k/include/uapi/asm/swab.h | 1 + arch/m68k/include/uapi/asm/unistd.h | 1 + arch/metag/include/uapi/asm/byteorder.h | 1 + arch/metag/include/uapi/asm/ech.h | 1 + arch/metag/include/uapi/asm/ptrace.h | 1 + arch/metag/include/uapi/asm/sigcontext.h | 1 + arch/metag/include/uapi/asm/siginfo.h | 1 + arch/metag/include/uapi/asm/swab.h | 1 + arch/microblaze/include/uapi/asm/auxvec.h | 1 + arch/microblaze/include/uapi/asm/byteorder.h | 1 + arch/microblaze/include/uapi/asm/posix_types.h | 1 + arch/mips/include/uapi/asm/bitsperlong.h | 1 + arch/mips/include/uapi/asm/hwcap.h | 1 + arch/mips/include/uapi/asm/msgbuf.h | 1 + arch/mips/include/uapi/asm/poll.h | 1 + arch/mips/include/uapi/asm/sembuf.h | 1 + arch/mips/include/uapi/asm/setup.h | 1 + arch/mips/include/uapi/asm/shmbuf.h | 1 + arch/mips/include/uapi/asm/ucontext.h | 1 + arch/mn10300/include/uapi/asm/bitsperlong.h | 1 + arch/mn10300/include/uapi/asm/byteorder.h | 1 + arch/mn10300/include/uapi/asm/errno.h | 1 + arch/mn10300/include/uapi/asm/fcntl.h | 1 + arch/mn10300/include/uapi/asm/ioctls.h | 1 + arch/mn10300/include/uapi/asm/ipcbuf.h | 1 + arch/mn10300/include/uapi/asm/kvm_para.h | 1 + arch/mn10300/include/uapi/asm/mman.h | 1 + arch/mn10300/include/uapi/asm/msgbuf.h | 1 + arch/mn10300/include/uapi/asm/poll.h | 1 + arch/mn10300/include/uapi/asm/resource.h | 1 + arch/mn10300/include/uapi/asm/sembuf.h | 1 + arch/mn10300/include/uapi/asm/setup.h | 1 + arch/mn10300/include/uapi/asm/shmbuf.h | 1 + arch/mn10300/include/uapi/asm/socket.h | 1 + arch/mn10300/include/uapi/asm/sockios.h | 1 + arch/mn10300/include/uapi/asm/stat.h | 1 + arch/mn10300/include/uapi/asm/termbits.h | 1 + arch/mn10300/include/uapi/asm/termios.h | 1 + arch/parisc/include/uapi/asm/bitsperlong.h | 1 + arch/parisc/include/uapi/asm/byteorder.h | 1 + arch/parisc/include/uapi/asm/errno.h | 1 + arch/parisc/include/uapi/asm/fcntl.h | 1 + arch/parisc/include/uapi/asm/ioctls.h | 1 + arch/parisc/include/uapi/asm/ipcbuf.h | 1 + arch/parisc/include/uapi/asm/mman.h | 1 + arch/parisc/include/uapi/asm/msgbuf.h | 1 + arch/parisc/include/uapi/asm/pdc.h | 1 + arch/parisc/include/uapi/asm/posix_types.h | 1 + arch/parisc/include/uapi/asm/ptrace.h | 1 + arch/parisc/include/uapi/asm/sembuf.h | 1 + arch/parisc/include/uapi/asm/setup.h | 1 + arch/parisc/include/uapi/asm/shmbuf.h | 1 + arch/parisc/include/uapi/asm/sigcontext.h | 1 + arch/parisc/include/uapi/asm/siginfo.h | 1 + arch/parisc/include/uapi/asm/signal.h | 1 + arch/parisc/include/uapi/asm/socket.h | 1 + arch/parisc/include/uapi/asm/sockios.h | 1 + arch/parisc/include/uapi/asm/stat.h | 1 + arch/parisc/include/uapi/asm/statfs.h | 1 + arch/parisc/include/uapi/asm/swab.h | 1 + arch/parisc/include/uapi/asm/termbits.h | 1 + arch/parisc/include/uapi/asm/termios.h | 1 + arch/parisc/include/uapi/asm/types.h | 1 + arch/parisc/include/uapi/asm/unistd.h | 1 + arch/powerpc/include/uapi/asm/auxvec.h | 1 + arch/powerpc/include/uapi/asm/bitsperlong.h | 1 + arch/powerpc/include/uapi/asm/bootx.h | 1 + arch/powerpc/include/uapi/asm/cputable.h | 1 + arch/powerpc/include/uapi/asm/errno.h | 1 + arch/powerpc/include/uapi/asm/fcntl.h | 1 + arch/powerpc/include/uapi/asm/ioctl.h | 1 + arch/powerpc/include/uapi/asm/ioctls.h | 1 + arch/powerpc/include/uapi/asm/msgbuf.h | 1 + arch/powerpc/include/uapi/asm/perf_regs.h | 1 + arch/powerpc/include/uapi/asm/posix_types.h | 1 + arch/powerpc/include/uapi/asm/setup.h | 1 + arch/powerpc/include/uapi/asm/signal.h | 1 + arch/powerpc/include/uapi/asm/tm.h | 1 + arch/powerpc/include/uapi/asm/ucontext.h | 1 + arch/s390/include/uapi/asm/auxvec.h | 1 + arch/s390/include/uapi/asm/bitsperlong.h | 1 + arch/s390/include/uapi/asm/byteorder.h | 1 + arch/s390/include/uapi/asm/chpid.h | 1 + arch/s390/include/uapi/asm/chsc.h | 1 + arch/s390/include/uapi/asm/clp.h | 1 + arch/s390/include/uapi/asm/cmb.h | 1 + arch/s390/include/uapi/asm/dasd.h | 1 + arch/s390/include/uapi/asm/debug.h | 1 + arch/s390/include/uapi/asm/guarded_storage.h | 1 + arch/s390/include/uapi/asm/hypfs.h | 1 + arch/s390/include/uapi/asm/ioctls.h | 1 + arch/s390/include/uapi/asm/ipcbuf.h | 1 + arch/s390/include/uapi/asm/monwriter.h | 1 + arch/s390/include/uapi/asm/msgbuf.h | 1 + arch/s390/include/uapi/asm/pkey.h | 1 + arch/s390/include/uapi/asm/posix_types.h | 1 + arch/s390/include/uapi/asm/ptrace.h | 1 + arch/s390/include/uapi/asm/qeth.h | 1 + arch/s390/include/uapi/asm/schid.h | 1 + arch/s390/include/uapi/asm/sclp_ctl.h | 1 + arch/s390/include/uapi/asm/sembuf.h | 1 + arch/s390/include/uapi/asm/setup.h | 1 + arch/s390/include/uapi/asm/shmbuf.h | 1 + arch/s390/include/uapi/asm/sie.h | 1 + arch/s390/include/uapi/asm/sigcontext.h | 1 + arch/s390/include/uapi/asm/siginfo.h | 1 + arch/s390/include/uapi/asm/signal.h | 1 + arch/s390/include/uapi/asm/socket.h | 1 + arch/s390/include/uapi/asm/stat.h | 1 + arch/s390/include/uapi/asm/statfs.h | 1 + arch/s390/include/uapi/asm/tape390.h | 1 + arch/s390/include/uapi/asm/termios.h | 1 + arch/s390/include/uapi/asm/types.h | 1 + arch/s390/include/uapi/asm/ucontext.h | 1 + arch/s390/include/uapi/asm/unistd.h | 1 + arch/s390/include/uapi/asm/vtoc.h | 1 + arch/score/include/uapi/asm/bitsperlong.h | 1 + arch/score/include/uapi/asm/byteorder.h | 1 + arch/score/include/uapi/asm/errno.h | 1 + arch/score/include/uapi/asm/fcntl.h | 1 + arch/score/include/uapi/asm/ioctl.h | 1 + arch/score/include/uapi/asm/ioctls.h | 1 + arch/score/include/uapi/asm/ipcbuf.h | 1 + arch/score/include/uapi/asm/kvm_para.h | 1 + arch/score/include/uapi/asm/mman.h | 1 + arch/score/include/uapi/asm/msgbuf.h | 1 + arch/score/include/uapi/asm/param.h | 1 + arch/score/include/uapi/asm/poll.h | 1 + arch/score/include/uapi/asm/posix_types.h | 1 + arch/score/include/uapi/asm/ptrace.h | 1 + arch/score/include/uapi/asm/resource.h | 1 + arch/score/include/uapi/asm/sembuf.h | 1 + arch/score/include/uapi/asm/setup.h | 1 + arch/score/include/uapi/asm/shmbuf.h | 1 + arch/score/include/uapi/asm/sigcontext.h | 1 + arch/score/include/uapi/asm/signal.h | 1 + arch/score/include/uapi/asm/socket.h | 1 + arch/score/include/uapi/asm/sockios.h | 1 + arch/score/include/uapi/asm/stat.h | 1 + arch/score/include/uapi/asm/statfs.h | 1 + arch/score/include/uapi/asm/swab.h | 1 + arch/score/include/uapi/asm/termbits.h | 1 + arch/score/include/uapi/asm/termios.h | 1 + arch/score/include/uapi/asm/types.h | 1 + arch/score/include/uapi/asm/unistd.h | 1 + arch/sh/include/uapi/asm/auxvec.h | 1 + arch/sh/include/uapi/asm/byteorder.h | 1 + arch/sh/include/uapi/asm/cachectl.h | 1 + arch/sh/include/uapi/asm/cpu-features.h | 1 + arch/sh/include/uapi/asm/hw_breakpoint.h | 1 + arch/sh/include/uapi/asm/ioctls.h | 1 + arch/sh/include/uapi/asm/posix_types.h | 1 + arch/sh/include/uapi/asm/posix_types_32.h | 1 + arch/sh/include/uapi/asm/posix_types_64.h | 1 + arch/sh/include/uapi/asm/ptrace.h | 1 + arch/sh/include/uapi/asm/ptrace_32.h | 1 + arch/sh/include/uapi/asm/ptrace_64.h | 1 + arch/sh/include/uapi/asm/sigcontext.h | 1 + arch/sh/include/uapi/asm/signal.h | 1 + arch/sh/include/uapi/asm/sockios.h | 1 + arch/sh/include/uapi/asm/stat.h | 1 + arch/sh/include/uapi/asm/swab.h | 1 + arch/sh/include/uapi/asm/unistd.h | 1 + arch/sh/include/uapi/asm/unistd_32.h | 1 + arch/sparc/include/uapi/asm/apc.h | 1 + arch/sparc/include/uapi/asm/asi.h | 1 + arch/sparc/include/uapi/asm/bitsperlong.h | 1 + arch/sparc/include/uapi/asm/byteorder.h | 1 + arch/sparc/include/uapi/asm/display7seg.h | 1 + arch/sparc/include/uapi/asm/envctrl.h | 1 + arch/sparc/include/uapi/asm/errno.h | 1 + arch/sparc/include/uapi/asm/fbio.h | 1 + arch/sparc/include/uapi/asm/fcntl.h | 1 + arch/sparc/include/uapi/asm/ioctl.h | 1 + arch/sparc/include/uapi/asm/ioctls.h | 1 + arch/sparc/include/uapi/asm/ipcbuf.h | 1 + arch/sparc/include/uapi/asm/jsflash.h | 1 + arch/sparc/include/uapi/asm/kvm_para.h | 1 + arch/sparc/include/uapi/asm/mman.h | 1 + arch/sparc/include/uapi/asm/msgbuf.h | 1 + arch/sparc/include/uapi/asm/openpromio.h | 1 + arch/sparc/include/uapi/asm/param.h | 1 + arch/sparc/include/uapi/asm/perfctr.h | 1 + arch/sparc/include/uapi/asm/poll.h | 1 + arch/sparc/include/uapi/asm/posix_types.h | 1 + arch/sparc/include/uapi/asm/psr.h | 1 + arch/sparc/include/uapi/asm/psrcompat.h | 1 + arch/sparc/include/uapi/asm/pstate.h | 1 + arch/sparc/include/uapi/asm/ptrace.h | 1 + arch/sparc/include/uapi/asm/resource.h | 1 + arch/sparc/include/uapi/asm/sembuf.h | 1 + arch/sparc/include/uapi/asm/setup.h | 1 + arch/sparc/include/uapi/asm/shmbuf.h | 1 + arch/sparc/include/uapi/asm/sigcontext.h | 1 + arch/sparc/include/uapi/asm/siginfo.h | 1 + arch/sparc/include/uapi/asm/signal.h | 1 + arch/sparc/include/uapi/asm/socket.h | 1 + arch/sparc/include/uapi/asm/sockios.h | 1 + arch/sparc/include/uapi/asm/stat.h | 1 + arch/sparc/include/uapi/asm/statfs.h | 1 + arch/sparc/include/uapi/asm/swab.h | 1 + arch/sparc/include/uapi/asm/termbits.h | 1 + arch/sparc/include/uapi/asm/termios.h | 1 + arch/sparc/include/uapi/asm/traps.h | 1 + arch/sparc/include/uapi/asm/uctx.h | 1 + arch/sparc/include/uapi/asm/unistd.h | 1 + arch/sparc/include/uapi/asm/utrap.h | 1 + arch/sparc/include/uapi/asm/watchdog.h | 1 + arch/tile/include/uapi/asm/kvm_para.h | 1 + arch/tile/include/uapi/asm/stat.h | 1 + arch/x86/include/uapi/asm/a.out.h | 1 + arch/x86/include/uapi/asm/auxvec.h | 1 + arch/x86/include/uapi/asm/bitsperlong.h | 1 + arch/x86/include/uapi/asm/boot.h | 1 + arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/include/uapi/asm/debugreg.h | 1 + arch/x86/include/uapi/asm/e820.h | 1 + arch/x86/include/uapi/asm/hw_breakpoint.h | 1 + arch/x86/include/uapi/asm/hyperv.h | 1 + arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/include/uapi/asm/kvm_para.h | 1 + arch/x86/include/uapi/asm/kvm_perf.h | 1 + arch/x86/include/uapi/asm/ldt.h | 1 + arch/x86/include/uapi/asm/mce.h | 1 + arch/x86/include/uapi/asm/mman.h | 1 + arch/x86/include/uapi/asm/msr.h | 1 + arch/x86/include/uapi/asm/perf_regs.h | 1 + arch/x86/include/uapi/asm/posix_types.h | 1 + arch/x86/include/uapi/asm/posix_types_32.h | 1 + arch/x86/include/uapi/asm/posix_types_64.h | 1 + arch/x86/include/uapi/asm/posix_types_x32.h | 1 + arch/x86/include/uapi/asm/prctl.h | 1 + arch/x86/include/uapi/asm/processor-flags.h | 1 + arch/x86/include/uapi/asm/ptrace-abi.h | 1 + arch/x86/include/uapi/asm/ptrace.h | 1 + arch/x86/include/uapi/asm/sembuf.h | 1 + arch/x86/include/uapi/asm/sigcontext.h | 1 + arch/x86/include/uapi/asm/siginfo.h | 1 + arch/x86/include/uapi/asm/signal.h | 1 + arch/x86/include/uapi/asm/stat.h | 1 + arch/x86/include/uapi/asm/statfs.h | 1 + arch/x86/include/uapi/asm/svm.h | 1 + arch/x86/include/uapi/asm/swab.h | 1 + arch/x86/include/uapi/asm/ucontext.h | 1 + arch/x86/include/uapi/asm/unistd.h | 1 + arch/x86/include/uapi/asm/vm86.h | 1 + arch/x86/include/uapi/asm/vsyscall.h | 1 + arch/xtensa/include/uapi/asm/byteorder.h | 1 + arch/xtensa/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/bitsperlong.h | 1 + include/uapi/asm-generic/errno-base.h | 1 + include/uapi/asm-generic/errno.h | 1 + include/uapi/asm-generic/fcntl.h | 1 + include/uapi/asm-generic/int-l64.h | 1 + include/uapi/asm-generic/int-ll64.h | 1 + include/uapi/asm-generic/ioctl.h | 1 + include/uapi/asm-generic/ioctls.h | 1 + include/uapi/asm-generic/ipcbuf.h | 1 + include/uapi/asm-generic/mman-common.h | 1 + include/uapi/asm-generic/mman.h | 1 + include/uapi/asm-generic/msgbuf.h | 1 + include/uapi/asm-generic/param.h | 1 + include/uapi/asm-generic/poll.h | 1 + include/uapi/asm-generic/posix_types.h | 1 + include/uapi/asm-generic/resource.h | 1 + include/uapi/asm-generic/sembuf.h | 1 + include/uapi/asm-generic/setup.h | 1 + include/uapi/asm-generic/shmbuf.h | 1 + include/uapi/asm-generic/shmparam.h | 1 + include/uapi/asm-generic/siginfo.h | 1 + include/uapi/asm-generic/signal-defs.h | 1 + include/uapi/asm-generic/signal.h | 1 + include/uapi/asm-generic/socket.h | 1 + include/uapi/asm-generic/sockios.h | 1 + include/uapi/asm-generic/stat.h | 1 + include/uapi/asm-generic/statfs.h | 1 + include/uapi/asm-generic/swab.h | 1 + include/uapi/asm-generic/termbits.h | 1 + include/uapi/asm-generic/termios.h | 1 + include/uapi/asm-generic/types.h | 1 + include/uapi/asm-generic/ucontext.h | 1 + include/uapi/asm-generic/unistd.h | 1 + include/uapi/drm/i810_drm.h | 1 + include/uapi/linux/a.out.h | 1 + include/uapi/linux/acct.h | 1 + include/uapi/linux/adb.h | 1 + include/uapi/linux/adfs_fs.h | 1 + include/uapi/linux/affs_hardblocks.h | 1 + include/uapi/linux/arcfb.h | 1 + include/uapi/linux/atalk.h | 1 + include/uapi/linux/atm.h | 1 + include/uapi/linux/atm_eni.h | 1 + include/uapi/linux/atm_he.h | 1 + include/uapi/linux/atm_idt77105.h | 1 + include/uapi/linux/atm_nicstar.h | 1 + include/uapi/linux/atm_tcp.h | 1 + include/uapi/linux/atm_zatm.h | 1 + include/uapi/linux/atmapi.h | 1 + include/uapi/linux/atmarp.h | 1 + include/uapi/linux/atmbr2684.h | 1 + include/uapi/linux/atmclip.h | 1 + include/uapi/linux/atmdev.h | 1 + include/uapi/linux/atmioc.h | 1 + include/uapi/linux/atmlec.h | 1 + include/uapi/linux/atmmpc.h | 1 + include/uapi/linux/atmppp.h | 1 + include/uapi/linux/atmsap.h | 1 + include/uapi/linux/atmsvc.h | 1 + include/uapi/linux/auxvec.h | 1 + include/uapi/linux/ax25.h | 1 + include/uapi/linux/baycom.h | 1 + include/uapi/linux/bcache.h | 1 + include/uapi/linux/bcm933xx_hcs.h | 1 + include/uapi/linux/bfs_fs.h | 1 + include/uapi/linux/binfmts.h | 1 + include/uapi/linux/blkpg.h | 1 + include/uapi/linux/blktrace_api.h | 1 + include/uapi/linux/bpf_common.h | 1 + include/uapi/linux/bpqether.h | 1 + include/uapi/linux/bsg.h | 1 + include/uapi/linux/btrfs_tree.h | 1 + include/uapi/linux/byteorder/big_endian.h | 1 + include/uapi/linux/byteorder/little_endian.h | 1 + include/uapi/linux/can/vxcan.h | 1 + include/uapi/linux/capability.h | 1 + include/uapi/linux/cciss_defs.h | 1 + include/uapi/linux/cciss_ioctl.h | 1 + include/uapi/linux/cdrom.h | 1 + include/uapi/linux/chio.h | 1 + include/uapi/linux/cm4000_cs.h | 1 + include/uapi/linux/coda_psdev.h | 1 + include/uapi/linux/const.h | 1 + include/uapi/linux/coresight-stm.h | 1 + include/uapi/linux/cramfs_fs.h | 1 + include/uapi/linux/cuda.h | 1 + include/uapi/linux/cyclades.h | 1 + include/uapi/linux/dccp.h | 1 + include/uapi/linux/dn.h | 1 + include/uapi/linux/efs_fs_sb.h | 1 + include/uapi/linux/elf-em.h | 1 + include/uapi/linux/elf.h | 1 + include/uapi/linux/elfcore.h | 1 + include/uapi/linux/errqueue.h | 1 + include/uapi/linux/ethtool.h | 1 + include/uapi/linux/fadvise.h | 1 + include/uapi/linux/falloc.h | 1 + include/uapi/linux/fanotify.h | 1 + include/uapi/linux/fb.h | 1 + include/uapi/linux/fcntl.h | 1 + include/uapi/linux/fd.h | 1 + include/uapi/linux/fdreg.h | 1 + include/uapi/linux/fib_rules.h | 1 + include/uapi/linux/fiemap.h | 1 + include/uapi/linux/filter.h | 1 + include/uapi/linux/flat.h | 1 + include/uapi/linux/fou.h | 1 + include/uapi/linux/fs.h | 1 + include/uapi/linux/fsmap.h | 1 + include/uapi/linux/futex.h | 1 + include/uapi/linux/gen_stats.h | 1 + include/uapi/linux/genetlink.h | 1 + include/uapi/linux/gsmmux.h | 1 + include/uapi/linux/gtp.h | 1 + include/uapi/linux/hdlc/ioctl.h | 1 + include/uapi/linux/hdlcdrv.h | 1 + include/uapi/linux/hdreg.h | 1 + include/uapi/linux/hpet.h | 1 + include/uapi/linux/hw_breakpoint.h | 1 + include/uapi/linux/icmpv6.h | 1 + include/uapi/linux/if_addr.h | 1 + include/uapi/linux/if_addrlabel.h | 1 + include/uapi/linux/if_link.h | 1 + include/uapi/linux/if_ltalk.h | 1 + include/uapi/linux/if_packet.h | 1 + include/uapi/linux/if_phonet.h | 1 + include/uapi/linux/if_slip.h | 1 + include/uapi/linux/if_tunnel.h | 1 + include/uapi/linux/ife.h | 1 + include/uapi/linux/ila.h | 1 + include/uapi/linux/in_route.h | 1 + include/uapi/linux/inet_diag.h | 1 + include/uapi/linux/inotify.h | 1 + include/uapi/linux/ioctl.h | 1 + include/uapi/linux/ip6_tunnel.h | 1 + include/uapi/linux/ip_vs.h | 1 + include/uapi/linux/ipc.h | 1 + include/uapi/linux/ipsec.h | 1 + include/uapi/linux/ipv6.h | 1 + include/uapi/linux/ipx.h | 1 + include/uapi/linux/iso_fs.h | 1 + include/uapi/linux/kcmp.h | 1 + include/uapi/linux/kcov.h | 1 + include/uapi/linux/kd.h | 1 + include/uapi/linux/kdev_t.h | 1 + include/uapi/linux/kernel-page-flags.h | 1 + include/uapi/linux/kernel.h | 1 + include/uapi/linux/kernelcapi.h | 1 + include/uapi/linux/kexec.h | 1 + include/uapi/linux/keyboard.h | 1 + include/uapi/linux/kvm.h | 1 + include/uapi/linux/kvm_para.h | 1 + include/uapi/linux/l2tp.h | 1 + include/uapi/linux/libc-compat.h | 1 + include/uapi/linux/limits.h | 1 + include/uapi/linux/lirc.h | 1 + include/uapi/linux/lp.h | 1 + include/uapi/linux/lwtunnel.h | 1 + include/uapi/linux/magic.h | 1 + include/uapi/linux/major.h | 1 + include/uapi/linux/matroxfb.h | 1 + include/uapi/linux/memfd.h | 1 + include/uapi/linux/mempolicy.h | 1 + include/uapi/linux/mii.h | 1 + include/uapi/linux/minix_fs.h | 1 + include/uapi/linux/mman.h | 1 + include/uapi/linux/mmc/ioctl.h | 1 + include/uapi/linux/module.h | 1 + include/uapi/linux/mpls.h | 1 + include/uapi/linux/mroute.h | 1 + include/uapi/linux/mroute6.h | 1 + include/uapi/linux/msdos_fs.h | 1 + include/uapi/linux/msg.h | 1 + include/uapi/linux/mtio.h | 1 + include/uapi/linux/ncp.h | 1 + include/uapi/linux/ncp_fs.h | 1 + include/uapi/linux/ncp_mount.h | 1 + include/uapi/linux/ncp_no.h | 1 + include/uapi/linux/neighbour.h | 1 + include/uapi/linux/net_dropmon.h | 1 + include/uapi/linux/net_tstamp.h | 1 + include/uapi/linux/netconf.h | 1 + include/uapi/linux/netfilter.h | 1 + include/uapi/linux/netfilter/ipset/ip_set_bitmap.h | 1 + include/uapi/linux/netfilter/ipset/ip_set_hash.h | 1 + include/uapi/linux/netfilter/ipset/ip_set_list.h | 1 + include/uapi/linux/netfilter/nf_conntrack_common.h | 1 + include/uapi/linux/netfilter/nf_conntrack_ftp.h | 1 + include/uapi/linux/netfilter/nf_conntrack_sctp.h | 1 + include/uapi/linux/netfilter/nf_conntrack_tcp.h | 1 + include/uapi/linux/netfilter/nf_conntrack_tuple_common.h | 1 + include/uapi/linux/netfilter/nf_log.h | 1 + include/uapi/linux/netfilter/nf_nat.h | 1 + include/uapi/linux/netfilter/nf_tables.h | 1 + include/uapi/linux/netfilter/nf_tables_compat.h | 1 + include/uapi/linux/netfilter/nfnetlink.h | 1 + include/uapi/linux/netfilter/nfnetlink_acct.h | 1 + include/uapi/linux/netfilter/nfnetlink_compat.h | 1 + include/uapi/linux/netfilter/nfnetlink_conntrack.h | 1 + include/uapi/linux/netfilter/nfnetlink_cthelper.h | 1 + include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 1 + include/uapi/linux/netfilter/nfnetlink_log.h | 1 + include/uapi/linux/netfilter/nfnetlink_queue.h | 1 + include/uapi/linux/netfilter/x_tables.h | 1 + include/uapi/linux/netfilter/xt_CLASSIFY.h | 1 + include/uapi/linux/netfilter/xt_CONNMARK.h | 1 + include/uapi/linux/netfilter/xt_CONNSECMARK.h | 1 + include/uapi/linux/netfilter/xt_CT.h | 1 + include/uapi/linux/netfilter/xt_HMARK.h | 1 + include/uapi/linux/netfilter/xt_LED.h | 1 + include/uapi/linux/netfilter/xt_LOG.h | 1 + include/uapi/linux/netfilter/xt_MARK.h | 1 + include/uapi/linux/netfilter/xt_NFLOG.h | 1 + include/uapi/linux/netfilter/xt_RATEEST.h | 1 + include/uapi/linux/netfilter/xt_SECMARK.h | 1 + include/uapi/linux/netfilter/xt_SYNPROXY.h | 1 + include/uapi/linux/netfilter/xt_TCPMSS.h | 1 + include/uapi/linux/netfilter/xt_TCPOPTSTRIP.h | 1 + include/uapi/linux/netfilter/xt_TEE.h | 1 + include/uapi/linux/netfilter/xt_TPROXY.h | 1 + include/uapi/linux/netfilter/xt_addrtype.h | 1 + include/uapi/linux/netfilter/xt_bpf.h | 1 + include/uapi/linux/netfilter/xt_cgroup.h | 1 + include/uapi/linux/netfilter/xt_cluster.h | 1 + include/uapi/linux/netfilter/xt_comment.h | 1 + include/uapi/linux/netfilter/xt_connbytes.h | 1 + include/uapi/linux/netfilter/xt_connlabel.h | 1 + include/uapi/linux/netfilter/xt_connlimit.h | 1 + include/uapi/linux/netfilter/xt_cpu.h | 1 + include/uapi/linux/netfilter/xt_dccp.h | 1 + include/uapi/linux/netfilter/xt_devgroup.h | 1 + include/uapi/linux/netfilter/xt_esp.h | 1 + include/uapi/linux/netfilter/xt_hashlimit.h | 1 + include/uapi/linux/netfilter/xt_helper.h | 1 + include/uapi/linux/netfilter/xt_ipcomp.h | 1 + include/uapi/linux/netfilter/xt_iprange.h | 1 + include/uapi/linux/netfilter/xt_ipvs.h | 1 + include/uapi/linux/netfilter/xt_l2tp.h | 1 + include/uapi/linux/netfilter/xt_length.h | 1 + include/uapi/linux/netfilter/xt_limit.h | 1 + include/uapi/linux/netfilter/xt_mac.h | 1 + include/uapi/linux/netfilter/xt_mark.h | 1 + include/uapi/linux/netfilter/xt_multiport.h | 1 + include/uapi/linux/netfilter/xt_nfacct.h | 1 + include/uapi/linux/netfilter/xt_owner.h | 1 + include/uapi/linux/netfilter/xt_physdev.h | 1 + include/uapi/linux/netfilter/xt_pkttype.h | 1 + include/uapi/linux/netfilter/xt_policy.h | 1 + include/uapi/linux/netfilter/xt_quota.h | 1 + include/uapi/linux/netfilter/xt_rateest.h | 1 + include/uapi/linux/netfilter/xt_realm.h | 1 + include/uapi/linux/netfilter/xt_recent.h | 1 + include/uapi/linux/netfilter/xt_rpfilter.h | 1 + include/uapi/linux/netfilter/xt_sctp.h | 1 + include/uapi/linux/netfilter/xt_set.h | 1 + include/uapi/linux/netfilter/xt_socket.h | 1 + include/uapi/linux/netfilter/xt_state.h | 1 + include/uapi/linux/netfilter/xt_statistic.h | 1 + include/uapi/linux/netfilter/xt_string.h | 1 + include/uapi/linux/netfilter/xt_tcpmss.h | 1 + include/uapi/linux/netfilter/xt_tcpudp.h | 1 + include/uapi/linux/netfilter/xt_time.h | 1 + include/uapi/linux/netfilter/xt_u32.h | 1 + include/uapi/linux/netfilter_arp/arp_tables.h | 1 + include/uapi/linux/netfilter_arp/arpt_mangle.h | 1 + include/uapi/linux/netfilter_bridge.h | 1 + include/uapi/linux/netfilter_bridge/ebt_802_3.h | 1 + include/uapi/linux/netfilter_bridge/ebt_among.h | 1 + include/uapi/linux/netfilter_bridge/ebt_arp.h | 1 + include/uapi/linux/netfilter_bridge/ebt_arpreply.h | 1 + include/uapi/linux/netfilter_bridge/ebt_ip.h | 1 + include/uapi/linux/netfilter_bridge/ebt_ip6.h | 1 + include/uapi/linux/netfilter_bridge/ebt_limit.h | 1 + include/uapi/linux/netfilter_bridge/ebt_log.h | 1 + include/uapi/linux/netfilter_bridge/ebt_mark_m.h | 1 + include/uapi/linux/netfilter_bridge/ebt_mark_t.h | 1 + include/uapi/linux/netfilter_bridge/ebt_nat.h | 1 + include/uapi/linux/netfilter_bridge/ebt_nflog.h | 1 + include/uapi/linux/netfilter_bridge/ebt_pkttype.h | 1 + include/uapi/linux/netfilter_bridge/ebt_redirect.h | 1 + include/uapi/linux/netfilter_bridge/ebt_stp.h | 1 + include/uapi/linux/netfilter_bridge/ebt_vlan.h | 1 + include/uapi/linux/netfilter_bridge/ebtables.h | 1 + include/uapi/linux/netfilter_ipv4/ip_tables.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_LOG.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_REJECT.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_TTL.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_ah.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_ecn.h | 1 + include/uapi/linux/netfilter_ipv4/ipt_ttl.h | 1 + include/uapi/linux/netfilter_ipv6/ip6_tables.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_HL.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_NPT.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_ah.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_frag.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_hl.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_mh.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_opts.h | 1 + include/uapi/linux/netfilter_ipv6/ip6t_rt.h | 1 + include/uapi/linux/netlink.h | 1 + include/uapi/linux/netlink_diag.h | 1 + include/uapi/linux/netrom.h | 1 + include/uapi/linux/nfs.h | 1 + include/uapi/linux/nfs2.h | 1 + include/uapi/linux/nfs3.h | 1 + include/uapi/linux/nfs4.h | 1 + include/uapi/linux/nfs4_mount.h | 1 + include/uapi/linux/nfs_fs.h | 1 + include/uapi/linux/nfs_mount.h | 1 + include/uapi/linux/nfsacl.h | 1 + include/uapi/linux/nfsd/debug.h | 1 + include/uapi/linux/nfsd/export.h | 1 + include/uapi/linux/nfsd/nfsfh.h | 1 + include/uapi/linux/nfsd/stats.h | 1 + include/uapi/linux/nsfs.h | 1 + include/uapi/linux/nubus.h | 1 + include/uapi/linux/nvram.h | 1 + include/uapi/linux/oom.h | 1 + include/uapi/linux/packet_diag.h | 1 + include/uapi/linux/param.h | 1 + include/uapi/linux/patchkey.h | 1 + include/uapi/linux/pci.h | 1 + include/uapi/linux/pci_regs.h | 1 + include/uapi/linux/pcitest.h | 1 + include/uapi/linux/personality.h | 1 + include/uapi/linux/pfkeyv2.h | 1 + include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/pkt_sched.h | 1 + include/uapi/linux/pmu.h | 1 + include/uapi/linux/posix_types.h | 1 + include/uapi/linux/pr.h | 1 + include/uapi/linux/prctl.h | 1 + include/uapi/linux/psample.h | 1 + include/uapi/linux/psci.h | 1 + include/uapi/linux/ptrace.h | 1 + include/uapi/linux/qnx4_fs.h | 1 + include/uapi/linux/qnxtypes.h | 1 + include/uapi/linux/qrtr.h | 1 + include/uapi/linux/radeonfb.h | 1 + include/uapi/linux/random.h | 1 + include/uapi/linux/raw.h | 1 + include/uapi/linux/reboot.h | 1 + include/uapi/linux/reiserfs_fs.h | 1 + include/uapi/linux/reiserfs_xattr.h | 1 + include/uapi/linux/resource.h | 1 + include/uapi/linux/romfs_fs.h | 1 + include/uapi/linux/rose.h | 1 + include/uapi/linux/rtc.h | 1 + include/uapi/linux/rtnetlink.h | 1 + include/uapi/linux/scc.h | 1 + include/uapi/linux/sched.h | 1 + include/uapi/linux/sched/types.h | 1 + include/uapi/linux/screen_info.h | 1 + include/uapi/linux/seccomp.h | 1 + include/uapi/linux/securebits.h | 1 + include/uapi/linux/seg6_genl.h | 1 + include/uapi/linux/seg6_hmac.h | 1 + include/uapi/linux/sem.h | 1 + include/uapi/linux/shm.h | 1 + include/uapi/linux/signal.h | 1 + include/uapi/linux/signalfd.h | 1 + include/uapi/linux/smc.h | 1 + include/uapi/linux/smc_diag.h | 1 + include/uapi/linux/snmp.h | 1 + include/uapi/linux/sock_diag.h | 1 + include/uapi/linux/socket.h | 1 + include/uapi/linux/sonet.h | 1 + include/uapi/linux/sound.h | 1 + include/uapi/linux/stat.h | 1 + include/uapi/linux/stddef.h | 1 + include/uapi/linux/string.h | 1 + include/uapi/linux/sunrpc/debug.h | 1 + include/uapi/linux/suspend_ioctls.h | 1 + include/uapi/linux/swab.h | 1 + include/uapi/linux/sysctl.h | 1 + include/uapi/linux/sysinfo.h | 1 + include/uapi/linux/target_core_user.h | 1 + include/uapi/linux/tc_act/tc_connmark.h | 1 + include/uapi/linux/tc_act/tc_csum.h | 1 + include/uapi/linux/tc_act/tc_defact.h | 1 + include/uapi/linux/tc_act/tc_gact.h | 1 + include/uapi/linux/tc_act/tc_ife.h | 1 + include/uapi/linux/tc_act/tc_ipt.h | 1 + include/uapi/linux/tc_act/tc_mirred.h | 1 + include/uapi/linux/tc_act/tc_nat.h | 1 + include/uapi/linux/tc_act/tc_pedit.h | 1 + include/uapi/linux/tc_act/tc_sample.h | 1 + include/uapi/linux/tc_ematch/tc_em_cmp.h | 1 + include/uapi/linux/tc_ematch/tc_em_meta.h | 1 + include/uapi/linux/tc_ematch/tc_em_nbyte.h | 1 + include/uapi/linux/tc_ematch/tc_em_text.h | 1 + include/uapi/linux/tcp_metrics.h | 1 + include/uapi/linux/termios.h | 1 + include/uapi/linux/thermal.h | 1 + include/uapi/linux/time.h | 1 + include/uapi/linux/timerfd.h | 1 + include/uapi/linux/times.h | 1 + include/uapi/linux/tiocl.h | 1 + include/uapi/linux/tty.h | 1 + include/uapi/linux/tty_flags.h | 1 + include/uapi/linux/types.h | 1 + include/uapi/linux/un.h | 1 + include/uapi/linux/unistd.h | 1 + include/uapi/linux/unix_diag.h | 1 + include/uapi/linux/usb/cdc.h | 1 + include/uapi/linux/usb/ch11.h | 1 + include/uapi/linux/usb/ch9.h | 1 + include/uapi/linux/usb/functionfs.h | 1 + include/uapi/linux/usb/gadgetfs.h | 1 + include/uapi/linux/usb/tmc.h | 1 + include/uapi/linux/usb/video.h | 1 + include/uapi/linux/usbip.h | 1 + include/uapi/linux/userfaultfd.h | 1 + include/uapi/linux/utime.h | 1 + include/uapi/linux/utsname.h | 1 + include/uapi/linux/uvcvideo.h | 1 + include/uapi/linux/veth.h | 1 + include/uapi/linux/vfio_ccw.h | 1 + include/uapi/linux/vhost.h | 1 + include/uapi/linux/vsockmon.h | 1 + include/uapi/linux/vt.h | 1 + include/uapi/linux/wait.h | 1 + include/uapi/linux/wanrouter.h | 1 + include/uapi/linux/watchdog.h | 1 + include/uapi/linux/wireless.h | 1 + include/uapi/linux/x25.h | 1 + include/uapi/linux/xattr.h | 1 + include/uapi/linux/xfrm.h | 1 + include/uapi/linux/zorro_ids.h | 1 + include/uapi/mtd/inftl-user.h | 1 + include/uapi/rdma/rdma_netlink.h | 1 + include/uapi/sound/firewire.h | 1 + include/uapi/video/edid.h | 1 + include/uapi/video/uvesafb.h | 1 + tools/arch/alpha/include/uapi/asm/bitsperlong.h | 1 + tools/arch/alpha/include/uapi/asm/mman.h | 1 + tools/arch/arc/include/uapi/asm/mman.h | 1 + tools/arch/arm/include/uapi/asm/mman.h | 1 + tools/arch/arm/include/uapi/asm/perf_regs.h | 1 + tools/arch/arm64/include/uapi/asm/mman.h | 1 + tools/arch/arm64/include/uapi/asm/perf_regs.h | 1 + tools/arch/frv/include/uapi/asm/bitsperlong.h | 1 + tools/arch/frv/include/uapi/asm/mman.h | 1 + tools/arch/h8300/include/uapi/asm/mman.h | 1 + tools/arch/hexagon/include/uapi/asm/mman.h | 1 + tools/arch/ia64/include/uapi/asm/bitsperlong.h | 1 + tools/arch/ia64/include/uapi/asm/mman.h | 1 + tools/arch/m32r/include/uapi/asm/bitsperlong.h | 1 + tools/arch/m32r/include/uapi/asm/mman.h | 1 + tools/arch/microblaze/include/uapi/asm/bitsperlong.h | 1 + tools/arch/microblaze/include/uapi/asm/mman.h | 1 + tools/arch/mips/include/uapi/asm/mman.h | 1 + tools/arch/mn10300/include/uapi/asm/mman.h | 1 + tools/arch/parisc/include/uapi/asm/bitsperlong.h | 1 + tools/arch/parisc/include/uapi/asm/mman.h | 1 + tools/arch/powerpc/include/uapi/asm/bitsperlong.h | 1 + tools/arch/powerpc/include/uapi/asm/mman.h | 1 + tools/arch/powerpc/include/uapi/asm/perf_regs.h | 1 + tools/arch/s390/include/uapi/asm/bitsperlong.h | 1 + tools/arch/s390/include/uapi/asm/mman.h | 1 + tools/arch/s390/include/uapi/asm/sie.h | 1 + tools/arch/score/include/uapi/asm/bitsperlong.h | 1 + tools/arch/score/include/uapi/asm/mman.h | 1 + tools/arch/sh/include/uapi/asm/mman.h | 1 + tools/arch/sparc/include/uapi/asm/bitsperlong.h | 1 + tools/arch/sparc/include/uapi/asm/mman.h | 1 + tools/arch/tile/include/uapi/asm/mman.h | 1 + tools/arch/x86/include/uapi/asm/bitsperlong.h | 1 + tools/arch/x86/include/uapi/asm/kvm.h | 1 + tools/arch/x86/include/uapi/asm/kvm_perf.h | 1 + tools/arch/x86/include/uapi/asm/mman.h | 1 + tools/arch/x86/include/uapi/asm/perf_regs.h | 1 + tools/arch/xtensa/include/uapi/asm/mman.h | 1 + 930 files changed, 930 insertions(+) commit b24413180f5600bcb3bb70fbed5cf186b60864bd Author: Greg Kroah-Hartman Date: Wed Nov 1 15:07:57 2017 +0100 License cleanup: add SPDX GPL-2.0 license identifier to files with no license Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart Reviewed-by: Philippe Ombredanne Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman Kbuild | 1 + Kconfig | 1 + Makefile | 1 + arch/Kconfig | 1 + arch/alpha/Kconfig | 1 + arch/alpha/Kconfig.debug | 1 + arch/alpha/boot/bootloader.lds | 1 + arch/alpha/boot/bootp.c | 1 + arch/alpha/boot/bootpz.c | 1 + arch/alpha/boot/head.S | 1 + arch/alpha/boot/main.c | 1 + arch/alpha/boot/misc.c | 1 + arch/alpha/boot/tools/mkbb.c | 1 + arch/alpha/boot/tools/objstrip.c | 1 + arch/alpha/include/asm/Kbuild | 1 + arch/alpha/include/asm/a.out.h | 1 + arch/alpha/include/asm/agp.h | 1 + arch/alpha/include/asm/agp_backend.h | 1 + arch/alpha/include/asm/atomic.h | 1 + arch/alpha/include/asm/barrier.h | 1 + arch/alpha/include/asm/bitops.h | 1 + arch/alpha/include/asm/bug.h | 1 + arch/alpha/include/asm/cache.h | 1 + arch/alpha/include/asm/cacheflush.h | 1 + arch/alpha/include/asm/checksum.h | 1 + arch/alpha/include/asm/cmpxchg.h | 1 + arch/alpha/include/asm/compiler.h | 1 + arch/alpha/include/asm/console.h | 1 + arch/alpha/include/asm/core_apecs.h | 1 + arch/alpha/include/asm/core_cia.h | 1 + arch/alpha/include/asm/core_irongate.h | 1 + arch/alpha/include/asm/core_lca.h | 1 + arch/alpha/include/asm/core_marvel.h | 1 + arch/alpha/include/asm/core_mcpcia.h | 1 + arch/alpha/include/asm/core_polaris.h | 1 + arch/alpha/include/asm/core_t2.h | 1 + arch/alpha/include/asm/core_titan.h | 1 + arch/alpha/include/asm/core_tsunami.h | 1 + arch/alpha/include/asm/core_wildfire.h | 1 + arch/alpha/include/asm/delay.h | 1 + arch/alpha/include/asm/dma-mapping.h | 1 + arch/alpha/include/asm/dma.h | 1 + arch/alpha/include/asm/elf.h | 1 + arch/alpha/include/asm/err_common.h | 1 + arch/alpha/include/asm/err_ev7.h | 1 + arch/alpha/include/asm/extable.h | 1 + arch/alpha/include/asm/fpu.h | 1 + arch/alpha/include/asm/futex.h | 1 + arch/alpha/include/asm/gct.h | 1 + arch/alpha/include/asm/hardirq.h | 1 + arch/alpha/include/asm/hw_irq.h | 1 + arch/alpha/include/asm/hwrpb.h | 1 + arch/alpha/include/asm/io.h | 1 + arch/alpha/include/asm/io_trivial.h | 1 + arch/alpha/include/asm/irq.h | 1 + arch/alpha/include/asm/irqflags.h | 1 + arch/alpha/include/asm/jensen.h | 1 + arch/alpha/include/asm/kmap_types.h | 1 + arch/alpha/include/asm/linkage.h | 1 + arch/alpha/include/asm/local.h | 1 + arch/alpha/include/asm/machvec.h | 1 + arch/alpha/include/asm/mc146818rtc.h | 1 + arch/alpha/include/asm/mce.h | 1 + arch/alpha/include/asm/mmu.h | 1 + arch/alpha/include/asm/mmu_context.h | 1 + arch/alpha/include/asm/mmzone.h | 1 + arch/alpha/include/asm/module.h | 1 + arch/alpha/include/asm/page.h | 1 + arch/alpha/include/asm/pal.h | 1 + arch/alpha/include/asm/param.h | 1 + arch/alpha/include/asm/parport.h | 1 + arch/alpha/include/asm/pci.h | 1 + arch/alpha/include/asm/percpu.h | 1 + arch/alpha/include/asm/pgalloc.h | 1 + arch/alpha/include/asm/pgtable.h | 1 + arch/alpha/include/asm/processor.h | 1 + arch/alpha/include/asm/ptrace.h | 1 + arch/alpha/include/asm/rwsem.h | 1 + arch/alpha/include/asm/serial.h | 1 + arch/alpha/include/asm/shmparam.h | 1 + arch/alpha/include/asm/signal.h | 1 + arch/alpha/include/asm/smp.h | 1 + arch/alpha/include/asm/socket.h | 1 + arch/alpha/include/asm/special_insns.h | 1 + arch/alpha/include/asm/spinlock.h | 1 + arch/alpha/include/asm/spinlock_types.h | 1 + arch/alpha/include/asm/string.h | 1 + arch/alpha/include/asm/switch_to.h | 1 + arch/alpha/include/asm/syscall.h | 1 + arch/alpha/include/asm/termios.h | 1 + arch/alpha/include/asm/thread_info.h | 1 + arch/alpha/include/asm/timex.h | 1 + arch/alpha/include/asm/tlb.h | 1 + arch/alpha/include/asm/tlbflush.h | 1 + arch/alpha/include/asm/topology.h | 1 + arch/alpha/include/asm/types.h | 1 + arch/alpha/include/asm/uaccess.h | 1 + arch/alpha/include/asm/ucontext.h | 1 + arch/alpha/include/asm/unaligned.h | 1 + arch/alpha/include/asm/unistd.h | 1 + arch/alpha/include/asm/user.h | 1 + arch/alpha/include/asm/vga.h | 1 + arch/alpha/include/asm/word-at-a-time.h | 1 + arch/alpha/include/asm/wrperfmon.h | 1 + arch/alpha/include/asm/xchg.h | 1 + arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/asm-offsets.c | 1 + arch/alpha/kernel/binfmt_loader.c | 1 + arch/alpha/kernel/console.c | 1 + arch/alpha/kernel/core_apecs.c | 1 + arch/alpha/kernel/core_cia.c | 1 + arch/alpha/kernel/core_irongate.c | 1 + arch/alpha/kernel/core_lca.c | 1 + arch/alpha/kernel/core_marvel.c | 1 + arch/alpha/kernel/core_mcpcia.c | 1 + arch/alpha/kernel/core_polaris.c | 1 + arch/alpha/kernel/core_t2.c | 1 + arch/alpha/kernel/core_titan.c | 1 + arch/alpha/kernel/core_tsunami.c | 1 + arch/alpha/kernel/core_wildfire.c | 1 + arch/alpha/kernel/entry.S | 1 + arch/alpha/kernel/err_common.c | 1 + arch/alpha/kernel/err_ev6.c | 1 + arch/alpha/kernel/err_ev7.c | 1 + arch/alpha/kernel/err_impl.h | 1 + arch/alpha/kernel/err_marvel.c | 1 + arch/alpha/kernel/err_titan.c | 1 + arch/alpha/kernel/es1888.c | 1 + arch/alpha/kernel/gct.c | 1 + arch/alpha/kernel/head.S | 1 + arch/alpha/kernel/io.c | 1 + arch/alpha/kernel/irq.c | 1 + arch/alpha/kernel/irq_alpha.c | 1 + arch/alpha/kernel/irq_i8259.c | 1 + arch/alpha/kernel/irq_impl.h | 1 + arch/alpha/kernel/irq_pyxis.c | 1 + arch/alpha/kernel/irq_srm.c | 1 + arch/alpha/kernel/machvec_impl.h | 1 + arch/alpha/kernel/osf_sys.c | 1 + arch/alpha/kernel/pc873xx.c | 1 + arch/alpha/kernel/pc873xx.h | 1 + arch/alpha/kernel/pci-noop.c | 1 + arch/alpha/kernel/pci-sysfs.c | 1 + arch/alpha/kernel/pci.c | 1 + arch/alpha/kernel/pci_impl.h | 1 + arch/alpha/kernel/pci_iommu.c | 1 + arch/alpha/kernel/perf_event.c | 1 + arch/alpha/kernel/process.c | 1 + arch/alpha/kernel/proto.h | 1 + arch/alpha/kernel/ptrace.c | 1 + arch/alpha/kernel/rtc.c | 1 + arch/alpha/kernel/setup.c | 1 + arch/alpha/kernel/signal.c | 1 + arch/alpha/kernel/smc37c93x.c | 1 + arch/alpha/kernel/smp.c | 1 + arch/alpha/kernel/srmcons.c | 1 + arch/alpha/kernel/sys_alcor.c | 1 + arch/alpha/kernel/sys_cabriolet.c | 1 + arch/alpha/kernel/sys_dp264.c | 1 + arch/alpha/kernel/sys_eb64p.c | 1 + arch/alpha/kernel/sys_eiger.c | 1 + arch/alpha/kernel/sys_jensen.c | 1 + arch/alpha/kernel/sys_marvel.c | 1 + arch/alpha/kernel/sys_miata.c | 1 + arch/alpha/kernel/sys_mikasa.c | 1 + arch/alpha/kernel/sys_nautilus.c | 1 + arch/alpha/kernel/sys_noritake.c | 1 + arch/alpha/kernel/sys_rawhide.c | 1 + arch/alpha/kernel/sys_ruffian.c | 1 + arch/alpha/kernel/sys_rx164.c | 1 + arch/alpha/kernel/sys_sable.c | 1 + arch/alpha/kernel/sys_sio.c | 1 + arch/alpha/kernel/sys_sx164.c | 1 + arch/alpha/kernel/sys_takara.c | 1 + arch/alpha/kernel/sys_titan.c | 1 + arch/alpha/kernel/sys_wildfire.c | 1 + arch/alpha/kernel/systbls.S | 1 + arch/alpha/kernel/time.c | 1 + arch/alpha/kernel/traps.c | 1 + arch/alpha/kernel/vmlinux.lds.S | 1 + arch/alpha/lib/Makefile | 1 + arch/alpha/lib/callback_srm.S | 1 + arch/alpha/lib/checksum.c | 1 + arch/alpha/lib/clear_page.S | 1 + arch/alpha/lib/clear_user.S | 1 + arch/alpha/lib/copy_page.S | 1 + arch/alpha/lib/copy_user.S | 1 + arch/alpha/lib/csum_ipv6_magic.S | 1 + arch/alpha/lib/csum_partial_copy.c | 1 + arch/alpha/lib/dbg_current.S | 1 + arch/alpha/lib/dbg_stackcheck.S | 1 + arch/alpha/lib/dbg_stackkill.S | 1 + arch/alpha/lib/dec_and_lock.c | 1 + arch/alpha/lib/divide.S | 1 + arch/alpha/lib/ev6-clear_page.S | 1 + arch/alpha/lib/ev6-clear_user.S | 1 + arch/alpha/lib/ev6-copy_page.S | 1 + arch/alpha/lib/ev6-copy_user.S | 1 + arch/alpha/lib/ev6-csum_ipv6_magic.S | 1 + arch/alpha/lib/ev6-divide.S | 1 + arch/alpha/lib/ev6-memchr.S | 1 + arch/alpha/lib/ev6-memcpy.S | 1 + arch/alpha/lib/ev6-memset.S | 1 + arch/alpha/lib/ev6-stxcpy.S | 1 + arch/alpha/lib/ev6-stxncpy.S | 1 + arch/alpha/lib/ev67-strcat.S | 1 + arch/alpha/lib/ev67-strchr.S | 1 + arch/alpha/lib/ev67-strlen.S | 1 + arch/alpha/lib/ev67-strncat.S | 1 + arch/alpha/lib/ev67-strrchr.S | 1 + arch/alpha/lib/fls.c | 1 + arch/alpha/lib/fpreg.c | 1 + arch/alpha/lib/memcpy.c | 1 + arch/alpha/lib/memmove.S | 1 + arch/alpha/lib/memset.S | 1 + arch/alpha/lib/srm_printk.c | 1 + arch/alpha/lib/srm_puts.c | 1 + arch/alpha/lib/stacktrace.c | 1 + arch/alpha/lib/strcat.S | 1 + arch/alpha/lib/strchr.S | 1 + arch/alpha/lib/strcpy.S | 1 + arch/alpha/lib/strlen.S | 1 + arch/alpha/lib/strncat.S | 1 + arch/alpha/lib/strncpy.S | 1 + arch/alpha/lib/strrchr.S | 1 + arch/alpha/lib/stxcpy.S | 1 + arch/alpha/lib/stxncpy.S | 1 + arch/alpha/lib/udelay.c | 1 + arch/alpha/math-emu/sfp-util.h | 1 + arch/alpha/mm/fault.c | 1 + arch/alpha/mm/init.c | 1 + arch/alpha/mm/numa.c | 1 + arch/alpha/oprofile/Makefile | 1 + arch/arc/Kconfig.debug | 1 + arch/arc/boot/Makefile | 1 + arch/arc/boot/dts/Makefile | 1 + arch/arc/include/asm/Kbuild | 1 + arch/arc/include/asm/entry-arcv2.h | 1 + arch/arc/include/asm/fb.h | 1 + arch/arc/kernel/sys.c | 1 + arch/arc/oprofile/Makefile | 1 + arch/arc/plat-eznps/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/arm/Kconfig-nommu | 1 + arch/arm/Kconfig.debug | 1 + arch/arm/boot/bootp/Makefile | 1 + arch/arm/boot/bootp/initrd.S | 1 + arch/arm/boot/bootp/kernel.S | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/boot/compressed/atags_to_fdt.c | 1 + arch/arm/boot/compressed/big-endian.S | 1 + arch/arm/boot/compressed/debug.S | 1 + arch/arm/boot/compressed/decompress.c | 1 + arch/arm/boot/compressed/head-sa1100.S | 1 + arch/arm/boot/compressed/head-sharpsl.S | 1 + arch/arm/boot/compressed/head-xscale.S | 1 + arch/arm/boot/compressed/libfdt_env.h | 1 + arch/arm/boot/compressed/misc.c | 1 + arch/arm/boot/compressed/piggy.S | 1 + arch/arm/boot/compressed/string.c | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am57xx-commercial-grade.dtsi | 1 + arch/arm/boot/dts/am57xx-industrial-grade.dtsi | 1 + arch/arm/boot/dts/armv7-m.dtsi | 1 + arch/arm/boot/dts/aspeed-ast2500-evb.dts | 1 + arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 1 + arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 1 + arch/arm/boot/dts/aspeed-g4.dtsi | 1 + arch/arm/boot/dts/aspeed-g5.dtsi | 1 + arch/arm/boot/dts/at91-ariettag25.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2835.dtsi | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm2836.dtsi | 1 + arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 1 + arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi | 1 + arch/arm/boot/dts/bcm63138.dtsi | 1 + arch/arm/boot/dts/bcm7445-bcm97445svmb.dts | 1 + arch/arm/boot/dts/bcm7445.dtsi | 1 + arch/arm/boot/dts/bcm963138dvt.dts | 1 + arch/arm/boot/dts/dove-cubox-es.dts | 1 + arch/arm/boot/dts/dove-cubox.dts | 1 + arch/arm/boot/dts/dove-d2plug.dts | 1 + arch/arm/boot/dts/dove-d3plug.dts | 1 + arch/arm/boot/dts/dove-dove-db.dts | 1 + arch/arm/boot/dts/dove.dtsi | 1 + arch/arm/boot/dts/efm32gg-dk3750.dts | 1 + arch/arm/boot/dts/efm32gg.dtsi | 1 + arch/arm/boot/dts/elpida_ecb240abacn.dtsi | 1 + arch/arm/boot/dts/gemini-nas4220b.dts | 1 + arch/arm/boot/dts/gemini-rut1xx.dts | 1 + arch/arm/boot/dts/gemini-sq201.dts | 1 + arch/arm/boot/dts/gemini-wbd111.dts | 1 + arch/arm/boot/dts/gemini-wbd222.dts | 1 + arch/arm/boot/dts/gemini.dtsi | 1 + arch/arm/boot/dts/imx28-apx4devkit.dts | 1 + arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi | 1 + arch/arm/boot/dts/integrator.dtsi | 1 + arch/arm/boot/dts/integratorap.dts | 1 + arch/arm/boot/dts/integratorcp.dts | 1 + arch/arm/boot/dts/kirkwood-6192.dtsi | 1 + arch/arm/boot/dts/kirkwood-6281.dtsi | 1 + arch/arm/boot/dts/kirkwood-6282.dtsi | 1 + arch/arm/boot/dts/kirkwood-98dx4122.dtsi | 1 + arch/arm/boot/dts/kirkwood-cloudbox.dts | 1 + arch/arm/boot/dts/kirkwood-dns320.dts | 1 + arch/arm/boot/dts/kirkwood-dns325.dts | 1 + arch/arm/boot/dts/kirkwood-dnskw.dtsi | 1 + arch/arm/boot/dts/kirkwood-dockstar.dts | 1 + arch/arm/boot/dts/kirkwood-dreamplug.dts | 1 + arch/arm/boot/dts/kirkwood-goflexnet.dts | 1 + arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts | 1 + arch/arm/boot/dts/kirkwood-ib62x0.dts | 1 + arch/arm/boot/dts/kirkwood-iconnect.dts | 1 + arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 1 + arch/arm/boot/dts/kirkwood-is2.dts | 1 + arch/arm/boot/dts/kirkwood-km_common.dtsi | 1 + arch/arm/boot/dts/kirkwood-km_fixedeth.dts | 1 + arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 1 + arch/arm/boot/dts/kirkwood-lschlv2.dts | 1 + arch/arm/boot/dts/kirkwood-lsxhl.dts | 1 + arch/arm/boot/dts/kirkwood-lsxl.dtsi | 1 + arch/arm/boot/dts/kirkwood-mplcec4.dts | 1 + arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 1 + arch/arm/boot/dts/kirkwood-ns2.dts | 1 + arch/arm/boot/dts/kirkwood-ns2lite.dts | 1 + arch/arm/boot/dts/kirkwood-ns2max.dts | 1 + arch/arm/boot/dts/kirkwood-ns2mini.dts | 1 + arch/arm/boot/dts/kirkwood-nsa310.dts | 1 + arch/arm/boot/dts/kirkwood-nsa310a.dts | 1 + arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi | 1 + arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 1 + arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts | 1 + arch/arm/boot/dts/kirkwood-topkick.dts | 1 + arch/arm/boot/dts/kirkwood-ts219-6281.dts | 1 + arch/arm/boot/dts/kirkwood-ts219-6282.dts | 1 + arch/arm/boot/dts/kirkwood-ts219.dtsi | 1 + arch/arm/boot/dts/kirkwood.dtsi | 1 + arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi | 1 + arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi | 1 + arch/arm/boot/dts/omap-zoom-common.dtsi | 1 + arch/arm/boot/dts/omap2420-n800.dts | 1 + arch/arm/boot/dts/omap2420-n810-wimax.dts | 1 + arch/arm/boot/dts/omap2420-n810.dts | 1 + arch/arm/boot/dts/omap2420-n8x0-common.dtsi | 1 + arch/arm/boot/dts/omap3-cm-t3517.dts | 1 + arch/arm/boot/dts/omap3-cm-t3530.dts | 1 + arch/arm/boot/dts/omap3-cm-t3730.dts | 1 + arch/arm/boot/dts/omap3-cm-t3x.dtsi | 1 + arch/arm/boot/dts/omap3-cm-t3x30.dtsi | 1 + arch/arm/boot/dts/omap3-evm-common.dtsi | 1 + arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi | 1 + arch/arm/boot/dts/omap3-sb-t35.dtsi | 1 + arch/arm/boot/dts/omap3-sbc-t3517.dts | 1 + arch/arm/boot/dts/omap3-sbc-t3530.dts | 1 + arch/arm/boot/dts/omap3-sbc-t3730.dts | 1 + arch/arm/boot/dts/omap5-cm-t54.dts | 1 + arch/arm/boot/dts/omap5-sbc-t54.dts | 1 + arch/arm/boot/dts/pxa27x.dtsi | 1 + arch/arm/boot/dts/pxa3xx.dtsi | 1 + arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval-pins.dtsi | 1 + arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts | 1 + arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 1 + arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 1 + arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 1 + arch/arm/boot/dts/qcom-apq8064-pins.dtsi | 1 + arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts | 1 + arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi | 1 + arch/arm/boot/dts/qcom-apq8064.dtsi | 1 + arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 1 + arch/arm/boot/dts/qcom-apq8084-ifc6540.dts | 1 + arch/arm/boot/dts/qcom-apq8084-mtp.dts | 1 + arch/arm/boot/dts/qcom-apq8084.dtsi | 1 + arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 1 + arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 1 + arch/arm/boot/dts/qcom-ipq8064.dtsi | 1 + arch/arm/boot/dts/qcom-msm8660-surf.dts | 1 + arch/arm/boot/dts/qcom-msm8660.dtsi | 1 + arch/arm/boot/dts/qcom-msm8960-cdp.dts | 1 + arch/arm/boot/dts/qcom-msm8960.dtsi | 1 + arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 1 + arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 + arch/arm/boot/dts/qcom-msm8974.dtsi | 1 + arch/arm/boot/dts/qcom-pm8841.dtsi | 1 + arch/arm/boot/dts/qcom-pm8941.dtsi | 1 + arch/arm/boot/dts/qcom-pma8084.dtsi | 1 + arch/arm/boot/dts/sama5d2-pinfunc.h | 1 + arch/arm/boot/dts/samsung_k3pe0e000b.dtsi | 1 + arch/arm/boot/dts/skeleton.dtsi | 1 + arch/arm/boot/dts/skeleton64.dtsi | 1 + arch/arm/boot/dts/st-pincfg.h | 1 + arch/arm/boot/dts/ste-nomadik-nhk15.dts | 1 + arch/arm/boot/dts/ste-nomadik-s8815.dts | 1 + arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 1 + arch/arm/boot/dts/ste-u300.dts | 1 + arch/arm/boot/dts/tango4-common.dtsi | 1 + arch/arm/boot/dts/tango4-smp8758.dtsi | 1 + arch/arm/boot/dts/tango4-vantage-1172.dts | 1 + arch/arm/boot/dts/tegra114-dalmore.dts | 1 + arch/arm/boot/dts/tegra114-roth.dts | 1 + arch/arm/boot/dts/tegra114-tn7.dts | 1 + arch/arm/boot/dts/tegra114.dtsi | 1 + arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi | 1 + arch/arm/boot/dts/tegra124-jetson-tk1.dts | 1 + arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi | 1 + arch/arm/boot/dts/tegra124-nyan-big.dts | 1 + arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi | 1 + arch/arm/boot/dts/tegra124-nyan-blaze.dts | 1 + arch/arm/boot/dts/tegra124-nyan.dtsi | 1 + arch/arm/boot/dts/tegra124-venice2.dts | 1 + arch/arm/boot/dts/tegra124.dtsi | 1 + arch/arm/boot/dts/tegra20-colibri-512.dtsi | 1 + arch/arm/boot/dts/tegra20-harmony.dts | 1 + arch/arm/boot/dts/tegra20-iris-512.dts | 1 + arch/arm/boot/dts/tegra20-medcom-wide.dts | 1 + arch/arm/boot/dts/tegra20-paz00.dts | 1 + arch/arm/boot/dts/tegra20-plutux.dts | 1 + arch/arm/boot/dts/tegra20-seaboard.dts | 1 + arch/arm/boot/dts/tegra20-tamonten.dtsi | 1 + arch/arm/boot/dts/tegra20-tec.dts | 1 + arch/arm/boot/dts/tegra20-trimslice.dts | 1 + arch/arm/boot/dts/tegra20-ventana.dts | 1 + arch/arm/boot/dts/tegra20.dtsi | 1 + arch/arm/boot/dts/tegra30-apalis-eval.dts | 1 + arch/arm/boot/dts/tegra30-apalis.dtsi | 1 + arch/arm/boot/dts/tegra30-beaver.dts | 1 + arch/arm/boot/dts/tegra30-cardhu-a02.dts | 1 + arch/arm/boot/dts/tegra30-cardhu-a04.dts | 1 + arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 + arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 1 + arch/arm/boot/dts/tegra30-colibri.dtsi | 1 + arch/arm/boot/dts/tegra30.dtsi | 1 + arch/arm/boot/dts/versatile-ab.dts | 1 + arch/arm/boot/dts/versatile-pb.dts | 1 + arch/arm/boot/dts/vexpress-v2m.dtsi | 1 + arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts | 1 + arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 1 + arch/arm/boot/dts/vexpress-v2p-ca5s.dts | 1 + arch/arm/boot/dts/vexpress-v2p-ca9.dts | 1 + arch/arm/boot/dts/xenvm-4.2.dts | 1 + arch/arm/boot/dts/zx296702-ad1.dts | 1 + arch/arm/boot/dts/zx296702.dtsi | 1 + arch/arm/common/Kconfig | 1 + arch/arm/common/Makefile | 1 + arch/arm/crypto/Kconfig | 1 + arch/arm/crypto/Makefile | 1 + arch/arm/crypto/sha1.h | 1 + arch/arm/crypto/sha256_glue.h | 1 + arch/arm/crypto/sha512.h | 1 + arch/arm/include/asm/arch_timer.h | 1 + arch/arm/include/asm/barrier.h | 1 + arch/arm/include/asm/bitops.h | 1 + arch/arm/include/asm/bitrev.h | 1 + arch/arm/include/asm/bug.h | 1 + arch/arm/include/asm/cache.h | 1 + arch/arm/include/asm/cachetype.h | 1 + arch/arm/include/asm/checksum.h | 1 + arch/arm/include/asm/cmpxchg.h | 1 + arch/arm/include/asm/compiler.h | 1 + arch/arm/include/asm/cp15.h | 1 + arch/arm/include/asm/cpuidle.h | 1 + arch/arm/include/asm/cputype.h | 1 + arch/arm/include/asm/cti.h | 1 + arch/arm/include/asm/delay.h | 1 + arch/arm/include/asm/div64.h | 1 + arch/arm/include/asm/dma-contiguous.h | 1 + arch/arm/include/asm/dma-iommu.h | 1 + arch/arm/include/asm/dma-mapping.h | 1 + arch/arm/include/asm/dma.h | 1 + arch/arm/include/asm/ecard.h | 1 + arch/arm/include/asm/elf.h | 1 + arch/arm/include/asm/entry-macro-multi.S | 1 + arch/arm/include/asm/exception.h | 1 + arch/arm/include/asm/fiq.h | 1 + arch/arm/include/asm/fixmap.h | 1 + arch/arm/include/asm/flat.h | 1 + arch/arm/include/asm/ftrace.h | 1 + arch/arm/include/asm/futex.h | 1 + arch/arm/include/asm/gpio.h | 1 + arch/arm/include/asm/hardirq.h | 1 + arch/arm/include/asm/hardware/it8152.h | 1 + arch/arm/include/asm/hardware/sa1111.h | 1 + arch/arm/include/asm/highmem.h | 1 + arch/arm/include/asm/hw_breakpoint.h | 1 + arch/arm/include/asm/hw_irq.h | 1 + arch/arm/include/asm/hwcap.h | 1 + arch/arm/include/asm/hypervisor.h | 1 + arch/arm/include/asm/ide.h | 1 + arch/arm/include/asm/idmap.h | 1 + arch/arm/include/asm/insn.h | 1 + arch/arm/include/asm/irq.h | 1 + arch/arm/include/asm/irq_work.h | 1 + arch/arm/include/asm/irqflags.h | 1 + arch/arm/include/asm/jump_label.h | 1 + arch/arm/include/asm/kexec.h | 1 + arch/arm/include/asm/kgdb.h | 1 + arch/arm/include/asm/kmap_types.h | 1 + arch/arm/include/asm/limits.h | 1 + arch/arm/include/asm/linkage.h | 1 + arch/arm/include/asm/mc146818rtc.h | 1 + arch/arm/include/asm/mcs_spinlock.h | 1 + arch/arm/include/asm/memblock.h | 1 + arch/arm/include/asm/mmu.h | 1 + arch/arm/include/asm/module.h | 1 + arch/arm/include/asm/mpu.h | 1 + arch/arm/include/asm/nwflash.h | 1 + arch/arm/include/asm/paravirt.h | 1 + arch/arm/include/asm/patch.h | 1 + arch/arm/include/asm/pci.h | 1 + arch/arm/include/asm/sections.h | 1 + arch/arm/include/asm/shmparam.h | 1 + arch/arm/include/asm/signal.h | 1 + arch/arm/include/asm/smp_plat.h | 1 + arch/arm/include/asm/smp_scu.h | 1 + arch/arm/include/asm/smp_twd.h | 1 + arch/arm/include/asm/sparsemem.h | 1 + arch/arm/include/asm/spinlock.h | 1 + arch/arm/include/asm/spinlock_types.h | 1 + arch/arm/include/asm/stackprotector.h | 1 + arch/arm/include/asm/stacktrace.h | 1 + arch/arm/include/asm/string.h | 1 + arch/arm/include/asm/suspend.h | 1 + arch/arm/include/asm/swab.h | 1 + arch/arm/include/asm/switch_to.h | 1 + arch/arm/include/asm/sync_bitops.h | 1 + arch/arm/include/asm/syscall.h | 1 + arch/arm/include/asm/system_info.h | 1 + arch/arm/include/asm/system_misc.h | 1 + arch/arm/include/asm/therm.h | 1 + arch/arm/include/asm/tls.h | 1 + arch/arm/include/asm/topology.h | 1 + arch/arm/include/asm/traps.h | 1 + arch/arm/include/asm/ucontext.h | 1 + arch/arm/include/asm/user.h | 1 + arch/arm/include/asm/v7m.h | 1 + arch/arm/include/asm/vdso.h | 1 + arch/arm/include/asm/vfp.h | 1 + arch/arm/include/asm/vfpmacros.h | 1 + arch/arm/include/asm/vga.h | 1 + arch/arm/include/asm/word-at-a-time.h | 1 + arch/arm/include/asm/xen/events.h | 1 + arch/arm/include/debug/palmchip.S | 1 + arch/arm/include/debug/uncompress.h | 1 + arch/arm/include/uapi/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 1 + arch/arm/kernel/atags.h | 1 + arch/arm/kernel/atags_proc.c | 1 + arch/arm/kernel/bios32.c | 1 + arch/arm/kernel/elf.c | 1 + arch/arm/kernel/entry-header.S | 1 + arch/arm/kernel/fiq.c | 1 + arch/arm/kernel/insn.c | 1 + arch/arm/kernel/io.c | 1 + arch/arm/kernel/jump_label.c | 1 + arch/arm/kernel/kgdb.c | 1 + arch/arm/kernel/machine_kexec.c | 1 + arch/arm/kernel/module.lds | 1 + arch/arm/kernel/patch.c | 1 + arch/arm/kernel/perf_callchain.c | 1 + arch/arm/kernel/perf_event_v6.c | 1 + arch/arm/kernel/perf_event_v7.c | 1 + arch/arm/kernel/perf_event_xscale.c | 1 + arch/arm/kernel/perf_regs.c | 1 + arch/arm/kernel/reboot.h | 1 + arch/arm/kernel/relocate_kernel.S | 1 + arch/arm/kernel/sleep.S | 1 + arch/arm/kernel/suspend.c | 1 + arch/arm/kernel/vmlinux-xip.lds.S | 1 + arch/arm/kernel/vmlinux.lds.S | 1 + arch/arm/kvm/Kconfig | 1 + arch/arm/kvm/Makefile | 1 + arch/arm/kvm/hyp/Makefile | 1 + arch/arm/kvm/trace.h | 1 + arch/arm/lib/Makefile | 1 + arch/arm/lib/bitops.h | 1 + arch/arm/lib/bswapsdi2.S | 1 + arch/arm/mach-actions/Kconfig | 1 + arch/arm/mach-alpine/Kconfig | 1 + arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/pm_data-offsets.c | 1 + arch/arm/mach-axxia/Kconfig | 1 + arch/arm/mach-axxia/Makefile | 1 + arch/arm/mach-bcm/Kconfig | 1 + arch/arm/mach-bcm/bcm63xx_smp.h | 1 + arch/arm/mach-clps711x/Kconfig | 1 + arch/arm/mach-clps711x/Makefile | 1 + arch/arm/mach-cns3xxx/Kconfig | 1 + arch/arm/mach-cns3xxx/Makefile | 1 + arch/arm/mach-davinci/Kconfig | 1 + arch/arm/mach-davinci/Makefile | 1 + arch/arm/mach-davinci/Makefile.boot | 1 + arch/arm/mach-davinci/asp.h | 1 + arch/arm/mach-davinci/ddr2.h | 1 + arch/arm/mach-davinci/usb-da8xx.c | 1 + arch/arm/mach-davinci/usb.c | 1 + arch/arm/mach-digicolor/Kconfig | 1 + arch/arm/mach-dove/Kconfig | 1 + arch/arm/mach-dove/Makefile | 1 + arch/arm/mach-dove/mpp.h | 1 + arch/arm/mach-ebsa110/io.c | 1 + arch/arm/mach-efm32/dtmachine.c | 1 + arch/arm/mach-ep93xx/Makefile | 1 + arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 1 + arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | 1 + arch/arm/mach-ep93xx/include/mach/hardware.h | 1 + arch/arm/mach-ep93xx/include/mach/irqs.h | 1 + arch/arm/mach-ep93xx/include/mach/platform.h | 1 + arch/arm/mach-ep93xx/timer-ep93xx.c | 1 + arch/arm/mach-ep93xx/ts72xx.h | 1 + arch/arm/mach-footbridge/Makefile | 1 + arch/arm/mach-footbridge/cats-hw.c | 1 + arch/arm/mach-footbridge/cats-pci.c | 1 + arch/arm/mach-footbridge/common.h | 1 + arch/arm/mach-footbridge/dc21285-timer.c | 1 + arch/arm/mach-footbridge/dma.c | 1 + arch/arm/mach-footbridge/ebsa285-pci.c | 1 + arch/arm/mach-footbridge/ebsa285.c | 1 + arch/arm/mach-footbridge/include/mach/irqs.h | 1 + arch/arm/mach-footbridge/include/mach/isa-dma.h | 1 + arch/arm/mach-footbridge/isa-rtc.c | 1 + arch/arm/mach-footbridge/isa-timer.c | 1 + arch/arm/mach-footbridge/netwinder-hw.c | 1 + arch/arm/mach-footbridge/netwinder-pci.c | 1 + arch/arm/mach-footbridge/personal-pci.c | 1 + arch/arm/mach-footbridge/personal.c | 1 + arch/arm/mach-gemini/board-dt.c | 1 + arch/arm/mach-highbank/core.h | 1 + arch/arm/mach-hisi/core.h | 1 + arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/cpu.c | 1 + arch/arm/mach-imx/devices/Makefile | 1 + arch/arm/mach-imx/ehci.h | 1 + arch/arm/mach-imx/mx31.h | 1 + arch/arm/mach-imx/mx35.h | 1 + arch/arm/mach-imx/pcm037.h | 1 + arch/arm/mach-imx/ulpi.h | 1 + arch/arm/mach-integrator/Makefile | 1 + arch/arm/mach-integrator/cm.h | 1 + arch/arm/mach-integrator/common.h | 1 + arch/arm/mach-integrator/impd1.h | 1 + arch/arm/mach-integrator/lm.h | 1 + arch/arm/mach-integrator/pci_v3.h | 1 + arch/arm/mach-iop13xx/Kconfig | 1 + arch/arm/mach-iop13xx/Makefile | 1 + arch/arm/mach-iop13xx/include/mach/hardware.h | 1 + arch/arm/mach-iop13xx/include/mach/iop13xx.h | 1 + arch/arm/mach-iop13xx/include/mach/iq81340.h | 1 + arch/arm/mach-iop13xx/include/mach/irqs.h | 1 + arch/arm/mach-iop13xx/include/mach/memory.h | 1 + arch/arm/mach-iop13xx/include/mach/time.h | 1 + arch/arm/mach-iop13xx/include/mach/uncompress.h | 1 + arch/arm/mach-iop13xx/msi.h | 1 + arch/arm/mach-iop13xx/pci.h | 1 + arch/arm/mach-iop32x/Kconfig | 1 + arch/arm/mach-iop32x/Makefile | 1 + arch/arm/mach-iop32x/gpio-iop32x.h | 1 + arch/arm/mach-iop32x/include/mach/adma.h | 1 + arch/arm/mach-iop32x/include/mach/glantank.h | 1 + arch/arm/mach-iop32x/include/mach/hardware.h | 1 + arch/arm/mach-iop32x/include/mach/iq31244.h | 1 + arch/arm/mach-iop32x/include/mach/iq80321.h | 1 + arch/arm/mach-iop32x/include/mach/n2100.h | 1 + arch/arm/mach-iop32x/include/mach/time.h | 1 + arch/arm/mach-iop32x/include/mach/uncompress.h | 1 + arch/arm/mach-iop33x/include/mach/adma.h | 1 + arch/arm/mach-iop33x/include/mach/hardware.h | 1 + arch/arm/mach-iop33x/include/mach/iq80331.h | 1 + arch/arm/mach-iop33x/include/mach/iq80332.h | 1 + arch/arm/mach-iop33x/include/mach/time.h | 1 + arch/arm/mach-iop33x/include/mach/uncompress.h | 1 + arch/arm/mach-ixp4xx/Makefile | 1 + arch/arm/mach-ixp4xx/avila-setup.c | 1 + arch/arm/mach-ixp4xx/coyote-setup.c | 1 + arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 + arch/arm/mach-ixp4xx/fsg-setup.c | 1 + arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 + arch/arm/mach-ixp4xx/goramo_mlr.c | 1 + arch/arm/mach-ixp4xx/include/mach/npe.h | 1 + arch/arm/mach-ixp4xx/include/mach/platform.h | 1 + arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 + arch/arm/mach-ixp4xx/nas100d-setup.c | 1 + arch/arm/mach-ixp4xx/nslu2-setup.c | 1 + arch/arm/mach-ixp4xx/vulcan-setup.c | 1 + arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 + arch/arm/mach-keystone/Makefile | 1 + arch/arm/mach-ks8695/Makefile | 1 + arch/arm/mach-mmp/Makefile | 1 + arch/arm/mach-mmp/clock-mmp2.c | 1 + arch/arm/mach-mmp/clock-pxa168.c | 1 + arch/arm/mach-mmp/clock-pxa910.c | 1 + arch/arm/mach-mmp/common.h | 1 + arch/arm/mach-mmp/cputype.h | 1 + arch/arm/mach-mmp/devices.h | 1 + arch/arm/mach-mmp/irqs.h | 1 + arch/arm/mach-mmp/mfp-mmp2.h | 1 + arch/arm/mach-mmp/mfp-pxa168.h | 1 + arch/arm/mach-mmp/mfp-pxa910.h | 1 + arch/arm/mach-mmp/mfp.h | 1 + arch/arm/mach-mmp/mmp2.h | 1 + arch/arm/mach-mmp/pxa168.h | 1 + arch/arm/mach-mmp/pxa910.h | 1 + arch/arm/mach-mv78xx0/Makefile | 1 + arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-omap1/Makefile | 1 + arch/arm/mach-omap1/camera.h | 1 + arch/arm/mach-omap1/include/mach/memory.h | 1 + arch/arm/mach-omap1/include/mach/usb.h | 1 + arch/arm/mach-omap1/mmc.h | 1 + arch/arm/mach-omap1/reset.c | 1 + arch/arm/mach-omap1/sram.h | 1 + arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/clock2xxx.h | 1 + arch/arm/mach-omap2/clock3xxx.h | 1 + arch/arm/mach-omap2/clockdomains2420_data.c | 1 + arch/arm/mach-omap2/clockdomains2430_data.c | 1 + arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | 1 + arch/arm/mach-omap2/clockdomains3xxx_data.c | 1 + arch/arm/mach-omap2/common-board-devices.h | 1 + arch/arm/mach-omap2/mmc.h | 1 + arch/arm/mach-omap2/omap-pm-noop.c | 1 + arch/arm/mach-omap2/omap-pm.h | 1 + arch/arm/mach-omap2/opp2420_data.c | 1 + arch/arm/mach-omap2/opp2430_data.c | 1 + arch/arm/mach-omap2/opp2xxx.h | 1 + arch/arm/mach-omap2/usb.h | 1 + arch/arm/mach-omap2/vp.c | 1 + arch/arm/mach-orion5x/Makefile | 1 + arch/arm/mach-orion5x/common.h | 1 + arch/arm/mach-orion5x/mpp.h | 1 + arch/arm/mach-orion5x/ts78xx-fpga.h | 1 + arch/arm/mach-orion5x/tsx09-common.h | 1 + arch/arm/mach-prima2/Makefile | 1 + arch/arm/mach-pxa/Makefile | 1 + arch/arm/mach-pxa/cm-x2xx-pci.h | 1 + arch/arm/mach-pxa/colibri.h | 1 + arch/arm/mach-pxa/csb701.c | 1 + arch/arm/mach-pxa/devices.c | 1 + arch/arm/mach-pxa/devices.h | 1 + arch/arm/mach-pxa/include/mach/addr-map.h | 1 + arch/arm/mach-pxa/include/mach/audio.h | 1 + arch/arm/mach-pxa/include/mach/bitfield.h | 1 + arch/arm/mach-pxa/include/mach/io.h | 1 + arch/arm/mach-pxa/include/mach/regs-ac97.h | 1 + arch/arm/mach-pxa/include/mach/regs-lcd.h | 1 + arch/arm/mach-pxa/include/mach/regs-ost.h | 1 + arch/arm/mach-pxa/include/mach/regs-uart.h | 1 + arch/arm/mach-pxa/include/mach/reset.h | 1 + arch/arm/mach-pxa/include/mach/trizeps4.h | 1 + arch/arm/mach-pxa/littleton.h | 1 + arch/arm/mach-pxa/mfp-pxa25x.h | 1 + arch/arm/mach-pxa/mfp-pxa27x.h | 1 + arch/arm/mach-pxa/mfp-pxa2xx.h | 1 + arch/arm/mach-pxa/mfp-pxa3xx.h | 1 + arch/arm/mach-pxa/mioa701.h | 1 + arch/arm/mach-pxa/mxm8x10.h | 1 + arch/arm/mach-pxa/pxa25x.h | 1 + arch/arm/mach-pxa/pxa27x-udc.h | 1 + arch/arm/mach-pxa/pxa27x.h | 1 + arch/arm/mach-pxa/pxa300.h | 1 + arch/arm/mach-pxa/pxa320.h | 1 + arch/arm/mach-pxa/pxa3xx.h | 1 + arch/arm/mach-pxa/pxa930.h | 1 + arch/arm/mach-pxa/regs-rtc.h | 1 + arch/arm/mach-pxa/regs-u2d.h | 1 + arch/arm/mach-pxa/smemc.c | 1 + arch/arm/mach-pxa/zylonite.h | 1 + arch/arm/mach-rpc/fiq.S | 1 + arch/arm/mach-rpc/include/mach/entry-macro.S | 1 + arch/arm/mach-rpc/irq.c | 1 + arch/arm/mach-s3c24xx/include/mach/io.h | 1 + arch/arm/mach-s3c64xx/include/mach/dma.h | 1 + arch/arm/mach-s3c64xx/include/mach/irqs.h | 1 + arch/arm/mach-s3c64xx/include/mach/regs-gpio.h | 1 + arch/arm/mach-s3c64xx/regs-gpio-memport.h | 1 + arch/arm/mach-sa1100/Makefile | 1 + arch/arm/mach-sa1100/clock.c | 1 + arch/arm/mach-sa1100/generic.h | 1 + arch/arm/mach-sa1100/include/mach/SA-1100.h | 1 + arch/arm/mach-sa1100/include/mach/assabet.h | 1 + arch/arm/mach-sa1100/include/mach/collie.h | 1 + arch/arm/mach-sa1100/include/mach/hardware.h | 1 + arch/arm/mach-sa1100/include/mach/irqs.h | 1 + arch/arm/mach-sa1100/include/mach/memory.h | 1 + arch/arm/mach-sa1100/include/mach/neponset.h | 1 + arch/arm/mach-sa1100/include/mach/reset.h | 1 + arch/arm/mach-sa1100/include/mach/shannon.h | 1 + arch/arm/mach-sa1100/include/mach/simpad.h | 1 + arch/arm/mach-sa1100/include/mach/uncompress.h | 1 + arch/arm/mach-sa1100/lart.c | 1 + arch/arm/mach-sa1100/neponset.c | 1 + arch/arm/mach-sa1100/pleb.c | 1 + arch/arm/mach-sa1100/shannon.c | 1 + arch/arm/mach-sa1100/simpad.c | 1 + arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/common.h | 1 + arch/arm/mach-shmobile/emev2.h | 1 + arch/arm/mach-shmobile/r8a7779.h | 1 + arch/arm/mach-shmobile/r8a7790.h | 1 + arch/arm/mach-shmobile/r8a7791.h | 1 + arch/arm/mach-shmobile/rcar-gen2.h | 1 + arch/arm/mach-shmobile/sh73a0.h | 1 + arch/arm/mach-socfpga/Makefile | 1 + arch/arm/mach-spear/Makefile | 1 + arch/arm/mach-tango/Kconfig | 1 + arch/arm/mach-tango/Makefile | 1 + arch/arm/mach-tango/platsmp.c | 1 + arch/arm/mach-tango/pm.c | 1 + arch/arm/mach-tango/setup.c | 1 + arch/arm/mach-tango/smc.S | 1 + arch/arm/mach-tango/smc.h | 1 + arch/arm/mach-tegra/Kconfig | 1 + arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-u300/Kconfig | 1 + arch/arm/mach-uniphier/Kconfig | 1 + arch/arm/mach-ux500/Kconfig | 1 + arch/arm/mach-versatile/Kconfig | 1 + arch/arm/mach-vexpress/Kconfig | 1 + arch/arm/mach-vexpress/Makefile | 1 + arch/arm/mach-vexpress/v2m.c | 1 + arch/arm/mach-vt8500/Kconfig | 1 + arch/arm/mach-w90x900/Kconfig | 1 + arch/arm/mach-w90x900/Makefile | 1 + arch/arm/mach-zx/Kconfig | 1 + arch/arm/mach-zynq/Kconfig | 1 + arch/arm/mm/Kconfig | 1 + arch/arm/mm/Makefile | 1 + arch/arm/mm/abort-ev4.S | 1 + arch/arm/mm/abort-ev4t.S | 1 + arch/arm/mm/abort-ev5t.S | 1 + arch/arm/mm/abort-ev5tj.S | 1 + arch/arm/mm/abort-ev6.S | 1 + arch/arm/mm/abort-ev7.S | 1 + arch/arm/mm/abort-lv4t.S | 1 + arch/arm/mm/abort-macro.S | 1 + arch/arm/mm/abort-nommu.S | 1 + arch/arm/mm/dma.h | 1 + arch/arm/mm/extable.c | 1 + arch/arm/mm/fault.h | 1 + arch/arm/mm/fsr-2level.c | 1 + arch/arm/mm/fsr-3level.c | 1 + arch/arm/mm/idmap.c | 1 + arch/arm/mm/iomap.c | 1 + arch/arm/mm/l2c-l2x0-resume.S | 1 + arch/arm/mm/mm.h | 1 + arch/arm/mm/mmap.c | 1 + arch/arm/mm/pabort-legacy.S | 1 + arch/arm/mm/pabort-v6.S | 1 + arch/arm/mm/pabort-v7.S | 1 + arch/arm/mm/physaddr.c | 1 + arch/arm/mm/proc-macros.S | 1 + arch/arm/nwfpe/ARM-gcc.h | 1 + arch/arm/nwfpe/Makefile | 1 + arch/arm/oprofile/Makefile | 1 + arch/arm/plat-iop/Makefile | 1 + arch/arm/plat-omap/Kconfig | 1 + arch/arm/plat-omap/include/plat/sram.h | 1 + arch/arm/plat-versatile/include/plat/sched_clock.h | 1 + arch/arm/probes/Makefile | 1 + arch/arm/probes/kprobes/Makefile | 1 + arch/arm/tools/Makefile | 1 + arch/arm/tools/gen-mach-types | 1 + arch/arm/tools/syscallhdr.sh | 1 + arch/arm/tools/syscallnr.sh | 1 + arch/arm/tools/syscalltbl.sh | 1 + arch/arm/vdso/Makefile | 1 + arch/arm/vdso/datapage.S | 1 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/allwinner/Makefile | 1 + arch/arm64/boot/dts/amd/Makefile | 1 + arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts | 1 + arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts | 1 + arch/arm64/boot/dts/amd/amd-overdrive.dts | 1 + arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi | 1 + arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 1 + arch/arm64/boot/dts/amd/amd-seattle-xgbe-b.dtsi | 1 + arch/arm64/boot/dts/amd/husky.dts | 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/arm/foundation-v8-gicv3.dts | 1 + arch/arm64/boot/dts/arm/foundation-v8.dts | 1 + arch/arm64/boot/dts/arm/foundation-v8.dtsi | 1 + arch/arm64/boot/dts/arm/juno-base.dtsi | 1 + arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 1 + arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts | 1 + arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 1 + arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts | 1 + arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 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/hisilicon/hi3660-hikey960.dts | 1 + arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 1 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 + arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi | 1 + arch/arm64/boot/dts/hisilicon/hikey960-pinctrl.dtsi | 1 + arch/arm64/boot/dts/lg/Makefile | 1 + arch/arm64/boot/dts/lg/lg1312-ref.dts | 1 + arch/arm64/boot/dts/lg/lg1312.dtsi | 1 + arch/arm64/boot/dts/lg/lg1313-ref.dts | 1 + arch/arm64/boot/dts/lg/lg1313.dtsi | 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/nvidia/tegra132-norrin.dts | 1 + arch/arm64/boot/dts/nvidia/tegra132.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 1 + arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2371-0000.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2571.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2595.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 1 + arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi | 1 + arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8004.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8916.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8994.dtsi | 1 + arch/arm64/boot/dts/qcom/pmi8994.dtsi | 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/crypto/Kconfig | 1 + arch/arm64/crypto/aes-ce-setkey.h | 1 + arch/arm64/include/asm/alternative.h | 1 + arch/arm64/include/asm/asm-uaccess.h | 1 + arch/arm64/include/asm/bitrev.h | 1 + arch/arm64/include/asm/boot.h | 1 + arch/arm64/include/asm/clocksource.h | 1 + arch/arm64/include/asm/cpuidle.h | 1 + arch/arm64/include/asm/current.h | 1 + arch/arm64/include/asm/efi.h | 1 + arch/arm64/include/asm/extable.h | 1 + arch/arm64/include/asm/hypervisor.h | 1 + arch/arm64/include/asm/irq.h | 1 + arch/arm64/include/asm/irq_work.h | 1 + arch/arm64/include/asm/kasan.h | 1 + arch/arm64/include/asm/lse.h | 1 + arch/arm64/include/asm/mmzone.h | 1 + arch/arm64/include/asm/numa.h | 1 + arch/arm64/include/asm/paravirt.h | 1 + arch/arm64/include/asm/pci.h | 1 + arch/arm64/include/asm/stack_pointer.h | 1 + arch/arm64/include/asm/stackprotector.h | 1 + arch/arm64/include/asm/suspend.h | 1 + arch/arm64/include/asm/sync_bitops.h | 1 + arch/arm64/include/asm/topology.h | 1 + arch/arm64/include/asm/xen/events.h | 1 + arch/arm64/include/asm/xen/xen-ops.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/acpi_numa.c | 1 + arch/arm64/kernel/perf_regs.c | 1 + arch/arm64/kernel/probes/Makefile | 1 + arch/arm64/kernel/probes/kprobes_trampoline.S | 1 + arch/arm64/kernel/sleep.S | 1 + arch/arm64/kernel/suspend.c | 1 + arch/arm64/kernel/trace-events-emulation.h | 1 + arch/arm64/kernel/vdso/Makefile | 1 + arch/arm64/kernel/vdso/gen_vdso_offsets.sh | 1 + arch/arm64/kernel/vmlinux.lds.S | 1 + arch/arm64/kvm/Kconfig | 1 + arch/arm64/kvm/Makefile | 1 + arch/arm64/kvm/hyp/Makefile | 1 + arch/arm64/kvm/trace.h | 1 + arch/arm64/lib/Makefile | 1 + arch/arm64/mm/Makefile | 1 + arch/arm64/mm/extable.c | 1 + arch/arm64/mm/physaddr.c | 1 + arch/arm64/mm/ptdump_debugfs.c | 1 + arch/blackfin/Kconfig | 1 + arch/blackfin/Kconfig.debug | 1 + arch/blackfin/include/asm/clkdev.h | 1 + arch/blackfin/include/asm/pci.h | 1 + arch/blackfin/include/asm/rwlock.h | 1 + arch/blackfin/include/mach-common/ports-a.h | 1 + arch/blackfin/include/mach-common/ports-b.h | 1 + arch/blackfin/include/mach-common/ports-c.h | 1 + arch/blackfin/include/mach-common/ports-d.h | 1 + arch/blackfin/include/mach-common/ports-e.h | 1 + arch/blackfin/include/mach-common/ports-f.h | 1 + arch/blackfin/include/mach-common/ports-g.h | 1 + arch/blackfin/include/mach-common/ports-h.h | 1 + arch/blackfin/include/mach-common/ports-i.h | 1 + arch/blackfin/include/mach-common/ports-j.h | 1 + arch/blackfin/kernel/Makefile | 1 + arch/blackfin/kernel/cplb-nompu/Makefile | 1 + arch/blackfin/lib/Makefile | 1 + arch/blackfin/mach-bf518/Kconfig | 1 + arch/blackfin/mach-bf518/boards/Kconfig | 1 + arch/blackfin/mach-bf527/Kconfig | 1 + arch/blackfin/mach-bf527/boards/Kconfig | 1 + arch/blackfin/mach-bf527/boards/Makefile | 1 + arch/blackfin/mach-bf533/Kconfig | 1 + arch/blackfin/mach-bf533/boards/Kconfig | 1 + arch/blackfin/mach-bf533/boards/Makefile | 1 + arch/blackfin/mach-bf537/Kconfig | 1 + arch/blackfin/mach-bf537/boards/Kconfig | 1 + arch/blackfin/mach-bf537/boards/Makefile | 1 + arch/blackfin/mach-bf538/Kconfig | 1 + arch/blackfin/mach-bf538/boards/Kconfig | 1 + arch/blackfin/mach-bf548/Kconfig | 1 + arch/blackfin/mach-bf548/boards/Kconfig | 1 + arch/blackfin/mach-bf561/Kconfig | 1 + arch/blackfin/mach-bf561/boards/Kconfig | 1 + arch/blackfin/mach-bf609/Kconfig | 1 + arch/blackfin/mach-bf609/boards/Kconfig | 1 + arch/blackfin/mach-bf609/clock.c | 1 + arch/blackfin/mach-bf609/dpm.S | 1 + arch/blackfin/mach-common/Makefile | 1 + arch/blackfin/mach-common/clock.h | 1 + arch/blackfin/oprofile/Makefile | 1 + arch/c6x/Kconfig | 1 + arch/c6x/boot/Makefile | 1 + arch/c6x/boot/dts/Makefile | 1 + arch/c6x/boot/dts/tms320c6455.dtsi | 1 + arch/c6x/boot/dts/tms320c6457.dtsi | 1 + arch/c6x/boot/dts/tms320c6472.dtsi | 1 + arch/c6x/boot/dts/tms320c6474.dtsi | 1 + arch/c6x/boot/dts/tms320c6678.dtsi | 1 + arch/c6x/include/asm/flat.h | 1 + arch/c6x/include/asm/linkage.h | 1 + arch/c6x/include/asm/megamod-pic.h | 1 + arch/c6x/include/asm/page.h | 1 + arch/c6x/include/asm/sections.h | 1 + arch/c6x/include/asm/timer64.h | 1 + arch/c6x/include/asm/tlb.h | 1 + arch/c6x/kernel/Makefile | 1 + arch/c6x/kernel/asm-offsets.c | 1 + arch/c6x/kernel/vmlinux.lds.S | 1 + arch/c6x/platforms/Kconfig | 1 + arch/cris/Kconfig | 1 + arch/cris/Kconfig.debug | 1 + arch/cris/arch-v10/Kconfig | 1 + arch/cris/arch-v10/drivers/Kconfig | 1 + arch/cris/arch-v10/drivers/Makefile | 1 + arch/cris/arch-v10/drivers/eeprom.c | 1 + arch/cris/arch-v10/drivers/gpio.c | 1 + arch/cris/arch-v10/drivers/i2c.c | 1 + arch/cris/arch-v10/drivers/i2c.h | 1 + arch/cris/arch-v10/drivers/sync_serial.c | 1 + arch/cris/arch-v10/kernel/Makefile | 1 + arch/cris/arch-v10/kernel/crisksyms.c | 1 + arch/cris/arch-v10/kernel/debugport.c | 1 + arch/cris/arch-v10/kernel/dma.c | 1 + arch/cris/arch-v10/kernel/entry.S | 1 + arch/cris/arch-v10/kernel/fasttimer.c | 1 + arch/cris/arch-v10/kernel/head.S | 1 + arch/cris/arch-v10/kernel/io_interface_mux.c | 1 + arch/cris/arch-v10/kernel/irq.c | 1 + arch/cris/arch-v10/kernel/kgdb.c | 1 + arch/cris/arch-v10/kernel/process.c | 1 + arch/cris/arch-v10/kernel/ptrace.c | 1 + arch/cris/arch-v10/kernel/setup.c | 1 + arch/cris/arch-v10/kernel/shadows.c | 1 + arch/cris/arch-v10/kernel/signal.c | 1 + arch/cris/arch-v10/kernel/time.c | 1 + arch/cris/arch-v10/kernel/traps.c | 1 + arch/cris/arch-v10/lib/checksum.S | 1 + arch/cris/arch-v10/lib/checksumcopy.S | 1 + arch/cris/arch-v10/lib/csumcpfruser.S | 1 + arch/cris/arch-v10/lib/dram_init.S | 1 + arch/cris/arch-v10/lib/hw_settings.S | 1 + arch/cris/arch-v10/lib/usercopy.c | 1 + arch/cris/arch-v10/mm/fault.c | 1 + arch/cris/arch-v10/mm/init.c | 1 + arch/cris/arch-v10/mm/tlb.c | 1 + arch/cris/arch-v32/Kconfig | 1 + arch/cris/arch-v32/drivers/Kconfig | 1 + arch/cris/arch-v32/drivers/Makefile | 1 + arch/cris/arch-v32/drivers/cryptocop.c | 1 + arch/cris/arch-v32/drivers/pci/bios.c | 1 + arch/cris/arch-v32/drivers/pci/dma.c | 1 + arch/cris/arch-v32/kernel/Makefile | 1 + arch/cris/arch-v32/kernel/cache.c | 1 + arch/cris/arch-v32/kernel/cacheflush.S | 1 + arch/cris/arch-v32/kernel/crisksyms.c | 1 + arch/cris/arch-v32/kernel/debugport.c | 1 + arch/cris/arch-v32/kernel/entry.S | 1 + arch/cris/arch-v32/kernel/fasttimer.c | 1 + arch/cris/arch-v32/kernel/head.S | 1 + arch/cris/arch-v32/kernel/irq.c | 1 + arch/cris/arch-v32/kernel/kgdb.c | 1 + arch/cris/arch-v32/kernel/kgdb_asm.S | 1 + arch/cris/arch-v32/kernel/process.c | 1 + arch/cris/arch-v32/kernel/ptrace.c | 1 + arch/cris/arch-v32/kernel/setup.c | 1 + arch/cris/arch-v32/kernel/signal.c | 1 + arch/cris/arch-v32/kernel/time.c | 1 + arch/cris/arch-v32/kernel/traps.c | 1 + arch/cris/arch-v32/lib/checksum.S | 1 + arch/cris/arch-v32/lib/checksumcopy.S | 1 + arch/cris/arch-v32/lib/csumcpfruser.S | 1 + arch/cris/arch-v32/lib/delay.c | 1 + arch/cris/arch-v32/lib/usercopy.c | 1 + arch/cris/arch-v32/mach-a3/Kconfig | 1 + arch/cris/arch-v32/mach-a3/arbiter.c | 1 + arch/cris/arch-v32/mach-a3/dma.c | 1 + arch/cris/arch-v32/mach-a3/dram_init.S | 1 + arch/cris/arch-v32/mach-a3/hw_settings.S | 1 + arch/cris/arch-v32/mach-a3/pinmux.c | 1 + arch/cris/arch-v32/mach-fs/Kconfig | 1 + arch/cris/arch-v32/mach-fs/arbiter.c | 1 + arch/cris/arch-v32/mach-fs/dma.c | 1 + arch/cris/arch-v32/mach-fs/dram_init.S | 1 + arch/cris/arch-v32/mach-fs/hw_settings.S | 1 + arch/cris/arch-v32/mach-fs/pinmux.c | 1 + arch/cris/arch-v32/mm/init.c | 1 + arch/cris/arch-v32/mm/intmem.c | 1 + arch/cris/arch-v32/mm/l2cache.c | 1 + arch/cris/arch-v32/mm/mmu.S | 1 + arch/cris/arch-v32/mm/tlb.c | 1 + arch/cris/boot/Makefile | 1 + arch/cris/boot/compressed/Makefile | 1 + arch/cris/boot/compressed/decompress_v10.lds | 1 + arch/cris/boot/compressed/decompress_v32.lds | 1 + arch/cris/boot/compressed/head_v10.S | 1 + arch/cris/boot/compressed/head_v32.S | 1 + arch/cris/boot/compressed/misc.c | 1 + arch/cris/boot/dts/Makefile | 1 + arch/cris/boot/dts/artpec3.dtsi | 1 + arch/cris/boot/dts/dev88.dts | 1 + arch/cris/boot/dts/etraxfs.dtsi | 1 + arch/cris/boot/dts/p1343.dts | 1 + arch/cris/boot/rescue/Makefile | 1 + arch/cris/boot/rescue/head_v10.S | 1 + arch/cris/boot/rescue/head_v32.S | 1 + arch/cris/boot/rescue/kimagerescue.S | 1 + arch/cris/boot/rescue/rescue_v10.lds | 1 + arch/cris/boot/rescue/rescue_v32.lds | 1 + arch/cris/boot/rescue/testrescue.S | 1 + arch/cris/boot/tools/build.c | 1 + arch/cris/include/arch-v10/arch/bitops.h | 1 + arch/cris/include/arch-v10/arch/bug.h | 1 + arch/cris/include/arch-v10/arch/cache.h | 1 + arch/cris/include/arch-v10/arch/checksum.h | 1 + arch/cris/include/arch-v10/arch/delay.h | 1 + arch/cris/include/arch-v10/arch/dma.h | 1 + arch/cris/include/arch-v10/arch/io.h | 1 + arch/cris/include/arch-v10/arch/io_interface_mux.h | 1 + arch/cris/include/arch-v10/arch/irq.h | 1 + arch/cris/include/arch-v10/arch/irqflags.h | 1 + arch/cris/include/arch-v10/arch/memmap.h | 1 + arch/cris/include/arch-v10/arch/mmu.h | 1 + arch/cris/include/arch-v10/arch/offset.h | 1 + arch/cris/include/arch-v10/arch/page.h | 1 + arch/cris/include/arch-v10/arch/pgtable.h | 1 + arch/cris/include/arch-v10/arch/processor.h | 1 + arch/cris/include/arch-v10/arch/swab.h | 1 + arch/cris/include/arch-v10/arch/system.h | 1 + arch/cris/include/arch-v10/arch/thread_info.h | 1 + arch/cris/include/arch-v10/arch/timex.h | 1 + arch/cris/include/arch-v10/arch/tlb.h | 1 + arch/cris/include/arch-v10/arch/uaccess.h | 1 + arch/cris/include/arch-v10/arch/unistd.h | 1 + arch/cris/include/arch-v32/arch/bitops.h | 1 + arch/cris/include/arch-v32/arch/bug.h | 1 + arch/cris/include/arch-v32/arch/cache.h | 1 + arch/cris/include/arch-v32/arch/checksum.h | 1 + arch/cris/include/arch-v32/arch/cryptocop.h | 1 + arch/cris/include/arch-v32/arch/delay.h | 1 + arch/cris/include/arch-v32/arch/hwregs/Makefile | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/ata_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/bif_core_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/bif_dma_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/bif_slave_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/config_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/cris_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/cris_supp_reg.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/dma_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/eth_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/gio_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/irq_nmi_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/marb_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/mmu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/mmu_supp_reg.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/rt_trace_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/ser_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/sser_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/strcop_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/strmux_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/asm/timer_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/ata_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/bif_core_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/bif_dma_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/bif_slave_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/config_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/cpu_vect.h | 1 + arch/cris/include/arch-v32/arch/hwregs/dma.h | 1 + arch/cris/include/arch-v32/arch/hwregs/dma_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/eth_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/extmem_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/Makefile | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_crc_par_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_in_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_out_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_defs_asm.h | 1 + .../include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_defs_asm.h | 1 + .../include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_mpu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_reg_space_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_in_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_out_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_in_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_out_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_spu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cfg_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cpu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_mpu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_spu_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_timer_grp_defs_asm.h | 1 + .../cris/include/arch-v32/arch/hwregs/iop/asm/iop_trigger_grp_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_version_defs_asm.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_crc_par_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_in_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_out_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_extra_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_extra_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_macros.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_reg_space.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_in_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_out_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_in_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_out_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_spu_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cfg_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cpu_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_mpu_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_spu_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_timer_grp_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_trigger_grp_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/iop/iop_version_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/irq_nmi_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/marb_bp_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/marb_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/reg_rdwr.h | 1 + arch/cris/include/arch-v32/arch/hwregs/rt_trace_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/ser_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/sser_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/strcop.h | 1 + arch/cris/include/arch-v32/arch/hwregs/strcop_defs.h | 1 + arch/cris/include/arch-v32/arch/hwregs/supp_reg.h | 1 + arch/cris/include/arch-v32/arch/intmem.h | 1 + arch/cris/include/arch-v32/arch/irq.h | 1 + arch/cris/include/arch-v32/arch/irqflags.h | 1 + arch/cris/include/arch-v32/arch/mmu.h | 1 + arch/cris/include/arch-v32/arch/offset.h | 1 + arch/cris/include/arch-v32/arch/page.h | 1 + arch/cris/include/arch-v32/arch/pgtable.h | 1 + arch/cris/include/arch-v32/arch/processor.h | 1 + arch/cris/include/arch-v32/arch/swab.h | 1 + arch/cris/include/arch-v32/arch/system.h | 1 + arch/cris/include/arch-v32/arch/thread_info.h | 1 + arch/cris/include/arch-v32/arch/timex.h | 1 + arch/cris/include/arch-v32/arch/tlb.h | 1 + arch/cris/include/arch-v32/arch/uaccess.h | 1 + arch/cris/include/arch-v32/arch/unistd.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/arbiter.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/dma.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/clkgen_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/ddr2_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/gio_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pinmux_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pio_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/timer_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/clkgen_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/ddr2_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/gio_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect_defs.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_reg_space_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_in_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_out_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cfg_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cpu_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_mpu_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_spu_defs_asm.h | 1 + .../include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_version_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_reg_space.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_in_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_out_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cpu_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_mpu_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_spu_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_version_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/l2cache_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_bar_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_foo_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/pinmux_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/pio_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/reg_map.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/strmux_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/hwregs/timer_defs.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/memmap.h | 1 + arch/cris/include/arch-v32/mach-a3/mach/pinmux.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/arbiter.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/dma.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/bif_core_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/config_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/gio_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/pinmux_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/reg_map_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/timer_defs_asm.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_core_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_dma_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_slave_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/config_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/gio_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_bp_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/pinmux_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/reg_map.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/strmux_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/hwregs/timer_defs.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/memmap.h | 1 + arch/cris/include/arch-v32/mach-fs/mach/pinmux.h | 1 + arch/cris/include/asm/axisflashmap.h | 1 + arch/cris/include/asm/bitops.h | 1 + arch/cris/include/asm/bug.h | 1 + arch/cris/include/asm/cache.h | 1 + arch/cris/include/asm/cacheflush.h | 1 + arch/cris/include/asm/checksum.h | 1 + arch/cris/include/asm/delay.h | 1 + arch/cris/include/asm/dma-mapping.h | 1 + arch/cris/include/asm/dma.h | 1 + arch/cris/include/asm/eshlibld.h | 1 + arch/cris/include/asm/etraxi2c.h | 1 + arch/cris/include/asm/fasttimer.h | 1 + arch/cris/include/asm/fb.h | 1 + arch/cris/include/asm/io.h | 1 + arch/cris/include/asm/irq.h | 1 + arch/cris/include/asm/mmu.h | 1 + arch/cris/include/asm/mmu_context.h | 1 + arch/cris/include/asm/page.h | 1 + arch/cris/include/asm/pci.h | 1 + arch/cris/include/asm/pgalloc.h | 1 + arch/cris/include/asm/pgtable.h | 1 + arch/cris/include/asm/processor.h | 1 + arch/cris/include/asm/ptrace.h | 1 + arch/cris/include/asm/segment.h | 1 + arch/cris/include/asm/serial.h | 1 + arch/cris/include/asm/shmparam.h | 1 + arch/cris/include/asm/signal.h | 1 + arch/cris/include/asm/stacktrace.h | 1 + arch/cris/include/asm/string.h | 1 + arch/cris/include/asm/swab.h | 1 + arch/cris/include/asm/switch_to.h | 1 + arch/cris/include/asm/termios.h | 1 + arch/cris/include/asm/thread_info.h | 1 + arch/cris/include/asm/timex.h | 1 + arch/cris/include/asm/tlb.h | 1 + arch/cris/include/asm/tlbflush.h | 1 + arch/cris/include/asm/uaccess.h | 1 + arch/cris/include/asm/ucontext.h | 1 + arch/cris/include/asm/unaligned.h | 1 + arch/cris/include/asm/unistd.h | 1 + arch/cris/include/asm/user.h | 1 + arch/cris/kernel/Makefile | 1 + arch/cris/kernel/asm-offsets.c | 1 + arch/cris/kernel/crisksyms.c | 1 + arch/cris/kernel/devicetree.c | 1 + arch/cris/kernel/irq.c | 1 + arch/cris/kernel/process.c | 1 + arch/cris/kernel/profile.c | 1 + arch/cris/kernel/ptrace.c | 1 + arch/cris/kernel/setup.c | 1 + arch/cris/kernel/sys_cris.c | 1 + arch/cris/kernel/time.c | 1 + arch/cris/kernel/traps.c | 1 + arch/cris/kernel/vmlinux.lds.S | 1 + arch/cris/mm/fault.c | 1 + arch/cris/mm/init.c | 1 + arch/cris/mm/ioremap.c | 1 + arch/cris/mm/tlb.c | 1 + arch/frv/Kconfig | 1 + arch/frv/Kconfig.debug | 1 + arch/frv/include/asm/atomic_defs.h | 1 + arch/frv/include/asm/dma-mapping.h | 1 + arch/frv/include/asm/fpu.h | 1 + arch/frv/include/asm/futex.h | 1 + arch/frv/include/asm/kmap_types.h | 1 + arch/frv/include/asm/local.h | 1 + arch/frv/include/asm/math-emu.h | 1 + arch/frv/include/asm/page.h | 1 + arch/frv/include/asm/percpu.h | 1 + arch/frv/include/asm/shmparam.h | 1 + arch/frv/include/asm/signal.h | 1 + arch/frv/include/asm/smp.h | 1 + arch/frv/include/asm/termios.h | 1 + arch/frv/include/asm/timex.h | 1 + arch/frv/include/asm/tlb.h | 1 + arch/frv/include/asm/topology.h | 1 + arch/frv/include/asm/ucontext.h | 1 + arch/frv/include/asm/unistd.h | 1 + arch/frv/kernel/Makefile | 1 + arch/frv/kernel/asm-offsets.c | 1 + arch/frv/kernel/frv_ksyms.c | 1 + arch/frv/kernel/vmlinux.lds.S | 1 + arch/frv/lib/atomic-lib.c | 1 + arch/frv/mb93090-mb00/Makefile | 1 + arch/frv/mb93090-mb00/pci-frv.h | 1 + arch/frv/mb93090-mb00/pci-irq.c | 1 + arch/frv/mm/extable.c | 1 + arch/frv/mm/fault.c | 1 + arch/h8300/Kconfig | 1 + arch/h8300/Kconfig.cpu | 1 + arch/h8300/boot/Makefile | 1 + arch/h8300/boot/compressed/Makefile | 1 + arch/h8300/boot/compressed/head.S | 1 + arch/h8300/boot/compressed/misc.c | 1 + arch/h8300/boot/compressed/vmlinux.lds | 1 + arch/h8300/boot/dts/Makefile | 1 + arch/h8300/boot/dts/edosk2674.dts | 1 + arch/h8300/boot/dts/h8300h_sim.dts | 1 + arch/h8300/boot/dts/h8s_sim.dts | 1 + arch/h8300/include/asm/atomic.h | 1 + arch/h8300/include/asm/bitops.h | 1 + arch/h8300/include/asm/bug.h | 1 + arch/h8300/include/asm/byteorder.h | 1 + arch/h8300/include/asm/cache.h | 1 + arch/h8300/include/asm/cmpxchg.h | 1 + arch/h8300/include/asm/dma-mapping.h | 1 + arch/h8300/include/asm/elf.h | 1 + arch/h8300/include/asm/flat.h | 1 + arch/h8300/include/asm/hash.h | 1 + arch/h8300/include/asm/io.h | 1 + arch/h8300/include/asm/irq.h | 1 + arch/h8300/include/asm/irqflags.h | 1 + arch/h8300/include/asm/page.h | 1 + arch/h8300/include/asm/pci.h | 1 + arch/h8300/include/asm/pgtable.h | 1 + arch/h8300/include/asm/processor.h | 1 + arch/h8300/include/asm/ptrace.h | 1 + arch/h8300/include/asm/segment.h | 1 + arch/h8300/include/asm/signal.h | 1 + arch/h8300/include/asm/string.h | 1 + arch/h8300/include/asm/switch_to.h | 1 + arch/h8300/include/asm/syscall.h | 1 + arch/h8300/include/asm/thread_info.h | 1 + arch/h8300/include/asm/tlb.h | 1 + arch/h8300/include/asm/uaccess.h | 1 + arch/h8300/include/asm/user.h | 1 + arch/h8300/kernel/Makefile | 1 + arch/h8300/kernel/asm-offsets.c | 1 + arch/h8300/kernel/entry.S | 1 + arch/h8300/kernel/h8300_ksyms.c | 1 + arch/h8300/kernel/head_ram.S | 1 + arch/h8300/kernel/head_rom.S | 1 + arch/h8300/kernel/irq.c | 1 + arch/h8300/kernel/module.c | 1 + arch/h8300/kernel/process.c | 1 + arch/h8300/kernel/setup.c | 1 + arch/h8300/kernel/syscalls.c | 1 + arch/h8300/kernel/vmlinux.lds.S | 1 + arch/h8300/lib/abs.S | 1 + arch/h8300/lib/ashldi3.c | 1 + arch/h8300/lib/ashrdi3.c | 1 + arch/h8300/lib/delay.c | 1 + arch/h8300/lib/libgcc.h | 1 + arch/h8300/lib/lshrdi3.c | 1 + arch/h8300/lib/memcpy.S | 1 + arch/h8300/lib/memset.S | 1 + arch/h8300/lib/moddivsi3.S | 1 + arch/h8300/lib/modsi3.S | 1 + arch/h8300/lib/muldi3.c | 1 + arch/h8300/lib/mulsi3.S | 1 + arch/h8300/lib/strncpy.S | 1 + arch/h8300/lib/ucmpdi2.c | 1 + arch/h8300/lib/udivsi3.S | 1 + arch/h8300/mm/fault.c | 1 + arch/h8300/mm/init.c | 1 + arch/h8300/mm/memory.c | 1 + arch/hexagon/Kconfig | 1 + arch/hexagon/Makefile | 1 + arch/hexagon/include/asm/Kbuild | 1 + arch/hexagon/include/asm/futex.h | 1 + arch/hexagon/kernel/Makefile | 1 + arch/ia64/Kconfig | 1 + arch/ia64/Kconfig.debug | 1 + arch/ia64/dig/Makefile | 1 + arch/ia64/dig/setup.c | 1 + arch/ia64/hp/common/hwsw_iommu.c | 1 + arch/ia64/hp/sim/Kconfig | 1 + arch/ia64/hp/sim/Makefile | 1 + arch/ia64/hp/sim/boot/boot_head.S | 1 + arch/ia64/hp/sim/boot/bootloader.c | 1 + arch/ia64/hp/sim/boot/bootloader.lds | 1 + arch/ia64/hp/sim/boot/fw-emu.c | 1 + arch/ia64/hp/sim/boot/ssc.h | 1 + arch/ia64/hp/sim/hpsim.S | 1 + arch/ia64/hp/sim/hpsim_console.c | 1 + arch/ia64/hp/sim/hpsim_irq.c | 1 + arch/ia64/hp/sim/hpsim_setup.c | 1 + arch/ia64/hp/sim/hpsim_ssc.h | 1 + arch/ia64/hp/sim/simeth.c | 1 + arch/ia64/hp/sim/simscsi.c | 1 + arch/ia64/hp/sim/simserial.c | 1 + arch/ia64/include/asm/agp.h | 1 + arch/ia64/include/asm/asm-prototypes.h | 1 + arch/ia64/include/asm/asmmacro.h | 1 + arch/ia64/include/asm/atomic.h | 1 + arch/ia64/include/asm/barrier.h | 1 + arch/ia64/include/asm/bitops.h | 1 + arch/ia64/include/asm/bug.h | 1 + arch/ia64/include/asm/bugs.h | 1 + arch/ia64/include/asm/cache.h | 1 + arch/ia64/include/asm/cacheflush.h | 1 + arch/ia64/include/asm/checksum.h | 1 + arch/ia64/include/asm/clocksource.h | 1 + arch/ia64/include/asm/cpu.h | 1 + arch/ia64/include/asm/current.h | 1 + arch/ia64/include/asm/cyclone.h | 1 + arch/ia64/include/asm/delay.h | 1 + arch/ia64/include/asm/dma-mapping.h | 1 + arch/ia64/include/asm/dma.h | 1 + arch/ia64/include/asm/dmi.h | 1 + arch/ia64/include/asm/early_ioremap.h | 1 + arch/ia64/include/asm/elf.h | 1 + arch/ia64/include/asm/esi.h | 1 + arch/ia64/include/asm/extable.h | 1 + arch/ia64/include/asm/fb.h | 1 + arch/ia64/include/asm/fpswa.h | 1 + arch/ia64/include/asm/ftrace.h | 1 + arch/ia64/include/asm/futex.h | 1 + arch/ia64/include/asm/gcc_intrin.h | 1 + arch/ia64/include/asm/hardirq.h | 1 + arch/ia64/include/asm/hpsim.h | 1 + arch/ia64/include/asm/hugetlb.h | 1 + arch/ia64/include/asm/hw_irq.h | 1 + arch/ia64/include/asm/idle.h | 1 + arch/ia64/include/asm/intrinsics.h | 1 + arch/ia64/include/asm/io.h | 1 + arch/ia64/include/asm/iommu.h | 1 + arch/ia64/include/asm/iommu_table.h | 1 + arch/ia64/include/asm/iosapic.h | 1 + arch/ia64/include/asm/irq.h | 1 + arch/ia64/include/asm/irq_remapping.h | 1 + arch/ia64/include/asm/irqflags.h | 1 + arch/ia64/include/asm/kexec.h | 1 + arch/ia64/include/asm/kmap_types.h | 1 + arch/ia64/include/asm/kregs.h | 1 + arch/ia64/include/asm/libata-portmap.h | 1 + arch/ia64/include/asm/linkage.h | 1 + arch/ia64/include/asm/machvec.h | 1 + arch/ia64/include/asm/machvec_dig.h | 1 + arch/ia64/include/asm/machvec_dig_vtd.h | 1 + arch/ia64/include/asm/machvec_hpsim.h | 1 + arch/ia64/include/asm/machvec_hpzx1.h | 1 + arch/ia64/include/asm/machvec_hpzx1_swiotlb.h | 1 + arch/ia64/include/asm/machvec_init.h | 1 + arch/ia64/include/asm/mca.h | 1 + arch/ia64/include/asm/mca_asm.h | 1 + arch/ia64/include/asm/mman.h | 1 + arch/ia64/include/asm/mmu.h | 1 + arch/ia64/include/asm/mmu_context.h | 1 + arch/ia64/include/asm/module.h | 1 + arch/ia64/include/asm/msidef.h | 1 + arch/ia64/include/asm/page.h | 1 + arch/ia64/include/asm/pal.h | 1 + arch/ia64/include/asm/param.h | 1 + arch/ia64/include/asm/parport.h | 1 + arch/ia64/include/asm/patch.h | 1 + arch/ia64/include/asm/pci.h | 1 + arch/ia64/include/asm/percpu.h | 1 + arch/ia64/include/asm/perfmon.h | 1 + arch/ia64/include/asm/pgalloc.h | 1 + arch/ia64/include/asm/pgtable.h | 1 + arch/ia64/include/asm/processor.h | 1 + arch/ia64/include/asm/ptrace.h | 1 + arch/ia64/include/asm/rwsem.h | 1 + arch/ia64/include/asm/sal.h | 1 + arch/ia64/include/asm/sections.h | 1 + arch/ia64/include/asm/shmparam.h | 1 + arch/ia64/include/asm/signal.h | 1 + arch/ia64/include/asm/smp.h | 1 + arch/ia64/include/asm/sn/ioc3.h | 1 + arch/ia64/include/asm/sparsemem.h | 1 + arch/ia64/include/asm/spinlock.h | 1 + arch/ia64/include/asm/spinlock_types.h | 1 + arch/ia64/include/asm/string.h | 1 + arch/ia64/include/asm/swiotlb.h | 1 + arch/ia64/include/asm/switch_to.h | 1 + arch/ia64/include/asm/termios.h | 1 + arch/ia64/include/asm/thread_info.h | 1 + arch/ia64/include/asm/timex.h | 1 + arch/ia64/include/asm/tlb.h | 1 + arch/ia64/include/asm/tlbflush.h | 1 + arch/ia64/include/asm/types.h | 1 + arch/ia64/include/asm/uaccess.h | 1 + arch/ia64/include/asm/unaligned.h | 1 + arch/ia64/include/asm/unistd.h | 1 + arch/ia64/include/asm/unwind.h | 1 + arch/ia64/include/asm/user.h | 1 + arch/ia64/include/asm/ustack.h | 1 + arch/ia64/include/asm/uv/uv.h | 1 + arch/ia64/include/asm/vga.h | 1 + arch/ia64/kernel/Makefile | 1 + arch/ia64/kernel/Makefile.gate | 1 + arch/ia64/kernel/asm-offsets.c | 1 + arch/ia64/kernel/audit.c | 1 + arch/ia64/kernel/brl_emu.c | 1 + arch/ia64/kernel/crash.c | 1 + arch/ia64/kernel/crash_dump.c | 1 + arch/ia64/kernel/cyclone.c | 1 + arch/ia64/kernel/dma-mapping.c | 1 + arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/efi_stub.S | 1 + arch/ia64/kernel/elfcore.c | 1 + arch/ia64/kernel/entry.S | 1 + arch/ia64/kernel/entry.h | 1 + arch/ia64/kernel/fsys.S | 1 + arch/ia64/kernel/fsyscall_gtod_data.h | 1 + arch/ia64/kernel/gate.S | 1 + arch/ia64/kernel/gate.lds.S | 1 + arch/ia64/kernel/head.S | 1 + arch/ia64/kernel/ia64_ksyms.c | 1 + arch/ia64/kernel/init_task.c | 1 + arch/ia64/kernel/iosapic.c | 1 + arch/ia64/kernel/irq.c | 1 + arch/ia64/kernel/irq_ia64.c | 1 + arch/ia64/kernel/irq_lsapic.c | 1 + arch/ia64/kernel/ivt.S | 1 + arch/ia64/kernel/machvec.c | 1 + arch/ia64/kernel/mca_asm.S | 1 + arch/ia64/kernel/mca_drv.h | 1 + arch/ia64/kernel/mca_drv_asm.S | 1 + arch/ia64/kernel/minstate.h | 1 + arch/ia64/kernel/module.c | 1 + arch/ia64/kernel/msi_ia64.c | 1 + arch/ia64/kernel/nr-irqs.c | 1 + arch/ia64/kernel/pal.S | 1 + arch/ia64/kernel/patch.c | 1 + arch/ia64/kernel/pci-dma.c | 1 + arch/ia64/kernel/pci-swiotlb.c | 1 + arch/ia64/kernel/perfmon_generic.h | 1 + arch/ia64/kernel/perfmon_itanium.h | 1 + arch/ia64/kernel/perfmon_mckinley.h | 1 + arch/ia64/kernel/perfmon_montecito.h | 1 + arch/ia64/kernel/process.c | 1 + arch/ia64/kernel/ptrace.c | 1 + arch/ia64/kernel/setup.c | 1 + arch/ia64/kernel/sigframe.h | 1 + arch/ia64/kernel/signal.c | 1 + arch/ia64/kernel/stacktrace.c | 1 + arch/ia64/kernel/sys_ia64.c | 1 + arch/ia64/kernel/traps.c | 1 + arch/ia64/kernel/unaligned.c | 1 + arch/ia64/kernel/unwind.c | 1 + arch/ia64/kernel/unwind_decoder.c | 1 + arch/ia64/kernel/unwind_i.h | 1 + arch/ia64/kernel/vmlinux.lds.S | 1 + arch/ia64/lib/Makefile | 1 + arch/ia64/lib/carta_random.S | 1 + arch/ia64/lib/checksum.c | 1 + arch/ia64/lib/clear_page.S | 1 + arch/ia64/lib/clear_user.S | 1 + arch/ia64/lib/copy_page.S | 1 + arch/ia64/lib/copy_page_mck.S | 1 + arch/ia64/lib/copy_user.S | 1 + arch/ia64/lib/csum_partial_copy.c | 1 + arch/ia64/lib/do_csum.S | 1 + arch/ia64/lib/idiv32.S | 1 + arch/ia64/lib/idiv64.S | 1 + arch/ia64/lib/io.c | 1 + arch/ia64/lib/ip_fast_csum.S | 1 + arch/ia64/lib/memcpy.S | 1 + arch/ia64/lib/memcpy_mck.S | 1 + arch/ia64/lib/memset.S | 1 + arch/ia64/lib/strlen.S | 1 + arch/ia64/lib/strncpy_from_user.S | 1 + arch/ia64/lib/strnlen_user.S | 1 + arch/ia64/mm/Makefile | 1 + arch/ia64/mm/discontig.c | 1 + arch/ia64/mm/extable.c | 1 + arch/ia64/mm/fault.c | 1 + arch/ia64/mm/hugetlbpage.c | 1 + arch/ia64/mm/init.c | 1 + arch/ia64/module.lds | 1 + arch/ia64/oprofile/Makefile | 1 + arch/ia64/pci/fixup.c | 1 + arch/ia64/scripts/check-gas | 1 + arch/ia64/scripts/check-segrel.S | 1 + arch/ia64/scripts/check-segrel.lds | 1 + arch/ia64/scripts/check-text-align.S | 1 + arch/ia64/scripts/toolchain-flags | 1 + arch/ia64/scripts/unwcheck.py | 1 + arch/ia64/sn/kernel/sn2/timer.c | 1 + arch/m32r/Kconfig | 1 + arch/m32r/Kconfig.debug | 1 + arch/m32r/Makefile | 1 + arch/m32r/boot/compressed/Makefile | 1 + arch/m32r/boot/compressed/boot.h | 1 + arch/m32r/boot/compressed/head.S | 1 + arch/m32r/boot/compressed/m32r_sio.c | 1 + arch/m32r/boot/compressed/misc.c | 1 + arch/m32r/boot/compressed/vmlinux.lds.S | 1 + arch/m32r/boot/setup.S | 1 + arch/m32r/include/asm/assembler.h | 1 + arch/m32r/include/asm/atomic.h | 1 + arch/m32r/include/asm/bitops.h | 1 + arch/m32r/include/asm/bug.h | 1 + arch/m32r/include/asm/bugs.h | 1 + arch/m32r/include/asm/cache.h | 1 + arch/m32r/include/asm/cachectl.h | 1 + arch/m32r/include/asm/cacheflush.h | 1 + arch/m32r/include/asm/cmpxchg.h | 1 + arch/m32r/include/asm/dma-mapping.h | 1 + arch/m32r/include/asm/dma.h | 1 + arch/m32r/include/asm/elf.h | 1 + arch/m32r/include/asm/emergency-restart.h | 1 + arch/m32r/include/asm/fb.h | 1 + arch/m32r/include/asm/hardirq.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m32r/include/asm/irq.h | 1 + arch/m32r/include/asm/kmap_types.h | 1 + arch/m32r/include/asm/linkage.h | 1 + arch/m32r/include/asm/local.h | 1 + arch/m32r/include/asm/m32102.h | 1 + arch/m32r/include/asm/m32r.h | 1 + arch/m32r/include/asm/m32r_mp_fpga.h | 1 + arch/m32r/include/asm/mc146818rtc.h | 1 + arch/m32r/include/asm/mmu.h | 1 + arch/m32r/include/asm/mmu_context.h | 1 + arch/m32r/include/asm/mmzone.h | 1 + arch/m32r/include/asm/page.h | 1 + arch/m32r/include/asm/pci.h | 1 + arch/m32r/include/asm/percpu.h | 1 + arch/m32r/include/asm/pgalloc.h | 1 + arch/m32r/include/asm/pgtable-2level.h | 1 + arch/m32r/include/asm/pgtable.h | 1 + arch/m32r/include/asm/rtc.h | 1 + arch/m32r/include/asm/s1d13806.h | 1 + arch/m32r/include/asm/segment.h | 1 + arch/m32r/include/asm/serial.h | 1 + arch/m32r/include/asm/setup.h | 1 + arch/m32r/include/asm/shmparam.h | 1 + arch/m32r/include/asm/signal.h | 1 + arch/m32r/include/asm/smp.h | 1 + arch/m32r/include/asm/spinlock.h | 1 + arch/m32r/include/asm/spinlock_types.h | 1 + arch/m32r/include/asm/string.h | 1 + arch/m32r/include/asm/syscall.h | 1 + arch/m32r/include/asm/termios.h | 1 + arch/m32r/include/asm/thread_info.h | 1 + arch/m32r/include/asm/timex.h | 1 + arch/m32r/include/asm/tlb.h | 1 + arch/m32r/include/asm/tlbflush.h | 1 + arch/m32r/include/asm/topology.h | 1 + arch/m32r/include/asm/types.h | 1 + arch/m32r/include/asm/uaccess.h | 1 + arch/m32r/include/asm/ucontext.h | 1 + arch/m32r/include/asm/unaligned.h | 1 + arch/m32r/include/asm/unistd.h | 1 + arch/m32r/include/asm/user.h | 1 + arch/m32r/include/asm/vga.h | 1 + arch/m32r/include/asm/xor.h | 1 + arch/m32r/kernel/Makefile | 1 + arch/m32r/kernel/align.c | 1 + arch/m32r/kernel/asm-offsets.c | 1 + arch/m32r/kernel/entry.S | 1 + arch/m32r/kernel/head.S | 1 + arch/m32r/kernel/irq.c | 1 + arch/m32r/kernel/m32r_ksyms.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/ptrace.c | 1 + arch/m32r/kernel/setup.c | 1 + arch/m32r/kernel/signal.c | 1 + arch/m32r/kernel/sys_m32r.c | 1 + arch/m32r/kernel/syscall_table.S | 1 + arch/m32r/kernel/time.c | 1 + arch/m32r/kernel/traps.c | 1 + arch/m32r/kernel/vmlinux.lds.S | 1 + arch/m32r/lib/ashxdi3.S | 1 + arch/m32r/lib/delay.c | 1 + arch/m32r/lib/libgcc.h | 1 + arch/m32r/lib/memcpy.S | 1 + arch/m32r/lib/memset.S | 1 + arch/m32r/lib/strlen.S | 1 + arch/m32r/lib/ucmpdi2.c | 1 + arch/m32r/lib/usercopy.c | 1 + arch/m32r/mm/Makefile | 1 + arch/m32r/mm/cache.c | 1 + arch/m32r/mm/discontig.c | 1 + arch/m32r/mm/extable.c | 1 + arch/m32r/mm/fault-nommu.c | 1 + arch/m32r/mm/fault.c | 1 + arch/m32r/mm/init.c | 1 + arch/m32r/mm/mmu.S | 1 + arch/m32r/oprofile/Makefile | 1 + arch/m32r/platforms/Makefile | 1 + arch/m32r/platforms/m32104ut/io.c | 1 + arch/m32r/platforms/m32104ut/setup.c | 1 + arch/m32r/platforms/mappi/io.c | 1 + arch/m32r/platforms/mappi/setup.c | 1 + arch/m32r/platforms/mappi2/io.c | 1 + arch/m32r/platforms/mappi2/setup.c | 1 + arch/m32r/platforms/mappi3/io.c | 1 + arch/m32r/platforms/mappi3/setup.c | 1 + arch/m32r/platforms/oaks32r/io.c | 1 + arch/m32r/platforms/oaks32r/setup.c | 1 + arch/m32r/platforms/usrv/setup.c | 1 + arch/m68k/68000/Makefile | 1 + arch/m68k/68000/bootlogo-vz.h | 1 + arch/m68k/68000/bootlogo.h | 1 + arch/m68k/68000/head.S | 1 + arch/m68k/Kconfig | 1 + arch/m68k/Kconfig.bus | 1 + arch/m68k/Kconfig.cpu | 1 + arch/m68k/Kconfig.debug | 1 + arch/m68k/Kconfig.devices | 1 + arch/m68k/Kconfig.machine | 1 + arch/m68k/amiga/chipram.c | 1 + arch/m68k/apollo/config.c | 1 + arch/m68k/apollo/dn_ints.c | 1 + arch/m68k/bvme6000/rtc.c | 1 + arch/m68k/coldfire/Makefile | 1 + arch/m68k/coldfire/cache.c | 1 + arch/m68k/coldfire/clk.c | 1 + arch/m68k/coldfire/dma.c | 1 + arch/m68k/coldfire/dma_timer.c | 1 + arch/m68k/coldfire/firebee.c | 1 + arch/m68k/coldfire/head.S | 1 + arch/m68k/coldfire/m5206.c | 1 + arch/m68k/coldfire/m520x.c | 1 + arch/m68k/coldfire/m523x.c | 1 + arch/m68k/coldfire/m5249.c | 1 + arch/m68k/coldfire/m525x.c | 1 + arch/m68k/coldfire/m5272.c | 1 + arch/m68k/coldfire/m527x.c | 1 + arch/m68k/coldfire/m528x.c | 1 + arch/m68k/coldfire/m5307.c | 1 + arch/m68k/coldfire/m5407.c | 1 + arch/m68k/coldfire/m5441x.c | 1 + arch/m68k/coldfire/m54xx.c | 1 + arch/m68k/coldfire/nettel.c | 1 + arch/m68k/coldfire/pit.c | 1 + arch/m68k/coldfire/sltimers.c | 1 + arch/m68k/coldfire/timers.c | 1 + arch/m68k/coldfire/vectors.c | 1 + arch/m68k/fpsp040/Makefile | 1 + arch/m68k/hp300/config.c | 1 + arch/m68k/hp300/time.c | 1 + arch/m68k/include/asm/MC68328.h | 1 + arch/m68k/include/asm/MC68EZ328.h | 1 + arch/m68k/include/asm/MC68VZ328.h | 1 + arch/m68k/include/asm/adb_iop.h | 1 + arch/m68k/include/asm/apollohw.h | 1 + arch/m68k/include/asm/atafd.h | 1 + arch/m68k/include/asm/atafdreg.h | 1 + arch/m68k/include/asm/atari_joystick.h | 1 + arch/m68k/include/asm/atari_stdma.h | 1 + arch/m68k/include/asm/atari_stram.h | 1 + arch/m68k/include/asm/atomic.h | 1 + arch/m68k/include/asm/bootstd.h | 1 + arch/m68k/include/asm/bug.h | 1 + arch/m68k/include/asm/bugs.h | 1 + arch/m68k/include/asm/bvme6000hw.h | 1 + arch/m68k/include/asm/cache.h | 1 + arch/m68k/include/asm/cacheflush.h | 1 + arch/m68k/include/asm/cacheflush_mm.h | 1 + arch/m68k/include/asm/cacheflush_no.h | 1 + arch/m68k/include/asm/checksum.h | 1 + arch/m68k/include/asm/cmpxchg.h | 1 + arch/m68k/include/asm/coldfire.h | 1 + arch/m68k/include/asm/contregs.h | 1 + arch/m68k/include/asm/current.h | 1 + arch/m68k/include/asm/delay.h | 1 + arch/m68k/include/asm/div64.h | 1 + arch/m68k/include/asm/dma-mapping.h | 1 + arch/m68k/include/asm/dma.h | 1 + arch/m68k/include/asm/dvma.h | 1 + arch/m68k/include/asm/elf.h | 1 + arch/m68k/include/asm/entry.h | 1 + arch/m68k/include/asm/fb.h | 1 + arch/m68k/include/asm/fbio.h | 1 + arch/m68k/include/asm/flat.h | 1 + arch/m68k/include/asm/fpu.h | 1 + arch/m68k/include/asm/hardirq.h | 1 + arch/m68k/include/asm/hash.h | 1 + arch/m68k/include/asm/hp300hw.h | 1 + arch/m68k/include/asm/hwtest.h | 1 + arch/m68k/include/asm/ide.h | 1 + arch/m68k/include/asm/idprom.h | 1 + arch/m68k/include/asm/intersil.h | 1 + arch/m68k/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/m68k/include/asm/io_no.h | 1 + arch/m68k/include/asm/irq.h | 1 + arch/m68k/include/asm/irqflags.h | 1 + arch/m68k/include/asm/kexec.h | 1 + arch/m68k/include/asm/linkage.h | 1 + arch/m68k/include/asm/m5206sim.h | 1 + arch/m68k/include/asm/m520xsim.h | 1 + arch/m68k/include/asm/m523xsim.h | 1 + arch/m68k/include/asm/m525xsim.h | 1 + arch/m68k/include/asm/m5272sim.h | 1 + arch/m68k/include/asm/m527xsim.h | 1 + arch/m68k/include/asm/m528xsim.h | 1 + arch/m68k/include/asm/m52xxacr.h | 1 + arch/m68k/include/asm/m5307sim.h | 1 + arch/m68k/include/asm/m53xxacr.h | 1 + arch/m68k/include/asm/m53xxsim.h | 1 + arch/m68k/include/asm/m5407sim.h | 1 + arch/m68k/include/asm/m5441xsim.h | 1 + arch/m68k/include/asm/m54xxacr.h | 1 + arch/m68k/include/asm/m54xxgpt.h | 1 + arch/m68k/include/asm/m54xxsim.h | 1 + arch/m68k/include/asm/mac_asc.h | 1 + arch/m68k/include/asm/mac_baboon.h | 1 + arch/m68k/include/asm/mac_iop.h | 1 + arch/m68k/include/asm/mac_oss.h | 1 + arch/m68k/include/asm/mac_psc.h | 1 + arch/m68k/include/asm/mac_via.h | 1 + arch/m68k/include/asm/machdep.h | 1 + arch/m68k/include/asm/machines.h | 1 + arch/m68k/include/asm/macintosh.h | 1 + arch/m68k/include/asm/math-emu.h | 1 + arch/m68k/include/asm/mc146818rtc.h | 1 + arch/m68k/include/asm/mcf8390.h | 1 + arch/m68k/include/asm/mcf_pgalloc.h | 1 + arch/m68k/include/asm/mcf_pgtable.h | 1 + arch/m68k/include/asm/mcfclk.h | 1 + arch/m68k/include/asm/mcfdma.h | 1 + arch/m68k/include/asm/mcfintc.h | 1 + arch/m68k/include/asm/mcfpit.h | 1 + arch/m68k/include/asm/mcfsim.h | 1 + arch/m68k/include/asm/mcfslt.h | 1 + arch/m68k/include/asm/mcftimer.h | 1 + arch/m68k/include/asm/mcfuart.h | 1 + arch/m68k/include/asm/mcfwdebug.h | 1 + arch/m68k/include/asm/mmu.h | 1 + arch/m68k/include/asm/mmu_context.h | 1 + arch/m68k/include/asm/mmzone.h | 1 + arch/m68k/include/asm/module.h | 1 + arch/m68k/include/asm/motorola_pgalloc.h | 1 + arch/m68k/include/asm/motorola_pgtable.h | 1 + arch/m68k/include/asm/movs.h | 1 + arch/m68k/include/asm/mvme147hw.h | 1 + arch/m68k/include/asm/mvme16xhw.h | 1 + arch/m68k/include/asm/nettel.h | 1 + arch/m68k/include/asm/nubus.h | 1 + arch/m68k/include/asm/openprom.h | 1 + arch/m68k/include/asm/oplib.h | 1 + arch/m68k/include/asm/page.h | 1 + arch/m68k/include/asm/page_mm.h | 1 + arch/m68k/include/asm/page_no.h | 1 + arch/m68k/include/asm/page_offset.h | 1 + arch/m68k/include/asm/parport.h | 1 + arch/m68k/include/asm/pci.h | 1 + arch/m68k/include/asm/pgalloc.h | 1 + arch/m68k/include/asm/pgtable.h | 1 + arch/m68k/include/asm/pgtable_mm.h | 1 + arch/m68k/include/asm/pgtable_no.h | 1 + arch/m68k/include/asm/processor.h | 1 + arch/m68k/include/asm/ptrace.h | 1 + arch/m68k/include/asm/q40_master.h | 1 + arch/m68k/include/asm/q40ints.h | 1 + arch/m68k/include/asm/quicc_simple.h | 1 + arch/m68k/include/asm/raw_io.h | 1 + arch/m68k/include/asm/segment.h | 1 + arch/m68k/include/asm/serial.h | 1 + arch/m68k/include/asm/signal.h | 1 + arch/m68k/include/asm/string.h | 1 + arch/m68k/include/asm/sun3-head.h | 1 + arch/m68k/include/asm/sun3_pgalloc.h | 1 + arch/m68k/include/asm/sun3_pgtable.h | 1 + arch/m68k/include/asm/sun3mmu.h | 1 + arch/m68k/include/asm/sun3x.h | 1 + arch/m68k/include/asm/sun3xflop.h | 1 + arch/m68k/include/asm/sun3xprom.h | 1 + arch/m68k/include/asm/switch_to.h | 1 + arch/m68k/include/asm/thread_info.h | 1 + arch/m68k/include/asm/timex.h | 1 + arch/m68k/include/asm/tlb.h | 1 + arch/m68k/include/asm/tlbflush.h | 1 + arch/m68k/include/asm/uaccess.h | 1 + arch/m68k/include/asm/uaccess_mm.h | 1 + arch/m68k/include/asm/uaccess_no.h | 1 + arch/m68k/include/asm/ucontext.h | 1 + arch/m68k/include/asm/unaligned.h | 1 + arch/m68k/include/asm/unistd.h | 1 + arch/m68k/include/asm/user.h | 1 + arch/m68k/include/asm/vga.h | 1 + arch/m68k/include/asm/virtconvert.h | 1 + arch/m68k/include/asm/zorro.h | 1 + arch/m68k/kernel/Makefile | 1 + arch/m68k/kernel/asm-offsets.c | 1 + arch/m68k/kernel/bootinfo_proc.c | 1 + arch/m68k/kernel/machine_kexec.c | 1 + arch/m68k/kernel/process.c | 1 + arch/m68k/kernel/relocate_kernel.S | 1 + arch/m68k/kernel/setup.c | 1 + arch/m68k/kernel/setup_mm.c | 1 + arch/m68k/kernel/setup_no.c | 1 + arch/m68k/kernel/sun3-head.S | 1 + arch/m68k/kernel/sys_m68k.c | 1 + arch/m68k/kernel/syscalltable.S | 1 + arch/m68k/kernel/vmlinux-nommu.lds | 1 + arch/m68k/kernel/vmlinux-std.lds | 1 + arch/m68k/kernel/vmlinux-sun3.lds | 1 + arch/m68k/kernel/vmlinux.lds.S | 1 + arch/m68k/lib/Makefile | 1 + arch/m68k/mac/baboon.c | 1 + arch/m68k/mac/mac_penguin.S | 1 + arch/m68k/mac/macboing.c | 1 + arch/m68k/mac/macints.c | 1 + arch/m68k/mac/misc.c | 1 + arch/m68k/mac/oss.c | 1 + arch/m68k/mac/via.c | 1 + arch/m68k/mm/Makefile | 1 + arch/m68k/mm/cache.c | 1 + arch/m68k/mm/fault.c | 1 + arch/m68k/mm/hwtest.c | 1 + arch/m68k/mm/init.c | 1 + arch/m68k/mm/kmap.c | 1 + arch/m68k/mm/mcfmmu.c | 1 + arch/m68k/mm/memory.c | 1 + arch/m68k/mm/motorola.c | 1 + arch/m68k/mm/sun3mmu.c | 1 + arch/m68k/mvme16x/rtc.c | 1 + arch/m68k/sun3/dvma.c | 1 + arch/m68k/sun3/idprom.c | 1 + arch/m68k/sun3/leds.c | 1 + arch/m68k/sun3/mmu_emu.c | 1 + arch/m68k/sun3/prom/console.c | 1 + arch/m68k/sun3/prom/init.c | 1 + arch/m68k/sun3/prom/misc.c | 1 + arch/m68k/sun3/prom/printf.c | 1 + arch/m68k/sun3/sun3dvma.c | 1 + arch/m68k/sun3x/config.c | 1 + arch/m68k/sun3x/dvma.c | 1 + arch/m68k/sun3x/prom.c | 1 + arch/m68k/sun3x/time.c | 1 + arch/m68k/sun3x/time.h | 1 + arch/m68k/tools/amiga/Makefile | 1 + arch/metag/Kconfig | 1 + arch/metag/Kconfig.debug | 1 + arch/metag/Kconfig.soc | 1 + arch/metag/boot/dts/Makefile | 1 + arch/metag/boot/dts/skeleton.dtsi | 1 + arch/metag/include/asm/atomic.h | 1 + arch/metag/include/asm/atomic_lnkget.h | 1 + arch/metag/include/asm/atomic_lock1.h | 1 + arch/metag/include/asm/barrier.h | 1 + arch/metag/include/asm/bitops.h | 1 + arch/metag/include/asm/bug.h | 1 + arch/metag/include/asm/cache.h | 1 + arch/metag/include/asm/cacheflush.h | 1 + arch/metag/include/asm/cachepart.h | 1 + arch/metag/include/asm/checksum.h | 1 + arch/metag/include/asm/cmpxchg.h | 1 + arch/metag/include/asm/cmpxchg_irq.h | 1 + arch/metag/include/asm/cmpxchg_lnkget.h | 1 + arch/metag/include/asm/cmpxchg_lock1.h | 1 + arch/metag/include/asm/core_reg.h | 1 + arch/metag/include/asm/cpu.h | 1 + arch/metag/include/asm/da.h | 1 + arch/metag/include/asm/delay.h | 1 + arch/metag/include/asm/div64.h | 1 + arch/metag/include/asm/dma-mapping.h | 1 + arch/metag/include/asm/elf.h | 1 + arch/metag/include/asm/ftrace.h | 1 + arch/metag/include/asm/global_lock.h | 1 + arch/metag/include/asm/highmem.h | 1 + arch/metag/include/asm/hugetlb.h | 1 + arch/metag/include/asm/hwthread.h | 1 + arch/metag/include/asm/io.h | 1 + arch/metag/include/asm/irq.h | 1 + arch/metag/include/asm/irqflags.h | 1 + arch/metag/include/asm/l2cache.h | 1 + arch/metag/include/asm/linkage.h | 1 + arch/metag/include/asm/mman.h | 1 + arch/metag/include/asm/mmu.h | 1 + arch/metag/include/asm/mmu_context.h | 1 + arch/metag/include/asm/mmzone.h | 1 + arch/metag/include/asm/module.h | 1 + arch/metag/include/asm/page.h | 1 + arch/metag/include/asm/pgalloc.h | 1 + arch/metag/include/asm/pgtable-bits.h | 1 + arch/metag/include/asm/pgtable.h | 1 + arch/metag/include/asm/processor.h | 1 + arch/metag/include/asm/ptrace.h | 1 + arch/metag/include/asm/setup.h | 1 + arch/metag/include/asm/smp.h | 1 + arch/metag/include/asm/sparsemem.h | 1 + arch/metag/include/asm/spinlock.h | 1 + arch/metag/include/asm/spinlock_lnkget.h | 1 + arch/metag/include/asm/spinlock_lock1.h | 1 + arch/metag/include/asm/spinlock_types.h | 1 + arch/metag/include/asm/stacktrace.h | 1 + arch/metag/include/asm/string.h | 1 + arch/metag/include/asm/syscalls.h | 1 + arch/metag/include/asm/tcm.h | 1 + arch/metag/include/asm/thread_info.h | 1 + arch/metag/include/asm/tlb.h | 1 + arch/metag/include/asm/tlbflush.h | 1 + arch/metag/include/asm/topology.h | 1 + arch/metag/include/asm/uaccess.h | 1 + arch/metag/include/asm/user_gateway.h | 1 + arch/metag/kernel/Makefile | 1 + arch/metag/kernel/asm-offsets.c | 1 + arch/metag/kernel/cachepart.c | 1 + arch/metag/kernel/core_reg.c | 1 + arch/metag/kernel/head.S | 1 + arch/metag/kernel/irq.c | 1 + arch/metag/kernel/machines.c | 1 + arch/metag/kernel/metag_ksyms.c | 1 + arch/metag/kernel/perf_callchain.c | 1 + arch/metag/kernel/process.c | 1 + arch/metag/kernel/signal.c | 1 + arch/metag/kernel/sys_metag.c | 1 + arch/metag/kernel/tbiunexp.S | 1 + arch/metag/kernel/tcm.c | 1 + arch/metag/kernel/time.c | 1 + arch/metag/kernel/user_gateway.S | 1 + arch/metag/kernel/vmlinux.lds.S | 1 + arch/metag/lib/Makefile | 1 + arch/metag/lib/ashldi3.S | 1 + arch/metag/lib/ashrdi3.S | 1 + arch/metag/lib/clear_page.S | 1 + arch/metag/lib/cmpdi2.S | 1 + arch/metag/lib/copy_page.S | 1 + arch/metag/lib/delay.c | 1 + arch/metag/lib/div64.S | 1 + arch/metag/lib/divsi3.S | 1 + arch/metag/lib/ip_fast_csum.S | 1 + arch/metag/lib/lshrdi3.S | 1 + arch/metag/lib/memcpy.S | 1 + arch/metag/lib/memmove.S | 1 + arch/metag/lib/memset.S | 1 + arch/metag/lib/modsi3.S | 1 + arch/metag/lib/muldi3.S | 1 + arch/metag/lib/ucmpdi2.S | 1 + arch/metag/lib/usercopy.c | 1 + arch/metag/mm/Kconfig | 1 + arch/metag/mm/Makefile | 1 + arch/metag/mm/extable.c | 1 + arch/metag/mm/fault.c | 1 + arch/metag/mm/highmem.c | 1 + arch/metag/mm/hugetlbpage.c | 1 + arch/metag/mm/init.c | 1 + arch/metag/mm/ioremap.c | 1 + arch/metag/mm/l2cache.c | 1 + arch/metag/mm/maccess.c | 1 + arch/metag/mm/mmu-meta1.c | 1 + arch/metag/mm/mmu-meta2.c | 1 + arch/metag/oprofile/Makefile | 1 + arch/metag/oprofile/backtrace.h | 1 + arch/metag/tbx/Makefile | 1 + arch/microblaze/Makefile | 1 + arch/microblaze/boot/Makefile | 1 + arch/microblaze/boot/dts/Makefile | 1 + arch/microblaze/include/asm/asm-compat.h | 1 + arch/microblaze/include/asm/atomic.h | 1 + arch/microblaze/include/asm/cmpxchg.h | 1 + arch/microblaze/include/asm/ftrace.h | 1 + arch/microblaze/include/asm/futex.h | 1 + arch/microblaze/include/asm/hash.h | 1 + arch/microblaze/include/asm/highmem.h | 1 + arch/microblaze/include/asm/kgdb.h | 1 + arch/microblaze/include/asm/mmu_context.h | 1 + arch/microblaze/include/asm/seccomp.h | 1 + arch/microblaze/include/asm/syscall.h | 1 + arch/microblaze/kernel/Makefile | 1 + arch/microblaze/kernel/cpu/Makefile | 1 + arch/microblaze/kernel/dma.c | 1 + arch/microblaze/kernel/syscall_table.S | 1 + arch/microblaze/lib/Makefile | 1 + arch/microblaze/lib/ashldi3.c | 1 + arch/microblaze/lib/ashrdi3.c | 1 + arch/microblaze/lib/cmpdi2.c | 1 + arch/microblaze/lib/divsi3.S | 1 + arch/microblaze/lib/libgcc.h | 1 + arch/microblaze/lib/lshrdi3.c | 1 + arch/microblaze/lib/modsi3.S | 1 + arch/microblaze/lib/muldi3.c | 1 + arch/microblaze/lib/mulsi3.S | 1 + arch/microblaze/lib/ucmpdi2.c | 1 + arch/microblaze/lib/udivsi3.S | 1 + arch/microblaze/lib/umodsi3.S | 1 + arch/microblaze/mm/highmem.c | 1 + arch/microblaze/oprofile/Makefile | 1 + arch/microblaze/pci/iomap.c | 1 + arch/mips/Kconfig | 1 + arch/mips/Kconfig.debug | 1 + arch/mips/Makefile.postlink | 1 + arch/mips/alchemy/Kconfig | 1 + arch/mips/alchemy/common/clock.c | 1 + arch/mips/alchemy/devboards/db1300.c | 1 + arch/mips/alchemy/devboards/db1550.c | 1 + arch/mips/alchemy/devboards/db1xxx.c | 1 + arch/mips/alchemy/devboards/platform.c | 1 + arch/mips/alchemy/devboards/platform.h | 1 + arch/mips/alchemy/devboards/pm.c | 1 + arch/mips/ar7/Makefile | 1 + arch/mips/ath25/Kconfig | 1 + arch/mips/ath25/ar2315.h | 1 + arch/mips/ath25/ar5312.h | 1 + arch/mips/ath25/devices.c | 1 + arch/mips/ath25/devices.h | 1 + arch/mips/ath79/Kconfig | 1 + arch/mips/bcm47xx/Kconfig | 1 + arch/mips/bcm47xx/bcm47xx_private.h | 1 + arch/mips/bcm47xx/board.c | 1 + arch/mips/bcm47xx/buttons.c | 1 + arch/mips/bcm47xx/leds.c | 1 + arch/mips/bcm47xx/workarounds.c | 1 + arch/mips/bcm63xx/Kconfig | 1 + arch/mips/bcm63xx/Makefile | 1 + arch/mips/bcm63xx/boards/Kconfig | 1 + arch/mips/bmips/Kconfig | 1 + arch/mips/boot/compressed/dbg.c | 1 + arch/mips/boot/compressed/string.c | 1 + arch/mips/boot/compressed/uart-16550.c | 1 + arch/mips/boot/compressed/uart-alchemy.c | 1 + arch/mips/boot/compressed/uart-prom.c | 1 + arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/brcm/Makefile | 1 + arch/mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts | 1 + arch/mips/boot/dts/brcm/bcm3368.dtsi | 1 + arch/mips/boot/dts/brcm/bcm3384_viper.dtsi | 1 + arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi | 1 + arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts | 1 + arch/mips/boot/dts/brcm/bcm63268.dtsi | 1 + arch/mips/boot/dts/brcm/bcm6328.dtsi | 1 + arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts | 1 + arch/mips/boot/dts/brcm/bcm6358.dtsi | 1 + arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts | 1 + arch/mips/boot/dts/brcm/bcm6362.dtsi | 1 + arch/mips/boot/dts/brcm/bcm6368.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7125.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7346.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7358.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7360.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7362.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7420.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7425.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7435.dtsi | 1 + arch/mips/boot/dts/brcm/bcm93384wvg.dts | 1 + arch/mips/boot/dts/brcm/bcm93384wvg_viper.dts | 1 + arch/mips/boot/dts/brcm/bcm96368mvwg.dts | 1 + arch/mips/boot/dts/brcm/bcm97125cbmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97358svmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97360svmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97362svmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97420c.dts | 1 + arch/mips/boot/dts/brcm/bcm97425svmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97435svmb.dts | 1 + arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi | 1 + arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi | 1 + arch/mips/boot/dts/brcm/bcm9ejtagprb.dts | 1 + arch/mips/boot/dts/cavium-octeon/Makefile | 1 + arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts | 1 + arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi | 1 + arch/mips/boot/dts/cavium-octeon/octeon_68xx.dts | 1 + arch/mips/boot/dts/img/Makefile | 1 + arch/mips/boot/dts/img/boston.dts | 1 + arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/ci20.dts | 1 + arch/mips/boot/dts/ingenic/jz4740.dtsi | 1 + arch/mips/boot/dts/ingenic/jz4780.dtsi | 1 + arch/mips/boot/dts/ingenic/qi_lb60.dts | 1 + arch/mips/boot/dts/lantiq/Makefile | 1 + arch/mips/boot/dts/lantiq/danube.dtsi | 1 + arch/mips/boot/dts/lantiq/easy50712.dts | 1 + arch/mips/boot/dts/mti/Makefile | 1 + arch/mips/boot/dts/mti/malta.dts | 1 + arch/mips/boot/dts/mti/sead3.dts | 1 + arch/mips/boot/dts/netlogic/Makefile | 1 + arch/mips/boot/dts/netlogic/xlp_evp.dts | 1 + arch/mips/boot/dts/netlogic/xlp_fvp.dts | 1 + arch/mips/boot/dts/netlogic/xlp_gvp.dts | 1 + arch/mips/boot/dts/netlogic/xlp_rvp.dts | 1 + arch/mips/boot/dts/netlogic/xlp_svp.dts | 1 + arch/mips/boot/dts/pic32/Makefile | 1 + arch/mips/boot/dts/qca/Makefile | 1 + arch/mips/boot/dts/qca/ar9132.dtsi | 1 + arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 1 + arch/mips/boot/dts/qca/ar9331.dtsi | 1 + arch/mips/boot/dts/qca/ar9331_dpt_module.dts | 1 + arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts | 1 + arch/mips/boot/dts/qca/ar9331_omega.dts | 1 + arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | 1 + arch/mips/boot/dts/ralink/Makefile | 1 + arch/mips/boot/dts/ralink/mt7620a.dtsi | 1 + arch/mips/boot/dts/ralink/mt7620a_eval.dts | 1 + arch/mips/boot/dts/ralink/rt2880.dtsi | 1 + arch/mips/boot/dts/ralink/rt2880_eval.dts | 1 + arch/mips/boot/dts/ralink/rt3050.dtsi | 1 + arch/mips/boot/dts/ralink/rt3052_eval.dts | 1 + arch/mips/boot/dts/ralink/rt3883.dtsi | 1 + arch/mips/boot/dts/ralink/rt3883_eval.dts | 1 + arch/mips/boot/dts/xilfpga/Makefile | 1 + arch/mips/boot/dts/xilfpga/microAptiv.dtsi | 1 + arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 1 + arch/mips/boot/ecoff.h | 1 + arch/mips/boot/tools/Makefile | 1 + arch/mips/boot/tools/relocs.c | 1 + arch/mips/boot/tools/relocs.h | 1 + arch/mips/boot/tools/relocs_32.c | 1 + arch/mips/boot/tools/relocs_64.c | 1 + arch/mips/boot/tools/relocs_main.c | 1 + arch/mips/cavium-octeon/Kconfig | 1 + arch/mips/cavium-octeon/crypto/Makefile | 1 + arch/mips/dec/int-handler.S | 1 + arch/mips/dec/prom/cmdline.c | 1 + arch/mips/dec/prom/dectypes.h | 1 + arch/mips/dec/prom/identify.c | 1 + arch/mips/dec/prom/init.c | 1 + arch/mips/dec/prom/locore.S | 1 + arch/mips/dec/prom/memory.c | 1 + arch/mips/dec/reset.c | 1 + arch/mips/dec/time.c | 1 + arch/mips/fw/arc/Makefile | 1 + arch/mips/fw/arc/arc_con.c | 1 + arch/mips/fw/arc/memory.c | 1 + arch/mips/fw/arc/salone.c | 1 + arch/mips/generic/Kconfig | 1 + arch/mips/generic/vmlinux.its.S | 1 + arch/mips/include/asm/asm-prototypes.h | 1 + arch/mips/include/asm/asmmacro-32.h | 1 + arch/mips/include/asm/asmmacro-64.h | 1 + arch/mips/include/asm/bitrev.h | 1 + arch/mips/include/asm/bmips-spaces.h | 1 + arch/mips/include/asm/bug.h | 1 + arch/mips/include/asm/bugs.h | 1 + arch/mips/include/asm/clock.h | 1 + arch/mips/include/asm/cmp.h | 1 + arch/mips/include/asm/compat-signal.h | 1 + arch/mips/include/asm/compat.h | 1 + arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/dma-mapping.h | 1 + arch/mips/include/asm/dma.h | 1 + arch/mips/include/asm/edac.h | 1 + arch/mips/include/asm/extable.h | 1 + arch/mips/include/asm/fw/arc/hinv.h | 1 + arch/mips/include/asm/gio_device.h | 1 + arch/mips/include/asm/highmem.h | 1 + arch/mips/include/asm/hpet.h | 1 + arch/mips/include/asm/idle.h | 1 + arch/mips/include/asm/isadep.h | 1 + arch/mips/include/asm/jazzdma.h | 1 + arch/mips/include/asm/kdebug.h | 1 + arch/mips/include/asm/kgdb.h | 1 + arch/mips/include/asm/kmap_types.h | 1 + arch/mips/include/asm/kvm_para.h | 1 + arch/mips/include/asm/lasat/ds1603.h | 1 + arch/mips/include/asm/lasat/eeprom.h | 1 + arch/mips/include/asm/lasat/head.h | 1 + arch/mips/include/asm/lasat/lasatint.h | 1 + arch/mips/include/asm/lasat/picvue.h | 1 + arch/mips/include/asm/lasat/serial.h | 1 + arch/mips/include/asm/linkage.h | 1 + arch/mips/include/asm/local.h | 1 + arch/mips/include/asm/m48t37.h | 1 + arch/mips/include/asm/mach-ath25/ath25_platform.h | 1 + arch/mips/include/asm/mach-au1x00/au1200fb.h | 1 + arch/mips/include/asm/mach-au1x00/au1550_spi.h | 1 + arch/mips/include/asm/mach-au1x00/au1550nd.h | 1 + arch/mips/include/asm/mach-au1x00/au1xxx_eth.h | 1 + arch/mips/include/asm/mach-au1x00/gpio-au1300.h | 1 + arch/mips/include/asm/mach-au1x00/prom.h | 1 + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_hsspi.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pcmcia.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_usbd.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h | 1 + arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h | 1 + arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 1 + arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-bcm63xx/ioremap.h | 1 + arch/mips/include/asm/mach-bcm63xx/irq.h | 1 + arch/mips/include/asm/mach-bmips/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-bmips/ioremap.h | 1 + arch/mips/include/asm/mach-db1x00/bcsr.h | 1 + arch/mips/include/asm/mach-generic/kmalloc.h | 1 + arch/mips/include/asm/mach-ip27/mmzone.h | 1 + arch/mips/include/asm/mach-ip27/topology.h | 1 + arch/mips/include/asm/mach-ip32/kmalloc.h | 1 + arch/mips/include/asm/mach-jz4740/base.h | 1 + arch/mips/include/asm/mach-jz4740/jz4740_mmc.h | 1 + arch/mips/include/asm/mach-lasat/irq.h | 1 + arch/mips/include/asm/mach-lasat/mach-gt64120.h | 1 + arch/mips/include/asm/mach-loongson64/boot_param.h | 1 + arch/mips/include/asm/mach-loongson64/cs5536/cs5536.h | 1 + arch/mips/include/asm/mach-loongson64/cs5536/cs5536_mfgpt.h | 1 + arch/mips/include/asm/mach-loongson64/cs5536/cs5536_pci.h | 1 + arch/mips/include/asm/mach-loongson64/cs5536/cs5536_vsm.h | 1 + arch/mips/include/asm/mach-loongson64/irq.h | 1 + arch/mips/include/asm/mach-loongson64/loongson_hwmon.h | 1 + arch/mips/include/asm/mach-loongson64/spaces.h | 1 + arch/mips/include/asm/mach-loongson64/topology.h | 1 + arch/mips/include/asm/mach-loongson64/workarounds.h | 1 + arch/mips/include/asm/mach-malta/irq.h | 1 + arch/mips/include/asm/mach-malta/mach-gt64120.h | 1 + arch/mips/include/asm/mach-ralink/irq.h | 1 + arch/mips/include/asm/mach-rc32434/dma.h | 1 + arch/mips/include/asm/mach-rc32434/dma_v.h | 1 + arch/mips/include/asm/mach-rc32434/gpio.h | 1 + arch/mips/include/asm/mach-rc32434/irq.h | 1 + arch/mips/include/asm/mach-rc32434/rc32434.h | 1 + arch/mips/include/asm/mach-tx39xx/mangle-port.h | 1 + arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h | 1 + arch/mips/include/asm/mach-tx49xx/kmalloc.h | 1 + arch/mips/include/asm/mach-tx49xx/mangle-port.h | 1 + arch/mips/include/asm/mach-vr41xx/irq.h | 1 + arch/mips/include/asm/mips-boards/launch.h | 1 + arch/mips/include/asm/mips_mt.h | 1 + arch/mips/include/asm/mipsmtregs.h | 1 + arch/mips/include/asm/mipsprom.h | 1 + arch/mips/include/asm/mmu.h | 1 + arch/mips/include/asm/mmzone.h | 1 + arch/mips/include/asm/module.h | 1 + arch/mips/include/asm/nile4.h | 1 + arch/mips/include/asm/octeon/cvmx-config.h | 1 + arch/mips/include/asm/seccomp.h | 1 + arch/mips/include/asm/setup.h | 1 + arch/mips/include/asm/sgi/pi1.h | 1 + arch/mips/include/asm/sn/hub.h | 1 + arch/mips/include/asm/sn/ioc3.h | 1 + arch/mips/include/asm/sn/klkernvars.h | 1 + arch/mips/include/asm/sn/mapped_kernel.h | 1 + arch/mips/include/asm/sn/sn_private.h | 1 + arch/mips/include/asm/sparsemem.h | 1 + arch/mips/include/asm/spinlock_types.h | 1 + arch/mips/include/asm/spram.h | 1 + arch/mips/include/asm/stackprotector.h | 1 + arch/mips/include/asm/stacktrace.h | 1 + arch/mips/include/asm/thread_info.h | 1 + arch/mips/include/asm/tlb.h | 1 + arch/mips/include/asm/tlbex.h | 1 + arch/mips/include/asm/tlbflush.h | 1 + arch/mips/include/asm/tlbmisc.h | 1 + arch/mips/include/asm/txx9/boards.h | 1 + arch/mips/include/asm/vga.h | 1 + arch/mips/jazz/Kconfig | 1 + arch/mips/jazz/jazzdma.c | 1 + arch/mips/jazz/reset.c | 1 + arch/mips/jz4740/Kconfig | 1 + arch/mips/jz4740/Makefile | 1 + arch/mips/jz4740/reset.h | 1 + arch/mips/kernel/Makefile | 1 + arch/mips/kernel/asm-offsets.c | 1 + arch/mips/kernel/binfmt_elfn32.c | 1 + arch/mips/kernel/binfmt_elfo32.c | 1 + arch/mips/kernel/crash.c | 1 + arch/mips/kernel/crash_dump.c | 1 + arch/mips/kernel/ftrace.c | 1 + arch/mips/kernel/i8253.c | 1 + arch/mips/kernel/linux32.c | 1 + arch/mips/kernel/mips-mt-fpaff.c | 1 + arch/mips/kernel/mips-mt.c | 1 + arch/mips/kernel/proc.c | 1 + arch/mips/kernel/r2300_switch.S | 1 + arch/mips/kernel/spinlock_test.c | 1 + arch/mips/kernel/sync-r4k.c | 1 + arch/mips/kernel/sysrq.c | 1 + arch/mips/kernel/topology.c | 1 + arch/mips/kernel/uprobes.c | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/mips/kvm/Kconfig | 1 + arch/mips/kvm/Makefile | 1 + arch/mips/lantiq/Kconfig | 1 + arch/mips/lasat/Kconfig | 1 + arch/mips/lasat/Makefile | 1 + arch/mips/lasat/at93c.c | 1 + arch/mips/lasat/at93c.h | 1 + arch/mips/lasat/ds1603.c | 1 + arch/mips/lasat/ds1603.h | 1 + arch/mips/lasat/image/Makefile | 1 + arch/mips/lasat/image/head.S | 1 + arch/mips/lasat/lasat_models.h | 1 + arch/mips/lasat/picvue.h | 1 + arch/mips/lasat/prom.c | 1 + arch/mips/lasat/prom.h | 1 + arch/mips/lib/Makefile | 1 + arch/mips/lib/ashldi3.c | 1 + arch/mips/lib/ashrdi3.c | 1 + arch/mips/lib/bswapdi.c | 1 + arch/mips/lib/bswapsi.c | 1 + arch/mips/lib/cmpdi2.c | 1 + arch/mips/lib/dump_tlb.c | 1 + arch/mips/lib/iomap-pci.c | 1 + arch/mips/lib/iomap.c | 1 + arch/mips/lib/libgcc.h | 1 + arch/mips/lib/lshrdi3.c | 1 + arch/mips/lib/r3k_dump_tlb.c | 1 + arch/mips/lib/ucmpdi2.c | 1 + arch/mips/loongson32/Kconfig | 1 + arch/mips/loongson64/Kconfig | 1 + arch/mips/loongson64/common/Makefile | 1 + arch/mips/loongson64/common/dma-swiotlb.c | 1 + arch/mips/loongson64/loongson-3/acpi_init.c | 1 + arch/mips/loongson64/loongson-3/hpet.c | 1 + arch/mips/loongson64/loongson-3/irq.c | 1 + arch/mips/loongson64/loongson-3/smp.h | 1 + arch/mips/math-emu/Makefile | 1 + arch/mips/math-emu/dsemul.c | 1 + arch/mips/math-emu/me-debugfs.c | 1 + arch/mips/mm/Makefile | 1 + arch/mips/mm/c-r3k.c | 1 + arch/mips/mm/c-tx39.c | 1 + arch/mips/mm/gup.c | 1 + arch/mips/mm/highmem.c | 1 + arch/mips/mm/sc-ip22.c | 1 + arch/mips/mm/sc-mips.c | 1 + arch/mips/mm/sc-r5k.c | 1 + arch/mips/mm/sc-rm7k.c | 1 + arch/mips/mm/tlb-r3k.c | 1 + arch/mips/mti-malta/Makefile | 1 + arch/mips/netlogic/Kconfig | 1 + arch/mips/netlogic/common/Makefile | 1 + arch/mips/netlogic/xlp/Makefile | 1 + arch/mips/oprofile/Makefile | 1 + arch/mips/oprofile/backtrace.c | 1 + arch/mips/paravirt/Kconfig | 1 + arch/mips/pci/Makefile | 1 + arch/mips/pci/fixup-ip32.c | 1 + arch/mips/pci/fixup-malta.c | 1 + arch/mips/pci/ops-loongson3.c | 1 + arch/mips/pci/ops-nile4.c | 1 + arch/mips/pci/pci-alchemy.c | 1 + arch/mips/pci/pci-bcm63xx.h | 1 + arch/mips/pic32/Kconfig | 1 + arch/mips/pistachio/Kconfig | 1 + arch/mips/pmcs-msp71xx/Kconfig | 1 + arch/mips/pmcs-msp71xx/Makefile | 1 + arch/mips/power/hibernate.c | 1 + arch/mips/ralink/Kconfig | 1 + arch/mips/rb532/setup.c | 1 + arch/mips/sgi-ip22/Makefile | 1 + arch/mips/sgi-ip22/ip22-berr.c | 1 + arch/mips/sgi-ip22/ip22-hpc.c | 1 + arch/mips/sgi-ip22/ip22-int.c | 1 + arch/mips/sgi-ip22/ip22-mc.c | 1 + arch/mips/sgi-ip22/ip22-nvram.c | 1 + arch/mips/sgi-ip22/ip22-platform.c | 1 + arch/mips/sgi-ip22/ip22-setup.c | 1 + arch/mips/sgi-ip22/ip28-berr.c | 1 + arch/mips/sgi-ip27/Kconfig | 1 + arch/mips/sgi-ip27/Makefile | 1 + arch/mips/sgi-ip27/ip27-irq-pci.c | 1 + arch/mips/sgi-ip27/ip27-irq.c | 1 + arch/mips/sgi-ip27/ip27-klconfig.c | 1 + arch/mips/sgi-ip27/ip27-klnuma.c | 1 + arch/mips/sgi-ip27/ip27-nmi.c | 1 + arch/mips/sgi-ip27/ip27-timer.c | 1 + arch/mips/sibyte/Kconfig | 1 + arch/mips/sibyte/Makefile | 1 + arch/mips/sibyte/common/cfe_console.c | 1 + arch/mips/sibyte/swarm/platform.c | 1 + arch/mips/sni/reset.c | 1 + arch/mips/sni/time.c | 1 + arch/mips/txx9/Kconfig | 1 + arch/mips/txx9/Makefile | 1 + arch/mips/txx9/generic/Makefile | 1 + arch/mips/vdso/Makefile | 1 + arch/mips/vr41xx/Kconfig | 1 + arch/mips/xilfpga/Kconfig | 1 + arch/mn10300/Kconfig | 1 + arch/mn10300/Kconfig.debug | 1 + arch/mn10300/boot/compressed/Makefile | 1 + arch/mn10300/boot/tools/build.c | 1 + arch/mn10300/include/asm/kmap_types.h | 1 + arch/mn10300/include/asm/mmu.h | 1 + arch/mn10300/include/asm/page_offset.h | 1 + arch/mn10300/include/asm/shmparam.h | 1 + arch/mn10300/include/asm/spinlock_types.h | 1 + arch/mn10300/include/asm/termios.h | 1 + arch/mn10300/kernel/Makefile | 1 + arch/mn10300/kernel/asm-offsets.c | 1 + arch/mn10300/kernel/gdb-stub.c | 1 + arch/mn10300/mm/Kconfig.cache | 1 + arch/mn10300/mm/Makefile | 1 + arch/mn10300/oprofile/Makefile | 1 + arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h | 1 + arch/mn10300/proc-mn2ws0050/include/proc/intctl-regs.h | 1 + arch/mn10300/unit-asb2364/include/unit/fpga-regs.h | 1 + arch/nios2/Kconfig | 1 + arch/nios2/Kconfig.debug | 1 + arch/nios2/boot/compressed/Makefile | 1 + arch/nios2/kernel/Makefile | 1 + arch/nios2/mm/Makefile | 1 + arch/openrisc/Kconfig | 1 + arch/openrisc/boot/dts/Makefile | 1 + arch/openrisc/boot/dts/or1ksim.dts | 1 + arch/openrisc/include/asm/futex.h | 1 + arch/openrisc/include/asm/string.h | 1 + arch/openrisc/kernel/Makefile | 1 + arch/openrisc/kernel/vmlinux.h | 1 + arch/openrisc/lib/memcpy.c | 1 + arch/parisc/Kconfig | 1 + arch/parisc/Kconfig.debug | 1 + arch/parisc/include/asm/agp.h | 1 + arch/parisc/include/asm/atomic.h | 1 + arch/parisc/include/asm/bitops.h | 1 + arch/parisc/include/asm/bug.h | 1 + arch/parisc/include/asm/bugs.h | 1 + arch/parisc/include/asm/cache.h | 1 + arch/parisc/include/asm/cacheflush.h | 1 + arch/parisc/include/asm/checksum.h | 1 + arch/parisc/include/asm/cmpxchg.h | 1 + arch/parisc/include/asm/compat.h | 1 + arch/parisc/include/asm/compat_ucontext.h | 1 + arch/parisc/include/asm/delay.h | 1 + arch/parisc/include/asm/dma-mapping.h | 1 + arch/parisc/include/asm/dma.h | 1 + arch/parisc/include/asm/elf.h | 1 + arch/parisc/include/asm/fb.h | 1 + arch/parisc/include/asm/fixmap.h | 1 + arch/parisc/include/asm/ftrace.h | 1 + arch/parisc/include/asm/futex.h | 1 + arch/parisc/include/asm/hardirq.h | 1 + arch/parisc/include/asm/hardware.h | 1 + arch/parisc/include/asm/hash.h | 1 + arch/parisc/include/asm/hugetlb.h | 1 + arch/parisc/include/asm/ide.h | 1 + arch/parisc/include/asm/io.h | 1 + arch/parisc/include/asm/irq.h | 1 + arch/parisc/include/asm/irqflags.h | 1 + arch/parisc/include/asm/kbdleds.h | 1 + arch/parisc/include/asm/kmap_types.h | 1 + arch/parisc/include/asm/ldcw.h | 1 + arch/parisc/include/asm/led.h | 1 + arch/parisc/include/asm/linkage.h | 1 + arch/parisc/include/asm/machdep.h | 1 + arch/parisc/include/asm/mckinley.h | 1 + arch/parisc/include/asm/mmu.h | 1 + arch/parisc/include/asm/mmu_context.h | 1 + arch/parisc/include/asm/mmzone.h | 1 + arch/parisc/include/asm/module.h | 1 + arch/parisc/include/asm/page.h | 1 + arch/parisc/include/asm/parisc-device.h | 1 + arch/parisc/include/asm/parport.h | 1 + arch/parisc/include/asm/pci.h | 1 + arch/parisc/include/asm/pdc.h | 1 + arch/parisc/include/asm/perf.h | 1 + arch/parisc/include/asm/pgalloc.h | 1 + arch/parisc/include/asm/pgtable.h | 1 + arch/parisc/include/asm/prefetch.h | 1 + arch/parisc/include/asm/processor.h | 1 + arch/parisc/include/asm/psw.h | 1 + arch/parisc/include/asm/ptrace.h | 1 + arch/parisc/include/asm/ropes.h | 1 + arch/parisc/include/asm/rt_sigframe.h | 1 + arch/parisc/include/asm/runway.h | 1 + arch/parisc/include/asm/sections.h | 1 + arch/parisc/include/asm/shmparam.h | 1 + arch/parisc/include/asm/signal.h | 1 + arch/parisc/include/asm/smp.h | 1 + arch/parisc/include/asm/socket.h | 1 + arch/parisc/include/asm/special_insns.h | 1 + arch/parisc/include/asm/spinlock.h | 1 + arch/parisc/include/asm/spinlock_types.h | 1 + arch/parisc/include/asm/string.h | 1 + arch/parisc/include/asm/superio.h | 1 + arch/parisc/include/asm/switch_to.h | 1 + arch/parisc/include/asm/syscall.h | 1 + arch/parisc/include/asm/termios.h | 1 + arch/parisc/include/asm/thread_info.h | 1 + arch/parisc/include/asm/timex.h | 1 + arch/parisc/include/asm/tlb.h | 1 + arch/parisc/include/asm/tlbflush.h | 1 + arch/parisc/include/asm/traps.h | 1 + arch/parisc/include/asm/uaccess.h | 1 + arch/parisc/include/asm/ucontext.h | 1 + arch/parisc/include/asm/unaligned.h | 1 + arch/parisc/include/asm/unistd.h | 1 + arch/parisc/include/asm/unwind.h | 1 + arch/parisc/kernel/Makefile | 1 + arch/parisc/kernel/audit.c | 1 + arch/parisc/kernel/binfmt_elf32.c | 1 + arch/parisc/kernel/compat_audit.c | 1 + arch/parisc/kernel/ftrace.c | 1 + arch/parisc/kernel/pa7300lc.c | 1 + arch/parisc/kernel/pci-dma.c | 1 + arch/parisc/kernel/pdt.c | 1 + arch/parisc/kernel/ptrace.c | 1 + arch/parisc/kernel/signal.c | 1 + arch/parisc/kernel/sys_parisc32.c | 1 + arch/parisc/kernel/time.c | 1 + arch/parisc/kernel/traps.c | 1 + arch/parisc/kernel/unwind.c | 1 + arch/parisc/kernel/vmlinux.lds.S | 1 + arch/parisc/lib/bitops.c | 1 + arch/parisc/lib/delay.c | 1 + arch/parisc/lib/io.c | 1 + arch/parisc/lib/iomap.c | 1 + arch/parisc/lib/ucmpdi2.c | 1 + arch/parisc/math-emu/Makefile | 1 + arch/parisc/mm/hugetlbpage.c | 1 + arch/parisc/mm/init.c | 1 + arch/parisc/mm/ioremap.c | 1 + arch/parisc/oprofile/Makefile | 1 + arch/powerpc/Kconfig | 1 + arch/powerpc/Kconfig.debug | 1 + arch/powerpc/Makefile.postlink | 1 + arch/powerpc/boot/Makefile | 1 + arch/powerpc/boot/cpm-serial.c | 1 + arch/powerpc/boot/cuboot.h | 1 + arch/powerpc/boot/dcr.h | 1 + arch/powerpc/boot/dts/virtex440-ml510.dts | 1 + arch/powerpc/boot/elf.h | 1 + arch/powerpc/boot/epapr-wrapper.c | 1 + arch/powerpc/boot/fixed-head.S | 1 + arch/powerpc/boot/fsl-soc.h | 1 + arch/powerpc/boot/io.h | 1 + arch/powerpc/boot/libfdt_env.h | 1 + arch/powerpc/boot/mktree.c | 1 + arch/powerpc/boot/motload-head.S | 1 + arch/powerpc/boot/mpc52xx-psc.c | 1 + arch/powerpc/boot/mpc8xx.h | 1 + arch/powerpc/boot/ns16550.c | 1 + arch/powerpc/boot/of.h | 1 + arch/powerpc/boot/planetcore.h | 1 + arch/powerpc/boot/pq2.h | 1 + arch/powerpc/boot/pseries-head.S | 1 + arch/powerpc/boot/redboot.h | 1 + arch/powerpc/boot/rs6000.h | 1 + arch/powerpc/boot/stdio.h | 1 + arch/powerpc/boot/stdlib.h | 1 + arch/powerpc/boot/string.h | 1 + arch/powerpc/boot/swab.h | 1 + arch/powerpc/boot/types.h | 1 + arch/powerpc/boot/virtex405-head.S | 1 + arch/powerpc/boot/xz_config.h | 1 + arch/powerpc/boot/zImage.coff.lds.S | 1 + arch/powerpc/boot/zImage.lds.S | 1 + arch/powerpc/boot/zImage.ps3.lds.S | 1 + arch/powerpc/crypto/Makefile | 1 + arch/powerpc/crypto/sha1-powerpc-asm.S | 1 + arch/powerpc/include/asm/agp.h | 1 + arch/powerpc/include/asm/archrandom.h | 1 + arch/powerpc/include/asm/atomic.h | 1 + arch/powerpc/include/asm/backlight.h | 1 + arch/powerpc/include/asm/barrier.h | 1 + arch/powerpc/include/asm/book3s/32/hash.h | 1 + arch/powerpc/include/asm/book3s/32/mmu-hash.h | 1 + arch/powerpc/include/asm/book3s/32/pgalloc.h | 1 + arch/powerpc/include/asm/book3s/32/pgtable.h | 1 + arch/powerpc/include/asm/book3s/64/hash-4k.h | 1 + arch/powerpc/include/asm/book3s/64/hash-64k.h | 1 + arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/include/asm/book3s/64/hugetlb.h | 1 + arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/include/asm/book3s/64/pgtable-4k.h | 1 + arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/include/asm/book3s/64/radix-4k.h | 1 + arch/powerpc/include/asm/book3s/64/radix-64k.h | 1 + arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 1 + arch/powerpc/include/asm/book3s/64/tlbflush-radix.h | 1 + arch/powerpc/include/asm/book3s/64/tlbflush.h | 1 + arch/powerpc/include/asm/book3s/pgalloc.h | 1 + arch/powerpc/include/asm/book3s/pgtable.h | 1 + arch/powerpc/include/asm/bootx.h | 1 + arch/powerpc/include/asm/btext.h | 1 + arch/powerpc/include/asm/bug.h | 1 + arch/powerpc/include/asm/cache.h | 1 + arch/powerpc/include/asm/cell-regs.h | 1 + arch/powerpc/include/asm/cmpxchg.h | 1 + arch/powerpc/include/asm/compat.h | 1 + arch/powerpc/include/asm/context_tracking.h | 1 + arch/powerpc/include/asm/cpm.h | 1 + arch/powerpc/include/asm/cpm1.h | 1 + arch/powerpc/include/asm/cpm2.h | 1 + arch/powerpc/include/asm/cpu_has_feature.h | 1 + arch/powerpc/include/asm/cpuidle.h | 1 + arch/powerpc/include/asm/cputable.h | 1 + arch/powerpc/include/asm/cputhreads.h | 1 + arch/powerpc/include/asm/dbdma.h | 1 + arch/powerpc/include/asm/dcr-regs.h | 1 + arch/powerpc/include/asm/debug.h | 1 + arch/powerpc/include/asm/dma-mapping.h | 1 + arch/powerpc/include/asm/dma.h | 1 + arch/powerpc/include/asm/dt_cpu_ftrs.h | 1 + arch/powerpc/include/asm/exec.h | 1 + arch/powerpc/include/asm/extable.h | 1 + arch/powerpc/include/asm/fb.h | 1 + arch/powerpc/include/asm/ftrace.h | 1 + arch/powerpc/include/asm/futex.h | 1 + arch/powerpc/include/asm/grackle.h | 1 + arch/powerpc/include/asm/hardirq.h | 1 + arch/powerpc/include/asm/head-64.h | 1 + arch/powerpc/include/asm/heathrow.h | 1 + arch/powerpc/include/asm/highmem.h | 1 + arch/powerpc/include/asm/hugetlb.h | 1 + arch/powerpc/include/asm/hvcall.h | 1 + arch/powerpc/include/asm/hvsi.h | 1 + arch/powerpc/include/asm/hw_irq.h | 1 + arch/powerpc/include/asm/i8259.h | 1 + arch/powerpc/include/asm/ide.h | 1 + arch/powerpc/include/asm/ima.h | 1 + arch/powerpc/include/asm/immap_cpm2.h | 1 + arch/powerpc/include/asm/io-defs.h | 1 + arch/powerpc/include/asm/irq_work.h | 1 + arch/powerpc/include/asm/irqflags.h | 1 + arch/powerpc/include/asm/isa-bridge.h | 1 + arch/powerpc/include/asm/kdebug.h | 1 + arch/powerpc/include/asm/kdump.h | 1 + arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/include/asm/keylargo.h | 1 + arch/powerpc/include/asm/libata-portmap.h | 1 + arch/powerpc/include/asm/linkage.h | 1 + arch/powerpc/include/asm/local.h | 1 + arch/powerpc/include/asm/macio.h | 1 + arch/powerpc/include/asm/mediabay.h | 1 + arch/powerpc/include/asm/mmu-40x.h | 1 + arch/powerpc/include/asm/mmu-44x.h | 1 + arch/powerpc/include/asm/mmu-8xx.h | 1 + arch/powerpc/include/asm/mmu-book3e.h | 1 + arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/include/asm/mmu_context.h | 1 + arch/powerpc/include/asm/mmzone.h | 1 + arch/powerpc/include/asm/mpc6xx.h | 1 + arch/powerpc/include/asm/mpc8260.h | 1 + arch/powerpc/include/asm/mpic.h | 1 + arch/powerpc/include/asm/nmi.h | 1 + arch/powerpc/include/asm/nohash/32/pgalloc.h | 1 + arch/powerpc/include/asm/nohash/32/pgtable.h | 1 + arch/powerpc/include/asm/nohash/32/pte-40x.h | 1 + arch/powerpc/include/asm/nohash/32/pte-44x.h | 1 + arch/powerpc/include/asm/nohash/32/pte-8xx.h | 1 + arch/powerpc/include/asm/nohash/32/pte-fsl-booke.h | 1 + arch/powerpc/include/asm/nohash/64/pgtable-4k.h | 1 + arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 1 + arch/powerpc/include/asm/nohash/64/pgtable.h | 1 + arch/powerpc/include/asm/nohash/pgalloc.h | 1 + arch/powerpc/include/asm/nohash/pgtable.h | 1 + arch/powerpc/include/asm/nohash/pte-book3e.h | 1 + arch/powerpc/include/asm/ohare.h | 1 + arch/powerpc/include/asm/page_32.h | 1 + arch/powerpc/include/asm/parport.h | 1 + arch/powerpc/include/asm/percpu.h | 1 + arch/powerpc/include/asm/pgalloc.h | 1 + arch/powerpc/include/asm/pgtable-be-types.h | 1 + arch/powerpc/include/asm/pgtable-types.h | 1 + arch/powerpc/include/asm/pgtable.h | 1 + arch/powerpc/include/asm/plpar_wrappers.h | 1 + arch/powerpc/include/asm/pmac_pfunc.h | 1 + arch/powerpc/include/asm/pte-common.h | 1 + arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/include/asm/reg_8xx.h | 1 + arch/powerpc/include/asm/reg_fsl_emb.h | 1 + arch/powerpc/include/asm/runlatch.h | 1 + arch/powerpc/include/asm/seccomp.h | 1 + arch/powerpc/include/asm/sections.h | 1 + arch/powerpc/include/asm/setup.h | 1 + arch/powerpc/include/asm/shmparam.h | 1 + arch/powerpc/include/asm/signal.h | 1 + arch/powerpc/include/asm/smu.h | 1 + arch/powerpc/include/asm/sparsemem.h | 1 + arch/powerpc/include/asm/spinlock_types.h | 1 + arch/powerpc/include/asm/string.h | 1 + arch/powerpc/include/asm/switch_to.h | 1 + arch/powerpc/include/asm/synch.h | 1 + arch/powerpc/include/asm/syscalls.h | 1 + arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/thread_info.h | 1 + arch/powerpc/include/asm/timex.h | 1 + arch/powerpc/include/asm/tm.h | 1 + arch/powerpc/include/asm/topology.h | 1 + arch/powerpc/include/asm/trace.h | 1 + arch/powerpc/include/asm/uaccess.h | 1 + arch/powerpc/include/asm/unaligned.h | 1 + arch/powerpc/include/asm/uninorth.h | 1 + arch/powerpc/include/asm/user.h | 1 + arch/powerpc/include/asm/vdso.h | 1 + arch/powerpc/include/asm/vga.h | 1 + arch/powerpc/include/asm/xics.h | 1 + arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/audit.c | 1 + arch/powerpc/kernel/btext.c | 1 + arch/powerpc/kernel/cacheinfo.h | 1 + arch/powerpc/kernel/compat_audit.c | 1 + arch/powerpc/kernel/dma-iommu.c | 1 + arch/powerpc/kernel/exceptions-64s.S | 1 + arch/powerpc/kernel/fsl_booke_entry_mapping.S | 1 + arch/powerpc/kernel/head_booke.h | 1 + arch/powerpc/kernel/iomap.c | 1 + arch/powerpc/kernel/legacy_serial.c | 1 + arch/powerpc/kernel/prom_parse.c | 1 + arch/powerpc/kernel/rtas-proc.c | 1 + arch/powerpc/kernel/rtas-rtc.c | 1 + arch/powerpc/kernel/smp-tbsync.c | 1 + arch/powerpc/kernel/swsusp_32.S | 1 + arch/powerpc/kernel/swsusp_booke.S | 1 + arch/powerpc/kernel/tau_6xx.c | 1 + arch/powerpc/kernel/tm.S | 1 + arch/powerpc/kernel/trace/Makefile | 1 + arch/powerpc/kernel/trace/ftrace.c | 1 + arch/powerpc/kernel/vdso32/Makefile | 1 + arch/powerpc/kernel/vdso32/vdso32.lds.S | 1 + arch/powerpc/kernel/vdso32/vdso32_wrapper.S | 1 + arch/powerpc/kernel/vdso64/Makefile | 1 + arch/powerpc/kernel/vdso64/vdso64.lds.S | 1 + arch/powerpc/kernel/vdso64/vdso64_wrapper.S | 1 + arch/powerpc/kernel/vecemu.c | 1 + arch/powerpc/kernel/vector.S | 1 + arch/powerpc/kernel/vmlinux.lds.S | 1 + arch/powerpc/kernel/watchdog.c | 1 + arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/kvm/Makefile | 1 + arch/powerpc/kvm/book3s_hv_rm_xive.c | 1 + arch/powerpc/kvm/irq.h | 1 + arch/powerpc/kvm/trace.h | 1 + arch/powerpc/kvm/trace_book3s.h | 1 + arch/powerpc/kvm/trace_booke.h | 1 + arch/powerpc/kvm/trace_hv.h | 1 + arch/powerpc/kvm/trace_pr.h | 1 + arch/powerpc/lib/Makefile | 1 + arch/powerpc/lib/alloc.c | 1 + arch/powerpc/lib/xor_vmx.h | 1 + arch/powerpc/math-emu/Makefile | 1 + arch/powerpc/math-emu/fabs.c | 1 + arch/powerpc/math-emu/fadd.c | 1 + arch/powerpc/math-emu/fadds.c | 1 + arch/powerpc/math-emu/fcmpo.c | 1 + arch/powerpc/math-emu/fcmpu.c | 1 + arch/powerpc/math-emu/fctiw.c | 1 + arch/powerpc/math-emu/fctiwz.c | 1 + arch/powerpc/math-emu/fdiv.c | 1 + arch/powerpc/math-emu/fdivs.c | 1 + arch/powerpc/math-emu/fmadd.c | 1 + arch/powerpc/math-emu/fmadds.c | 1 + arch/powerpc/math-emu/fmr.c | 1 + arch/powerpc/math-emu/fmsub.c | 1 + arch/powerpc/math-emu/fmsubs.c | 1 + arch/powerpc/math-emu/fmul.c | 1 + arch/powerpc/math-emu/fmuls.c | 1 + arch/powerpc/math-emu/fnabs.c | 1 + arch/powerpc/math-emu/fneg.c | 1 + arch/powerpc/math-emu/fnmadd.c | 1 + arch/powerpc/math-emu/fnmadds.c | 1 + arch/powerpc/math-emu/fnmsub.c | 1 + arch/powerpc/math-emu/fnmsubs.c | 1 + arch/powerpc/math-emu/fre.c | 1 + arch/powerpc/math-emu/fres.c | 1 + arch/powerpc/math-emu/frsp.c | 1 + arch/powerpc/math-emu/frsqrte.c | 1 + arch/powerpc/math-emu/frsqrtes.c | 1 + arch/powerpc/math-emu/fsel.c | 1 + arch/powerpc/math-emu/fsqrt.c | 1 + arch/powerpc/math-emu/fsqrts.c | 1 + arch/powerpc/math-emu/fsub.c | 1 + arch/powerpc/math-emu/fsubs.c | 1 + arch/powerpc/math-emu/lfd.c | 1 + arch/powerpc/math-emu/lfs.c | 1 + arch/powerpc/math-emu/math.c | 1 + arch/powerpc/math-emu/mcrfs.c | 1 + arch/powerpc/math-emu/mffs.c | 1 + arch/powerpc/math-emu/mtfsb0.c | 1 + arch/powerpc/math-emu/mtfsb1.c | 1 + arch/powerpc/math-emu/mtfsf.c | 1 + arch/powerpc/math-emu/mtfsfi.c | 1 + arch/powerpc/math-emu/stfd.c | 1 + arch/powerpc/math-emu/stfiwx.c | 1 + arch/powerpc/math-emu/stfs.c | 1 + arch/powerpc/math-emu/udivmodti4.c | 1 + arch/powerpc/mm/Makefile | 1 + arch/powerpc/mm/highmem.c | 1 + arch/powerpc/mm/hugetlbpage-book3e.c | 1 + arch/powerpc/mm/hugetlbpage-hash64.c | 1 + arch/powerpc/mm/hugetlbpage-radix.c | 1 + arch/powerpc/mm/vphn.c | 1 + arch/powerpc/mm/vphn.h | 1 + arch/powerpc/net/Makefile | 1 + arch/powerpc/oprofile/Makefile | 1 + arch/powerpc/perf/Makefile | 1 + arch/powerpc/perf/hv-24x7-catalog.h | 1 + arch/powerpc/perf/hv-24x7-domains.h | 1 + arch/powerpc/perf/hv-24x7.h | 1 + arch/powerpc/perf/hv-common.c | 1 + arch/powerpc/perf/hv-common.h | 1 + arch/powerpc/perf/hv-gpci-requests.h | 1 + arch/powerpc/perf/hv-gpci.h | 1 + arch/powerpc/perf/req-gen/_begin.h | 1 + arch/powerpc/perf/req-gen/_clear.h | 1 + arch/powerpc/perf/req-gen/_request-begin.h | 1 + arch/powerpc/perf/req-gen/_request-end.h | 1 + arch/powerpc/perf/req-gen/perf.h | 1 + arch/powerpc/platforms/40x/Kconfig | 1 + arch/powerpc/platforms/44x/44x.h | 1 + arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/44x/Makefile | 1 + arch/powerpc/platforms/44x/virtex_ml510.c | 1 + arch/powerpc/platforms/512x/Kconfig | 1 + arch/powerpc/platforms/512x/Makefile | 1 + arch/powerpc/platforms/52xx/Kconfig | 1 + arch/powerpc/platforms/52xx/Makefile | 1 + arch/powerpc/platforms/52xx/lite5200_pm.c | 1 + arch/powerpc/platforms/52xx/lite5200_sleep.S | 1 + arch/powerpc/platforms/52xx/mpc52xx_pm.c | 1 + arch/powerpc/platforms/52xx/mpc52xx_sleep.S | 1 + arch/powerpc/platforms/82xx/Kconfig | 1 + arch/powerpc/platforms/82xx/Makefile | 1 + arch/powerpc/platforms/82xx/pq2.h | 1 + arch/powerpc/platforms/83xx/Kconfig | 1 + arch/powerpc/platforms/83xx/Makefile | 1 + arch/powerpc/platforms/83xx/mpc83xx.h | 1 + arch/powerpc/platforms/85xx/Kconfig | 1 + arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx.h | 1 + arch/powerpc/platforms/85xx/smp.h | 1 + arch/powerpc/platforms/86xx/Kconfig | 1 + arch/powerpc/platforms/86xx/Makefile | 1 + arch/powerpc/platforms/8xx/Kconfig | 1 + arch/powerpc/platforms/8xx/Makefile | 1 + arch/powerpc/platforms/8xx/m8xx_setup.c | 1 + arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/platforms/Kconfig.cputype | 1 + arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/amigaone/Kconfig | 1 + arch/powerpc/platforms/cell/Kconfig | 1 + arch/powerpc/platforms/cell/Makefile | 1 + arch/powerpc/platforms/cell/interrupt.h | 1 + arch/powerpc/platforms/cell/ras.h | 1 + arch/powerpc/platforms/cell/spufs/Makefile | 1 + arch/powerpc/platforms/cell/spufs/run.c | 1 + arch/powerpc/platforms/cell/spufs/sputrace.h | 1 + arch/powerpc/platforms/cell/spufs/syscalls.c | 1 + arch/powerpc/platforms/chrp/Kconfig | 1 + arch/powerpc/platforms/chrp/chrp.h | 1 + arch/powerpc/platforms/chrp/pci.c | 1 + arch/powerpc/platforms/chrp/pegasos_eth.c | 1 + arch/powerpc/platforms/chrp/setup.c | 1 + arch/powerpc/platforms/chrp/smp.c | 1 + arch/powerpc/platforms/chrp/time.c | 1 + arch/powerpc/platforms/embedded6xx/Kconfig | 1 + arch/powerpc/platforms/embedded6xx/Makefile | 1 + arch/powerpc/platforms/maple/Kconfig | 1 + arch/powerpc/platforms/maple/maple.h | 1 + arch/powerpc/platforms/pasemi/Kconfig | 1 + arch/powerpc/platforms/pasemi/pasemi.h | 1 + arch/powerpc/platforms/powermac/Kconfig | 1 + arch/powerpc/platforms/powermac/Makefile | 1 + arch/powerpc/platforms/powermac/pfunc_base.c | 1 + arch/powerpc/platforms/powermac/pmac.h | 1 + arch/powerpc/platforms/powermac/time.c | 1 + arch/powerpc/platforms/powermac/udbg_adb.c | 1 + arch/powerpc/platforms/powernv/Kconfig | 1 + arch/powerpc/platforms/powernv/Makefile | 1 + arch/powerpc/platforms/powernv/opal-tracepoints.c | 1 + arch/powerpc/platforms/powernv/pci.h | 1 + arch/powerpc/platforms/powernv/powernv.h | 1 + arch/powerpc/platforms/ps3/Kconfig | 1 + arch/powerpc/platforms/ps3/Makefile | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/powerpc/platforms/pseries/Makefile | 1 + arch/powerpc/platforms/pseries/of_helpers.c | 1 + arch/powerpc/platforms/pseries/of_helpers.h | 1 + arch/powerpc/platforms/pseries/offline_states.h | 1 + arch/powerpc/purgatory/Makefile | 1 + arch/powerpc/sysdev/Kconfig | 1 + arch/powerpc/sysdev/Makefile | 1 + arch/powerpc/sysdev/cpm1.c | 1 + arch/powerpc/sysdev/cpm2_pic.h | 1 + arch/powerpc/sysdev/fsl_soc.h | 1 + arch/powerpc/sysdev/ge/ge_pic.h | 1 + arch/powerpc/sysdev/micropatch.c | 1 + arch/powerpc/sysdev/mpc5xxx_clocks.c | 1 + arch/powerpc/sysdev/mv64x60.h | 1 + arch/powerpc/sysdev/simple_gpio.h | 1 + arch/powerpc/sysdev/xics/Kconfig | 1 + arch/powerpc/sysdev/xics/Makefile | 1 + arch/powerpc/sysdev/xics/ics-rtas.c | 1 + arch/powerpc/sysdev/xive/Kconfig | 1 + arch/powerpc/tools/gcc-check-mprofile-kernel.sh | 1 + arch/powerpc/xmon/Makefile | 1 + arch/powerpc/xmon/nonstdio.h | 1 + arch/powerpc/xmon/spr_access.S | 1 + arch/s390/Kconfig | 1 + arch/s390/Kconfig.debug | 1 + arch/s390/appldata/appldata.h | 1 + arch/s390/boot/Makefile | 1 + arch/s390/boot/compressed/Makefile | 1 + arch/s390/boot/compressed/head.S | 1 + arch/s390/boot/compressed/misc.c | 1 + arch/s390/boot/compressed/vmlinux.lds.S | 1 + arch/s390/crypto/Makefile | 1 + arch/s390/crypto/crc32be-vx.S | 1 + arch/s390/crypto/crc32le-vx.S | 1 + arch/s390/hypfs/hypfs.h | 1 + arch/s390/hypfs/hypfs_dbfs.c | 1 + arch/s390/hypfs/hypfs_diag.c | 1 + arch/s390/hypfs/hypfs_diag0c.c | 1 + arch/s390/hypfs/hypfs_sprp.c | 1 + arch/s390/hypfs/hypfs_vm.c | 1 + arch/s390/include/asm/airq.h | 1 + arch/s390/include/asm/appldata.h | 1 + arch/s390/include/asm/archrandom.h | 1 + arch/s390/include/asm/asm-prototypes.h | 1 + arch/s390/include/asm/atomic.h | 1 + arch/s390/include/asm/atomic_ops.h | 1 + arch/s390/include/asm/barrier.h | 1 + arch/s390/include/asm/bitops.h | 1 + arch/s390/include/asm/bug.h | 1 + arch/s390/include/asm/cache.h | 1 + arch/s390/include/asm/ccwdev.h | 1 + arch/s390/include/asm/ccwgroup.h | 1 + arch/s390/include/asm/checksum.h | 1 + arch/s390/include/asm/chpid.h | 1 + arch/s390/include/asm/cio.h | 1 + arch/s390/include/asm/clp.h | 1 + arch/s390/include/asm/cmb.h | 1 + arch/s390/include/asm/cmpxchg.h | 1 + arch/s390/include/asm/compat.h | 1 + arch/s390/include/asm/cpacf.h | 1 + arch/s390/include/asm/cpcmd.h | 1 + arch/s390/include/asm/cpu.h | 1 + arch/s390/include/asm/cpufeature.h | 1 + arch/s390/include/asm/cputime.h | 1 + arch/s390/include/asm/crw.h | 1 + arch/s390/include/asm/css_chars.h | 1 + arch/s390/include/asm/ctl_reg.h | 1 + arch/s390/include/asm/current.h | 1 + arch/s390/include/asm/debug.h | 1 + arch/s390/include/asm/delay.h | 1 + arch/s390/include/asm/diag.h | 1 + arch/s390/include/asm/dis.h | 1 + arch/s390/include/asm/dma-mapping.h | 1 + arch/s390/include/asm/dma.h | 1 + arch/s390/include/asm/eadm.h | 1 + arch/s390/include/asm/ebcdic.h | 1 + arch/s390/include/asm/elf.h | 1 + arch/s390/include/asm/exec.h | 1 + arch/s390/include/asm/extable.h | 1 + arch/s390/include/asm/extmem.h | 1 + arch/s390/include/asm/facility.h | 1 + arch/s390/include/asm/fcx.h | 1 + arch/s390/include/asm/fpu/api.h | 1 + arch/s390/include/asm/fpu/internal.h | 1 + arch/s390/include/asm/fpu/types.h | 1 + arch/s390/include/asm/ftrace.h | 1 + arch/s390/include/asm/futex.h | 1 + arch/s390/include/asm/gmap.h | 1 + arch/s390/include/asm/hardirq.h | 1 + arch/s390/include/asm/hugetlb.h | 1 + arch/s390/include/asm/hw_irq.h | 1 + arch/s390/include/asm/idals.h | 1 + arch/s390/include/asm/idle.h | 1 + arch/s390/include/asm/io.h | 1 + arch/s390/include/asm/ipl.h | 1 + arch/s390/include/asm/irq.h | 1 + arch/s390/include/asm/irqflags.h | 1 + arch/s390/include/asm/isc.h | 1 + arch/s390/include/asm/itcw.h | 1 + arch/s390/include/asm/jump_label.h | 1 + arch/s390/include/asm/kdebug.h | 1 + arch/s390/include/asm/kexec.h | 1 + arch/s390/include/asm/linkage.h | 1 + arch/s390/include/asm/lowcore.h | 1 + arch/s390/include/asm/mmu.h | 1 + arch/s390/include/asm/mmu_context.h | 1 + arch/s390/include/asm/mmzone.h | 1 + arch/s390/include/asm/module.h | 1 + arch/s390/include/asm/nmi.h | 1 + arch/s390/include/asm/numa.h | 1 + arch/s390/include/asm/os_info.h | 1 + arch/s390/include/asm/page-states.h | 1 + arch/s390/include/asm/page.h | 1 + arch/s390/include/asm/pci.h | 1 + arch/s390/include/asm/pci_clp.h | 1 + arch/s390/include/asm/pci_debug.h | 1 + arch/s390/include/asm/pci_dma.h | 1 + arch/s390/include/asm/pci_insn.h | 1 + arch/s390/include/asm/pci_io.h | 1 + arch/s390/include/asm/percpu.h | 1 + arch/s390/include/asm/perf_event.h | 1 + arch/s390/include/asm/pgalloc.h | 1 + arch/s390/include/asm/pgtable.h | 1 + arch/s390/include/asm/pkey.h | 1 + arch/s390/include/asm/preempt.h | 1 + arch/s390/include/asm/processor.h | 1 + arch/s390/include/asm/ptrace.h | 1 + arch/s390/include/asm/qdio.h | 1 + arch/s390/include/asm/reset.h | 1 + arch/s390/include/asm/runtime_instr.h | 1 + arch/s390/include/asm/rwsem.h | 1 + arch/s390/include/asm/schid.h | 1 + arch/s390/include/asm/sclp.h | 1 + arch/s390/include/asm/scsw.h | 1 + arch/s390/include/asm/seccomp.h | 1 + arch/s390/include/asm/sections.h | 1 + arch/s390/include/asm/serial.h | 1 + arch/s390/include/asm/set_memory.h | 1 + arch/s390/include/asm/setup.h | 1 + arch/s390/include/asm/shmparam.h | 1 + arch/s390/include/asm/signal.h | 1 + arch/s390/include/asm/sigp.h | 1 + arch/s390/include/asm/smp.h | 1 + arch/s390/include/asm/sparsemem.h | 1 + arch/s390/include/asm/spinlock.h | 1 + arch/s390/include/asm/spinlock_types.h | 1 + arch/s390/include/asm/stp.h | 1 + arch/s390/include/asm/string.h | 1 + arch/s390/include/asm/switch_to.h | 1 + arch/s390/include/asm/termios.h | 1 + arch/s390/include/asm/thread_info.h | 1 + arch/s390/include/asm/timex.h | 1 + arch/s390/include/asm/tlb.h | 1 + arch/s390/include/asm/tlbflush.h | 1 + arch/s390/include/asm/topology.h | 1 + arch/s390/include/asm/trace/diag.h | 1 + arch/s390/include/asm/trace/zcrypt.h | 1 + arch/s390/include/asm/uaccess.h | 1 + arch/s390/include/asm/unistd.h | 1 + arch/s390/include/asm/uprobes.h | 1 + arch/s390/include/asm/user.h | 1 + arch/s390/include/asm/vdso.h | 1 + arch/s390/include/asm/vtime.h | 1 + arch/s390/include/asm/vtimer.h | 1 + arch/s390/include/asm/vx-insn.h | 1 + arch/s390/include/asm/xor.h | 1 + arch/s390/kernel/Makefile | 1 + arch/s390/kernel/als.c | 1 + arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kernel/audit.c | 1 + arch/s390/kernel/audit.h | 1 + arch/s390/kernel/base.S | 1 + arch/s390/kernel/cache.c | 1 + arch/s390/kernel/compat_audit.c | 1 + arch/s390/kernel/compat_linux.c | 1 + arch/s390/kernel/compat_linux.h | 1 + arch/s390/kernel/compat_ptrace.h | 1 + arch/s390/kernel/compat_signal.c | 1 + arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/cpcmd.c | 1 + arch/s390/kernel/crash_dump.c | 1 + arch/s390/kernel/debug.c | 1 + arch/s390/kernel/diag.c | 1 + arch/s390/kernel/early.c | 1 + arch/s390/kernel/early_printk.c | 1 + arch/s390/kernel/ebcdic.c | 1 + arch/s390/kernel/entry.S | 1 + arch/s390/kernel/entry.h | 1 + arch/s390/kernel/fpu.c | 1 + arch/s390/kernel/ftrace.c | 1 + arch/s390/kernel/guarded_storage.c | 1 + arch/s390/kernel/head.S | 1 + arch/s390/kernel/head64.S | 1 + arch/s390/kernel/head_kdump.S | 1 + arch/s390/kernel/idle.c | 1 + arch/s390/kernel/irq.c | 1 + arch/s390/kernel/jump_label.c | 1 + arch/s390/kernel/kdebugfs.c | 1 + arch/s390/kernel/machine_kexec.c | 1 + arch/s390/kernel/mcount.S | 1 + arch/s390/kernel/os_info.c | 1 + arch/s390/kernel/perf_cpum_cf_events.c | 1 + arch/s390/kernel/pgm_check.S | 1 + arch/s390/kernel/process.c | 1 + arch/s390/kernel/processor.c | 1 + arch/s390/kernel/ptrace.c | 1 + arch/s390/kernel/reipl.S | 1 + arch/s390/kernel/relocate_kernel.S | 1 + arch/s390/kernel/runtime_instr.c | 1 + arch/s390/kernel/signal.c | 1 + arch/s390/kernel/smp.c | 1 + arch/s390/kernel/suspend.c | 1 + arch/s390/kernel/swsusp.S | 1 + arch/s390/kernel/sys_s390.c | 1 + arch/s390/kernel/syscalls.S | 1 + arch/s390/kernel/sysinfo.c | 1 + arch/s390/kernel/trace.c | 1 + arch/s390/kernel/traps.c | 1 + arch/s390/kernel/uprobes.c | 1 + arch/s390/kernel/vdso32/Makefile | 1 + arch/s390/kernel/vdso32/getcpu.S | 1 + arch/s390/kernel/vdso32/note.S | 1 + arch/s390/kernel/vdso32/vdso32.lds.S | 1 + arch/s390/kernel/vdso32/vdso32_wrapper.S | 1 + arch/s390/kernel/vdso64/Makefile | 1 + arch/s390/kernel/vdso64/getcpu.S | 1 + arch/s390/kernel/vdso64/vdso64.lds.S | 1 + arch/s390/kernel/vdso64/vdso64_wrapper.S | 1 + arch/s390/kernel/vmlinux.lds.S | 1 + arch/s390/kvm/Kconfig | 1 + arch/s390/kvm/gaccess.c | 1 + arch/s390/kvm/trace-s390.h | 1 + arch/s390/kvm/trace.h | 1 + arch/s390/lib/Makefile | 1 + arch/s390/lib/delay.c | 1 + arch/s390/lib/find.c | 1 + arch/s390/lib/mem.S | 1 + arch/s390/lib/probes.c | 1 + arch/s390/lib/spinlock.c | 1 + arch/s390/lib/string.c | 1 + arch/s390/lib/uaccess.c | 1 + arch/s390/lib/xor.c | 1 + arch/s390/mm/Makefile | 1 + arch/s390/mm/dump_pagetables.c | 1 + arch/s390/mm/extmem.c | 1 + arch/s390/mm/fault.c | 1 + arch/s390/mm/gup.c | 1 + arch/s390/mm/hugetlbpage.c | 1 + arch/s390/mm/init.c | 1 + arch/s390/mm/maccess.c | 1 + arch/s390/mm/mem_detect.c | 1 + arch/s390/mm/page-states.c | 1 + arch/s390/mm/pageattr.c | 1 + arch/s390/mm/pgalloc.c | 1 + arch/s390/mm/vmem.c | 1 + arch/s390/net/bpf_jit.S | 1 + arch/s390/net/bpf_jit.h | 1 + arch/s390/net/bpf_jit_comp.c | 1 + arch/s390/numa/mode_emu.c | 1 + arch/s390/numa/numa.c | 1 + arch/s390/numa/numa_mode.h | 1 + arch/s390/numa/toptree.c | 1 + arch/s390/numa/toptree.h | 1 + arch/s390/oprofile/Makefile | 1 + arch/s390/oprofile/init.c | 1 + arch/s390/pci/pci_clp.c | 1 + arch/s390/pci/pci_event.c | 1 + arch/s390/pci/pci_mmio.c | 1 + arch/s390/pci/pci_sysfs.c | 1 + arch/s390/tools/Makefile | 1 + arch/s390/tools/gen_facilities.c | 1 + arch/score/Kconfig | 1 + arch/score/Kconfig.debug | 1 + arch/score/include/asm/asmmacro.h | 1 + arch/score/include/asm/atomic.h | 1 + arch/score/include/asm/bitops.h | 1 + arch/score/include/asm/bug.h | 1 + arch/score/include/asm/bugs.h | 1 + arch/score/include/asm/cache.h | 1 + arch/score/include/asm/cacheflush.h | 1 + arch/score/include/asm/checksum.h | 1 + arch/score/include/asm/cmpxchg.h | 1 + arch/score/include/asm/delay.h | 1 + arch/score/include/asm/device.h | 1 + arch/score/include/asm/div64.h | 1 + arch/score/include/asm/dma.h | 1 + arch/score/include/asm/elf.h | 1 + arch/score/include/asm/emergency-restart.h | 1 + arch/score/include/asm/exec.h | 1 + arch/score/include/asm/fixmap.h | 1 + arch/score/include/asm/futex.h | 1 + arch/score/include/asm/hardirq.h | 1 + arch/score/include/asm/io.h | 1 + arch/score/include/asm/irq.h | 1 + arch/score/include/asm/irq_regs.h | 1 + arch/score/include/asm/irqflags.h | 1 + arch/score/include/asm/kdebug.h | 1 + arch/score/include/asm/kmap_types.h | 1 + arch/score/include/asm/linkage.h | 1 + arch/score/include/asm/local.h | 1 + arch/score/include/asm/mmu.h | 1 + arch/score/include/asm/mmu_context.h | 1 + arch/score/include/asm/module.h | 1 + arch/score/include/asm/page.h | 1 + arch/score/include/asm/percpu.h | 1 + arch/score/include/asm/pgalloc.h | 1 + arch/score/include/asm/pgtable-bits.h | 1 + arch/score/include/asm/pgtable.h | 1 + arch/score/include/asm/processor.h | 1 + arch/score/include/asm/ptrace.h | 1 + arch/score/include/asm/scoreregs.h | 1 + arch/score/include/asm/segment.h | 1 + arch/score/include/asm/setup.h | 1 + arch/score/include/asm/shmparam.h | 1 + arch/score/include/asm/string.h | 1 + arch/score/include/asm/switch_to.h | 1 + arch/score/include/asm/syscalls.h | 1 + arch/score/include/asm/thread_info.h | 1 + arch/score/include/asm/timex.h | 1 + arch/score/include/asm/tlb.h | 1 + arch/score/include/asm/tlbflush.h | 1 + arch/score/include/asm/topology.h | 1 + arch/score/include/asm/uaccess.h | 1 + arch/score/include/asm/unaligned.h | 1 + arch/score/include/asm/user.h | 1 + arch/score/kernel/Makefile | 1 + arch/score/kernel/sys_call_table.c | 1 + arch/sh/Kconfig | 1 + arch/sh/Kconfig.cpu | 1 + arch/sh/Kconfig.debug | 1 + arch/sh/boards/Kconfig | 1 + arch/sh/boards/Makefile | 1 + arch/sh/boards/board-edosk7705.c | 1 + arch/sh/boards/board-polaris.c | 1 + arch/sh/boards/board-secureedge5410.c | 1 + arch/sh/boards/board-sh2007.c | 1 + arch/sh/boards/board-shmin.c | 1 + arch/sh/boards/mach-highlander/Kconfig | 1 + arch/sh/boards/mach-highlander/Makefile | 1 + arch/sh/boards/mach-migor/Kconfig | 1 + arch/sh/boards/mach-r2d/Kconfig | 1 + arch/sh/boards/mach-r2d/irq.c | 1 + arch/sh/boards/mach-rsk/Kconfig | 1 + arch/sh/boards/mach-sdk7780/Kconfig | 1 + arch/sh/boards/mach-se/7206/irq.c | 1 + arch/sh/boards/mach-se/7206/setup.c | 1 + arch/sh/boards/mach-se/7343/setup.c | 1 + arch/sh/boards/mach-se/770x/irq.c | 1 + arch/sh/boards/mach-se/770x/setup.c | 1 + arch/sh/boards/mach-se/7751/irq.c | 1 + arch/sh/boards/mach-se/7751/setup.c | 1 + arch/sh/boards/mach-se/Makefile | 1 + arch/sh/boards/mach-se/board-se7619.c | 1 + arch/sh/boards/mach-sh03/rtc.c | 1 + arch/sh/boards/mach-sh03/setup.c | 1 + arch/sh/boot/compressed/Makefile | 1 + arch/sh/boot/compressed/cache.c | 1 + arch/sh/boot/compressed/head_32.S | 1 + arch/sh/boot/compressed/misc.c | 1 + arch/sh/boot/dts/j2_mimas_v2.dts | 1 + arch/sh/boot/romimage/Makefile | 1 + arch/sh/boot/romimage/head.S | 1 + arch/sh/cchips/Kconfig | 1 + arch/sh/cchips/hd6446x/hd64461.c | 1 + arch/sh/drivers/Kconfig | 1 + arch/sh/drivers/Makefile | 1 + arch/sh/drivers/dma/Kconfig | 1 + arch/sh/drivers/pci/Makefile | 1 + arch/sh/drivers/pci/common.c | 1 + arch/sh/drivers/pci/fixups-cayman.c | 1 + arch/sh/drivers/pci/fixups-se7751.c | 1 + arch/sh/drivers/pci/fixups-sh03.c | 1 + arch/sh/drivers/pci/pci-sh4.h | 1 + arch/sh/include/asm/adc.h | 1 + arch/sh/include/asm/alignment.h | 1 + arch/sh/include/asm/atomic-grb.h | 1 + arch/sh/include/asm/atomic-irq.h | 1 + arch/sh/include/asm/atomic-llsc.h | 1 + arch/sh/include/asm/atomic.h | 1 + arch/sh/include/asm/barrier.h | 1 + arch/sh/include/asm/bitops-cas.h | 1 + arch/sh/include/asm/bitops-grb.h | 1 + arch/sh/include/asm/bitops-llsc.h | 1 + arch/sh/include/asm/bitops-op32.h | 1 + arch/sh/include/asm/bitops.h | 1 + arch/sh/include/asm/bl_bit.h | 1 + arch/sh/include/asm/bl_bit_32.h | 1 + arch/sh/include/asm/bug.h | 1 + arch/sh/include/asm/bugs.h | 1 + arch/sh/include/asm/cache.h | 1 + arch/sh/include/asm/cache_insns.h | 1 + arch/sh/include/asm/cache_insns_32.h | 1 + arch/sh/include/asm/cacheflush.h | 1 + arch/sh/include/asm/checksum.h | 1 + arch/sh/include/asm/clock.h | 1 + arch/sh/include/asm/cmpxchg-cas.h | 1 + arch/sh/include/asm/cmpxchg-grb.h | 1 + arch/sh/include/asm/cmpxchg-irq.h | 1 + arch/sh/include/asm/cmpxchg-llsc.h | 1 + arch/sh/include/asm/cmpxchg.h | 1 + arch/sh/include/asm/dma-mapping.h | 1 + arch/sh/include/asm/dmabrg.h | 1 + arch/sh/include/asm/elf.h | 1 + arch/sh/include/asm/entry-macros.S | 1 + arch/sh/include/asm/extable.h | 1 + arch/sh/include/asm/fpu.h | 1 + arch/sh/include/asm/ftrace.h | 1 + arch/sh/include/asm/futex-cas.h | 1 + arch/sh/include/asm/futex-irq.h | 1 + arch/sh/include/asm/futex-llsc.h | 1 + arch/sh/include/asm/futex.h | 1 + arch/sh/include/asm/hardirq.h | 1 + arch/sh/include/asm/hd64461.h | 1 + arch/sh/include/asm/heartbeat.h | 1 + arch/sh/include/asm/hugetlb.h | 1 + arch/sh/include/asm/hw_breakpoint.h | 1 + arch/sh/include/asm/hw_irq.h | 1 + arch/sh/include/asm/i2c-sh7760.h | 1 + arch/sh/include/asm/io.h | 1 + arch/sh/include/asm/io_generic.h | 1 + arch/sh/include/asm/io_noioport.h | 1 + arch/sh/include/asm/io_trapped.h | 1 + arch/sh/include/asm/irq.h | 1 + arch/sh/include/asm/irqflags.h | 1 + arch/sh/include/asm/kdebug.h | 1 + arch/sh/include/asm/kexec.h | 1 + arch/sh/include/asm/kgdb.h | 1 + arch/sh/include/asm/kmap_types.h | 1 + arch/sh/include/asm/kprobes.h | 1 + arch/sh/include/asm/linkage.h | 1 + arch/sh/include/asm/mmu.h | 1 + arch/sh/include/asm/mmu_context.h | 1 + arch/sh/include/asm/mmu_context_32.h | 1 + arch/sh/include/asm/mmzone.h | 1 + arch/sh/include/asm/module.h | 1 + arch/sh/include/asm/page.h | 1 + arch/sh/include/asm/pci.h | 1 + arch/sh/include/asm/perf_event.h | 1 + arch/sh/include/asm/pgalloc.h | 1 + arch/sh/include/asm/pgtable-2level.h | 1 + arch/sh/include/asm/pgtable-3level.h | 1 + arch/sh/include/asm/pgtable_32.h | 1 + arch/sh/include/asm/posix_types.h | 1 + arch/sh/include/asm/processor.h | 1 + arch/sh/include/asm/processor_32.h | 1 + arch/sh/include/asm/ptrace.h | 1 + arch/sh/include/asm/ptrace_32.h | 1 + arch/sh/include/asm/ptrace_64.h | 1 + arch/sh/include/asm/push-switch.h | 1 + arch/sh/include/asm/reboot.h | 1 + arch/sh/include/asm/romimage-macros.h | 1 + arch/sh/include/asm/rtc.h | 1 + arch/sh/include/asm/seccomp.h | 1 + arch/sh/include/asm/sections.h | 1 + arch/sh/include/asm/segment.h | 1 + arch/sh/include/asm/setup.h | 1 + arch/sh/include/asm/sh7760fb.h | 1 + arch/sh/include/asm/sh_bios.h | 1 + arch/sh/include/asm/smc37c93x.h | 1 + arch/sh/include/asm/smp-ops.h | 1 + arch/sh/include/asm/smp.h | 1 + arch/sh/include/asm/sparsemem.h | 1 + arch/sh/include/asm/spi.h | 1 + arch/sh/include/asm/spinlock_types.h | 1 + arch/sh/include/asm/sram.h | 1 + arch/sh/include/asm/stackprotector.h | 1 + arch/sh/include/asm/stacktrace.h | 1 + arch/sh/include/asm/string.h | 1 + arch/sh/include/asm/string_64.h | 1 + arch/sh/include/asm/suspend.h | 1 + arch/sh/include/asm/switch_to_32.h | 1 + arch/sh/include/asm/syscall.h | 1 + arch/sh/include/asm/syscall_32.h | 1 + arch/sh/include/asm/syscall_64.h | 1 + arch/sh/include/asm/syscalls.h | 1 + arch/sh/include/asm/syscalls_32.h | 1 + arch/sh/include/asm/syscalls_64.h | 1 + arch/sh/include/asm/thread_info.h | 1 + arch/sh/include/asm/timex.h | 1 + arch/sh/include/asm/tlb.h | 1 + arch/sh/include/asm/tlbflush.h | 1 + arch/sh/include/asm/topology.h | 1 + arch/sh/include/asm/traps.h | 1 + arch/sh/include/asm/traps_32.h | 1 + arch/sh/include/asm/types.h | 1 + arch/sh/include/asm/uaccess.h | 1 + arch/sh/include/asm/uaccess_32.h | 1 + arch/sh/include/asm/unaligned-sh4a.h | 1 + arch/sh/include/asm/unaligned.h | 1 + arch/sh/include/asm/uncached.h | 1 + arch/sh/include/asm/unistd.h | 1 + arch/sh/include/asm/unwinder.h | 1 + arch/sh/include/asm/user.h | 1 + arch/sh/include/asm/vmlinux.lds.h | 1 + arch/sh/include/asm/word-at-a-time.h | 1 + arch/sh/include/cpu-common/cpu/rtc.h | 1 + arch/sh/include/cpu-common/cpu/sigcontext.h | 1 + arch/sh/include/cpu-sh2a/cpu/addrspace.h | 1 + arch/sh/include/cpu-sh2a/cpu/rtc.h | 1 + arch/sh/include/cpu-sh2a/cpu/sh7203.h | 1 + arch/sh/include/cpu-sh2a/cpu/sh7264.h | 1 + arch/sh/include/cpu-sh2a/cpu/sh7269.h | 1 + arch/sh/include/cpu-sh3/cpu/adc.h | 1 + arch/sh/include/cpu-sh3/cpu/dac.h | 1 + arch/sh/include/cpu-sh3/cpu/dma.h | 1 + arch/sh/include/cpu-sh3/cpu/serial.h | 1 + arch/sh/include/cpu-sh3/cpu/sh7720.h | 1 + arch/sh/include/cpu-sh4/cpu/dma.h | 1 + arch/sh/include/cpu-sh4/cpu/rtc.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7722.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7723.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7724.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7734.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7757.h | 1 + arch/sh/include/cpu-sh4/cpu/sh7785.h | 1 + arch/sh/include/cpu-sh4/cpu/shx3.h | 1 + arch/sh/include/cpu-sh4/cpu/sigcontext.h | 1 + arch/sh/include/cpu-sh4a/cpu/dma.h | 1 + arch/sh/include/cpu-sh4a/cpu/serial.h | 1 + arch/sh/include/cpu-sh5/cpu/addrspace.h | 1 + arch/sh/include/cpu-sh5/cpu/mmu_context.h | 1 + arch/sh/include/cpu-sh5/cpu/rtc.h | 1 + arch/sh/include/mach-common/mach/highlander.h | 1 + arch/sh/include/mach-common/mach/r2d.h | 1 + arch/sh/include/mach-common/mach/romimage.h | 1 + arch/sh/include/mach-common/mach/sh2007.h | 1 + arch/sh/include/mach-common/mach/sh7785lcr.h | 1 + arch/sh/include/mach-common/mach/shmin.h | 1 + arch/sh/include/mach-common/mach/titan.h | 1 + arch/sh/include/mach-common/mach/urquell.h | 1 + arch/sh/include/mach-dreamcast/mach/maple.h | 1 + arch/sh/include/mach-ecovec24/mach/romimage.h | 1 + arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | 1 + arch/sh/include/mach-kfr2r09/mach/romimage.h | 1 + arch/sh/include/mach-landisk/mach/gio.h | 1 + arch/sh/include/mach-landisk/mach/iodata_landisk.h | 1 + arch/sh/include/mach-migor/mach/migor.h | 1 + arch/sh/include/mach-sdk7786/mach/fpga.h | 1 + arch/sh/include/mach-sdk7786/mach/irq.h | 1 + arch/sh/include/mach-se/mach/mrshpc.h | 1 + arch/sh/include/mach-se/mach/se.h | 1 + arch/sh/include/mach-se/mach/se7206.h | 1 + arch/sh/include/mach-se/mach/se7343.h | 1 + arch/sh/include/mach-se/mach/se7751.h | 1 + arch/sh/include/mach-sh03/mach/io.h | 1 + arch/sh/include/mach-sh03/mach/sh03.h | 1 + arch/sh/include/mach-x3proto/mach/hardware.h | 1 + arch/sh/include/mach-x3proto/mach/ilsel.h | 1 + arch/sh/kernel/Makefile | 1 + arch/sh/kernel/asm-offsets.c | 1 + arch/sh/kernel/cpu/Makefile | 1 + arch/sh/kernel/cpu/adc.c | 1 + arch/sh/kernel/cpu/clock-cpg.c | 1 + arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/cpu/irq/imask.c | 1 + arch/sh/kernel/cpu/proc.c | 1 + arch/sh/kernel/cpu/sh2a/Makefile | 1 + arch/sh/kernel/cpu/sh3/Makefile | 1 + arch/sh/kernel/cpu/sh3/serial-sh770x.c | 1 + arch/sh/kernel/cpu/sh3/serial-sh7710.c | 1 + arch/sh/kernel/cpu/sh3/serial-sh7720.c | 1 + arch/sh/kernel/cpu/sh4/Makefile | 1 + arch/sh/kernel/cpu/sh4a/Makefile | 1 + arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c | 1 + arch/sh/kernel/cpu/sh4a/serial-sh7722.c | 1 + arch/sh/kernel/cpu/sh5/Makefile | 1 + arch/sh/kernel/crash_dump.c | 1 + arch/sh/kernel/ftrace.c | 1 + arch/sh/kernel/irq.c | 1 + arch/sh/kernel/kdebugfs.c | 1 + arch/sh/kernel/process.c | 1 + arch/sh/kernel/ptrace.c | 1 + arch/sh/kernel/reboot.c | 1 + arch/sh/kernel/setup.c | 1 + arch/sh/kernel/sh_ksyms_32.c | 1 + arch/sh/kernel/signal_32.c | 1 + arch/sh/kernel/sys_sh.c | 1 + arch/sh/kernel/sys_sh32.c | 1 + arch/sh/kernel/traps.c | 1 + arch/sh/kernel/vmlinux.lds.S | 1 + arch/sh/kernel/vsyscall/Makefile | 1 + arch/sh/kernel/vsyscall/vsyscall-note.S | 1 + arch/sh/kernel/vsyscall/vsyscall-sigreturn.S | 1 + arch/sh/kernel/vsyscall/vsyscall-syscall.S | 1 + arch/sh/kernel/vsyscall/vsyscall-trapa.S | 1 + arch/sh/kernel/vsyscall/vsyscall.lds.S | 1 + arch/sh/lib/Makefile | 1 + arch/sh/lib/__clear_user.S | 1 + arch/sh/lib/ashldi3.c | 1 + arch/sh/lib/ashrdi3.c | 1 + arch/sh/lib/copy_page.S | 1 + arch/sh/lib/delay.c | 1 + arch/sh/lib/div64-generic.c | 1 + arch/sh/lib/div64.S | 1 + arch/sh/lib/lshrdi3.c | 1 + arch/sh/lib/memchr.S | 1 + arch/sh/lib/memcpy-sh4.S | 1 + arch/sh/lib/memcpy.S | 1 + arch/sh/lib/memmove.S | 1 + arch/sh/lib/memset-sh4.S | 1 + arch/sh/lib/memset.S | 1 + arch/sh/lib/strlen.S | 1 + arch/sh/lib64/copy_user_memcpy.S | 1 + arch/sh/lib64/memcpy.S | 1 + arch/sh/lib64/memset.S | 1 + arch/sh/lib64/sdivsi3.S | 1 + arch/sh/lib64/strcpy.S | 1 + arch/sh/lib64/strlen.S | 1 + arch/sh/lib64/udivdi3.S | 1 + arch/sh/lib64/udivsi3.S | 1 + arch/sh/math-emu/sfp-util.h | 1 + arch/sh/mm/Kconfig | 1 + arch/sh/mm/Makefile | 1 + arch/sh/mm/extable_32.c | 1 + arch/sh/mm/flush-sh4.c | 1 + arch/sh/mm/gup.c | 1 + arch/sh/mm/hugetlbpage.c | 1 + arch/sh/mm/ioremap_fixed.c | 1 + arch/sh/mm/pgtable.c | 1 + arch/sh/mm/uncached.c | 1 + arch/sh/oprofile/Makefile | 1 + arch/sh/tools/gen-mach-types | 1 + arch/sparc/Kconfig.debug | 1 + arch/sparc/Makefile | 1 + arch/sparc/boot/Makefile | 1 + arch/sparc/crypto/Makefile | 1 + arch/sparc/crypto/aes_asm.S | 1 + arch/sparc/crypto/camellia_asm.S | 1 + arch/sparc/crypto/crc32c_asm.S | 1 + arch/sparc/crypto/crop_devid.c | 1 + arch/sparc/crypto/des_asm.S | 1 + arch/sparc/crypto/md5_asm.S | 1 + arch/sparc/crypto/opcodes.h | 1 + arch/sparc/crypto/sha1_asm.S | 1 + arch/sparc/crypto/sha256_asm.S | 1 + arch/sparc/crypto/sha512_asm.S | 1 + arch/sparc/include/asm/agp.h | 1 + arch/sparc/include/asm/apb.h | 1 + arch/sparc/include/asm/asm-prototypes.h | 1 + arch/sparc/include/asm/asm.h | 1 + arch/sparc/include/asm/asmmacro.h | 1 + arch/sparc/include/asm/atomic.h | 1 + arch/sparc/include/asm/atomic_32.h | 1 + arch/sparc/include/asm/atomic_64.h | 1 + arch/sparc/include/asm/auxio.h | 1 + arch/sparc/include/asm/auxio_32.h | 1 + arch/sparc/include/asm/auxio_64.h | 1 + arch/sparc/include/asm/backoff.h | 1 + arch/sparc/include/asm/barrier.h | 1 + arch/sparc/include/asm/barrier_32.h | 1 + arch/sparc/include/asm/barrier_64.h | 1 + arch/sparc/include/asm/bbc.h | 1 + arch/sparc/include/asm/bitext.h | 1 + arch/sparc/include/asm/bitops.h | 1 + arch/sparc/include/asm/bitops_32.h | 1 + arch/sparc/include/asm/bitops_64.h | 1 + arch/sparc/include/asm/btext.h | 1 + arch/sparc/include/asm/bug.h | 1 + arch/sparc/include/asm/bugs.h | 1 + arch/sparc/include/asm/cache.h | 1 + arch/sparc/include/asm/cacheflush.h | 1 + arch/sparc/include/asm/cacheflush_32.h | 1 + arch/sparc/include/asm/cacheflush_64.h | 1 + arch/sparc/include/asm/cachetlb_32.h | 1 + arch/sparc/include/asm/chafsr.h | 1 + arch/sparc/include/asm/checksum.h | 1 + arch/sparc/include/asm/checksum_32.h | 1 + arch/sparc/include/asm/checksum_64.h | 1 + arch/sparc/include/asm/chmctrl.h | 1 + arch/sparc/include/asm/cmpxchg.h | 1 + arch/sparc/include/asm/cmpxchg_32.h | 1 + arch/sparc/include/asm/cmpxchg_64.h | 1 + arch/sparc/include/asm/compat.h | 1 + arch/sparc/include/asm/compat_signal.h | 1 + arch/sparc/include/asm/contregs.h | 1 + arch/sparc/include/asm/cpu_type.h | 1 + arch/sparc/include/asm/cpudata.h | 1 + arch/sparc/include/asm/cpudata_32.h | 1 + arch/sparc/include/asm/cpudata_64.h | 1 + arch/sparc/include/asm/current.h | 1 + arch/sparc/include/asm/dcr.h | 1 + arch/sparc/include/asm/dcu.h | 1 + arch/sparc/include/asm/delay.h | 1 + arch/sparc/include/asm/delay_32.h | 1 + arch/sparc/include/asm/delay_64.h | 1 + arch/sparc/include/asm/dma-mapping.h | 1 + arch/sparc/include/asm/dma.h | 1 + arch/sparc/include/asm/ebus_dma.h | 1 + arch/sparc/include/asm/ecc.h | 1 + arch/sparc/include/asm/elf.h | 1 + arch/sparc/include/asm/elf_32.h | 1 + arch/sparc/include/asm/elf_64.h | 1 + arch/sparc/include/asm/estate.h | 1 + arch/sparc/include/asm/extable_64.h | 1 + arch/sparc/include/asm/fb.h | 1 + arch/sparc/include/asm/fbio.h | 1 + arch/sparc/include/asm/fhc.h | 1 + arch/sparc/include/asm/floppy.h | 1 + arch/sparc/include/asm/floppy_32.h | 1 + arch/sparc/include/asm/floppy_64.h | 1 + arch/sparc/include/asm/fpumacro.h | 1 + arch/sparc/include/asm/ftrace.h | 1 + arch/sparc/include/asm/futex.h | 1 + arch/sparc/include/asm/futex_64.h | 1 + arch/sparc/include/asm/hardirq.h | 1 + arch/sparc/include/asm/hardirq_32.h | 1 + arch/sparc/include/asm/hardirq_64.h | 1 + arch/sparc/include/asm/head.h | 1 + arch/sparc/include/asm/head_32.h | 1 + arch/sparc/include/asm/head_64.h | 1 + arch/sparc/include/asm/hibernate.h | 1 + arch/sparc/include/asm/highmem.h | 1 + arch/sparc/include/asm/hugetlb.h | 1 + arch/sparc/include/asm/hvtramp.h | 1 + arch/sparc/include/asm/hypervisor.h | 1 + arch/sparc/include/asm/ide.h | 1 + arch/sparc/include/asm/idprom.h | 1 + arch/sparc/include/asm/intr_queue.h | 1 + arch/sparc/include/asm/io-unit.h | 1 + arch/sparc/include/asm/io.h | 1 + arch/sparc/include/asm/io_32.h | 1 + arch/sparc/include/asm/io_64.h | 1 + arch/sparc/include/asm/ioctls.h | 1 + arch/sparc/include/asm/iommu.h | 1 + arch/sparc/include/asm/iommu_32.h | 1 + arch/sparc/include/asm/iommu_64.h | 1 + arch/sparc/include/asm/irq.h | 1 + arch/sparc/include/asm/irq_32.h | 1 + arch/sparc/include/asm/irq_64.h | 1 + arch/sparc/include/asm/irqflags.h | 1 + arch/sparc/include/asm/irqflags_32.h | 1 + arch/sparc/include/asm/irqflags_64.h | 1 + arch/sparc/include/asm/jump_label.h | 1 + arch/sparc/include/asm/kdebug.h | 1 + arch/sparc/include/asm/kdebug_32.h | 1 + arch/sparc/include/asm/kdebug_64.h | 1 + arch/sparc/include/asm/kgdb.h | 1 + arch/sparc/include/asm/kmap_types.h | 1 + arch/sparc/include/asm/kprobes.h | 1 + arch/sparc/include/asm/ldc.h | 1 + arch/sparc/include/asm/leon.h | 1 + arch/sparc/include/asm/leon_amba.h | 1 + arch/sparc/include/asm/leon_pci.h | 1 + arch/sparc/include/asm/lsu.h | 1 + arch/sparc/include/asm/machines.h | 1 + arch/sparc/include/asm/mbus.h | 1 + arch/sparc/include/asm/mc146818rtc.h | 1 + arch/sparc/include/asm/mc146818rtc_32.h | 1 + arch/sparc/include/asm/mc146818rtc_64.h | 1 + arch/sparc/include/asm/mdesc.h | 1 + arch/sparc/include/asm/memctrl.h | 1 + arch/sparc/include/asm/mman.h | 1 + arch/sparc/include/asm/mmu.h | 1 + arch/sparc/include/asm/mmu_32.h | 1 + arch/sparc/include/asm/mmu_64.h | 1 + arch/sparc/include/asm/mmu_context.h | 1 + arch/sparc/include/asm/mmu_context_32.h | 1 + arch/sparc/include/asm/mmu_context_64.h | 1 + arch/sparc/include/asm/mmzone.h | 1 + arch/sparc/include/asm/msi.h | 1 + arch/sparc/include/asm/mxcc.h | 1 + arch/sparc/include/asm/nmi.h | 1 + arch/sparc/include/asm/ns87303.h | 1 + arch/sparc/include/asm/obio.h | 1 + arch/sparc/include/asm/openprom.h | 1 + arch/sparc/include/asm/oplib.h | 1 + arch/sparc/include/asm/oplib_32.h | 1 + arch/sparc/include/asm/oplib_64.h | 1 + arch/sparc/include/asm/page.h | 1 + arch/sparc/include/asm/page_32.h | 1 + arch/sparc/include/asm/page_64.h | 1 + arch/sparc/include/asm/parport.h | 1 + arch/sparc/include/asm/pbm.h | 1 + arch/sparc/include/asm/pci.h | 1 + arch/sparc/include/asm/pci_32.h | 1 + arch/sparc/include/asm/pci_64.h | 1 + arch/sparc/include/asm/pcic.h | 1 + arch/sparc/include/asm/pcr.h | 1 + arch/sparc/include/asm/percpu.h | 1 + arch/sparc/include/asm/percpu_32.h | 1 + arch/sparc/include/asm/percpu_64.h | 1 + arch/sparc/include/asm/perf_event.h | 1 + arch/sparc/include/asm/pgalloc.h | 1 + arch/sparc/include/asm/pgalloc_32.h | 1 + arch/sparc/include/asm/pgalloc_64.h | 1 + arch/sparc/include/asm/pgtable.h | 1 + arch/sparc/include/asm/pgtable_32.h | 1 + arch/sparc/include/asm/pgtable_64.h | 1 + arch/sparc/include/asm/pgtsrmmu.h | 1 + arch/sparc/include/asm/pil.h | 1 + arch/sparc/include/asm/processor.h | 1 + arch/sparc/include/asm/processor_32.h | 1 + arch/sparc/include/asm/processor_64.h | 1 + arch/sparc/include/asm/psr.h | 1 + arch/sparc/include/asm/ptrace.h | 1 + arch/sparc/include/asm/qrwlock.h | 1 + arch/sparc/include/asm/qspinlock.h | 1 + arch/sparc/include/asm/ross.h | 1 + arch/sparc/include/asm/sbi.h | 1 + arch/sparc/include/asm/scratchpad.h | 1 + arch/sparc/include/asm/seccomp.h | 1 + arch/sparc/include/asm/sections.h | 1 + arch/sparc/include/asm/setup.h | 1 + arch/sparc/include/asm/sfafsr.h | 1 + arch/sparc/include/asm/sfp-machine.h | 1 + arch/sparc/include/asm/shmparam.h | 1 + arch/sparc/include/asm/shmparam_32.h | 1 + arch/sparc/include/asm/shmparam_64.h | 1 + arch/sparc/include/asm/sigcontext.h | 1 + arch/sparc/include/asm/signal.h | 1 + arch/sparc/include/asm/smp.h | 1 + arch/sparc/include/asm/smp_32.h | 1 + arch/sparc/include/asm/smp_64.h | 1 + arch/sparc/include/asm/sparsemem.h | 1 + arch/sparc/include/asm/spinlock.h | 1 + arch/sparc/include/asm/spinlock_32.h | 1 + arch/sparc/include/asm/spinlock_64.h | 1 + arch/sparc/include/asm/spinlock_types.h | 1 + arch/sparc/include/asm/spitfire.h | 1 + arch/sparc/include/asm/stacktrace.h | 1 + arch/sparc/include/asm/starfire.h | 1 + arch/sparc/include/asm/string.h | 1 + arch/sparc/include/asm/string_32.h | 1 + arch/sparc/include/asm/string_64.h | 1 + arch/sparc/include/asm/sunbpp.h | 1 + arch/sparc/include/asm/swift.h | 1 + arch/sparc/include/asm/switch_to.h | 1 + arch/sparc/include/asm/switch_to_32.h | 1 + arch/sparc/include/asm/switch_to_64.h | 1 + arch/sparc/include/asm/syscall.h | 1 + arch/sparc/include/asm/syscalls.h | 1 + arch/sparc/include/asm/termbits.h | 1 + arch/sparc/include/asm/termios.h | 1 + arch/sparc/include/asm/thread_info.h | 1 + arch/sparc/include/asm/thread_info_32.h | 1 + arch/sparc/include/asm/thread_info_64.h | 1 + arch/sparc/include/asm/timer.h | 1 + arch/sparc/include/asm/timer_32.h | 1 + arch/sparc/include/asm/timer_64.h | 1 + arch/sparc/include/asm/timex.h | 1 + arch/sparc/include/asm/timex_32.h | 1 + arch/sparc/include/asm/timex_64.h | 1 + arch/sparc/include/asm/tlb.h | 1 + arch/sparc/include/asm/tlb_32.h | 1 + arch/sparc/include/asm/tlb_64.h | 1 + arch/sparc/include/asm/tlbflush.h | 1 + arch/sparc/include/asm/tlbflush_32.h | 1 + arch/sparc/include/asm/tlbflush_64.h | 1 + arch/sparc/include/asm/topology.h | 1 + arch/sparc/include/asm/topology_32.h | 1 + arch/sparc/include/asm/topology_64.h | 1 + arch/sparc/include/asm/trap_block.h | 1 + arch/sparc/include/asm/traps.h | 1 + arch/sparc/include/asm/tsb.h | 1 + arch/sparc/include/asm/tsunami.h | 1 + arch/sparc/include/asm/ttable.h | 1 + arch/sparc/include/asm/turbosparc.h | 1 + arch/sparc/include/asm/uaccess.h | 1 + arch/sparc/include/asm/uaccess_32.h | 1 + arch/sparc/include/asm/uaccess_64.h | 1 + arch/sparc/include/asm/unaligned.h | 1 + arch/sparc/include/asm/unistd.h | 1 + arch/sparc/include/asm/upa.h | 1 + arch/sparc/include/asm/vaddrs.h | 1 + arch/sparc/include/asm/vga.h | 1 + arch/sparc/include/asm/viking.h | 1 + arch/sparc/include/asm/vio.h | 1 + arch/sparc/include/asm/visasm.h | 1 + arch/sparc/include/asm/winmacro.h | 1 + arch/sparc/include/asm/xor.h | 1 + arch/sparc/kernel/Makefile | 1 + arch/sparc/kernel/apc.c | 1 + arch/sparc/kernel/asm-offsets.c | 1 + arch/sparc/kernel/audit.c | 1 + arch/sparc/kernel/auxio_32.c | 1 + arch/sparc/kernel/auxio_64.c | 1 + arch/sparc/kernel/btext.c | 1 + arch/sparc/kernel/central.c | 1 + arch/sparc/kernel/cherrs.S | 1 + arch/sparc/kernel/compat_audit.c | 1 + arch/sparc/kernel/cpu.c | 1 + arch/sparc/kernel/cpumap.c | 1 + arch/sparc/kernel/cpumap.h | 1 + arch/sparc/kernel/devices.c | 1 + arch/sparc/kernel/dma.c | 1 + arch/sparc/kernel/dtlb_miss.S | 1 + arch/sparc/kernel/dtlb_prot.S | 1 + arch/sparc/kernel/ebus.c | 1 + arch/sparc/kernel/entry.S | 1 + arch/sparc/kernel/entry.h | 1 + arch/sparc/kernel/etrap_32.S | 1 + arch/sparc/kernel/etrap_64.S | 1 + arch/sparc/kernel/fpu_traps.S | 1 + arch/sparc/kernel/ftrace.c | 1 + arch/sparc/kernel/getsetcc.S | 1 + arch/sparc/kernel/head_32.S | 1 + arch/sparc/kernel/head_64.S | 1 + arch/sparc/kernel/hvapi.c | 1 + arch/sparc/kernel/hvcalls.S | 1 + arch/sparc/kernel/hvtramp.S | 1 + arch/sparc/kernel/idprom.c | 1 + arch/sparc/kernel/iommu.c | 1 + arch/sparc/kernel/iommu_common.h | 1 + arch/sparc/kernel/ioport.c | 1 + arch/sparc/kernel/irq.h | 1 + arch/sparc/kernel/irq_32.c | 1 + arch/sparc/kernel/irq_64.c | 1 + arch/sparc/kernel/itlb_miss.S | 1 + arch/sparc/kernel/ivec.S | 1 + arch/sparc/kernel/jump_label.c | 1 + arch/sparc/kernel/kernel.h | 1 + arch/sparc/kernel/kgdb_32.c | 1 + arch/sparc/kernel/kgdb_64.c | 1 + arch/sparc/kernel/kprobes.c | 1 + arch/sparc/kernel/kstack.h | 1 + arch/sparc/kernel/ktlb.S | 1 + arch/sparc/kernel/ldc.c | 1 + arch/sparc/kernel/leon_kernel.c | 1 + arch/sparc/kernel/leon_pci.c | 1 + arch/sparc/kernel/leon_pci_grpci1.c | 1 + arch/sparc/kernel/leon_pci_grpci2.c | 1 + arch/sparc/kernel/leon_pmc.c | 1 + arch/sparc/kernel/leon_smp.c | 1 + arch/sparc/kernel/mdesc.c | 1 + arch/sparc/kernel/misctrap.S | 1 + arch/sparc/kernel/module.c | 1 + arch/sparc/kernel/of_device_32.c | 1 + arch/sparc/kernel/of_device_64.c | 1 + arch/sparc/kernel/of_device_common.h | 1 + arch/sparc/kernel/pci.c | 1 + arch/sparc/kernel/pci_common.c | 1 + arch/sparc/kernel/pci_fire.c | 1 + arch/sparc/kernel/pci_impl.h | 1 + arch/sparc/kernel/pci_msi.c | 1 + arch/sparc/kernel/pci_psycho.c | 1 + arch/sparc/kernel/pci_sabre.c | 1 + arch/sparc/kernel/pci_schizo.c | 1 + arch/sparc/kernel/pci_sun4v.c | 1 + arch/sparc/kernel/pci_sun4v.h | 1 + arch/sparc/kernel/pci_sun4v_asm.S | 1 + arch/sparc/kernel/pcic.c | 1 + arch/sparc/kernel/perf_event.c | 1 + arch/sparc/kernel/pmc.c | 1 + arch/sparc/kernel/power.c | 1 + arch/sparc/kernel/process_32.c | 1 + arch/sparc/kernel/process_64.c | 1 + arch/sparc/kernel/prom.h | 1 + arch/sparc/kernel/prom_irqtrans.c | 1 + arch/sparc/kernel/psycho_common.c | 1 + arch/sparc/kernel/psycho_common.h | 1 + arch/sparc/kernel/ptrace_32.c | 1 + arch/sparc/kernel/reboot.c | 1 + arch/sparc/kernel/rtrap_32.S | 1 + arch/sparc/kernel/rtrap_64.S | 1 + arch/sparc/kernel/sbus.c | 1 + arch/sparc/kernel/setup_32.c | 1 + arch/sparc/kernel/setup_64.c | 1 + arch/sparc/kernel/signal32.c | 1 + arch/sparc/kernel/signal_32.c | 1 + arch/sparc/kernel/signal_64.c | 1 + arch/sparc/kernel/sigutil.h | 1 + arch/sparc/kernel/sigutil_32.c | 1 + arch/sparc/kernel/sigutil_64.c | 1 + arch/sparc/kernel/smp_32.c | 1 + arch/sparc/kernel/smp_64.c | 1 + arch/sparc/kernel/spiterrs.S | 1 + arch/sparc/kernel/sstate.c | 1 + arch/sparc/kernel/starfire.c | 1 + arch/sparc/kernel/sun4d_irq.c | 1 + arch/sparc/kernel/sun4d_smp.c | 1 + arch/sparc/kernel/sun4m_irq.c | 1 + arch/sparc/kernel/sun4m_smp.c | 1 + arch/sparc/kernel/sun4v_ivec.S | 1 + arch/sparc/kernel/sun4v_tlb_miss.S | 1 + arch/sparc/kernel/sys32.S | 1 + arch/sparc/kernel/sys_sparc32.c | 1 + arch/sparc/kernel/sys_sparc_32.c | 1 + arch/sparc/kernel/sys_sparc_64.c | 1 + arch/sparc/kernel/syscalls.S | 1 + arch/sparc/kernel/sysfs.c | 1 + arch/sparc/kernel/systbls.h | 1 + arch/sparc/kernel/systbls_32.S | 1 + arch/sparc/kernel/systbls_64.S | 1 + arch/sparc/kernel/time_32.c | 1 + arch/sparc/kernel/time_64.c | 1 + arch/sparc/kernel/trampoline_32.S | 1 + arch/sparc/kernel/trampoline_64.S | 1 + arch/sparc/kernel/traps_32.c | 1 + arch/sparc/kernel/tsb.S | 1 + arch/sparc/kernel/ttable_32.S | 1 + arch/sparc/kernel/ttable_64.S | 1 + arch/sparc/kernel/una_asm_32.S | 1 + arch/sparc/kernel/una_asm_64.S | 1 + arch/sparc/kernel/unaligned_32.c | 1 + arch/sparc/kernel/unaligned_64.c | 1 + arch/sparc/kernel/urtt_fill.S | 1 + arch/sparc/kernel/utrap.S | 1 + arch/sparc/kernel/vio.c | 1 + arch/sparc/kernel/viohs.c | 1 + arch/sparc/kernel/visemul.c | 1 + arch/sparc/kernel/vmlinux.lds.S | 1 + arch/sparc/kernel/windows.c | 1 + arch/sparc/kernel/winfixup.S | 1 + arch/sparc/kernel/wof.S | 1 + arch/sparc/kernel/wuf.S | 1 + arch/sparc/lib/GENbzero.S | 1 + arch/sparc/lib/GENcopy_from_user.S | 1 + arch/sparc/lib/GENcopy_to_user.S | 1 + arch/sparc/lib/GENmemcpy.S | 1 + arch/sparc/lib/GENpage.S | 1 + arch/sparc/lib/GENpatch.S | 1 + arch/sparc/lib/Makefile | 1 + arch/sparc/lib/NG2copy_from_user.S | 1 + arch/sparc/lib/NG2copy_to_user.S | 1 + arch/sparc/lib/NG2memcpy.S | 1 + arch/sparc/lib/NG2patch.S | 1 + arch/sparc/lib/NG4clear_page.S | 1 + arch/sparc/lib/NG4copy_from_user.S | 1 + arch/sparc/lib/NG4copy_page.S | 1 + arch/sparc/lib/NG4copy_to_user.S | 1 + arch/sparc/lib/NG4memcpy.S | 1 + arch/sparc/lib/NG4memset.S | 1 + arch/sparc/lib/NG4patch.S | 1 + arch/sparc/lib/NGbzero.S | 1 + arch/sparc/lib/NGcopy_from_user.S | 1 + arch/sparc/lib/NGcopy_to_user.S | 1 + arch/sparc/lib/NGmemcpy.S | 1 + arch/sparc/lib/NGpage.S | 1 + arch/sparc/lib/NGpatch.S | 1 + arch/sparc/lib/PeeCeeI.c | 1 + arch/sparc/lib/U1copy_from_user.S | 1 + arch/sparc/lib/U1copy_to_user.S | 1 + arch/sparc/lib/U1memcpy.S | 1 + arch/sparc/lib/U3copy_from_user.S | 1 + arch/sparc/lib/U3copy_to_user.S | 1 + arch/sparc/lib/U3memcpy.S | 1 + arch/sparc/lib/U3patch.S | 1 + arch/sparc/lib/VISsave.S | 1 + arch/sparc/lib/ashldi3.S | 1 + arch/sparc/lib/ashrdi3.S | 1 + arch/sparc/lib/atomic32.c | 1 + arch/sparc/lib/atomic_64.S | 1 + arch/sparc/lib/bitext.c | 1 + arch/sparc/lib/bitops.S | 1 + arch/sparc/lib/blockops.S | 1 + arch/sparc/lib/bzero.S | 1 + arch/sparc/lib/checksum_32.S | 1 + arch/sparc/lib/checksum_64.S | 1 + arch/sparc/lib/clear_page.S | 1 + arch/sparc/lib/cmpdi2.c | 1 + arch/sparc/lib/copy_in_user.S | 1 + arch/sparc/lib/copy_page.S | 1 + arch/sparc/lib/copy_user.S | 1 + arch/sparc/lib/csum_copy.S | 1 + arch/sparc/lib/csum_copy_from_user.S | 1 + arch/sparc/lib/csum_copy_to_user.S | 1 + arch/sparc/lib/ffs.S | 1 + arch/sparc/lib/hweight.S | 1 + arch/sparc/lib/iomap.c | 1 + arch/sparc/lib/ipcsum.S | 1 + arch/sparc/lib/libgcc.h | 1 + arch/sparc/lib/locks.S | 1 + arch/sparc/lib/lshrdi3.S | 1 + arch/sparc/lib/mcount.S | 1 + arch/sparc/lib/memcmp.S | 1 + arch/sparc/lib/memcpy.S | 1 + arch/sparc/lib/memmove.S | 1 + arch/sparc/lib/memscan_32.S | 1 + arch/sparc/lib/memscan_64.S | 1 + arch/sparc/lib/memset.S | 1 + arch/sparc/lib/multi3.S | 1 + arch/sparc/lib/strlen.S | 1 + arch/sparc/lib/strncmp_32.S | 1 + arch/sparc/lib/strncmp_64.S | 1 + arch/sparc/lib/ucmpdi2.c | 1 + arch/sparc/lib/xor.S | 1 + arch/sparc/math-emu/math_32.c | 1 + arch/sparc/math-emu/math_64.c | 1 + arch/sparc/math-emu/sfp-util_32.h | 1 + arch/sparc/math-emu/sfp-util_64.h | 1 + arch/sparc/mm/Makefile | 1 + arch/sparc/mm/extable.c | 1 + arch/sparc/mm/fault_32.c | 1 + arch/sparc/mm/fault_64.c | 1 + arch/sparc/mm/gup.c | 1 + arch/sparc/mm/highmem.c | 1 + arch/sparc/mm/hugetlbpage.c | 1 + arch/sparc/mm/hypersparc.S | 1 + arch/sparc/mm/init_32.c | 1 + arch/sparc/mm/init_64.c | 1 + arch/sparc/mm/init_64.h | 1 + arch/sparc/mm/io-unit.c | 1 + arch/sparc/mm/iommu.c | 1 + arch/sparc/mm/leon_mm.c | 1 + arch/sparc/mm/mm_32.h | 1 + arch/sparc/mm/srmmu.c | 1 + arch/sparc/mm/srmmu_access.S | 1 + arch/sparc/mm/swift.S | 1 + arch/sparc/mm/tlb.c | 1 + arch/sparc/mm/tsb.c | 1 + arch/sparc/mm/tsunami.S | 1 + arch/sparc/mm/ultra.S | 1 + arch/sparc/mm/viking.S | 1 + arch/sparc/net/bpf_jit_32.h | 1 + arch/sparc/net/bpf_jit_64.h | 1 + arch/sparc/net/bpf_jit_asm_32.S | 1 + arch/sparc/net/bpf_jit_asm_64.S | 1 + arch/sparc/net/bpf_jit_comp_32.c | 1 + arch/sparc/net/bpf_jit_comp_64.c | 1 + arch/sparc/power/hibernate.c | 1 + arch/sparc/power/hibernate_asm.S | 1 + arch/sparc/prom/Makefile | 1 + arch/sparc/prom/bootstr_32.c | 1 + arch/sparc/prom/bootstr_64.c | 1 + arch/sparc/prom/cif.S | 1 + arch/sparc/prom/console_32.c | 1 + arch/sparc/prom/console_64.c | 1 + arch/sparc/prom/init_32.c | 1 + arch/sparc/prom/init_64.c | 1 + arch/sparc/prom/memory.c | 1 + arch/sparc/prom/misc_32.c | 1 + arch/sparc/prom/misc_64.c | 1 + arch/sparc/prom/mp.c | 1 + arch/sparc/prom/p1275.c | 1 + arch/sparc/prom/printf.c | 1 + arch/sparc/prom/ranges.c | 1 + arch/sparc/prom/tree_32.c | 1 + arch/sparc/prom/tree_64.c | 1 + arch/tile/Kconfig | 1 + arch/tile/Kconfig.debug | 1 + arch/tile/gxio/Kconfig | 1 + arch/tile/gxio/Makefile | 1 + arch/tile/include/asm/div64.h | 1 + arch/tile/include/asm/irq_work.h | 1 + arch/tile/include/asm/word-at-a-time.h | 1 + arch/tile/kernel/Makefile | 1 + arch/tile/kernel/hvglue.S | 1 + arch/tile/kernel/vdso/Makefile | 1 + arch/tile/kernel/vmlinux.lds.S | 1 + arch/tile/kvm/Kconfig | 1 + arch/tile/lib/Makefile | 1 + arch/um/Kconfig.char | 1 + arch/um/Kconfig.common | 1 + arch/um/Kconfig.debug | 1 + arch/um/Kconfig.net | 1 + arch/um/Kconfig.rest | 1 + arch/um/Kconfig.um | 1 + arch/um/drivers/cow.h | 1 + arch/um/drivers/cow_sys.h | 1 + arch/um/drivers/slip.h | 1 + arch/um/drivers/slip_common.c | 1 + arch/um/drivers/slip_common.h | 1 + arch/um/drivers/slirp.h | 1 + arch/um/drivers/stderr_console.c | 1 + arch/um/include/asm/bugs.h | 1 + arch/um/include/asm/cache.h | 1 + arch/um/include/asm/common.lds.S | 1 + arch/um/include/asm/dma.h | 1 + arch/um/include/asm/fixmap.h | 1 + arch/um/include/asm/hardirq.h | 1 + arch/um/include/asm/io.h | 1 + arch/um/include/asm/irq.h | 1 + arch/um/include/asm/irqflags.h | 1 + arch/um/include/asm/sections.h | 1 + arch/um/include/asm/setup.h | 1 + arch/um/include/asm/smp.h | 1 + arch/um/include/asm/stacktrace.h | 1 + arch/um/include/asm/sysrq.h | 1 + arch/um/include/asm/timex.h | 1 + arch/um/include/asm/tlb.h | 1 + arch/um/include/shared/common-offsets.h | 1 + arch/um/include/shared/init.h | 1 + arch/um/include/shared/longjmp.h | 1 + arch/um/kernel/dyn.lds.S | 1 + arch/um/kernel/kmsg_dump.c | 1 + arch/um/kernel/uml.lds.S | 1 + arch/um/os-Linux/elf_aux.c | 1 + arch/um/os-Linux/user_syms.c | 1 + arch/um/scripts/Makefile.rules | 1 + arch/unicore32/Kconfig | 1 + arch/unicore32/Kconfig.debug | 1 + arch/unicore32/include/mach/regs-ac97.h | 1 + arch/unicore32/include/mach/regs-dmac.h | 1 + arch/unicore32/include/mach/regs-gpio.h | 1 + arch/unicore32/include/mach/regs-i2c.h | 1 + arch/unicore32/include/mach/regs-intc.h | 1 + arch/unicore32/include/mach/regs-nand.h | 1 + arch/unicore32/include/mach/regs-ost.h | 1 + arch/unicore32/include/mach/regs-pci.h | 1 + arch/unicore32/include/mach/regs-pm.h | 1 + arch/unicore32/include/mach/regs-ps2.h | 1 + arch/unicore32/include/mach/regs-resetc.h | 1 + arch/unicore32/include/mach/regs-rtc.h | 1 + arch/unicore32/include/mach/regs-sdc.h | 1 + arch/unicore32/include/mach/regs-spi.h | 1 + arch/unicore32/include/mach/regs-umal.h | 1 + arch/unicore32/include/mach/regs-unigfx.h | 1 + arch/unicore32/kernel/Makefile | 1 + arch/unicore32/kernel/ksyms.h | 1 + arch/unicore32/lib/Makefile | 1 + arch/unicore32/mm/Kconfig | 1 + arch/unicore32/mm/Makefile | 1 + arch/x86/Kconfig | 1 + arch/x86/Kconfig.cpu | 1 + arch/x86/Kconfig.debug | 1 + arch/x86/Makefile | 1 + arch/x86/Makefile.um | 1 + arch/x86/Makefile_32.cpu | 1 + arch/x86/boot/code16gcc.h | 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x86/boot/compressed/cmdline.c | 1 + arch/x86/boot/compressed/cpuflags.c | 1 + arch/x86/boot/compressed/eboot.h | 1 + arch/x86/boot/compressed/efi_stub_32.S | 1 + arch/x86/boot/compressed/efi_thunk_64.S | 1 + arch/x86/boot/compressed/error.c | 1 + arch/x86/boot/compressed/error.h | 1 + arch/x86/boot/compressed/head_32.S | 1 + arch/x86/boot/compressed/head_64.S | 1 + arch/x86/boot/compressed/kaslr.c | 1 + arch/x86/boot/compressed/misc.c | 1 + arch/x86/boot/compressed/misc.h | 1 + arch/x86/boot/compressed/pagetable.c | 1 + arch/x86/boot/compressed/string.c | 1 + arch/x86/boot/compressed/vmlinux.lds.S | 1 + arch/x86/boot/cpuflags.c | 1 + arch/x86/boot/cpuflags.h | 1 + arch/x86/boot/ctype.h | 1 + arch/x86/boot/early_serial_console.c | 1 + arch/x86/boot/header.S | 1 + arch/x86/boot/string.h | 1 + arch/x86/boot/tools/build.c | 1 + arch/x86/crypto/Makefile | 1 + arch/x86/crypto/salsa20-x86_64-asm_64.S | 1 + arch/x86/crypto/sha1-mb/Makefile | 1 + arch/x86/crypto/sha256-mb/Makefile | 1 + arch/x86/crypto/sha512-mb/Makefile | 1 + arch/x86/entry/Makefile | 1 + arch/x86/entry/calling.h | 1 + arch/x86/entry/entry_32.S | 1 + arch/x86/entry/entry_64.S | 1 + arch/x86/entry/entry_64_compat.S | 1 + arch/x86/entry/syscall_32.c | 1 + arch/x86/entry/syscall_64.c | 1 + arch/x86/entry/syscalls/Makefile | 1 + arch/x86/entry/syscalls/syscallhdr.sh | 1 + arch/x86/entry/syscalls/syscalltbl.sh | 1 + arch/x86/entry/vdso/Makefile | 1 + arch/x86/entry/vdso/vdso-layout.lds.S | 1 + arch/x86/entry/vdso/vdso.lds.S | 1 + arch/x86/entry/vdso/vdso2c.h | 1 + arch/x86/entry/vdso/vdso32-setup.c | 1 + arch/x86/entry/vdso/vdso32/note.S | 1 + arch/x86/entry/vdso/vdso32/sigreturn.S | 1 + arch/x86/entry/vdso/vdso32/system_call.S | 1 + arch/x86/entry/vdso/vdso32/vclock_gettime.c | 1 + arch/x86/entry/vdso/vdso32/vdso32.lds.S | 1 + arch/x86/entry/vdso/vdsox32.lds.S | 1 + arch/x86/entry/vsyscall/vsyscall_64.c | 1 + arch/x86/entry/vsyscall/vsyscall_gtod.c | 1 + arch/x86/entry/vsyscall/vsyscall_trace.h | 1 + arch/x86/events/Kconfig | 1 + arch/x86/events/amd/Makefile | 1 + arch/x86/events/intel/Makefile | 1 + arch/x86/events/intel/ds.c | 1 + arch/x86/events/intel/knc.c | 1 + arch/x86/events/intel/lbr.c | 1 + arch/x86/events/intel/p6.c | 1 + arch/x86/events/intel/uncore.h | 1 + arch/x86/events/intel/uncore_nhmex.c | 1 + arch/x86/events/intel/uncore_snb.c | 1 + arch/x86/events/intel/uncore_snbep.c | 1 + arch/x86/events/msr.c | 1 + arch/x86/ia32/audit.c | 1 + arch/x86/ia32/ia32_signal.c | 1 + arch/x86/ia32/sys_ia32.c | 1 + arch/x86/include/asm/agp.h | 1 + arch/x86/include/asm/alternative-asm.h | 1 + arch/x86/include/asm/alternative.h | 1 + arch/x86/include/asm/amd_nb.h | 1 + arch/x86/include/asm/apic_flat_64.h | 1 + arch/x86/include/asm/apicdef.h | 1 + arch/x86/include/asm/apm.h | 1 + arch/x86/include/asm/arch_hweight.h | 1 + arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/include/asm/asm.h | 1 + arch/x86/include/asm/atomic.h | 1 + arch/x86/include/asm/atomic64_32.h | 1 + arch/x86/include/asm/atomic64_64.h | 1 + arch/x86/include/asm/barrier.h | 1 + arch/x86/include/asm/bios_ebda.h | 1 + arch/x86/include/asm/bitops.h | 1 + arch/x86/include/asm/boot.h | 1 + arch/x86/include/asm/bootparam_utils.h | 1 + arch/x86/include/asm/bug.h | 1 + arch/x86/include/asm/bugs.h | 1 + arch/x86/include/asm/cache.h | 1 + arch/x86/include/asm/cacheflush.h | 1 + arch/x86/include/asm/ce4100.h | 1 + arch/x86/include/asm/checksum.h | 1 + arch/x86/include/asm/checksum_32.h | 1 + arch/x86/include/asm/checksum_64.h | 1 + arch/x86/include/asm/clocksource.h | 1 + arch/x86/include/asm/cmdline.h | 1 + arch/x86/include/asm/cmpxchg.h | 1 + arch/x86/include/asm/cmpxchg_32.h | 1 + arch/x86/include/asm/cmpxchg_64.h | 1 + arch/x86/include/asm/compat.h | 1 + arch/x86/include/asm/cpu.h | 1 + arch/x86/include/asm/cpu_device_id.h | 1 + arch/x86/include/asm/cpufeature.h | 1 + arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/cpumask.h | 1 + arch/x86/include/asm/crash.h | 1 + arch/x86/include/asm/crypto/aes.h | 1 + arch/x86/include/asm/crypto/camellia.h | 1 + arch/x86/include/asm/crypto/glue_helper.h | 1 + arch/x86/include/asm/crypto/serpent-avx.h | 1 + arch/x86/include/asm/crypto/serpent-sse2.h | 1 + arch/x86/include/asm/crypto/twofish.h | 1 + arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/debugreg.h | 1 + arch/x86/include/asm/delay.h | 1 + arch/x86/include/asm/desc.h | 1 + arch/x86/include/asm/desc_defs.h | 1 + arch/x86/include/asm/device.h | 1 + arch/x86/include/asm/div64.h | 1 + arch/x86/include/asm/dma-mapping.h | 1 + arch/x86/include/asm/dma.h | 1 + arch/x86/include/asm/dmi.h | 1 + arch/x86/include/asm/dwarf2.h | 1 + arch/x86/include/asm/e820/api.h | 1 + arch/x86/include/asm/e820/types.h | 1 + arch/x86/include/asm/edac.h | 1 + arch/x86/include/asm/efi.h | 1 + arch/x86/include/asm/elf.h | 1 + arch/x86/include/asm/emergency-restart.h | 1 + arch/x86/include/asm/entry_arch.h | 1 + arch/x86/include/asm/espfix.h | 1 + arch/x86/include/asm/export.h | 1 + arch/x86/include/asm/extable.h | 1 + arch/x86/include/asm/fb.h | 1 + arch/x86/include/asm/fpu/api.h | 1 + arch/x86/include/asm/fpu/internal.h | 1 + arch/x86/include/asm/fpu/regset.h | 1 + arch/x86/include/asm/fpu/signal.h | 1 + arch/x86/include/asm/fpu/types.h | 1 + arch/x86/include/asm/fpu/xstate.h | 1 + arch/x86/include/asm/frame.h | 1 + arch/x86/include/asm/ftrace.h | 1 + arch/x86/include/asm/futex.h | 1 + arch/x86/include/asm/gart.h | 1 + arch/x86/include/asm/hardirq.h | 1 + arch/x86/include/asm/highmem.h | 1 + arch/x86/include/asm/hpet.h | 1 + arch/x86/include/asm/hugetlb.h | 1 + arch/x86/include/asm/hw_breakpoint.h | 1 + arch/x86/include/asm/hw_irq.h | 1 + arch/x86/include/asm/hypertransport.h | 1 + arch/x86/include/asm/i8259.h | 1 + arch/x86/include/asm/ia32.h | 1 + arch/x86/include/asm/ia32_unistd.h | 1 + arch/x86/include/asm/init.h | 1 + arch/x86/include/asm/inst.h | 1 + arch/x86/include/asm/intel-family.h | 1 + arch/x86/include/asm/intel_mid_vrtc.h | 1 + arch/x86/include/asm/intel_pmc_ipc.h | 1 + arch/x86/include/asm/intel_pt.h | 1 + arch/x86/include/asm/intel_punit_ipc.h | 1 + arch/x86/include/asm/intel_rdt_sched.h | 1 + arch/x86/include/asm/intel_scu_ipc.h | 1 + arch/x86/include/asm/io.h | 1 + arch/x86/include/asm/io_apic.h | 1 + arch/x86/include/asm/iommu.h | 1 + arch/x86/include/asm/iommu_table.h | 1 + arch/x86/include/asm/iosf_mbi.h | 1 + arch/x86/include/asm/irq.h | 1 + arch/x86/include/asm/irq_regs.h | 1 + arch/x86/include/asm/irq_vectors.h | 1 + arch/x86/include/asm/irq_work.h | 1 + arch/x86/include/asm/irqdomain.h | 1 + arch/x86/include/asm/irqflags.h | 1 + arch/x86/include/asm/jump_label.h | 1 + arch/x86/include/asm/kasan.h | 1 + arch/x86/include/asm/kaslr.h | 1 + arch/x86/include/asm/kbdleds.h | 1 + arch/x86/include/asm/kdebug.h | 1 + arch/x86/include/asm/kexec-bzimage64.h | 1 + arch/x86/include/asm/kexec.h | 1 + arch/x86/include/asm/kgdb.h | 1 + arch/x86/include/asm/kmap_types.h | 1 + arch/x86/include/asm/kmemcheck.h | 1 + arch/x86/include/asm/kvm_emulate.h | 1 + arch/x86/include/asm/kvm_guest.h | 1 + arch/x86/include/asm/kvm_page_track.h | 1 + arch/x86/include/asm/kvm_para.h | 1 + arch/x86/include/asm/kvmclock.h | 1 + arch/x86/include/asm/linkage.h | 1 + arch/x86/include/asm/local.h | 1 + arch/x86/include/asm/mach_timer.h | 1 + arch/x86/include/asm/mach_traps.h | 1 + arch/x86/include/asm/math_emu.h | 1 + arch/x86/include/asm/mc146818rtc.h | 1 + arch/x86/include/asm/mce.h | 1 + arch/x86/include/asm/microcode.h | 1 + arch/x86/include/asm/microcode_amd.h | 1 + arch/x86/include/asm/microcode_intel.h | 1 + arch/x86/include/asm/misc.h | 1 + arch/x86/include/asm/mmconfig.h | 1 + arch/x86/include/asm/mmu.h | 1 + arch/x86/include/asm/mmu_context.h | 1 + arch/x86/include/asm/mmx.h | 1 + arch/x86/include/asm/mmzone.h | 1 + arch/x86/include/asm/mmzone_32.h | 1 + arch/x86/include/asm/mmzone_64.h | 1 + arch/x86/include/asm/module.h | 1 + arch/x86/include/asm/mpspec.h | 1 + arch/x86/include/asm/mpspec_def.h | 1 + arch/x86/include/asm/mpx.h | 1 + arch/x86/include/asm/mshyperv.h | 1 + arch/x86/include/asm/msi.h | 1 + arch/x86/include/asm/msidef.h | 1 + arch/x86/include/asm/msr-index.h | 1 + arch/x86/include/asm/msr-trace.h | 1 + arch/x86/include/asm/msr.h | 1 + arch/x86/include/asm/mwait.h | 1 + arch/x86/include/asm/nmi.h | 1 + arch/x86/include/asm/nops.h | 1 + arch/x86/include/asm/numa.h | 1 + arch/x86/include/asm/numa_32.h | 1 + arch/x86/include/asm/olpc.h | 1 + arch/x86/include/asm/olpc_ofw.h | 1 + arch/x86/include/asm/page.h | 1 + arch/x86/include/asm/page_32.h | 1 + arch/x86/include/asm/page_32_types.h | 1 + arch/x86/include/asm/page_64.h | 1 + arch/x86/include/asm/page_64_types.h | 1 + arch/x86/include/asm/page_types.h | 1 + arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/paravirt_types.h | 1 + arch/x86/include/asm/parport.h | 1 + arch/x86/include/asm/pat.h | 1 + arch/x86/include/asm/pci-direct.h | 1 + arch/x86/include/asm/pci-functions.h | 1 + arch/x86/include/asm/pci.h | 1 + arch/x86/include/asm/pci_64.h | 1 + arch/x86/include/asm/pci_x86.h | 1 + arch/x86/include/asm/percpu.h | 1 + arch/x86/include/asm/perf_event.h | 1 + arch/x86/include/asm/perf_event_p4.h | 1 + arch/x86/include/asm/pgalloc.h | 1 + arch/x86/include/asm/pgtable-2level.h | 1 + arch/x86/include/asm/pgtable-2level_types.h | 1 + arch/x86/include/asm/pgtable-3level.h | 1 + arch/x86/include/asm/pgtable-3level_types.h | 1 + arch/x86/include/asm/pgtable.h | 1 + arch/x86/include/asm/pgtable_32.h | 1 + arch/x86/include/asm/pgtable_32_types.h | 1 + arch/x86/include/asm/pgtable_64.h | 1 + arch/x86/include/asm/pgtable_64_types.h | 1 + arch/x86/include/asm/pgtable_types.h | 1 + arch/x86/include/asm/pkeys.h | 1 + arch/x86/include/asm/pm-trace.h | 1 + arch/x86/include/asm/posix_types.h | 1 + arch/x86/include/asm/preempt.h | 1 + arch/x86/include/asm/probe_roms.h | 1 + arch/x86/include/asm/processor-cyrix.h | 1 + arch/x86/include/asm/processor-flags.h | 1 + arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/proto.h | 1 + arch/x86/include/asm/ptrace.h | 1 + arch/x86/include/asm/purgatory.h | 1 + arch/x86/include/asm/pvclock-abi.h | 1 + arch/x86/include/asm/pvclock.h | 1 + arch/x86/include/asm/qrwlock.h | 1 + arch/x86/include/asm/qspinlock.h | 1 + arch/x86/include/asm/qspinlock_paravirt.h | 1 + arch/x86/include/asm/realmode.h | 1 + arch/x86/include/asm/reboot.h | 1 + arch/x86/include/asm/reboot_fixups.h | 1 + arch/x86/include/asm/rio.h | 1 + arch/x86/include/asm/rmwcc.h | 1 + arch/x86/include/asm/rwsem.h | 1 + arch/x86/include/asm/seccomp.h | 1 + arch/x86/include/asm/sections.h | 1 + arch/x86/include/asm/segment.h | 1 + arch/x86/include/asm/serial.h | 1 + arch/x86/include/asm/set_memory.h | 1 + arch/x86/include/asm/setup.h | 1 + arch/x86/include/asm/shmparam.h | 1 + arch/x86/include/asm/sigcontext.h | 1 + arch/x86/include/asm/sigframe.h | 1 + arch/x86/include/asm/sighandling.h | 1 + arch/x86/include/asm/signal.h | 1 + arch/x86/include/asm/simd.h | 1 + arch/x86/include/asm/smp.h | 1 + arch/x86/include/asm/sparsemem.h | 1 + arch/x86/include/asm/special_insns.h | 1 + arch/x86/include/asm/spinlock.h | 1 + arch/x86/include/asm/spinlock_types.h | 1 + arch/x86/include/asm/sta2x11.h | 1 + arch/x86/include/asm/stackprotector.h | 1 + arch/x86/include/asm/stacktrace.h | 1 + arch/x86/include/asm/string.h | 1 + arch/x86/include/asm/string_32.h | 1 + arch/x86/include/asm/string_64.h | 1 + arch/x86/include/asm/suspend.h | 1 + arch/x86/include/asm/suspend_32.h | 1 + arch/x86/include/asm/suspend_64.h | 1 + arch/x86/include/asm/svm.h | 1 + arch/x86/include/asm/swiotlb.h | 1 + arch/x86/include/asm/switch_to.h | 1 + arch/x86/include/asm/sync_bitops.h | 1 + arch/x86/include/asm/text-patching.h | 1 + arch/x86/include/asm/thread_info.h | 1 + arch/x86/include/asm/time.h | 1 + arch/x86/include/asm/timer.h | 1 + arch/x86/include/asm/timex.h | 1 + arch/x86/include/asm/tlb.h | 1 + arch/x86/include/asm/tlbbatch.h | 1 + arch/x86/include/asm/tlbflush.h | 1 + arch/x86/include/asm/trace/exceptions.h | 1 + arch/x86/include/asm/trace/fpu.h | 1 + arch/x86/include/asm/trace/irq_vectors.h | 1 + arch/x86/include/asm/trace/mpx.h | 1 + arch/x86/include/asm/trace_clock.h | 1 + arch/x86/include/asm/traps.h | 1 + arch/x86/include/asm/tsc.h | 1 + arch/x86/include/asm/uaccess.h | 1 + arch/x86/include/asm/uaccess_32.h | 1 + arch/x86/include/asm/uaccess_64.h | 1 + arch/x86/include/asm/unaligned.h | 1 + arch/x86/include/asm/unistd.h | 1 + arch/x86/include/asm/unwind.h | 1 + arch/x86/include/asm/user.h | 1 + arch/x86/include/asm/user32.h | 1 + arch/x86/include/asm/user_32.h | 1 + arch/x86/include/asm/user_64.h | 1 + arch/x86/include/asm/uv/uv.h | 1 + arch/x86/include/asm/vdso.h | 1 + arch/x86/include/asm/vga.h | 1 + arch/x86/include/asm/vgtod.h | 1 + arch/x86/include/asm/vm86.h | 1 + arch/x86/include/asm/vsyscall.h | 1 + arch/x86/include/asm/word-at-a-time.h | 1 + arch/x86/include/asm/x2apic.h | 1 + arch/x86/include/asm/x86_init.h | 1 + arch/x86/include/asm/xen/events.h | 1 + arch/x86/include/asm/xen/interface_32.h | 1 + arch/x86/include/asm/xen/interface_64.h | 1 + arch/x86/include/asm/xen/page-coherent.h | 1 + arch/x86/include/asm/xen/page.h | 1 + arch/x86/include/asm/xen/pci.h | 1 + arch/x86/include/asm/xen/swiotlb-xen.h | 1 + arch/x86/include/asm/xen/trace_types.h | 1 + arch/x86/include/asm/xor_64.h | 1 + arch/x86/include/uapi/asm/byteorder.h | 1 + arch/x86/include/uapi/asm/hwcap2.h | 1 + arch/x86/include/uapi/asm/sigcontext32.h | 1 + arch/x86/include/uapi/asm/types.h | 1 + arch/x86/kernel/Makefile | 1 + arch/x86/kernel/acpi/Makefile | 1 + arch/x86/kernel/acpi/sleep.c | 1 + arch/x86/kernel/acpi/sleep.h | 1 + arch/x86/kernel/aperture_64.c | 1 + arch/x86/kernel/apic/Makefile | 1 + arch/x86/kernel/apic/apic_noop.c | 1 + arch/x86/kernel/apic/bigsmp_32.c | 1 + arch/x86/kernel/apic/hw_nmi.c | 1 + arch/x86/kernel/apic/io_apic.c | 1 + arch/x86/kernel/apic/ipi.c | 1 + arch/x86/kernel/apic/x2apic_cluster.c | 1 + arch/x86/kernel/apic/x2apic_phys.c | 1 + arch/x86/kernel/asm-offsets.c | 1 + arch/x86/kernel/asm-offsets_32.c | 1 + arch/x86/kernel/asm-offsets_64.c | 1 + arch/x86/kernel/audit_64.c | 1 + arch/x86/kernel/bootflag.c | 1 + arch/x86/kernel/check.c | 1 + arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/bugs.c | 1 + arch/x86/kernel/cpu/centaur.c | 1 + arch/x86/kernel/cpu/cpu.h | 1 + arch/x86/kernel/cpu/cyrix.c | 1 + arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/cpu/intel_cacheinfo.c | 1 + arch/x86/kernel/cpu/intel_rdt.h | 1 + arch/x86/kernel/cpu/match.c | 1 + arch/x86/kernel/cpu/mcheck/Makefile | 1 + arch/x86/kernel/cpu/mcheck/mce-internal.h | 1 + arch/x86/kernel/cpu/mcheck/mce_intel.c | 1 + arch/x86/kernel/cpu/mcheck/p5.c | 1 + arch/x86/kernel/cpu/mcheck/threshold.c | 1 + arch/x86/kernel/cpu/mcheck/winchip.c | 1 + arch/x86/kernel/cpu/mkcapflags.sh | 1 + arch/x86/kernel/cpu/mtrr/amd.c | 1 + arch/x86/kernel/cpu/mtrr/centaur.c | 1 + arch/x86/kernel/cpu/mtrr/cyrix.c | 1 + arch/x86/kernel/cpu/mtrr/if.c | 1 + arch/x86/kernel/cpu/mtrr/mtrr.h | 1 + arch/x86/kernel/cpu/perfctr-watchdog.c | 1 + arch/x86/kernel/cpu/powerflags.c | 1 + arch/x86/kernel/cpu/proc.c | 1 + arch/x86/kernel/cpu/topology.c | 1 + arch/x86/kernel/cpu/transmeta.c | 1 + arch/x86/kernel/cpu/umc.c | 1 + arch/x86/kernel/crash_dump_32.c | 1 + arch/x86/kernel/crash_dump_64.c | 1 + arch/x86/kernel/devicetree.c | 1 + arch/x86/kernel/doublefault.c | 1 + arch/x86/kernel/dumpstack_32.c | 1 + arch/x86/kernel/dumpstack_64.c | 1 + arch/x86/kernel/early-quirks.c | 1 + arch/x86/kernel/early_printk.c | 1 + arch/x86/kernel/ebda.c | 1 + arch/x86/kernel/fpu/bugs.c | 1 + arch/x86/kernel/fpu/regset.c | 1 + arch/x86/kernel/fpu/signal.c | 1 + arch/x86/kernel/ftrace.c | 1 + arch/x86/kernel/ftrace_32.S | 1 + arch/x86/kernel/ftrace_64.S | 1 + arch/x86/kernel/head32.c | 1 + arch/x86/kernel/head64.c | 1 + arch/x86/kernel/head_32.S | 1 + arch/x86/kernel/head_64.S | 1 + arch/x86/kernel/i8253.c | 1 + arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/io_delay.c | 1 + arch/x86/kernel/ioport.c | 1 + arch/x86/kernel/irq_32.c | 1 + arch/x86/kernel/irq_64.c | 1 + arch/x86/kernel/irq_work.c | 1 + arch/x86/kernel/irqinit.c | 1 + arch/x86/kernel/jump_label.c | 1 + arch/x86/kernel/kprobes/common.h | 1 + arch/x86/kernel/ldt.c | 1 + arch/x86/kernel/mmconf-fam10h_64.c | 1 + arch/x86/kernel/mpparse.c | 1 + arch/x86/kernel/nmi_selftest.c | 1 + arch/x86/kernel/paravirt-spinlocks.c | 1 + arch/x86/kernel/paravirt_patch_32.c | 1 + arch/x86/kernel/paravirt_patch_64.c | 1 + arch/x86/kernel/pci-dma.c | 1 + arch/x86/kernel/pci-iommu_table.c | 1 + arch/x86/kernel/pci-nommu.c | 1 + arch/x86/kernel/pci-swiotlb.c | 1 + arch/x86/kernel/pcspeaker.c | 1 + arch/x86/kernel/perf_regs.c | 1 + arch/x86/kernel/platform-quirks.c | 1 + arch/x86/kernel/pmem.c | 1 + arch/x86/kernel/probe_roms.c | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/quirks.c | 1 + arch/x86/kernel/reboot.c | 1 + arch/x86/kernel/reboot_fixups_32.c | 1 + arch/x86/kernel/resource.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/setup_percpu.c | 1 + arch/x86/kernel/signal.c | 1 + arch/x86/kernel/signal_compat.c | 1 + arch/x86/kernel/step.c | 1 + arch/x86/kernel/sys_x86_64.c | 1 + arch/x86/kernel/time.c | 1 + arch/x86/kernel/tls.c | 1 + arch/x86/kernel/trace_clock.c | 1 + arch/x86/kernel/tracepoint.c | 1 + arch/x86/kernel/tsc_sync.c | 1 + arch/x86/kernel/vm86_32.c | 1 + arch/x86/kernel/vmlinux.lds.S | 1 + arch/x86/kvm/Kconfig | 1 + arch/x86/kvm/Makefile | 1 + arch/x86/kvm/cpuid.h | 1 + arch/x86/kvm/i8254.h | 1 + arch/x86/kvm/ioapic.h | 1 + arch/x86/kvm/kvm_cache_regs.h | 1 + arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/mmutrace.h | 1 + arch/x86/kvm/pmu.h | 1 + arch/x86/kvm/trace.h | 1 + arch/x86/kvm/tss.h | 1 + arch/x86/kvm/x86.h | 1 + arch/x86/lib/Makefile | 1 + arch/x86/lib/cache-smp.c | 1 + arch/x86/lib/copy_page_64.S | 1 + arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/delay.c | 1 + arch/x86/lib/getuser.S | 1 + arch/x86/lib/hweight.S | 1 + arch/x86/lib/kaslr.c | 1 + arch/x86/lib/memcpy_32.c | 1 + arch/x86/lib/memmove_64.S | 1 + arch/x86/lib/memset_64.S | 1 + arch/x86/lib/misc.c | 1 + arch/x86/lib/mmx_32.c | 1 + arch/x86/lib/msr-reg-export.c | 1 + arch/x86/lib/msr-reg.S | 1 + arch/x86/lib/msr-smp.c | 1 + arch/x86/lib/msr.c | 1 + arch/x86/lib/putuser.S | 1 + arch/x86/lib/string_32.c | 1 + arch/x86/lib/strstr_32.c | 1 + arch/x86/lib/usercopy_32.c | 1 + arch/x86/math-emu/Makefile | 1 + arch/x86/math-emu/control_w.h | 1 + arch/x86/math-emu/div_Xsig.S | 1 + arch/x86/math-emu/div_small.S | 1 + arch/x86/math-emu/errors.c | 1 + arch/x86/math-emu/exception.h | 1 + arch/x86/math-emu/fpu_arith.c | 1 + arch/x86/math-emu/fpu_asm.h | 1 + arch/x86/math-emu/fpu_aux.c | 1 + arch/x86/math-emu/fpu_emu.h | 1 + arch/x86/math-emu/fpu_entry.c | 1 + arch/x86/math-emu/fpu_etc.c | 1 + arch/x86/math-emu/fpu_proto.h | 1 + arch/x86/math-emu/fpu_system.h | 1 + arch/x86/math-emu/fpu_tags.c | 1 + arch/x86/math-emu/fpu_trig.c | 1 + arch/x86/math-emu/get_address.c | 1 + arch/x86/math-emu/load_store.c | 1 + arch/x86/math-emu/mul_Xsig.S | 1 + arch/x86/math-emu/poly.h | 1 + arch/x86/math-emu/poly_2xm1.c | 1 + arch/x86/math-emu/poly_atan.c | 1 + arch/x86/math-emu/poly_l2.c | 1 + arch/x86/math-emu/poly_sin.c | 1 + arch/x86/math-emu/poly_tan.c | 1 + arch/x86/math-emu/polynom_Xsig.S | 1 + arch/x86/math-emu/reg_add_sub.c | 1 + arch/x86/math-emu/reg_compare.c | 1 + arch/x86/math-emu/reg_constant.c | 1 + arch/x86/math-emu/reg_constant.h | 1 + arch/x86/math-emu/reg_convert.c | 1 + arch/x86/math-emu/reg_divide.c | 1 + arch/x86/math-emu/reg_ld_str.c | 1 + arch/x86/math-emu/reg_mul.c | 1 + arch/x86/math-emu/reg_norm.S | 1 + arch/x86/math-emu/reg_round.S | 1 + arch/x86/math-emu/reg_u_add.S | 1 + arch/x86/math-emu/reg_u_div.S | 1 + arch/x86/math-emu/reg_u_mul.S | 1 + arch/x86/math-emu/reg_u_sub.S | 1 + arch/x86/math-emu/round_Xsig.S | 1 + arch/x86/math-emu/shr_Xsig.S | 1 + arch/x86/math-emu/status_w.h | 1 + arch/x86/math-emu/wm_shrx.S | 1 + arch/x86/math-emu/wm_sqrt.S | 1 + arch/x86/mm/Makefile | 1 + arch/x86/mm/amdtopology.c | 1 + arch/x86/mm/fault.c | 1 + arch/x86/mm/hugetlbpage.c | 1 + arch/x86/mm/ident_map.c | 1 + arch/x86/mm/kasan_init_64.c | 1 + arch/x86/mm/kaslr.c | 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 + arch/x86/mm/kmmio.c | 1 + arch/x86/mm/mm_internal.h | 1 + arch/x86/mm/mpx.c | 1 + arch/x86/mm/numa_64.c | 1 + arch/x86/mm/numa_emulation.c | 1 + arch/x86/mm/numa_internal.h | 1 + arch/x86/mm/pageattr-test.c | 1 + arch/x86/mm/pat_internal.h | 1 + arch/x86/mm/pat_rbtree.c | 1 + arch/x86/mm/pgtable.c | 1 + arch/x86/mm/pgtable_32.c | 1 + arch/x86/mm/physaddr.c | 1 + arch/x86/mm/physaddr.h | 1 + arch/x86/mm/setup_nx.c | 1 + arch/x86/mm/srat.c | 1 + arch/x86/oprofile/Makefile | 1 + arch/x86/pci/Makefile | 1 + arch/x86/pci/acpi.c | 1 + arch/x86/pci/amd_bus.c | 1 + arch/x86/pci/bus_numa.c | 1 + arch/x86/pci/bus_numa.h | 1 + arch/x86/pci/direct.c | 1 + arch/x86/pci/early.c | 1 + arch/x86/pci/fixup.c | 1 + arch/x86/pci/i386.c | 1 + arch/x86/pci/init.c | 1 + arch/x86/pci/intel_mid_pci.c | 1 + arch/x86/pci/irq.c | 1 + arch/x86/pci/mmconfig-shared.c | 1 + arch/x86/pci/mmconfig_64.c | 1 + arch/x86/pci/pcbios.c | 1 + arch/x86/platform/Makefile | 1 + arch/x86/platform/efi/Makefile | 1 + arch/x86/platform/efi/efi.c | 1 + arch/x86/platform/efi/efi_32.c | 1 + arch/x86/platform/efi/efi_64.c | 1 + arch/x86/platform/efi/efi_stub_32.S | 1 + arch/x86/platform/efi/efi_stub_64.S | 1 + arch/x86/platform/efi/efi_thunk_64.S | 1 + arch/x86/platform/intel-mid/device_libs/Makefile | 1 + arch/x86/platform/intel-quark/imr_selftest.c | 1 + arch/x86/platform/olpc/Makefile | 1 + arch/x86/platform/olpc/xo1-wakeup.S | 1 + arch/x86/power/Makefile | 1 + arch/x86/power/hibernate_asm_32.S | 1 + arch/x86/purgatory/Makefile | 1 + arch/x86/ras/Kconfig | 1 + arch/x86/realmode/init.c | 1 + arch/x86/realmode/rm/header.S | 1 + arch/x86/realmode/rm/realmode.h | 1 + arch/x86/realmode/rm/realmode.lds.S | 1 + arch/x86/realmode/rm/reboot.S | 1 + arch/x86/realmode/rm/stack.S | 1 + arch/x86/realmode/rm/trampoline_32.S | 1 + arch/x86/realmode/rm/trampoline_64.S | 1 + arch/x86/realmode/rm/trampoline_common.S | 1 + arch/x86/realmode/rm/wakemain.c | 1 + arch/x86/realmode/rm/wakeup.h | 1 + arch/x86/realmode/rm/wakeup_asm.S | 1 + arch/x86/realmode/rmpiggy.S | 1 + arch/x86/tools/Makefile | 1 + arch/x86/tools/distill.awk | 1 + arch/x86/tools/gen-insn-attr-x86.awk | 1 + arch/x86/tools/relocs.c | 1 + arch/x86/tools/relocs.h | 1 + arch/x86/tools/relocs_32.c | 1 + arch/x86/tools/relocs_64.c | 1 + arch/x86/tools/relocs_common.c | 1 + arch/x86/um/Kconfig | 1 + arch/x86/um/Makefile | 1 + arch/x86/um/asm/arch_hweight.h | 1 + arch/x86/um/asm/barrier.h | 1 + arch/x86/um/asm/checksum.h | 1 + arch/x86/um/asm/desc.h | 1 + arch/x86/um/asm/module.h | 1 + arch/x86/um/asm/processor.h | 1 + arch/x86/um/asm/ptrace.h | 1 + arch/x86/um/asm/segment.h | 1 + arch/x86/um/asm/syscall.h | 1 + arch/x86/um/elfcore.c | 1 + arch/x86/um/mem_64.c | 1 + arch/x86/um/os-Linux/mcontext.c | 1 + arch/x86/um/os-Linux/task_size.c | 1 + arch/x86/um/os-Linux/tls.c | 1 + arch/x86/um/setjmp_32.S | 1 + arch/x86/um/setjmp_64.S | 1 + arch/x86/um/shared/sysdep/archsetjmp.h | 1 + arch/x86/um/shared/sysdep/archsetjmp_32.h | 1 + arch/x86/um/shared/sysdep/archsetjmp_64.h | 1 + arch/x86/um/shared/sysdep/faultinfo.h | 1 + arch/x86/um/shared/sysdep/kernel-offsets.h | 1 + arch/x86/um/shared/sysdep/ptrace.h | 1 + arch/x86/um/shared/sysdep/ptrace_user.h | 1 + arch/x86/um/shared/sysdep/stub.h | 1 + arch/x86/um/shared/sysdep/syscalls.h | 1 + arch/x86/um/shared/sysdep/tls.h | 1 + arch/x86/um/stub_32.S | 1 + arch/x86/um/stub_64.S | 1 + arch/x86/um/sys_call_table_32.c | 1 + arch/x86/um/sys_call_table_64.c | 1 + arch/x86/um/syscalls_32.c | 1 + arch/x86/um/tls_64.c | 1 + arch/x86/um/user-offsets.c | 1 + arch/x86/um/vdso/Makefile | 1 + arch/x86/um/vdso/checkundef.sh | 1 + arch/x86/um/vdso/vdso-layout.lds.S | 1 + arch/x86/um/vdso/vdso.S | 1 + arch/x86/um/vdso/vdso.lds.S | 1 + arch/x86/xen/Kconfig | 1 + arch/x86/xen/Makefile | 1 + arch/x86/xen/apic.c | 1 + arch/x86/xen/debugfs.c | 1 + arch/x86/xen/debugfs.h | 1 + arch/x86/xen/enlighten_pv.c | 1 + arch/x86/xen/enlighten_pvh.c | 1 + arch/x86/xen/irq.c | 1 + arch/x86/xen/mmu.h | 1 + arch/x86/xen/mmu_hvm.c | 1 + arch/x86/xen/multicalls.c | 1 + arch/x86/xen/multicalls.h | 1 + arch/x86/xen/pmu.c | 1 + arch/x86/xen/pmu.h | 1 + arch/x86/xen/setup.c | 1 + arch/x86/xen/smp.c | 1 + arch/x86/xen/smp.h | 1 + arch/x86/xen/smp_hvm.c | 1 + arch/x86/xen/smp_pv.c | 1 + arch/x86/xen/spinlock.c | 1 + arch/x86/xen/suspend.c | 1 + arch/x86/xen/suspend_hvm.c | 1 + arch/x86/xen/suspend_pv.c | 1 + arch/x86/xen/time.c | 1 + arch/x86/xen/trace.c | 1 + arch/x86/xen/vga.c | 1 + arch/x86/xen/xen-asm.S | 1 + arch/x86/xen/xen-asm_32.S | 1 + arch/x86/xen/xen-asm_64.S | 1 + arch/x86/xen/xen-head.S | 1 + arch/x86/xen/xen-ops.h | 1 + arch/xtensa/Kconfig | 1 + arch/xtensa/Kconfig.debug | 1 + arch/xtensa/boot/boot-redboot/bootstrap.S | 1 + arch/xtensa/boot/dts/csp.dts | 1 + arch/xtensa/boot/dts/kc705.dts | 1 + arch/xtensa/boot/dts/kc705_nommu.dts | 1 + arch/xtensa/boot/dts/lx200mx.dts | 1 + arch/xtensa/boot/dts/lx60.dts | 1 + arch/xtensa/boot/dts/ml605.dts | 1 + arch/xtensa/boot/dts/xtfpga-flash-128m.dtsi | 1 + arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi | 1 + arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi | 1 + arch/xtensa/boot/dts/xtfpga.dtsi | 1 + arch/xtensa/boot/lib/Makefile | 1 + arch/xtensa/boot/lib/zmem.c | 1 + arch/xtensa/include/asm/flat.h | 1 + arch/xtensa/include/asm/nommu_context.h | 1 + arch/xtensa/include/asm/spinlock_types.h | 1 + arch/xtensa/include/asm/unistd.h | 1 + arch/xtensa/kernel/Makefile | 1 + arch/xtensa/kernel/irq.c | 1 + arch/xtensa/mm/mmu.c | 1 + arch/xtensa/oprofile/Makefile | 1 + block/Kconfig | 1 + block/Kconfig.iosched | 1 + block/Makefile | 1 + block/blk-ioc.c | 1 + block/blk-lib.c | 1 + block/blk-map.c | 1 + block/blk-merge.c | 1 + block/blk-mq-debugfs.h | 1 + block/blk-mq-sched.h | 1 + block/blk-mq-tag.h | 1 + block/blk-mq.h | 1 + block/blk-softirq.c | 1 + block/blk-stat.h | 1 + block/blk-sysfs.c | 1 + block/blk-tag.c | 1 + block/blk-throttle.c | 1 + block/blk-wbt.h | 1 + block/blk.h | 1 + block/bounce.c | 1 + block/cmdline-parser.c | 1 + block/compat_ioctl.c | 1 + block/partition-generic.c | 1 + block/partitions/Kconfig | 1 + block/partitions/Makefile | 1 + block/partitions/acorn.h | 1 + block/partitions/aix.c | 1 + block/partitions/amiga.c | 1 + block/partitions/atari.c | 1 + block/partitions/atari.h | 1 + block/partitions/check.c | 1 + block/partitions/check.h | 1 + block/partitions/cmdline.c | 1 + block/partitions/cmdline.h | 1 + block/partitions/ibm.c | 1 + block/partitions/karma.c | 1 + block/partitions/mac.c | 1 + block/partitions/mac.h | 1 + block/partitions/msdos.c | 1 + block/partitions/osf.c | 1 + block/partitions/sgi.c | 1 + block/partitions/sun.c | 1 + block/partitions/sysv68.c | 1 + block/partitions/ultrix.c | 1 + certs/Kconfig | 1 + certs/Makefile | 1 + certs/blacklist_hashes.c | 1 + certs/blacklist_nohashes.c | 1 + certs/system_certificates.S | 1 + crypto/Kconfig | 1 + crypto/Makefile | 1 + crypto/asymmetric_keys/Kconfig | 1 + crypto/asymmetric_keys/Makefile | 1 + crypto/async_tx/Kconfig | 1 + crypto/async_tx/Makefile | 1 + crypto/ecc_curve_defs.h | 1 + crypto/ripemd.h | 1 + drivers/Kconfig | 1 + drivers/Makefile | 1 + drivers/accessibility/Kconfig | 1 + drivers/acpi/Kconfig | 1 + drivers/acpi/Makefile | 1 + drivers/acpi/acpica/Makefile | 1 + drivers/acpi/apei/Kconfig | 1 + drivers/acpi/apei/Makefile | 1 + drivers/acpi/apei/apei-internal.h | 1 + drivers/acpi/battery.h | 1 + drivers/acpi/dptf/Kconfig | 1 + drivers/acpi/event.c | 1 + drivers/acpi/nfit/Kconfig | 1 + drivers/acpi/pmic/intel_pmic.h | 1 + drivers/acpi/proc.c | 1 + drivers/acpi/processor_pdc.c | 1 + drivers/acpi/reboot.c | 1 + drivers/acpi/sbshc.h | 1 + drivers/acpi/sleep.h | 1 + drivers/acpi/sysfs.c | 1 + drivers/acpi/wakeup.c | 1 + drivers/amba/Kconfig | 1 + drivers/android/Kconfig | 1 + drivers/ata/Kconfig | 1 + drivers/ata/Makefile | 1 + drivers/ata/libata-transport.h | 1 + drivers/ata/libata-zpodd.c | 1 + drivers/ata/sata_gemini.h | 1 + drivers/ata/sis.h | 1 + drivers/atm/Kconfig | 1 + drivers/atm/Makefile | 1 + drivers/atm/eni.h | 1 + drivers/atm/fore200e.h | 1 + drivers/atm/idt77105.h | 1 + drivers/atm/idt77252_tables.h | 1 + drivers/atm/midway.h | 1 + drivers/atm/nicstar.h | 1 + drivers/atm/nicstarmac.c | 1 + drivers/atm/solos-attrlist.c | 1 + drivers/atm/suni.h | 1 + drivers/atm/tonga.h | 1 + drivers/atm/uPD98401.h | 1 + drivers/atm/uPD98402.h | 1 + drivers/atm/zatm.h | 1 + drivers/atm/zeprom.h | 1 + drivers/auxdisplay/Kconfig | 1 + drivers/auxdisplay/Makefile | 1 + drivers/base/Kconfig | 1 + drivers/base/Makefile | 1 + drivers/base/base.h | 1 + drivers/base/devtmpfs.c | 1 + drivers/base/dma-coherent.c | 1 + drivers/base/memory.c | 1 + drivers/base/node.c | 1 + drivers/base/power/Makefile | 1 + drivers/base/power/power.h | 1 + drivers/base/regmap/Kconfig | 1 + drivers/base/regmap/Makefile | 1 + drivers/base/regmap/trace.h | 1 + drivers/base/test/Kconfig | 1 + drivers/bcma/Kconfig | 1 + drivers/bcma/Makefile | 1 + drivers/bcma/bcma_private.h | 1 + drivers/bcma/scan.h | 1 + drivers/block/Kconfig | 1 + drivers/block/Makefile | 1 + drivers/block/drbd/Kconfig | 1 + drivers/block/drbd/Makefile | 1 + drivers/block/drbd/drbd_debugfs.c | 1 + drivers/block/drbd/drbd_debugfs.h | 1 + drivers/block/drbd/drbd_interval.c | 1 + drivers/block/drbd/drbd_interval.h | 1 + drivers/block/drbd/drbd_nla.c | 1 + drivers/block/drbd/drbd_nla.h | 1 + drivers/block/drbd/drbd_protocol.h | 1 + drivers/block/drbd/drbd_state.h | 1 + drivers/block/drbd/drbd_state_change.h | 1 + drivers/block/drbd/drbd_strings.h | 1 + drivers/block/mtip32xx/Kconfig | 1 + drivers/block/paride/Kconfig | 1 + drivers/block/paride/Makefile | 1 + drivers/block/paride/mkd | 1 + drivers/block/zram/Kconfig | 1 + drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/Makefile | 1 + drivers/bus/Kconfig | 1 + drivers/bus/Makefile | 1 + drivers/cdrom/Makefile | 1 + drivers/char/Kconfig | 1 + drivers/char/Makefile | 1 + drivers/char/agp/Kconfig | 1 + drivers/char/agp/Makefile | 1 + drivers/char/agp/intel-agp.h | 1 + drivers/char/agp/isoch.c | 1 + drivers/char/applicom.h | 1 + drivers/char/ds1302.c | 1 + drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/n2-asm.S | 1 + drivers/char/hw_random/n2rng.h | 1 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/ipmi_dmi.c | 1 + drivers/char/ipmi/ipmi_dmi.h | 1 + drivers/char/mem.c | 1 + drivers/char/misc.c | 1 + drivers/char/nwbutton.h | 1 + drivers/char/pcmcia/cm4040_cs.h | 1 + drivers/char/tpm/Makefile | 1 + drivers/char/tpm/st33zp24/Makefile | 1 + drivers/char/tpm/tpm-dev.h | 1 + drivers/char/tpm/tpm_eventlog.h | 1 + drivers/clk/Makefile | 1 + drivers/clk/at91/Makefile | 1 + drivers/clk/bcm/Makefile | 1 + drivers/clk/clk-gemini.c | 1 + drivers/clk/clk-tango4.c | 1 + drivers/clk/h8300/clk-div.c | 1 + drivers/clk/h8300/clk-h8s2678.c | 1 + drivers/clk/hisilicon/Makefile | 1 + drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx27.c | 1 + drivers/clk/imx/clk-pllv1.c | 1 + drivers/clk/imx/clk-pllv2.c | 1 + drivers/clk/imx/clk.c | 1 + drivers/clk/imx/clk.h | 1 + drivers/clk/mediatek/Makefile | 1 + drivers/clk/mmp/Makefile | 1 + drivers/clk/mmp/clk.c | 1 + drivers/clk/mmp/clk.h | 1 + drivers/clk/mmp/reset.c | 1 + drivers/clk/mmp/reset.h | 1 + drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/dove-divider.c | 1 + drivers/clk/mvebu/dove-divider.h | 1 + drivers/clk/qcom/Makefile | 1 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/clk-div6.h | 1 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/samsung/Makefile | 1 + drivers/clk/sirf/atlas6.h | 1 + drivers/clk/sirf/prima2.h | 1 + drivers/clk/socfpga/Makefile | 1 + drivers/clk/spear/Makefile | 1 + drivers/clk/st/clkgen.h | 1 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_mult.h | 1 + drivers/clk/sunxi-ng/ccu_mux.h | 1 + drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk-factors.h | 1 + drivers/clk/sunxi/clk-sun9i-cpus.c | 1 + drivers/clk/tegra/Makefile | 1 + drivers/clk/tegra/clk-id.h | 1 + drivers/clk/ti/Makefile | 1 + drivers/clk/uniphier/Makefile | 1 + drivers/clk/ux500/Makefile | 1 + drivers/clk/versatile/clk-icst.h | 1 + drivers/clocksource/Makefile | 1 + drivers/clocksource/h8300_timer16.c | 1 + drivers/clocksource/h8300_timer8.c | 1 + drivers/clocksource/h8300_tpu.c | 1 + drivers/clocksource/i8253.c | 1 + drivers/clocksource/tango_xtal.c | 1 + drivers/clocksource/tcb_clksrc.c | 1 + drivers/clocksource/timer-fttmr010.c | 1 + drivers/clocksource/timer-of.h | 1 + drivers/clocksource/timer-sp.h | 1 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cris-artpec3-cpufreq.c | 1 + drivers/cpufreq/cris-etraxfs-cpufreq.c | 1 + drivers/cpufreq/ppc_cbe_cpufreq.h | 1 + drivers/cpuidle/Makefile | 1 + drivers/cpuidle/cpuidle-powernv.c | 1 + drivers/cpuidle/cpuidle-pseries.c | 1 + drivers/cpuidle/cpuidle.h | 1 + drivers/cpuidle/dt_idle_states.h | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/atmel-aes-regs.h | 1 + drivers/crypto/atmel-sha-regs.h | 1 + drivers/crypto/atmel-tdes-regs.h | 1 + drivers/crypto/caam/Makefile | 1 + drivers/crypto/caam/caamalg_desc.h | 1 + drivers/crypto/caam/caampkc.h | 1 + drivers/crypto/caam/compat.h | 1 + drivers/crypto/caam/ctrl.h | 1 + drivers/crypto/caam/desc.h | 1 + drivers/crypto/caam/desc_constr.h | 1 + drivers/crypto/caam/error.c | 1 + drivers/crypto/caam/error.h | 1 + drivers/crypto/caam/intern.h | 1 + drivers/crypto/caam/jr.h | 1 + drivers/crypto/caam/key_gen.c | 1 + drivers/crypto/caam/key_gen.h | 1 + drivers/crypto/caam/pdb.h | 1 + drivers/crypto/caam/pkc_desc.c | 1 + drivers/crypto/caam/qi.c | 1 + drivers/crypto/caam/qi.h | 1 + drivers/crypto/caam/regs.h | 1 + drivers/crypto/caam/sg_sw_sec4.h | 1 + drivers/crypto/cavium/nitrox/Makefile | 1 + drivers/crypto/cavium/nitrox/nitrox_algs.c | 1 + drivers/crypto/cavium/nitrox/nitrox_common.h | 1 + drivers/crypto/cavium/nitrox/nitrox_csr.h | 1 + drivers/crypto/cavium/nitrox/nitrox_dev.h | 1 + drivers/crypto/cavium/nitrox/nitrox_hal.c | 1 + drivers/crypto/cavium/nitrox/nitrox_isr.c | 1 + drivers/crypto/cavium/nitrox/nitrox_lib.c | 1 + drivers/crypto/cavium/nitrox/nitrox_req.h | 1 + drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 1 + drivers/crypto/cavium/zip/Makefile | 1 + drivers/crypto/ccp/Makefile | 1 + drivers/crypto/marvell/cesa.h | 1 + drivers/crypto/mv_cesa.h | 1 + drivers/crypto/n2_asm.S | 1 + drivers/crypto/n2_core.h | 1 + drivers/crypto/nx/Makefile | 1 + drivers/crypto/nx/nx-842.h | 1 + drivers/crypto/nx/nx.h | 1 + drivers/crypto/nx/nx_csbcpb.h | 1 + drivers/crypto/qat/Makefile | 1 + drivers/crypto/qat/qat_common/Makefile | 1 + drivers/crypto/qce/Makefile | 1 + drivers/crypto/rockchip/rk3288_crypto.h | 1 + drivers/crypto/virtio/Makefile | 1 + drivers/crypto/vmx/Makefile | 1 + drivers/crypto/vmx/aesp8-ppc.h | 1 + drivers/crypto/vmx/ppc-xlate.pl | 1 + drivers/dax/Makefile | 1 + drivers/devfreq/Makefile | 1 + drivers/dio/dio.c | 1 + drivers/dma-buf/sync_trace.h | 1 + drivers/dma/Makefile | 1 + drivers/dma/bestcomm/Makefile | 1 + drivers/dma/dmaengine.h | 1 + drivers/dma/dw/Makefile | 1 + drivers/dma/qcom/Makefile | 1 + drivers/dma/sh/Makefile | 1 + drivers/edac/amd64_edac_dbg.c | 1 + drivers/edac/amd64_edac_inj.c | 1 + drivers/edac/edac_module.h | 1 + drivers/edac/mce_amd.h | 1 + drivers/eisa/Makefile | 1 + drivers/extcon/Makefile | 1 + drivers/extcon/extcon.h | 1 + drivers/firewire/Makefile | 1 + drivers/firewire/core.h | 1 + drivers/firewire/nosy-user.h | 1 + drivers/firewire/nosy.h | 1 + drivers/firewire/ohci.h | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/libstub/Makefile | 1 + drivers/firmware/efi/libstub/efistub.h | 1 + drivers/firmware/efi/libstub/string.c | 1 + drivers/firmware/efi/memmap.c | 1 + drivers/firmware/efi/reboot.c | 1 + drivers/firmware/efi/test/efi_test.h | 1 + drivers/firmware/google/Makefile | 1 + drivers/fmc/Makefile | 1 + drivers/fpga/Makefile | 1 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-etraxfs.c | 1 + drivers/gpio/gpio-ftgpio010.c | 1 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c | 1 + drivers/gpu/drm/amd/amdkfd/Makefile | 1 + drivers/gpu/drm/amd/powerplay/Makefile | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 1 + drivers/gpu/drm/amd/powerplay/inc/smu72.h | 1 + drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 1 + drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h | 1 + drivers/gpu/drm/arm/hdlcd_drv.h | 1 + drivers/gpu/drm/armada/Makefile | 1 + drivers/gpu/drm/armada/armada_trace.c | 1 + drivers/gpu/drm/armada/armada_trace.h | 1 + drivers/gpu/drm/ast/ast_dp501.c | 1 + drivers/gpu/drm/ast/ast_dram_tables.h | 1 + drivers/gpu/drm/atmel-hlcdc/Makefile | 1 + drivers/gpu/drm/bochs/bochs.h | 1 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 1 + drivers/gpu/drm/drm_trace.h | 1 + drivers/gpu/drm/etnaviv/Makefile | 1 + drivers/gpu/drm/etnaviv/state.xml.h | 1 + drivers/gpu/drm/etnaviv/state_3d.xml.h | 1 + drivers/gpu/drm/etnaviv/state_hi.xml.h | 1 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Makefile | 1 + drivers/gpu/drm/gma500/Makefile | 1 + drivers/gpu/drm/i2c/Makefile | 1 + drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gvt/Makefile | 1 + drivers/gpu/drm/i915/i915_trace.h | 1 + drivers/gpu/drm/i915/i915_trace_points.c | 1 + drivers/gpu/drm/i915/intel_acpi.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + drivers/gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/mock_gem_device.h | 1 + drivers/gpu/drm/i915/selftests/mock_gem_object.h | 1 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/imx-drm.h | 1 + drivers/gpu/drm/imx/ipuv3-plane.h | 1 + drivers/gpu/drm/lib/drm_random.c | 1 + drivers/gpu/drm/lib/drm_random.h | 1 + drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mgag200/mgag200_reg.h | 1 + drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 + drivers/gpu/drm/nouveau/dispnv04/disp.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl0002.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl0046.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl006b.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl0080.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl506e.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl506f.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl507a.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl507b.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl507c.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl507d.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl507e.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cl9097.h | 1 + drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 + drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/client.h | 1 + drivers/gpu/drm/nouveau/include/nvif/device.h | 1 + drivers/gpu/drm/nouveau/include/nvif/driver.h | 1 + drivers/gpu/drm/nouveau/include/nvif/event.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0000.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0001.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0002.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0003.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0004.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0005.h | 1 + drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 1 + drivers/gpu/drm/nouveau/include/nvif/notify.h | 1 + drivers/gpu/drm/nouveau/include/nvif/object.h | 1 + drivers/gpu/drm/nouveau/include/nvif/os.h | 1 + drivers/gpu/drm/nouveau/include/nvif/unpack.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/debug.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/enum.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/event.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/ioctl.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/mm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/notify.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/oproxy.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/option.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/pci.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/ramht.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/cipher.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 1 + 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/engine/gr.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/msenc.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/mspdec.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/msppp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/msvld.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/nvdec.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/nvenc.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/sec.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/sw.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/vic.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0203.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0205.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0209.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/P0260.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bit.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bmp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dp.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/extdev.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/i2c.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/image.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/mxm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/npde.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pcir.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pll.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pmu.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/power_budget.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/rammap.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/therm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/vga.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h | 1 + drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 + drivers/gpu/drm/nouveau/nouveau_acpi.c | 1 + drivers/gpu/drm/nouveau/nouveau_acpi.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 1 + drivers/gpu/drm/nouveau/nouveau_chan.h | 1 + drivers/gpu/drm/nouveau/nouveau_debugfs.h | 1 + drivers/gpu/drm/nouveau/nouveau_display.h | 1 + drivers/gpu/drm/nouveau/nouveau_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_fence.h | 1 + drivers/gpu/drm/nouveau/nouveau_gem.h | 1 + drivers/gpu/drm/nouveau/nouveau_ioctl.h | 1 + drivers/gpu/drm/nouveau/nouveau_reg.h | 1 + drivers/gpu/drm/nouveau/nouveau_sgdma.c | 1 + drivers/gpu/drm/nouveau/nouveau_ttm.h | 1 + drivers/gpu/drm/nouveau/nouveau_usif.h | 1 + drivers/gpu/drm/nouveau/nouveau_vga.c | 1 + drivers/gpu/drm/nouveau/nouveau_vga.h | 1 + drivers/gpu/drm/nouveau/nv10_fence.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/dma/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/dma/user.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/regsnv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c | 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/gr/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/mpeg/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/mspdec/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/msppp/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/msvld/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/nvdec/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/g98.fuc0s.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/pll.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/seq.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramseq.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/regsnv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fuse/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ibus/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mxm/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/os.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/timer/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/timer/regsnv04.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h | 1 + drivers/gpu/drm/omapdrm/Makefile | 1 + drivers/gpu/drm/omapdrm/displays/Makefile | 1 + drivers/gpu/drm/omapdrm/dss/Makefile | 1 + drivers/gpu/drm/omapdrm/dss/hdmi_common.c | 1 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/pl111/Makefile | 1 + drivers/gpu/drm/radeon/Makefile | 1 + drivers/gpu/drm/radeon/mkregtable.c | 1 + drivers/gpu/drm/radeon/r100_track.h | 1 + drivers/gpu/drm/radeon/radeon_dp_mst.c | 1 + drivers/gpu/drm/radeon/radeon_legacy_tv.c | 1 + drivers/gpu/drm/radeon/radeon_trace.h | 1 + drivers/gpu/drm/radeon/radeon_trace_points.c | 1 + drivers/gpu/drm/rcar-du/Makefile | 1 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/shmobile/Makefile | 1 + drivers/gpu/drm/sti/Makefile | 1 + drivers/gpu/drm/sun4i/Makefile | 1 + drivers/gpu/drm/tegra/Makefile | 1 + drivers/gpu/drm/tilcdc/Makefile | 1 + drivers/gpu/drm/ttm/Makefile | 1 + drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/virtio/Makefile | 1 + drivers/gpu/drm/vmwgfx/Makefile | 1 + drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h | 1 + drivers/gpu/drm/zte/Makefile | 1 + drivers/gpu/host1x/Makefile | 1 + drivers/gpu/ipu-v3/Makefile | 1 + drivers/hid/Makefile | 1 + drivers/hid/hid-lg.h | 1 + drivers/hid/hid-lg4ff.h | 1 + drivers/hid/intel-ish-hid/Makefile | 1 + drivers/hid/usbhid/Makefile | 1 + drivers/hsi/Makefile | 1 + drivers/hv/Makefile | 1 + drivers/hwmon/Makefile | 1 + drivers/hwmon/adt7x10.h | 1 + drivers/hwmon/pmbus/Makefile | 1 + drivers/hwspinlock/Makefile | 1 + drivers/hwtracing/coresight/Makefile | 1 + drivers/hwtracing/intel_th/Makefile | 1 + drivers/hwtracing/stm/Makefile | 1 + drivers/i2c/Makefile | 1 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-octeon-core.h | 1 + drivers/i2c/muxes/Makefile | 1 + drivers/ide/Makefile | 1 + drivers/ide/ide-acpi.c | 1 + drivers/ide/ide-cd.h | 1 + drivers/ide/ide-cd_ioctl.c | 1 + drivers/ide/ide-cd_verbose.c | 1 + drivers/ide/ide-devsets.c | 1 + drivers/ide/ide-disk.c | 1 + drivers/ide/ide-disk.h | 1 + drivers/ide/ide-disk_ioctl.c | 1 + drivers/ide/ide-disk_proc.c | 1 + drivers/ide/ide-floppy.c | 1 + drivers/ide/ide-floppy.h | 1 + drivers/ide/ide-floppy_ioctl.c | 1 + drivers/ide/ide-floppy_proc.c | 1 + drivers/ide/ide-gd.h | 1 + drivers/ide/ide-park.c | 1 + drivers/ide/ide-pio-blacklist.c | 1 + drivers/ide/ide-pm.c | 1 + drivers/ide/ide-sysfs.c | 1 + drivers/ide/qd65xx.h | 1 + drivers/iio/Makefile | 1 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/bmc150-accel.h | 1 + drivers/iio/accel/kxsd9-i2c.c | 1 + drivers/iio/accel/kxsd9.h | 1 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/qcom-vadc-common.c | 1 + drivers/iio/adc/qcom-vadc-common.h | 1 + drivers/iio/buffer/Makefile | 1 + drivers/iio/common/Makefile | 1 + drivers/iio/common/ssp_sensors/ssp_iio_sensor.h | 1 + drivers/iio/common/st_sensors/Makefile | 1 + drivers/iio/common/st_sensors/st_sensors_core.h | 1 + drivers/iio/dac/Makefile | 1 + drivers/iio/dummy/Makefile | 1 + drivers/iio/dummy/iio_dummy_evgen.h | 1 + drivers/iio/gyro/Makefile | 1 + drivers/iio/gyro/bmg160.h | 1 + drivers/iio/gyro/mpu3050.h | 1 + drivers/iio/humidity/Makefile | 1 + drivers/iio/imu/Makefile | 1 + drivers/iio/imu/adis16400_buffer.c | 1 + drivers/iio/imu/bmi160/bmi160.h | 1 + drivers/iio/imu/inv_mpu6050/Makefile | 1 + drivers/iio/light/Makefile | 1 + drivers/iio/magnetometer/Makefile | 1 + drivers/iio/magnetometer/bmc150_magn.h | 1 + drivers/iio/potentiometer/Makefile | 1 + drivers/iio/pressure/Makefile | 1 + drivers/iio/pressure/bmp280-regmap.c | 1 + drivers/iio/pressure/bmp280.h | 1 + drivers/iio/proximity/Makefile | 1 + drivers/iio/temperature/Makefile | 1 + drivers/iio/trigger/Makefile | 1 + drivers/infiniband/core/Makefile | 1 + drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/bnxt_re/Makefile | 1 + drivers/infiniband/hw/cxgb3/Makefile | 1 + drivers/infiniband/hw/hfi1/Makefile | 1 + drivers/infiniband/hw/i40iw/Makefile | 1 + drivers/infiniband/hw/mthca/Makefile | 1 + drivers/infiniband/hw/qib/Makefile | 1 + drivers/infiniband/hw/usnic/Makefile | 1 + drivers/infiniband/sw/rxe/Makefile | 1 + drivers/infiniband/ulp/Makefile | 1 + drivers/infiniband/ulp/ipoib/Makefile | 1 + drivers/infiniband/ulp/isert/ib_isert.h | 1 + drivers/input/Makefile | 1 + drivers/input/gameport/Makefile | 1 + drivers/input/joystick/Makefile | 1 + drivers/input/keyboard/Makefile | 1 + drivers/input/misc/Makefile | 1 + drivers/input/mouse/Makefile | 1 + drivers/input/mouse/byd.h | 1 + drivers/input/mouse/cypress_ps2.h | 1 + drivers/input/mouse/hgpk.h | 1 + drivers/input/mouse/psmouse.h | 1 + drivers/input/rmi4/Makefile | 1 + drivers/input/serio/Makefile | 1 + drivers/input/serio/i8042-sparcio.h | 1 + drivers/input/tablet/Makefile | 1 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/tsc200x-core.h | 1 + drivers/iommu/Makefile | 1 + drivers/iommu/intel_irq_remapping.c | 1 + drivers/iommu/io-pgtable.h | 1 + drivers/iommu/iommu-traces.c | 1 + drivers/iommu/s390-iommu.c | 1 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-ftintc010.c | 1 + drivers/irqchip/irq-gic-realview.c | 1 + drivers/irqchip/irq-imgpdc.c | 1 + drivers/irqchip/irq-metag-ext.c | 1 + drivers/irqchip/irq-metag.c | 1 + drivers/irqchip/irq-mvebu-gicp.h | 1 + drivers/irqchip/irq-renesas-h8300h.c | 1 + drivers/irqchip/irq-renesas-h8s.c | 1 + drivers/irqchip/irq-versatile-fpga.c | 1 + drivers/isdn/Makefile | 1 + drivers/isdn/capi/Makefile | 1 + drivers/isdn/capi/capilib.c | 1 + drivers/isdn/gigaset/Makefile | 1 + drivers/isdn/hardware/avm/Makefile | 1 + drivers/isdn/hardware/eicon/Makefile | 1 + drivers/isdn/hardware/eicon/adapter.h | 1 + drivers/isdn/hardware/eicon/debug.c | 1 + drivers/isdn/hardware/eicon/diva.c | 1 + drivers/isdn/hardware/eicon/diva.h | 1 + drivers/isdn/hardware/eicon/diva_pci.h | 1 + drivers/isdn/hardware/eicon/dqueue.h | 1 + drivers/isdn/hardware/eicon/dsp_tst.h | 1 + drivers/isdn/hardware/eicon/entity.h | 1 + drivers/isdn/hardware/eicon/os_4bri.c | 1 + drivers/isdn/hardware/eicon/os_4bri.h | 1 + drivers/isdn/hardware/eicon/os_bri.c | 1 + drivers/isdn/hardware/eicon/os_bri.h | 1 + drivers/isdn/hardware/eicon/os_pri.c | 1 + drivers/isdn/hardware/eicon/os_pri.h | 1 + drivers/isdn/hardware/eicon/um_idi.c | 1 + drivers/isdn/hardware/eicon/um_idi.h | 1 + drivers/isdn/hardware/eicon/um_xdi.h | 1 + drivers/isdn/hardware/eicon/xdi_adapter.h | 1 + drivers/isdn/hardware/eicon/xdi_msg.h | 1 + drivers/isdn/hardware/mISDN/Makefile | 1 + drivers/isdn/hardware/mISDN/hfc_multi.h | 1 + drivers/isdn/hardware/mISDN/hfc_multi_8xx.h | 1 + drivers/isdn/hardware/mISDN/hfcsusb.h | 1 + drivers/isdn/hisax/Makefile | 1 + drivers/isdn/hisax/hfc4s8s_l1.h | 1 + drivers/isdn/hisax/hfc_usb.h | 1 + drivers/isdn/hisax/hisax_fcpcipnp.h | 1 + drivers/isdn/hisax/hisax_isac.h | 1 + drivers/isdn/i4l/Makefile | 1 + drivers/isdn/mISDN/Makefile | 1 + drivers/isdn/mISDN/dsp_hwec.h | 1 + drivers/isdn/mISDN/l1oip.h | 1 + drivers/leds/Makefile | 1 + drivers/leds/trigger/Makefile | 1 + drivers/lightnvm/Makefile | 1 + drivers/macintosh/Makefile | 1 + drivers/macintosh/adb-iop.c | 1 + drivers/macintosh/adb.c | 1 + drivers/macintosh/adbhid.c | 1 + drivers/macintosh/ams/ams.h | 1 + drivers/macintosh/ans-lcd.c | 1 + drivers/macintosh/ans-lcd.h | 1 + drivers/macintosh/macio-adb.c | 1 + drivers/macintosh/macio_sysfs.c | 1 + drivers/macintosh/via-cuda.c | 1 + drivers/macintosh/via-macii.c | 1 + drivers/macintosh/via-pmu-backlight.c | 1 + drivers/macintosh/via-pmu-event.h | 1 + drivers/macintosh/via-pmu.c | 1 + drivers/macintosh/via-pmu68k.c | 1 + drivers/mailbox/Makefile | 1 + drivers/mcb/Makefile | 1 + drivers/mcb/mcb-internal.h | 1 + drivers/md/Makefile | 1 + drivers/md/bcache/Makefile | 1 + drivers/md/bcache/alloc.c | 1 + drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/bset.c | 1 + drivers/md/bcache/bset.h | 1 + drivers/md/bcache/btree.c | 1 + drivers/md/bcache/btree.h | 1 + drivers/md/bcache/closure.h | 1 + drivers/md/bcache/debug.c | 1 + drivers/md/bcache/debug.h | 1 + drivers/md/bcache/extents.c | 1 + drivers/md/bcache/extents.h | 1 + drivers/md/bcache/io.c | 1 + drivers/md/bcache/journal.c | 1 + drivers/md/bcache/journal.h | 1 + drivers/md/bcache/movinggc.c | 1 + drivers/md/bcache/request.c | 1 + drivers/md/bcache/request.h | 1 + drivers/md/bcache/stats.c | 1 + drivers/md/bcache/stats.h | 1 + drivers/md/bcache/sysfs.c | 1 + drivers/md/bcache/sysfs.h | 1 + drivers/md/bcache/trace.c | 1 + drivers/md/bcache/util.h | 1 + drivers/md/bcache/writeback.c | 1 + drivers/md/bcache/writeback.h | 1 + drivers/md/bitmap.h | 1 + drivers/md/dm-builtin.c | 1 + drivers/md/dm-stats.c | 1 + drivers/md/dm-stats.h | 1 + drivers/md/linear.h | 1 + drivers/md/md-cluster.h | 1 + drivers/md/multipath.h | 1 + drivers/md/persistent-data/Makefile | 1 + drivers/md/raid0.h | 1 + drivers/md/raid1-10.c | 1 + drivers/md/raid1.h | 1 + drivers/md/raid10.h | 1 + drivers/md/raid5-log.h | 1 + drivers/md/raid5.h | 1 + drivers/media/Makefile | 1 + drivers/media/cec/Makefile | 1 + drivers/media/common/b2c2/Makefile | 1 + drivers/media/common/b2c2/flexcop-common.h | 1 + drivers/media/common/b2c2/flexcop-eeprom.c | 1 + drivers/media/common/b2c2/flexcop-fe-tuner.c | 1 + drivers/media/common/b2c2/flexcop-hw-filter.c | 1 + drivers/media/common/b2c2/flexcop-i2c.c | 1 + drivers/media/common/b2c2/flexcop-misc.c | 1 + drivers/media/common/b2c2/flexcop-reg.h | 1 + drivers/media/common/b2c2/flexcop-sram.c | 1 + drivers/media/common/b2c2/flexcop.h | 1 + drivers/media/common/b2c2/flexcop_ibi_value_be.h | 1 + drivers/media/common/b2c2/flexcop_ibi_value_le.h | 1 + drivers/media/common/btcx-risc.h | 1 + drivers/media/common/cypress_firmware.h | 1 + drivers/media/common/saa7146/saa7146_i2c.c | 1 + drivers/media/common/saa7146/saa7146_vbi.c | 1 + drivers/media/common/siano/Makefile | 1 + drivers/media/dvb-core/Makefile | 1 + drivers/media/dvb-core/dvb-usb-ids.h | 1 + drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/dib7000m.h | 1 + drivers/media/dvb-frontends/dib7000p.h | 1 + drivers/media/dvb-frontends/dib8000.h | 1 + drivers/media/dvb-frontends/dib9000.h | 1 + drivers/media/dvb-frontends/dibx000_common.h | 1 + drivers/media/dvb-frontends/drxk.h | 1 + drivers/media/dvb-frontends/drxk_hard.h | 1 + drivers/media/dvb-frontends/drxk_map.h | 1 + drivers/media/dvb-frontends/dvb-pll.h | 1 + drivers/media/dvb-frontends/nxt6000_priv.h | 1 + drivers/media/dvb-frontends/si21xx.h | 1 + drivers/media/dvb-frontends/sp887x.h | 1 + drivers/media/dvb-frontends/tda18271c2dd.h | 1 + drivers/media/dvb-frontends/tda18271c2dd_maps.h | 1 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/msp3400-driver.h | 1 + drivers/media/i2c/soc_camera/Makefile | 1 + drivers/media/i2c/tea6415c.h | 1 + drivers/media/i2c/tea6420.h | 1 + drivers/media/mmc/Makefile | 1 + drivers/media/pci/Makefile | 1 + drivers/media/pci/b2c2/Makefile | 1 + drivers/media/pci/b2c2/flexcop-dma.c | 1 + drivers/media/pci/bt8xx/Makefile | 1 + drivers/media/pci/bt8xx/btcx-risc.h | 1 + drivers/media/pci/bt8xx/bttv.h | 1 + drivers/media/pci/bt8xx/dst_priv.h | 1 + drivers/media/pci/cx18/Makefile | 1 + drivers/media/pci/cx23885/Makefile | 1 + drivers/media/pci/cx23885/cx23885-f300.h | 1 + drivers/media/pci/cx25821/Makefile | 1 + drivers/media/pci/cx88/Makefile | 1 + drivers/media/pci/cx88/cx88-vbi.c | 1 + drivers/media/pci/ddbridge/Makefile | 1 + drivers/media/pci/ivtv/Makefile | 1 + drivers/media/pci/mantis/Makefile | 1 + drivers/media/pci/netup_unidvb/Makefile | 1 + drivers/media/pci/ngene/Makefile | 1 + drivers/media/pci/pt3/Makefile | 1 + drivers/media/pci/saa7134/Makefile | 1 + drivers/media/pci/saa7134/saa7134-reg.h | 1 + drivers/media/pci/saa7164/Makefile | 1 + drivers/media/pci/smipcie/Makefile | 1 + drivers/media/pci/ttpci/Makefile | 1 + drivers/media/pci/ttpci/av7110.h | 1 + drivers/media/pci/ttpci/av7110_av.h | 1 + drivers/media/pci/ttpci/av7110_ca.h | 1 + drivers/media/pci/ttpci/av7110_hw.h | 1 + drivers/media/pci/ttpci/av7110_ipack.c | 1 + drivers/media/pci/ttpci/av7110_ipack.h | 1 + drivers/media/pci/ttpci/budget.h | 1 + drivers/media/pci/ttpci/dvb_filter.c | 1 + drivers/media/pci/tw5864/tw5864-util.c | 1 + drivers/media/pci/tw686x/tw686x-regs.h | 1 + drivers/media/pci/zoran/Makefile | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/atmel/atmel-isc-regs.h | 1 + drivers/media/platform/coda/trace.h | 1 + drivers/media/platform/davinci/Makefile | 1 + drivers/media/platform/exynos4-is/Makefile | 1 + drivers/media/platform/marvell-ccic/mcam-core.c | 1 + drivers/media/platform/marvell-ccic/mcam-core.h | 1 + drivers/media/platform/mtk-mdp/Makefile | 1 + drivers/media/platform/mtk-vcodec/Makefile | 1 + drivers/media/platform/omap3isp/Makefile | 1 + drivers/media/platform/qcom/venus/Makefile | 1 + drivers/media/platform/s5p-mfc/Makefile | 1 + drivers/media/platform/sti/c8sectpfe/Makefile | 1 + drivers/media/platform/ti-vpe/Makefile | 1 + drivers/media/platform/via-camera.h | 1 + drivers/media/platform/vimc/Makefile | 1 + drivers/media/platform/vivid/Makefile | 1 + drivers/media/platform/vsp1/Makefile | 1 + drivers/media/radio/Makefile | 1 + drivers/media/radio/lm7000.h | 1 + drivers/media/rc/Makefile | 1 + drivers/media/rc/img-ir/Makefile | 1 + drivers/media/rc/keymaps/Makefile | 1 + drivers/media/tuners/Makefile | 1 + drivers/media/tuners/fc0011.h | 1 + drivers/media/tuners/mt2063.h | 1 + drivers/media/usb/Makefile | 1 + drivers/media/usb/as102/Makefile | 1 + drivers/media/usb/au0828/Makefile | 1 + drivers/media/usb/b2c2/flexcop-usb.h | 1 + drivers/media/usb/cx231xx/Makefile | 1 + drivers/media/usb/dvb-usb-v2/Makefile | 1 + drivers/media/usb/dvb-usb-v2/gl861.h | 1 + drivers/media/usb/dvb-usb-v2/usb_urb.c | 1 + drivers/media/usb/dvb-usb/Makefile | 1 + drivers/media/usb/dvb-usb/af9005-script.h | 1 + drivers/media/usb/dvb-usb/az6027.h | 1 + drivers/media/usb/dvb-usb/cxusb.h | 1 + drivers/media/usb/dvb-usb/dib07x0.h | 1 + drivers/media/usb/dvb-usb/digitv.h | 1 + drivers/media/usb/dvb-usb/dvb-usb-common.h | 1 + drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 1 + drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 1 + drivers/media/usb/dvb-usb/dvb-usb-i2c.c | 1 + drivers/media/usb/dvb-usb/dvb-usb-remote.c | 1 + drivers/media/usb/dvb-usb/dvb-usb-urb.c | 1 + drivers/media/usb/dvb-usb/dvb-usb.h | 1 + drivers/media/usb/dvb-usb/dw2102.h | 1 + drivers/media/usb/dvb-usb/m920x.h | 1 + drivers/media/usb/dvb-usb/usb-urb.c | 1 + drivers/media/usb/dvb-usb/vp702x.h | 1 + drivers/media/usb/em28xx/Makefile | 1 + drivers/media/usb/em28xx/em28xx-reg.h | 1 + drivers/media/usb/go7007/Makefile | 1 + drivers/media/usb/gspca/Makefile | 1 + drivers/media/usb/gspca/gl860/Makefile | 1 + drivers/media/usb/gspca/gspca.h | 1 + drivers/media/usb/gspca/m5602/Makefile | 1 + drivers/media/usb/gspca/stv06xx/Makefile | 1 + drivers/media/usb/pvrusb2/Makefile | 1 + drivers/media/usb/pvrusb2/pvrusb2-dvb.h | 1 + drivers/media/usb/pwc/pwc-nala.h | 1 + drivers/media/usb/stk1160/Makefile | 1 + drivers/media/usb/tm6000/Makefile | 1 + drivers/media/usb/usbvision/usbvision-cards.h | 1 + drivers/media/usb/uvc/Makefile | 1 + drivers/media/usb/uvc/uvcvideo.h | 1 + drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-trace.c | 1 + drivers/media/v4l2-core/vb2-trace.c | 1 + drivers/memory/Makefile | 1 + drivers/memory/tegra/Makefile | 1 + drivers/memstick/host/Makefile | 1 + drivers/message/fusion/Makefile | 1 + drivers/message/fusion/lsi/mpi.h | 1 + drivers/message/fusion/lsi/mpi_cnfg.h | 1 + drivers/message/fusion/lsi/mpi_fc.h | 1 + drivers/message/fusion/lsi/mpi_init.h | 1 + drivers/message/fusion/lsi/mpi_ioc.h | 1 + drivers/message/fusion/lsi/mpi_lan.h | 1 + drivers/message/fusion/lsi/mpi_log_fc.h | 1 + drivers/message/fusion/lsi/mpi_log_sas.h | 1 + drivers/message/fusion/lsi/mpi_raid.h | 1 + drivers/message/fusion/lsi/mpi_sas.h | 1 + drivers/message/fusion/lsi/mpi_targ.h | 1 + drivers/message/fusion/lsi/mpi_tool.h | 1 + drivers/message/fusion/lsi/mpi_type.h | 1 + drivers/message/fusion/mptdebug.h | 1 + drivers/mfd/Makefile | 1 + drivers/mfd/twl-core.h | 1 + drivers/misc/Makefile | 1 + drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/flash.c | 1 + drivers/misc/eeprom/Makefile | 1 + drivers/misc/ibmasm/Makefile | 1 + drivers/misc/lkdtm.h | 1 + drivers/misc/lkdtm_bugs.c | 1 + drivers/misc/lkdtm_heap.c | 1 + drivers/misc/lkdtm_perms.c | 1 + drivers/misc/lkdtm_rodata.c | 1 + drivers/misc/lkdtm_usercopy.c | 1 + drivers/misc/mei/Makefile | 1 + drivers/misc/mic/Makefile | 1 + drivers/misc/mic/card/Makefile | 1 + drivers/misc/mic/cosm/Makefile | 1 + drivers/misc/mic/host/Makefile | 1 + drivers/misc/mic/scif/Makefile | 1 + drivers/misc/sgi-xp/Makefile | 1 + drivers/mmc/core/Makefile | 1 + drivers/mmc/core/block.h | 1 + drivers/mmc/core/queue.h | 1 + drivers/mmc/core/quirks.h | 1 + drivers/mmc/core/sd.h | 1 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/dw_mmc-zx.h | 1 + drivers/mmc/host/pxamci.h | 1 + drivers/mmc/host/sdhci-pci.h | 1 + drivers/mtd/Makefile | 1 + drivers/mtd/chips/Makefile | 1 + drivers/mtd/chips/fwh_lock.h | 1 + drivers/mtd/devices/Makefile | 1 + drivers/mtd/devices/bcm47xxsflash.h | 1 + drivers/mtd/maps/Makefile | 1 + drivers/mtd/maps/physmap_of_gemini.c | 1 + drivers/mtd/maps/physmap_of_gemini.h | 1 + drivers/mtd/maps/physmap_of_versatile.h | 1 + drivers/mtd/maps/tsunami_flash.c | 1 + drivers/mtd/mtdcore.h | 1 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h | 1 + drivers/mtd/nand/brcmnand/Makefile | 1 + drivers/mtd/onenand/Makefile | 1 + drivers/mtd/onenand/onenand_bbt.c | 1 + drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/tests/Makefile | 1 + drivers/mtd/tests/mtd_test.c | 1 + drivers/mtd/tests/mtd_test.h | 1 + drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/wl.h | 1 + drivers/net/Makefile | 1 + drivers/net/appletalk/cops.h | 1 + drivers/net/appletalk/ipddp.h | 1 + drivers/net/appletalk/ltpc.h | 1 + drivers/net/arcnet/Makefile | 1 + drivers/net/arcnet/com9026.h | 1 + drivers/net/bonding/bond_debugfs.c | 1 + drivers/net/bonding/bond_procfs.c | 1 + drivers/net/caif/Makefile | 1 + drivers/net/can/Makefile | 1 + drivers/net/can/sja1000/Makefile | 1 + drivers/net/can/softing/softing.h | 1 + drivers/net/can/softing/softing_platform.h | 1 + drivers/net/can/usb/Makefile | 1 + drivers/net/cris/eth_v10.c | 1 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/b53/Makefile | 1 + drivers/net/dsa/dsa_loop.h | 1 + drivers/net/dsa/lan9303.h | 1 + drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/ethernet/3com/Makefile | 1 + drivers/net/ethernet/8390/Makefile | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/aeroflex/greth.h | 1 + drivers/net/ethernet/alacritech/slic.h | 1 + drivers/net/ethernet/alteon/acenic.h | 1 + drivers/net/ethernet/amd/7990.h | 1 + drivers/net/ethernet/amd/Makefile | 1 + drivers/net/ethernet/amd/hplance.h | 1 + drivers/net/ethernet/amd/xgbe/Makefile | 1 + drivers/net/ethernet/arc/emac.h | 1 + drivers/net/ethernet/arc/emac_mdio.c | 1 + drivers/net/ethernet/atheros/Makefile | 1 + drivers/net/ethernet/aurora/nb8800.h | 1 + drivers/net/ethernet/broadcom/Makefile | 1 + drivers/net/ethernet/broadcom/b44.h | 1 + drivers/net/ethernet/broadcom/bcm63xx_enet.h | 1 + drivers/net/ethernet/broadcom/bgmac.h | 1 + drivers/net/ethernet/broadcom/tg3.h | 1 + drivers/net/ethernet/cadence/Makefile | 1 + drivers/net/ethernet/cavium/liquidio/Makefile | 1 + drivers/net/ethernet/cavium/thunder/Makefile | 1 + drivers/net/ethernet/chelsio/Makefile | 1 + drivers/net/ethernet/chelsio/cxgb/fpga_defs.h | 1 + drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c | 1 + drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h | 1 + drivers/net/ethernet/chelsio/cxgb/my3126.c | 1 + drivers/net/ethernet/chelsio/cxgb/tp.c | 1 + drivers/net/ethernet/chelsio/cxgb/tp.h | 1 + drivers/net/ethernet/chelsio/cxgb/vsc7326.c | 1 + drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h | 1 + drivers/net/ethernet/chelsio/cxgb3/regs.h | 1 + drivers/net/ethernet/chelsio/cxgb3/sge_defs.h | 1 + drivers/net/ethernet/chelsio/cxgb4/Makefile | 1 + drivers/net/ethernet/cisco/enic/enic_clsf.c | 1 + drivers/net/ethernet/cisco/enic/enic_clsf.h | 1 + drivers/net/ethernet/davicom/dm9000.h | 1 + drivers/net/ethernet/dec/tulip/Makefile | 1 + drivers/net/ethernet/freescale/Makefile | 1 + drivers/net/ethernet/freescale/dpaa/Makefile | 1 + drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fman/Makefile | 1 + drivers/net/ethernet/freescale/fs_enet/Makefile | 1 + drivers/net/ethernet/freescale/fs_enet/fec.h | 1 + drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 + drivers/net/ethernet/hisilicon/Makefile | 1 + drivers/net/ethernet/hisilicon/hns/Makefile | 1 + drivers/net/ethernet/i825xx/Makefile | 1 + drivers/net/ethernet/ibm/emac/Makefile | 1 + drivers/net/ethernet/intel/Makefile | 1 + drivers/net/ethernet/intel/i40evf/i40evf_client.c | 1 + drivers/net/ethernet/intel/i40evf/i40evf_client.h | 1 + drivers/net/ethernet/marvell/Makefile | 1 + drivers/net/ethernet/marvell/skge.h | 1 + drivers/net/ethernet/marvell/sky2.h | 1 + drivers/net/ethernet/mellanox/mlx4/Makefile | 1 + drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 + drivers/net/ethernet/micrel/Makefile | 1 + drivers/net/ethernet/micrel/ks8695net.h | 1 + drivers/net/ethernet/microchip/enc28j60_hw.h | 1 + drivers/net/ethernet/microchip/encx24j600_hw.h | 1 + drivers/net/ethernet/myricom/myri10ge/myri10ge_mcp.h | 1 + drivers/net/ethernet/myricom/myri10ge/myri10ge_mcp_gen_header.h | 1 + drivers/net/ethernet/natsemi/Makefile | 1 + drivers/net/ethernet/natsemi/jazzsonic.c | 1 + drivers/net/ethernet/natsemi/macsonic.c | 1 + drivers/net/ethernet/natsemi/sonic.h | 1 + drivers/net/ethernet/natsemi/xtsonic.c | 1 + drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/qlogic/Makefile | 1 + drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed_selftest.h | 1 + drivers/net/ethernet/qlogic/qlcnic/Makefile | 1 + drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 1 + drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c | 1 + drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 + drivers/net/ethernet/qualcomm/Makefile | 1 + drivers/net/ethernet/realtek/atp.h | 1 + drivers/net/ethernet/seeq/sgiseeq.h | 1 + drivers/net/ethernet/sfc/Makefile | 1 + drivers/net/ethernet/sfc/falcon/Makefile | 1 + drivers/net/ethernet/sis/sis900.h | 1 + drivers/net/ethernet/smsc/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/sun/Makefile | 1 + drivers/net/ethernet/sun/niu.h | 1 + drivers/net/ethernet/sun/sunbmac.h | 1 + drivers/net/ethernet/sun/sungem.h | 1 + drivers/net/ethernet/sun/sunhme.h | 1 + drivers/net/ethernet/sun/sunqe.h | 1 + drivers/net/ethernet/sun/sunvnet_common.h | 1 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/ti/Makefile | 1 + drivers/net/ethernet/tile/Makefile | 1 + drivers/net/ethernet/toshiba/Makefile | 1 + drivers/net/ethernet/xilinx/Makefile | 1 + drivers/net/ethernet/xilinx/ll_temac.h | 1 + drivers/net/ethernet/xilinx/ll_temac_mdio.c | 1 + drivers/net/ethernet/xilinx/xilinx_axienet.h | 1 + drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 1 + drivers/net/fddi/skfp/Makefile | 1 + drivers/net/hamradio/Makefile | 1 + drivers/net/hamradio/z8530.h | 1 + drivers/net/hippi/rrunner.h | 1 + drivers/net/ieee802154/Makefile | 1 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dp83640_reg.h | 1 + drivers/net/phy/mdio-boardinfo.h | 1 + drivers/net/phy/swphy.h | 1 + drivers/net/ppp/Makefile | 1 + drivers/net/ppp/ppp_mppe.h | 1 + drivers/net/slip/slip.h | 1 + drivers/net/team/Makefile | 1 + drivers/net/usb/Makefile | 1 + drivers/net/wan/Makefile | 1 + drivers/net/wan/hd64570.h | 1 + drivers/net/wan/lmc/lmc.h | 1 + drivers/net/wan/lmc/lmc_debug.c | 1 + drivers/net/wan/lmc/lmc_debug.h | 1 + drivers/net/wan/lmc/lmc_proto.h | 1 + drivers/net/wan/x25_asy.h | 1 + drivers/net/wan/z85230.h | 1 + drivers/net/wimax/i2400m/Makefile | 1 + drivers/net/wireless/Makefile | 1 + drivers/net/wireless/admtek/adm8211.h | 1 + drivers/net/wireless/ath/Makefile | 1 + drivers/net/wireless/ath/ath10k/Makefile | 1 + drivers/net/wireless/ath/ath5k/Makefile | 1 + drivers/net/wireless/ath/ath5k/sysfs.c | 1 + drivers/net/wireless/ath/ath5k/trace.h | 1 + drivers/net/wireless/ath/ath6kl/trace.h | 1 + drivers/net/wireless/ath/ath9k/Makefile | 1 + drivers/net/wireless/ath/carl9170/version.h | 1 + drivers/net/wireless/ath/wcn36xx/Makefile | 1 + drivers/net/wireless/ath/wil6210/Makefile | 1 + drivers/net/wireless/broadcom/b43/Makefile | 1 + drivers/net/wireless/broadcom/b43/b43.h | 1 + drivers/net/wireless/broadcom/b43/bus.h | 1 + drivers/net/wireless/broadcom/b43/debugfs.h | 1 + drivers/net/wireless/broadcom/b43/dma.h | 1 + drivers/net/wireless/broadcom/b43/leds.h | 1 + drivers/net/wireless/broadcom/b43/lo.h | 1 + drivers/net/wireless/broadcom/b43/phy_a.h | 1 + drivers/net/wireless/broadcom/b43/phy_ac.h | 1 + drivers/net/wireless/broadcom/b43/phy_common.h | 1 + drivers/net/wireless/broadcom/b43/phy_g.h | 1 + drivers/net/wireless/broadcom/b43/phy_ht.h | 1 + drivers/net/wireless/broadcom/b43/phy_lcn.h | 1 + drivers/net/wireless/broadcom/b43/phy_lp.h | 1 + drivers/net/wireless/broadcom/b43/phy_n.h | 1 + drivers/net/wireless/broadcom/b43/pio.h | 1 + drivers/net/wireless/broadcom/b43/ppr.h | 1 + drivers/net/wireless/broadcom/b43/radio_2055.h | 1 + drivers/net/wireless/broadcom/b43/radio_2056.h | 1 + drivers/net/wireless/broadcom/b43/radio_2057.h | 1 + drivers/net/wireless/broadcom/b43/radio_2059.h | 1 + drivers/net/wireless/broadcom/b43/rfkill.h | 1 + drivers/net/wireless/broadcom/b43/sdio.h | 1 + drivers/net/wireless/broadcom/b43/sysfs.h | 1 + drivers/net/wireless/broadcom/b43/tables.h | 1 + drivers/net/wireless/broadcom/b43/tables_lpphy.h | 1 + drivers/net/wireless/broadcom/b43/tables_nphy.h | 1 + drivers/net/wireless/broadcom/b43/tables_phy_ht.h | 1 + drivers/net/wireless/broadcom/b43/tables_phy_lcn.h | 1 + drivers/net/wireless/broadcom/b43/wa.h | 1 + drivers/net/wireless/broadcom/b43/xmit.h | 1 + drivers/net/wireless/broadcom/b43legacy/Makefile | 1 + drivers/net/wireless/broadcom/b43legacy/b43legacy.h | 1 + drivers/net/wireless/broadcom/b43legacy/debugfs.h | 1 + drivers/net/wireless/broadcom/b43legacy/dma.h | 1 + drivers/net/wireless/broadcom/b43legacy/ilt.h | 1 + drivers/net/wireless/broadcom/b43legacy/leds.h | 1 + drivers/net/wireless/broadcom/b43legacy/pio.h | 1 + drivers/net/wireless/broadcom/b43legacy/rfkill.h | 1 + drivers/net/wireless/broadcom/b43legacy/sysfs.h | 1 + drivers/net/wireless/broadcom/b43legacy/xmit.h | 1 + drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c | 1 + drivers/net/wireless/cisco/airo.h | 1 + drivers/net/wireless/intel/ipw2x00/Makefile | 1 + drivers/net/wireless/intel/iwlegacy/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/dvm/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/mvm/Makefile | 1 + drivers/net/wireless/intersil/hostap/Makefile | 1 + drivers/net/wireless/intersil/hostap/hostap.h | 1 + drivers/net/wireless/intersil/hostap/hostap_80211.h | 1 + drivers/net/wireless/intersil/hostap/hostap_80211_rx.c | 1 + drivers/net/wireless/intersil/hostap/hostap_80211_tx.c | 1 + drivers/net/wireless/intersil/hostap/hostap_ap.c | 1 + drivers/net/wireless/intersil/hostap/hostap_ap.h | 1 + drivers/net/wireless/intersil/hostap/hostap_common.h | 1 + drivers/net/wireless/intersil/hostap/hostap_config.h | 1 + drivers/net/wireless/intersil/hostap/hostap_download.c | 1 + drivers/net/wireless/intersil/hostap/hostap_info.c | 1 + drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 1 + drivers/net/wireless/intersil/hostap/hostap_proc.c | 1 + drivers/net/wireless/intersil/hostap/hostap_wlan.h | 1 + drivers/net/wireless/intersil/orinoco/Makefile | 1 + drivers/net/wireless/intersil/p54/Makefile | 1 + drivers/net/wireless/marvell/libertas/Makefile | 1 + drivers/net/wireless/marvell/libertas/cfg.c | 1 + drivers/net/wireless/marvell/libertas/cfg.h | 1 + drivers/net/wireless/marvell/libertas/cmd.h | 1 + drivers/net/wireless/marvell/libertas/cmdresp.c | 1 + drivers/net/wireless/marvell/libertas/debugfs.c | 1 + drivers/net/wireless/marvell/libertas/debugfs.h | 1 + drivers/net/wireless/marvell/libertas/decl.h | 1 + drivers/net/wireless/marvell/libertas/defs.h | 1 + drivers/net/wireless/marvell/libertas/dev.h | 1 + drivers/net/wireless/marvell/libertas/ethtool.c | 1 + drivers/net/wireless/marvell/libertas/host.h | 1 + drivers/net/wireless/marvell/libertas/if_usb.h | 1 + drivers/net/wireless/marvell/libertas/mesh.c | 1 + drivers/net/wireless/marvell/libertas/mesh.h | 1 + drivers/net/wireless/marvell/libertas/radiotap.h | 1 + drivers/net/wireless/marvell/libertas/types.h | 1 + drivers/net/wireless/marvell/libertas_tf/deb_defs.h | 1 + drivers/net/wireless/quantenna/qtnfmac/Makefile | 1 + drivers/net/wireless/ralink/rt2x00/Makefile | 1 + drivers/net/wireless/ray_cs.h | 1 + drivers/net/wireless/rayctl.h | 1 + drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h | 1 + drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.h | 1 + drivers/net/wireless/realtek/rtl818x/rtl8187/rfkill.h | 1 + drivers/net/wireless/realtek/rtlwifi/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8188ee/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192c/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192cu/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192de/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192ee/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8192se/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8723ae/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8723be/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8723com/Makefile | 1 + drivers/net/wireless/realtek/rtlwifi/rtl8821ae/Makefile | 1 + drivers/net/wireless/rsi/Makefile | 1 + drivers/net/wireless/st/cw1200/Makefile | 1 + drivers/net/wireless/ti/Makefile | 1 + drivers/net/wireless/ti/wl1251/Makefile | 1 + drivers/net/wireless/ti/wl1251/acx.c | 1 + drivers/net/wireless/ti/wl1251/cmd.c | 1 + drivers/net/wireless/ti/wl1251/wl12xx_80211.h | 1 + drivers/net/wireless/ti/wlcore/Makefile | 1 + drivers/net/wireless/ti/wlcore/wl12xx_80211.h | 1 + drivers/net/wireless/wl3501.h | 1 + drivers/net/wireless/zydas/zd1211rw/Makefile | 1 + drivers/nfc/Makefile | 1 + drivers/nfc/mei_phy.h | 1 + drivers/nfc/microread/Makefile | 1 + drivers/nfc/nfcmrvl/Makefile | 1 + drivers/nfc/st-nci/Makefile | 1 + drivers/nubus/nubus.c | 1 + drivers/nubus/proc.c | 1 + drivers/nvdimm/Makefile | 1 + drivers/nvdimm/pmem.h | 1 + drivers/nvme/host/Makefile | 1 + drivers/nvme/target/Makefile | 1 + drivers/nvmem/Makefile | 1 + drivers/of/Makefile | 1 + drivers/of/unittest-data/Makefile | 1 + drivers/of/unittest-data/overlay.dts | 1 + drivers/of/unittest-data/overlay_bad_phandle.dts | 1 + drivers/of/unittest-data/overlay_base.dts | 1 + drivers/of/unittest-data/testcases.dts | 1 + drivers/of/unittest-data/tests-interrupts.dtsi | 1 + drivers/of/unittest-data/tests-match.dtsi | 1 + drivers/of/unittest-data/tests-overlay.dtsi | 1 + drivers/of/unittest-data/tests-phandle.dtsi | 1 + drivers/of/unittest-data/tests-platform.dtsi | 1 + drivers/of/unittest.c | 1 + drivers/oprofile/nmi_timer_int.c | 1 + drivers/oprofile/oprofile_perf.c | 1 + drivers/parisc/Makefile | 1 + drivers/parisc/iommu-helpers.h | 1 + drivers/parport/Makefile | 1 + drivers/parport/ieee1284_ops.c | 1 + drivers/parport/multiface.h | 1 + drivers/parport/probe.c | 1 + drivers/parport/procfs.c | 1 + drivers/pci/Makefile | 1 + drivers/pci/dwc/Makefile | 1 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-ftpci100.c | 1 + drivers/pci/host/pcie-tango.c | 1 + drivers/pci/hotplug/Makefile | 1 + drivers/pci/htirq.c | 1 + drivers/pci/irq.c | 1 + drivers/pci/pci-label.c | 1 + drivers/pci/pci-sysfs.c | 1 + drivers/pci/pci.h | 1 + drivers/pci/pcie/Makefile | 1 + drivers/pci/pcie/aer/Makefile | 1 + drivers/pci/pcie/aer/aerdrv.h | 1 + drivers/pci/pcie/aer/aerdrv_acpi.c | 1 + drivers/pci/pcie/aspm.c | 1 + drivers/pci/pcie/portdrv.h | 1 + drivers/pci/pcie/portdrv_core.c | 1 + drivers/pci/pcie/portdrv_pci.c | 1 + drivers/pci/proc.c | 1 + drivers/pci/quirks.c | 1 + drivers/pci/setup-res.c | 1 + drivers/pci/syscall.c | 1 + drivers/pcmcia/Makefile | 1 + drivers/pcmcia/bcm63xx_pcmcia.h | 1 + drivers/pcmcia/i82092aa.h | 1 + drivers/pcmcia/m32r_cfc.h | 1 + drivers/pcmcia/m32r_pcc.h | 1 + drivers/pcmcia/pd6729.h | 1 + drivers/pcmcia/sa1100_assabet.c | 1 + drivers/pcmcia/sa1100_cerf.c | 1 + drivers/pcmcia/sa1100_generic.h | 1 + drivers/pcmcia/sa1100_h3600.c | 1 + drivers/pcmcia/sa1100_shannon.c | 1 + drivers/pcmcia/sa1100_simpad.c | 1 + drivers/pcmcia/sa1111_generic.h | 1 + drivers/pcmcia/sa1111_jornada720.c | 1 + drivers/pcmcia/sa1111_neponset.c | 1 + drivers/pcmcia/soc_common.h | 1 + drivers/pcmcia/yenta_socket.h | 1 + drivers/perf/Makefile | 1 + drivers/perf/arm_pmu_platform.c | 1 + drivers/phy/Makefile | 1 + drivers/phy/broadcom/Makefile | 1 + drivers/phy/marvell/Makefile | 1 + drivers/phy/qualcomm/Makefile | 1 + drivers/phy/rockchip/Makefile | 1 + drivers/phy/samsung/Makefile | 1 + drivers/phy/ti/Makefile | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/bcm/Makefile | 1 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/mediatek/Makefile | 1 + drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h | 1 + drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h | 1 + drivers/pinctrl/mvebu/Makefile | 1 + drivers/pinctrl/nomadik/Makefile | 1 + drivers/pinctrl/nomadik/pinctrl-abx500.h | 1 + drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c | 1 + drivers/pinctrl/nomadik/pinctrl-nomadik-db8540.c | 1 + drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c | 1 + drivers/pinctrl/nomadik/pinctrl-nomadik.h | 1 + drivers/pinctrl/pinctrl-coh901.h | 1 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/samsung/Makefile | 1 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/pfc-sh7722.c | 1 + drivers/pinctrl/spear/Makefile | 1 + drivers/pinctrl/stm32/Makefile | 1 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/tegra/Makefile | 1 + drivers/pinctrl/uniphier/Makefile | 1 + drivers/pinctrl/vt8500/Makefile | 1 + drivers/platform/Makefile | 1 + drivers/platform/chrome/Makefile | 1 + drivers/platform/x86/Makefile | 1 + drivers/pnp/Makefile | 1 + drivers/pnp/base.h | 1 + drivers/pnp/card.c | 1 + drivers/pnp/core.c | 1 + drivers/pnp/driver.c | 1 + drivers/pnp/interface.c | 1 + drivers/pnp/isapnp/compat.c | 1 + drivers/pnp/manager.c | 1 + drivers/pnp/pnpacpi/pnpacpi.h | 1 + drivers/pnp/pnpbios/bioscalls.c | 1 + drivers/pnp/pnpbios/proc.c | 1 + drivers/pnp/pnpbios/rsparser.c | 1 + drivers/pnp/quirks.c | 1 + drivers/pnp/resource.c | 1 + drivers/pnp/support.c | 1 + drivers/pnp/system.c | 1 + drivers/power/reset/Makefile | 1 + drivers/power/reset/gemini-poweroff.c | 1 + drivers/power/supply/Makefile | 1 + drivers/power/supply/ab8500_bmdata.c | 1 + drivers/ptp/Makefile | 1 + drivers/pwm/Makefile | 1 + drivers/rapidio/Makefile | 1 + drivers/rapidio/switches/Makefile | 1 + drivers/ras/cec.c | 1 + drivers/ras/debugfs.h | 1 + drivers/ras/ras.c | 1 + drivers/regulator/Makefile | 1 + drivers/regulator/fixed-helper.c | 1 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_common.h | 1 + drivers/remoteproc/qcom_wcnss.h | 1 + drivers/reset/Makefile | 1 + drivers/rpmsg/Makefile | 1 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-core.h | 1 + drivers/rtc/rtc-efi-platform.c | 1 + drivers/rtc/rtc-sa1100.h | 1 + drivers/s390/block/Makefile | 1 + drivers/s390/block/dasd_3990_erp.c | 1 + drivers/s390/block/dasd_alias.c | 1 + drivers/s390/block/dasd_diag.h | 1 + drivers/s390/block/dasd_eckd.h | 1 + drivers/s390/block/dasd_eer.c | 1 + drivers/s390/block/dasd_erp.c | 1 + drivers/s390/block/dasd_fba.h | 1 + drivers/s390/block/dasd_genhd.c | 1 + drivers/s390/block/dasd_int.h | 1 + drivers/s390/block/dasd_ioctl.c | 1 + drivers/s390/block/dasd_proc.c | 1 + drivers/s390/block/scm_blk.h | 1 + drivers/s390/block/scm_drv.c | 1 + drivers/s390/char/Makefile | 1 + drivers/s390/char/con3215.c | 1 + drivers/s390/char/con3270.c | 1 + drivers/s390/char/ctrlchar.c | 1 + drivers/s390/char/ctrlchar.h | 1 + drivers/s390/char/defkeymap.c | 1 + drivers/s390/char/diag_ftp.c | 1 + drivers/s390/char/diag_ftp.h | 1 + drivers/s390/char/hmcdrv_cache.c | 1 + drivers/s390/char/hmcdrv_cache.h | 1 + drivers/s390/char/hmcdrv_dev.c | 1 + drivers/s390/char/hmcdrv_dev.h | 1 + drivers/s390/char/hmcdrv_ftp.c | 1 + drivers/s390/char/hmcdrv_ftp.h | 1 + drivers/s390/char/keyboard.c | 1 + drivers/s390/char/keyboard.h | 1 + drivers/s390/char/raw3270.h | 1 + drivers/s390/char/sclp.c | 1 + drivers/s390/char/sclp.h | 1 + drivers/s390/char/sclp_cmd.c | 1 + drivers/s390/char/sclp_con.c | 1 + drivers/s390/char/sclp_config.c | 1 + drivers/s390/char/sclp_cpi_sys.c | 1 + drivers/s390/char/sclp_cpi_sys.h | 1 + drivers/s390/char/sclp_ctl.c | 1 + drivers/s390/char/sclp_diag.h | 1 + drivers/s390/char/sclp_early.c | 1 + drivers/s390/char/sclp_early_core.c | 1 + drivers/s390/char/sclp_ftp.c | 1 + drivers/s390/char/sclp_ftp.h | 1 + drivers/s390/char/sclp_ocf.c | 1 + drivers/s390/char/sclp_pci.c | 1 + drivers/s390/char/sclp_quiesce.c | 1 + drivers/s390/char/sclp_rw.c | 1 + drivers/s390/char/sclp_rw.h | 1 + drivers/s390/char/sclp_sdias.c | 1 + drivers/s390/char/sclp_sdias.h | 1 + drivers/s390/char/sclp_tty.c | 1 + drivers/s390/char/sclp_tty.h | 1 + drivers/s390/char/sclp_vt220.c | 1 + drivers/s390/char/tape.h | 1 + drivers/s390/char/tape_3590.h | 1 + drivers/s390/char/tape_char.c | 1 + drivers/s390/char/tape_class.h | 1 + drivers/s390/char/tape_proc.c | 1 + drivers/s390/char/tape_std.c | 1 + drivers/s390/char/tape_std.h | 1 + drivers/s390/char/tty3270.h | 1 + drivers/s390/char/vmcp.c | 1 + drivers/s390/char/vmur.h | 1 + drivers/s390/cio/Makefile | 1 + drivers/s390/cio/airq.c | 1 + drivers/s390/cio/blacklist.c | 1 + drivers/s390/cio/ccwreq.c | 1 + drivers/s390/cio/chp.h | 1 + drivers/s390/cio/chsc.h | 1 + drivers/s390/cio/chsc_sch.h | 1 + drivers/s390/cio/cio.h | 1 + drivers/s390/cio/cio_debug.h | 1 + drivers/s390/cio/crw.c | 1 + drivers/s390/cio/css.h | 1 + drivers/s390/cio/device.h | 1 + drivers/s390/cio/device_id.c | 1 + drivers/s390/cio/device_pgid.c | 1 + drivers/s390/cio/device_status.c | 1 + drivers/s390/cio/eadm_sch.h | 1 + drivers/s390/cio/fcx.c | 1 + drivers/s390/cio/idset.c | 1 + drivers/s390/cio/idset.h | 1 + drivers/s390/cio/io_sch.h | 1 + drivers/s390/cio/ioasm.c | 1 + drivers/s390/cio/ioasm.h | 1 + drivers/s390/cio/itcw.c | 1 + drivers/s390/cio/orb.h | 1 + drivers/s390/cio/qdio.h | 1 + drivers/s390/cio/qdio_debug.c | 1 + drivers/s390/cio/qdio_debug.h | 1 + drivers/s390/cio/qdio_thinint.c | 1 + drivers/s390/cio/trace.c | 1 + drivers/s390/cio/trace.h | 1 + drivers/s390/cio/vfio_ccw_cp.c | 1 + drivers/s390/cio/vfio_ccw_cp.h | 1 + drivers/s390/cio/vfio_ccw_fsm.c | 1 + drivers/s390/cio/vfio_ccw_ops.c | 1 + drivers/s390/cio/vfio_ccw_private.h | 1 + drivers/s390/crypto/Makefile | 1 + drivers/s390/crypto/ap_asm.h | 1 + drivers/s390/crypto/ap_card.c | 1 + drivers/s390/crypto/ap_debug.h | 1 + drivers/s390/crypto/ap_queue.c | 1 + drivers/s390/crypto/zcrypt_cex4.h | 1 + drivers/s390/crypto/zcrypt_debug.h | 1 + drivers/s390/net/Makefile | 1 + drivers/s390/net/ctcm_dbug.c | 1 + drivers/s390/net/ctcm_dbug.h | 1 + drivers/s390/net/ctcm_fsms.c | 1 + drivers/s390/net/ctcm_fsms.h | 1 + drivers/s390/net/ctcm_main.h | 1 + drivers/s390/net/ctcm_mpc.c | 1 + drivers/s390/net/ctcm_mpc.h | 1 + drivers/s390/net/ctcm_sysfs.c | 1 + drivers/s390/net/fsm.h | 1 + drivers/s390/net/lcs.h | 1 + drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_mpc.c | 1 + drivers/s390/net/qeth_core_mpc.h | 1 + drivers/s390/net/qeth_l2.h | 1 + drivers/s390/net/qeth_l2_sys.c | 1 + drivers/s390/net/qeth_l3.h | 1 + drivers/s390/net/qeth_l3_sys.c | 1 + drivers/s390/net/smsgiucv.h | 1 + drivers/s390/scsi/zfcp_ccw.c | 1 + drivers/s390/scsi/zfcp_dbf.c | 1 + drivers/s390/scsi/zfcp_dbf.h | 1 + drivers/s390/scsi/zfcp_def.h | 1 + drivers/s390/scsi/zfcp_erp.c | 1 + drivers/s390/scsi/zfcp_ext.h | 1 + drivers/s390/scsi/zfcp_fc.c | 1 + drivers/s390/scsi/zfcp_fc.h | 1 + drivers/s390/scsi/zfcp_fsf.c | 1 + drivers/s390/scsi/zfcp_fsf.h | 1 + drivers/s390/scsi/zfcp_qdio.c | 1 + drivers/s390/scsi/zfcp_qdio.h | 1 + drivers/s390/scsi/zfcp_reqlist.h | 1 + drivers/s390/scsi/zfcp_scsi.c | 1 + drivers/s390/scsi/zfcp_sysfs.c | 1 + drivers/s390/scsi/zfcp_unit.c | 1 + drivers/sbus/char/Makefile | 1 + drivers/sbus/char/bbc_envctrl.c | 1 + drivers/sbus/char/bbc_i2c.h | 1 + drivers/sbus/char/max1617.h | 1 + drivers/scsi/53c700.h | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/NCR5380.c | 1 + drivers/scsi/NCR5380.h | 1 + drivers/scsi/NCR_D700.h | 1 + drivers/scsi/NCR_Q720.h | 1 + drivers/scsi/a2091.h | 1 + drivers/scsi/a3000.h | 1 + drivers/scsi/aha152x.h | 1 + drivers/scsi/aha1542.h | 1 + drivers/scsi/aha1740.h | 1 + drivers/scsi/aic7xxx/Makefile | 1 + drivers/scsi/aic7xxx/aicasm/Makefile | 1 + drivers/scsi/arm/Makefile | 1 + drivers/scsi/atp870u.h | 1 + drivers/scsi/bfa/Makefile | 1 + drivers/scsi/constants.c | 1 + drivers/scsi/csiostor/Makefile | 1 + drivers/scsi/dc395x.h | 1 + drivers/scsi/eata_generic.h | 1 + drivers/scsi/eata_pio.h | 1 + drivers/scsi/esp_scsi.h | 1 + drivers/scsi/fcoe/libfcoe.h | 1 + drivers/scsi/fnic/Makefile | 1 + drivers/scsi/gdth.h | 1 + drivers/scsi/gdth_ioctl.h | 1 + drivers/scsi/gdth_proc.c | 1 + drivers/scsi/gdth_proc.h | 1 + drivers/scsi/gvp11.h | 1 + drivers/scsi/ibmvscsi_tgt/libsrp.h | 1 + drivers/scsi/imm.h | 1 + drivers/scsi/isci/Makefile | 1 + drivers/scsi/libfc/Makefile | 1 + drivers/scsi/mac53c94.h | 1 + drivers/scsi/megaraid.h | 1 + drivers/scsi/megaraid/Makefile | 1 + drivers/scsi/mesh.h | 1 + drivers/scsi/mpt3sas/Makefile | 1 + drivers/scsi/mpt3sas/mpi/mpi2.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_init.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_ioc.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_raid.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_sas.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_tool.h | 1 + drivers/scsi/mpt3sas/mpi/mpi2_type.h | 1 + drivers/scsi/mvme147.c | 1 + drivers/scsi/mvme147.h | 1 + drivers/scsi/osst.h | 1 + drivers/scsi/osst_detect.h | 1 + drivers/scsi/osst_options.h | 1 + drivers/scsi/pcmcia/Makefile | 1 + drivers/scsi/pm8001/Makefile | 1 + drivers/scsi/ppa.h | 1 + drivers/scsi/qla2xxx/Makefile | 1 + drivers/scsi/qla2xxx/qla_devtbl.h | 1 + drivers/scsi/qla2xxx/tcm_qla2xxx.h | 1 + drivers/scsi/qlogicfas408.h | 1 + drivers/scsi/qlogicpti.h | 1 + drivers/scsi/scsi.h | 1 + drivers/scsi/scsi_common.c | 1 + drivers/scsi/scsi_debugfs.c | 1 + drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/scsi_lib_dma.c | 1 + drivers/scsi/scsi_logging.h | 1 + drivers/scsi/scsi_priv.h | 1 + drivers/scsi/scsi_proc.c | 1 + drivers/scsi/scsi_sas_internal.h | 1 + drivers/scsi/scsi_scan.c | 1 + drivers/scsi/scsi_transport_api.h | 1 + drivers/scsi/scsicam.c | 1 + drivers/scsi/sd.h | 1 + drivers/scsi/sense_codes.h | 1 + drivers/scsi/snic/Makefile | 1 + drivers/scsi/sr.h | 1 + drivers/scsi/sr_ioctl.c | 1 + drivers/scsi/sr_vendor.c | 1 + drivers/scsi/st.h | 1 + drivers/scsi/st_options.h | 1 + drivers/scsi/ufs/Makefile | 1 + drivers/scsi/wd719x.h | 1 + drivers/sh/Makefile | 1 + drivers/sh/intc/internals.h | 1 + drivers/soc/Makefile | 1 + drivers/soc/dove/pmu.c | 1 + drivers/soc/fsl/qbman/Makefile | 1 + drivers/soc/fsl/qe/Makefile | 1 + drivers/soc/qcom/Makefile | 1 + drivers/soc/renesas/Makefile | 1 + drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/fuse/Makefile | 1 + drivers/soc/ti/Makefile | 1 + drivers/spi/Makefile | 1 + drivers/spi/spi-bcm53xx.h | 1 + drivers/spi/spi-bitbang-txrx.h | 1 + drivers/spi/spi-cavium.h | 1 + drivers/spi/spi-dw.h | 1 + drivers/ssb/Makefile | 1 + drivers/ssb/ssb_private.h | 1 + drivers/staging/Makefile | 1 + drivers/staging/android/ion/Makefile | 1 + drivers/staging/board/board.h | 1 + drivers/staging/board/kzm9d.c | 1 + drivers/staging/comedi/Makefile | 1 + drivers/staging/comedi/comedi_internal.h | 1 + drivers/staging/comedi/drivers/Makefile | 1 + drivers/staging/comedi/drivers/addi_tcw.h | 1 + drivers/staging/comedi/drivers/addi_watchdog.h | 1 + drivers/staging/comedi/drivers/amcc_s5933.h | 1 + drivers/staging/comedi/drivers/jr3_pci.h | 1 + drivers/staging/comedi/drivers/ni_labpc_isadma.h | 1 + drivers/staging/comedi/drivers/ni_labpc_regs.h | 1 + drivers/staging/comedi/drivers/z8536.h | 1 + drivers/staging/dgnc/dgnc_utils.c | 1 + drivers/staging/dgnc/dgnc_utils.h | 1 + drivers/staging/fbtft/Makefile | 1 + drivers/staging/fbtft/fbtft-bus.c | 1 + drivers/staging/fbtft/fbtft-io.c | 1 + drivers/staging/fbtft/fbtft-sysfs.c | 1 + drivers/staging/fwserial/fwserial.h | 1 + drivers/staging/gdm724x/Makefile | 1 + drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/greybus_id.h | 1 + drivers/staging/greybus/tools/Makefile | 1 + drivers/staging/iio/Makefile | 1 + drivers/staging/iio/adc/Makefile | 1 + drivers/staging/iio/meter/Makefile | 1 + drivers/staging/iio/meter/ade7854.h | 1 + drivers/staging/iio/meter/meter.h | 1 + drivers/staging/iio/trigger/iio-trig-bfin-timer.h | 1 + drivers/staging/ks7010/eap_packet.h | 1 + drivers/staging/lustre/lnet/libcfs/Makefile | 1 + drivers/staging/lustre/lnet/lnet/Makefile | 1 + drivers/staging/lustre/lustre/llite/Makefile | 1 + drivers/staging/lustre/lustre/llite/xattr_cache.c | 1 + drivers/staging/lustre/lustre/lov/Makefile | 1 + drivers/staging/lustre/lustre/obdclass/Makefile | 1 + drivers/staging/lustre/lustre/ptlrpc/Makefile | 1 + drivers/staging/media/Makefile | 1 + drivers/staging/media/atomisp/i2c/Makefile | 1 + drivers/staging/media/atomisp/i2c/imx/Makefile | 1 + drivers/staging/media/atomisp/i2c/imx/ad5816g.c | 1 + drivers/staging/media/atomisp/i2c/imx/ad5816g.h | 1 + drivers/staging/media/atomisp/i2c/imx/common.h | 1 + drivers/staging/media/atomisp/i2c/imx/drv201.c | 1 + drivers/staging/media/atomisp/i2c/imx/drv201.h | 1 + drivers/staging/media/atomisp/i2c/imx/dw9714.c | 1 + drivers/staging/media/atomisp/i2c/imx/dw9714.h | 1 + drivers/staging/media/atomisp/i2c/imx/imx134.h | 1 + drivers/staging/media/atomisp/i2c/imx/imx175.h | 1 + drivers/staging/media/atomisp/i2c/imx/imx219.h | 1 + drivers/staging/media/atomisp/i2c/imx/imx227.h | 1 + drivers/staging/media/atomisp/i2c/ov5693/Makefile | 1 + drivers/staging/media/atomisp/include/asm/intel_mid_pcihelpers.h | 1 + drivers/staging/media/atomisp/pci/atomisp2/Makefile | 1 + drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 1 + drivers/staging/media/imx/Makefile | 1 + drivers/staging/most/Makefile | 1 + drivers/staging/nvec/Makefile | 1 + drivers/staging/olpc_dcon/olpc_dcon.h | 1 + drivers/staging/rtl8188eu/Makefile | 1 + drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 1 + drivers/staging/rtl8188eu/include/Hal8188ERateAdaptive.h | 1 + drivers/staging/rtl8188eu/include/phy.h | 1 + drivers/staging/rtl8188eu/include/rf.h | 1 + drivers/staging/rtl8192e/Makefile | 1 + drivers/staging/rtl8192e/rtl8192e/Makefile | 1 + drivers/staging/rtl8192u/Makefile | 1 + drivers/staging/rtl8192u/ieee80211/Makefile | 1 + drivers/staging/rtl8192u/ieee80211/dot11d.c | 1 + drivers/staging/rtl8192u/ieee80211/dot11d.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 1 + drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 1 + drivers/staging/rtl8192u/r8192U_dm.c | 1 + drivers/staging/rtl8192u/r8192U_dm.h | 1 + drivers/staging/rtl8192u/r819xU_cmdpkt.c | 1 + drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 + drivers/staging/rtl8192u/r819xU_firmware.c | 1 + drivers/staging/rtl8192u/r819xU_firmware.h | 1 + drivers/staging/rtl8192u/r819xU_firmware_img.c | 1 + drivers/staging/rtl8192u/r819xU_firmware_img.h | 1 + drivers/staging/rtl8192u/r819xU_phy.c | 1 + drivers/staging/rtl8192u/r819xU_phy.h | 1 + drivers/staging/rtl8192u/r819xU_phyreg.h | 1 + drivers/staging/rtl8712/Makefile | 1 + drivers/staging/rtl8712/rtl8712_efuse.h | 1 + drivers/staging/rtl8712/rtl871x_ioctl.h | 1 + drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h | 1 + drivers/staging/rtl8712/rtl871x_recv.h | 1 + drivers/staging/rtl8723bs/Makefile | 1 + drivers/staging/rtl8723bs/hal/Hal8723BReg.h | 1 + drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h | 1 + drivers/staging/rtl8723bs/include/rtw_wifi_regd.h | 1 + drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 1 + drivers/staging/rts5208/trace.c | 1 + drivers/staging/skein/Makefile | 1 + drivers/staging/skein/skein_iv.h | 1 + drivers/staging/skein/threefish_api.c | 1 + drivers/staging/skein/threefish_api.h | 1 + drivers/staging/skein/threefish_block.c | 1 + drivers/staging/sm750fb/ddk750_chip.c | 1 + drivers/staging/sm750fb/ddk750_chip.h | 1 + drivers/staging/sm750fb/ddk750_display.c | 1 + drivers/staging/sm750fb/ddk750_display.h | 1 + drivers/staging/sm750fb/ddk750_dvi.c | 1 + drivers/staging/sm750fb/ddk750_dvi.h | 1 + drivers/staging/sm750fb/ddk750_hwi2c.c | 1 + drivers/staging/sm750fb/ddk750_hwi2c.h | 1 + drivers/staging/sm750fb/ddk750_mode.c | 1 + drivers/staging/sm750fb/ddk750_mode.h | 1 + drivers/staging/sm750fb/ddk750_power.c | 1 + drivers/staging/sm750fb/ddk750_power.h | 1 + drivers/staging/sm750fb/ddk750_reg.h | 1 + drivers/staging/sm750fb/ddk750_sii164.c | 1 + drivers/staging/sm750fb/ddk750_sii164.h | 1 + drivers/staging/sm750fb/sm750.h | 1 + drivers/staging/sm750fb/sm750_accel.c | 1 + drivers/staging/sm750fb/sm750_accel.h | 1 + drivers/staging/sm750fb/sm750_cursor.c | 1 + drivers/staging/sm750fb/sm750_cursor.h | 1 + drivers/staging/sm750fb/sm750_hw.c | 1 + drivers/staging/speakup/Makefile | 1 + drivers/staging/speakup/devsynth.c | 1 + drivers/staging/speakup/i18n.c | 1 + drivers/staging/speakup/i18n.h | 1 + drivers/staging/speakup/selection.c | 1 + drivers/staging/speakup/serialio.h | 1 + drivers/staging/speakup/speakup.h | 1 + drivers/staging/speakup/speakup_acnt.h | 1 + drivers/staging/speakup/speakup_dtlk.h | 1 + drivers/staging/speakup/speakupmap.h | 1 + drivers/staging/speakup/spk_types.h | 1 + drivers/staging/unisys/visorbus/Makefile | 1 + drivers/staging/vboxvideo/Makefile | 1 + drivers/staging/vc04_services/Makefile | 1 + drivers/staging/vc04_services/bcm2835-camera/Makefile | 1 + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_genversion | 1 + drivers/staging/vme/devices/vme_pio2.h | 1 + drivers/staging/vme/devices/vme_user.h | 1 + drivers/staging/vt6655/Makefile | 1 + drivers/staging/vt6656/Makefile | 1 + drivers/staging/wilc1000/Makefile | 1 + drivers/staging/wilc1000/coreconfigurator.c | 1 + drivers/staging/wilc1000/coreconfigurator.h | 1 + drivers/staging/wilc1000/host_interface.c | 1 + drivers/staging/wilc1000/host_interface.h | 1 + drivers/staging/wilc1000/linux_mon.c | 1 + drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 + drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 1 + drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + drivers/staging/wilc1000/wilc_wlan.h | 1 + drivers/staging/wilc1000/wilc_wlan_cfg.c | 1 + drivers/staging/wilc1000/wilc_wlan_cfg.h | 1 + drivers/staging/wilc1000/wilc_wlan_if.h | 1 + drivers/staging/wlan-ng/Makefile | 1 + drivers/staging/wlan-ng/cfg80211.c | 1 + drivers/staging/wlan-ng/prism2usb.c | 1 + drivers/staging/xgifb/XGI_main.h | 1 + drivers/staging/xgifb/XGIfb.h | 1 + drivers/staging/xgifb/vb_def.h | 1 + drivers/staging/xgifb/vb_init.c | 1 + drivers/staging/xgifb/vb_init.h | 1 + drivers/staging/xgifb/vb_setmode.c | 1 + drivers/staging/xgifb/vb_setmode.h | 1 + drivers/staging/xgifb/vb_struct.h | 1 + drivers/staging/xgifb/vb_table.h | 1 + drivers/staging/xgifb/vb_util.h | 1 + drivers/staging/xgifb/vgatypes.h | 1 + drivers/target/Makefile | 1 + drivers/target/iscsi/Makefile | 1 + drivers/target/iscsi/cxgbit/Makefile | 1 + drivers/target/iscsi/iscsi_target.h | 1 + drivers/target/iscsi/iscsi_target_auth.h | 1 + drivers/target/iscsi/iscsi_target_datain_values.h | 1 + drivers/target/iscsi/iscsi_target_device.h | 1 + drivers/target/iscsi/iscsi_target_erl0.h | 1 + drivers/target/iscsi/iscsi_target_erl1.h | 1 + drivers/target/iscsi/iscsi_target_erl2.h | 1 + drivers/target/iscsi/iscsi_target_login.h | 1 + drivers/target/iscsi/iscsi_target_nego.h | 1 + drivers/target/iscsi/iscsi_target_nodeattrib.h | 1 + drivers/target/iscsi/iscsi_target_parameters.h | 1 + drivers/target/iscsi/iscsi_target_seq_pdu_list.h | 1 + drivers/target/iscsi/iscsi_target_tmr.h | 1 + drivers/target/iscsi/iscsi_target_tpg.h | 1 + drivers/target/iscsi/iscsi_target_transport.c | 1 + drivers/target/iscsi/iscsi_target_util.h | 1 + drivers/target/loopback/tcm_loop.h | 1 + drivers/target/sbp/sbp_target.h | 1 + drivers/target/target_core_alua.h | 1 + drivers/target/target_core_file.h | 1 + drivers/target/target_core_iblock.h | 1 + drivers/target/target_core_internal.h | 1 + drivers/target/target_core_pr.h | 1 + drivers/target/target_core_pscsi.h | 1 + drivers/target/target_core_rd.h | 1 + drivers/target/target_core_ua.h | 1 + drivers/target/target_core_xcopy.h | 1 + drivers/target/tcm_fc/Makefile | 1 + drivers/tee/Makefile | 1 + drivers/tee/optee/Makefile | 1 + drivers/thermal/Makefile | 1 + drivers/thermal/int340x_thermal/Makefile | 1 + drivers/thermal/int340x_thermal/acpi_thermal_rel.h | 1 + drivers/thermal/tegra/Makefile | 1 + drivers/thermal/ti-soc-thermal/Makefile | 1 + drivers/thunderbolt/cap.c | 1 + drivers/thunderbolt/ctl.c | 1 + drivers/thunderbolt/ctl.h | 1 + drivers/thunderbolt/eeprom.c | 1 + drivers/thunderbolt/nhi.h | 1 + drivers/thunderbolt/nhi_regs.h | 1 + drivers/thunderbolt/path.c | 1 + drivers/thunderbolt/switch.c | 1 + drivers/thunderbolt/tb.c | 1 + drivers/thunderbolt/tb.h | 1 + drivers/thunderbolt/tb_regs.h | 1 + drivers/thunderbolt/tunnel_pci.c | 1 + drivers/thunderbolt/tunnel_pci.h | 1 + drivers/tty/Makefile | 1 + drivers/tty/hvc/Makefile | 1 + drivers/tty/hvc/hvc_irq.c | 1 + drivers/tty/hvc/hvc_iucv.c | 1 + drivers/tty/hvc/hvsi_lib.c | 1 + drivers/tty/ipwireless/hardware.c | 1 + drivers/tty/ipwireless/hardware.h | 1 + drivers/tty/ipwireless/main.h | 1 + drivers/tty/ipwireless/network.c | 1 + drivers/tty/ipwireless/network.h | 1 + drivers/tty/ipwireless/setup_protocol.h | 1 + drivers/tty/ipwireless/tty.c | 1 + drivers/tty/ipwireless/tty.h | 1 + drivers/tty/moxa.h | 1 + drivers/tty/mxser.h | 1 + drivers/tty/pty.c | 1 + drivers/tty/rocket.h | 1 + drivers/tty/rocket_int.h | 1 + drivers/tty/serial/8250/Makefile | 1 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/amba-pl011.h | 1 + drivers/tty/serial/apbuart.h | 1 + drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h | 1 + drivers/tty/serial/cpm_uart/cpm_uart_cpm2.h | 1 + drivers/tty/serial/crisv10.c | 1 + drivers/tty/serial/crisv10.h | 1 + drivers/tty/serial/dz.h | 1 + drivers/tty/serial/etraxfs-uart.c | 1 + drivers/tty/serial/ip22zilog.h | 1 + drivers/tty/serial/pmac_zilog.h | 1 + drivers/tty/serial/sh-sci.h | 1 + drivers/tty/serial/sunsab.h | 1 + drivers/tty/serial/sunzilog.h | 1 + drivers/tty/serial/zs.h | 1 + drivers/tty/sysrq.c | 1 + drivers/tty/tty_mutex.c | 1 + drivers/tty/vt/Makefile | 1 + drivers/tty/vt/selection.c | 1 + drivers/tty/vt/vc_screen.c | 1 + drivers/tty/vt/vt_ioctl.c | 1 + drivers/uio/Makefile | 1 + drivers/usb/Makefile | 1 + drivers/usb/atm/Makefile | 1 + drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/debug.c | 1 + drivers/usb/chipidea/host.h | 1 + drivers/usb/class/cdc-acm.h | 1 + drivers/usb/common/Makefile | 1 + drivers/usb/core/Makefile | 1 + drivers/usb/dwc2/Makefile | 1 + drivers/usb/dwc3/Makefile | 1 + drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/configfs.h | 1 + drivers/usb/gadget/function/Makefile | 1 + drivers/usb/gadget/function/f_mass_storage.h | 1 + drivers/usb/gadget/function/g_zero.h | 1 + drivers/usb/gadget/function/storage_common.h | 1 + drivers/usb/gadget/function/tcm.h | 1 + drivers/usb/gadget/function/uvc_queue.h | 1 + drivers/usb/gadget/legacy/Makefile | 1 + drivers/usb/gadget/udc/Makefile | 1 + drivers/usb/gadget/udc/bdc/Makefile | 1 + drivers/usb/gadget/udc/omap_udc.h | 1 + drivers/usb/host/Makefile | 1 + drivers/usb/host/fotg210.h | 1 + drivers/usb/host/isp116x.h | 1 + drivers/usb/host/isp1362.h | 1 + drivers/usb/host/oxu210hp.h | 1 + drivers/usb/host/pci-quirks.h | 1 + drivers/usb/host/sl811.h | 1 + drivers/usb/host/uhci-debug.c | 1 + drivers/usb/host/uhci-grlib.c | 1 + drivers/usb/host/uhci-hcd.h | 1 + drivers/usb/host/uhci-hub.c | 1 + drivers/usb/host/uhci-pci.c | 1 + drivers/usb/host/uhci-platform.c | 1 + drivers/usb/host/uhci-q.c | 1 + drivers/usb/image/microtek.h | 1 + drivers/usb/isp1760/isp1760-hcd.c | 1 + drivers/usb/isp1760/isp1760-hcd.h | 1 + drivers/usb/isp1760/isp1760-if.c | 1 + drivers/usb/misc/Makefile | 1 + drivers/usb/mon/mon_bin.c | 1 + drivers/usb/mon/mon_stat.c | 1 + drivers/usb/mon/mon_text.c | 1 + drivers/usb/mon/usb_mon.h | 1 + drivers/usb/mtu3/Makefile | 1 + drivers/usb/musb/Makefile | 1 + drivers/usb/musb/cppi_dma.h | 1 + drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-am335x-control.h | 1 + drivers/usb/phy/phy-generic.h | 1 + drivers/usb/renesas_usbhs/Makefile | 1 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/cypress_m8.h | 1 + drivers/usb/serial/ezusb_convert.pl | 1 + drivers/usb/serial/ftdi_sio.h | 1 + drivers/usb/serial/ftdi_sio_ids.h | 1 + drivers/usb/serial/kl5kusb105.h | 1 + drivers/usb/serial/kobil_sct.h | 1 + drivers/usb/serial/usb-wwan.h | 1 + drivers/usb/storage/Makefile | 1 + drivers/usb/storage/option_ms.h | 1 + drivers/usb/storage/sierra_ms.c | 1 + drivers/usb/storage/sierra_ms.h | 1 + drivers/usb/storage/uas-detect.h | 1 + drivers/usb/typec/ucsi/Makefile | 1 + drivers/usb/typec/ucsi/debug.h | 1 + drivers/usb/typec/ucsi/trace.h | 1 + drivers/usb/typec/ucsi/ucsi.h | 1 + drivers/usb/usbip/Makefile | 1 + drivers/usb/wusbcore/Makefile | 1 + drivers/uwb/Makefile | 1 + drivers/uwb/i1480/dfu/Makefile | 1 + drivers/vfio/Makefile | 1 + drivers/vfio/platform/Makefile | 1 + drivers/vfio/platform/reset/Makefile | 1 + drivers/vhost/Makefile | 1 + drivers/vhost/test.h | 1 + drivers/vhost/vhost.h | 1 + drivers/video/Makefile | 1 + drivers/video/backlight/Makefile | 1 + drivers/video/console/Makefile | 1 + drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/amba-clcd-nomadik.h | 1 + drivers/video/fbdev/amba-clcd-versatile.h | 1 + drivers/video/fbdev/atafb.h | 1 + drivers/video/fbdev/atafb_utils.h | 1 + drivers/video/fbdev/aty/Makefile | 1 + drivers/video/fbdev/aty/ati_ids.h | 1 + drivers/video/fbdev/aty/atyfb.h | 1 + drivers/video/fbdev/aty/mach64_accel.c | 1 + drivers/video/fbdev/aty/mach64_ct.c | 1 + drivers/video/fbdev/aty/mach64_cursor.c | 1 + drivers/video/fbdev/aty/mach64_gx.c | 1 + drivers/video/fbdev/aty/radeon_accel.c | 1 + drivers/video/fbdev/aty/radeon_i2c.c | 1 + drivers/video/fbdev/aty/radeon_monitor.c | 1 + drivers/video/fbdev/aty/radeon_pm.c | 1 + drivers/video/fbdev/aty/radeonfb.h | 1 + drivers/video/fbdev/carminefb.h | 1 + drivers/video/fbdev/carminefb_regs.h | 1 + drivers/video/fbdev/core/Makefile | 1 + drivers/video/fbdev/core/fb_draw.h | 1 + drivers/video/fbdev/efifb.c | 1 + drivers/video/fbdev/geode/Makefile | 1 + drivers/video/fbdev/i810/Makefile | 1 + drivers/video/fbdev/intelfb/Makefile | 1 + drivers/video/fbdev/intelfb/intelfb.h | 1 + drivers/video/fbdev/matrox/g450_pll.h | 1 + drivers/video/fbdev/matrox/matroxfb_DAC1064.h | 1 + drivers/video/fbdev/matrox/matroxfb_Ti3026.h | 1 + drivers/video/fbdev/matrox/matroxfb_accel.h | 1 + drivers/video/fbdev/matrox/matroxfb_base.h | 1 + drivers/video/fbdev/matrox/matroxfb_crtc2.h | 1 + drivers/video/fbdev/matrox/matroxfb_g450.h | 1 + drivers/video/fbdev/matrox/matroxfb_maven.h | 1 + drivers/video/fbdev/matrox/matroxfb_misc.h | 1 + drivers/video/fbdev/mb862xx/mb862xx_reg.h | 1 + drivers/video/fbdev/mb862xx/mb862xxfb.h | 1 + drivers/video/fbdev/mb862xx/mb862xxfb_accel.h | 1 + drivers/video/fbdev/mbx/mbxdebugfs.c | 1 + drivers/video/fbdev/mbx/reg_bits.h | 1 + drivers/video/fbdev/mbx/regs.h | 1 + drivers/video/fbdev/mmp/panel/Kconfig | 1 + drivers/video/fbdev/nvidia/Makefile | 1 + drivers/video/fbdev/nvidia/nv_proto.h | 1 + drivers/video/fbdev/nvidia/nv_type.h | 1 + drivers/video/fbdev/omap/Makefile | 1 + drivers/video/fbdev/omap/lcdc.h | 1 + drivers/video/fbdev/omap2/omapfb/Makefile | 1 + drivers/video/fbdev/omap2/omapfb/displays/Makefile | 1 + drivers/video/fbdev/omap2/omapfb/dss/Kconfig | 1 + drivers/video/fbdev/omap2/omapfb/dss/Makefile | 1 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c | 1 + drivers/video/fbdev/pxa168fb.h | 1 + drivers/video/fbdev/pxa3xx-gcu.h | 1 + drivers/video/fbdev/riva/Makefile | 1 + drivers/video/fbdev/riva/nv_type.h | 1 + drivers/video/fbdev/riva/rivafb.h | 1 + drivers/video/fbdev/sbuslib.c | 1 + drivers/video/fbdev/sbuslib.h | 1 + drivers/video/fbdev/sh_mobile_lcdcfb.h | 1 + drivers/video/fbdev/sticore.h | 1 + drivers/video/fbdev/via/Makefile | 1 + drivers/video/fbdev/wmt_ge_rops.h | 1 + drivers/video/logo/Makefile | 1 + drivers/virtio/Makefile | 1 + drivers/vme/vme_bridge.h | 1 + drivers/w1/masters/Makefile | 1 + drivers/w1/slaves/Makefile | 1 + drivers/watchdog/Makefile | 1 + drivers/watchdog/iTCO_vendor.h | 1 + drivers/watchdog/sp5100_tco.h | 1 + drivers/watchdog/watchdog_pretimeout.h | 1 + drivers/xen/Makefile | 1 + drivers/xen/biomerge.c | 1 + drivers/xen/cpu_hotplug.c | 1 + drivers/xen/events/events_2l.c | 1 + drivers/xen/time.c | 1 + drivers/xen/xen-pciback/Makefile | 1 + drivers/xen/xen-pciback/conf_space.c | 1 + drivers/xen/xen-pciback/conf_space.h | 1 + drivers/xen/xen-pciback/conf_space_capability.c | 1 + drivers/xen/xen-pciback/conf_space_header.c | 1 + drivers/xen/xen-pciback/conf_space_quirks.c | 1 + drivers/xen/xen-pciback/conf_space_quirks.h | 1 + drivers/xen/xen-pciback/passthrough.c | 1 + drivers/xen/xen-pciback/pciback.h | 1 + drivers/xen/xen-pciback/pciback_ops.c | 1 + drivers/xen/xen-pciback/vpci.c | 1 + drivers/xen/xen-pciback/xenbus.c | 1 + drivers/xen/xen-selfballoon.c | 1 + drivers/xen/xenbus/Makefile | 1 + drivers/xen/xenbus/xenbus_dev_backend.c | 1 + drivers/xen/xenfs/xenfs.h | 1 + drivers/xen/xenfs/xenstored.c | 1 + drivers/xen/xenfs/xensyms.c | 1 + drivers/zorro/Makefile | 1 + drivers/zorro/gen-devlist.c | 1 + drivers/zorro/names.c | 1 + drivers/zorro/proc.c | 1 + drivers/zorro/zorro.h | 1 + firmware/Makefile | 1 + fs/9p/Makefile | 1 + fs/Makefile | 1 + fs/adfs/adfs.h | 1 + fs/adfs/file.c | 1 + fs/affs/affs.h | 1 + fs/affs/amigaffs.c | 1 + fs/affs/amigaffs.h | 1 + fs/affs/bitmap.c | 1 + fs/affs/dir.c | 1 + fs/affs/file.c | 1 + fs/affs/inode.c | 1 + fs/affs/namei.c | 1 + fs/affs/symlink.c | 1 + fs/afs/Makefile | 1 + fs/afs/netdevices.c | 1 + fs/attr.c | 1 + fs/bad_inode.c | 1 + fs/befs/befs.h | 1 + fs/befs/befs_fs_types.h | 1 + fs/befs/btree.h | 1 + fs/befs/datastream.c | 1 + fs/befs/datastream.h | 1 + fs/befs/debug.c | 1 + fs/befs/endian.h | 1 + fs/befs/inode.c | 1 + fs/befs/io.c | 1 + fs/bfs/bfs.h | 1 + fs/bfs/dir.c | 1 + fs/bfs/file.c | 1 + fs/binfmt_flat.c | 1 + fs/btrfs/Makefile | 1 + fs/btrfs/export.c | 1 + fs/btrfs/export.h | 1 + fs/btrfs/extent_io.c | 1 + fs/btrfs/extent_io.h | 1 + fs/btrfs/extent_map.c | 1 + fs/btrfs/extent_map.h | 1 + fs/btrfs/inode-map.h | 1 + fs/btrfs/sysfs.h | 1 + fs/cachefiles/Makefile | 1 + fs/ceph/Makefile | 1 + fs/ceph/addr.c | 1 + fs/ceph/caps.c | 1 + fs/ceph/ceph_frag.c | 1 + fs/ceph/debugfs.c | 1 + fs/ceph/dir.c | 1 + fs/ceph/export.c | 1 + fs/ceph/file.c | 1 + fs/ceph/inode.c | 1 + fs/ceph/ioctl.c | 1 + fs/ceph/ioctl.h | 1 + fs/ceph/locks.c | 1 + fs/ceph/mds_client.c | 1 + fs/ceph/mds_client.h | 1 + fs/ceph/mdsmap.c | 1 + fs/ceph/snap.c | 1 + fs/ceph/strings.c | 1 + fs/ceph/super.h | 1 + fs/ceph/xattr.c | 1 + fs/char_dev.c | 1 + fs/cifs/Makefile | 1 + fs/coda/cache.c | 1 + fs/coda/cnode.c | 1 + fs/coda/coda_cache.h | 1 + fs/coda/coda_fs_i.h | 1 + fs/coda/coda_int.h | 1 + fs/coda/coda_linux.c | 1 + fs/coda/coda_linux.h | 1 + fs/coda/dir.c | 1 + fs/coda/file.c | 1 + fs/coda/inode.c | 1 + fs/coda/pioctl.c | 1 + fs/coda/symlink.c | 1 + fs/coda/sysctl.c | 1 + fs/coda/upcall.c | 1 + fs/compat_ioctl.c | 1 + fs/coredump.c | 1 + fs/cramfs/uncompress.c | 1 + fs/crypto/bio.c | 1 + fs/crypto/fname.c | 1 + fs/crypto/fscrypt_private.h | 1 + fs/crypto/keyinfo.c | 1 + fs/crypto/policy.c | 1 + fs/dlm/Makefile | 1 + fs/drop_caches.c | 1 + fs/efs/dir.c | 1 + fs/efs/efs.h | 1 + fs/efs/file.c | 1 + fs/efs/namei.c | 1 + fs/efs/super.c | 1 + fs/efs/symlink.c | 1 + fs/ext2/Makefile | 1 + fs/ext2/acl.c | 1 + fs/ext2/acl.h | 1 + fs/ext2/balloc.c | 1 + fs/ext2/dir.c | 1 + fs/ext2/ext2.h | 1 + fs/ext2/file.c | 1 + fs/ext2/ialloc.c | 1 + fs/ext2/inode.c | 1 + fs/ext2/ioctl.c | 1 + fs/ext2/namei.c | 1 + fs/ext2/symlink.c | 1 + fs/ext2/xattr.c | 1 + fs/ext2/xattr.h | 1 + fs/ext2/xattr_security.c | 1 + fs/ext2/xattr_trusted.c | 1 + fs/ext2/xattr_user.c | 1 + fs/ext4/Makefile | 1 + fs/ext4/acl.c | 1 + fs/ext4/acl.h | 1 + fs/ext4/balloc.c | 1 + fs/ext4/bitmap.c | 1 + fs/ext4/block_validity.c | 1 + fs/ext4/dir.c | 1 + fs/ext4/ext4.h | 1 + fs/ext4/ext4_jbd2.c | 1 + fs/ext4/extents_status.c | 1 + fs/ext4/extents_status.h | 1 + fs/ext4/file.c | 1 + fs/ext4/fsync.c | 1 + fs/ext4/ialloc.c | 1 + fs/ext4/indirect.c | 1 + fs/ext4/inode.c | 1 + fs/ext4/ioctl.c | 1 + fs/ext4/mballoc.h | 1 + fs/ext4/mmp.c | 1 + fs/ext4/namei.c | 1 + fs/ext4/page-io.c | 1 + fs/ext4/readpage.c | 1 + fs/ext4/resize.c | 1 + fs/ext4/symlink.c | 1 + fs/ext4/sysfs.c | 1 + fs/ext4/truncate.h | 1 + fs/ext4/xattr.c | 1 + fs/ext4/xattr.h | 1 + fs/ext4/xattr_security.c | 1 + fs/ext4/xattr_trusted.c | 1 + fs/ext4/xattr_user.c | 1 + fs/f2fs/Makefile | 1 + fs/fat/Makefile | 1 + fs/fat/cache.c | 1 + fs/fat/fat.h | 1 + fs/fcntl.c | 1 + fs/fhandle.c | 1 + fs/file.c | 1 + fs/filesystems.c | 1 + fs/fs_pin.c | 1 + fs/fscache/Makefile | 1 + fs/gfs2/Makefile | 1 + fs/gfs2/trace_gfs2.h | 1 + fs/hfs/attr.c | 1 + fs/hfs/bfind.c | 1 + fs/hfs/bnode.c | 1 + fs/hfs/brec.c | 1 + fs/hfs/btree.c | 1 + fs/hfs/btree.h | 1 + fs/hfsplus/Makefile | 1 + fs/hfsplus/acl.h | 1 + fs/hfsplus/attributes.c | 1 + fs/hfsplus/bfind.c | 1 + fs/hfsplus/bitmap.c | 1 + fs/hfsplus/bnode.c | 1 + fs/hfsplus/brec.c | 1 + fs/hfsplus/btree.c | 1 + fs/hfsplus/catalog.c | 1 + fs/hfsplus/dir.c | 1 + fs/hfsplus/extents.c | 1 + fs/hfsplus/hfsplus_fs.h | 1 + fs/hfsplus/hfsplus_raw.h | 1 + fs/hfsplus/inode.c | 1 + fs/hfsplus/ioctl.c | 1 + fs/hfsplus/options.c | 1 + fs/hfsplus/posix_acl.c | 1 + fs/hfsplus/tables.c | 1 + fs/hfsplus/unicode.c | 1 + fs/hfsplus/wrapper.c | 1 + fs/hfsplus/xattr.c | 1 + fs/hfsplus/xattr.h | 1 + fs/hfsplus/xattr_security.c | 1 + fs/hfsplus/xattr_trusted.c | 1 + fs/hfsplus/xattr_user.c | 1 + fs/hostfs/hostfs.h | 1 + fs/hpfs/alloc.c | 1 + fs/hpfs/anode.c | 1 + fs/hpfs/buffer.c | 1 + fs/hpfs/dentry.c | 1 + fs/hpfs/dir.c | 1 + fs/hpfs/dnode.c | 1 + fs/hpfs/ea.c | 1 + fs/hpfs/file.c | 1 + fs/hpfs/hpfs.h | 1 + fs/hpfs/hpfs_fn.h | 1 + fs/hpfs/inode.c | 1 + fs/hpfs/map.c | 1 + fs/hpfs/name.c | 1 + fs/hpfs/namei.c | 1 + fs/ioctl.c | 1 + fs/isofs/Makefile | 1 + fs/isofs/dir.c | 1 + fs/isofs/export.c | 1 + fs/isofs/isofs.h | 1 + fs/isofs/joliet.c | 1 + fs/isofs/namei.c | 1 + fs/isofs/rock.c | 1 + fs/isofs/rock.h | 1 + fs/isofs/util.c | 1 + fs/jffs2/Makefile | 1 + fs/jfs/Makefile | 1 + fs/jfs/ioctl.c | 1 + fs/lockd/Makefile | 1 + fs/lockd/clnt4xdr.c | 1 + fs/lockd/clntxdr.c | 1 + fs/lockd/host.c | 1 + fs/lockd/mon.c | 1 + fs/lockd/netns.h | 1 + fs/lockd/procfs.c | 1 + fs/lockd/procfs.h | 1 + fs/lockd/svc4proc.c | 1 + fs/lockd/svclock.c | 1 + fs/lockd/svcproc.c | 1 + fs/lockd/svcshare.c | 1 + fs/lockd/xdr.c | 1 + fs/lockd/xdr4.c | 1 + fs/minix/bitmap.c | 1 + fs/minix/dir.c | 1 + fs/minix/file.c | 1 + fs/minix/itree_common.c | 1 + fs/minix/itree_v1.c | 1 + fs/minix/itree_v2.c | 1 + fs/minix/minix.h | 1 + fs/minix/namei.c | 1 + fs/mount.h | 1 + fs/mpage.c | 1 + fs/namei.c | 1 + fs/ncpfs/Makefile | 1 + fs/ncpfs/dir.c | 1 + fs/ncpfs/file.c | 1 + fs/ncpfs/getopt.c | 1 + fs/ncpfs/getopt.h | 1 + fs/ncpfs/ioctl.c | 1 + fs/ncpfs/mmap.c | 1 + fs/ncpfs/ncp_fs.h | 1 + fs/ncpfs/ncp_fs_i.h | 1 + fs/ncpfs/ncp_fs_sb.h | 1 + fs/ncpfs/ncplib_kernel.c | 1 + fs/ncpfs/ncplib_kernel.h | 1 + fs/ncpfs/ncpsign_kernel.c | 1 + fs/ncpfs/ncpsign_kernel.h | 1 + fs/ncpfs/sock.c | 1 + fs/ncpfs/symlink.c | 1 + fs/nfs/Makefile | 1 + fs/nfs/blocklayout/dev.c | 1 + fs/nfs/blocklayout/extent_tree.c | 1 + fs/nfs/cache_lib.c | 1 + fs/nfs/cache_lib.h | 1 + fs/nfs/callback.c | 1 + fs/nfs/callback.h | 1 + fs/nfs/callback_proc.c | 1 + fs/nfs/callback_xdr.c | 1 + fs/nfs/delegation.h | 1 + fs/nfs/dns_resolve.c | 1 + fs/nfs/dns_resolve.h | 1 + fs/nfs/export.c | 1 + fs/nfs/flexfilelayout/flexfilelayout.h | 1 + fs/nfs/flexfilelayout/flexfilelayoutdev.c | 1 + fs/nfs/internal.h | 1 + fs/nfs/io.c | 1 + fs/nfs/iostat.h | 1 + fs/nfs/mount_clnt.c | 1 + fs/nfs/netns.h | 1 + fs/nfs/nfs.h | 1 + fs/nfs/nfs2xdr.c | 1 + fs/nfs/nfs3_fs.h | 1 + fs/nfs/nfs3acl.c | 1 + fs/nfs/nfs3proc.c | 1 + fs/nfs/nfs3xdr.c | 1 + fs/nfs/nfs42.h | 1 + fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs42xdr.c | 1 + fs/nfs/nfs4_fs.h | 1 + fs/nfs/nfs4file.c | 1 + fs/nfs/nfs4getroot.c | 1 + fs/nfs/nfs4namespace.c | 1 + fs/nfs/nfs4session.h | 1 + fs/nfs/nfs4sysctl.c | 1 + fs/nfs/nfs4trace.c | 1 + fs/nfs/nfs4trace.h | 1 + fs/nfs/nfsroot.c | 1 + fs/nfs/nfstrace.c | 1 + fs/nfs/nfstrace.h | 1 + fs/nfs/proc.c | 1 + fs/nfs/symlink.c | 1 + fs/nfs/sysctl.c | 1 + fs/nfs/unlink.c | 1 + fs/nfsd/Makefile | 1 + fs/nfsd/auth.c | 1 + fs/nfsd/auth.h | 1 + fs/nfsd/blocklayout.c | 1 + fs/nfsd/blocklayoutxdr.c | 1 + fs/nfsd/blocklayoutxdr.h | 1 + fs/nfsd/cache.h | 1 + fs/nfsd/current_stateid.h | 1 + fs/nfsd/export.c | 1 + fs/nfsd/export.h | 1 + fs/nfsd/fault_inject.c | 1 + fs/nfsd/flexfilelayout.c | 1 + fs/nfsd/flexfilelayoutxdr.c | 1 + fs/nfsd/flexfilelayoutxdr.h | 1 + fs/nfsd/lockd.c | 1 + fs/nfsd/nfs2acl.c | 1 + fs/nfsd/nfs3acl.c | 1 + fs/nfsd/nfs3proc.c | 1 + fs/nfsd/nfs3xdr.c | 1 + fs/nfsd/nfs4layouts.c | 1 + fs/nfsd/nfscache.c | 1 + fs/nfsd/nfsd.h | 1 + fs/nfsd/nfsfh.c | 1 + fs/nfsd/nfsfh.h | 1 + fs/nfsd/nfsproc.c | 1 + fs/nfsd/nfssvc.c | 1 + fs/nfsd/nfsxdr.c | 1 + fs/nfsd/pnfs.h | 1 + fs/nfsd/stats.c | 1 + fs/nfsd/stats.h | 1 + fs/nfsd/trace.h | 1 + fs/nfsd/vfs.c | 1 + fs/nfsd/vfs.h | 1 + fs/nfsd/xdr.h | 1 + fs/nfsd/xdr3.h | 1 + fs/nfsd/xdr4cb.h | 1 + fs/nilfs2/Makefile | 1 + fs/nilfs2/export.h | 1 + fs/nls/Makefile | 1 + fs/notify/Makefile | 1 + fs/notify/fanotify/fanotify.c | 1 + fs/notify/fanotify/fanotify.h | 1 + fs/notify/fanotify/fanotify_user.c | 1 + fs/notify/fdinfo.c | 1 + fs/notify/fdinfo.h | 1 + fs/notify/fsnotify.h | 1 + fs/notify/inotify/inotify.h | 1 + fs/nsfs.c | 1 + fs/ntfs/Makefile | 1 + fs/ocfs2/Makefile | 1 + fs/ocfs2/ioctl.c | 1 + fs/ocfs2/ioctl.h | 1 + fs/ocfs2/mmap.h | 1 + fs/ocfs2/ocfs2_trace.h | 1 + fs/ocfs2/quota.h | 1 + fs/ocfs2/quota_global.c | 1 + fs/ocfs2/quota_local.c | 1 + fs/omfs/bitmap.c | 1 + fs/omfs/omfs.h | 1 + fs/omfs/omfs_fs.h | 1 + fs/orangefs/Makefile | 1 + fs/orangefs/acl.c | 1 + fs/orangefs/dcache.c | 1 + fs/orangefs/devorangefs-req.c | 1 + fs/orangefs/dir.c | 1 + fs/orangefs/downcall.h | 1 + fs/orangefs/file.c | 1 + fs/orangefs/inode.c | 1 + fs/orangefs/namei.c | 1 + fs/orangefs/orangefs-bufmap.c | 1 + fs/orangefs/orangefs-bufmap.h | 1 + fs/orangefs/orangefs-cache.c | 1 + fs/orangefs/orangefs-debug.h | 1 + fs/orangefs/orangefs-debugfs.c | 1 + fs/orangefs/orangefs-debugfs.h | 1 + fs/orangefs/orangefs-dev-proto.h | 1 + fs/orangefs/orangefs-kernel.h | 1 + fs/orangefs/orangefs-sysfs.c | 1 + fs/orangefs/orangefs-utils.c | 1 + fs/orangefs/protocol.h | 1 + fs/orangefs/super.c | 1 + fs/orangefs/symlink.c | 1 + fs/orangefs/upcall.h | 1 + fs/orangefs/waitqueue.c | 1 + fs/orangefs/xattr.c | 1 + fs/pipe.c | 1 + fs/proc/Makefile | 1 + fs/proc/array.c | 1 + fs/proc/base.c | 1 + fs/proc/cmdline.c | 1 + fs/proc/cpuinfo.c | 1 + fs/proc/devices.c | 1 + fs/proc/fd.c | 1 + fs/proc/fd.h | 1 + fs/proc/inode.c | 1 + fs/proc/interrupts.c | 1 + fs/proc/kcore.c | 1 + fs/proc/kmsg.c | 1 + fs/proc/loadavg.c | 1 + fs/proc/meminfo.c | 1 + fs/proc/namespaces.c | 1 + fs/proc/page.c | 1 + fs/proc/proc_sysctl.c | 1 + fs/proc/proc_tty.c | 1 + fs/proc/root.c | 1 + fs/proc/self.c | 1 + fs/proc/softirqs.c | 1 + fs/proc/stat.c | 1 + fs/proc/task_mmu.c | 1 + fs/proc/task_nommu.c | 1 + fs/proc/thread_self.c | 1 + fs/proc/uptime.c | 1 + fs/proc/version.c | 1 + fs/proc_namespace.c | 1 + fs/pstore/Makefile | 1 + fs/pstore/internal.h | 1 + fs/qnx4/bitmap.c | 1 + fs/qnx4/dir.c | 1 + fs/qnx4/namei.c | 1 + fs/qnx4/qnx4.h | 1 + fs/qnx6/dir.c | 1 + fs/qnx6/namei.c | 1 + fs/qnx6/qnx6.h | 1 + fs/qnx6/super_mmi.c | 1 + fs/quota/Makefile | 1 + fs/quota/compat.c | 1 + fs/quota/dquot.c | 1 + fs/quota/kqid.c | 1 + fs/quota/netlink.c | 1 + fs/quota/quota.c | 1 + fs/quota/quota_tree.h | 1 + fs/quota/quotaio_v1.h | 1 + fs/quota/quotaio_v2.h | 1 + fs/read_write.c | 1 + fs/readdir.c | 1 + fs/reiserfs/Makefile | 1 + fs/reiserfs/acl.h | 1 + fs/reiserfs/journal.c | 1 + fs/reiserfs/lock.c | 1 + fs/reiserfs/reiserfs.h | 1 + fs/reiserfs/tail_conversion.c | 1 + fs/reiserfs/xattr.c | 1 + fs/reiserfs/xattr.h | 1 + fs/reiserfs/xattr_acl.c | 1 + fs/reiserfs/xattr_security.c | 1 + fs/reiserfs/xattr_trusted.c | 1 + fs/reiserfs/xattr_user.c | 1 + fs/romfs/Makefile | 1 + fs/select.c | 1 + fs/seq_file.c | 1 + fs/signalfd.c | 1 + fs/squashfs/Makefile | 1 + fs/stat.c | 1 + fs/statfs.c | 1 + fs/super.c | 1 + fs/sync.c | 1 + fs/sysv/balloc.c | 1 + fs/sysv/dir.c | 1 + fs/sysv/file.c | 1 + fs/sysv/ialloc.c | 1 + fs/sysv/inode.c | 1 + fs/sysv/itree.c | 1 + fs/sysv/namei.c | 1 + fs/sysv/sysv.h | 1 + fs/timerfd.c | 1 + fs/ubifs/Makefile | 1 + fs/ubifs/crypto.c | 1 + fs/ubifs/misc.c | 1 + fs/udf/udf_i.h | 1 + fs/udf/udf_sb.h | 1 + fs/udf/udfdecl.h | 1 + fs/udf/udfend.h | 1 + fs/ufs/balloc.c | 1 + fs/ufs/cylinder.c | 1 + fs/ufs/dir.c | 1 + fs/ufs/file.c | 1 + fs/ufs/ialloc.c | 1 + fs/ufs/inode.c | 1 + fs/ufs/namei.c | 1 + fs/ufs/swab.h | 1 + fs/ufs/ufs.h | 1 + fs/ufs/ufs_fs.h | 1 + fs/ufs/util.c | 1 + fs/ufs/util.h | 1 + fs/utimes.c | 1 + fs/xfs/libxfs/xfs_cksum.h | 1 + fs/xfs/xfs_discard.h | 1 + fs/xfs/xfs_message.h | 1 + fs/xfs/xfs_pnfs.c | 1 + fs/xfs/xfs_pnfs.h | 1 + include/acpi/acpi_io.h | 1 + include/acpi/acpi_numa.h | 1 + include/acpi/apei.h | 1 + include/acpi/button.h | 1 + include/acpi/ghes.h | 1 + include/acpi/pdc_intel.h | 1 + include/acpi/processor.h | 1 + include/acpi/reboot.h | 1 + include/acpi/video.h | 1 + include/asm-generic/4level-fixup.h | 1 + include/asm-generic/5level-fixup.h | 1 + include/asm-generic/asm-prototypes.h | 1 + include/asm-generic/atomic-long.h | 1 + include/asm-generic/audit_change_attr.h | 1 + include/asm-generic/audit_dir_write.h | 1 + include/asm-generic/audit_read.h | 1 + include/asm-generic/audit_write.h | 1 + include/asm-generic/bitops.h | 1 + include/asm-generic/bitops/__ffs.h | 1 + include/asm-generic/bitops/__fls.h | 1 + include/asm-generic/bitops/arch_hweight.h | 1 + include/asm-generic/bitops/atomic.h | 1 + include/asm-generic/bitops/builtin-__ffs.h | 1 + include/asm-generic/bitops/builtin-__fls.h | 1 + include/asm-generic/bitops/builtin-ffs.h | 1 + include/asm-generic/bitops/builtin-fls.h | 1 + include/asm-generic/bitops/const_hweight.h | 1 + include/asm-generic/bitops/ext2-atomic-setbit.h | 1 + include/asm-generic/bitops/ext2-atomic.h | 1 + include/asm-generic/bitops/ffs.h | 1 + include/asm-generic/bitops/ffz.h | 1 + include/asm-generic/bitops/find.h | 1 + include/asm-generic/bitops/fls.h | 1 + include/asm-generic/bitops/fls64.h | 1 + include/asm-generic/bitops/hweight.h | 1 + include/asm-generic/bitops/le.h | 1 + include/asm-generic/bitops/lock.h | 1 + include/asm-generic/bitops/non-atomic.h | 1 + include/asm-generic/bitops/sched.h | 1 + include/asm-generic/bitsperlong.h | 1 + include/asm-generic/bug.h | 1 + include/asm-generic/bugs.h | 1 + include/asm-generic/cache.h | 1 + include/asm-generic/cacheflush.h | 1 + include/asm-generic/checksum.h | 1 + include/asm-generic/cmpxchg-local.h | 1 + include/asm-generic/cmpxchg.h | 1 + include/asm-generic/current.h | 1 + include/asm-generic/delay.h | 1 + include/asm-generic/div64.h | 1 + include/asm-generic/dma-contiguous.h | 1 + include/asm-generic/dma.h | 1 + include/asm-generic/early_ioremap.h | 1 + include/asm-generic/emergency-restart.h | 1 + include/asm-generic/extable.h | 1 + include/asm-generic/fb.h | 1 + include/asm-generic/futex.h | 1 + include/asm-generic/getorder.h | 1 + include/asm-generic/gpio.h | 1 + include/asm-generic/hardirq.h | 1 + include/asm-generic/hugetlb.h | 1 + include/asm-generic/ide_iops.h | 1 + include/asm-generic/int-ll64.h | 1 + include/asm-generic/ioctl.h | 1 + include/asm-generic/iomap.h | 1 + include/asm-generic/irq.h | 1 + include/asm-generic/irq_work.h | 1 + include/asm-generic/irqflags.h | 1 + include/asm-generic/kdebug.h | 1 + include/asm-generic/kmap_types.h | 1 + include/asm-generic/kprobes.h | 1 + include/asm-generic/kvm_para.h | 1 + include/asm-generic/local.h | 1 + include/asm-generic/local64.h | 1 + include/asm-generic/memory_model.h | 1 + include/asm-generic/mm_hooks.h | 1 + include/asm-generic/mmu.h | 1 + include/asm-generic/mmu_context.h | 1 + include/asm-generic/module.h | 1 + include/asm-generic/msi.h | 1 + include/asm-generic/page.h | 1 + include/asm-generic/param.h | 1 + include/asm-generic/parport.h | 1 + include/asm-generic/pci.h | 1 + include/asm-generic/percpu.h | 1 + include/asm-generic/pgalloc.h | 1 + include/asm-generic/pgtable-nop4d-hack.h | 1 + include/asm-generic/pgtable-nop4d.h | 1 + include/asm-generic/pgtable-nopmd.h | 1 + include/asm-generic/pgtable-nopud.h | 1 + include/asm-generic/pgtable.h | 1 + include/asm-generic/preempt.h | 1 + include/asm-generic/qrwlock_types.h | 1 + include/asm-generic/resource.h | 1 + include/asm-generic/rwsem.h | 1 + include/asm-generic/sections.h | 1 + include/asm-generic/serial.h | 1 + include/asm-generic/set_memory.h | 1 + include/asm-generic/signal.h | 1 + include/asm-generic/simd.h | 1 + include/asm-generic/spinlock.h | 1 + include/asm-generic/statfs.h | 1 + include/asm-generic/syscalls.h | 1 + include/asm-generic/termios-base.h | 1 + include/asm-generic/termios.h | 1 + include/asm-generic/timex.h | 1 + include/asm-generic/tlbflush.h | 1 + include/asm-generic/trace_clock.h | 1 + include/asm-generic/uaccess.h | 1 + include/asm-generic/unaligned.h | 1 + include/asm-generic/unistd.h | 1 + include/asm-generic/vga.h | 1 + include/asm-generic/word-at-a-time.h | 1 + include/clocksource/timer-sp804.h | 1 + include/crypto/ablk_helper.h | 1 + include/crypto/aes.h | 1 + include/crypto/blowfish.h | 1 + include/crypto/cast5.h | 1 + include/crypto/cast6.h | 1 + include/crypto/cast_common.h | 1 + include/crypto/chacha20.h | 1 + include/crypto/cryptd.h | 1 + include/crypto/crypto_wq.h | 1 + include/crypto/des.h | 1 + include/crypto/ghash.h | 1 + include/crypto/hmac.h | 1 + include/crypto/internal/simd.h | 1 + include/crypto/lrw.h | 1 + include/crypto/mcryptd.h | 1 + include/crypto/md5.h | 1 + include/crypto/null.h | 1 + include/crypto/poly1305.h | 1 + include/crypto/serpent.h | 1 + include/crypto/sha.h | 1 + include/crypto/sha3.h | 1 + include/crypto/twofish.h | 1 + include/crypto/xts.h | 1 + include/drm/ati_pcigart.h | 1 + include/drm/drm_agpsupport.h | 1 + include/drm/drm_fb_cma_helper.h | 1 + include/drm/drm_gem_cma_helper.h | 1 + include/drm/drm_of.h | 1 + include/drm/drm_os_linux.h | 1 + include/drm/drm_pciids.h | 1 + include/drm/drm_sysfs.h | 1 + include/drm/i2c/tda998x.h | 1 + include/drm/intel-gtt.h | 1 + include/dt-bindings/clock/berlin2.h | 1 + include/dt-bindings/clock/berlin2q.h | 1 + include/dt-bindings/clock/cortina,gemini-clock.h | 1 + include/dt-bindings/clock/efm32-cmu.h | 1 + include/dt-bindings/clock/exynos-audss-clk.h | 1 + include/dt-bindings/clock/gxbb-clkc.h | 1 + include/dt-bindings/clock/jz4740-cgu.h | 1 + include/dt-bindings/clock/jz4780-cgu.h | 1 + include/dt-bindings/clock/marvell,mmp2.h | 1 + include/dt-bindings/clock/marvell,pxa168.h | 1 + include/dt-bindings/clock/marvell,pxa1928.h | 1 + include/dt-bindings/clock/marvell,pxa910.h | 1 + include/dt-bindings/clock/meson8b-clkc.h | 1 + include/dt-bindings/clock/mpc512x-clock.h | 1 + include/dt-bindings/clock/rockchip,rk808.h | 1 + include/dt-bindings/clock/ste-ab8500.h | 1 + include/dt-bindings/clock/stih407-clks.h | 1 + include/dt-bindings/clock/stih410-clks.h | 1 + include/dt-bindings/clock/stih416-clks.h | 1 + include/dt-bindings/clock/stih418-clks.h | 1 + include/dt-bindings/clock/tegra114-car.h | 1 + include/dt-bindings/clock/tegra124-car-common.h | 1 + include/dt-bindings/clock/tegra124-car.h | 1 + include/dt-bindings/clock/tegra186-clock.h | 1 + include/dt-bindings/clock/tegra20-car.h | 1 + include/dt-bindings/clock/tegra210-car.h | 1 + include/dt-bindings/clock/tegra30-car.h | 1 + include/dt-bindings/display/tda998x.h | 1 + include/dt-bindings/gpio/gpio.h | 1 + include/dt-bindings/gpio/tegra-gpio.h | 1 + include/dt-bindings/gpio/tegra186-gpio.h | 1 + include/dt-bindings/iio/adc/fsl-imx25-gcq.h | 1 + include/dt-bindings/iio/adi,ad5592r.h | 1 + include/dt-bindings/input/input.h | 1 + include/dt-bindings/interrupt-controller/arm-gic.h | 1 + include/dt-bindings/interrupt-controller/irq.h | 1 + include/dt-bindings/interrupt-controller/mips-gic.h | 1 + include/dt-bindings/interrupt-controller/mvebu-icu.h | 1 + include/dt-bindings/leds/common.h | 1 + include/dt-bindings/leds/leds-ns2.h | 1 + include/dt-bindings/mailbox/tegra186-hsp.h | 1 + include/dt-bindings/media/c8sectpfe.h | 1 + include/dt-bindings/memory/tegra114-mc.h | 1 + include/dt-bindings/memory/tegra124-mc.h | 1 + include/dt-bindings/memory/tegra210-mc.h | 1 + include/dt-bindings/memory/tegra30-mc.h | 1 + include/dt-bindings/mfd/as3722.h | 1 + include/dt-bindings/mfd/dbx500-prcmu.h | 1 + include/dt-bindings/mfd/max77620.h | 1 + include/dt-bindings/mfd/palmas.h | 1 + include/dt-bindings/mfd/qcom-rpm.h | 1 + include/dt-bindings/mfd/st-lpc.h | 1 + include/dt-bindings/mfd/stm32f4-rcc.h | 1 + include/dt-bindings/mfd/stm32f7-rcc.h | 1 + include/dt-bindings/mux/mux.h | 1 + include/dt-bindings/pinctrl/am33xx.h | 1 + include/dt-bindings/pinctrl/am43xx.h | 1 + include/dt-bindings/pinctrl/dm814x.h | 1 + include/dt-bindings/pinctrl/mt6397-pinfunc.h | 1 + include/dt-bindings/pinctrl/mt7623-pinfunc.h | 1 + include/dt-bindings/pinctrl/omap.h | 1 + include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h | 1 + include/dt-bindings/pinctrl/qcom,pmic-gpio.h | 1 + include/dt-bindings/pinctrl/qcom,pmic-mpp.h | 1 + include/dt-bindings/pinctrl/r7s72100-pinctrl.h | 1 + include/dt-bindings/pinctrl/stm32f429-pinfunc.h | 1 + include/dt-bindings/pinctrl/stm32f746-pinfunc.h | 1 + include/dt-bindings/pinctrl/stm32h7-pinfunc.h | 1 + include/dt-bindings/power/mt8173-power.h | 1 + include/dt-bindings/power/rk3288-power.h | 1 + include/dt-bindings/power/rk3328-power.h | 1 + include/dt-bindings/power/rk3368-power.h | 1 + include/dt-bindings/power/rk3399-power.h | 1 + include/dt-bindings/pwm/pwm.h | 1 + include/dt-bindings/reset/cortina,gemini-reset.h | 1 + include/dt-bindings/reset/hisi,hi6220-resets.h | 1 + include/dt-bindings/reset/pistachio-resets.h | 1 + include/dt-bindings/reset/stih407-resets.h | 1 + include/dt-bindings/reset/stih415-resets.h | 1 + include/dt-bindings/reset/stih416-resets.h | 1 + include/dt-bindings/reset/tegra124-car.h | 1 + include/dt-bindings/reset/tegra210-car.h | 1 + include/dt-bindings/soc/rockchip,boot-mode.h | 1 + include/dt-bindings/sound/apq8016-lpass.h | 1 + include/dt-bindings/sound/audio-jack-events.h | 1 + include/dt-bindings/sound/cs35l32.h | 1 + include/dt-bindings/sound/fsl-imx-audmux.h | 1 + include/dt-bindings/sound/samsung-i2s.h | 1 + include/dt-bindings/sound/tas2552.h | 1 + include/dt-bindings/sound/tlv320aic31xx-micbias.h | 1 + include/dt-bindings/thermal/lm90.h | 1 + include/dt-bindings/thermal/tegra124-soctherm.h | 1 + include/keys/ceph-type.h | 1 + include/linux/8250_pci.h | 1 + include/linux/a.out.h | 1 + include/linux/acct.h | 1 + include/linux/acpi_pmtmr.h | 1 + include/linux/adb.h | 1 + include/linux/adfs_fs.h | 1 + include/linux/aer.h | 1 + include/linux/ahci-remap.h | 1 + include/linux/aio.h | 1 + include/linux/alarmtimer.h | 1 + include/linux/altera_jtaguart.h | 1 + include/linux/altera_uart.h | 1 + include/linux/amba/mmci.h | 1 + include/linux/amifd.h | 1 + include/linux/amifdreg.h | 1 + include/linux/anon_inodes.h | 1 + include/linux/apple_bl.h | 1 + include/linux/arch_topology.h | 1 + include/linux/ata_platform.h | 1 + include/linux/atalk.h | 1 + include/linux/atm.h | 1 + include/linux/atm_tcp.h | 1 + include/linux/atmdev.h | 1 + include/linux/atmel-mci.h | 1 + include/linux/atmel-ssc.h | 1 + include/linux/atomic.h | 1 + include/linux/auxvec.h | 1 + include/linux/average.h | 1 + include/linux/backing-dev-defs.h | 1 + include/linux/backing-dev.h | 1 + include/linux/backlight.h | 1 + include/linux/badblocks.h | 1 + include/linux/balloon_compaction.h | 1 + include/linux/bcd.h | 1 + include/linux/bcm47xx_wdt.h | 1 + include/linux/bcm963xx_nvram.h | 1 + include/linux/bcm963xx_tag.h | 1 + include/linux/bcma/bcma.h | 1 + include/linux/bcma/bcma_driver_arm_c9.h | 1 + include/linux/bcma/bcma_driver_chipcommon.h | 1 + include/linux/bcma/bcma_driver_gmac_cmn.h | 1 + include/linux/bcma/bcma_driver_mips.h | 1 + include/linux/bcma/bcma_driver_pci.h | 1 + include/linux/bcma/bcma_driver_pcie2.h | 1 + include/linux/bcma/bcma_regs.h | 1 + include/linux/bcma/bcma_soc.h | 1 + include/linux/binfmts.h | 1 + include/linux/bit_spinlock.h | 1 + include/linux/bitmap.h | 1 + include/linux/bitops.h | 1 + include/linux/bitrev.h | 1 + include/linux/blk-cgroup.h | 1 + include/linux/blk-mq-pci.h | 1 + include/linux/blk-mq-virtio.h | 1 + include/linux/blk-mq.h | 1 + include/linux/blk_types.h | 1 + include/linux/blkdev.h | 1 + include/linux/blkpg.h | 1 + include/linux/blktrace_api.h | 1 + include/linux/blockgroup_lock.h | 1 + include/linux/bootmem.h | 1 + include/linux/bottom_half.h | 1 + include/linux/bpf-cgroup.h | 1 + include/linux/bpf_trace.h | 1 + include/linux/bpf_types.h | 1 + include/linux/brcmphy.h | 1 + include/linux/bsearch.h | 1 + include/linux/bsg.h | 1 + include/linux/btree-128.h | 1 + include/linux/btree-type.h | 1 + include/linux/btree.h | 1 + include/linux/btrfs.h | 1 + include/linux/buffer_head.h | 1 + include/linux/bug.h | 1 + include/linux/build_bug.h | 1 + include/linux/byteorder/big_endian.h | 1 + include/linux/byteorder/generic.h | 1 + include/linux/byteorder/little_endian.h | 1 + include/linux/cache.h | 1 + include/linux/cacheinfo.h | 1 + include/linux/can/core.h | 1 + include/linux/can/dev.h | 1 + include/linux/can/platform/cc770.h | 1 + include/linux/can/platform/mcp251x.h | 1 + include/linux/can/platform/rcar_can.h | 1 + include/linux/can/platform/sja1000.h | 1 + include/linux/can/skb.h | 1 + include/linux/capability.h | 1 + include/linux/cciss_ioctl.h | 1 + include/linux/cdev.h | 1 + include/linux/cdrom.h | 1 + include/linux/ceph/auth.h | 1 + include/linux/ceph/buffer.h | 1 + include/linux/ceph/ceph_debug.h | 1 + include/linux/ceph/ceph_features.h | 1 + include/linux/ceph/ceph_frag.h | 1 + include/linux/ceph/ceph_fs.h | 1 + include/linux/ceph/ceph_hash.h | 1 + include/linux/ceph/cls_lock_client.h | 1 + include/linux/ceph/debugfs.h | 1 + include/linux/ceph/decode.h | 1 + include/linux/ceph/libceph.h | 1 + include/linux/ceph/mdsmap.h | 1 + include/linux/ceph/messenger.h | 1 + include/linux/ceph/mon_client.h | 1 + include/linux/ceph/msgpool.h | 1 + include/linux/ceph/msgr.h | 1 + include/linux/ceph/osd_client.h | 1 + include/linux/ceph/osdmap.h | 1 + include/linux/ceph/pagelist.h | 1 + include/linux/ceph/rados.h | 1 + include/linux/ceph/string_table.h | 1 + include/linux/ceph/types.h | 1 + include/linux/cgroup-defs.h | 1 + include/linux/cgroup.h | 1 + include/linux/cgroup_subsys.h | 1 + include/linux/circ_buf.h | 1 + include/linux/cleancache.h | 1 + include/linux/clk/mmp.h | 1 + include/linux/clockchips.h | 1 + include/linux/clocksource.h | 1 + include/linux/cm4000_cs.h | 1 + include/linux/cma.h | 1 + include/linux/cmdline-parser.h | 1 + include/linux/coda_psdev.h | 1 + include/linux/compaction.h | 1 + include/linux/compat.h | 1 + include/linux/compiler-clang.h | 1 + include/linux/compiler-gcc.h | 1 + include/linux/compiler-intel.h | 1 + include/linux/compiler.h | 1 + include/linux/completion.h | 1 + include/linux/component.h | 1 + include/linux/console_struct.h | 1 + include/linux/consolemap.h | 1 + include/linux/context_tracking.h | 1 + include/linux/context_tracking_state.h | 1 + include/linux/coredump.h | 1 + include/linux/coresight-stm.h | 1 + include/linux/cpu.h | 1 + include/linux/cpuhotplug.h | 1 + include/linux/cpumask.h | 1 + include/linux/cpuset.h | 1 + include/linux/crash_core.h | 1 + include/linux/crash_dump.h | 1 + include/linux/crc-ccitt.h | 1 + include/linux/crc-t10dif.h | 1 + include/linux/crc32c.h | 1 + include/linux/crc4.h | 1 + include/linux/crc7.h | 1 + include/linux/crush/crush.h | 1 + include/linux/crush/hash.h | 1 + include/linux/crush/mapper.h | 1 + include/linux/cryptohash.h | 1 + include/linux/ctype.h | 1 + include/linux/cuda.h | 1 + include/linux/cyclades.h | 1 + include/linux/dax.h | 1 + include/linux/dcache.h | 1 + include/linux/dccp.h | 1 + include/linux/dcookies.h | 1 + include/linux/debug_locks.h | 1 + include/linux/debugobjects.h | 1 + include/linux/decompress/bunzip2.h | 1 + include/linux/decompress/generic.h | 1 + include/linux/decompress/inflate.h | 1 + include/linux/decompress/mm.h | 1 + include/linux/decompress/unlz4.h | 1 + include/linux/decompress/unlzma.h | 1 + include/linux/decompress/unlzo.h | 1 + include/linux/delay.h | 1 + include/linux/delayed_call.h | 1 + include/linux/dell-led.h | 1 + include/linux/device_cgroup.h | 1 + include/linux/dio.h | 1 + include/linux/dirent.h | 1 + include/linux/dma-direction.h | 1 + include/linux/dma-mapping.h | 1 + include/linux/dma/mmp-pdma.h | 1 + include/linux/dma/pxa-dma.h | 1 + include/linux/dma_remapping.h | 1 + include/linux/dmi.h | 1 + include/linux/dnotify.h | 1 + include/linux/dqblk_qtree.h | 1 + include/linux/dqblk_v1.h | 1 + include/linux/dqblk_v2.h | 1 + include/linux/drbd_genl.h | 1 + include/linux/drbd_genl_api.h | 1 + include/linux/drbd_limits.h | 1 + include/linux/ds2782_battery.h | 1 + include/linux/dtlk.h | 1 + include/linux/dynamic_debug.h | 1 + include/linux/dynamic_queue_limits.h | 1 + include/linux/earlycpio.h | 1 + include/linux/ecryptfs.h | 1 + include/linux/eeprom_93xx46.h | 1 + include/linux/efi-bgrt.h | 1 + include/linux/efi.h | 1 + include/linux/efs_vh.h | 1 + include/linux/eisa.h | 1 + include/linux/elevator.h | 1 + include/linux/elf-randomize.h | 1 + include/linux/elf.h | 1 + include/linux/elfcore-compat.h | 1 + include/linux/elfcore.h | 1 + include/linux/elfnote.h | 1 + include/linux/err.h | 1 + include/linux/errno.h | 1 + include/linux/errqueue.h | 1 + include/linux/errseq.h | 1 + include/linux/ethtool.h | 1 + include/linux/eventfd.h | 1 + include/linux/evm.h | 1 + include/linux/exportfs.h | 1 + include/linux/ext2_fs.h | 1 + include/linux/extable.h | 1 + include/linux/falloc.h | 1 + include/linux/fanotify.h | 1 + include/linux/fault-inject.h | 1 + include/linux/fb.h | 1 + include/linux/fcntl.h | 1 + include/linux/fd.h | 1 + include/linux/fdtable.h | 1 + include/linux/file.h | 1 + include/linux/filter.h | 1 + include/linux/fips.h | 1 + include/linux/firewire.h | 1 + include/linux/firmware.h | 1 + include/linux/flat.h | 1 + include/linux/flex_array.h | 1 + include/linux/flex_proportions.h | 1 + include/linux/fmc-sdb.h | 1 + include/linux/fpga/fpga-bridge.h | 1 + include/linux/frame.h | 1 + include/linux/freezer.h | 1 + include/linux/frontswap.h | 1 + include/linux/fs.h | 1 + include/linux/fs_pin.h | 1 + include/linux/fs_stack.h | 1 + include/linux/fs_struct.h | 1 + include/linux/fscrypt_common.h | 1 + include/linux/fscrypt_notsupp.h | 1 + include/linux/fscrypt_supp.h | 1 + include/linux/fsl/edac.h | 1 + include/linux/fsnotify.h | 1 + include/linux/fsnotify_backend.h | 1 + include/linux/ftrace.h | 1 + include/linux/ftrace_irq.h | 1 + include/linux/futex.h | 1 + include/linux/gcd.h | 1 + include/linux/genetlink.h | 1 + include/linux/genhd.h | 1 + include/linux/genl_magic_func.h | 1 + include/linux/genl_magic_struct.h | 1 + include/linux/getcpu.h | 1 + include/linux/gfp.h | 1 + include/linux/glob.h | 1 + include/linux/goldfish.h | 1 + include/linux/gpio-pxa.h | 1 + include/linux/gpio.h | 1 + include/linux/gpio/consumer.h | 1 + include/linux/gpio/driver.h | 1 + include/linux/gpio/gpio-reg.h | 1 + include/linux/gpio/machine.h | 1 + include/linux/gpio_keys.h | 1 + include/linux/hardirq.h | 1 + include/linux/hashtable.h | 1 + include/linux/hdlcdrv.h | 1 + include/linux/highmem.h | 1 + include/linux/highuid.h | 1 + include/linux/hpet.h | 1 + include/linux/htcpld.h | 1 + include/linux/htirq.h | 1 + include/linux/huge_mm.h | 1 + include/linux/hugetlb.h | 1 + include/linux/hugetlb_inline.h | 1 + include/linux/hw_breakpoint.h | 1 + include/linux/hypervisor.h | 1 + include/linux/i2c-algo-pca.h | 1 + include/linux/i2c-omap.h | 1 + include/linux/i2c-pca-platform.h | 1 + include/linux/i2c-pxa.h | 1 + include/linux/i7300_idle.h | 1 + include/linux/icmpv6.h | 1 + include/linux/ide.h | 1 + include/linux/if_link.h | 1 + include/linux/if_ltalk.h | 1 + include/linux/if_macvlan.h | 1 + include/linux/if_phonet.h | 1 + include/linux/if_tap.h | 1 + include/linux/if_tunnel.h | 1 + include/linux/ihex.h | 1 + include/linux/iio/buffer_impl.h | 1 + include/linux/iio/dac/ad5421.h | 1 + include/linux/iio/kfifo_buf.h | 1 + include/linux/iio/magnetometer/ak8975.h | 1 + include/linux/iio/triggered_buffer.h | 1 + include/linux/iio/triggered_event.h | 1 + include/linux/inet_diag.h | 1 + include/linux/inetdevice.h | 1 + include/linux/init.h | 1 + include/linux/init_ohci1394_dma.h | 1 + include/linux/init_task.h | 1 + include/linux/initrd.h | 1 + include/linux/inotify.h | 1 + include/linux/input/cy8ctmg110_pdata.h | 1 + include/linux/input/gp2ap002a00f.h | 1 + include/linux/input/gpio_tilt.h | 1 + include/linux/input/ili210x.h | 1 + include/linux/input/matrix_keypad.h | 1 + include/linux/input/sh_keysc.h | 1 + include/linux/interrupt.h | 1 + include/linux/interval_tree.h | 1 + include/linux/io-64-nonatomic-hi-lo.h | 1 + include/linux/io-64-nonatomic-lo-hi.h | 1 + include/linux/iocontext.h | 1 + include/linux/iomap.h | 1 + include/linux/iommu-common.h | 1 + include/linux/iommu-helper.h | 1 + include/linux/ioport.h | 1 + include/linux/ioprio.h | 1 + include/linux/ipc.h | 1 + include/linux/ipc_namespace.h | 1 + include/linux/ipv6.h | 1 + include/linux/irq.h | 1 + include/linux/irq_cpustat.h | 1 + include/linux/irq_poll.h | 1 + include/linux/irq_work.h | 1 + include/linux/irqchip/metag-ext.h | 1 + include/linux/irqchip/metag.h | 1 + include/linux/irqchip/mmp.h | 1 + include/linux/irqchip/versatile-fpga.h | 1 + include/linux/irqdesc.h | 1 + include/linux/irqdomain.h | 1 + include/linux/irqflags.h | 1 + include/linux/irqhandler.h | 1 + include/linux/irqnr.h | 1 + include/linux/irqreturn.h | 1 + include/linux/isa.h | 1 + include/linux/isicom.h | 1 + include/linux/jiffies.h | 1 + include/linux/journal-head.h | 1 + include/linux/jump_label.h | 1 + include/linux/jump_label_ratelimit.h | 1 + include/linux/jz4740-adc.h | 1 + include/linux/kallsyms.h | 1 + include/linux/kasan-checks.h | 1 + include/linux/kasan.h | 1 + include/linux/kbd_diacr.h | 1 + include/linux/kbd_kern.h | 1 + include/linux/kbuild.h | 1 + include/linux/kconfig.h | 1 + include/linux/kcore.h | 1 + include/linux/kcov.h | 1 + include/linux/kd.h | 1 + include/linux/kdebug.h | 1 + include/linux/kdev_t.h | 1 + include/linux/kern_levels.h | 1 + include/linux/kernel-page-flags.h | 1 + include/linux/kernel.h | 1 + include/linux/kernel_stat.h | 1 + include/linux/kernelcapi.h | 1 + include/linux/kexec.h | 1 + include/linux/keyboard.h | 1 + include/linux/khugepaged.h | 1 + include/linux/kmemcheck.h | 1 + include/linux/kobj_map.h | 1 + include/linux/ksm.h | 1 + include/linux/kthread.h | 1 + include/linux/kvm_para.h | 1 + include/linux/l2tp.h | 1 + include/linux/lapb.h | 1 + include/linux/latencytop.h | 1 + include/linux/lcd.h | 1 + include/linux/lcm.h | 1 + include/linux/leds_pwm.h | 1 + include/linux/libfdt.h | 1 + include/linux/libfdt_env.h | 1 + include/linux/lightnvm.h | 1 + include/linux/linkage.h | 1 + include/linux/linux_logo.h | 1 + include/linux/lis3lv02d.h | 1 + include/linux/list.h | 1 + include/linux/list_bl.h | 1 + include/linux/list_lru.h | 1 + include/linux/list_nulls.h | 1 + include/linux/list_sort.h | 1 + include/linux/lockd/bind.h | 1 + include/linux/lockd/debug.h | 1 + include/linux/lockd/lockd.h | 1 + include/linux/lockd/nlm.h | 1 + include/linux/lockd/share.h | 1 + include/linux/lockd/xdr.h | 1 + include/linux/lockd/xdr4.h | 1 + include/linux/lockdep.h | 1 + include/linux/lockref.h | 1 + include/linux/lp.h | 1 + include/linux/lsm_audit.h | 1 + include/linux/lzo.h | 1 + include/linux/mISDNdsp.h | 1 + include/linux/maple.h | 1 + include/linux/marvell_phy.h | 1 + include/linux/math64.h | 1 + include/linux/mbcache.h | 1 + include/linux/mc6821.h | 1 + include/linux/mdio-bitbang.h | 1 + include/linux/mei_cl_bus.h | 1 + include/linux/memory.h | 1 + include/linux/memory_hotplug.h | 1 + include/linux/mempolicy.h | 1 + include/linux/mempool.h | 1 + include/linux/memremap.h | 1 + include/linux/mfd/da903x.h | 1 + include/linux/mfd/dln2.h | 1 + include/linux/mfd/ds1wm.h | 1 + include/linux/mfd/ezx-pcap.h | 1 + include/linux/mfd/imx25-tsadc.h | 1 + include/linux/mfd/ipaq-micro.h | 1 + include/linux/mfd/menelaus.h | 1 + include/linux/mfd/pcf50633/pmic.h | 1 + include/linux/mfd/qcom_rpm.h | 1 + include/linux/mfd/rdc321x.h | 1 + include/linux/mfd/tmio.h | 1 + include/linux/mfd/tps6586x.h | 1 + include/linux/migrate.h | 1 + include/linux/migrate_mode.h | 1 + include/linux/mii.h | 1 + include/linux/miscdevice.h | 1 + include/linux/mm.h | 1 + include/linux/mm_inline.h | 1 + include/linux/mm_types.h | 1 + include/linux/mm_types_task.h | 1 + include/linux/mman.h | 1 + include/linux/mmc/sdhci-pci-data.h | 1 + include/linux/mmc/sdio_ids.h | 1 + include/linux/mmdebug.h | 1 + include/linux/mmiotrace.h | 1 + include/linux/mmu_context.h | 1 + include/linux/mmu_notifier.h | 1 + include/linux/mmzone.h | 1 + include/linux/mnt_namespace.h | 1 + include/linux/mod_devicetable.h | 1 + include/linux/moduleloader.h | 1 + include/linux/moduleparam.h | 1 + include/linux/mount.h | 1 + include/linux/mpage.h | 1 + include/linux/mpls.h | 1 + include/linux/mpls_iptunnel.h | 1 + include/linux/mroute.h | 1 + include/linux/mroute6.h | 1 + include/linux/msdos_fs.h | 1 + include/linux/msg.h | 1 + include/linux/msi.h | 1 + include/linux/mtd/inftl.h | 1 + include/linux/mtd/mtdram.h | 1 + include/linux/mtd/nand-gpio.h | 1 + include/linux/mtd/pfow.h | 1 + include/linux/mtd/qinfo.h | 1 + include/linux/mutex.h | 1 + include/linux/mv643xx_eth.h | 1 + include/linux/namei.h | 1 + include/linux/netfilter.h | 1 + include/linux/netfilter/ipset/ip_set_bitmap.h | 1 + include/linux/netfilter/ipset/ip_set_getport.h | 1 + include/linux/netfilter/ipset/ip_set_hash.h | 1 + include/linux/netfilter/ipset/ip_set_list.h | 1 + include/linux/netfilter/ipset/pfxlen.h | 1 + include/linux/netfilter/nf_conntrack_amanda.h | 1 + include/linux/netfilter/nf_conntrack_common.h | 1 + include/linux/netfilter/nf_conntrack_dccp.h | 1 + include/linux/netfilter/nf_conntrack_ftp.h | 1 + include/linux/netfilter/nf_conntrack_h323.h | 1 + include/linux/netfilter/nf_conntrack_irc.h | 1 + include/linux/netfilter/nf_conntrack_pptp.h | 1 + include/linux/netfilter/nf_conntrack_proto_gre.h | 1 + include/linux/netfilter/nf_conntrack_sane.h | 1 + include/linux/netfilter/nf_conntrack_sctp.h | 1 + include/linux/netfilter/nf_conntrack_sip.h | 1 + include/linux/netfilter/nf_conntrack_snmp.h | 1 + include/linux/netfilter/nf_conntrack_tcp.h | 1 + include/linux/netfilter/nf_conntrack_tftp.h | 1 + include/linux/netfilter/nf_conntrack_zones_common.h | 1 + include/linux/netfilter/nfnetlink.h | 1 + include/linux/netfilter/nfnetlink_acct.h | 1 + include/linux/netfilter/x_tables.h | 1 + include/linux/netfilter/xt_hashlimit.h | 1 + include/linux/netfilter/xt_physdev.h | 1 + include/linux/netfilter_arp/arp_tables.h | 1 + include/linux/netfilter_bridge.h | 1 + include/linux/netfilter_bridge/ebt_802_3.h | 1 + include/linux/netfilter_bridge/ebtables.h | 1 + include/linux/netfilter_defs.h | 1 + include/linux/netfilter_ingress.h | 1 + include/linux/netfilter_ipv4/ip_tables.h | 1 + include/linux/netfilter_ipv6/ip6_tables.h | 1 + include/linux/netlink.h | 1 + include/linux/netpoll.h | 1 + include/linux/nfs.h | 1 + include/linux/nfs3.h | 1 + include/linux/nfs4.h | 1 + include/linux/nfs_fs.h | 1 + include/linux/nfs_fs_i.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_iostat.h | 1 + include/linux/nfs_page.h | 1 + include/linux/nfs_xdr.h | 1 + include/linux/nfsacl.h | 1 + include/linux/nls.h | 1 + include/linux/nmi.h | 1 + include/linux/node.h | 1 + include/linux/nodemask.h | 1 + include/linux/notifier.h | 1 + include/linux/ns_common.h | 1 + include/linux/nsc_gpio.h | 1 + include/linux/nsproxy.h | 1 + include/linux/nubus.h | 1 + include/linux/numa.h | 1 + include/linux/nvram.h | 1 + include/linux/of_address.h | 1 + include/linux/of_device.h | 1 + include/linux/of_iommu.h | 1 + include/linux/of_irq.h | 1 + include/linux/of_pci.h | 1 + include/linux/of_reserved_mem.h | 1 + include/linux/olpc-ec.h | 1 + include/linux/omap-dma.h | 1 + include/linux/once.h | 1 + include/linux/oom.h | 1 + include/linux/osq_lock.h | 1 + include/linux/oxu210hp.h | 1 + include/linux/page-flags-layout.h | 1 + include/linux/page-flags.h | 1 + include/linux/page-isolation.h | 1 + include/linux/page_counter.h | 1 + include/linux/page_ext.h | 1 + include/linux/page_idle.h | 1 + include/linux/page_owner.h | 1 + include/linux/page_ref.h | 1 + include/linux/pagemap.h | 1 + include/linux/pagevec.h | 1 + include/linux/parport_pc.h | 1 + include/linux/parser.h | 1 + include/linux/patchkey.h | 1 + include/linux/path.h | 1 + include/linux/pci-acpi.h | 1 + include/linux/pci-aspm.h | 1 + include/linux/pci-ats.h | 1 + include/linux/pci-dma-compat.h | 1 + include/linux/pci-dma.h | 1 + include/linux/pci.h | 1 + include/linux/pci_ids.h | 1 + include/linux/pcieport_if.h | 1 + include/linux/percpu-refcount.h | 1 + include/linux/percpu-rwsem.h | 1 + include/linux/percpu.h | 1 + include/linux/percpu_counter.h | 1 + include/linux/percpu_ida.h | 1 + include/linux/perf_regs.h | 1 + include/linux/personality.h | 1 + include/linux/pfn.h | 1 + include/linux/pfn_t.h | 1 + include/linux/phy/ulpi_phy.h | 1 + include/linux/phy_fixed.h | 1 + include/linux/pid.h | 1 + include/linux/pid_namespace.h | 1 + include/linux/pim.h | 1 + include/linux/pinctrl/pinctrl-state.h | 1 + include/linux/pipe_fs_i.h | 1 + include/linux/pkeys.h | 1 + include/linux/platform_data/ad7291.h | 1 + include/linux/platform_data/ad7791.h | 1 + include/linux/platform_data/ad7879.h | 1 + include/linux/platform_data/asoc-imx-ssi.h | 1 + include/linux/platform_data/asoc-kirkwood.h | 1 + include/linux/platform_data/asoc-mx27vis.h | 1 + include/linux/platform_data/asoc-palm27x.h | 1 + include/linux/platform_data/bcmgenet.h | 1 + include/linux/platform_data/crypto-atmel.h | 1 + include/linux/platform_data/dma-ep93xx.h | 1 + include/linux/platform_data/dma-imx-sdma.h | 1 + include/linux/platform_data/dma-mv_xor.h | 1 + include/linux/platform_data/ds620.h | 1 + include/linux/platform_data/efm32-spi.h | 1 + include/linux/platform_data/efm32-uart.h | 1 + include/linux/platform_data/gpio-htc-egpio.h | 1 + include/linux/platform_data/i2c-nuc900.h | 1 + include/linux/platform_data/irda-pxaficp.h | 1 + include/linux/platform_data/itco_wdt.h | 1 + include/linux/platform_data/keyboard-pxa930_rotary.h | 1 + include/linux/platform_data/keypad-ep93xx.h | 1 + include/linux/platform_data/keypad-pxa27x.h | 1 + include/linux/platform_data/keypad-w90p910.h | 1 + include/linux/platform_data/lcd-mipid.h | 1 + include/linux/platform_data/max3421-hcd.h | 1 + include/linux/platform_data/max6639.h | 1 + include/linux/platform_data/max732x.h | 1 + include/linux/platform_data/media/ir-rx51.h | 1 + include/linux/platform_data/media/mmp-camera.h | 1 + include/linux/platform_data/media/omap4iss.h | 1 + include/linux/platform_data/mmc-davinci.h | 1 + include/linux/platform_data/mmc-mxcmmc.h | 1 + include/linux/platform_data/mmc-pxamci.h | 1 + include/linux/platform_data/mmc-s3cmci.h | 1 + include/linux/platform_data/mmc-sdhci-s3c.h | 1 + include/linux/platform_data/mouse-pxa930_trkball.h | 1 + include/linux/platform_data/mtd-nand-pxa3xx.h | 1 + include/linux/platform_data/omap1_bl.h | 1 + include/linux/platform_data/pca953x.h | 1 + include/linux/platform_data/pcf857x.h | 1 + include/linux/platform_data/pcmcia-pxa2xx_viper.h | 1 + include/linux/platform_data/pinctrl-single.h | 1 + include/linux/platform_data/pixcir_i2c_ts.h | 1 + include/linux/platform_data/pxa2xx_udc.h | 1 + include/linux/platform_data/sa11x0-serial.h | 1 + include/linux/platform_data/si5351.h | 1 + include/linux/platform_data/spi-ep93xx.h | 1 + include/linux/platform_data/spi-imx.h | 1 + include/linux/platform_data/spi-omap2-mcspi.h | 1 + include/linux/platform_data/st1232_pdata.h | 1 + include/linux/platform_data/syscon.h | 1 + include/linux/platform_data/tsc2007.h | 1 + include/linux/platform_data/tsl2563.h | 1 + include/linux/platform_data/usb-ehci-mxc.h | 1 + include/linux/platform_data/usb-ohci-pxa27x.h | 1 + include/linux/platform_data/usb3503.h | 1 + include/linux/platform_data/video-clcd-versatile.h | 1 + include/linux/platform_data/video-ep93xx.h | 1 + include/linux/platform_data/video-imxfb.h | 1 + include/linux/platform_data/video_s3c.h | 1 + include/linux/pm-trace.h | 1 + include/linux/pm_qos.h | 1 + include/linux/pmu.h | 1 + include/linux/pnp.h | 1 + include/linux/poison.h | 1 + include/linux/poll.h | 1 + include/linux/posix-timers.h | 1 + include/linux/posix_acl.h | 1 + include/linux/posix_acl_xattr.h | 1 + include/linux/power/bq27xxx_battery.h | 1 + include/linux/pr.h | 1 + include/linux/preempt.h | 1 + include/linux/prefetch.h | 1 + include/linux/prime_numbers.h | 1 + include/linux/printk.h | 1 + include/linux/proc_fs.h | 1 + include/linux/proc_ns.h | 1 + include/linux/processor.h | 1 + include/linux/profile.h | 1 + include/linux/projid.h | 1 + include/linux/ptrace.h | 1 + include/linux/purgatory.h | 1 + include/linux/pvclock_gtod.h | 1 + include/linux/pwm.h | 1 + include/linux/pwm_backlight.h | 1 + include/linux/pxa168_eth.h | 1 + include/linux/qed/qed_fcoe_if.h | 1 + include/linux/qnx6_fs.h | 1 + include/linux/quicklist.h | 1 + include/linux/quotaops.h | 1 + include/linux/raid/xor.h | 1 + include/linux/ramfs.h | 1 + include/linux/random.h | 1 + include/linux/range.h | 1 + include/linux/ras.h | 1 + include/linux/ratelimit.h | 1 + include/linux/rational.h | 1 + include/linux/rbtree_latch.h | 1 + include/linux/rculist.h | 1 + include/linux/rculist_bl.h | 1 + include/linux/rculist_nulls.h | 1 + include/linux/rcupdate_wait.h | 1 + include/linux/rcuwait.h | 1 + include/linux/reboot-mode.h | 1 + include/linux/reboot.h | 1 + include/linux/reciprocal_div.h | 1 + include/linux/refcount.h | 1 + include/linux/regulator/of_regulator.h | 1 + include/linux/regulator/userspace-consumer.h | 1 + include/linux/relay.h | 1 + include/linux/reset-controller.h | 1 + include/linux/reset.h | 1 + include/linux/resource.h | 1 + include/linux/restart_block.h | 1 + include/linux/ring_buffer.h | 1 + include/linux/rmap.h | 1 + include/linux/rndis.h | 1 + include/linux/root_dev.h | 1 + include/linux/rpmsg/qcom_smd.h | 1 + include/linux/rtc.h | 1 + include/linux/rtmutex.h | 1 + include/linux/rtnetlink.h | 1 + include/linux/rwsem-spinlock.h | 1 + include/linux/rwsem.h | 1 + include/linux/s3c_adc_battery.h | 1 + include/linux/scatterlist.h | 1 + include/linux/scc.h | 1 + include/linux/sched.h | 1 + include/linux/sched/autogroup.h | 1 + include/linux/sched/clock.h | 1 + include/linux/sched/coredump.h | 1 + include/linux/sched/cpufreq.h | 1 + include/linux/sched/cputime.h | 1 + include/linux/sched/deadline.h | 1 + include/linux/sched/debug.h | 1 + include/linux/sched/hotplug.h | 1 + include/linux/sched/idle.h | 1 + include/linux/sched/init.h | 1 + include/linux/sched/jobctl.h | 1 + include/linux/sched/loadavg.h | 1 + include/linux/sched/mm.h | 1 + include/linux/sched/nohz.h | 1 + include/linux/sched/numa_balancing.h | 1 + include/linux/sched/prio.h | 1 + include/linux/sched/rt.h | 1 + include/linux/sched/signal.h | 1 + include/linux/sched/stat.h | 1 + include/linux/sched/sysctl.h | 1 + include/linux/sched/task.h | 1 + include/linux/sched/task_stack.h | 1 + include/linux/sched/topology.h | 1 + include/linux/sched/user.h | 1 + include/linux/sched/wake_q.h | 1 + include/linux/sched/xacct.h | 1 + include/linux/screen_info.h | 1 + include/linux/scx200.h | 1 + include/linux/scx200_gpio.h | 1 + include/linux/sdb.h | 1 + include/linux/seccomp.h | 1 + include/linux/securebits.h | 1 + include/linux/seg6.h | 1 + include/linux/seg6_genl.h | 1 + include/linux/seg6_hmac.h | 1 + include/linux/seg6_iptunnel.h | 1 + include/linux/selection.h | 1 + include/linux/sem.h | 1 + include/linux/seq_buf.h | 1 + include/linux/seq_file.h | 1 + include/linux/seq_file_net.h | 1 + include/linux/seqlock.h | 1 + include/linux/serial_bcm63xx.h | 1 + include/linux/serial_sci.h | 1 + include/linux/sh_clk.h | 1 + include/linux/sh_eth.h | 1 + include/linux/sh_intc.h | 1 + include/linux/sh_timer.h | 1 + include/linux/shm.h | 1 + include/linux/shmem_fs.h | 1 + include/linux/shrinker.h | 1 + include/linux/signal.h | 1 + include/linux/signal_types.h | 1 + include/linux/signalfd.h | 1 + include/linux/sirfsoc_dma.h | 1 + include/linux/slab.h | 1 + include/linux/slab_def.h | 1 + include/linux/slub_def.h | 1 + include/linux/smc911x.h | 1 + include/linux/smc91x.h | 1 + include/linux/smp.h | 1 + include/linux/smpboot.h | 1 + include/linux/smscphy.h | 1 + include/linux/soc/brcmstb/brcmstb.h | 1 + include/linux/soc/dove/pmu.h | 1 + include/linux/soc/mediatek/infracfg.h | 1 + include/linux/soc/qcom/mdt_loader.h | 1 + include/linux/soc/qcom/smd-rpm.h | 1 + include/linux/soc/qcom/smem.h | 1 + include/linux/soc/qcom/smem_state.h | 1 + include/linux/soc/qcom/wcnss_ctrl.h | 1 + include/linux/soc/renesas/rcar-rst.h | 1 + include/linux/soc/renesas/rcar-sysc.h | 1 + include/linux/sock_diag.h | 1 + include/linux/socket.h | 1 + include/linux/sonet.h | 1 + include/linux/sony-laptop.h | 1 + include/linux/sort.h | 1 + include/linux/sound.h | 1 + include/linux/spi/ad7877.h | 1 + include/linux/spi/ads7846.h | 1 + include/linux/spi/at73c213.h | 1 + include/linux/spi/corgi_lcd.h | 1 + include/linux/spi/ds1305.h | 1 + include/linux/spi/eeprom.h | 1 + include/linux/spi/flash.h | 1 + include/linux/spi/ifx_modem.h | 1 + include/linux/spi/max7301.h | 1 + include/linux/spi/mc33880.h | 1 + include/linux/spi/mcp23s08.h | 1 + include/linux/spi/mmc_spi.h | 1 + include/linux/spi/sh_msiof.h | 1 + include/linux/spi/spi_bitbang.h | 1 + include/linux/spi/spi_gpio.h | 1 + include/linux/spi/spi_oc_tiny.h | 1 + include/linux/spi/tdo24m.h | 1 + include/linux/spi/xilinx_spi.h | 1 + include/linux/spinlock.h | 1 + include/linux/splice.h | 1 + include/linux/ssb/ssb.h | 1 + include/linux/ssb/ssb_driver_gige.h | 1 + include/linux/ssb/ssb_driver_mips.h | 1 + include/linux/ssb/ssb_driver_pci.h | 1 + include/linux/ssb/ssb_embedded.h | 1 + include/linux/ssb/ssb_regs.h | 1 + include/linux/stackprotector.h | 1 + include/linux/stacktrace.h | 1 + include/linux/start_kernel.h | 1 + include/linux/stat.h | 1 + include/linux/statfs.h | 1 + include/linux/stddef.h | 1 + include/linux/stop_machine.h | 1 + include/linux/string.h | 1 + include/linux/string_helpers.h | 1 + include/linux/stringhash.h | 1 + include/linux/sungem_phy.h | 1 + include/linux/sunrpc/addr.h | 1 + include/linux/sunrpc/auth.h | 1 + include/linux/sunrpc/auth_gss.h | 1 + include/linux/sunrpc/clnt.h | 1 + include/linux/sunrpc/debug.h | 1 + include/linux/sunrpc/gss_api.h | 1 + include/linux/sunrpc/metrics.h | 1 + include/linux/sunrpc/msg_prot.h | 1 + include/linux/sunrpc/rpc_pipe_fs.h | 1 + include/linux/sunrpc/sched.h | 1 + include/linux/sunrpc/stats.h | 1 + include/linux/sunrpc/svc.h | 1 + include/linux/sunrpc/svc_xprt.h | 1 + include/linux/sunrpc/svcauth.h | 1 + include/linux/sunrpc/svcauth_gss.h | 1 + include/linux/sunrpc/svcsock.h | 1 + include/linux/sunrpc/timer.h | 1 + include/linux/sunrpc/types.h | 1 + include/linux/sunrpc/xdr.h | 1 + include/linux/sunrpc/xprt.h | 1 + include/linux/sunrpc/xprtmultipath.h | 1 + include/linux/sunrpc/xprtsock.h | 1 + include/linux/sunserialcore.h | 1 + include/linux/suspend.h | 1 + include/linux/svga.h | 1 + include/linux/sw842.h | 1 + include/linux/swab.h | 1 + include/linux/swait.h | 1 + include/linux/swap.h | 1 + include/linux/swap_cgroup.h | 1 + include/linux/swap_slots.h | 1 + include/linux/swapfile.h | 1 + include/linux/swapops.h | 1 + include/linux/swiotlb.h | 1 + include/linux/sys.h | 1 + include/linux/sysctl.h | 1 + include/linux/sysfs.h | 1 + include/linux/sysrq.h | 1 + include/linux/sysv_fs.h | 1 + include/linux/t10-pi.h | 1 + include/linux/task_io_accounting.h | 1 + include/linux/task_io_accounting_ops.h | 1 + include/linux/task_work.h | 1 + include/linux/taskstats_kern.h | 1 + include/linux/textsearch.h | 1 + include/linux/textsearch_fsm.h | 1 + include/linux/thinkpad_acpi.h | 1 + include/linux/thread_info.h | 1 + include/linux/threads.h | 1 + include/linux/tick.h | 1 + include/linux/time.h | 1 + include/linux/time64.h | 1 + include/linux/timekeeper_internal.h | 1 + include/linux/timekeeping.h | 1 + include/linux/timer.h | 1 + include/linux/timerfd.h | 1 + include/linux/timerqueue.h | 1 + include/linux/tpm_command.h | 1 + include/linux/trace.h | 1 + include/linux/trace_clock.h | 1 + include/linux/trace_events.h | 1 + include/linux/trace_seq.h | 1 + include/linux/tracepoint-defs.h | 1 + include/linux/tsacct_kern.h | 1 + include/linux/tty.h | 1 + include/linux/tty_driver.h | 1 + include/linux/tty_flip.h | 1 + include/linux/tty_ldisc.h | 1 + include/linux/typecheck.h | 1 + include/linux/types.h | 1 + include/linux/u64_stats_sync.h | 1 + include/linux/uaccess.h | 1 + include/linux/ucs2_string.h | 1 + include/linux/uidgid.h | 1 + include/linux/ulpi/driver.h | 1 + include/linux/ulpi/interface.h | 1 + include/linux/ulpi/regs.h | 1 + include/linux/unaligned/access_ok.h | 1 + include/linux/unaligned/be_byteshift.h | 1 + include/linux/unaligned/be_memmove.h | 1 + include/linux/unaligned/be_struct.h | 1 + include/linux/unaligned/generic.h | 1 + include/linux/unaligned/le_byteshift.h | 1 + include/linux/unaligned/le_memmove.h | 1 + include/linux/unaligned/le_struct.h | 1 + include/linux/unaligned/memmove.h | 1 + include/linux/usb.h | 1 + include/linux/usb/atmel_usba_udc.h | 1 + include/linux/usb/ch9.h | 1 + include/linux/usb/chipidea.h | 1 + include/linux/usb/ehci-dbgp.h | 1 + include/linux/usb/ezusb.h | 1 + include/linux/usb/functionfs.h | 1 + include/linux/usb/gadget_configfs.h | 1 + include/linux/usb/iowarrior.h | 1 + include/linux/usb/irda.h | 1 + include/linux/usb/isp116x.h | 1 + include/linux/usb/isp1362.h | 1 + include/linux/usb/isp1760.h | 1 + include/linux/usb/musb.h | 1 + include/linux/usb/otg.h | 1 + include/linux/usb/phy.h | 1 + include/linux/usb/quirks.h | 1 + include/linux/usb/sl811.h | 1 + include/linux/usb/typec.h | 1 + include/linux/usb/uas.h | 1 + include/linux/usb/usb_phy_generic.h | 1 + include/linux/usb_usual.h | 1 + include/linux/user-return-notifier.h | 1 + include/linux/user_namespace.h | 1 + include/linux/userfaultfd_k.h | 1 + include/linux/util_macros.h | 1 + include/linux/uts.h | 1 + include/linux/utsname.h | 1 + include/linux/vermagic.h | 1 + include/linux/vfs.h | 1 + include/linux/via.h | 1 + include/linux/virtio.h | 1 + include/linux/virtio_byteorder.h | 1 + include/linux/virtio_config.h | 1 + include/linux/virtio_net.h | 1 + include/linux/virtio_ring.h | 1 + include/linux/virtio_vsock.h | 1 + include/linux/vm_event_item.h | 1 + include/linux/vmacache.h | 1 + include/linux/vmalloc.h | 1 + include/linux/vme.h | 1 + include/linux/vmpressure.h | 1 + include/linux/vmstat.h | 1 + include/linux/vt.h | 1 + include/linux/vt_buffer.h | 1 + include/linux/vt_kern.h | 1 + include/linux/vtime.h | 1 + include/linux/wait.h | 1 + include/linux/wait_bit.h | 1 + include/linux/wanrouter.h | 1 + include/linux/watchdog.h | 1 + include/linux/win_minmax.h | 1 + include/linux/wireless.h | 1 + include/linux/wm97xx.h | 1 + include/linux/workqueue.h | 1 + include/linux/writeback.h | 1 + include/linux/ww_mutex.h | 1 + include/linux/xattr.h | 1 + include/linux/z2_battery.h | 1 + include/linux/zbud.h | 1 + include/linux/zpool.h | 1 + include/media/blackfin/bfin_capture.h | 1 + include/media/drv-intf/saa7146.h | 1 + include/media/drv-intf/saa7146_vv.h | 1 + include/media/drv-intf/sh_mobile_ceu.h | 1 + include/media/i2c-addr.h | 1 + include/media/i2c/ir-kbd-i2c.h | 1 + include/media/i2c/mt9p031.h | 1 + include/media/i2c/mt9t001.h | 1 + include/media/i2c/mt9v032.h | 1 + include/media/tuner-types.h | 1 + include/media/tveeprom.h | 1 + include/media/v4l2-dev.h | 1 + include/media/v4l2-ioctl.h | 1 + include/media/videobuf-dvb.h | 1 + include/media/videobuf2-dvb.h | 1 + include/net/Space.h | 1 + include/net/act_api.h | 1 + include/net/addrconf.h | 1 + include/net/af_unix.h | 1 + include/net/ah.h | 1 + include/net/arp.h | 1 + include/net/atmclip.h | 1 + include/net/ax25.h | 1 + include/net/compat.h | 1 + include/net/datalink.h | 1 + include/net/dn.h | 1 + include/net/dn_dev.h | 1 + include/net/dn_fib.h | 1 + include/net/dn_neigh.h | 1 + include/net/dsfield.h | 1 + include/net/dst.h | 1 + include/net/dst_cache.h | 1 + include/net/dst_metadata.h | 1 + include/net/dst_ops.h | 1 + include/net/esp.h | 1 + include/net/fib_rules.h | 1 + include/net/firewire.h | 1 + include/net/flow.h | 1 + include/net/flow_dissector.h | 1 + include/net/fou.h | 1 + include/net/garp.h | 1 + include/net/gen_stats.h | 1 + include/net/genetlink.h | 1 + include/net/geneve.h | 1 + include/net/gre.h | 1 + include/net/gro_cells.h | 1 + include/net/gtp.h | 1 + include/net/gue.h | 1 + include/net/hwbm.h | 1 + include/net/ife.h | 1 + include/net/inet_common.h | 1 + include/net/inet_ecn.h | 1 + include/net/inet_frag.h | 1 + include/net/inetpeer.h | 1 + include/net/ip6_route.h | 1 + include/net/ip6_tunnel.h | 1 + include/net/ip_tunnels.h | 1 + include/net/ip_vs.h | 1 + include/net/ipcomp.h | 1 + include/net/ipconfig.h | 1 + include/net/ipx.h | 1 + include/net/iucv/af_iucv.h | 1 + include/net/iucv/iucv.h | 1 + include/net/iw_handler.h | 1 + include/net/lapb.h | 1 + include/net/lib80211.h | 1 + include/net/lwtunnel.h | 1 + include/net/mld.h | 1 + include/net/mrp.h | 1 + include/net/ncsi.h | 1 + include/net/ndisc.h | 1 + include/net/neighbour.h | 1 + include/net/net_namespace.h | 1 + include/net/net_ratelimit.h | 1 + include/net/netevent.h | 1 + include/net/netfilter/br_netfilter.h | 1 + include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 1 + include/net/netfilter/ipv4/nf_defrag_ipv4.h | 1 + include/net/netfilter/ipv4/nf_dup_ipv4.h | 1 + include/net/netfilter/ipv4/nf_nat_masquerade.h | 1 + include/net/netfilter/ipv4/nf_reject.h | 1 + include/net/netfilter/ipv6/nf_conntrack_icmpv6.h | 1 + include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 1 + include/net/netfilter/ipv6/nf_defrag_ipv6.h | 1 + include/net/netfilter/ipv6/nf_dup_ipv6.h | 1 + include/net/netfilter/ipv6/nf_nat_masquerade.h | 1 + include/net/netfilter/ipv6/nf_reject.h | 1 + include/net/netfilter/nf_conntrack.h | 1 + include/net/netfilter/nf_conntrack_core.h | 1 + include/net/netfilter/nf_conntrack_ecache.h | 1 + include/net/netfilter/nf_conntrack_expect.h | 1 + include/net/netfilter/nf_conntrack_extend.h | 1 + include/net/netfilter/nf_conntrack_helper.h | 1 + include/net/netfilter/nf_conntrack_l3proto.h | 1 + include/net/netfilter/nf_conntrack_l4proto.h | 1 + include/net/netfilter/nf_conntrack_labels.h | 1 + include/net/netfilter/nf_conntrack_seqadj.h | 1 + include/net/netfilter/nf_conntrack_synproxy.h | 1 + include/net/netfilter/nf_conntrack_timeout.h | 1 + include/net/netfilter/nf_conntrack_timestamp.h | 1 + include/net/netfilter/nf_conntrack_tuple.h | 1 + include/net/netfilter/nf_conntrack_zones.h | 1 + include/net/netfilter/nf_dup_netdev.h | 1 + include/net/netfilter/nf_log.h | 1 + include/net/netfilter/nf_nat.h | 1 + include/net/netfilter/nf_nat_core.h | 1 + include/net/netfilter/nf_nat_helper.h | 1 + include/net/netfilter/nf_nat_l3proto.h | 1 + include/net/netfilter/nf_nat_l4proto.h | 1 + include/net/netfilter/nf_nat_redirect.h | 1 + include/net/netfilter/nf_queue.h | 1 + include/net/netfilter/nf_socket.h | 1 + include/net/netfilter/nf_tables.h | 1 + include/net/netfilter/nf_tables_core.h | 1 + include/net/netfilter/nf_tables_ipv4.h | 1 + include/net/netfilter/nf_tables_ipv6.h | 1 + include/net/netfilter/nfnetlink_log.h | 1 + include/net/netfilter/nft_dup.h | 1 + include/net/netfilter/nft_fib.h | 1 + include/net/netfilter/nft_masq.h | 1 + include/net/netfilter/nft_meta.h | 1 + include/net/netfilter/nft_redir.h | 1 + include/net/netfilter/nft_reject.h | 1 + include/net/netfilter/xt_rateest.h | 1 + include/net/netlink.h | 1 + include/net/netns/can.h | 1 + include/net/netns/conntrack.h | 1 + include/net/netns/core.h | 1 + include/net/netns/dccp.h | 1 + include/net/netns/generic.h | 1 + include/net/netns/hash.h | 1 + include/net/netns/ieee802154_6lowpan.h | 1 + include/net/netns/ipv4.h | 1 + include/net/netns/ipv6.h | 1 + include/net/netns/mib.h | 1 + include/net/netns/mpls.h | 1 + include/net/netns/netfilter.h | 1 + include/net/netns/nftables.h | 1 + include/net/netns/packet.h | 1 + include/net/netns/sctp.h | 1 + include/net/netns/unix.h | 1 + include/net/netns/x_tables.h | 1 + include/net/netns/xfrm.h | 1 + include/net/netrom.h | 1 + include/net/nexthop.h | 1 + include/net/p8022.h | 1 + include/net/pkt_cls.h | 1 + include/net/pkt_sched.h | 1 + include/net/pptp.h | 1 + include/net/psample.h | 1 + include/net/psnap.h | 1 + include/net/rawv6.h | 1 + include/net/red.h | 1 + include/net/rose.h | 1 + include/net/rtnetlink.h | 1 + include/net/sch_generic.h | 1 + include/net/scm.h | 1 + include/net/secure_seq.h | 1 + include/net/smc.h | 1 + include/net/sock_reuseport.h | 1 + include/net/stp.h | 1 + include/net/tc_act/tc_connmark.h | 1 + include/net/tc_act/tc_csum.h | 1 + include/net/tc_act/tc_defact.h | 1 + include/net/tc_act/tc_gact.h | 1 + include/net/tc_act/tc_ife.h | 1 + include/net/tc_act/tc_ipt.h | 1 + include/net/tc_act/tc_mirred.h | 1 + include/net/tc_act/tc_nat.h | 1 + include/net/tc_act/tc_pedit.h | 1 + include/net/tc_act/tc_sample.h | 1 + include/net/transp_v6.h | 1 + include/net/tso.h | 1 + include/net/udp_tunnel.h | 1 + include/net/udplite.h | 1 + include/net/vxlan.h | 1 + include/net/wext.h | 1 + include/net/x25.h | 1 + include/net/x25device.h | 1 + include/net/xfrm.h | 1 + include/ras/ras_event.h | 1 + include/rdma/rdma_netlink.h | 1 + include/scsi/osd_attributes.h | 1 + include/scsi/scsi.h | 1 + include/scsi/scsi_cmnd.h | 1 + include/scsi/scsi_common.h | 1 + include/scsi/scsi_dbg.h | 1 + include/scsi/scsi_device.h | 1 + include/scsi/scsi_devinfo.h | 1 + include/scsi/scsi_driver.h | 1 + include/scsi/scsi_eh.h | 1 + include/scsi/scsi_host.h | 1 + include/scsi/scsi_ioctl.h | 1 + include/scsi/scsi_proto.h | 1 + include/scsi/scsi_request.h | 1 + include/scsi/scsi_tcq.h | 1 + include/scsi/scsi_transport_sas.h | 1 + include/scsi/scsi_transport_srp.h | 1 + include/scsi/scsicam.h | 1 + include/scsi/sg.h | 1 + include/sound/aci.h | 1 + include/sound/alc5623.h | 1 + include/sound/hda_chmap.h | 1 + include/sound/hda_i915.h | 1 + include/sound/hda_register.h | 1 + include/sound/hda_regmap.h | 1 + include/sound/hda_verbs.h | 1 + include/sound/hdaudio.h | 1 + include/sound/hdaudio_ext.h | 1 + include/sound/l3.h | 1 + include/sound/pcm_drm_eld.h | 1 + include/sound/pcm_iec958.h | 1 + include/sound/pxa2xx-lib.h | 1 + include/sound/s3c24xx_uda134x.h | 1 + include/sound/snd_wavefront.h | 1 + include/sound/tas5086.h | 1 + include/target/iscsi/iscsi_target_core.h | 1 + include/target/iscsi/iscsi_target_stat.h | 1 + include/target/iscsi/iscsi_transport.h | 1 + include/target/target_core_backend.h | 1 + include/target/target_core_base.h | 1 + include/target/target_core_fabric.h | 1 + include/trace/define_trace.h | 1 + include/trace/events/9p.h | 1 + include/trace/events/alarmtimer.h | 1 + include/trace/events/asoc.h | 1 + include/trace/events/bcache.h | 1 + include/trace/events/block.h | 1 + include/trace/events/bpf.h | 1 + include/trace/events/btrfs.h | 1 + include/trace/events/cgroup.h | 1 + include/trace/events/cma.h | 1 + include/trace/events/compaction.h | 1 + include/trace/events/context_tracking.h | 1 + include/trace/events/cpuhp.h | 1 + include/trace/events/devlink.h | 1 + include/trace/events/dma_fence.h | 1 + include/trace/events/ext4.h | 1 + include/trace/events/f2fs.h | 1 + include/trace/events/fib.h | 1 + include/trace/events/fib6.h | 1 + include/trace/events/filelock.h | 1 + include/trace/events/filemap.h | 1 + include/trace/events/fs_dax.h | 1 + include/trace/events/fsi.h | 1 + include/trace/events/fsi_master_gpio.h | 1 + include/trace/events/gpio.h | 1 + include/trace/events/hswadsp.h | 1 + include/trace/events/huge_memory.h | 1 + include/trace/events/intel-sst.h | 1 + include/trace/events/intel_ish.h | 1 + include/trace/events/iommu.h | 1 + include/trace/events/ipi.h | 1 + include/trace/events/irq.h | 1 + include/trace/events/jbd2.h | 1 + include/trace/events/kmem.h | 1 + include/trace/events/kvm.h | 1 + include/trace/events/libata.h | 1 + include/trace/events/lock.h | 1 + include/trace/events/mce.h | 1 + include/trace/events/mdio.h | 1 + include/trace/events/migrate.h | 1 + include/trace/events/mmc.h | 1 + include/trace/events/mmflags.h | 1 + include/trace/events/module.h | 1 + include/trace/events/napi.h | 1 + include/trace/events/net.h | 1 + include/trace/events/nilfs2.h | 1 + include/trace/events/nmi.h | 1 + include/trace/events/oom.h | 1 + include/trace/events/page_isolation.h | 1 + include/trace/events/page_ref.h | 1 + include/trace/events/pagemap.h | 1 + include/trace/events/percpu.h | 1 + include/trace/events/power.h | 1 + include/trace/events/power_cpu_migrate.h | 1 + include/trace/events/printk.h | 1 + include/trace/events/random.h | 1 + include/trace/events/rcu.h | 1 + include/trace/events/regulator.h | 1 + include/trace/events/rpm.h | 1 + include/trace/events/sched.h | 1 + include/trace/events/scsi.h | 1 + include/trace/events/signal.h | 1 + include/trace/events/skb.h | 1 + include/trace/events/sock.h | 1 + include/trace/events/spi.h | 1 + include/trace/events/spmi.h | 1 + include/trace/events/sunrpc.h | 1 + include/trace/events/sunvnet.h | 1 + include/trace/events/swiotlb.h | 1 + include/trace/events/syscalls.h | 1 + include/trace/events/target.h | 1 + include/trace/events/task.h | 1 + include/trace/events/thermal.h | 1 + include/trace/events/thermal_power_allocator.h | 1 + include/trace/events/thp.h | 1 + include/trace/events/timer.h | 1 + include/trace/events/tlb.h | 1 + include/trace/events/udp.h | 1 + include/trace/events/v4l2.h | 1 + include/trace/events/vb2.h | 1 + include/trace/events/vmscan.h | 1 + include/trace/events/vsock_virtio_transport_common.h | 1 + include/trace/events/wbt.h | 1 + include/trace/events/workqueue.h | 1 + include/trace/events/writeback.h | 1 + include/trace/events/xdp.h | 1 + include/trace/events/xen.h | 1 + include/trace/perf.h | 1 + include/trace/syscall.h | 1 + include/trace/trace_events.h | 1 + include/video/aty128.h | 1 + include/video/edid.h | 1 + include/video/iga.h | 1 + include/video/mbxfb.h | 1 + include/video/newport.h | 1 + include/video/radeon.h | 1 + include/video/sh_mobile_lcdc.h | 1 + include/video/sh_mobile_meram.h | 1 + include/video/sstfb.h | 1 + include/video/tdfx.h | 1 + include/video/trident.h | 1 + include/video/udlfb.h | 1 + include/video/uvesafb.h | 1 + include/xen/arm/hypervisor.h | 1 + include/xen/arm/interface.h | 1 + include/xen/arm/page-coherent.h | 1 + include/xen/arm/page.h | 1 + include/xen/balloon.h | 1 + include/xen/events.h | 1 + include/xen/features.h | 1 + include/xen/hvc-console.h | 1 + include/xen/hvm.h | 1 + include/xen/interface/event_channel.h | 1 + include/xen/interface/features.h | 1 + include/xen/interface/io/blkif.h | 1 + include/xen/interface/io/console.h | 1 + include/xen/interface/io/protocols.h | 1 + include/xen/interface/io/ring.h | 1 + include/xen/interface/io/xenbus.h | 1 + include/xen/interface/io/xs_wire.h | 1 + include/xen/interface/memory.h | 1 + include/xen/interface/nmi.h | 1 + include/xen/interface/version.h | 1 + include/xen/interface/xenpmu.h | 1 + include/xen/page.h | 1 + include/xen/platform_pci.h | 1 + include/xen/swiotlb-xen.h | 1 + include/xen/tmem.h | 1 + include/xen/xen-ops.h | 1 + include/xen/xen.h | 1 + init/Makefile | 1 + init/calibrate.c | 1 + init/do_mounts.h | 1 + init/do_mounts_initrd.c | 1 + init/do_mounts_md.c | 1 + init/do_mounts_rd.c | 1 + init/init_task.c | 1 + init/initramfs.c | 1 + ipc/Makefile | 1 + ipc/compat.c | 1 + ipc/msg.c | 1 + ipc/namespace.c | 1 + ipc/sem.c | 1 + ipc/shm.c | 1 + ipc/syscall.c | 1 + ipc/util.c | 1 + ipc/util.h | 1 + kernel/Makefile | 1 + kernel/acct.c | 1 + kernel/audit_tree.c | 1 + kernel/bounds.c | 1 + kernel/bpf/Makefile | 1 + kernel/capability.c | 1 + kernel/cgroup/Makefile | 1 + kernel/cgroup/cgroup-internal.h | 1 + kernel/cgroup/debug.c | 1 + kernel/cgroup/namespace.c | 1 + kernel/dma.c | 1 + kernel/elfcore.c | 1 + kernel/events/Makefile | 1 + kernel/events/internal.h | 1 + kernel/exec_domain.c | 1 + kernel/futex_compat.c | 1 + kernel/gcov/Makefile | 1 + kernel/gcov/base.c | 1 + kernel/gcov/fs.c | 1 + kernel/gcov/gcc_3_4.c | 1 + kernel/gcov/gcc_4_7.c | 1 + kernel/gcov/gcov.h | 1 + kernel/groups.c | 1 + kernel/irq/Makefile | 1 + kernel/irq/affinity.c | 1 + kernel/irq/autoprobe.c | 1 + kernel/irq/debug.h | 1 + kernel/irq/internals.h | 1 + kernel/irq/migration.c | 1 + kernel/irq/proc.c | 1 + kernel/irq/resend.c | 1 + kernel/irq/settings.h | 1 + kernel/irq/spurious.c | 1 + kernel/kcmp.c | 1 + kernel/kcov.c | 1 + kernel/kexec_internal.h | 1 + kernel/livepatch/core.h | 1 + kernel/livepatch/patch.h | 1 + kernel/livepatch/transition.h | 1 + kernel/locking/Makefile | 1 + kernel/locking/lockdep_internals.h | 1 + kernel/locking/lockdep_proc.c | 1 + kernel/locking/mcs_spinlock.h | 1 + kernel/locking/mutex-debug.h | 1 + kernel/locking/mutex.h | 1 + kernel/locking/osq_lock.c | 1 + kernel/locking/qspinlock_paravirt.h | 1 + kernel/locking/rtmutex-debug.c | 1 + kernel/locking/rtmutex-debug.h | 1 + kernel/locking/rtmutex.h | 1 + kernel/locking/rtmutex_common.h | 1 + kernel/locking/rwsem-spinlock.c | 1 + kernel/locking/rwsem-xadd.c | 1 + kernel/locking/rwsem.c | 1 + kernel/locking/rwsem.h | 1 + kernel/locking/spinlock.c | 1 + kernel/power/Makefile | 1 + kernel/power/autosleep.c | 1 + kernel/power/console.c | 1 + kernel/power/power.h | 1 + kernel/power/process.c | 1 + kernel/power/wakelock.c | 1 + kernel/printk/braille.c | 1 + kernel/printk/braille.h | 1 + kernel/printk/console_cmdline.h | 1 + kernel/range.c | 1 + kernel/rcu/Makefile | 1 + kernel/sched/Makefile | 1 + kernel/sched/autogroup.c | 1 + kernel/sched/autogroup.h | 1 + kernel/sched/completion.c | 1 + kernel/sched/cpuacct.c | 1 + kernel/sched/cpuacct.h | 1 + kernel/sched/cpudeadline.h | 1 + kernel/sched/cpupri.h | 1 + kernel/sched/deadline.c | 1 + kernel/sched/fair.c | 1 + kernel/sched/features.h | 1 + kernel/sched/idle_task.c | 1 + kernel/sched/loadavg.c | 1 + kernel/sched/rt.c | 1 + kernel/sched/sched-pelt.h | 1 + kernel/sched/sched.h | 1 + kernel/sched/stats.c | 1 + kernel/sched/stats.h | 1 + kernel/sched/stop_task.c | 1 + kernel/sched/swait.c | 1 + kernel/sched/topology.c | 1 + kernel/seccomp.c | 1 + kernel/smpboot.h | 1 + kernel/sys.c | 1 + kernel/sys_ni.c | 1 + kernel/sysctl_binary.c | 1 + kernel/task_work.c | 1 + kernel/time/Makefile | 1 + kernel/time/itimer.c | 1 + kernel/time/ntp.c | 1 + kernel/time/ntp_internal.h | 1 + kernel/time/posix-cpu-timers.c | 1 + kernel/time/posix-timers.h | 1 + kernel/time/tick-broadcast-hrtimer.c | 1 + kernel/time/tick-internal.h | 1 + kernel/time/tick-sched.h | 1 + kernel/time/timekeeping.h | 1 + kernel/time/timekeeping_internal.h | 1 + kernel/trace/Makefile | 1 + kernel/trace/power-traces.c | 1 + kernel/trace/rpm-traces.c | 1 + kernel/trace/trace.h | 1 + kernel/trace/trace_benchmark.c | 1 + kernel/trace/trace_benchmark.h | 1 + kernel/trace/trace_branch.c | 1 + kernel/trace/trace_entries.h | 1 + kernel/trace/trace_events_filter_test.h | 1 + kernel/trace/trace_export.c | 1 + kernel/trace/trace_functions.c | 1 + kernel/trace/trace_functions_graph.c | 1 + kernel/trace/trace_kdb.c | 1 + kernel/trace/trace_mmiotrace.c | 1 + kernel/trace/trace_nop.c | 1 + kernel/trace/trace_output.h | 1 + kernel/trace/trace_sched_switch.c | 1 + kernel/trace/trace_sched_wakeup.c | 1 + kernel/trace/trace_selftest.c | 1 + kernel/trace/trace_selftest_dynamic.c | 1 + kernel/trace/trace_stack.c | 1 + kernel/trace/trace_stat.c | 1 + kernel/trace/trace_stat.h | 1 + kernel/trace/trace_syscalls.c | 1 + kernel/trace/tracing_map.h | 1 + kernel/uid16.c | 1 + kernel/watchdog.c | 1 + kernel/watchdog_hld.c | 1 + kernel/workqueue_internal.h | 1 + lib/842/842.h | 1 + lib/842/842_debugfs.h | 1 + lib/Makefile | 1 + lib/argv_split.c | 1 + lib/audit.c | 1 + lib/bcd.c | 1 + lib/bug.c | 1 + lib/bust_spinlocks.c | 1 + lib/check_signature.c | 1 + lib/clz_tab.c | 1 + lib/compat_audit.c | 1 + lib/cpumask.c | 1 + lib/crc32defs.h | 1 + lib/ctype.c | 1 + lib/debug_info.c | 1 + lib/dec_and_lock.c | 1 + lib/decompress.c | 1 + lib/decompress_inflate.c | 1 + lib/devres.c | 1 + lib/div64.c | 1 + lib/dma-noop.c | 1 + lib/dma-virt.c | 1 + lib/dump_stack.c | 1 + lib/dynamic_queue_limits.c | 1 + lib/errseq.c | 1 + lib/flex_proportions.c | 1 + lib/fonts/Makefile | 1 + lib/fonts/font_10x18.c | 1 + lib/fonts/font_6x10.c | 1 + lib/fonts/font_6x11.c | 1 + lib/fonts/font_7x14.c | 1 + lib/fonts/font_8x16.c | 1 + lib/fonts/font_8x8.c | 1 + lib/fonts/font_acorn_8x8.c | 1 + lib/fonts/font_pearl_8x8.c | 1 + lib/fonts/font_sun12x22.c | 1 + lib/fonts/font_sun8x16.c | 1 + lib/gen_crc32table.c | 1 + lib/hweight.c | 1 + lib/inflate.c | 1 + lib/int_sqrt.c | 1 + lib/iomap.c | 1 + lib/iommu-common.c | 1 + lib/iommu-helper.c | 1 + lib/ioremap.c | 1 + lib/irq_poll.c | 1 + lib/kasprintf.c | 1 + lib/kstrtox.c | 1 + lib/kstrtox.h | 1 + lib/list_sort.c | 1 + lib/locking-selftest-hardirq.h | 1 + lib/locking-selftest-mutex.h | 1 + lib/locking-selftest-rlock.h | 1 + lib/locking-selftest-rsem.h | 1 + lib/locking-selftest-rtmutex.h | 1 + lib/locking-selftest-softirq.h | 1 + lib/locking-selftest-spin.h | 1 + lib/locking-selftest-wlock.h | 1 + lib/locking-selftest-wsem.h | 1 + lib/locking-selftest.c | 1 + lib/lockref.c | 1 + lib/lzo/lzodefs.h | 1 + lib/memweight.c | 1 + lib/mpi/Makefile | 1 + lib/net_utils.c | 1 + lib/nlattr.c | 1 + lib/nmi_backtrace.c | 1 + lib/nodemask.c | 1 + lib/notifier-error-inject.h | 1 + lib/once.c | 1 + lib/percpu_counter.c | 1 + lib/raid6/Makefile | 1 + lib/raid6/recov_s390xc.c | 1 + lib/raid6/s390vx.uc | 1 + lib/raid6/test/Makefile | 1 + lib/random32.c | 1 + lib/rational.c | 1 + lib/reciprocal_div.c | 1 + lib/refcount.c | 1 + lib/seq_buf.c | 1 + lib/sha1.c | 1 + lib/smp_processor_id.c | 1 + lib/sort.c | 1 + lib/string.c | 1 + lib/strncpy_from_user.c | 1 + lib/strnlen_user.c | 1 + lib/syscall.c | 1 + lib/ubsan.h | 1 + lib/ucs2_string.c | 1 + lib/usercopy.c | 1 + lib/win_minmax.c | 1 + mm/Makefile | 1 + mm/bootmem.c | 1 + mm/cma.h | 1 + mm/cma_debug.c | 1 + mm/compaction.c | 1 + mm/debug.c | 1 + mm/debug_page_ref.c | 1 + mm/early_ioremap.c | 1 + mm/fadvise.c | 1 + mm/failslab.c | 1 + mm/frame_vector.c | 1 + mm/highmem.c | 1 + mm/init-mm.c | 1 + mm/kasan/Makefile | 1 + mm/kasan/kasan.h | 1 + mm/khugepaged.c | 1 + mm/kmemcheck.c | 1 + mm/madvise.c | 1 + mm/mempool.c | 1 + mm/memtest.c | 1 + mm/migrate.c | 1 + mm/mincore.c | 1 + mm/mlock.c | 1 + mm/mmzone.c | 1 + mm/mprotect.c | 1 + mm/mremap.c | 1 + mm/msync.c | 1 + mm/nobootmem.c | 1 + mm/page_counter.c | 1 + mm/page_ext.c | 1 + mm/page_idle.c | 1 + mm/page_io.c | 1 + mm/page_isolation.c | 1 + mm/page_owner.c | 1 + mm/page_poison.c | 1 + mm/page_vma_mapped.c | 1 + mm/pagewalk.c | 1 + mm/percpu-internal.h | 1 + mm/pgtable-generic.c | 1 + mm/quicklist.c | 1 + mm/slab.c | 1 + mm/slab.h | 1 + mm/slab_common.c | 1 + mm/slob.c | 1 + mm/slub.c | 1 + mm/sparse-vmemmap.c | 1 + mm/sparse.c | 1 + mm/swap_cgroup.c | 1 + mm/swap_slots.c | 1 + mm/swap_state.c | 1 + mm/vmacache.c | 1 + mm/vmscan.c | 1 + mm/workingset.c | 1 + net/6lowpan/6lowpan_i.h | 1 + net/6lowpan/Makefile | 1 + net/6lowpan/nhc.h | 1 + net/802/Makefile | 1 + net/8021q/Makefile | 1 + net/8021q/vlan.h | 1 + net/8021q/vlan_core.c | 1 + net/8021q/vlanproc.h | 1 + net/9p/Makefile | 1 + net/Makefile | 1 + net/appletalk/dev.c | 1 + net/appletalk/sysctl_net_atalk.c | 1 + net/atm/Makefile | 1 + net/atm/addr.c | 1 + net/atm/addr.h | 1 + net/atm/atm_misc.c | 1 + net/atm/atm_sysfs.c | 1 + net/atm/common.h | 1 + net/atm/ioctl.c | 1 + net/atm/lec.h | 1 + net/atm/lec_arpc.h | 1 + net/atm/mpc.h | 1 + net/atm/mpoa_caches.c | 1 + net/atm/mpoa_caches.h | 1 + net/atm/mpoa_proc.c | 1 + net/atm/proc.c | 1 + net/atm/protocols.h | 1 + net/atm/pvc.c | 1 + net/atm/raw.c | 1 + net/atm/resources.c | 1 + net/atm/resources.h | 1 + net/atm/signaling.c | 1 + net/atm/signaling.h | 1 + net/atm/svc.c | 1 + net/ax25/Makefile | 1 + net/bluetooth/Makefile | 1 + net/bluetooth/hci_sysfs.c | 1 + net/bridge/Makefile | 1 + net/bridge/br_mdb.c | 1 + net/bridge/br_switchdev.c | 1 + net/bridge/netfilter/Makefile | 1 + net/caif/Makefile | 1 + net/can/Makefile | 1 + net/ceph/Makefile | 1 + net/ceph/armor.c | 1 + net/ceph/auth.c | 1 + net/ceph/auth_none.c | 1 + net/ceph/auth_none.h | 1 + net/ceph/auth_x.c | 1 + net/ceph/auth_x.h | 1 + net/ceph/auth_x_protocol.h | 1 + net/ceph/buffer.c | 1 + net/ceph/ceph_fs.c | 1 + net/ceph/ceph_strings.c | 1 + net/ceph/cls_lock_client.c | 1 + net/ceph/crush/crush.c | 1 + net/ceph/crush/hash.c | 1 + net/ceph/crypto.c | 1 + net/ceph/crypto.h | 1 + net/ceph/debugfs.c | 1 + net/ceph/messenger.c | 1 + net/ceph/mon_client.c | 1 + net/ceph/msgpool.c | 1 + net/ceph/osd_client.c | 1 + net/ceph/osdmap.c | 1 + net/ceph/pagelist.c | 1 + net/ceph/pagevec.c | 1 + net/ceph/string_table.c | 1 + net/core/Makefile | 1 + net/core/datagram.c | 1 + net/core/dev_ioctl.c | 1 + net/core/gro_cells.c | 1 + net/core/net-procfs.c | 1 + net/core/net-sysfs.h | 1 + net/core/net-traces.c | 1 + net/core/sock_reuseport.c | 1 + net/core/stream.c | 1 + net/core/sysctl_net_core.c | 1 + net/core/tso.c | 1 + net/dccp/Makefile | 1 + net/dccp/ccids/lib/tfrc.c | 1 + net/decnet/Makefile | 1 + net/decnet/dn_dev.c | 1 + net/decnet/dn_fib.c | 1 + net/decnet/dn_neigh.c | 1 + net/decnet/dn_rules.c | 1 + net/decnet/dn_table.c | 1 + net/decnet/dn_timer.c | 1 + net/decnet/sysctl_net_decnet.c | 1 + net/dsa/Makefile | 1 + net/ieee802154/6lowpan/6lowpan_i.h | 1 + net/ieee802154/Makefile | 1 + net/ieee802154/core.h | 1 + net/ieee802154/nl802154.h | 1 + net/ieee802154/rdev-ops.h | 1 + net/ieee802154/sysfs.h | 1 + net/ieee802154/trace.h | 1 + net/ipv4/Makefile | 1 + net/ipv4/fib_lookup.h | 1 + net/ipv4/fib_notifier.c | 1 + net/ipv4/ip_forward.c | 1 + net/ipv4/ip_fragment.c | 1 + net/ipv4/ip_options.c | 1 + net/ipv4/ip_sockglue.c | 1 + net/ipv4/ipconfig.c | 1 + net/ipv4/netfilter/Makefile | 1 + net/ipv4/sysctl_net_ipv4.c | 1 + net/ipv4/tcp_fastopen.c | 1 + net/ipv4/tcp_input.c | 1 + net/ipv4/tcp_metrics.c | 1 + net/ipv4/tcp_recovery.c | 1 + net/ipv4/tcp_vegas.h | 1 + net/ipv4/udp_impl.h | 1 + net/ipv4/xfrm4_input.c | 1 + net/ipv4/xfrm4_policy.c | 1 + net/ipv4/xfrm4_state.c | 1 + net/ipv6/Makefile | 1 + net/ipv6/addrlabel.c | 1 + net/ipv6/ila/ila_lwt.c | 1 + net/ipv6/ila/ila_xlat.c | 1 + net/ipv6/ip6_checksum.c | 1 + net/ipv6/ip6_icmp.c | 1 + net/ipv6/netfilter/Makefile | 1 + net/ipv6/sysctl_net_ipv6.c | 1 + net/ipv6/udp_impl.h | 1 + net/ipv6/xfrm6_input.c | 1 + net/ipv6/xfrm6_policy.c | 1 + net/ipv6/xfrm6_state.c | 1 + net/ipx/ipx_proc.c | 1 + net/ipx/ipx_route.c | 1 + net/ipx/pe2.c | 1 + net/ipx/sysctl_net_ipx.c | 1 + net/kcm/kcmproc.c | 1 + net/l2tp/Makefile | 1 + net/llc/sysctl_net_llc.c | 1 + net/mac80211/Makefile | 1 + net/mac80211/debug.h | 1 + net/mac80211/debugfs.h | 1 + net/mac80211/debugfs_key.h | 1 + net/mac80211/debugfs_netdev.h | 1 + net/mac80211/debugfs_sta.h | 1 + net/mac80211/driver-ops.h | 1 + net/mac80211/pm.c | 1 + net/mac80211/trace.c | 1 + net/mac80211/trace.h | 1 + net/mac80211/trace_msg.h | 1 + net/mac802154/cfg.h | 1 + net/mac802154/driver-ops.h | 1 + net/mac802154/trace.c | 1 + net/mac802154/trace.h | 1 + net/mpls/internal.h | 1 + net/netfilter/Makefile | 1 + net/netfilter/ipset/Makefile | 1 + net/netfilter/ipvs/Makefile | 1 + net/netfilter/ipvs/ip_vs_proto_sctp.c | 1 + net/netfilter/ipvs/ip_vs_sync.c | 1 + net/netfilter/nf_internals.h | 1 + net/netfilter/nf_sockopt.c | 1 + net/netfilter/xt_repldata.h | 1 + net/netlabel/Makefile | 1 + net/netlink/af_netlink.h | 1 + net/netlink/genetlink.c | 1 + net/nfc/Makefile | 1 + net/nfc/nci/Makefile | 1 + net/openvswitch/Makefile | 1 + net/packet/internal.h | 1 + net/phonet/Makefile | 1 + net/qrtr/qrtr.h | 1 + net/rds/Makefile | 1 + net/rds/ib.h | 1 + net/rds/info.h | 1 + net/rds/loop.h | 1 + net/rds/rdma_transport.h | 1 + net/rds/rds.h | 1 + net/rds/rds_single_path.h | 1 + net/rds/tcp.h | 1 + net/rxrpc/Makefile | 1 + net/sched/Makefile | 1 + net/sctp/Makefile | 1 + net/smc/smc.h | 1 + net/smc/smc_cdc.c | 1 + net/smc/smc_cdc.h | 1 + net/smc/smc_clc.c | 1 + net/smc/smc_clc.h | 1 + net/smc/smc_close.c | 1 + net/smc/smc_close.h | 1 + net/smc/smc_core.c | 1 + net/smc/smc_core.h | 1 + net/smc/smc_ib.c | 1 + net/smc/smc_ib.h | 1 + net/smc/smc_llc.c | 1 + net/smc/smc_llc.h | 1 + net/smc/smc_pnet.c | 1 + net/smc/smc_pnet.h | 1 + net/smc/smc_rx.c | 1 + net/smc/smc_rx.h | 1 + net/smc/smc_tx.c | 1 + net/smc/smc_tx.h | 1 + net/smc/smc_wr.c | 1 + net/smc/smc_wr.h | 1 + net/sunrpc/Makefile | 1 + net/sunrpc/auth_gss/Makefile | 1 + net/sunrpc/auth_null.c | 1 + net/sunrpc/auth_unix.c | 1 + net/sunrpc/debugfs.c | 1 + net/sunrpc/netns.h | 1 + net/sunrpc/xprtmultipath.c | 1 + net/sunrpc/xprtrdma/Makefile | 1 + net/sunrpc/xprtrdma/backchannel.c | 1 + net/sunrpc/xprtrdma/fmr_ops.c | 1 + net/sunrpc/xprtrdma/frwr_ops.c | 1 + net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + net/sunrpc/xprtrdma/svc_rdma_rw.c | 1 + net/sunrpc/xprtsock.c | 1 + net/tipc/Makefile | 1 + net/unix/Makefile | 1 + net/vmw_vsock/Makefile | 1 + net/wimax/Makefile | 1 + net/wireless/Makefile | 1 + net/wireless/ap.c | 1 + net/wireless/chan.c | 1 + net/wireless/core.h | 1 + net/wireless/debugfs.h | 1 + net/wireless/ethtool.c | 1 + net/wireless/ibss.c | 1 + net/wireless/mesh.c | 1 + net/wireless/mlme.c | 1 + net/wireless/nl80211.h | 1 + net/wireless/rdev-ops.h | 1 + net/wireless/scan.c | 1 + net/wireless/sme.c | 1 + net/wireless/sysfs.h | 1 + net/wireless/trace.h | 1 + net/wireless/util.c | 1 + net/wireless/wext-compat.c | 1 + net/wireless/wext-sme.c | 1 + net/x25/Makefile | 1 + net/x25/sysctl_net_x25.c | 1 + net/xfrm/Makefile | 1 + net/xfrm/xfrm_hash.c | 1 + net/xfrm/xfrm_hash.h | 1 + net/xfrm/xfrm_input.c | 1 + net/xfrm/xfrm_sysctl.c | 1 + samples/auxdisplay/Makefile | 1 + samples/bpf/Makefile | 1 + samples/bpf/bpf_load.c | 1 + samples/bpf/bpf_load.h | 1 + samples/bpf/cgroup_helpers.c | 1 + samples/bpf/cgroup_helpers.h | 1 + samples/bpf/libbpf.h | 1 + samples/bpf/lwt_len_hist.sh | 1 + samples/bpf/lwt_len_hist_user.c | 1 + samples/bpf/run_cookie_uid_helper_example.sh | 1 + samples/bpf/sock_example.h | 1 + samples/bpf/sockex1_user.c | 1 + samples/bpf/sockex2_user.c | 1 + samples/bpf/sockex3_user.c | 1 + samples/bpf/spintest_user.c | 1 + samples/bpf/syscall_nrs.c | 1 + samples/bpf/tc_l2_redirect.sh | 1 + samples/bpf/test_cgrp2_sock.sh | 1 + samples/bpf/test_cgrp2_sock2.c | 1 + samples/bpf/test_cgrp2_sock2.sh | 1 + samples/bpf/test_cgrp2_tc.sh | 1 + samples/bpf/test_cls_bpf.sh | 1 + samples/bpf/test_ipip.sh | 1 + samples/bpf/test_lwt_bpf.sh | 1 + samples/bpf/test_probe_write_user_user.c | 1 + samples/bpf/test_tunnel_bpf.sh | 1 + samples/bpf/tracex1_user.c | 1 + samples/bpf/tracex2_user.c | 1 + samples/bpf/tracex5_user.c | 1 + samples/bpf/tracex6_user.c | 1 + samples/connector/Makefile | 1 + samples/hidraw/Makefile | 1 + samples/hidraw/hid-example.c | 1 + samples/mei/Makefile | 1 + samples/mic/mpssd/Makefile | 1 + samples/pktgen/parameters.sh | 1 + samples/pktgen/pktgen.conf-1-1-ip6 | 1 + samples/pktgen/pktgen.conf-1-1-ip6-rdos | 1 + samples/pktgen/pktgen.conf-1-2 | 1 + samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 1 + samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 1 + samples/pktgen/pktgen_sample01_simple.sh | 1 + samples/pktgen/pktgen_sample02_multiqueue.sh | 1 + samples/pktgen/pktgen_sample03_burst_single_flow.sh | 1 + samples/pktgen/pktgen_sample04_many_flows.sh | 1 + samples/pktgen/pktgen_sample05_flow_per_thread.sh | 1 + samples/seccomp/Makefile | 1 + samples/seccomp/bpf-direct.c | 1 + samples/seccomp/bpf-fancy.c | 1 + samples/seccomp/bpf-helper.c | 1 + samples/seccomp/bpf-helper.h | 1 + samples/seccomp/dropper.c | 1 + samples/timers/Makefile | 1 + samples/timers/hpet_example.c | 1 + samples/trace_events/trace-events-sample.h | 1 + samples/uhid/uhid-example.c | 1 + samples/watchdog/Makefile | 1 + samples/watchdog/watchdog-simple.c | 1 + scripts/Lindent | 1 + scripts/Makefile | 1 + scripts/Makefile.asm-generic | 1 + scripts/Makefile.build | 1 + scripts/Makefile.clean | 1 + scripts/Makefile.dtbinst | 1 + scripts/Makefile.extrawarn | 1 + scripts/Makefile.gcc-plugins | 1 + scripts/Makefile.headersinst | 1 + scripts/Makefile.host | 1 + scripts/Makefile.kasan | 1 + scripts/Makefile.lib | 1 + scripts/Makefile.modbuiltin | 1 + scripts/Makefile.modinst | 1 + scripts/Makefile.modpost | 1 + scripts/Makefile.modsign | 1 + scripts/Makefile.ubsan | 1 + scripts/check_00index.sh | 1 + scripts/check_extable.sh | 1 + scripts/checkincludes.pl | 1 + scripts/checkstack.pl | 1 + scripts/checksyscalls.sh | 1 + scripts/checkversion.pl | 1 + scripts/cleanfile | 1 + scripts/cleanpatch | 1 + scripts/coccicheck | 1 + scripts/coccinelle/api/d_find_alias.cocci | 1 + scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci | 1 + scripts/coccinelle/api/drm-get-put.cocci | 1 + scripts/coccinelle/api/simple_open.cocci | 1 + scripts/coccinelle/api/vma_pages.cocci | 1 + scripts/coccinelle/misc/boolreturn.cocci | 1 + scripts/coccinelle/misc/irqf_oneshot.cocci | 1 + scripts/coccinelle/misc/of_table.cocci | 1 + scripts/config | 1 + scripts/decode_stacktrace.sh | 1 + scripts/decodecode | 1 + scripts/depmod.sh | 1 + scripts/diffconfig | 1 + scripts/dtc/Makefile | 1 + scripts/dtc/fdtdump.c | 1 + scripts/dtc/update-dtc-source.sh | 1 + scripts/extract-module-sig.pl | 1 + scripts/extract-sys-certs.pl | 1 + scripts/faddr2line | 1 + scripts/gcc-goto.sh | 1 + scripts/gcc-ld | 1 + scripts/gcc-plugin.sh | 1 + scripts/gcc-plugins/Makefile | 1 + scripts/gcc-plugins/gcc-common.h | 1 + scripts/gcc-plugins/gcc-generate-gimple-pass.h | 1 + scripts/gcc-plugins/gcc-generate-ipa-pass.h | 1 + scripts/gcc-plugins/gcc-generate-rtl-pass.h | 1 + scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | 1 + scripts/gcc-plugins/gen-random-seed.sh | 1 + scripts/gcc-version.sh | 1 + scripts/gcc-x86_32-has-stack-protector.sh | 1 + scripts/gcc-x86_64-has-stack-protector.sh | 1 + scripts/gdb/linux/Makefile | 1 + scripts/genksyms/Makefile | 1 + scripts/headerdep.pl | 1 + scripts/headers.sh | 1 + scripts/headers_check.pl | 1 + scripts/headers_install.sh | 1 + scripts/kconfig/Makefile | 1 + scripts/kconfig/check.sh | 1 + scripts/kconfig/list.h | 1 + scripts/kconfig/lkc_proto.h | 1 + scripts/kconfig/lxdialog/check-lxdialog.sh | 1 + scripts/ld-version.sh | 1 + scripts/link-vmlinux.sh | 1 + scripts/makelst | 1 + scripts/mkcompile_h | 1 + scripts/mkmakefile | 1 + scripts/mkuboot.sh | 1 + scripts/mod/Makefile | 1 + scripts/mod/devicetable-offsets.c | 1 + scripts/mod/mk_elfconfig.c | 1 + scripts/mod/modpost.h | 1 + scripts/package/buildtar | 1 + scripts/parse-maintainers.pl | 1 + scripts/patch-kernel | 1 + scripts/profile2linkerlist.pl | 1 + scripts/prune-kernel | 1 + scripts/selinux/genheaders/Makefile | 1 + scripts/selinux/genheaders/genheaders.c | 1 + scripts/selinux/install_policy.sh | 1 + scripts/selinux/mdp/Makefile | 1 + scripts/setlocalversion | 1 + scripts/stackdelta | 1 + scripts/stackusage | 1 + scripts/tracing/ftrace-bisect.sh | 1 + scripts/ver_linux | 1 + scripts/xen-hypercalls.sh | 1 + security/Makefile | 1 + security/apparmor/Makefile | 1 + security/device_cgroup.c | 1 + security/integrity/Makefile | 1 + security/integrity/ima/Makefile | 1 + security/keys/Makefile | 1 + security/keys/encrypted-keys/Makefile | 1 + security/keys/encrypted-keys/encrypted.h | 1 + security/keys/trusted.h | 1 + security/min_addr.c | 1 + security/selinux/Makefile | 1 + security/selinux/include/avc.h | 1 + security/selinux/include/avc_ss.h | 1 + security/selinux/include/classmap.h | 1 + security/selinux/include/initial_sid_to_string.h | 1 + security/selinux/include/security.h | 1 + security/selinux/include/xfrm.h | 1 + security/selinux/ss/constraint.h | 1 + security/selinux/ss/context.h | 1 + security/selinux/ss/ebitmap.c | 1 + security/selinux/ss/ebitmap.h | 1 + security/selinux/ss/hashtab.c | 1 + security/selinux/ss/hashtab.h | 1 + security/selinux/ss/mls.c | 1 + security/selinux/ss/mls.h | 1 + security/selinux/ss/mls_types.h | 1 + security/selinux/ss/services.h | 1 + security/selinux/ss/sidtab.c | 1 + security/selinux/ss/sidtab.h | 1 + security/selinux/ss/symtab.c | 1 + security/selinux/ss/symtab.h | 1 + security/tomoyo/Makefile | 1 + security/tomoyo/audit.c | 1 + security/tomoyo/common.c | 1 + security/tomoyo/common.h | 1 + security/tomoyo/condition.c | 1 + security/tomoyo/domain.c | 1 + security/tomoyo/environ.c | 1 + security/tomoyo/file.c | 1 + security/tomoyo/gc.c | 1 + security/tomoyo/group.c | 1 + security/tomoyo/load_policy.c | 1 + security/tomoyo/memory.c | 1 + security/tomoyo/mount.c | 1 + security/tomoyo/network.c | 1 + security/tomoyo/realpath.c | 1 + security/tomoyo/securityfs_if.c | 1 + security/tomoyo/tomoyo.c | 1 + security/tomoyo/util.c | 1 + sound/Makefile | 1 + sound/aoa/codecs/Makefile | 1 + sound/aoa/codecs/tas-basstreble.h | 1 + sound/aoa/codecs/tas-gain-table.h | 1 + sound/aoa/core/Makefile | 1 + sound/aoa/soundbus/sysfs.c | 1 + sound/arm/Makefile | 1 + sound/core/Makefile | 1 + sound/core/oss/Makefile | 1 + sound/core/pcm_param_trace.h | 1 + sound/core/pcm_trace.h | 1 + sound/core/seq/Makefile | 1 + sound/core/seq/seq_lock.h | 1 + sound/drivers/Makefile | 1 + sound/drivers/opl3/Makefile | 1 + sound/drivers/opl4/Makefile | 1 + sound/drivers/pcsp/pcsp.h | 1 + sound/drivers/pcsp/pcsp_input.h | 1 + sound/drivers/pcsp/pcsp_lib.c | 1 + sound/drivers/pcsp/pcsp_mixer.c | 1 + sound/firewire/Makefile | 1 + sound/firewire/amdtp-am824.h | 1 + sound/firewire/amdtp-stream.h | 1 + sound/firewire/bebob/Makefile | 1 + sound/firewire/cmp.h | 1 + sound/firewire/dice/dice-interface.h | 1 + sound/firewire/fcp.h | 1 + sound/firewire/iso-resources.h | 1 + sound/firewire/lib.h | 1 + sound/firewire/motu/Makefile | 1 + sound/firewire/packets-buffer.h | 1 + sound/hda/Makefile | 1 + sound/hda/hdac_sysfs.c | 1 + sound/hda/local.h | 1 + sound/hda/trace.h | 1 + sound/i2c/Makefile | 1 + sound/i2c/other/Makefile | 1 + sound/isa/Makefile | 1 + sound/isa/gus/Makefile | 1 + sound/isa/msnd/Makefile | 1 + sound/isa/opti9xx/Makefile | 1 + sound/isa/sb/Makefile | 1 + sound/oss/Makefile | 1 + sound/oss/ad1848.h | 1 + sound/oss/bin2hex.c | 1 + sound/oss/dmasound/dmasound.h | 1 + sound/oss/hex2hex.c | 1 + sound/oss/midi_ctrl.h | 1 + sound/oss/midi_synth.h | 1 + sound/oss/mpu401.h | 1 + sound/oss/os.h | 1 + sound/oss/pas2.h | 1 + sound/oss/sb.h | 1 + sound/oss/sb_ess.c | 1 + sound/oss/sb_ess.h | 1 + sound/oss/sleep.h | 1 + sound/oss/sound_calls.h | 1 + sound/oss/sound_firmware.h | 1 + sound/oss/tuning.h | 1 + sound/oss/ulaw.h | 1 + sound/oss/v_midi.h | 1 + sound/oss/waveartist.h | 1 + sound/parisc/harmony.h | 1 + sound/pci/Makefile | 1 + sound/pci/ad1889.h | 1 + sound/pci/asihpi/hpi_version.h | 1 + sound/pci/asihpi/hpifunc.c | 1 + sound/pci/au88x0/Makefile | 1 + sound/pci/au88x0/au8810.c | 1 + sound/pci/au88x0/au8810.h | 1 + sound/pci/au88x0/au8820.c | 1 + sound/pci/au88x0/au8820.h | 1 + sound/pci/au88x0/au8830.c | 1 + sound/pci/au88x0/au8830.h | 1 + sound/pci/au88x0/au88x0_eq.h | 1 + sound/pci/au88x0/au88x0_eqdata.c | 1 + sound/pci/au88x0/au88x0_mixer.c | 1 + sound/pci/au88x0/au88x0_wt.h | 1 + sound/pci/azt3328.h | 1 + sound/pci/cs5535audio/cs5535audio.h | 1 + sound/pci/ctxfi/cttimer.h | 1 + sound/pci/echoaudio/Makefile | 1 + sound/pci/emu10k1/Makefile | 1 + sound/pci/hda/Makefile | 1 + sound/pci/hda/dell_wmi_helper.c | 1 + sound/pci/hda/hda_controller_trace.h | 1 + sound/pci/hda/hda_intel_trace.h | 1 + sound/pci/hda/local.h | 1 + sound/pci/hda/thinkpad_helper.c | 1 + sound/pci/ice1712/Makefile | 1 + sound/pci/ice1712/juli.h | 1 + sound/pci/ice1712/maya44.h | 1 + sound/pci/ice1712/prodigy192.h | 1 + sound/pci/ice1712/psc724.h | 1 + sound/pci/ice1712/quartet.h | 1 + sound/pci/ice1712/se.h | 1 + sound/pci/ice1712/stac946x.h | 1 + sound/pci/ice1712/wtm.h | 1 + sound/pci/nm256/nm256_coef.c | 1 + sound/pci/oxygen/Makefile | 1 + sound/pci/oxygen/ak4396.h | 1 + sound/pci/oxygen/cm9780.h | 1 + sound/pci/oxygen/cs2000.h | 1 + sound/pci/oxygen/cs4245.h | 1 + sound/pci/oxygen/cs4362a.h | 1 + sound/pci/oxygen/cs4398.h | 1 + sound/pci/oxygen/oxygen.h | 1 + sound/pci/oxygen/oxygen_regs.h | 1 + sound/pci/oxygen/pcm1796.h | 1 + sound/pci/oxygen/wm8766.h | 1 + sound/pci/oxygen/wm8785.h | 1 + sound/pci/oxygen/xonar.h | 1 + sound/pci/oxygen/xonar_dg.h | 1 + sound/pci/rme9652/Makefile | 1 + sound/ppc/tumbler_volume.h | 1 + sound/soc/Makefile | 1 + sound/soc/amd/acp.h | 1 + sound/soc/atmel/Makefile | 1 + sound/soc/atmel/atmel-classd.h | 1 + sound/soc/atmel/atmel-pdmic.h | 1 + sound/soc/au1x/Makefile | 1 + sound/soc/blackfin/Makefile | 1 + sound/soc/cirrus/Makefile | 1 + sound/soc/codecs/Makefile | 1 + sound/soc/codecs/adau-utils.h | 1 + sound/soc/codecs/adau1373.h | 1 + sound/soc/codecs/adau17x1.h | 1 + sound/soc/codecs/cs4271.h | 1 + sound/soc/codecs/es8328.h | 1 + sound/soc/codecs/hdac_hdmi.h | 1 + sound/soc/codecs/inno_rk3036.h | 1 + sound/soc/codecs/rt5631.h | 1 + sound/soc/codecs/tlv320aic26.h | 1 + sound/soc/codecs/uda134x.h | 1 + sound/soc/codecs/wm8993.h | 1 + sound/soc/codecs/wm9713.h | 1 + sound/soc/davinci/Makefile | 1 + sound/soc/fsl/Makefile | 1 + sound/soc/fsl/imx-audmux.h | 1 + sound/soc/fsl/mpc5200_dma.h | 1 + sound/soc/generic/Makefile | 1 + sound/soc/img/Makefile | 1 + sound/soc/intel/Makefile | 1 + sound/soc/intel/atom/Makefile | 1 + sound/soc/intel/atom/sst/Makefile | 1 + sound/soc/intel/boards/Makefile | 1 + sound/soc/intel/common/Makefile | 1 + sound/soc/intel/skylake/Makefile | 1 + sound/soc/mediatek/mt8173/Makefile | 1 + sound/soc/mxs/Makefile | 1 + sound/soc/nuc900/Makefile | 1 + sound/soc/omap/Makefile | 1 + sound/soc/pxa/Makefile | 1 + sound/soc/qcom/Makefile | 1 + sound/soc/rockchip/Makefile | 1 + sound/soc/samsung/Makefile | 1 + sound/soc/sh/Makefile | 1 + sound/soc/sirf/Makefile | 1 + sound/soc/spear/Makefile | 1 + sound/soc/stm/Makefile | 1 + sound/soc/sunxi/Makefile | 1 + sound/soc/tegra/Makefile | 1 + sound/soc/txx9/Makefile | 1 + sound/soc/ux500/Makefile | 1 + sound/sparc/Makefile | 1 + sound/spi/Makefile | 1 + sound/synth/Makefile | 1 + sound/synth/emux/Makefile | 1 + sound/usb/Makefile | 1 + sound/usb/caiaq/audio.h | 1 + sound/usb/caiaq/control.h | 1 + sound/usb/caiaq/device.h | 1 + sound/usb/caiaq/input.h | 1 + sound/usb/caiaq/midi.h | 1 + sound/usb/card.h | 1 + sound/usb/clock.h | 1 + sound/usb/debug.h | 1 + sound/usb/endpoint.h | 1 + sound/usb/format.h | 1 + sound/usb/helper.h | 1 + sound/usb/line6/Makefile | 1 + sound/usb/midi.h | 1 + sound/usb/mixer.h | 1 + sound/usb/mixer_quirks.h | 1 + sound/usb/mixer_scarlett.h | 1 + sound/usb/mixer_us16x08.h | 1 + sound/usb/pcm.h | 1 + sound/usb/power.h | 1 + sound/usb/proc.h | 1 + sound/usb/quirks.h | 1 + sound/usb/stream.h | 1 + sound/usb/usx2y/Makefile | 1 + sound/usb/usx2y/us122l.h | 1 + sound/usb/usx2y/usX2Yhwdep.h | 1 + sound/usb/usx2y/usb_stream.h | 1 + sound/usb/usx2y/usbusx2y.h | 1 + sound/usb/usx2y/usx2yhwdeppcm.h | 1 + tools/Makefile | 1 + tools/accounting/Makefile | 1 + tools/accounting/getdelays.c | 1 + tools/arch/alpha/include/asm/barrier.h | 1 + tools/arch/arm64/include/asm/barrier.h | 1 + tools/arch/h8300/include/asm/bitsperlong.h | 1 + tools/arch/ia64/include/asm/barrier.h | 1 + tools/arch/mips/include/asm/barrier.h | 1 + tools/arch/powerpc/include/asm/barrier.h | 1 + tools/arch/s390/include/asm/barrier.h | 1 + tools/arch/sh/include/asm/barrier.h | 1 + tools/arch/sparc/include/asm/barrier.h | 1 + tools/arch/sparc/include/asm/barrier_32.h | 1 + tools/arch/sparc/include/asm/barrier_64.h | 1 + tools/arch/tile/include/asm/barrier.h | 1 + tools/arch/x86/include/asm/atomic.h | 1 + tools/arch/x86/include/asm/barrier.h | 1 + tools/arch/x86/include/asm/cmpxchg.h | 1 + tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/include/asm/disabled-features.h | 1 + tools/arch/x86/include/asm/required-features.h | 1 + tools/arch/x86/include/asm/rmwcc.h | 1 + tools/arch/x86/include/asm/unistd_32.h | 1 + tools/arch/x86/include/asm/unistd_64.h | 1 + tools/arch/x86/lib/memcpy_64.S | 1 + tools/arch/x86/lib/memset_64.S | 1 + tools/build/Makefile | 1 + tools/build/Makefile.build | 1 + tools/build/feature/Makefile | 1 + tools/build/feature/test-all.c | 1 + tools/build/feature/test-backtrace.c | 1 + tools/build/feature/test-bionic.c | 1 + tools/build/feature/test-bpf.c | 1 + tools/build/feature/test-clang.cpp | 1 + tools/build/feature/test-compile.c | 1 + tools/build/feature/test-cplus-demangle.c | 1 + tools/build/feature/test-cxx.cpp | 1 + tools/build/feature/test-dwarf.c | 1 + tools/build/feature/test-dwarf_getlocations.c | 1 + tools/build/feature/test-get_cpuid.c | 1 + tools/build/feature/test-glibc.c | 1 + tools/build/feature/test-gtk2-infobar.c | 1 + tools/build/feature/test-gtk2.c | 1 + tools/build/feature/test-jvmti.c | 1 + tools/build/feature/test-libaudit.c | 1 + tools/build/feature/test-libbabeltrace.c | 1 + tools/build/feature/test-libbfd.c | 1 + tools/build/feature/test-libcrypto.c | 1 + tools/build/feature/test-libdw-dwarf-unwind.c | 1 + tools/build/feature/test-libelf-gelf_getnote.c | 1 + tools/build/feature/test-libelf-getphdrnum.c | 1 + tools/build/feature/test-libelf-getshdrstrndx.c | 1 + tools/build/feature/test-libelf-mmap.c | 1 + tools/build/feature/test-libelf.c | 1 + tools/build/feature/test-libnuma.c | 1 + tools/build/feature/test-libperl.c | 1 + tools/build/feature/test-libpython-version.c | 1 + tools/build/feature/test-libpython.c | 1 + tools/build/feature/test-libslang.c | 1 + tools/build/feature/test-libunwind-aarch64.c | 1 + tools/build/feature/test-libunwind-arm.c | 1 + tools/build/feature/test-libunwind-debug-frame-aarch64.c | 1 + tools/build/feature/test-libunwind-debug-frame-arm.c | 1 + tools/build/feature/test-libunwind-debug-frame.c | 1 + tools/build/feature/test-libunwind-x86.c | 1 + tools/build/feature/test-libunwind-x86_64.c | 1 + tools/build/feature/test-libunwind.c | 1 + tools/build/feature/test-llvm-version.cpp | 1 + tools/build/feature/test-llvm.cpp | 1 + tools/build/feature/test-lzma.c | 1 + tools/build/feature/test-numa_num_possible_cpus.c | 1 + tools/build/feature/test-pthread-attr-setaffinity-np.c | 1 + tools/build/feature/test-sched_getcpu.c | 1 + tools/build/feature/test-sdt.c | 1 + tools/build/feature/test-stackprotector-all.c | 1 + tools/build/feature/test-sync-compare-and-swap.c | 1 + tools/build/feature/test-timerfd.c | 1 + tools/build/feature/test-zlib.c | 1 + tools/build/fixdep.c | 1 + tools/build/tests/ex/Makefile | 1 + tools/build/tests/ex/a.c | 1 + tools/build/tests/ex/arch/e.c | 1 + tools/build/tests/ex/arch/f.c | 1 + tools/build/tests/ex/b.c | 1 + tools/build/tests/ex/c.c | 1 + tools/build/tests/ex/d.c | 1 + tools/build/tests/ex/ex.c | 1 + tools/build/tests/ex/inc.c | 1 + tools/build/tests/run.sh | 1 + tools/cgroup/Makefile | 1 + tools/cgroup/cgroup_event_listener.c | 1 + tools/firewire/Makefile | 1 + tools/firewire/decode-fcp.c | 1 + tools/firewire/list.h | 1 + tools/firewire/nosy-dump.h | 1 + tools/gpio/Makefile | 1 + tools/hv/Makefile | 1 + tools/hv/hv_get_dhcp_info.sh | 1 + tools/hv/hv_set_ifconfig.sh | 1 + tools/hv/lsvmbus | 1 + tools/iio/Makefile | 1 + tools/include/asm-generic/atomic-gcc.h | 1 + tools/include/asm-generic/bitops.h | 1 + tools/include/asm-generic/bitops/__ffs.h | 1 + tools/include/asm-generic/bitops/atomic.h | 1 + tools/include/asm-generic/bitops/find.h | 1 + tools/include/asm-generic/bitops/hweight.h | 1 + tools/include/asm-generic/bitsperlong.h | 1 + tools/include/asm/alternative-asm.h | 1 + tools/include/asm/atomic.h | 1 + tools/include/asm/barrier.h | 1 + tools/include/asm/bug.h | 1 + tools/include/linux/atomic.h | 1 + tools/include/linux/bitmap.h | 1 + tools/include/linux/bitops.h | 1 + tools/include/linux/bug.h | 1 + tools/include/linux/compiler-gcc.h | 1 + tools/include/linux/compiler.h | 1 + tools/include/linux/debug_locks.h | 1 + tools/include/linux/err.h | 1 + tools/include/linux/filter.h | 1 + tools/include/linux/hardirq.h | 1 + tools/include/linux/hash.h | 1 + tools/include/linux/hashtable.h | 1 + tools/include/linux/irqflags.h | 1 + tools/include/linux/kallsyms.h | 1 + tools/include/linux/kern_levels.h | 1 + tools/include/linux/kernel.h | 1 + tools/include/linux/kmemcheck.h | 1 + tools/include/linux/list.h | 1 + tools/include/linux/lockdep.h | 1 + tools/include/linux/module.h | 1 + tools/include/linux/poison.h | 1 + tools/include/linux/rcu.h | 1 + tools/include/linux/refcount.h | 1 + tools/include/linux/spinlock.h | 1 + tools/include/linux/stacktrace.h | 1 + tools/include/linux/string.h | 1 + tools/include/linux/stringify.h | 1 + tools/include/linux/time64.h | 1 + tools/include/linux/types.h | 1 + tools/include/linux/unaligned/packed_struct.h | 1 + tools/include/tools/be_byteshift.h | 1 + tools/include/tools/endian.h | 1 + tools/include/tools/le_byteshift.h | 1 + tools/include/uapi/asm-generic/mman.h | 1 + tools/include/uapi/linux/bpf_common.h | 1 + tools/include/uapi/linux/fcntl.h | 1 + tools/include/uapi/linux/hw_breakpoint.h | 1 + tools/include/uapi/linux/mman.h | 1 + tools/include/uapi/linux/stat.h | 1 + tools/kvm/kvm_stat/Makefile | 1 + tools/laptop/dslm/Makefile | 1 + tools/laptop/freefall/Makefile | 1 + tools/leds/Makefile | 1 + tools/leds/led_hw_brightness_mon.c | 1 + tools/leds/uledmon.c | 1 + tools/lib/api/Makefile | 1 + tools/lib/api/cpu.c | 1 + tools/lib/api/cpu.h | 1 + tools/lib/api/debug-internal.h | 1 + tools/lib/api/debug.c | 1 + tools/lib/api/debug.h | 1 + tools/lib/api/fd/array.h | 1 + tools/lib/api/fs/fs.c | 1 + tools/lib/api/fs/fs.h | 1 + tools/lib/api/fs/tracing_path.c | 1 + tools/lib/api/fs/tracing_path.h | 1 + tools/lib/bpf/Makefile | 1 + tools/lib/hweight.c | 1 + tools/lib/lockdep/Makefile | 1 + tools/lib/lockdep/common.c | 1 + tools/lib/lockdep/include/liblockdep/common.h | 1 + tools/lib/lockdep/include/liblockdep/mutex.h | 1 + tools/lib/lockdep/include/liblockdep/rwlock.h | 1 + tools/lib/lockdep/lockdep.c | 1 + tools/lib/lockdep/preload.c | 1 + tools/lib/lockdep/run_tests.sh | 1 + tools/lib/lockdep/tests/AA.c | 1 + tools/lib/lockdep/tests/ABA.c | 1 + tools/lib/lockdep/tests/ABBA.c | 1 + tools/lib/lockdep/tests/ABBA_2threads.c | 1 + tools/lib/lockdep/tests/ABBCCA.c | 1 + tools/lib/lockdep/tests/ABBCCDDA.c | 1 + tools/lib/lockdep/tests/ABCABC.c | 1 + tools/lib/lockdep/tests/ABCDBCDA.c | 1 + tools/lib/lockdep/tests/ABCDBDDA.c | 1 + tools/lib/lockdep/tests/WW.c | 1 + tools/lib/lockdep/tests/common.h | 1 + tools/lib/lockdep/tests/unlock_balance.c | 1 + tools/lib/str_error_r.c | 1 + tools/lib/string.c | 1 + tools/lib/subcmd/Makefile | 1 + tools/lib/subcmd/exec-cmd.c | 1 + tools/lib/subcmd/exec-cmd.h | 1 + tools/lib/subcmd/help.c | 1 + tools/lib/subcmd/help.h | 1 + tools/lib/subcmd/pager.c | 1 + tools/lib/subcmd/pager.h | 1 + tools/lib/subcmd/parse-options.c | 1 + tools/lib/subcmd/parse-options.h | 1 + tools/lib/subcmd/run-command.c | 1 + tools/lib/subcmd/run-command.h | 1 + tools/lib/subcmd/sigchain.c | 1 + tools/lib/subcmd/sigchain.h | 1 + tools/lib/subcmd/subcmd-config.c | 1 + tools/lib/subcmd/subcmd-config.h | 1 + tools/lib/subcmd/subcmd-util.h | 1 + tools/lib/symbol/kallsyms.c | 1 + tools/lib/symbol/kallsyms.h | 1 + tools/lib/traceevent/Makefile | 1 + tools/lib/traceevent/plugin_cfg80211.c | 1 + tools/lib/traceevent/plugin_scsi.c | 1 + tools/lib/traceevent/plugin_xen.c | 1 + tools/lib/vsprintf.c | 1 + tools/net/Makefile | 1 + tools/nfsd/inject_fault.sh | 1 + tools/objtool/Makefile | 1 + tools/pci/pcitest.sh | 1 + tools/pcmcia/Makefile | 1 + tools/perf/Makefile | 1 + tools/perf/arch/arm/annotate/instructions.c | 1 + tools/perf/arch/arm/include/dwarf-regs-table.h | 1 + tools/perf/arch/arm/include/perf_regs.h | 1 + tools/perf/arch/arm/tests/dwarf-unwind.c | 1 + tools/perf/arch/arm/tests/regs_load.S | 1 + tools/perf/arch/arm/util/unwind-libdw.c | 1 + tools/perf/arch/arm/util/unwind-libunwind.c | 1 + tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/annotate/instructions.c | 1 + tools/perf/arch/arm64/include/dwarf-regs-table.h | 1 + tools/perf/arch/arm64/include/perf_regs.h | 1 + tools/perf/arch/arm64/tests/dwarf-unwind.c | 1 + tools/perf/arch/arm64/tests/regs_load.S | 1 + tools/perf/arch/arm64/util/unwind-libunwind.c | 1 + tools/perf/arch/common.c | 1 + tools/perf/arch/common.h | 1 + tools/perf/arch/powerpc/Makefile | 1 + tools/perf/arch/powerpc/annotate/instructions.c | 1 + tools/perf/arch/powerpc/include/arch-tests.h | 1 + tools/perf/arch/powerpc/include/dwarf-regs-table.h | 1 + tools/perf/arch/powerpc/include/perf_regs.h | 1 + tools/perf/arch/powerpc/tests/arch-tests.c | 1 + tools/perf/arch/powerpc/tests/dwarf-unwind.c | 1 + tools/perf/arch/powerpc/tests/regs_load.S | 1 + tools/perf/arch/powerpc/util/book3s_hcalls.h | 1 + tools/perf/arch/powerpc/util/book3s_hv_exits.h | 1 + tools/perf/arch/powerpc/util/header.c | 1 + tools/perf/arch/powerpc/util/kvm-stat.c | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 1 + tools/perf/arch/powerpc/util/unwind-libdw.c | 1 + tools/perf/arch/s390/annotate/instructions.c | 1 + tools/perf/arch/s390/include/dwarf-regs-table.h | 1 + tools/perf/arch/s390/util/dwarf-regs.c | 1 + tools/perf/arch/s390/util/machine.c | 1 + tools/perf/arch/sh/include/dwarf-regs-table.h | 1 + tools/perf/arch/sparc/include/dwarf-regs-table.h | 1 + tools/perf/arch/x86/Makefile | 1 + tools/perf/arch/x86/annotate/instructions.c | 1 + tools/perf/arch/x86/entry/syscalls/syscalltbl.sh | 1 + tools/perf/arch/x86/include/arch-tests.h | 1 + tools/perf/arch/x86/include/dwarf-regs-table.h | 1 + tools/perf/arch/x86/include/perf_regs.h | 1 + tools/perf/arch/x86/tests/arch-tests.c | 1 + tools/perf/arch/x86/tests/dwarf-unwind.c | 1 + tools/perf/arch/x86/tests/insn-x86-dat-32.c | 1 + tools/perf/arch/x86/tests/insn-x86-dat-64.c | 1 + tools/perf/arch/x86/tests/insn-x86-dat-src.c | 1 + tools/perf/arch/x86/tests/insn-x86.c | 1 + tools/perf/arch/x86/tests/intel-cqm.c | 1 + tools/perf/arch/x86/tests/perf-time-to-tsc.c | 1 + tools/perf/arch/x86/tests/rdpmc.c | 1 + tools/perf/arch/x86/tests/regs_load.S | 1 + tools/perf/arch/x86/util/group.c | 1 + tools/perf/arch/x86/util/header.c | 1 + tools/perf/arch/x86/util/kvm-stat.c | 1 + tools/perf/arch/x86/util/perf_regs.c | 1 + tools/perf/arch/x86/util/pmu.c | 1 + tools/perf/arch/x86/util/tsc.c | 1 + tools/perf/arch/x86/util/unwind-libdw.c | 1 + tools/perf/arch/x86/util/unwind-libunwind.c | 1 + tools/perf/arch/xtensa/include/dwarf-regs-table.h | 1 + tools/perf/bench/bench.h | 1 + tools/perf/bench/futex-hash.c | 1 + tools/perf/bench/futex-lock-pi.c | 1 + tools/perf/bench/futex-requeue.c | 1 + tools/perf/bench/futex-wake-parallel.c | 1 + tools/perf/bench/futex-wake.c | 1 + tools/perf/bench/futex.h | 1 + tools/perf/bench/mem-functions.c | 1 + tools/perf/bench/mem-memcpy-arch.h | 1 + tools/perf/bench/mem-memcpy-x86-64-asm-def.h | 1 + tools/perf/bench/mem-memcpy-x86-64-asm.S | 1 + tools/perf/bench/mem-memset-arch.h | 1 + tools/perf/bench/mem-memset-x86-64-asm-def.h | 1 + tools/perf/bench/mem-memset-x86-64-asm.S | 1 + tools/perf/bench/numa.c | 1 + tools/perf/bench/sched-messaging.c | 1 + tools/perf/bench/sched-pipe.c | 1 + tools/perf/builtin-annotate.c | 1 + tools/perf/builtin-bench.c | 1 + tools/perf/builtin-buildid-cache.c | 1 + tools/perf/builtin-buildid-list.c | 1 + tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-config.c | 1 + tools/perf/builtin-data.c | 1 + tools/perf/builtin-diff.c | 1 + tools/perf/builtin-evlist.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/builtin-inject.c | 1 + tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-list.c | 1 + tools/perf/builtin-lock.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-version.c | 1 + tools/perf/builtin.h | 1 + tools/perf/check-headers.sh | 1 + tools/perf/jvmti/jvmti_agent.h | 1 + tools/perf/jvmti/libjvmti.c | 1 + tools/perf/perf-archive.sh | 1 + tools/perf/perf-completion.sh | 1 + tools/perf/perf-read-vdso.c | 1 + tools/perf/perf-sys.h | 1 + tools/perf/perf.c | 1 + tools/perf/perf.h | 1 + tools/perf/pmu-events/jevents.h | 1 + tools/perf/pmu-events/jsmn.h | 1 + tools/perf/pmu-events/json.h | 1 + tools/perf/pmu-events/pmu-events.h | 1 + tools/perf/python/tracepoint.py | 1 + tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL | 1 + tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | 1 + tools/perf/scripts/python/event_analyzing_sample.py | 1 + tools/perf/scripts/python/net_dropmonitor.py | 1 + tools/perf/scripts/python/netdev-times.py | 1 + tools/perf/scripts/python/stackcollapse.py | 1 + tools/perf/scripts/python/stat-cpi.py | 1 + tools/perf/tests/attr.c | 1 + tools/perf/tests/attr.py | 1 + tools/perf/tests/backward-ring-buffer.c | 1 + tools/perf/tests/bitmap.c | 1 + tools/perf/tests/bp_signal.c | 1 + tools/perf/tests/bp_signal_overflow.c | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/clang.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/tests/cpumap.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/tests/dwarf-unwind.c | 1 + tools/perf/tests/event-times.c | 1 + tools/perf/tests/event_update.c | 1 + tools/perf/tests/evsel-roundtrip-name.c | 1 + tools/perf/tests/evsel-tp-sched.c | 1 + tools/perf/tests/expr.c | 1 + tools/perf/tests/fdarray.c | 1 + tools/perf/tests/hists_common.c | 1 + tools/perf/tests/hists_common.h | 1 + tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + tools/perf/tests/is_printable_array.c | 1 + tools/perf/tests/keep-tracking.c | 1 + tools/perf/tests/kmod-path.c | 1 + tools/perf/tests/llvm.c | 1 + tools/perf/tests/llvm.h | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/mmap-thread-lookup.c | 1 + tools/perf/tests/openat-syscall-all-cpus.c | 1 + tools/perf/tests/openat-syscall-tp-fields.c | 1 + tools/perf/tests/openat-syscall.c | 1 + tools/perf/tests/parse-events.c | 1 + tools/perf/tests/parse-no-sample-id-all.c | 1 + tools/perf/tests/perf-hooks.c | 1 + tools/perf/tests/perf-record.c | 1 + tools/perf/tests/perf-targz-src-pkg | 1 + tools/perf/tests/pmu.c | 1 + tools/perf/tests/python-use.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/tests/sdt.c | 1 + tools/perf/tests/stat.c | 1 + tools/perf/tests/sw-clock.c | 1 + tools/perf/tests/switch-tracking.c | 1 + tools/perf/tests/task-exit.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/thread-map.c | 1 + tools/perf/tests/thread-mg-share.c | 1 + tools/perf/tests/topology.c | 1 + tools/perf/tests/unit_number__scnprintf.c | 1 + tools/perf/tests/vmlinux-kallsyms.c | 1 + tools/perf/trace/beauty/beauty.h | 1 + tools/perf/trace/beauty/eventfd.c | 1 + tools/perf/trace/beauty/flock.c | 1 + tools/perf/trace/beauty/futex_op.c | 1 + tools/perf/trace/beauty/mmap.c | 1 + tools/perf/trace/beauty/mode_t.c | 1 + tools/perf/trace/beauty/msg_flags.c | 1 + tools/perf/trace/beauty/open_flags.c | 1 + tools/perf/trace/beauty/perf_event_open.c | 1 + tools/perf/trace/beauty/pid.c | 1 + tools/perf/trace/beauty/sched_policy.c | 1 + tools/perf/trace/beauty/seccomp.c | 1 + tools/perf/trace/beauty/signum.c | 1 + tools/perf/trace/beauty/socket_type.c | 1 + tools/perf/trace/beauty/waitid_options.c | 1 + tools/perf/ui/browser.c | 1 + tools/perf/ui/browser.h | 1 + tools/perf/ui/browsers/annotate.c | 1 + tools/perf/ui/browsers/header.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/ui/browsers/hists.h | 1 + tools/perf/ui/browsers/map.c | 1 + tools/perf/ui/browsers/map.h | 1 + tools/perf/ui/browsers/scripts.c | 1 + tools/perf/ui/gtk/annotate.c | 1 + tools/perf/ui/gtk/browser.c | 1 + tools/perf/ui/gtk/gtk.h | 1 + tools/perf/ui/gtk/helpline.c | 1 + tools/perf/ui/gtk/hists.c | 1 + tools/perf/ui/gtk/progress.c | 1 + tools/perf/ui/gtk/setup.c | 1 + tools/perf/ui/gtk/util.c | 1 + tools/perf/ui/helpline.c | 1 + tools/perf/ui/helpline.h | 1 + tools/perf/ui/hist.c | 1 + tools/perf/ui/keysyms.h | 1 + tools/perf/ui/libslang.h | 1 + tools/perf/ui/progress.c | 1 + tools/perf/ui/progress.h | 1 + tools/perf/ui/setup.c | 1 + tools/perf/ui/stdio/hist.c | 1 + tools/perf/ui/tui/helpline.c | 1 + tools/perf/ui/tui/progress.c | 1 + tools/perf/ui/tui/setup.c | 1 + tools/perf/ui/tui/tui.h | 1 + tools/perf/ui/tui/util.c | 1 + tools/perf/ui/ui.h | 1 + tools/perf/ui/util.c | 1 + tools/perf/ui/util.h | 1 + tools/perf/util/PERF-VERSION-GEN | 1 + tools/perf/util/annotate.h | 1 + tools/perf/util/block-range.c | 1 + tools/perf/util/block-range.h | 1 + tools/perf/util/bpf-loader.c | 1 + tools/perf/util/bpf-loader.h | 1 + tools/perf/util/bpf-prologue.c | 1 + tools/perf/util/bpf-prologue.h | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/build-id.h | 1 + tools/perf/util/c++/clang-c.h | 1 + tools/perf/util/c++/clang-test.cpp | 1 + tools/perf/util/c++/clang.cpp | 1 + tools/perf/util/c++/clang.h | 1 + tools/perf/util/cache.h | 1 + tools/perf/util/callchain.c | 1 + tools/perf/util/callchain.h | 1 + tools/perf/util/cgroup.c | 1 + tools/perf/util/cgroup.h | 1 + tools/perf/util/cloexec.c | 1 + tools/perf/util/cloexec.h | 1 + tools/perf/util/color.c | 1 + tools/perf/util/color.h | 1 + tools/perf/util/comm.c | 1 + tools/perf/util/comm.h | 1 + tools/perf/util/compress.h | 1 + tools/perf/util/config.c | 1 + tools/perf/util/config.h | 1 + tools/perf/util/counts.c | 1 + tools/perf/util/counts.h | 1 + tools/perf/util/cpumap.c | 1 + tools/perf/util/cpumap.h | 1 + tools/perf/util/ctype.c | 1 + tools/perf/util/data-convert-bt.h | 1 + tools/perf/util/data-convert.h | 1 + tools/perf/util/data.c | 1 + tools/perf/util/data.h | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/debug.h | 1 + tools/perf/util/demangle-java.c | 1 + tools/perf/util/demangle-java.h | 1 + tools/perf/util/demangle-rust.c | 1 + tools/perf/util/demangle-rust.h | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/dso.h | 1 + tools/perf/util/dump-insn.c | 1 + tools/perf/util/dump-insn.h | 1 + tools/perf/util/dwarf-regs.c | 1 + tools/perf/util/env.c | 1 + tools/perf/util/env.h | 1 + tools/perf/util/event.c | 1 + tools/perf/util/event.h | 1 + tools/perf/util/evlist.h | 1 + tools/perf/util/evsel.h | 1 + tools/perf/util/evsel_fprintf.c | 1 + tools/perf/util/expr.h | 1 + tools/perf/util/find-vdso-map.c | 1 + tools/perf/util/genelf.h | 1 + tools/perf/util/generate-cmdlist.sh | 1 + tools/perf/util/group.h | 1 + tools/perf/util/header.c | 1 + tools/perf/util/header.h | 1 + tools/perf/util/help-unknown-cmd.c | 1 + tools/perf/util/hist.c | 1 + tools/perf/util/hist.h | 1 + tools/perf/util/include/asm/asm-offsets.h | 1 + tools/perf/util/include/asm/cpufeature.h | 1 + tools/perf/util/include/asm/dwarf2.h | 1 + tools/perf/util/include/asm/uaccess.h | 1 + tools/perf/util/include/dwarf-regs.h | 1 + tools/perf/util/include/linux/linkage.h | 1 + tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk | 1 + tools/perf/util/intlist.h | 1 + tools/perf/util/jit.h | 1 + tools/perf/util/jitdump.c | 1 + tools/perf/util/kvm-stat.h | 1 + tools/perf/util/levenshtein.c | 1 + tools/perf/util/levenshtein.h | 1 + tools/perf/util/libunwind/arm64.c | 1 + tools/perf/util/libunwind/x86_32.c | 1 + tools/perf/util/llvm-utils.c | 1 + tools/perf/util/llvm-utils.h | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/machine.h | 1 + tools/perf/util/map.c | 1 + tools/perf/util/map.h | 1 + tools/perf/util/mem-events.c | 1 + tools/perf/util/mem-events.h | 1 + tools/perf/util/memswap.c | 1 + tools/perf/util/memswap.h | 1 + tools/perf/util/ordered-events.c | 1 + tools/perf/util/ordered-events.h | 1 + tools/perf/util/parse-branch-options.c | 1 + tools/perf/util/parse-branch-options.h | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/parse-events.h | 1 + tools/perf/util/parse-regs-options.c | 1 + tools/perf/util/parse-regs-options.h | 1 + tools/perf/util/path.c | 1 + tools/perf/util/path.h | 1 + tools/perf/util/perf-hooks.c | 1 + tools/perf/util/perf-hooks.h | 1 + tools/perf/util/perf_regs.c | 1 + tools/perf/util/perf_regs.h | 1 + tools/perf/util/pmu.c | 1 + tools/perf/util/pmu.h | 1 + tools/perf/util/print_binary.c | 1 + tools/perf/util/print_binary.h | 1 + tools/perf/util/probe-event.h | 1 + tools/perf/util/probe-file.h | 1 + tools/perf/util/probe-finder.h | 1 + tools/perf/util/pstack.c | 1 + tools/perf/util/pstack.h | 1 + tools/perf/util/python.c | 1 + tools/perf/util/quote.c | 1 + tools/perf/util/quote.h | 1 + tools/perf/util/rb_resort.h | 1 + tools/perf/util/rblist.h | 1 + tools/perf/util/record.c | 1 + tools/perf/util/sane_ctype.h | 1 + tools/perf/util/session.c | 1 + tools/perf/util/session.h | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/sort.h | 1 + tools/perf/util/srcline.c | 1 + tools/perf/util/srcline.h | 1 + tools/perf/util/stat-shadow.c | 1 + tools/perf/util/stat.c | 1 + tools/perf/util/stat.h | 1 + tools/perf/util/strbuf.c | 1 + tools/perf/util/strbuf.h | 1 + tools/perf/util/strfilter.c | 1 + tools/perf/util/strfilter.h | 1 + tools/perf/util/string.c | 1 + tools/perf/util/string2.h | 1 + tools/perf/util/strlist.h | 1 + tools/perf/util/svghelper.h | 1 + tools/perf/util/symbol-elf.c | 1 + tools/perf/util/symbol-minimal.c | 1 + tools/perf/util/symbol.c | 1 + tools/perf/util/symbol.h | 1 + tools/perf/util/symbol_fprintf.c | 1 + tools/perf/util/syscalltbl.h | 1 + tools/perf/util/target.h | 1 + tools/perf/util/term.c | 1 + tools/perf/util/term.h | 1 + tools/perf/util/thread.c | 1 + tools/perf/util/thread.h | 1 + tools/perf/util/thread_map.c | 1 + tools/perf/util/thread_map.h | 1 + tools/perf/util/time-utils.c | 1 + tools/perf/util/time-utils.h | 1 + tools/perf/util/tool.h | 1 + tools/perf/util/top.h | 1 + tools/perf/util/trace-event.c | 1 + tools/perf/util/trace-event.h | 1 + tools/perf/util/trigger.h | 1 + tools/perf/util/tsc.c | 1 + tools/perf/util/tsc.h | 1 + tools/perf/util/units.c | 1 + tools/perf/util/units.h | 1 + tools/perf/util/unwind-libdw.c | 1 + tools/perf/util/unwind-libdw.h | 1 + tools/perf/util/unwind-libunwind-local.c | 1 + tools/perf/util/unwind-libunwind.c | 1 + tools/perf/util/unwind.h | 1 + tools/perf/util/usage.c | 1 + tools/perf/util/util-cxx.h | 1 + tools/perf/util/util.c | 1 + tools/perf/util/util.h | 1 + tools/perf/util/values.c | 1 + tools/perf/util/values.h | 1 + tools/perf/util/vdso.c | 1 + tools/perf/util/vdso.h | 1 + tools/perf/util/xyarray.c | 1 + tools/perf/util/xyarray.h | 1 + tools/perf/util/zlib.c | 1 + tools/power/cpupower/bench/Makefile | 1 + tools/power/cpupower/debug/i386/Makefile | 1 + tools/power/cpupower/debug/kernel/Makefile | 1 + tools/power/cpupower/debug/x86_64/Makefile | 1 + tools/power/cpupower/lib/cpuidle.h | 1 + tools/power/cpupower/lib/cpupower.h | 1 + tools/power/cpupower/lib/cpupower_intern.h | 1 + tools/power/cpupower/utils/builtin.h | 1 + tools/power/cpupower/utils/cpuidle-set.c | 1 + tools/power/cpupower/utils/helpers/amd.c | 1 + tools/power/cpupower/utils/helpers/bitmask.c | 1 + tools/power/cpupower/utils/helpers/bitmask.h | 1 + tools/power/cpupower/utils/helpers/cpuid.c | 1 + tools/power/cpupower/utils/helpers/misc.c | 1 + tools/power/cpupower/utils/helpers/msr.c | 1 + tools/power/cpupower/utils/helpers/pci.c | 1 + tools/power/cpupower/utils/helpers/sysfs.h | 1 + tools/power/cpupower/utils/version-gen.sh | 1 + tools/power/pm-graph/Makefile | 1 + tools/power/x86/turbostat/Makefile | 1 + tools/power/x86/x86_energy_perf_policy/Makefile | 1 + tools/scripts/Makefile.arch | 1 + tools/scripts/Makefile.include | 1 + tools/spi/spidev_fdx.c | 1 + tools/testing/fault-injection/failcmd.sh | 1 + tools/testing/ktest/compare-ktest-sample.pl | 1 + tools/testing/nvdimm/Kbuild | 1 + tools/testing/nvdimm/Makefile | 1 + tools/testing/nvdimm/config_check.c | 1 + tools/testing/nvdimm/test/Kbuild | 1 + tools/testing/radix-tree/Makefile | 1 + tools/testing/radix-tree/linux.c | 1 + tools/testing/radix-tree/linux/gfp.h | 1 + tools/testing/radix-tree/linux/kernel.h | 1 + tools/testing/radix-tree/linux/percpu.h | 1 + tools/testing/radix-tree/linux/preempt.h | 1 + tools/testing/radix-tree/linux/radix-tree.h | 1 + tools/testing/radix-tree/linux/rcupdate.h | 1 + tools/testing/radix-tree/linux/slab.h | 1 + tools/testing/radix-tree/main.c | 1 + tools/testing/radix-tree/regression.h | 1 + tools/testing/radix-tree/regression1.c | 1 + tools/testing/radix-tree/regression2.c | 1 + tools/testing/radix-tree/regression3.c | 1 + tools/testing/radix-tree/tag_check.c | 1 + tools/testing/radix-tree/test.c | 1 + tools/testing/radix-tree/test.h | 1 + tools/testing/selftests/Makefile | 1 + tools/testing/selftests/bpf/Makefile | 1 + tools/testing/selftests/bpf/bpf_endian.h | 1 + tools/testing/selftests/bpf/bpf_helpers.h | 1 + tools/testing/selftests/bpf/bpf_util.h | 1 + tools/testing/selftests/bpf/include/uapi/linux/types.h | 1 + tools/testing/selftests/bpf/test_kmod.sh | 1 + tools/testing/selftests/bpf/test_lpm_map.c | 1 + tools/testing/selftests/bpf/test_tag.c | 1 + tools/testing/selftests/breakpoints/Makefile | 1 + tools/testing/selftests/capabilities/Makefile | 1 + tools/testing/selftests/capabilities/test_execve.c | 1 + tools/testing/selftests/capabilities/validate_cap.c | 1 + tools/testing/selftests/cpu-hotplug/Makefile | 1 + tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh | 1 + tools/testing/selftests/cpufreq/Makefile | 1 + tools/testing/selftests/cpufreq/cpu.sh | 1 + tools/testing/selftests/cpufreq/cpufreq.sh | 1 + tools/testing/selftests/cpufreq/governor.sh | 1 + tools/testing/selftests/cpufreq/main.sh | 1 + tools/testing/selftests/cpufreq/module.sh | 1 + tools/testing/selftests/cpufreq/special-tests.sh | 1 + tools/testing/selftests/drivers/gpu/drm_mm.sh | 1 + tools/testing/selftests/drivers/gpu/i915.sh | 1 + tools/testing/selftests/efivarfs/create-read.c | 1 + tools/testing/selftests/efivarfs/efivarfs.sh | 1 + tools/testing/selftests/efivarfs/open-unlink.c | 1 + tools/testing/selftests/exec/Makefile | 1 + tools/testing/selftests/filesystems/Makefile | 1 + tools/testing/selftests/filesystems/dnotify_test.c | 1 + tools/testing/selftests/firmware/fw_fallback.sh | 1 + tools/testing/selftests/firmware/fw_filesystem.sh | 1 + tools/testing/selftests/ftrace/Makefile | 1 + tools/testing/selftests/ftrace/test.d/00basic/basic2.tc | 1 + tools/testing/selftests/ftrace/test.d/00basic/basic3.tc | 1 + tools/testing/selftests/ftrace/test.d/event/event-enable.tc | 1 + tools/testing/selftests/ftrace/test.d/event/event-pid.tc | 1 + tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 1 + tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 1 + tools/testing/selftests/ftrace/test.d/instances/instance-event.tc | 1 + tools/testing/selftests/ftrace/test.d/instances/instance.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc | 1 + tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc | 1 + tools/testing/selftests/futex/Makefile | 1 + tools/testing/selftests/futex/functional/Makefile | 1 + tools/testing/selftests/gpio/Makefile | 1 + tools/testing/selftests/gpio/gpio-mockup-sysfs.sh | 1 + tools/testing/selftests/gpio/gpio-mockup.sh | 1 + tools/testing/selftests/ia64/Makefile | 1 + tools/testing/selftests/intel_pstate/Makefile | 1 + tools/testing/selftests/intel_pstate/aperf.c | 1 + tools/testing/selftests/intel_pstate/msr.c | 1 + tools/testing/selftests/intel_pstate/run.sh | 1 + tools/testing/selftests/ipc/Makefile | 1 + tools/testing/selftests/ipc/msgque.c | 1 + tools/testing/selftests/kcmp/kcmp_test.c | 1 + tools/testing/selftests/lib/bitmap.sh | 1 + tools/testing/selftests/lib/prime_numbers.sh | 1 + tools/testing/selftests/lib/printf.sh | 1 + tools/testing/selftests/locking/ww_mutex.sh | 1 + tools/testing/selftests/media_tests/Makefile | 1 + tools/testing/selftests/media_tests/bind_unbind_sample.sh | 1 + tools/testing/selftests/media_tests/open_loop_test.sh | 1 + tools/testing/selftests/membarrier/membarrier_test.c | 1 + tools/testing/selftests/memfd/Makefile | 1 + tools/testing/selftests/memfd/fuse_mnt.c | 1 + tools/testing/selftests/memfd/fuse_test.c | 1 + tools/testing/selftests/memfd/memfd_test.c | 1 + tools/testing/selftests/memfd/run_fuse_test.sh | 1 + tools/testing/selftests/memory-hotplug/Makefile | 1 + tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 1 + tools/testing/selftests/mount/Makefile | 1 + tools/testing/selftests/mount/unprivileged-remount-test.c | 1 + tools/testing/selftests/mqueue/Makefile | 1 + tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/netdevice.sh | 1 + tools/testing/selftests/net/reuseport_bpf_cpu.c | 1 + tools/testing/selftests/net/reuseport_bpf_numa.c | 1 + tools/testing/selftests/net/reuseport_dualstack.c | 1 + tools/testing/selftests/net/run_afpackettests | 1 + tools/testing/selftests/net/run_netsocktests | 1 + tools/testing/selftests/net/socket.c | 1 + tools/testing/selftests/net/test_bpf.sh | 1 + tools/testing/selftests/networking/timestamping/Makefile | 1 + tools/testing/selftests/networking/timestamping/hwtstamp_config.c | 1 + tools/testing/selftests/nsfs/owner.c | 1 + tools/testing/selftests/nsfs/pidns.c | 1 + tools/testing/selftests/powerpc/Makefile | 1 + tools/testing/selftests/powerpc/benchmarks/Makefile | 1 + tools/testing/selftests/powerpc/cache_shape/Makefile | 1 + tools/testing/selftests/powerpc/copyloops/Makefile | 1 + tools/testing/selftests/powerpc/copyloops/asm/export.h | 1 + tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h | 1 + tools/testing/selftests/powerpc/copyloops/validate.c | 1 + tools/testing/selftests/powerpc/dscr/Makefile | 1 + tools/testing/selftests/powerpc/include/basic_asm.h | 1 + tools/testing/selftests/powerpc/include/instructions.h | 1 + tools/testing/selftests/powerpc/math/Makefile | 1 + tools/testing/selftests/powerpc/mm/Makefile | 1 + tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c | 1 + tools/testing/selftests/powerpc/pmu/Makefile | 1 + tools/testing/selftests/powerpc/pmu/ebb/Makefile | 1 + tools/testing/selftests/powerpc/ptrace/Makefile | 1 + tools/testing/selftests/powerpc/signal/Makefile | 1 + tools/testing/selftests/powerpc/stringloops/Makefile | 1 + tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h | 1 + tools/testing/selftests/powerpc/stringloops/memcmp.c | 1 + tools/testing/selftests/powerpc/switch_endian/Makefile | 1 + tools/testing/selftests/powerpc/switch_endian/check.S | 1 + tools/testing/selftests/powerpc/switch_endian/common.h | 1 + tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S | 1 + tools/testing/selftests/powerpc/syscalls/ipc.h | 1 + tools/testing/selftests/powerpc/tm/Makefile | 1 + tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 1 + tools/testing/selftests/powerpc/tm/tm-syscall-asm.S | 1 + tools/testing/selftests/powerpc/vphn/test-vphn.c | 1 + tools/testing/selftests/prctl/Makefile | 1 + tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c | 1 + tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c | 1 + tools/testing/selftests/prctl/disable-tsc-test.c | 1 + tools/testing/selftests/pstore/Makefile | 1 + tools/testing/selftests/ptp/Makefile | 1 + tools/testing/selftests/ptrace/peeksiginfo.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile | 1 + .../testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h | 1 + .../testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h | 1 + .../testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h | 1 + .../selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile | 1 + .../selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c | 1 + tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh | 1 + tools/testing/selftests/seccomp/Makefile | 1 + tools/testing/selftests/sigaltstack/sas.c | 1 + tools/testing/selftests/splice/Makefile | 1 + tools/testing/selftests/splice/default_file_splice_read.c | 1 + tools/testing/selftests/splice/default_file_splice_read.sh | 1 + tools/testing/selftests/static_keys/test_static_keys.sh | 1 + tools/testing/selftests/sync/Makefile | 1 + tools/testing/selftests/tc-testing/tdc.py | 1 + tools/testing/selftests/tc-testing/tdc_config.py | 1 + tools/testing/selftests/tc-testing/tdc_helper.py | 1 + tools/testing/selftests/timers/Makefile | 1 + tools/testing/selftests/user/test_user_copy.sh | 1 + tools/testing/selftests/vDSO/Makefile | 1 + tools/testing/selftests/vm/Makefile | 1 + tools/testing/selftests/vm/compaction_test.c | 1 + tools/testing/selftests/vm/hugepage-mmap.c | 1 + tools/testing/selftests/vm/hugepage-shm.c | 1 + tools/testing/selftests/vm/map_hugetlb.c | 1 + tools/testing/selftests/vm/mlock-random-test.c | 1 + tools/testing/selftests/vm/mlock2-tests.c | 1 + tools/testing/selftests/vm/mlock2.h | 1 + tools/testing/selftests/vm/on-fault-limit.c | 1 + tools/testing/selftests/vm/run_vmtests | 1 + tools/testing/selftests/vm/thuge-gen.c | 1 + tools/testing/selftests/watchdog/Makefile | 1 + tools/testing/selftests/watchdog/watchdog-test.c | 1 + tools/testing/selftests/x86/Makefile | 1 + tools/testing/selftests/x86/ioperm.c | 1 + tools/testing/selftests/x86/iopl.c | 1 + tools/testing/selftests/x86/ldt_gdt.c | 1 + tools/testing/selftests/x86/mpx-debug.h | 1 + tools/testing/selftests/x86/mpx-dig.c | 1 + tools/testing/selftests/x86/mpx-hw.h | 1 + tools/testing/selftests/x86/mpx-mm.h | 1 + tools/testing/selftests/x86/pkey-helpers.h | 1 + tools/testing/selftests/x86/protection_keys.c | 1 + tools/testing/selftests/x86/ptrace_syscall.c | 1 + tools/testing/selftests/x86/raw_syscall_helper_32.S | 1 + tools/testing/selftests/x86/test_FCMOV.c | 1 + tools/testing/selftests/x86/test_FCOMI.c | 1 + tools/testing/selftests/x86/test_FISTTP.c | 1 + tools/testing/selftests/x86/test_vdso.c | 1 + tools/testing/selftests/zram/Makefile | 1 + tools/testing/selftests/zram/zram.sh | 1 + tools/thermal/tmon/Makefile | 1 + tools/thermal/tmon/tmon.8 | 1 + tools/usb/Makefile | 1 + tools/usb/ffs-aio-example/multibuff/host_app/Makefile | 1 + tools/usb/hcd-tests.sh | 1 + tools/usb/usbip/Makefile.am | 1 + tools/usb/usbip/cleanup.sh | 1 + tools/usb/usbip/libsrc/Makefile.am | 1 + tools/usb/usbip/libsrc/list.h | 1 + tools/usb/usbip/libsrc/sysfs_utils.c | 1 + tools/usb/usbip/libsrc/sysfs_utils.h | 1 + tools/usb/usbip/libsrc/usbip_common.c | 1 + tools/usb/usbip/libsrc/usbip_common.h | 1 + tools/usb/usbip/libsrc/vhci_driver.c | 1 + tools/usb/usbip/libsrc/vhci_driver.h | 1 + tools/usb/usbip/src/Makefile.am | 1 + tools/usb/usbip/src/usbip_network.h | 1 + tools/virtio/Makefile | 1 + tools/virtio/asm/barrier.h | 1 + tools/virtio/linux/bug.h | 1 + tools/virtio/linux/compiler.h | 1 + tools/virtio/linux/dma-mapping.h | 1 + tools/virtio/linux/err.h | 1 + tools/virtio/linux/kernel.h | 1 + tools/virtio/linux/module.h | 1 + tools/virtio/linux/scatterlist.h | 1 + tools/virtio/linux/slab.h | 1 + tools/virtio/linux/uaccess.h | 1 + tools/virtio/linux/virtio.h | 1 + tools/virtio/linux/virtio_byteorder.h | 1 + tools/virtio/linux/virtio_config.h | 1 + tools/virtio/ringtest/Makefile | 1 + tools/virtio/ringtest/noring.c | 1 + tools/virtio/ringtest/ptr_ring.c | 1 + tools/virtio/ringtest/run-on-all.sh | 1 + tools/virtio/uapi/linux/virtio_ring.h | 1 + tools/virtio/virtio-trace/Makefile | 1 + tools/virtio/virtio-trace/trace-agent.h | 1 + tools/virtio/virtio_test.c | 1 + tools/virtio/vringh_test.c | 1 + tools/vm/Makefile | 1 + tools/vm/page_owner_sort.c | 1 + tools/vm/slabinfo.c | 1 + usr/Kconfig | 1 + usr/Makefile | 1 + usr/gen_init_cpio.c | 1 + usr/initramfs_data.S | 1 + virt/kvm/Kconfig | 1 + virt/kvm/arm/trace.h | 1 + virt/kvm/arm/vgic/trace.h | 1 + virt/kvm/coalesced_mmio.c | 1 + virt/kvm/coalesced_mmio.h | 1 + virt/kvm/vfio.h | 1 + 11139 files changed, 11139 insertions(+) commit 2eb9eabf1e868fda15808954fb29b0f105ed65f1 Author: Eric Biggers Date: Thu Nov 2 00:47:19 2017 +0000 KEYS: fix out-of-bounds read during ASN.1 parsing syzkaller with KASAN reported an out-of-bounds read in asn1_ber_decoder(). It can be reproduced by the following command, assuming CONFIG_X509_CERTIFICATE_PARSER=y and CONFIG_KASAN=y: keyctl add asymmetric desc $'\x30\x30' @s The bug is that the length of an ASN.1 data value isn't validated in the case where it is encoded using the short form, causing the decoder to read past the end of the input buffer. Fix it by validating the length. The bug report was: BUG: KASAN: slab-out-of-bounds in asn1_ber_decoder+0x10cb/0x1730 lib/asn1_decoder.c:233 Read of size 1 at addr ffff88003cccfa02 by task syz-executor0/6818 CPU: 1 PID: 6818 Comm: syz-executor0 Not tainted 4.14.0-rc7-00008-g5f479447d983 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0xb3/0x10b lib/dump_stack.c:52 print_address_description+0x79/0x2a0 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x236/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 asn1_ber_decoder+0x10cb/0x1730 lib/asn1_decoder.c:233 x509_cert_parse+0x1db/0x650 crypto/asymmetric_keys/x509_cert_parser.c:89 x509_key_preparse+0x64/0x7a0 crypto/asymmetric_keys/x509_public_key.c:174 asymmetric_key_preparse+0xcb/0x1a0 crypto/asymmetric_keys/asymmetric_type.c:388 key_create_or_update+0x347/0xb20 security/keys/key.c:855 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0x1cd/0x340 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x447c89 RSP: 002b:00007fca7a5d3bd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007fca7a5d46cc RCX: 0000000000447c89 RDX: 0000000020006f4a RSI: 0000000020006000 RDI: 0000000020001ff5 RBP: 0000000000000046 R08: fffffffffffffffd R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fca7a5d49c0 R15: 00007fca7a5d4700 Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") Cc: # v3.7+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris lib/asn1_decoder.c | 3 +++ 1 file changed, 3 insertions(+) commit a3c812f7cfd80cf51e8f5b7034f7418f6beb56c1 Author: Eric Biggers Date: Thu Nov 2 00:47:12 2017 +0000 KEYS: trusted: fix writing past end of buffer in trusted_read() When calling keyctl_read() on a key of type "trusted", if the user-supplied buffer was too small, the kernel ignored the buffer length and just wrote past the end of the buffer, potentially corrupting userspace memory. Fix it by instead returning the size required, as per the documentation for keyctl_read(). We also don't even fill the buffer at all in this case, as this is slightly easier to implement than doing a short read, and either behavior appears to be permitted. It also makes it match the behavior of the "encrypted" key type. Fixes: d00a1c72f7f4 ("keys: add new trusted key-type") Reported-by: Ben Hutchings Cc: # v2.6.38+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: Mimi Zohar Reviewed-by: James Morris Signed-off-by: James Morris security/keys/trusted.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 3239b6f29bdfb4b0a2ba59df995fc9e6f4df7f1f Author: Eric Biggers Date: Thu Nov 2 00:47:03 2017 +0000 KEYS: return full count in keyring_read() if buffer is too small Commit e645016abc80 ("KEYS: fix writing past end of user-supplied buffer in keyring_read()") made keyring_read() stop corrupting userspace memory when the user-supplied buffer is too small. However it also made the return value in that case be the short buffer size rather than the size required, yet keyctl_read() is actually documented to return the size required. Therefore, switch it over to the documented behavior. Note that for now we continue to have it fill the short buffer, since it did that before (pre-v3.13) and dump_key_tree_aux() in keyutils arguably relies on it. Fixes: e645016abc80 ("KEYS: fix writing past end of user-supplied buffer in keyring_read()") Reported-by: Ben Hutchings Cc: # v3.13+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris Signed-off-by: James Morris security/keys/keyring.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit f5ce817951f38023588b2b8308beca79abe20507 Author: Jussi Laako Date: Wed Nov 1 23:32:33 2017 +0200 ALSA: usb-audio: support new Amanero Combo384 firmware version Support DSD_U32_BE sample format on new Amanero Combo384 firmware version on older VID/PID. Fixes: 3eff682d765b ("ALSA: usb-audio: Support both DSD LE/BE Amanero firmware versions") Signed-off-by: Jussi Laako Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 74784da82ff74379d0583a3ffe42835888705ac7 Merge: 18129a2 7400bb4 Author: David S. Miller Date: Thu Nov 2 16:52:41 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains two one-liner fixes for your net tree, they are: 1) Disable fast hash operations for 2-bytes length keys which is leading to incorrect lookups in nf_tables, from Anatole Denis. 2) Reload pointer ipv4 header after ip_route_me_harder() given this may result in use-after-free due to skbuff header reallocation, patch from Tejaswi Tanikella. ==================== Signed-off-by: David S. Miller commit 18129a24983906eaf2a2d448ce4b83e27091ebe2 Author: Jeff Barnhill <0xeffeff@gmail.com> Date: Wed Nov 1 14:58:09 2017 +0000 net: vrf: correct FRA_L3MDEV encode type FRA_L3MDEV is defined as U8, but is being added as a U32 attribute. On big endian architecture, this results in the l3mdev entry not being added to the FIB rules. Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eebff27ca4182bbf5f039dd60d79e2d7c0a707e Author: Konstantin Khlebnikov Date: Wed Nov 1 16:32:15 2017 +0300 tcp_nv: fix division by zero in tcpnv_acked() Average RTT could become zero. This happened in real life at least twice. This patch treats zero as 1us. Signed-off-by: Konstantin Khlebnikov Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller net/ipv4/tcp_nv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cc06965fc8b7c5592b6a1355dff2623611bfeb3 Merge: 96ffbbf 32bec2a Author: Dave Airlie Date: Thu Nov 2 14:40:12 2017 +1000 Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just two small patches for stable to fix the driver failing to load on polaris cards with harvested VCE or UVD blocks. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: allow harvesting check for Polaris VCE drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting commit 32bec2afa525149288e6696079bc85f747fa2138 Author: Leo Liu Date: Tue Oct 31 21:12:35 2017 -0400 drm/amdgpu: allow harvesting check for Polaris VCE Fixes init failures on Polaris cards with harvested VCE blocks. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cb4b02d7cac56a69d8137d8d843507cca9182aed Author: Leo Liu Date: Tue Oct 31 21:03:39 2017 -0400 drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting Fixes init failures on polaris cards with harvested UVD. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 96ffbbf936298cad0df289ed1c09052493095b7f Merge: 25dd1aa bb5cf33 Author: Dave Airlie Date: Thu Nov 2 11:33:57 2017 +1000 Merge tag 'drm-intel-fixes-2017-11-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Fixes for Stable: - Fix KBL Blank Screen (Jani) - Fix FIFO Underrun on SNB (Maarten) Other fixes: - Fix GPU Hang on i915gm (Chris) - Fix gem_tiled_pread_pwrite IGT case (Chris) - Cancel modeset retry work during modeset clean-up (Manasi) * tag 'drm-intel-fixes-2017-11-01' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Check incoming alignment for unfenced buffers (on i915gm) drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr) drm/i915: Hold rcu_read_lock when iterating over the radixtree (objects) drm/i915/edp: read edp display control registers unconditionally drm/i915: Do not rely on wm preservation for ILK watermarks drm/i915: Cancel the modeset retry work during modeset cleanup commit dad4675388fcb4353aea64174a165fb8494f1c13 Author: Russell King Date: Wed Nov 1 19:18:13 2017 +0000 ARM: add debug ".edata_real" symbol Add an additional symbol to the decompressor image, which will allow future debugging of non-bootable problems similar to the one encountered with the EFI stub. Signed-off-by: Russell King arch/arm/boot/compressed/vmlinux.lds.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7e7bf0ec1a7cd4599941ae2c79c3039dc622853b Author: James Hogan Date: Wed Nov 1 23:20:23 2017 +0000 MIPS: smp-cmp: Fix vpe_id build error The smp-cmp build has been (further) broken since commit 856fbcee6099 ("MIPS: Store core & VP IDs in GlobalNumber-style variable") in v4.14-rc1 like so: arch/mips/kernel/smp-cmp.c: In function ‘cmp_init_secondary’: arch/mips/kernel/smp-cmp.c:53:4: error: ‘struct cpuinfo_mips’ has no member named ‘vpe_id’ c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & ^ Fix by replacing vpe_id with cpu_set_vpe_id(). Fixes: 856fbcee6099 ("MIPS: Store core & VP IDs in GlobalNumber-style variable") Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17569/ Signed-off-by: James Hogan arch/mips/kernel/smp-cmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a99df9a3d14cd866b5516f8cba515a3bfd554ab Merge: 1cc1570 c3aff08 Author: Linus Torvalds Date: Wed Nov 1 16:04:27 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull signal bugfix from Eric Biederman: "When making the generic support for SIGEMT conditional on the presence of SIGEMT I made a typo that causes it to fail to activate. It was noticed comparatively quickly but the bug report just made it to me today" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal: Fix name of SIGEMT in #if defined() check commit 07ca043e6b79ec7741b4fa2e9b72312f1ecc2030 Author: James Hartley Date: Wed Oct 11 19:11:32 2017 +0100 MAINTAINERS: Update Pistachio platform maintainers Neither of the current maintainers works for Imagination any more. Removed both imgtec email addresses and added back mine for occasional reviews, also changed from Maintained to Odd Fixes to reflect the time that I will be able to spend on it. Signed-off-by: James Hartley Patchwork: https://patchwork.linux-mips.org/patch/17475/ Signed-off-by: James Hogan MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f677b77050c144bd4c515b91ea48bd0efe82355e Author: Jason A. Donenfeld Date: Mon Oct 23 19:20:56 2017 +0200 MIPS: smp-cmp: Use right include for task_struct When task_struct was moved, this MIPS code was neglected. Evidently nobody is using it anymore. This fixes this build error: In file included from ./arch/mips/include/asm/thread_info.h:15:0, from ./include/linux/thread_info.h:37, from ./include/asm-generic/current.h:4, from ./arch/mips/include/generated/asm/current.h:1, from ./include/linux/sched.h:11, from arch/mips/kernel/smp-cmp.c:22: arch/mips/kernel/smp-cmp.c: In function ‘cmp_boot_secondary’: ./arch/mips/include/asm/processor.h:384:41: error: implicit declaration of function ‘task_stack_page’ [-Werror=implicit-function-declaration] #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \ ^ arch/mips/kernel/smp-cmp.c:84:21: note: in expansion of macro ‘__KSTK_TOS’ unsigned long sp = __KSTK_TOS(idle); ^~~~~~~~~~ Fixes: f3ac60671954 ("sched/headers: Move task-stack related APIs from to ") Signed-off-by: Jason A. Donenfeld Cc: # 4.11+ Patchwork: https://patchwork.linux-mips.org/patch/17522/ Signed-off-by: James Hogan arch/mips/kernel/smp-cmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3aff086ea11f17f5c0bec77bdbf4365ba6b41fc Author: Andrew Clayton Date: Wed Nov 1 15:49:59 2017 +0000 signal: Fix name of SIGEMT in #if defined() check Commit cc731525f26a ("signal: Remove kernel interal si_code magic") added a check for SIGMET and NSIGEMT being defined. That SIGMET should in fact be SIGEMT, with SIGEMT being defined in arch/{alpha,mips,sparc}/include/uapi/asm/signal.h This was actually pointed out by BenHutchings in a lwn.net comment here https://lwn.net/Comments/734608/ Fixes: cc731525f26a ("signal: Remove kernel interal si_code magic") Signed-off-by: Andrew Clayton Signed-off-by: "Eric W. Biederman" kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cc15701cd89b0ce695bbc5cff3a2bf3e2efd25f Merge: 4f2ba5d 79d7334 Author: Linus Torvalds Date: Wed Nov 1 14:46:38 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into this series: - Regression fix for ide-cd, ensuring that a request is fully initialized. From Hongxu. - Ditto fix for virtio_blk, from Bart. - NVMe fix from Keith, ensuring that we set the right block size on revalidation. If the block size changed, we'd be in trouble without it. - NVMe rdma fix from Sagi, fixing a potential hang while the controller is being removed" * 'for-linus' of git://git.kernel.dk/linux-block: ide:ide-cd: fix kernel panic resulting from missing scsi_req_init nvme: Fix setting logical block format when revalidating virtio_blk: Fix an SG_IO regression nvme-rdma: fix possible hang when issuing commands during ctrl removal commit 0464a53eba0af434b8516c2e01d881aa587cd517 Author: Aleksandar Markovic Date: Fri Oct 20 16:27:45 2017 +0200 MIPS: Update Goldfish RTC driver maintainer email address Change all relevant instances of miodrag.dinic@imgtec.com email address to miodrag.dinic@mips.com. Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Patchwork: https://patchwork.linux-mips.org/patch/17515/ [jhogan@kernel.org: Fix .mailmap direction] Signed-off-by: James Hogan .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 89677e44b26ef49fd57208c7885fdd729b3724e5 Author: Aleksandar Markovic Date: Fri Oct 20 16:27:44 2017 +0200 MIPS: Update RINT emulation maintainer email address Change all relevant instances of aleksandar.markovic@imgtec.com email address to aleksandar.markovic@mips.com. Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Patchwork: https://patchwork.linux-mips.org/patch/17514/ Signed-off-by: James Hogan .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 8a46f71d343814a07f37d209e6b15b2a6573f8da Author: Matt Redfearn Date: Wed Nov 1 16:45:56 2017 +0000 MIPS: CPS: Fix use of current_cpu_data in preemptible code Commit 1ec9dd80bedc ("MIPS: CPS: Detect CPUs in secondary clusters") added a check in cps_boot_secondary() that the secondary being booted is in the same cluster as the CPU running this code. This check is performed using current_cpu_data without disabling preemption. As such when CONFIG_PREEMPT=y, a BUG is triggered: [ 57.991693] BUG: using smp_processor_id() in preemptible [00000000] code: hotplug/1749 [ 58.063077] Call Trace: [ 58.065842] [<8040cdb4>] show_stack+0x84/0x114 [ 58.070830] [<80b11b38>] dump_stack+0xf8/0x140 [ 58.075796] [<8079b12c>] check_preemption_disabled+0xec/0x118 [ 58.082204] [<80415110>] cps_boot_secondary+0x84/0x44c [ 58.087935] [<80413a14>] __cpu_up+0x34/0x98 [ 58.092624] [<80434240>] bringup_cpu+0x38/0x114 [ 58.097680] [<80434af0>] cpuhp_invoke_callback+0x168/0x8f0 [ 58.103801] [<804362d0>] _cpu_up+0x154/0x1c8 [ 58.108565] [<804363dc>] do_cpu_up+0x98/0xa8 [ 58.113333] [<808261f8>] device_online+0x84/0xc0 [ 58.118481] [<80826294>] online_store+0x60/0x98 [ 58.123562] [<8062261c>] kernfs_fop_write+0x158/0x1d4 [ 58.129196] [<805a2ae4>] __vfs_write+0x4c/0x168 [ 58.134247] [<805a2dc8>] vfs_write+0xe0/0x190 [ 58.139095] [<805a2fe0>] SyS_write+0x68/0xc4 [ 58.143854] [<80415d58>] syscall_common+0x34/0x58 In reality we don't currently support running the kernel on CPUs not in cluster 0, so the answer to cpu_cluster(¤t_cpu_data) will always be 0, even if this task being preempted and continues running on a different CPU. Regardless, the BUG should not be triggered, so fix this by switching to raw_current_cpu_data. When multicluster support lands upstream this check will need removing or changing anyway. Fixes: 1ec9dd80bedc ("MIPS: CPS: Detect CPUs in secondary clusters") Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton CC: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17563/ Signed-off-by: James Hogan arch/mips/kernel/smp-cps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7298f08ea8870d44d36c7d6cd07dd0303faef6c2 Author: Borislav Petkov Date: Wed Nov 1 17:47:54 2017 +0100 x86/mcelog: Get rid of RCU remnants Jeremy reported a suspicious RCU usage warning in mcelog. /dev/mcelog is called in process context now as part of the notifier chain and doesn't need any of the fancy RCU and lockless accesses which it did in atomic context. Axe it all in favor of a simple mutex synchronization which cures the problem reported. Fixes: 5de97c9f6d85 ("x86/mce: Factor out and deprecate the /dev/mcelog driver") Reported-by: Jeremy Cline Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-and-tested-by: Tony Luck Cc: Andi Kleen Cc: linux-edac@vger.kernel.org Cc: Laura Abbott Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171101164754.xzzmskl4ngrqc5br@pd.tnic Link: https://bugzilla.redhat.com/show_bug.cgi?id=1498969 arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 121 +++++++------------------------- 1 file changed, 27 insertions(+), 94 deletions(-) commit 42f930da7f00c0ab23df4c7aed36137f35988980 Author: Don Zickus Date: Wed Nov 1 14:11:27 2017 -0400 watchdog/hardlockup/perf: Use atomics to track in-use cpu counter Guenter reported: There is still a problem. When running echo 6 > /proc/sys/kernel/watchdog_thresh echo 5 > /proc/sys/kernel/watchdog_thresh repeatedly, the message NMI watchdog: Enabled. Permanently consumes one hw-PMU counter. stops after a while (after ~10-30 iterations, with fluctuations). Maybe watchdog_cpus needs to be atomic ? That's correct as this again is affected by the asynchronous nature of the smpboot thread unpark mechanism. CPU 0 CPU1 CPU2 write(watchdog_thresh, 6) stop() park() update() start() unpark() thread->unpark() cnt++; write(watchdog_thresh, 5) thread->unpark() stop() park() thread->park() cnt--; cnt++; update() start() unpark() That's not a functional problem, it just affects the informational message. Convert watchdog_cpus to atomic_t to prevent the problem Reported-and-tested-by: Guenter Roeck Signed-off-by: Don Zickus Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20171101181126.j727fqjmdthjz4xk@redhat.com kernel/watchdog_hld.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9c388a5ed1960b2ebbebd3dbe7553092b0c15ec1 Author: Thomas Gleixner Date: Tue Oct 31 22:32:00 2017 +0100 watchdog/harclockup/perf: Revert a33d44843d45 ("watchdog/hardlockup/perf: Simplify deferred event destroy") Guenter reported a crash in the watchdog/perf code, which is caused by cleanup() and enable() running concurrently. The reason for this is: The watchdog functions are serialized via the watchdog_mutex and cpu hotplug locking, but the enable of the perf based watchdog happens in context of the unpark callback of the smpboot thread. But that unpark function is not synchronous inside the locking. The unparking of the thread just wakes it up and leaves so there is no guarantee when the thread is executing. If it starts running _before_ the cleanup happened then it will create a event and overwrite the dead event pointer. The new event is then cleaned up because the event is marked dead. lock(watchdog_mutex); lockup_detector_reconfigure(); cpus_read_lock(); stop(); park() update(); start(); unpark() cpus_read_unlock(); thread runs() overwrite dead event ptr cleanup(); free new event, which is active inside perf.... unlock(watchdog_mutex); The park side is safe as that actually waits for the thread to reach parked state. Commit a33d44843d45 removed the protection against this kind of scenario under the stupid assumption that the hotplug serialization and the watchdog_mutex cover everything. Bring it back. Reverts: a33d44843d45 ("watchdog/hardlockup/perf: Simplify deferred event destroy") Reported-and-tested-by: Guenter Roeck Signed-off-by: Thomas Feels-stupid Gleixner Cc: Peter Zijlstra Cc: Don Zickus Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1710312145190.1942@nanos kernel/watchdog_hld.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ff0c6eecef59d6f949bbc09d117f2527ae1d4e34 Author: Luc Van Oostenryck Date: Tue Oct 31 18:19:15 2017 +0100 ARM: 8716/1: pass endianness info to sparse ARM depends on the macros '__ARMEL__' & '__ARMEB__' being defined or not to correctly select or define endian-specific macros, structures or pieces of code. These macros are predefined by the compiler but sparse knows nothing about them and thus may pre-process files differently from what gcc would. Fix this by passing '-D__ARMEL__' or '-D__ARMEB__' to sparse, depending on the endianness of the kernel, like defined by GCC. Note: In most case it won't change anything since most ARMs use little-endian (but an allyesconfig would use big-endian!). To: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Russell King arch/arm/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit cef75036c40408ba3bc308bcb00a3d440da713fc Author: Sinclair Yeh Date: Wed Nov 1 10:47:05 2017 -0700 drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue This is an extension of Commit 7c20d213dd3c ("drm/vmwgfx: Work around mode set failure in 2D VMs") With Wayland desktop and atomic mode set, during the mode setting process there is a moment when two framebuffer sized surfaces are being pinned. This was not an issue with Xorg. Since this only happens during a mode change, there should be no performance impact by increasing allowable mem_size. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: stable@vger.kernel.org drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef217b1f08fdfe94cd75308f5487bc311640105d Author: Arvind Yadav Date: Wed Nov 1 10:45:43 2017 -0700 drm/vmwgfx: constify vmw_fence_ops vmw_fence_ops are not supposed to change at runtime. Functions "dma_fence_init" working with const vmw_fence_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb5cf3386327c9cb5ca3fbb85242e940751649c8 Author: Chris Wilson Date: Tue Oct 31 10:36:07 2017 +0000 drm/i915: Check incoming alignment for unfenced buffers (on i915gm) In case the object has changed tiling between calls to execbuf, we need to check if the existing offset inside the GTT matches the new tiling constraint. We even need to do this for "unfenced" tiled objects, where the 3D commands use an implied fence and so the object still needs to match the physical fence restrictions on alignment (only required for gen2 and early gen3). In commit 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array"), the idea was to remove the second guessing and only set the NEEDS_MAP flag when required. However, the entire check for an unusable offset for fencing was removed and not just the secondary check. I.e. /* avoid costly ping-pong once a batch bo ended up non-mappable */ if (entry->flags & __EXEC_OBJECT_NEEDS_MAP && !i915_vma_is_map_and_fenceable(vma)) return !only_mappable_for_reloc(entry->flags); was entirely removed as the ping-pong between execbuf passes was fixed, but its primary purpose in forcing unaligned unfenced access to be rebound was forgotten. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103502 Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171031103607.17836-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 1d033beb20d6d5885587a02a393b6598d766a382) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++++ 1 file changed, 4 insertions(+) commit a53a0ab8ff725672fcb47bb9a5ef75fce45679d0 Merge: 1f20f9f b817d93 Author: Takashi Iwai Date: Wed Nov 1 17:43:20 2017 +0100 Merge tag 'asoc-fix-v4.14-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.14 A bunch of fixes here, mostly device specific ones (the biggest one being the revert of the hotword support for rt5514), with a couple of core fixes for potential issues with corrupted or otherwise invalid topology files. commit 4f2ba5dc183b71362c3655b50c72f1b10ccac1c1 Merge: cb0631f 2b7cda9 Author: Linus Torvalds Date: Wed Nov 1 08:29:01 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix refcounting in xfrm_bundle_lookup() when using a dummy bundle, from Steffen Klassert. 2) Fix crypto header handling in rx data frames in ath10k driver, from Vasanthakumar Thiagarajan. 3) Fix use after free of qdisc when we defer tcp_chain_flush() to a workqueue. From Cong Wang. 4) Fix double free in lapbether driver, from Pan Bian. 5) Sanitize TUNSETSNDBUF values, from Craig Gallek. 6) Fix refcounting when addrconf_permanent_addr() calls ipv6_del_addr(). From Eric Dumazet. 7) Fix MTU probing bug in TCP that goes back to 2007, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: tcp: fix tcp_mtu_probe() vs highest_sack ipv6: addrconf: increment ifp refcount before ipv6_del_addr() tun/tap: sanitize TUNSETSNDBUF input mlxsw: i2c: Fix buffer increment counter for write transaction mlxsw: reg: Add high and low temperature thresholds MAINTAINERS: Remove Yotam from mlxfw MAINTAINERS: Update Yotam's E-mail net: hns: set correct return value net: lapbether: fix double free bpf: remove SK_REDIRECT from UAPI net: phy: marvell: Only configure RGMII delays when using RGMII xfrm: Fix GSO for IPsec with GRE tunnel. tc-testing: fix arg to ip command: -s -> -n net_sched: remove tcf_block_put_deferred() l2tp: hold tunnel in pppol2tp_connect() Revert "ath10k: fix napi_poll budget overflow" ath10k: rebuild crypto header in rx data frames wcn36xx: Remove unnecessary rcu_read_unlock in wcn36xx_bss_info_changed xfrm: Clear sk_dst_cache when applying per-socket policy. xfrm: Fix xfrm_dst_cache memleak commit cb0631fd3cf9e989cd48293fe631cbc402aec9a9 Author: Vlastimil Babka Date: Wed Nov 1 08:21:25 2017 +0100 x86/mm: fix use-after-free of vma during userfaultfd fault Syzkaller with KASAN has reported a use-after-free of vma->vm_flags in __do_page_fault() with the following reproducer: mmap(&(0x7f0000000000/0xfff000)=nil, 0xfff000, 0x3, 0x32, 0xffffffffffffffff, 0x0) mmap(&(0x7f0000011000/0x3000)=nil, 0x3000, 0x1, 0x32, 0xffffffffffffffff, 0x0) r0 = userfaultfd(0x0) ioctl$UFFDIO_API(r0, 0xc018aa3f, &(0x7f0000002000-0x18)={0xaa, 0x0, 0x0}) ioctl$UFFDIO_REGISTER(r0, 0xc020aa00, &(0x7f0000019000)={{&(0x7f0000012000/0x2000)=nil, 0x2000}, 0x1, 0x0}) r1 = gettid() syz_open_dev$evdev(&(0x7f0000013000-0x12)="2f6465762f696e7075742f6576656e742300", 0x0, 0x0) tkill(r1, 0x7) The vma should be pinned by mmap_sem, but handle_userfault() might (in a return to userspace scenario) release it and then acquire again, so when we return to __do_page_fault() (with other result than VM_FAULT_RETRY), the vma might be gone. Specifically, per Andrea the scenario is "A return to userland to repeat the page fault later with a VM_FAULT_NOPAGE retval (potentially after handling any pending signal during the return to userland). The return to userland is identified whenever FAULT_FLAG_USER|FAULT_FLAG_KILLABLE are both set in vmf->flags" However, since commit a3c4fb7c9c2e ("x86/mm: Fix fault error path using unsafe vma pointer") there is a vma_pkey() read of vma->vm_flags after that point, which can thus become use-after-free. Fix this by moving the read before calling handle_mm_fault(). Reported-by: syzbot Reported-by: Dmitry Vyukov Suggested-by: Kirill A. Shutemov Fixes: 3c4fb7c9c2e ("x86/mm: Fix fault error path using unsafe vma pointer") Reviewed-by: Andrea Arcangeli Signed-off-by: Vlastimil Babka Signed-off-by: Linus Torvalds arch/x86/mm/fault.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 89db69d670a11274c323af48479841d3d765bd49 Merge: 7c404c6 f74bc7c Author: Linus Torvalds Date: Wed Nov 1 07:59:39 2017 -0700 Merge tag 'smb3-file-name-too-long-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fix from Steve French: "smb3 file name too long fix" * tag 'smb3-file-name-too-long-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: check MaxPathNameComponentLength != 0 before using it commit 79d73346ac05bc31f2e96f899c4e9aaaa616a8d4 Author: Hongxu Jia Date: Tue Oct 31 15:39:40 2017 +0800 ide:ide-cd: fix kernel panic resulting from missing scsi_req_init Since we split the scsi_request out of struct request, while the standard prep_rq_fn builds 10 byte cmds, it missed to invoke scsi_req_init() to initialize certain fields of a scsi_request structure (.__cmd[], .cmd, .cmd_len and .sense_len but no other members of struct scsi_request). An example panic on virtual machines (qemu/virtualbox) to boot from IDE cdrom: ... [ 8.754381] Call Trace: [ 8.755419] blk_peek_request+0x182/0x2e0 [ 8.755863] blk_fetch_request+0x1c/0x40 [ 8.756148] ? ktime_get+0x40/0xa0 [ 8.756385] do_ide_request+0x37d/0x660 [ 8.756704] ? cfq_group_service_tree_add+0x98/0xc0 [ 8.757011] ? cfq_service_tree_add+0x1e5/0x2c0 [ 8.757313] ? ktime_get+0x40/0xa0 [ 8.757544] __blk_run_queue+0x3d/0x60 [ 8.757837] queue_unplugged+0x2f/0xc0 [ 8.758088] blk_flush_plug_list+0x1f4/0x240 [ 8.758362] blk_finish_plug+0x2c/0x40 ... [ 8.770906] RIP: ide_cdrom_prep_fn+0x63/0x180 RSP: ffff92aec018bae8 [ 8.772329] ---[ end trace 6408481e551a85c9 ]--- ... Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Hongxu Jia Signed-off-by: Jens Axboe drivers/ide/ide-cd.c | 1 + 1 file changed, 1 insertion(+) commit 9d9491a7da2a4ce9fed32bd8611992ea3471523a Author: Douglas Anderson Date: Thu Oct 12 13:11:17 2017 -0700 mmc: dw_mmc: Fix the DTO timeout calculation Just like the CTO timeout calculation introduced recently, the DTO timeout calculation was incorrect. It used "bus_hz" but, as far as I can tell, it's supposed to use the card clock. Let's account for the div value, which is documented as 2x the value stored in the register, or 1 if the register is 0. NOTE: This was likely not terribly important until commit 16a34574c6ca ("mmc: dw_mmc: remove the quirks flags") landed because "DIV" is documented on Rockchip SoCs (the ones that used to define the quirk) to always be 0 or 1. ...and, in fact, it's documented to only be 1 with EMMC in 8-bit DDR52 mode. Thus before the quirk was applied to everyone it was mostly OK to ignore the DIV value. I haven't personally observed any problems that are fixed by this patch but I also haven't tested this anywhere with a DIV other an 0. AKA: this problem was found simply by code inspection and I have no failing test cases that are fixed by it. Presumably this could fix real bugs for someone out there, though. Fixes: 16a34574c6ca ("mmc: dw_mmc: remove the quirks flags") Signed-off-by: Douglas Anderson Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b817d936248b9bcee8282e97fb1dda1b03c903fe Merge: 0b07194 f3ee909 1e6f4fc0 3712851 ea968da a6189d3 a16cc63 Author: Mark Brown Date: Wed Nov 1 13:36:16 2017 +0000 Merge remote-tracking branches 'asoc/fix/topology', 'asoc/fix/adau17x1', 'asoc/fix/rt5514', 'asoc/fix/rt5616', 'asoc/fix/rt5659' and 'asoc/fix/rt5663' into tmp commit 2b7cda9c35d3b940eb9ce74b30bbd5eb30db493d Author: Eric Dumazet Date: Mon Oct 30 23:08:20 2017 -0700 tcp: fix tcp_mtu_probe() vs highest_sack Based on SNMP values provided by Roman, Yuchung made the observation that some crashes in tcp_sacktag_walk() might be caused by MTU probing. Looking at tcp_mtu_probe(), I found that when a new skb was placed in front of the write queue, we were not updating tcp highest sack. If one skb is freed because all its content was copied to the new skb (for MTU probing), then tp->highest_sack could point to a now freed skb. Bad things would then happen, including infinite loops. This patch renames tcp_highest_sack_combine() and uses it from tcp_mtu_probe() to fix the bug. Note that I also removed one test against tp->sacked_out, since we want to replace tp->highest_sack regardless of whatever condition, since keeping a stale pointer to freed skb is a recipe for disaster. Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access") Signed-off-by: Eric Dumazet Reported-by: Alexei Starovoitov Reported-by: Roman Gushchin Reported-by: Oleksandr Natalenko Acked-by: Alexei Starovoitov Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller include/net/tcp.h | 6 +++--- net/ipv4/tcp_output.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) commit e669b86945478b3d90d2d87e3793a6eed06d332f Author: Eric Dumazet Date: Mon Oct 30 22:47:09 2017 -0700 ipv6: addrconf: increment ifp refcount before ipv6_del_addr() In the (unlikely) event fixup_permanent_addr() returns a failure, addrconf_permanent_addr() calls ipv6_del_addr() without the mandatory call to in6_ifa_hold(), leading to a refcount error, spotted by syzkaller : WARNING: CPU: 1 PID: 3142 at lib/refcount.c:227 refcount_dec+0x4c/0x50 lib/refcount.c:227 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 3142 Comm: ip Not tainted 4.14.0-rc4-next-20171009+ #33 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:181 __warn+0x1c4/0x1e0 kernel/panic.c:544 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:refcount_dec+0x4c/0x50 lib/refcount.c:227 RSP: 0018:ffff8801ca49e680 EFLAGS: 00010286 RAX: 000000000000002c RBX: ffff8801d07cfcdc RCX: 0000000000000000 RDX: 000000000000002c RSI: 1ffff10039493c90 RDI: ffffed0039493cc4 RBP: ffff8801ca49e688 R08: ffff8801ca49dd70 R09: 0000000000000000 R10: ffff8801ca49df58 R11: 0000000000000000 R12: 1ffff10039493cd9 R13: ffff8801ca49e6e8 R14: ffff8801ca49e7e8 R15: ffff8801d07cfcdc __in6_ifa_put include/net/addrconf.h:369 [inline] ipv6_del_addr+0x42b/0xb60 net/ipv6/addrconf.c:1208 addrconf_permanent_addr net/ipv6/addrconf.c:3327 [inline] addrconf_notify+0x1c66/0x2190 net/ipv6/addrconf.c:3393 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x60 net/core/dev.c:1697 call_netdevice_notifiers net/core/dev.c:1715 [inline] __dev_notify_flags+0x15d/0x430 net/core/dev.c:6843 dev_change_flags+0xf5/0x140 net/core/dev.c:6879 do_setlink+0xa1b/0x38e0 net/core/rtnetlink.c:2113 rtnl_newlink+0xf0d/0x1a40 net/core/rtnetlink.c:2661 rtnetlink_rcv_msg+0x733/0x1090 net/core/rtnetlink.c:4301 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2408 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4313 netlink_unicast_kernel net/netlink/af_netlink.c:1273 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1299 netlink_sendmsg+0xa4a/0xe70 net/netlink/af_netlink.c:1862 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x75b/0x8a0 net/socket.c:2049 __sys_sendmsg+0xe5/0x210 net/socket.c:2083 SYSC_sendmsg net/socket.c:2094 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2090 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x7fa9174d3320 RSP: 002b:00007ffe302ae9e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ffe302b2ae0 RCX: 00007fa9174d3320 RDX: 0000000000000000 RSI: 00007ffe302aea20 RDI: 0000000000000016 RBP: 0000000000000082 R08: 0000000000000000 R09: 000000000000000f R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe302b32a0 R13: 0000000000000000 R14: 00007ffe302b2ab8 R15: 00007ffe302b32b8 Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Signed-off-by: Eric Dumazet Cc: David Ahern Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 1 + 1 file changed, 1 insertion(+) commit 93161922c658c714715686cd0cf69b090cb9bf1d Author: Craig Gallek Date: Mon Oct 30 18:50:11 2017 -0400 tun/tap: sanitize TUNSETSNDBUF input Syzkaller found several variants of the lockup below by setting negative values with the TUNSETSNDBUF ioctl. This patch adds a sanity check to both the tun and tap versions of this ioctl. watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [repro:2389] Modules linked in: irq event stamp: 329692056 hardirqs last enabled at (329692055): [] _raw_spin_unlock_irqrestore+0x31/0x75 hardirqs last disabled at (329692056): [] apic_timer_interrupt+0x98/0xb0 softirqs last enabled at (35659740): [] __do_softirq+0x328/0x48c softirqs last disabled at (35659731): [] irq_exit+0xbc/0xd0 CPU: 0 PID: 2389 Comm: repro Not tainted 4.14.0-rc7 #23 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff880009452140 task.stack: ffff880006a20000 RIP: 0010:_raw_spin_lock_irqsave+0x11/0x80 RSP: 0018:ffff880006a27c50 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff10 RAX: ffff880009ac68d0 RBX: ffff880006a27ce0 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff880006a27ce0 RDI: ffff880009ac6900 RBP: ffff880006a27c60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 000000000063ff00 R12: ffff880009ac6900 R13: ffff880006a27cf8 R14: 0000000000000001 R15: ffff880006a27cf8 FS: 00007f4be4838700(0000) GS:ffff88000cc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020101000 CR3: 0000000009616000 CR4: 00000000000006f0 Call Trace: prepare_to_wait+0x26/0xc0 sock_alloc_send_pskb+0x14e/0x270 ? remove_wait_queue+0x60/0x60 tun_get_user+0x2cc/0x19d0 ? __tun_get+0x60/0x1b0 tun_chr_write_iter+0x57/0x86 __vfs_write+0x156/0x1e0 vfs_write+0xf7/0x230 SyS_write+0x57/0xd0 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x7f4be4356df9 RSP: 002b:00007ffc18101c08 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4be4356df9 RDX: 0000000000000046 RSI: 0000000020101000 RDI: 0000000000000005 RBP: 00007ffc18101c40 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000293 R12: 0000559c75f64780 R13: 00007ffc18101d30 R14: 0000000000000000 R15: 0000000000000000 Fixes: 33dccbb050bb ("tun: Limit amount of queued packets per device") Fixes: 20d29d7a916a ("net: macvtap driver") Signed-off-by: Craig Gallek Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tap.c | 2 ++ drivers/net/tun.c | 4 ++++ 2 files changed, 6 insertions(+) commit d70eaa386bf9ecc1e5b3002f64eb59172fcec4fd Author: Vadim Pasternak Date: Wed Nov 1 12:10:42 2017 +0100 mlxsw: i2c: Fix buffer increment counter for write transaction It fixes a problem for the last chunk where 'chunk_size' is smaller than MLXSW_I2C_BLK_MAX and data is copied to the wrong offset, overriding previous data. Fixes: 6882b0aee180 ("mlxsw: Introduce support for I2C bus") Signed-off-by: Vadim Pasternak Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7400bb4b5800831581a82f71700af6a5e815c3c8 Author: Tejaswi Tanikella Date: Mon Oct 23 11:46:03 2017 +0530 netfilter: nf_reject_ipv4: Fix use-after-free in send_reset niph is not updated after pskb_expand_head changes the skb head. It still points to the freed data, which is then used to update tot_len and checksum. This could cause use-after-free poison crash. Update niph, if ip_route_me_harder does not fail. This only affects the interaction with REJECT targets and br_netfilter. Signed-off-by: Tejaswi Tanikella Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_reject_ipv4.c | 2 ++ 1 file changed, 2 insertions(+) commit 122f00cdc1bb27cb0ff4b0a8cffa3bb27f61f949 Merge: 62b0e92 73b9fc4 Author: David S. Miller Date: Wed Nov 1 19:27:46 2017 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-11-01 1) Fix a memleak when a packet matches a policy without a matching state. 2) Reset the socket cached dst_entry when inserting a socket policy, otherwise the policy might be ignored. From Jonathan Basseri. 3) Fix GSO for a IPsec, GRE tunnel combination. We reset the encapsulation field at the skb too erly, as a result GRE does not segment GSO packets. Fix this by resetting the the encapsulation field right before the transformation where the inner headers get invalid. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 153fbd1226fb30b8630802aa5047b8af5ef53c9f Author: Peter Zijlstra Date: Tue Oct 31 11:18:53 2017 +0100 futex: Fix more put_pi_state() vs. exit_pi_state_list() races Dmitry (through syzbot) reported being able to trigger the WARN in get_pi_state() and a use-after-free on: raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); Both are due to this race: exit_pi_state_list() put_pi_state() lock(&curr->pi_lock) while() { pi_state = list_first_entry(head); hb = hash_futex(&pi_state->key); unlock(&curr->pi_lock); dec_and_test(&pi_state->refcount); lock(&hb->lock) lock(&pi_state->pi_mutex.wait_lock) // uaf if pi_state free'd lock(&curr->pi_lock); .... unlock(&curr->pi_lock); get_pi_state(); // WARN; refcount==0 The problem is we take the reference count too late, and don't allow it being 0. Fix it by using inc_not_zero() and simply retrying the loop when we fail to get a refcount. In that case put_pi_state() should remove the entry from the list. Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: Gratian Crisan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: dvhart@infradead.org Cc: syzbot Cc: syzkaller-bugs@googlegroups.com Cc: Fixes: c74aef2d06a9 ("futex: Fix pi_state->owner serialization") Link: http://lkml.kernel.org/r/20171031101853.xpfh72y643kdfhjs@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/futex.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit e6c4dcb308160115287afd87afb63b5684d75a5b Author: Naveen N. Rao Date: Mon Oct 30 20:42:09 2017 +0530 powerpc/kprobes: Dereference function pointers only if the address does not belong to kernel text This makes the changes introduced in commit 83e840c770f2c5 ("powerpc64/elfv1: Only dereference function descriptor for non-text symbols") to be specific to the kprobe subsystem. We previously changed ppc_function_entry() to always check the provided address to confirm if it needed to be dereferenced. This is actually only an issue for kprobe blacklisted asm labels (through use of _ASM_NOKPROBE_SYMBOL) and can cause other issues with ftrace. Also, the additional checks are not really necessary for our other uses. As such, move this check to the kprobes subsystem. Fixes: 83e840c770f2 ("powerpc64/elfv1: Only dereference function descriptor for non-text symbols") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 63be1a81e40733ecd175713b6a7558dc43f00851 Author: Naveen N. Rao Date: Mon Oct 30 20:42:08 2017 +0530 Revert "powerpc64/elfv1: Only dereference function descriptor for non-text symbols" This reverts commit 83e840c770f2c5 ("powerpc64/elfv1: Only dereference function descriptor for non-text symbols"). Chandan reported that on newer kernels, trying to enable function_graph tracer on ppc64 (BE) locks up the system with the following trace: Unable to handle kernel paging request for data at address 0x600000002fa30010 Faulting instruction address: 0xc0000000001f1300 Thread overran stack, or stack corrupted Oops: Kernel access of bad area, sig: 11 [#1] BE SMP NR_CPUS=2048 DEBUG_PAGEALLOC NUMA pSeries Modules linked in: CPU: 1 PID: 6586 Comm: bash Not tainted 4.14.0-rc3-00162-g6e51f1f-dirty #20 task: c000000625c07200 task.stack: c000000625c07310 NIP: c0000000001f1300 LR: c000000000121cac CTR: c000000000061af8 REGS: c000000625c088c0 TRAP: 0380 Not tainted (4.14.0-rc3-00162-g6e51f1f-dirty) MSR: 8000000000001032 CR: 28002848 XER: 00000000 CFAR: c0000000001f1320 SOFTE: 0 ... NIP [c0000000001f1300] .__is_insn_slot_addr+0x30/0x90 LR [c000000000121cac] .kernel_text_address+0x18c/0x1c0 Call Trace: [c000000625c08b40] [c0000000001bd040] .is_module_text_address+0x20/0x40 (unreliable) [c000000625c08bc0] [c000000000121cac] .kernel_text_address+0x18c/0x1c0 [c000000625c08c50] [c000000000061960] .prepare_ftrace_return+0x50/0x130 [c000000625c08cf0] [c000000000061b10] .ftrace_graph_caller+0x14/0x34 [c000000625c08d60] [c000000000121b40] .kernel_text_address+0x20/0x1c0 [c000000625c08df0] [c000000000061960] .prepare_ftrace_return+0x50/0x130 ... [c000000625c0ab30] [c000000000061960] .prepare_ftrace_return+0x50/0x130 [c000000625c0abd0] [c000000000061b10] .ftrace_graph_caller+0x14/0x34 [c000000625c0ac40] [c000000000121b40] .kernel_text_address+0x20/0x1c0 [c000000625c0acd0] [c000000000061960] .prepare_ftrace_return+0x50/0x130 [c000000625c0ad70] [c000000000061b10] .ftrace_graph_caller+0x14/0x34 [c000000625c0ade0] [c000000000121b40] .kernel_text_address+0x20/0x1c0 This is because ftrace is using ppc_function_entry() for obtaining the address of return_to_handler() in prepare_ftrace_return(). The call to kernel_text_address() itself gets traced and we end up in a recursive loop. Fixes: 83e840c770f2 ("powerpc64/elfv1: Only dereference function descriptor for non-text symbols") Cc: stable@vger.kernel.org # v4.13+ Reported-by: Chandan Rajendra Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/code-patching.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 62b0e9243fca257217ef72f383bd38ed5a542b5e Author: Ido Schimmel Date: Mon Oct 30 10:51:18 2017 +0100 mlxsw: reg: Add high and low temperature thresholds The ASIC has the ability to generate events whenever a sensor indicates the temperature goes above or below its high or low thresholds, respectively. In new firmware versions the firmware enforces a minimum of 5 degrees Celsius difference between both thresholds. Make the driver conform to this requirement. Note that this is required even when the events are disabled, as in certain systems interrupts are generated via GPIO based on these thresholds. Fixes: 85926f877040 ("mlxsw: reg: Add definition of temperature management registers") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 1cf098b782f4d1ac0292e596a9677c8ee9f0ed0a Author: Yuval Mintz Date: Mon Oct 30 11:41:37 2017 +0200 MAINTAINERS: Remove Yotam from mlxfw Provide a mailing list for maintenance of the module instead. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1fd20c36181f526ed2fbd0707b6957f907ee64b Author: Yotam Gigi Date: Mon Oct 30 11:41:36 2017 +0200 MAINTAINERS: Update Yotam's E-mail For the time being I will be available in my private mail. Update both the MAINTAINERS file and the individual modules MODULE_AUTHOR directive with the new address. Signed-off-by: Yotam Gigi Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- net/ife/ife.c | 2 +- net/psample/psample.c | 2 +- net/sched/act_sample.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit d2083d0e92117598dd24ba270af12376f1fb8866 Author: Pan Bian Date: Mon Oct 30 16:50:01 2017 +0800 net: hns: set correct return value The function of_parse_phandle() returns a NULL pointer if it cannot resolve a phandle property to a device_node pointer. In function hns_nic_dev_probe(), its return value is passed to PTR_ERR to extract the error code. However, in this case, the extracted error code will always be zero, which is unexpected. Signed-off-by: Pan Bian Reviewed-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7db8874abd9a134821881bb99301b3afbbe9b080 Author: Pan Bian Date: Sun Oct 29 21:57:22 2017 +0800 net: lapbether: fix double free The function netdev_priv() returns the private data of the device. The memory to store the private data is allocated in alloc_netdev() and is released in netdev_free(). Calling kfree() on the return value of netdev_priv() after netdev_free() results in a double free bug. Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/net/wan/lapbether.c | 1 - 1 file changed, 1 deletion(-) commit 04686ef299db5ff299bfc5a4504b189e46842078 Author: John Fastabend Date: Tue Oct 31 19:17:31 2017 -0700 bpf: remove SK_REDIRECT from UAPI Now that SK_REDIRECT is no longer a valid return code. Remove it from the UAPI completely. Then do a namespace remapping internal to sockmap so SK_REDIRECT is no longer externally visible. Patchs primary change is to do a namechange from SK_REDIRECT to __SK_REDIRECT Reported-by: Alexei Starovoitov Signed-off-by: John Fastabend Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 - kernel/bpf/sockmap.c | 16 ++++++++++++---- tools/include/uapi/linux/bpf.h | 3 +-- 3 files changed, 13 insertions(+), 7 deletions(-) commit 14fc0abafe159fbe8bbcfeca157ef3ba139fa75f Author: Andrew Lunn Date: Tue Oct 31 20:31:28 2017 +0100 net: phy: marvell: Only configure RGMII delays when using RGMII The fix 5987feb38aa5 ("net: phy: marvell: logical vs bitwise OR typo") uncovered another bug in the Marvell PHY driver, which broke the Marvell OpenRD platform. It relies on the bootloader configuring the RGMII delays and does not specify a phy-mode in its device tree. The PHY driver should only configure RGMII delays if the phy mode indicates it is using RGMII. Without anything in device tree, the mv643xx Ethernet driver defaults to GMII. Fixes: 5987feb38aa5 ("net: phy: marvell: logical vs bitwise OR typo") Signed-off-by: Andrew Lunn Tested-by: Aaro Koskinen Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b34a264fabdce972ca8d1cff38d1b48ecb963719 Merge: 518828f c29f56b Author: David S. Miller Date: Wed Nov 1 10:51:36 2017 +0900 Merge tag 'wireless-drivers-for-davem-2017-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.14 The most important here is the security vulnerabitility fix for ath10k. ath10k * fix security vulnerability with missing PN check on certain hardware * revert ath10k napi fix as it caused regressions on QCA6174 wcn36xx * remove unnecessary rcu_read_unlock() from error path ==================== Signed-off-by: David S. Miller commit 9e8c399a88f0b87e41a894911475ed2a8f8dff9e Author: Matt Redfearn Date: Wed Sep 27 10:13:25 2017 +0100 MIPS: SMP: Fix deadlock & online race Commit 6f542ebeaee0 ("MIPS: Fix race on setting and getting cpu_online_mask") effectively reverted commit 8f46cca1e6c06 ("MIPS: SMP: Fix possibility of deadlock when bringing CPUs online") and thus has reinstated the possibility of deadlock. The commit was based on testing of kernel v4.4, where the CPU hotplug core code issued a BUG() if the starting CPU is not marked online when the boot CPU returns from __cpu_up. The commit fixes this race (in v4.4), but re-introduces the deadlock situation. As noted in the commit message, upstream differs in this area. Commit 8df3e07e7f21f ("cpu/hotplug: Let upcoming cpu bring itself fully up") adds a completion event in the CPU hotplug core code, making this race impossible. However, people were unhappy with relying on the core code to do the right thing. To address the issues both commits were trying to fix, add a second completion event in the MIPS smp hotplug path. It removes the possibility of a race, since the MIPS smp hotplug code now synchronises both the boot and secondary CPUs before they return to the hotplug core code. It also addresses the deadlock by ensuring that the secondary CPU is not marked online before it's counters are synchronised. This fix should also be backported to fix the race condition introduced by the backport of commit 8f46cca1e6c06 ("MIPS: SMP: Fix possibility of deadlock when bringing CPUs online"), through really that race only existed before commit 8df3e07e7f21f ("cpu/hotplug: Let upcoming cpu bring itself fully up"). Signed-off-by: Matt Redfearn Fixes: 6f542ebeaee0 ("MIPS: Fix race on setting and getting cpu_online_mask") CC: Matija Glavinic Pecotic Cc: # v4.1+: 8f46cca1e6c0: "MIPS: SMP: Fix possibility of deadlock when bringing CPUs online" Cc: # v4.1+: a00eeede507c: "MIPS: SMP: Use a completion event to signal CPU up" Cc: # v4.1+: 6f542ebeaee0: "MIPS: Fix race on setting and getting cpu_online_mask" Cc: # v4.1+ Patchwork: https://patchwork.linux-mips.org/patch/17376/ Signed-off-by: James Hogan arch/mips/kernel/smp.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 6a2932a463d526e362a6b4e112be226f1d18d088 Author: Wei Yongjun Date: Fri Oct 13 09:25:17 2017 +0000 MIPS: bpf: Fix a typo in build_one_insn() Fix a typo in build_one_insn(). Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.") Signed-off-by: Wei Yongjun Cc: # 4.13+ Patchwork: https://patchwork.linux-mips.org/patch/17491/ Signed-off-by: James Hogan arch/mips/net/ebpf_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77238e76b9156d28d86c1e31c00ed2960df0e4de Author: Gustavo A. R. Silva Date: Tue Oct 31 00:35:03 2017 -0500 MIPS: microMIPS: Fix incorrect mask in insn_table_MM It seems that this is a typo error and the proper bit masking is "RT | RS" instead of "RS | RS". This issue was detected with the help of Coccinelle. Fixes: d6b3314b49e1 ("MIPS: uasm: Add lh uam instruction") Reported-by: Julia Lawall Signed-off-by: Gustavo A. R. Silva Reviewed-by: James Hogan Cc: # 3.16+ Patchwork: https://patchwork.linux-mips.org/patch/17551/ Signed-off-by: James Hogan arch/mips/mm/uasm-micromips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25dd1aa3b4cf0c361147aa45ff4dd1d335259ac1 Merge: 0b07194 d324c5b Author: Dave Airlie Date: Wed Nov 1 10:05:03 2017 +1000 Merge branch 'linux-4.14' of git://github.com/skeggsb/linux into drm-fixes single nouveau regression fix. * 'linux-4.14' of git://github.com/skeggsb/linux: drm/nouveau/kms/nv50: use the correct state for base channel notifier setup commit 6a6cba1d945a7511cdfaf338526871195e420762 Author: Paul Burton Date: Tue Oct 31 15:09:22 2017 -0700 MIPS: Fix CM region target definitions The default CM target field in the GCR_BASE register is encoded with 0 meaning memory & 1 being reserved. However the definitions we use for those bits effectively get these two values backwards - likely because they were copied from the definitions for the CM regions where the target is encoded differently. This results in use setting up GCR_BASE with the reserved target value by default, rather than targeting memory as intended. Although we currently seem to get away with this it's not a great idea to rely upon. Fix this by changing our macros to match the documentated target values. The incorrect encoding became used as of commit 9f98f3dd0c51 ("MIPS: Add generic CM probe & access code") in the Linux v3.15 cycle, and was likely carried forwards from older but unused code introduced by commit 39b8d5254246 ("[MIPS] Add support for MIPS CMP platform.") in the v2.6.26 cycle. Fixes: 9f98f3dd0c51 ("MIPS: Add generic CM probe & access code") Signed-off-by: Paul Burton Reported-by: Matt Redfearn Reviewed-by: James Hogan Cc: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # v3.15+ Patchwork: https://patchwork.linux-mips.org/patch/17562/ Signed-off-by: James Hogan arch/mips/include/asm/mips-cm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f005f112f527f0762386c6fd182966d0e066eaf Author: Matt Redfearn Date: Mon Oct 16 11:06:49 2017 +0100 MIPS: generic: Fix compilation error from include asm/mips-cpc.h Commit e83f7e02af50c ("MIPS: CPS: Have asm/mips-cps.h include CM & CPC headers") adds a #error to arch/mips/include/asm/mips-cpc.h if it is included directly. While this commit replaced almost all direct includes of mips-cm.h and mips-cpc.h, 2 remain. With some defconfigs, mips-cps.h is indirectly included before mips-cpc.h, but in others this results in compilation errors: In file included from arch/mips/generic/init.c:23:0: ./arch/mips/include/asm/mips-cpc.h:12:3: error: #error Please include asm/mips-cps.h rather than asm/mips-cpc.h # error Please include asm/mips-cps.h rather than asm/mips-cpc.h In file included from arch/mips/kernel/smp.c:23:0: ./arch/mips/include/asm/mips-cpc.h:12:3: error: #error Please include asm/mips-cps.h rather than asm/mips-cpc.h # error Please include asm/mips-cps.h rather than asm/mips-cpc.h In both cases, fix this by including mips-cps.h instead. Fixes: e83f7e02af50c ("MIPS: CPS: Have asm/mips-cps.h include CM & CPC headers") Signed-off-by: Matt Redfearn Patchwork: https://patchwork.linux-mips.org/patch/17492/ Signed-off-by: James Hogan arch/mips/generic/init.c | 2 +- arch/mips/kernel/smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c496f3c08a83e57359509828e5b19eeb920b81b1 Author: Matt Redfearn Date: Wed Oct 11 09:59:20 2017 +0100 MIPS: Fix exception entry when CONFIG_EVA enabled Commit 9fef68686317b ("MIPS: Make SAVE_SOME more standard") made several changes to the order in which registers are saved in the SAVE_SOME macro, used by exception handlers to save the processor state. In particular, it removed the move k1, sp in the delay slot of the branch testing if the processor is already in kernel mode. This is replaced later in the macro by a move k0, sp When CONFIG_EVA is disabled, this instruction actually appears in the delay slot of the branch. However, when CONFIG_EVA is enabled, instead the RPS workaround of MFC0 k0, CP0_ENTRYHI appears in the delay slot. This results in k0 not containing the stack pointer, but some unrelated value, which is then saved to the kernel stack. On exit from the exception, this bogus value is restored to the stack pointer, resulting in an OOPS. Fix this by moving the save of SP in k0 explicitly in the delay slot of the branch, outside of the CONFIG_EVA section, restoring the expected instruction ordering when CONFIG_EVA is active. Fixes: 9fef68686317b ("MIPS: Make SAVE_SOME more standard") Signed-off-by: Matt Redfearn Reported-by: Vladimir Kondratiev Reviewed-by: Corey Minyard Reviewed-by: James Hogan Patchwork: https://patchwork.linux-mips.org/patch/17471/ Signed-off-by: James Hogan arch/mips/include/asm/stackframe.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c9bb86338a6bb91e4d32db04feb6b8d423e04d06 Author: Antoine Tenart Date: Wed Oct 25 09:23:26 2017 +0200 irqchip/irq-mvebu-gicp: Add missing spin_lock init A spin lock is used in the irq-mvebu-gicp driver, but it is never initialized. This patch adds the missing spin_lock_init() call in the driver's probe function. Fixes: a68a63cb4dfc ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP") Signed-off-by: Antoine Tenart Signed-off-by: Thomas Gleixner Reviewed-by: gregory.clement@free-electrons.com Acked-by: marc.zyngier@arm.com Cc: thomas.petazzoni@free-electrons.com Cc: andrew@lunn.ch Cc: jason@lakedaemon.net Cc: nadavh@marvell.com Cc: miquel.raynal@free-electrons.com Cc: linux-arm-kernel@lists.infradead.org Cc: sebastian.hesselbarth@gmail.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171025072326.21030-1-antoine.tenart@free-electrons.com drivers/irqchip/irq-mvebu-gicp.c | 1 + 1 file changed, 1 insertion(+) commit d324c5bc462d354d337dcf3a14ffd0eb17b4fa38 Author: Ben Skeggs Date: Wed Nov 1 09:12:25 2017 +1000 drm/nouveau/kms/nv50: use the correct state for base channel notifier setup Fixes: 857263 ("drm/nouveau: Handle drm_atomic_helper_swap_state failure") Signed-off-by: Ben Skeggs Tested-by: Lyude Paul Reviewed by: Lyude Paul drivers/gpu/drm/nouveau/nv50_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a1286968c418185238c4549b6c388ba2aa754fc7 Author: James Hogan Date: Tue Oct 31 21:41:07 2017 +0000 MIPS: generic: Fix NI 169445 its build Since commit 04a85e087ad6 ("MIPS: generic: Move NI 169445 FIT image source to its own file"), a generic 32r2el_defconfig kernel fails to build with the following build error: ITB arch/mips/boot/vmlinux.gz.itb Error: arch/mips/boot/vmlinux.gz.its:111.1-2 syntax error FATAL ERROR: Unable to parse input tree mkimage Can't read arch/mips/boot/vmlinux.gz.itb.tmp: Invalid argument Fix arch/mips/generic/board-ni169445.its.S to include the necessary "/" node path before the first open brace. The original issue in arch/mips/generic/vmlinux.its.S was fixed directly in the original commit 7aacf86b75bc ("MIPS: NI 169445 board support") after https://patchwork.linux-mips.org/patch/16941/ was submitted, but the separate its.S file wasn't correctly fixed when resolving the conflict in commit 04a85e087ad6 ("MIPS: generic: Move NI 169445 FIT image source to its own file"). Fixes: 04a85e087ad6 ("MIPS: generic: Move NI 169445 FIT image source to its own file") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: Nathan Sullivan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17561/ Signed-off-by: James Hogan arch/mips/generic/board-ni169445.its.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c404c62675932a406d1c67de5f8fa36e09b330d Merge: 287683d d5919dc Author: Linus Torvalds Date: Tue Oct 31 15:52:48 2017 -0700 Merge tag 'pm-reverts-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management commit reverts from Rafael Wysocki: "Since Geert reports additional problems with my PM QoS fix from the last week that have not been addressed by the most recent fixup on top of it, they both should better be reverted now and let's fix the original issue properly in 4.15. This reverts two recent PM QoS commits one of which introduced multiple problems and the other one fixed some, but not all of them (Rafael Wysocki)" * tag 'pm-reverts-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "PM / QoS: Fix device resume latency PM QoS" Revert "PM / QoS: Fix default runtime_pm device resume latency" commit 48c834be170bb1060e14092ff1c7967ea72b2e97 Author: Paul Burton Date: Wed Oct 25 17:04:33 2017 -0700 Update MIPS email addresses MIPS will soon not be a part of Imagination Technologies, and as such many @imgtec.com email addresses will no longer be valid. This patch updates the addresses for those who: - Have 10 or more patches in mainline authored using an @imgtec.com email address, or any patches dated within the past year. - Are still with Imagination but leaving as part of the MIPS business unit, as determined from an internal email address list. - Haven't already updated their email address (ie. JamesH) or expressed a desire to be excluded (ie. Maciej). - Acked v2 or earlier of this patch, which leaves Deng-Cheng, Matt & myself. New addresses are of the form firstname.lastname@mips.com, and all verified against an internal email address list. An entry is added to .mailmap for each person such that get_maintainer.pl will report the new addresses rather than @imgtec.com addresses which will soon be dead. Instances of the affected addresses throughout the tree are then mechanically replaced with the new @mips.com address. Signed-off-by: Paul Burton Cc: Deng-Cheng Zhu Cc: Deng-Cheng Zhu Acked-by: Dengcheng Zhu Cc: Matt Redfearn Cc: Matt Redfearn Acked-by: Matt Redfearn Cc: Andrew Morton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17540/ Signed-off-by: James Hogan .mailmap | 3 +++ Documentation/ABI/testing/sysfs-class-remoteproc | 4 ++-- MAINTAINERS | 6 +++--- arch/mips/generic/Makefile | 2 +- arch/mips/generic/Platform | 2 +- arch/mips/generic/board-sead3.c | 2 +- arch/mips/generic/init.c | 2 +- arch/mips/generic/irq.c | 2 +- arch/mips/generic/proc.c | 2 +- arch/mips/generic/yamon-dt.c | 2 +- arch/mips/include/asm/dsemul.h | 2 +- arch/mips/include/asm/maar.h | 2 +- arch/mips/include/asm/mach-malta/malta-dtshim.h | 2 +- arch/mips/include/asm/mach-malta/malta-pm.h | 2 +- arch/mips/include/asm/machine.h | 2 +- arch/mips/include/asm/mips-cm.h | 2 +- arch/mips/include/asm/mips-cpc.h | 2 +- arch/mips/include/asm/mips-cps.h | 2 +- arch/mips/include/asm/mips-gic.h | 2 +- arch/mips/include/asm/msa.h | 2 +- arch/mips/include/asm/pm-cps.h | 2 +- arch/mips/include/asm/smp-cps.h | 2 +- arch/mips/include/asm/yamon-dt.h | 2 +- arch/mips/kernel/cmpxchg.c | 2 +- arch/mips/kernel/cps-vec-ns16550.S | 2 +- arch/mips/kernel/cps-vec.S | 2 +- arch/mips/kernel/elf.c | 2 +- arch/mips/kernel/mips-cm.c | 2 +- arch/mips/kernel/mips-cpc.c | 2 +- arch/mips/kernel/pm-cps.c | 2 +- arch/mips/kernel/relocate.c | 2 +- arch/mips/kernel/smp-cps.c | 2 +- arch/mips/mm/sc-debugfs.c | 2 +- arch/mips/mti-malta/malta-dt.c | 2 +- arch/mips/mti-malta/malta-dtshim.c | 2 +- arch/mips/mti-malta/malta-pm.c | 2 +- arch/mips/pci/pci-generic.c | 2 +- arch/mips/tools/generic-board-config.sh | 2 +- drivers/auxdisplay/img-ascii-lcd.c | 2 +- drivers/clk/imgtec/clk-boston.c | 2 +- drivers/clk/ingenic/cgu.c | 2 +- drivers/clk/ingenic/cgu.h | 2 +- drivers/clk/ingenic/jz4740-cgu.c | 2 +- drivers/clk/ingenic/jz4780-cgu.c | 2 +- drivers/cpuidle/cpuidle-cps.c | 2 +- drivers/power/reset/piix4-poweroff.c | 4 ++-- 46 files changed, 52 insertions(+), 49 deletions(-) commit ea82daf4354e45e9b830d9fe58713011c83b07b8 Author: Luc Van Oostenryck Date: Tue Oct 31 18:22:23 2017 +0100 tile: pass machine size to sparse By default, sparse assumes a 64bit machine when compiled on x86-64 and 32bit when compiled on anything else. This can of course create all sort of problems, like issuing false warnings like: 'constant ... is so big it is unsigned long long' or 'shift too big (32) for type unsigned long' when the architecture is 64bit while sparse was compiled on a 32bit machine, or worse, to not emit legitimate warnings in the reverse situation. Fix this by passing to sparse the appropriate -m32/-m64 flag. To: Chris Metcalf Signed-off-by: Luc Van Oostenryck Signed-off-by: Chris Metcalf arch/tile/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit a323335e62cc161abb818f259eea0e1e72eb5c27 Author: Shuah Khan Date: Mon Oct 30 17:42:43 2017 -0600 selftests: lib.mk: print individual test results to console by default Change run_tests to print individual test results to console by default. Introduce "summary" option to print individual test results to a file /tmp/test_name and just print the summary to the console. This change is necessary to support use-cases where test machines get rebooted once tests are run and the console log should contain the full results. In the following example, individual test results with "summary=1" option are written to /tmp/kcmp_test make --silent TARGETS=kcmp kselftest TAP version 13 selftests: kcmp_test ======================================== pid1: 30126 pid2: 30127 FD: 2 FILES: 2 VM: 1 FS: 2 SIGHAND: 2 IO: 0 SYSVSEM: 0 INV: -1 PASS: 0 returned as expected PASS: 0 returned as expected FAIL: 0 expected but -1 returned (Invalid argument) Pass 2 Fail 1 Xfail 0 Xpass 0 Skip 0 Error 0 1..3 Bail out! Pass 2 Fail 1 Xfail 0 Xpass 0 Skip 0 Error 0 1..3 Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 1..0 ok 1..1 selftests: kcmp_test [PASS] make --silent TARGETS=kcmp summary=1 kselftest TAP version 13 selftests: kcmp_test ======================================== ok 1..1 selftests: kcmp_test [PASS] Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 287683d027a3ff83feb6c7044430c79881664ecf Author: Leon Romanovsky Date: Tue Oct 31 20:09:54 2017 +0200 RDMA/nldev: Enforce device index check for port callback IB device index is nldev's handler and it should be checked always. Fixes: c3f66f7b0052 ("RDMA/netlink: Implement nldev port doit callback") Signed-off-by: Leon Romanovsky Acked-by: Doug Ledford [ Applying directly, since Doug fried his SSD's and is rebuilding - Linus ] Signed-off-by: Linus Torvalds drivers/infiniband/core/nldev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d5919dcc349d2a16d805ef8096d36e4f519e42ae Author: Rafael J. Wysocki Date: Tue Oct 31 18:26:15 2017 +0100 Revert "PM / QoS: Fix device resume latency PM QoS" This reverts commit 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) as it introduced regressions on multiple systems and the fix-up in commit 2a9a86d5c813 (PM / QoS: Fix default runtime_pm device resume latency) does not address all of them. The original problem that commit 0cc2b4e5a020 was attempting to fix will be addressed later. Fixes: 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) Reported-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-devices-power | 4 +- drivers/base/cpu.c | 3 +- drivers/base/power/domain_governor.c | 53 ++++++++++++--------------- drivers/base/power/qos.c | 2 +- drivers/base/power/runtime.c | 2 +- drivers/base/power/sysfs.c | 25 ++----------- drivers/cpuidle/governors/menu.c | 4 +- include/linux/pm_qos.h | 5 +-- 8 files changed, 35 insertions(+), 63 deletions(-) commit 5ba257249e9c8cb2c670e22b0f02d1806f349102 Author: Rafael J. Wysocki Date: Tue Oct 31 18:24:38 2017 +0100 Revert "PM / QoS: Fix default runtime_pm device resume latency" This reverts commit 2a9a86d5c813 (PM / QoS: Fix default runtime_pm device resume latency) as the commit it depends on is going to be reverted. Signed-off-by: Rafael J. Wysocki include/linux/pm_qos.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c29f56b9f425c63daa3f3163ee16493b1c67618b Merge: a6127b4 e48e9c42 Author: Kalle Valo Date: Tue Oct 31 16:26:48 2017 +0200 Merge ath-current from ath.git ath.git fixes for 4.14. Major changes: ath10k * fix security vulnerability with missing PN check on certain hardware * revert ath10k napi fix as it caused regressions on QCA6174 wcn36xx * remove unnecessary rcu_read_unlock() from error path commit e2532b4af6366931e6f66b60338cf6b08a4b32ae Author: Douglas Miller Date: Fri Oct 20 08:17:22 2017 -0500 scsi: qla2xxx: Fix oops in qla2x00_probe_one error path On error, kthread_create() returns an errno-encoded pointer, not NULL. The routine qla2x00_probe_one() detects the error case and jumps to probe_failed, but has already assigned the return value from kthread_create() to ha->dpc_thread. Then probe_failed checks to see if ha->dpc_thread is not NULL before doing cleanup on it. Since in the error case this is also not NULL, it ends up trying to access an invalid task pointer. Solution is to assign NULL to ha->dpc_thread in the error path to avoid kthread cleanup in that case. Signed-off-by: Douglas Miller Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 1 + 1 file changed, 1 insertion(+) commit 73b9fc49b4c0116a04eda3979f64ed9b540b153c Author: Steffen Klassert Date: Mon Oct 30 10:04:04 2017 +0100 xfrm: Fix GSO for IPsec with GRE tunnel. We reset the encapsulation field of the skb too early in xfrm_output. As a result, the GRE GSO handler does not segment the packets. This leads to a performance drop down. We fix this by resetting the encapsulation field right before we do the transformation, when the inner headers become invalid. Fixes: f1bd7d659ef0 ("xfrm: Add encapsulation header offsets while SKB is not encrypted") Reported-by: Vicente De Luca Signed-off-by: Steffen Klassert net/xfrm/xfrm_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1f20f9ff57ca23b9f5502fca85ce3977e8496cb1 Author: Takashi Iwai Date: Sun Oct 29 11:10:43 2017 +0100 ALSA: seq: Fix nested rwsem annotation for lockdep splat syzkaller reported the lockdep splat due to the possible deadlock of grp->list_mutex of each sequencer client object. Actually this is rather a false-positive report due to the missing nested lock annotations. The sequencer client may deliver the event directly to another client which takes another own lock. For addressing this issue, this patch replaces the simple down_read() with down_read_nested(). As a lock subclass, the already existing "hop" can be re-used, which indicates the depth of the call. Reference: http://lkml.kernel.org/r/089e082686ac9b482e055c832617@google.com Reported-by: syzbot Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79fb0518fec8c8b4ea7f1729f54f293724b3dbb0 Author: Takashi Iwai Date: Sun Oct 29 11:02:04 2017 +0100 ALSA: timer: Add missing mutex lock for compat ioctls The races among ioctl and other operations were protected by the commit af368027a49a ("ALSA: timer: Fix race among timer ioctls") and later fixes, but one code path was forgotten in the scenario: the 32bit compat ioctl. As syzkaller recently spotted, a very similar use-after-free may happen with the combination of compat ioctls. The fix is simply to apply the same ioctl_lock to the compat_ioctl callback, too. Fixes: af368027a49a ("ALSA: timer: Fix race among timer ioctls") Reference: http://lkml.kernel.org/r/089e082686ac9b482e055c832617@google.com Reported-by: syzbot Cc: Signed-off-by: Takashi Iwai sound/core/timer_compat.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 518828fcdfc8c1246fc3ea022e74934d4f6bd76f Author: Brenda J. Butler Date: Mon Oct 30 17:59:22 2017 -0400 tc-testing: fix arg to ip command: -s -> -n Fixes: 31c2611b66e0 ("selftests: Introduce a new test case to tc testsuite") Fixes: 76b903ee198d ("selftests: Introduce tc testsuite") Signed-off-by: Brenda J. Butler Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 822e86d997e4d8f942818ea6ac1711f59a66ebef Author: Cong Wang Date: Mon Oct 30 11:10:09 2017 -0700 net_sched: remove tcf_block_put_deferred() In commit 7aa0045dadb6 ("net_sched: introduce a workqueue for RCU callbacks of tc filter") I defer tcf_chain_flush() to a workqueue, this causes a use-after-free because qdisc is already destroyed after we queue this work. The tcf_block_put_deferred() is no longer necessary after we get RTNL for each tc filter destroy work, no others could jump in at this point. Same for tcf_chain_hold(), we are fully serialized now. This also reduces one indirection therefore makes the code more readable. Note this brings back a rcu_barrier(), however comparing to the code prior to commit 7aa0045dadb6 we still reduced one rcu_barrier(). For net-next, we can consider to refcnt tcf block to avoid it. Fixes: 7aa0045dadb6 ("net_sched: introduce a workqueue for RCU callbacks of tc filter") Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Cc: Eric Dumazet Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) commit f9e56baf03f9d36043a78f16e3e8b2cfd211e09e Author: Guillaume Nault Date: Mon Oct 30 17:58:58 2017 +0100 l2tp: hold tunnel in pppol2tp_connect() Use l2tp_tunnel_get() in pppol2tp_connect() to ensure the tunnel isn't going to disappear while processing the rest of the function. 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5f479447d983111c039f1d6d958553c1ad1b2ff1 Merge: b39ab98 2a9a86d Author: Linus Torvalds Date: Mon Oct 30 16:38:03 2017 -0700 Merge tag 'pm-urgent-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes new breakage introduced by the most recent PM QoS fix in which, embarrassingly enough, I forgot to update dev_pm_qos_raw_read_value() to return the right default for devices with no PM QoS constraints at all which prevents runtime PM from suspending those devices (fix from Tero Kristo)" * tag 'pm-urgent-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / QoS: Fix default runtime_pm device resume latency commit dc35b1129cc3204de597e10fb34dc78e9b898197 Author: Chris Wilson Date: Thu Oct 26 14:00:32 2017 +0100 drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr) Kasan spotted [IGT] gem_tiled_pread_pwrite: exiting, ret=0 ================================================================== BUG: KASAN: use-after-free in __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] Read of size 8 at addr ffff8801359da310 by task kworker/3:2/182 CPU: 3 PID: 182 Comm: kworker/3:2 Tainted: G U 4.14.0-rc6-CI-Custom_3340+ #1 Hardware name: Intel Corp. Geminilake/GLK RVP1 DDR4 (05), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017 Workqueue: events __i915_gem_free_work [i915] Call Trace: dump_stack+0x68/0xa0 print_address_description+0x78/0x290 ? __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] kasan_report+0x23d/0x350 __asan_report_load8_noabort+0x19/0x20 __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] ? i915_gem_object_truncate+0x100/0x100 [i915] ? lock_acquire+0x380/0x380 __i915_gem_object_put_pages+0x30d/0x530 [i915] __i915_gem_free_objects+0x551/0xbd0 [i915] ? lock_acquire+0x13e/0x380 __i915_gem_free_work+0x4e/0x70 [i915] process_one_work+0x6f6/0x1590 ? pwq_dec_nr_in_flight+0x2b0/0x2b0 worker_thread+0xe6/0xe90 ? pci_mmcfg_check_reserved+0x110/0x110 kthread+0x309/0x410 ? process_one_work+0x1590/0x1590 ? kthread_create_on_node+0xb0/0xb0 ret_from_fork+0x27/0x40 Allocated by task 1801: save_stack_trace+0x1b/0x20 kasan_kmalloc+0xee/0x190 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0xdc/0x2e0 radix_tree_node_alloc.constprop.12+0x48/0x330 __radix_tree_create+0x274/0x480 __radix_tree_insert+0xa2/0x610 i915_gem_object_get_sg+0x224/0x670 [i915] i915_gem_object_get_page+0xb5/0x1c0 [i915] i915_gem_pread_ioctl+0x822/0xf60 [i915] drm_ioctl_kernel+0x13f/0x1c0 drm_ioctl+0x6cf/0x980 do_vfs_ioctl+0x184/0xf30 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1c/0xb1 Freed by task 37: save_stack_trace+0x1b/0x20 kasan_slab_free+0xaf/0x190 kmem_cache_free+0xbf/0x340 radix_tree_node_rcu_free+0x79/0x90 rcu_process_callbacks+0x46d/0xf40 __do_softirq+0x21c/0x8d3 The buggy address belongs to the object at ffff8801359da0f0 which belongs to the cache radix_tree_node of size 576 The buggy address is located 544 bytes inside of 576-byte region [ffff8801359da0f0, ffff8801359da330) The buggy address belongs to the page: page:ffffea0004d67600 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000008100(slab|head) raw: 8000000000008100 0000000000000000 0000000000000000 0000000100110011 raw: ffffea0004b52920 ffffea0004b38020 ffff88015b416a80 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801359da200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801359da280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801359da300: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff8801359da380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801359da400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint which looks like the slab containing the radixtree iter was freed as we traversed the tree, taking the rcu read lock across the loop should prevent that (deferring all the frees until the end). Reported-by: Tomi Sarvela 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/20171026130032.10677-2-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld (cherry picked from commit 547da76b5777859f98bb78e6b57f19463f803c04) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_context.c | 2 ++ 1 file changed, 2 insertions(+) commit 23e873389d841e4f8115e8dab76126daa405414b Author: Chris Wilson Date: Thu Oct 26 14:00:31 2017 +0100 drm/i915: Hold rcu_read_lock when iterating over the radixtree (objects) Kasan spotted [IGT] gem_tiled_pread_pwrite: exiting, ret=0 ================================================================== BUG: KASAN: use-after-free in __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] Read of size 8 at addr ffff8801359da310 by task kworker/3:2/182 CPU: 3 PID: 182 Comm: kworker/3:2 Tainted: G U 4.14.0-rc6-CI-Custom_3340+ #1 Hardware name: Intel Corp. Geminilake/GLK RVP1 DDR4 (05), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017 Workqueue: events __i915_gem_free_work [i915] Call Trace: dump_stack+0x68/0xa0 print_address_description+0x78/0x290 ? __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] kasan_report+0x23d/0x350 __asan_report_load8_noabort+0x19/0x20 __i915_gem_object_reset_page_iter+0x15c/0x170 [i915] ? i915_gem_object_truncate+0x100/0x100 [i915] ? lock_acquire+0x380/0x380 __i915_gem_object_put_pages+0x30d/0x530 [i915] __i915_gem_free_objects+0x551/0xbd0 [i915] ? lock_acquire+0x13e/0x380 __i915_gem_free_work+0x4e/0x70 [i915] process_one_work+0x6f6/0x1590 ? pwq_dec_nr_in_flight+0x2b0/0x2b0 worker_thread+0xe6/0xe90 ? pci_mmcfg_check_reserved+0x110/0x110 kthread+0x309/0x410 ? process_one_work+0x1590/0x1590 ? kthread_create_on_node+0xb0/0xb0 ret_from_fork+0x27/0x40 Allocated by task 1801: save_stack_trace+0x1b/0x20 kasan_kmalloc+0xee/0x190 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0xdc/0x2e0 radix_tree_node_alloc.constprop.12+0x48/0x330 __radix_tree_create+0x274/0x480 __radix_tree_insert+0xa2/0x610 i915_gem_object_get_sg+0x224/0x670 [i915] i915_gem_object_get_page+0xb5/0x1c0 [i915] i915_gem_pread_ioctl+0x822/0xf60 [i915] drm_ioctl_kernel+0x13f/0x1c0 drm_ioctl+0x6cf/0x980 do_vfs_ioctl+0x184/0xf30 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1c/0xb1 Freed by task 37: save_stack_trace+0x1b/0x20 kasan_slab_free+0xaf/0x190 kmem_cache_free+0xbf/0x340 radix_tree_node_rcu_free+0x79/0x90 rcu_process_callbacks+0x46d/0xf40 __do_softirq+0x21c/0x8d3 The buggy address belongs to the object at ffff8801359da0f0 which belongs to the cache radix_tree_node of size 576 The buggy address is located 544 bytes inside of 576-byte region [ffff8801359da0f0, ffff8801359da330) The buggy address belongs to the page: page:ffffea0004d67600 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000008100(slab|head) raw: 8000000000008100 0000000000000000 0000000000000000 0000000100110011 raw: ffffea0004b52920 ffffea0004b38020 ffff88015b416a80 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801359da200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801359da280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801359da300: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff8801359da380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801359da400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint which looks like the slab containing the radixtree iter was freed as we traversed the tree, taking the rcu read lock across the loop should prevent that (deferring all the frees until the end). Reported-by: Tomi Sarvela Fixes: 96d776345277 ("drm/i915: Use a radixtree for random access to the object's backing storage") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171026130032.10677-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld (cherry picked from commit bea6e987c1ff358224e7bef7084be7650f5d1c38) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) commit 7c838e2a9be5ab79b11c7f1520813bfdf0f45462 Author: Jani Nikula Date: Thu Oct 26 17:29:31 2017 +0300 drm/i915/edp: read edp display control registers unconditionally Per my reading of the eDP spec, DP_DPCD_DISPLAY_CONTROL_CAPABLE bit in DP_EDP_CONFIGURATION_CAP should be set if the eDP display control registers starting at offset DP_EDP_DPCD_REV are "enabled". Currently we check the bit before reading the registers, and DP_EDP_DPCD_REV is the only way to detect eDP revision. Turns out there are (likely buggy) displays that require eDP 1.4+ features, such as supported link rates and link rate select, but do not have the bit set. Read the display control registers unconditionally. They are supposed to read zero anyway if they are not supported, so there should be no harm in this. This fixes the referenced bug by enabling the eDP version check, and thus reading of the supported link rates. The panel in question has 0 in DP_MAX_LINK_RATE which is only supported in eDP 1.4+. Without the supported link rates method we default to RBR which is insufficient for the panel native mode. As a curiosity, the panel also has a bogus value of 0x12 in DP_EDP_DPCD_REV, but that passes our check for >= DP_EDP_14 (which is 0x03). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103400 Reported-and-tested-by: Nicolas P. Cc: Ville Syrjälä Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171026142932.17737-1-jani.nikula@intel.com (cherry picked from commit 0501a3b0eb01ac2209ef6fce76153e5d6b07034e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 8777b927b92cf5b6c29f9f9d3c737addea9ac8a7 Author: Maarten Lankhorst Date: Thu Oct 19 17:13:40 2017 +0200 drm/i915: Do not rely on wm preservation for ILK watermarks The original intent was to preserve watermarks as much as possible in intel_pipe_wm.raw_wm, and put the validated ones in intel_pipe_wm.wm. It seems this approach is insufficient and we don't always preserve the raw watermarks, so just use the atomic iterator we're already using to get a const pointer to all bound planes on the crtc. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102373 Signed-off-by: Maarten Lankhorst Cc: stable@vger.kernel.org #v4.8+ Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20171019151341.4579-1-maarten.lankhorst@linux.intel.com (cherry picked from commit 28283f4f359cd7cfa9e65457bb98c507a2cd0cd0) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 51 +++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 31 deletions(-) commit 713946d16f45ad0509434970ae6ff71529faab4b Author: Manasi Navare Date: Thu Oct 26 14:52:00 2017 -0700 drm/i915: Cancel the modeset retry work during modeset cleanup During modeset cleanup on driver unload we may have a pending hotplug work. This needs to be canceled early during the teardown so that it does not fire after we have freed the connector. We do this after drm_kms_helper_poll_fini(dev) since this might trigger modeset retry work due to link retrain and before intel_fbdev_fini() since this work requires the lock from fbdev. If this is not done we may see something like: DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)) ------------[ cut here ]------------ WARNING: CPU: 4 PID: 5010 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x4e/0x60 Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178 +a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid +[last unloaded: snd_hda_intel] CPU: 4 PID: 5010 Comm: drv_module_relo Tainted: G U 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 task: ffff8803c827aa40 task.stack: ffffc90000520000 RIP: 0010:mutex_destroy+0x4e/0x60 RSP: 0018:ffffc90000523d58 EFLAGS: 00010292 RAX: 000000000000002a RBX: ffff88044fbef648 RCX: 0000000000000000 RDX: 0000000080000001 RSI: 0000000000000001 RDI: ffffffff810f0cf0 RBP: ffffc90000523d60 R08: 0000000000000001 R09: 0000000000000001 R10: 000000000f21cb81 R11: 0000000000000000 R12: ffff88044f71efc8 R13: ffffffffa02b3d20 R14: ffffffffa02b3d90 R15: ffff880459b29308 FS: 00007f5df4d6e8c0(0000) GS:ffff88045d300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51f00a18 CR3: 0000000451782006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: drm_fb_helper_fini+0xd9/0x130 intel_fbdev_destroy+0x12/0x60 [i915] intel_fbdev_fini+0x28/0x30 [i915] intel_modeset_cleanup+0x45/0xa0 [i915] i915_driver_unload+0x92/0x180 [i915] i915_pci_remove+0x19/0x30 [i915] i915_driver_unload+0x92/0x180 [i915] i915_pci_remove+0x19/0x30 [i915] pci_device_remove+0x39/0xb0 device_release_driver_internal+0x15d/0x220 driver_detach+0x40/0x80 bus_remove_driver+0x58/0xd0 driver_unregister+0x2c/0x40 pci_unregister_driver+0x36/0xb0 i915_exit+0x1a/0x8b [i915] SyS_delete_module+0x18c/0x1e0 entry_SYSCALL_64_fastpath+0x1c/0xb1 RIP: 0033:0x7f5df3286287 RSP: 002b:00007fff8e107cc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: ffffffff81493a03 RCX: 00007f5df3286287 RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000564c7be02e48 RBP: ffffc90000523f88 R08: 0000000000000000 R09: 0000000000000080 R10: 00007f5df4d6e8c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff8e107eb0 R14: 0000000000000000 R15: 0000000000000000 Or a GPF like: general protection fault: 0000 [#1] PREEMPT SMP Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178 +a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid +[last unloaded: snd_hda_intel] CPU: 0 PID: 82 Comm: kworker/0:1 Tainted: G U W 4.14.0-rc3-CI-CI_DRM_3186+ #1 Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017 Workqueue: events intel_dp_modeset_retry_work_fn [i915] task: ffff88045a5caa40 task.stack: ffffc90000378000 RIP: 0010:drm_setup_crtcs+0x143/0xbf0 RSP: 0018:ffffc9000037bd20 EFLAGS: 00010202 RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000780 RDI: 00000000ffffffff RBP: ffffc9000037bdb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000780 R11: 0000000000000000 R12: 0000000000000002 R13: ffff88044fbef4e8 R14: 0000000000000780 R15: 0000000000000438 FS: 0000000000000000(0000) GS:ffff88045d200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ec51ee5168 CR3: 000000044c89d003 CR4: 00000000003606f0 Call Trace: drm_fb_helper_hotplug_event.part.18+0x7e/0xc0 drm_fb_helper_hotplug_event+0x1a/0x20 intel_fbdev_output_poll_changed+0x1a/0x20 [i915] drm_kms_helper_hotplug_event+0x27/0x30 intel_dp_modeset_retry_work_fn+0x77/0x80 [i915] process_one_work+0x233/0x660 worker_thread+0x206/0x3b0 kthread+0x152/0x190 ? process_one_work+0x660/0x660 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x27/0x40 Code: 06 00 00 45 8b 45 20 31 db 45 31 e4 45 85 c0 0f 8e 91 06 00 00 44 8b 75 94 44 8b 7d 90 49 8b 45 28 49 63 d4 44 89 f6 41 83 c4 01 <48> 8b 04 d0 44 +89 fa 48 8b 38 48 8b 87 a8 01 00 00 ff 50 20 01 RIP: drm_setup_crtcs+0x143/0xbf0 RSP: ffffc9000037bd20 ---[ end trace 08901ff1a77d30c7 ]--- v2: * Rename it to intel_hpd_poll_fini() and call drm_kms_helper_fini() inside it as the first step before cancel work (Chris Wilson) * Add GPF trace in commit message and make the function static (Maarten Lankhorst) Suggested-by: Maarten Lankhorst Suggested-by: Chris Wilson Fixes: 9301397a63b3 ("drm/i915: Implement Link Rate fallback on Link training failure") Cc: Chris Wilson Cc: Tony Cheng Cc: Harry Wentland Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Cc: Manasi Navare Cc: Maarten Lankhorst Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/1509054720-25325-1-git-send-email-manasi.d.navare@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 886c6b8692ba5f71b578097524b3b082e2e02119) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit b39ab98e2f4728d98973fd1bc531e3c4cbccb21c Author: Linus Torvalds Date: Mon Oct 30 10:09:56 2017 -0700 Mark 'ioremap_page_range()' as possibly sleeping It turns out that some drivers seem to think it's ok to remap page ranges from within interrupts and even NMI's. That is definitely not the case, since the page table build-up is simply not interrupt-safe. This showed up in the zero-day robot that reported it for the ACPI APEI GHES ("Generic Hardware Error Source") driver. Normally it had been hidden by the fact that no page table operations had been needed because the vmalloc area had been set up by other things. Apparently due to a recent change to the GHEI driver: commit 77b246b32b2c ("acpi: apei: check for pending errors when probing GHES entries") 0day actually caught a case during bootup whenthe ioremap called down to page allocation. But that recent change only showed the symptom, it wasn't the root cause of the problem. Hopefully it is limited to just that one driver. If you need to access random physical memory, you either need to ioremap in process context, or you need to use the FIXMAP facility to set one particular fixmap entry to the required mapping - that can be done safely. Cc: Borislav Petkov Cc: Len Brown Cc: Tony Luck Cc: Fengguang Wu Cc: Tyler Baicar Cc: Will Deacon Signed-off-by: Linus Torvalds lib/ioremap.c | 1 + 1 file changed, 1 insertion(+) commit daea3daaf9d5606735a722677125fe860f86ff41 Merge: 1960e8e 48e1dc1 Author: Linus Torvalds Date: Mon Oct 30 09:41:54 2017 -0700 Merge tag 'mmc-v4.14-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC host fixes intended for v4.14-rc8: - renesas_sdhi: fix kernel panic - tmio: fix swiotlb buffer is full" * tag 'mmc-v4.14-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: renesas_sdhi: fix kernel panic in _internal_dmac.c mmc: tmio: fix swiotlb buffer is full commit 1960e8eabcba2749db9443adb2a5d93e4dabf590 Merge: 0b07194 4635742 Author: Linus Torvalds Date: Mon Oct 30 09:31:15 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes an objtool regression" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/chacha20 - satisfy stack validation 2.0 commit cef572ad9bd7f85035ba8272e5352040e8be0152 Author: Li Bin Date: Sat Oct 28 11:07:28 2017 +0800 workqueue: Fix NULL pointer dereference When queue_work() is used in irq (not in task context), there is a potential case that trigger NULL pointer dereference. ---------------------------------------------------------------- worker_thread() |-spin_lock_irq() |-process_one_work() |-worker->current_pwq = pwq |-spin_unlock_irq() |-worker->current_func(work) |-spin_lock_irq() |-worker->current_pwq = NULL |-spin_unlock_irq() //interrupt here |-irq_handler |-__queue_work() //assuming that the wq is draining |-is_chained_work(wq) |-current_wq_worker() //Here, 'current' is the interrupted worker! |-current->current_pwq is NULL here! |-schedule() ---------------------------------------------------------------- Avoid it by checking for task context in current_wq_worker(), and if not in task context, we shouldn't use the 'current' to check the condition. Reported-by: Xiaofei Tan Signed-off-by: Li Bin Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo Fixes: 8d03ecfe4718 ("workqueue: reimplement is_chained_work() using current_wq_worker()") Cc: stable@vger.kernel.org # v3.9+ kernel/workqueue_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit da984d754069818090511fc3b36ea2f9a0b538b5 Merge: 36a247b cda80a8 Author: Arnd Bergmann Date: Mon Oct 30 15:55:12 2017 +0100 Merge tag 'mvebu-fixes-4.14-3' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu fixes for 4.14 (part 3)" from Gregory CLEMENT: Fixing an old stability issue on Cortex A9 based mvebu SoC * tag 'mvebu-fixes-4.14-3' of git://git.infradead.org/linux-mvebu: ARM: dts: mvebu: pl310-cache disable double-linefill commit 5e0fab57fb3e0e553758067a15eefdc796ef0a76 Author: Keith Busch Date: Fri Oct 27 13:51:22 2017 -0600 nvme: Fix setting logical block format when revalidating Revalidating the disk needs to set the logical block format and capacity, otherwise it can't figure out if the users modified anything about the namespace. Fixes: cdbff4f26bd9 ("nvme: remove nvme_revalidate_ns") Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit 8892b705f58e105b0b4ce3402afa1d1b803fb207 Author: Douglas Anderson Date: Thu Oct 12 13:11:16 2017 -0700 mmc: dw_mmc: Add locking to the CTO timer This attempts to instill a bit of paranoia to the code dealing with the CTO timer. It's believed that this will make the CTO timer more robust in the case that we're having very long interrupt latencies. Note that I originally thought that perhaps this patch was being overly paranoid and wasn't really needed, but then while I was running mmc_test on an rk3399 board I saw one instance of the message: dwmmc_rockchip fe320000.dwmmc: Unexpected interrupt latency I had debug prints in the CTO timer code and I found that it was running CMD 13 at the time. ...so even though this patch seems like it might be overly paranoid, maybe it really isn't? Presumably the bad interrupt latency experienced was due to the fact that I had serial console enabled as serial console is typically where I place blame when I see absurdly large interrupt latencies. In this particular case there was an (unrelated) printout to the serial console just before I saw the "Unexpected interrupt latency" printout. ...and actually, I managed to even reproduce the problems by running "iw mlan0 scan > /dev/null" while mmc_test was running. That not only does a bunch of PCIe traffic but it also (on my system) outputs some SELinux log spam. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Signed-off-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 91 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 10 deletions(-) commit 4c2357f57dd5a3ecb4ce09f6a6cb394a1a8873b2 Author: Douglas Anderson Date: Thu Oct 12 13:11:15 2017 -0700 mmc: dw_mmc: Fix the CTO timeout calculation In the commit 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") we tried to calculate the expected hardware command timeout value. Unfortunately that calculation isn't quite correct in all cases. It used "bus_hz" but, as far as I can tell, it's supposed to use the card clock. Let's account for the div value, which is documented as 2x the value stored in the register, or 1 if the register is 0. NOTE: It's not expected that this will actually fix anything important since the 10 ms margin added by the function will pretty much dwarf any calculations. The card clock should be 100 kHz at minimum and: 1000 ms/s * (255 * 2) / 100000 Hz. Gives us 5.1 ms. ...so really the point of this patch is just to make the code more "correct" in case anyone ever tries to remove the 10 ms buffer. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Reviewed-by: Shawn Lin Signed-off-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0363b12d3311eaf1355d4b9272a51dd852ea2fc1 Author: Douglas Anderson Date: Thu Oct 12 13:11:14 2017 -0700 mmc: dw_mmc: cancel the CTO timer after a voltage switch When running with the commit 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") I found this message in the log: Unexpected command timeout, state 7 It turns out that we weren't properly cancelling the new CTO timer in the case that a voltage switch was done. Let's promote the cancel into the dw_mci_cmd_interrupt() function to fix this. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Reviewed-by: Shawn Lin Signed-off-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit be96b316deff35e119760982c43af74e606fa143 Author: Tejun Heo Date: Sat Oct 28 09:49:37 2017 -0700 perf/cgroup: Fix perf cgroup hierarchy support The following commit: 864c2357ca89 ("perf/core: Do not set cpuctx->cgrp for unscheduled cgroups") made list_update_cgroup_event() skip setting cpuctx->cgrp if no cgroup event targets %current's cgroup. This breaks perf_event's hierarchical support because events which target one of the ancestors get ignored. Fix it by using cgroup_is_descendant() test instead of equality. Signed-off-by: Tejun Heo Acked-by: Thomas Gleixner Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Linus Torvalds Cc: Peter Zijlstra Cc: kernel-team@fb.com Cc: stable@vger.kernel.org # v4.9+ Fixes: 864c2357ca89 ("perf/core: Do not set cpuctx->cgrp for unscheduled cgroups") Link: http://lkml.kernel.org/r/20171028164237.GA972780@devbig577.frc2.facebook.com Signed-off-by: Ingo Molnar kernel/events/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2a9a86d5c81389cd9afe6a4fea42c585733cd705 Author: Tero Kristo Date: Mon Oct 30 09:10:46 2017 +0200 PM / QoS: Fix default runtime_pm device resume latency The recent change to the PM QoS framework to introduce a proper no constraint value overlooked to handle the devices which don't implement PM QoS OPS. Runtime PM is one of the more severely impacted subsystems, failing every attempt to runtime suspend a device. This leads into some nasty second level issues like probe failures and increased power consumption among other things. Fix this by adding a proper return value for devices that don't implement PM QoS. Fixes: 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) Signed-off-by: Tero Kristo Cc: All applicable Signed-off-by: Rafael J. Wysocki include/linux/pm_qos.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36a247ba728b68383e53b4cf11111801ec3ceecd Merge: 0b07194 deaa551 Author: Arnd Bergmann Date: Mon Oct 30 10:20:45 2017 +0100 Merge tag 'uniphier-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into fixes Pull "UniPhier ARM SoC fixes for v4.14" from Masahiro Yamada: - Add necessary clock to EHCI node * tag 'uniphier-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add STDMAC clock to EHCI nodes ARM: dts: uniphier: add STDMAC clock to EHCI nodes commit e48e9c429a95e6ff103bb830f07e2e6a6954a839 Author: Kalle Valo Date: Sun Oct 29 09:45:07 2017 +0200 Revert "ath10k: fix napi_poll budget overflow" Thorsten reported on that commit c9353bf483d3 made ath10k unstable with QCA6174 on his Dell XPS13 (9360) with an error message: ath10k_pci 0000:3a:00.0: failed to extract amsdu: -11 It only seemed to happen with certain APs, not all, but when it happened the only way to get ath10k working was to switch the wifi off and on with a hotkey. As this commit made things even worse (a warning vs breaking the whole connection) let's revert the commit for now and while the issue is being fixed. Link: http://lists.infradead.org/pipermail/ath10k/2017-October/010227.html Reported-by: Thorsten Leemhuis Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 7eccb738fce57cbe53ed903ccf43f9ab257b15b3 Author: Vasanthakumar Thiagarajan Date: Fri Oct 27 18:35:31 2017 +0300 ath10k: rebuild crypto header in rx data frames Rx data frames notified through HTT_T2H_MSG_TYPE_RX_IND and HTT_T2H_MSG_TYPE_RX_FRAG_IND expect PN/TSC check to be done on host (mac80211) rather than firmware. Rebuild cipher header in every received data frames (that are notified through those HTT interfaces) from the rx_hdr_status tlv available in the rx descriptor of the first msdu. Skip setting RX_FLAG_IV_STRIPPED flag for the packets which requires mac80211 PN/TSC check support and set appropriate RX_FLAG for stripped crypto tail. Hw QCA988X, QCA9887, QCA99X0, QCA9984, QCA9888 and QCA4019 currently need the rebuilding of cipher header to perform PN/TSC check for replay attack. Please note that removing crypto tail for CCMP-256, GCMP and GCMP-256 ciphers in raw mode needs to be fixed. Since Rx with these ciphers in raw mode does not work in the current form even without this patch and removing crypto tail for these chipers needs clean up, raw mode related issues in CCMP-256, GCMP and GCMP-256 can be addressed in follow up patches. Tested-by: Manikanta Pubbisetty Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 105 +++++++++++++++++++++++++----- drivers/net/wireless/ath/ath10k/rx_desc.h | 3 + 2 files changed, 92 insertions(+), 16 deletions(-) commit f74bc7c6679200a4a83156bb89cbf6c229fe8ec0 Author: Ronnie Sahlberg Date: Mon Oct 30 13:28:03 2017 +1100 cifs: check MaxPathNameComponentLength != 0 before using it And fix tcon leak in error path. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French CC: Stable Reviewed-by: David Disseldorp fs/cifs/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0b07194bb55ed836c2cc7c22e866b87a14681984 Author: Linus Torvalds Date: Sun Oct 29 13:58:38 2017 -0700 Linux 4.14-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19e12196da601f7b80b5639adbcecf60fae13389 Merge: 25a5d23 6c325f4 Author: Linus Torvalds Date: Sun Oct 29 08:11:49 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix route leak in xfrm_bundle_create(). 2) In mac80211, validate user rate mask before configuring it. From Johannes Berg. 3) Properly enforce memory limits in fair queueing code, from Toke Hoiland-Jorgensen. 4) Fix lockdep splat in inet_csk_route_req(), from Eric Dumazet. 5) Fix TSO header allocation and management in mvpp2 driver, from Yan Markman. 6) Don't take socket lock in BH handler in strparser code, from Tom Herbert. 7) Don't show sockets from other namespaces in AF_UNIX code, from Andrei Vagin. 8) Fix double free in error path of tap_open(), from Girish Moodalbail. 9) Fix TX map failure path in igb and ixgbe, from Jean-Philippe Brucker and Alexander Duyck. 10) Fix DCB mode programming in stmmac driver, from Jose Abreu. 11) Fix err_count handling in various tunnels (ipip, ip6_gre). From Xin Long. 12) Properly align SKB head before building SKB in tuntap, from Jason Wang. 13) Avoid matching qdiscs with a zero handle during lookups, from Cong Wang. 14) Fix various endianness bugs in sctp, from Xin Long. 15) Fix tc filter callback races and add selftests which trigger the problem, from Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits) selftests: Introduce a new test case to tc testsuite selftests: Introduce a new script to generate tc batch file net_sched: fix call_rcu() race on act_sample module removal net_sched: add rtnl assertion to tcf_exts_destroy() net_sched: use tcf_queue_work() in tcindex filter net_sched: use tcf_queue_work() in rsvp filter net_sched: use tcf_queue_work() in route filter net_sched: use tcf_queue_work() in u32 filter net_sched: use tcf_queue_work() in matchall filter net_sched: use tcf_queue_work() in fw filter net_sched: use tcf_queue_work() in flower filter net_sched: use tcf_queue_work() in flow filter net_sched: use tcf_queue_work() in cgroup filter net_sched: use tcf_queue_work() in bpf filter net_sched: use tcf_queue_work() in basic filter net_sched: introduce a workqueue for RCU callbacks of tc filter sctp: fix some type cast warnings introduced since very beginning sctp: fix a type cast warnings that causes a_rwnd gets the wrong value sctp: fix some type cast warnings introduced by transport rhashtable sctp: fix some type cast warnings introduced by stream reconf ... commit 6c325f4eca9ee9eb32cf58768e6e4ebcabaa8d6e Merge: 8c83c88 31c2611 Author: David S. Miller Date: Sun Oct 29 22:49:32 2017 +0900 Merge branch 'net_sched-fix-races-with-RCU-callbacks' Cong Wang says: ==================== net_sched: fix races with RCU callbacks Recently, the RCU callbacks used in TC filters and TC actions keep drawing my attention, they introduce at least 4 race condition bugs: 1. A simple one fixed by Daniel: commit c78e1746d3ad7d548bdf3fe491898cc453911a49 Author: Daniel Borkmann Date: Wed May 20 17:13:33 2015 +0200 net: sched: fix call_rcu() race on classifier module unloads 2. A very nasty one fixed by me: commit 1697c4bb5245649a23f06a144cc38c06715e1b65 Author: Cong Wang Date: Mon Sep 11 16:33:32 2017 -0700 net_sched: carefully handle tcf_block_put() 3. Two more bugs found by Chris: https://patchwork.ozlabs.org/patch/826696/ https://patchwork.ozlabs.org/patch/826695/ Usually RCU callbacks are simple, however for TC filters and actions, they are complex because at least TC actions could be destroyed together with the TC filter in one callback. And RCU callbacks are invoked in BH context, without locking they are parallel too. All of these contribute to the cause of these nasty bugs. Alternatively, we could also: a) Introduce a spinlock to serialize these RCU callbacks. But as I said in commit 1697c4bb5245 ("net_sched: carefully handle tcf_block_put()"), it is very hard to do because of tcf_chain_dump(). Potentially we need to do a lot of work to make it possible (if not impossible). b) Just get rid of these RCU callbacks, because they are not necessary at all, callers of these call_rcu() are all on slow paths and holding RTNL lock, so blocking is allowed in their contexts. However, David and Eric dislike adding synchronize_rcu() here. As suggested by Paul, we could defer the work to a workqueue and gain the permission of holding RTNL again without any performance impact, however, in tcf_block_put() we could have a deadlock when flushing workqueue while hodling RTNL lock, the trick here is to defer the work itself in workqueue and make it queued after all other works so that we keep the same ordering to avoid any use-after-free. Please see the first patch for details. Patch 1 introduces the infrastructure, patch 2~12 move each tc filter to the new tc filter workqueue, patch 13 adds an assertion to catch potential bugs like this, patch 14 closes another rcu callback race, patch 15 and patch 16 add new test cases. ==================== Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 31c2611b66e01378b54f7ef641cb0d23fcd8502f Author: Chris Mi Date: Thu Oct 26 18:24:43 2017 -0700 selftests: Introduce a new test case to tc testsuite In this patchset, we fixed a tc bug. This patch adds the test case that reproduces the bug. To run this test case, user should specify an existing NIC device: # sudo ./tdc.py -d enp4s0f0 This test case belongs to category "flower". If user doesn't specify a NIC device, the test cases belong to "flower" will not be run. In this test case, we create 1M filters and all filters share the same action. When destroying all filters, kernel should not panic. It takes about 18s to run it. Acked-by: Jamal Hadi Salim Acked-by: Lucas Bates Signed-off-by: Chris Mi Signed-off-by: Cong Wang Signed-off-by: David S. Miller .../tc-testing/tc-tests/filters/tests.json | 23 +++++++++++++++++++++- tools/testing/selftests/tc-testing/tdc.py | 20 +++++++++++++++---- tools/testing/selftests/tc-testing/tdc_config.py | 2 ++ 3 files changed, 40 insertions(+), 5 deletions(-) commit 7f071998474a9e5f7b98103d3058a1b8ca5887e6 Author: Chris Mi Date: Thu Oct 26 18:24:42 2017 -0700 selftests: Introduce a new script to generate tc batch file # ./tdc_batch.py -h usage: tdc_batch.py [-h] [-n NUMBER] [-o] [-s] [-p] device file TC batch file generator positional arguments: device device name file batch file name optional arguments: -h, --help show this help message and exit -n NUMBER, --number NUMBER how many lines in batch file -o, --skip_sw skip_sw (offload), by default skip_hw -s, --share_action all filters share the same action -p, --prio all filters have different prio Acked-by: Jamal Hadi Salim Acked-by: Lucas Bates Signed-off-by: Chris Mi Signed-off-by: Cong Wang Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc_batch.py | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 46e235c15ca44f34cb79f4dbec909b8c51999dc1 Author: Cong Wang Date: Thu Oct 26 18:24:41 2017 -0700 net_sched: fix call_rcu() race on act_sample module removal Similar to commit c78e1746d3ad ("net: sched: fix call_rcu() race on classifier module unloads"), we need to wait for flying RCU callback tcf_sample_cleanup_rcu(). Cc: Yotam Gigi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_sample.c | 1 + 1 file changed, 1 insertion(+) commit 2d132eba1d972ea6c0e47286e4c821b4a3c5b84d Author: Cong Wang Date: Thu Oct 26 18:24:40 2017 -0700 net_sched: add rtnl assertion to tcf_exts_destroy() After previous patches, it is now safe to claim that tcf_exts_destroy() is always called with RTNL lock. Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+) commit 27ce4f05e2abbe2d3ec7434e456619a5178cd3bd Author: Cong Wang Date: Thu Oct 26 18:24:39 2017 -0700 net_sched: use tcf_queue_work() in tcindex filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_tcindex.c | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) commit d4f84a41dc615c166555cd332b0235bf6b9bcb4a Author: Cong Wang Date: Thu Oct 26 18:24:38 2017 -0700 net_sched: use tcf_queue_work() in rsvp filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_rsvp.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit c2f3f31d402be4849b06282c3a5278f2865c9fcc Author: Cong Wang Date: Thu Oct 26 18:24:37 2017 -0700 net_sched: use tcf_queue_work() in route filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_route.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit c0d378ef1266546a39f2df00a56ff1f74166a2b7 Author: Cong Wang Date: Thu Oct 26 18:24:36 2017 -0700 net_sched: use tcf_queue_work() in u32 filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_u32.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit df2735ee8e6ca202a8630f237b59401a25193be1 Author: Cong Wang Date: Thu Oct 26 18:24:35 2017 -0700 net_sched: use tcf_queue_work() in matchall filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_matchall.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e071dff2a6beeccb6f9744f9a0251ab773ca2ab8 Author: Cong Wang Date: Thu Oct 26 18:24:34 2017 -0700 net_sched: use tcf_queue_work() in fw filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_fw.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 0552c8afa077889b4704ef5ee88b03063ad45023 Author: Cong Wang Date: Thu Oct 26 18:24:33 2017 -0700 net_sched: use tcf_queue_work() in flower filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_flower.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 94cdb47566b799649e996e1fb9de2a503dada763 Author: Cong Wang Date: Thu Oct 26 18:24:32 2017 -0700 net_sched: use tcf_queue_work() in flow filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_flow.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit b1b5b04fdb6da262aef37ef83b9f2e41326720ef Author: Cong Wang Date: Thu Oct 26 18:24:31 2017 -0700 net_sched: use tcf_queue_work() in cgroup filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_cgroup.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit e910af676b565ecc16bcd6c896ecb68157396ecc Author: Cong Wang Date: Thu Oct 26 18:24:30 2017 -0700 net_sched: use tcf_queue_work() in bpf filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_bpf.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c96a48385d53089ee9977dd0bce82a9493984484 Author: Cong Wang Date: Thu Oct 26 18:24:29 2017 -0700 net_sched: use tcf_queue_work() in basic filter Defer the tcf_exts_destroy() in RCU callback to tc filter workqueue and get RTNL lock. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_basic.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 7aa0045dadb6ef37485ea9f2a7d28278ca588b51 Author: Cong Wang Date: Thu Oct 26 18:24:28 2017 -0700 net_sched: introduce a workqueue for RCU callbacks of tc filter This patch introduces a dedicated workqueue for tc filters so that each tc filter's RCU callback could defer their action destroy work to this workqueue. The helper tcf_queue_work() is introduced for them to use. Because we hold RTNL lock when calling tcf_block_put(), we can not simply flush works inside it, therefore we have to defer it again to this workqueue and make sure all flying RCU callbacks have already queued their work before this one, in other words, to ensure this is the last one to execute to prevent any use-after-free. On the other hand, this makes tcf_block_put() ugly and harder to understand. Since David and Eric strongly dislike adding synchronize_rcu(), this is probably the only solution that could make everyone happy. Please also see the code comments below. Reported-by: Chris Mi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/pkt_cls.h | 3 +++ include/net/sch_generic.h | 2 ++ net/sched/cls_api.c | 68 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 56 insertions(+), 17 deletions(-) commit 8c83c88584abb3a04a4026be91060bc309f4c034 Merge: 50317fc 978aa04 Author: David S. Miller Date: Sun Oct 29 18:03:25 2017 +0900 Merge branch 'sctp-endianness-fixes' Xin Long says: ==================== sctp: a bunch of fixes for some sparse warnings As Eric noticed, when running 'make C=2 M=net/sctp/', a plenty of warnings or errors checked by sparse appear. They are all problems about Endian and type cast. Most of them are just warnings by which no issues could be caused while some might be bugs. This patchset fixes them with four patches basically according to how they are introduced. ==================== Signed-off-by: David S. Miller commit 978aa0474115f3f5848949f2efce4def0766a5cb Author: Xin Long Date: Sat Oct 28 19:43:57 2017 +0800 sctp: fix some type cast warnings introduced since very beginning These warnings were found by running 'make C=2 M=net/sctp/'. They are there since very beginning. Note after this patch, there still one warning left in sctp_outq_flush(): sctp_chunk_fail(chunk, SCTP_ERROR_INV_STRM) Since it has been moved to sctp_stream_outq_migrate on net-next, to avoid the extra job when merging net-next to net, I will post the fix for it after the merging is done. Reported-by: Eric Dumazet Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 2 +- include/uapi/linux/sctp.h | 2 +- net/sctp/ipv6.c | 2 +- net/sctp/sm_make_chunk.c | 4 ++-- net/sctp/sm_sideeffect.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit f6fc6bc0b8e0bb13a210bd7386ffdcb1a5f30ef1 Author: Xin Long Date: Sat Oct 28 19:43:56 2017 +0800 sctp: fix a type cast warnings that causes a_rwnd gets the wrong value These warnings were found by running 'make C=2 M=net/sctp/'. Commit d4d6fb5787a6 ("sctp: Try not to change a_rwnd when faking a SACK from SHUTDOWN.") expected to use the peers old rwnd and add our flight size to the a_rwnd. But with the wrong Endian, it may not work as well as expected. So fix it by converting to the right value. Fixes: d4d6fb5787a6 ("sctp: Try not to change a_rwnd when faking a SACK from SHUTDOWN.") Reported-by: Eric Dumazet Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d32503efde82db4e0a370981e90628ebd6718b5 Author: Xin Long Date: Sat Oct 28 19:43:55 2017 +0800 sctp: fix some type cast warnings introduced by transport rhashtable These warnings were found by running 'make C=2 M=net/sctp/'. They are introduced by not aware of Endian for the port when coding transport rhashtable patches. Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport rhashtable") Reported-by: Eric Dumazet Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/input.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1da4fc97cbf89514e417a3df46eaec864a9b8a48 Author: Xin Long Date: Sat Oct 28 19:43:54 2017 +0800 sctp: fix some type cast warnings introduced by stream reconf These warnings were found by running 'make C=2 M=net/sctp/'. They are introduced by not aware of Endian when coding stream reconf patches. Since commit c0d8bab6ae51 ("sctp: add get and set sockopt for reconf_enable") enabled stream reconf feature for users, the Fixes tag below would use it. Fixes: c0d8bab6ae51 ("sctp: add get and set sockopt for reconf_enable") Reported-by: Eric Dumazet Signed-off-by: Xin Long Signed-off-by: David S. Miller include/linux/sctp.h | 32 ++++++++++++++++---------------- include/net/sctp/sm.h | 2 +- include/net/sctp/ulpevent.h | 2 +- net/sctp/sm_make_chunk.c | 5 +++-- net/sctp/stream.c | 26 +++++++++++++++++--------- net/sctp/ulpevent.c | 2 +- 6 files changed, 39 insertions(+), 30 deletions(-) commit 50317fce2cc70a2bbbc4b42c31bbad510382a53c Author: Cong Wang Date: Fri Oct 27 22:08:56 2017 -0700 net_sched: avoid matching qdisc with zero handle Davide found the following script triggers a NULL pointer dereference: ip l a name eth0 type dummy tc q a dev eth0 parent :1 handle 1: htb This is because for a freshly created netdevice noop_qdisc is attached and when passing 'parent :1', kernel actually tries to match the major handle which is 0 and noop_qdisc has handle 0 so is matched by mistake. Commit 69012ae425d7 tries to fix a similar bug but still misses this case. Handle 0 is not a valid one, should be just skipped. In fact, kernel uses it as TC_H_UNSPEC. Fixes: 69012ae425d7 ("net: sched: fix handling of singleton qdiscs with qdisc_hash") Fixes: 59cc1f61f09c ("net: sched:convert qdisc linked list to hashtable") Reported-by: Davide Caratti Cc: Jiri Kosina Cc: Eric Dumazet Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_api.c | 2 ++ 1 file changed, 2 insertions(+) commit d04adf1b355181e737b6b1e23d801b07f0b7c4c0 Author: Xin Long Date: Sat Oct 28 02:13:29 2017 +0800 sctp: reset owner sk for data chunks on out queues when migrating a sock Now when migrating sock to another one in sctp_sock_migrate(), it only resets owner sk for the data in receive queues, not the chunks on out queues. It would cause that data chunks length on the sock is not consistent with sk sk_wmem_alloc. When closing the sock or freeing these chunks, the old sk would never be freed, and the new sock may crash due to the overflow sk_wmem_alloc. syzbot found this issue with this series: r0 = socket$inet_sctp() sendto$inet(r0) listen(r0) accept4(r0) close(r0) Although listen() should have returned error when one TCP-style socket is in connecting (I may fix this one in another patch), it could also be reproduced by peeling off an assoc. This issue is there since very beginning. This patch is to reset owner sk for the chunks on out queues so that sk sk_wmem_alloc has correct value after accept one sock or peeloff an assoc to one sock. Note that when resetting owner sk for chunks on outqueue, it has to sctp_clear_owner_w/skb_orphan chunks before changing assoc->base.sk first and then sctp_set_owner_w them after changing assoc->base.sk, due to that sctp_wfree and it's callees are using assoc->base.sk. Reported-by: Dmitry Vyukov Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit c2385eaa6c5a87cdc4e04ed589ae103ca3297c84 Author: Eric Auger Date: Thu Oct 26 17:23:06 2017 +0200 KVM: arm/arm64: vgic-its: Check GITS_BASER Valid bit before saving tables At the moment we don't properly check the GITS_BASER.Valid bit before saving the collection and device tables. On vgic_its_save_collection_table() we use the GITS_BASER gpa field whereas the Valid bit should be used. On vgic_its_save_device_tables() there is no check. This can cause various bugs, among which a subsequent fault when accessing the table in guest memory. Let's systematically check the Valid bit before doing anything. We also uniformize the code between save and restore. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit c9b51bb60d944067f36f67750e19c18c3cc2697c Author: Eric Auger Date: Thu Oct 26 17:23:05 2017 +0200 KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS The spec says it is UNPREDICTABLE to enable the ITS if any of the following conditions are true: - GITS_CBASER.Valid == 0. - GITS_BASER.Valid == 0, for any GITS_BASER register where the Type field indicates Device. - GITS_BASER.Valid == 0, for any GITS_BASER register where the Type field indicates Interrupt Collection and GITS_TYPER.HCC == 0. In that case, let's keep the ITS disabled. Signed-off-by: Eric Auger Reported-by: Andre Przywara Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f31b98b57f72dcd458eb63f795f4efe272acc2e3 Author: Eric Auger Date: Thu Oct 26 17:23:04 2017 +0200 KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value vgic_its_restore_cte returns +1 if the collection table entry is valid and properly decoded. As a consequence, if the collection table is fully filled with valid data that are decoded without error, vgic_its_restore_collection_table() returns +1. This is wrong. Let's return 0 in that case. Fixes: ea1ad53e1e31a3 (KVM: arm64: vgic-its: Collection table save/restore) Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 4 ++++ 1 file changed, 4 insertions(+) commit b92382620e33c9f1bcbcd7c169262b9bf0525871 Author: wanghaibin Date: Thu Oct 26 17:23:03 2017 +0200 KVM: arm/arm64: vgic-its: Fix return value for device table restore If ITT only contains invalid entries, vgic_its_restore_itt returns 1 and this is considered as an an error in vgic_its_restore_dte. Also in case the device table only contains invalid entries, the table restore fails and this is not correct. This patch fixes those 2 issues: - vgic_its_restore_itt now returns <= 0 values. If all ITEs are invalid, this is considered as successful. - vgic_its_restore_device_tables also returns <= 0 values. We also simplify the returned value computation in handle_l1_dte. Signed-off-by: wanghaibin Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 151516fab4e82ab5da35fd14c972efc90a1c4aa4 Merge: dea6e19 bfa64075 Author: David S. Miller Date: Sun Oct 29 11:18:49 2017 +0900 Merge branch 'sockmap-fixes' John Fastabend says: ==================== net: sockmap fixes Last two fixes (as far as I know) for sockmap code this round. First, we are using the qdisc cb structure when making the data end calculation. This is really just wrong so, store it with the other metadata in the correct tcp_skb_cb sturct to avoid breaking things. Next, with recent work to attach multiple programs to a cgroup a specific enumeration of return codes was agreed upon. However, I wrote the sk_skb program types before seeing this work and used a different convention. Patch 2 in the series aligns the return codes to avoid breaking with this infrastructure and also aligns with other programming conventions to avoid being the odd duck out forcing programs to remember SK_SKB programs are different. Pusing to net because its a user visible change. With this SK_SKB program return codes are the same as other cgroup program types. ==================== Signed-off-by: David S. Miller commit bfa640757e9378c2f26867e723f1287e94f5a7ad Author: John Fastabend Date: Fri Oct 27 09:45:53 2017 -0700 bpf: rename sk_actions to align with bpf infrastructure Recent additions to support multiple programs in cgroups impose a strict requirement, "all yes is yes, any no is no". To enforce this the infrastructure requires the 'no' return code, SK_DROP in this case, to be 0. To apply these rules to SK_SKB program types the sk_actions return codes need to be adjusted. This fix adds SK_PASS and makes 'SK_DROP = 0'. Finally, remove SK_ABORTED to remove any chance that the API may allow aborted program flows to be passed up the stack. This would be incorrect behavior and allow programs to break existing policies. Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 6 +++--- kernel/bpf/sockmap.c | 3 ++- net/core/filter.c | 5 +++-- tools/include/uapi/linux/bpf.h | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) commit 8108a77515126f6db4374e8593956e20430307c0 Author: John Fastabend Date: Fri Oct 27 09:45:34 2017 -0700 bpf: bpf_compute_data uses incorrect cb structure SK_SKB program types use bpf_compute_data to store the end of the packet data. However, bpf_compute_data assumes the cb is stored in the qdisc layer format. But, for SK_SKB this is the wrong layer of the stack for this type. It happens to work (sort of!) because in most cases nothing happens to be overwritten today. This is very fragile and error prone. Fortunately, we have another hole in tcp_skb_cb we can use so lets put the data_end value there. Note, SK_SKB program types do not use data_meta, they are failed by sk_skb_is_valid_access(). Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/tcp.h | 1 + kernel/bpf/sockmap.c | 12 ++++++++++-- net/core/filter.c | 27 ++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) commit 25a5d23b47994cdb451dcd2bc8ac310a1492f71b Merge: a7d3e63 bb3f38c Author: Linus Torvalds Date: Sat Oct 28 11:01:57 2017 -0700 Merge tag 'kbuild-fixes-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix O= building on dash - remove unused dependency in Makefile - fix default of a choice in Kconfig - fix typos and documentation style - fix command options unrecognized by sparse * tag 'kbuild-fixes-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: clang: fix build failures with sparse check kbuild doc: a bundle of fixes on makefiles.txt Makefile: kselftest: fix grammar typo kbuild: Fix optimization level choice default kbuild: drop unused symverfile in Makefile.modpost kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) commit a7d3e63f840c26e52f65d36de470d0b116014240 Merge: 22450e0 3e64fcb Author: Linus Torvalds Date: Sat Oct 28 10:56:13 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - fix gtco tablet driver, tightening parsing of HID descriptors - add ACPI ID added to Elan driver to be able to handle touchpads found in Lenovo Ideapad 320/520 - fix the Symaptics RMI4 driver to adjust handling of buttons * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - limit the range of what GPIOs are buttons Input: gtco - fix potential out-of-bound access Input: elan_i2c - add ELAN0611 to the ACPI table commit 22450e03acf18ef0dbdbbc155f0f97f105bf6878 Merge: b35f0ca 814eae5 Author: Linus Torvalds Date: Sat Oct 28 10:53:24 2017 -0700 Merge tag 'pci-v4.14-fixes-6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Move alpha PCI IRQ map/swizzle functions out of initdata to fix regression from PCI core IRQ mapping changes (Lorenzo Pieralisi)" * tag 'pci-v4.14-fixes-6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: alpha/PCI: Move pci_map_irq()/pci_swizzle() out of initdata commit b35f0ca74f055cc322fcbc6ec8c31cfb8dad892f Merge: 5345da8 ce485df Author: Linus Torvalds Date: Sat Oct 28 10:50:38 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Two amd fixes, one i915 core and a few i915 GVT fixes, things seem fairly quiet" * tag 'drm-fixes-for-v4.14-rc7' of git://people.freedesktop.org/~airlied/linux: drm/i915/gvt: Adding ACTHD mmio read handler drm/i915/gvt: Extract mmio_read_from_hw() common function drm/i915/gvt: Refine MMIO_RING_F() drm/i915/gvt: properly check per_ctx bb valid state drm/i915/perf: fix perf enable/disable ioctls with 32bits userspace drm/amd/amdgpu: Remove workaround check for UVD6 on APUs drm/amd/powerplay: fix uninitialized variable commit 5345da892c0771ac1276283a29ba4bcd7ec426df Merge: ea67899 8fe8ffb Author: Linus Torvalds Date: Sat Oct 28 10:46:20 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six fixes for mostly minor issues, most of which have small race windows for occurring" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Suppress a kernel warning in case the prep function returns BLKPREP_DEFER scsi: sg: Re-fix off by one in sg_fill_request_table() scsi: aacraid: Fix controller initialization failure scsi: hpsa: Fix configured_logical_drive_count·check scsi: qla2xxx: Initialize Work element before requesting IRQs scsi: zfcp: fix erp_action use-before-initialize in REC action trace commit ea6789980fdaa610d7eb63602c746bf6ec70cd2b Author: David Howells Date: Wed Oct 11 23:32:27 2017 +0100 assoc_array: Fix a buggy node-splitting case This fixes CVE-2017-12193. Fix a case in the assoc_array implementation in which a new leaf is added that needs to go into a node that happens to be full, where the existing leaves in that node cluster together at that level to the exclusion of new leaf. What needs to happen is that the existing leaves get moved out to a new node, N1, at level + 1 and the existing node needs replacing with one, N0, that has pointers to the new leaf and to N1. The code that tries to do this gets this wrong in two ways: (1) The pointer that should've pointed from N0 to N1 is set to point recursively to N0 instead. (2) The backpointer from N0 needs to be set correctly in the case N0 is either the root node or reached through a shortcut. Fix this by removing this path and using the split_node path instead, which achieves the same end, but in a more general way (thanks to Eric Biggers for spotting the redundancy). The problem manifests itself as: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: assoc_array_apply_edit+0x59/0xe5 Fixes: 3cb989501c26 ("Add a generic associative array implementation.") Reported-and-tested-by: WU Fan Signed-off-by: David Howells Cc: stable@vger.kernel.org [v3.13-rc1+] Signed-off-by: Linus Torvalds lib/assoc_array.c | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit 781402340475144bb360e32bb7437fa4b84cadc3 Merge: c9f27f9 4587eee Author: Linus Torvalds Date: Sat Oct 28 08:39:35 2017 -0700 Merge tag '4.14-smb3-fixes-for-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various SMB3 fixes for 4.14 and stable" * tag '4.14-smb3-fixes-for-stable' of git://git.samba.org/sfrench/cifs-2.6: SMB3: Validate negotiate request must always be signed SMB: fix validate negotiate info uninitialised memory use SMB: fix leak of validate negotiate info response buffer CIFS: Fix NULL pointer deref on SMB2_tcon() failure CIFS: do not send invalid input buffer on QUERY_INFO requests cifs: Select all required crypto modules CIFS: SMBD: Fix the definition for SMB2_CHANNEL_RDMA_V1_INVALIDATE cifs: handle large EA requests more gracefully in smb2+ Fix encryption labels and lengths for SMB3.1.1 commit c9f27f9f85b68c565148b8243502d389351302df Merge: a9af983 fa0096e Author: Linus Torvalds Date: Sat Oct 28 08:29:29 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix several issues, most of them introduced in the last release" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: do not cleanup unsupported index entries ovl: handle ENOENT on index lookup ovl: fix EIO from lookup of non-indexed upper ovl: Return -ENOMEM if an allocation fails ovl_lookup() ovl: add NULL check in ovl_alloc_inode commit a9af9835d31122b6354a44f99f74731f714233d2 Merge: 11224e1 c6cdd51 Author: Linus Torvalds Date: Sat Oct 28 08:27:46 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fix from Miklos Szeredi: "This fixes a longstanding bug, which can be triggered by interrupting a directory reading syscall" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix READDIRPLUS skipping an entry commit 4139433c9a81a6ee21e5293989122c203a14a6d8 Merge: 11224e1 9445464 Author: Ingo Molnar Date: Sat Oct 28 16:16:11 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20171027' 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 memory corruption in the annotation routines because of zero length symbols (asm ones) (Ravi Bangoria) - Fix printing garbage as an error message when re-running the lexer events matcher (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit dea6e19f4ef746aa18b4c33d1a7fed54356796ed Author: Girish Moodalbail Date: Fri Oct 27 00:00:16 2017 -0700 tap: reference to KVA of an unloaded module causes kernel panic The commit 9a393b5d5988 ("tap: tap as an independent module") created a separate tap module that implements tap functionality and exports interfaces that will be used by macvtap and ipvtap modules to create create respective tap devices. However, that patch introduced a regression wherein the modules macvtap and ipvtap can be removed (through modprobe -r) while there are applications using the respective /dev/tapX devices. These applications cause kernel to hold reference to /dev/tapX through 'struct cdev macvtap_cdev' and 'struct cdev ipvtap_dev' defined in macvtap and ipvtap modules respectively. So, when the application is later closed the kernel panics because we are referencing KVA that is present in the unloaded modules. ----------8<------- Example ----------8<---------- $ sudo ip li add name mv0 link enp7s0 type macvtap $ sudo ip li show mv0 |grep mv0| awk -e '{print $1 $2}' 14:mv0@enp7s0: $ cat /dev/tap14 & $ lsmod |egrep -i 'tap|vlan' macvtap 16384 0 macvlan 24576 1 macvtap tap 24576 3 macvtap $ sudo modprobe -r macvtap $ fg cat /dev/tap14 ^C <...system panics...> BUG: unable to handle kernel paging request at ffffffffa038c500 IP: cdev_put+0xf/0x30 ----------8<-----------------8<---------- The fix is to set cdev.owner to the module that creates the tap device (either macvtap or ipvtap). With this set, the operations (in fs/char_dev.c) on char device holds and releases the module through cdev_get() and cdev_put() and will not allow the module to unload prematurely. Fixes: 9a393b5d5988ea4e (tap: tap as an independent module) Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller drivers/net/ipvlan/ipvtap.c | 4 ++-- drivers/net/macvtap.c | 4 ++-- drivers/net/tap.c | 5 +++-- include/linux/if_tap.h | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) commit ee1836aec4f5a977c1699a311db4d9027ef21ac8 Author: Eric Dumazet Date: Thu Oct 26 21:21:40 2017 -0700 tcp: refresh tp timestamp before tcp_mtu_probe() In the unlikely event tcp_mtu_probe() is sending a packet, we want tp->tcp_mstamp being as accurate as possible. This means we need to call tcp_mstamp_refresh() a bit earlier in tcp_write_xmit(). Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63b9ab65bd76e5de6479bb14b4014b64aa1a317a Author: Jason Wang Date: Fri Oct 27 11:05:44 2017 +0800 tuntap: properly align skb->head before building skb An unaligned alloc_frag->offset caused by previous allocation will result an unaligned skb->head. This will lead unaligned skb_shared_info and then unaligned dataref which requires to be aligned for accessing on some architecture. Fix this by aligning alloc_frag->offset before the frag refilling. Fixes: 0bbd7dad34f8 ("tun: make tun_build_skb() thread safe") Cc: Eric Dumazet Cc: Willem de Bruijn Cc: Wei Wei Cc: Dmitry Vyukov Cc: Mark Rutland Reported-by: Wei Wei Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 1 + 1 file changed, 1 insertion(+) commit 11224e1fc40a6556dc285573ea93dd522f8c563f Merge: 90e6872 8fc669e Author: Linus Torvalds Date: Fri Oct 27 20:41:05 2017 -0700 Merge tag 'for-linus-4.14c-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - a fix for the Xen gntdev device repairing an issue in case of partial failure of mapping multiple pages of another domain - a fix of a regression in the Xen balloon driver introduced in 4.13 - a build fix for Xen on ARM which will trigger e.g. for Linux RT - a maintainers update for pvops (not really Xen, but carrying through this tree just for convenience) * tag 'for-linus-4.14c-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: maintainers: drop Chris Wright from pvops arm/xen: don't inclide rwlock.h directly. xen: fix booting ballooned down hvm guest xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap() commit 90e6872061adb913d28e971d9ed783631e3f225a Merge: a0cb2b5 fdbed19 Author: Linus Torvalds Date: Fri Oct 27 20:38:47 2017 -0700 Merge tag 'arc-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Fixes for HSDK platform - module build error for !LLSC config * tag 'arc-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: unbork module link errors with !CONFIG_ARC_HAS_LLSC ARC: [plat-hsdk] Increase SDIO CIU frequency to 50000000Hz ARC: [plat-hsdk] select CONFIG_RESET_HSDK from Kconfig commit a0cb2b5c390151837b08e5f7bca4a6ecddbcd39c Author: Linus Torvalds Date: Fri Oct 27 20:35:31 2017 -0700 Fix tracing sample code warning. Commit 6575257c60e1 ("tracing/samples: Fix creation and deletion of simple_thread_fn creation") introduced a new warning due to using a boolean as a counter. Just make it "int". Fixes: 6575257c60e1 ("tracing/samples: Fix creation and deletion of simple_thread_fn creation") Cc: Steven Rostedt Signed-off-by: Linus Torvalds samples/trace_events/trace-events-sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe23429e6bfec817abcf316f4782aed8426ea745 Merge: d3eab75 0a5e2ec Author: Linus Torvalds Date: Fri Oct 27 20:32:24 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Martin Schwidefsky: "A fix for a regression in regard to machine check handling in KVM. Keeping my fingers crossed that this is the last s390 fix for v4.14" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/kvm: fix detection of guest machine checks commit d3eab75a7fdd32b4b9c342a07be3525c4d31a41a Merge: 11dc76f 90edaac Author: Linus Torvalds Date: Fri Oct 27 17:19:39 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - revert a /dev/mem restriction change that crashes with certain boot parameters - an AMD erratum fix for cases where the BIOS doesn't apply it - fix unwinder debuginfo - improve ORC unwinder warning printouts" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "x86/mm: Limit mmap() of /dev/mem to valid physical addresses" x86/unwind: Show function name+offset in ORC error messages x86/entry: Fix idtentry unwind hint x86/cpu/AMD: Apply the Erratum 688 fix when the BIOS doesn't commit 11dc76f0a4161073be4b85b265ba0d3a5bccbf96 Merge: 02c7dfc 88796e7 Author: Linus Torvalds Date: Fri Oct 27 17:17:25 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Update the documentation to discourage their use" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/swait: Document it clearly that the swait facilities are special and shouldn't be used commit 02c7dfc006a6e3f4a169f98b8f6c5703756d0072 Merge: 5cefb4e 2eece39 Author: Linus Torvalds Date: Fri Oct 27 17:15:49 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "A fix for a misplaced permission check that can leave perf PT or LBR disabled (on Intel CPUs) permanently until the next reboot" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/bts: Fix exclusive event reference leak commit 5cefb4ee245cb28a3920dbd0edc9d6df1f72a8cf Merge: 15f859a 38fb665 Author: Linus Torvalds Date: Fri Oct 27 17:14:32 2017 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Two fixes: an ARM fix for KASLR interaction with hibernation, plus an efi_test crash fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/libstub/arm: Don't randomize runtime regions when CONFIG_HIBERNATION=y efi/efi_test: Prevent an Oops in efi_runtime_query_capsulecaps() commit 3e64fcbdbd10e46dede502d507dbcc104837cd59 Author: Andrew Duggan Date: Wed Oct 25 09:30:16 2017 -0700 Input: synaptics-rmi4 - limit the range of what GPIOs are buttons By convention the first 6 bits of F30 Ctrl 2 and 3 are used to signify GPIOs which are connected to buttons. Additional GPIOs may be used as input GPIOs to signal the touch controller of some event (ie disable touchpad). These additional GPIOs may meet the criteria of a button in rmi_f30_is_valid_button() but should not be considered buttons. This patch limits the GPIOs which are mapped to buttons to just the first 6. Signed-off-by: Andrew Duggan Reported-by: Daniel Martin Tested-by: Daniel Martin Acked-By: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f30.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a50829479f58416a013a4ccca791336af3c584c7 Author: Dmitry Torokhov Date: Mon Oct 23 16:46:00 2017 -0700 Input: gtco - fix potential out-of-bound access parse_hid_report_descriptor() has a while (i < length) loop, which only guarantees that there's at least 1 byte in the buffer, but the loop body can read multiple bytes which causes out-of-bounds access. Reported-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/tablet/gtco.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 29f9007b3182ab3f328a31da13e6b1c9072f7a95 Author: Ard Biesheuvel Date: Sun Oct 22 15:14:57 2017 +0100 efi/libstub: arm: omit sorting of the UEFI memory map ARM shares its EFI stub implementation with arm64, which has some special handling in the virtual remapping code to a) make sure that we can map everything even if the OS executes with 64k page size, and b) make sure that adjacent regions with the same attributes are not reordered or moved apart in memory. The latter is a workaround for a 'feature' that was shortly recommended by UEFI spec v2.5, but deprecated shortly after, due to the fact that it broke many OS installers, including non-Linux ones, and it was never widely implemented for ARM systems. Before implementing b), the arm64 code simply rounded up all regions to 64 KB granularity, but given that that results in moving adjacent regions apart, it had to be refined when b) was implemented. The adjacency check requires a sort() pass, due to the fact that the UEFI spec does not mandate any ordering, and the inclusion of the lib/sort.c code into the ARM EFI stub is causing some trouble with the decompressor build due to the fact that its EXPORT_SYMBOL() call triggers the creation of ksymtab/kcrctab sections. So let's simply do away with the adjacency check for ARM, and simply put all UEFI runtime regions together if they have the same memory attributes. This is guaranteed to work, given that ARM only supports 4 KB pages, and allows us to remove the sort() call entirely. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Tested-by: Jeffy Chen Tested-by: Gregory CLEMENT Tested-by: Matthias Brugger Signed-off-by: Russell King drivers/firmware/efi/libstub/Makefile | 6 +++--- drivers/firmware/efi/libstub/arm-stub.c | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) commit 8ab190fbe96178449d8195c3582aa10ce684c386 Merge: 8aec495 62b4c66 Author: David S. Miller Date: Sat Oct 28 00:05:34 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 Updates 2017-10-26 This series contains fixes to e1000, igb, ixgbe and i40e. Vincenzo Maffione fixes a potential race condition which would result in the interface being up but transmits are disabled in the hardware. Colin Ian King fixes a possible NULL pointer dereference in e1000, which was found by Coverity. Jean-Philippe Brucker fixes a possible kernel panic when a driver cannot map a transmit buffer, which is caused by an erroneous test. Alex provides a fix for ixgbe, which is a partial revert of the commit ffed21bcee7a ("ixgbe: Don't bother clearing buffer memory for descriptor rings") because the previous commit messed up the exception handling path by adding the count back in when we did not need to. Also fixed a typo, where the transmit ITR setting was being used to determine if we were using adaptive receive interrupt moderation or not. Lastly, fixed a memory leak by including programming descriptors in the cleaned count. ==================== Signed-off-by: David S. Miller commit 8aec4959d832bae0889a8e2f348973b5e4abffef Author: Xin Long Date: Thu Oct 26 19:27:17 2017 +0800 ip6_gre: update dst pmtu if dev mtu has been updated by toobig in __gre6_xmit When receiving a Toobig icmpv6 packet, ip6gre_err would just set tunnel dev's mtu, that's not enough. For skb_dst(skb)'s pmtu may still be using the old value, it has no chance to be updated with tunnel dev's mtu. Jianlin found this issue by reducing route's mtu while running netperf, the performance went to 0. ip6ip6 and ip4ip6 tunnel can work well with this, as they lookup the upper dst and update_pmtu it's pmtu or icmpv6_send a Toobig to upper socket after setting tunnel dev's mtu. We couldn't do that for ip6_gre, as gre's inner packet could be any protocol, it's difficult to handle them (like lookup upper dst) in a good way. So this patch is to fix it by updating skb_dst(skb)'s pmtu when dev->mtu < skb_dst(skb)'s pmtu in tx path. It's safe to do this update there, as usually dev->mtu <= skb_dst(skb)'s pmtu and no performance regression can be caused by this. Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f8d20b46ce55cf40afb30dcef6d9288f7ef46d9b Author: Xin Long Date: Thu Oct 26 19:23:27 2017 +0800 ip6_gre: only increase err_count for some certain type icmpv6 in ip6gre_err The similar fix in patch 'ipip: only increase err_count for some certain type icmp in ipip_err' is needed for ip6gre_err. In Jianlin's case, udp netperf broke even when receiving a TooBig icmpv6 packet. Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit f3594f0a7ea36661d7fd942facd7f31a64245f1a Author: Xin Long Date: Thu Oct 26 19:19:56 2017 +0800 ipip: only increase err_count for some certain type icmp in ipip_err t->err_count is used to count the link failure on tunnel and an err will be reported to user socket in tx path if t->err_count is not 0. udp socket could even return EHOSTUNREACH to users. Since commit fd58156e456d ("IPIP: Use ip-tunneling code.") removed the 'switch check' for icmp type in ipip_err(), err_count would be increased by the icmp packet with ICMP_EXC_FRAGTIME code. an link failure would be reported out due to this. In Jianlin's case, when receiving ICMP_EXC_FRAGTIME a icmp packet, udp netperf failed with the err: send_data: data send error: No route to host (errno 113) We expect this error reported from tunnel to socket when receiving some certain type icmp, but not ICMP_EXC_FRAGTIME, ICMP_SR_FAILED or ICMP_PARAMETERPROB ones. This patch is to bring 'switch check' for icmp type back to ipip_err so that it only reports link failure for the right type icmp, just as in ipgre_err() and ipip6_err(). Fixes: fd58156e456d ("IPIP: Use ip-tunneling code.") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ipip.c | 59 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 17 deletions(-) commit 9445464bb8318e42e5232b37fc7218ed028517f6 Author: Jiri Olsa Date: Thu Oct 12 17:03:38 2017 +0200 perf tools: Unwind properly location after REJECT We have defined YY_USER_ACTION to keep trace of the column location during events parsing, but we need to clean it up when we call REJECT. When REJECT is called, the lexer shrinks the text and re-runs the matching, so we need to address it in resuming the previous location value to keep it correct for error display, like: Before: $ perf stat -e 'cpu/uops_executed.core,krava/' true event syntax error: '..38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;1\ 1;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;\ 21;38;50 �' \___ unknown term After: $ ./perf stat -e 'cpu/uops_executed.core,krava/' true event syntax error: '..cuted.core,krava/' \___ unknown term Signed-off-by: Jiri Olsa Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Tested-by: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-vug2hchlny30jfsfrumbym26@git.kernel.org Link: http://lkml.kernel.org/r/20171009140944.GD28623@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6d9f0790af8d33476f936ac84a07cac42f808f6c Author: Jose Abreu Date: Thu Oct 26 10:07:12 2017 +0100 net: stmmac: First Queue must always be in DCB mode According to DWMAC databook the first queue operating mode must always be in DCB. As MTL_QUEUE_DCB = 1, we need to always set the first queue operating mode to DCB otherwise driver will think that queue is in AVB mode (because MTL_QUEUE_AVB = 0). Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit efea2abcb03215f2efadfe994ff7f652aaff196b Author: Bart Van Assche Date: Fri Oct 27 08:23:21 2017 -0600 virtio_blk: Fix an SG_IO regression Avoid that submitting an SG_IO ioctl triggers a kernel oops that is preceded by: usercopy: kernel memory overwrite attempt detected to (null) () (6 bytes) kernel BUG at mm/usercopy.c:72! Reported-by: Dann Frazier Fixes: commit ca18d6f769d2 ("block: Make most scsi_req_init() calls implicit") Signed-off-by: Bart Van Assche Cc: Michael S. Tsirkin Cc: Dann Frazier Cc: # v4.13 Reviewed-by: Christoph Hellwig Moved virtblk_initialize_rq() inside CONFIG_VIRTIO_BLK_SCSI. Signed-off-by: Jens Axboe drivers/block/virtio_blk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4894ac6b6c25b2693dc21c611621dc9fd21f4090 Author: Jose Abreu Date: Thu Oct 26 09:51:33 2017 +0100 net: stmmac: dwc-qos-eth: Fix typo in DT bindings parsing According to DT bindings documentation we are expecting a property called "snps,read-requests" but we are parsing instead a property called "read,read-requests". This is clearly a typo. Fix it. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93689a603141ca9237203cebfa6b45775caccdb5 Merge: 15f859a 7db8144 Author: Jens Axboe Date: Fri Oct 27 08:17:32 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus Pull an NVMe fix from Christoph. commit c0d5adc35c0b010120391117cb07be6623cf8940 Author: Jia-Ju Bai Date: Fri Oct 27 11:12:30 2017 +0300 wcn36xx: Remove unnecessary rcu_read_unlock in wcn36xx_bss_info_changed No rcu_read_lock is called, but rcu_read_unlock is still called. Thus rcu_read_unlock should be removed. Signed-off-by: Jia-Ju Bai Acked-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 1 - 1 file changed, 1 deletion(-) commit 5be9541a0923c7199f4cd55b9e3abc9a43247509 Merge: 9618aec be0f161 Author: David S. Miller Date: Fri Oct 27 22:23:41 2017 +0900 Merge tag 'mlx5-fixes-2017-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-10-26 The series includes some misc fixes for mlx5 core and etherent driver. Please pull and let me know if there's any problem. For -Stable: net/mlx5e: Properly deal with encap flows add/del under neigh update (kernels >= 4.12) net/mlx5: Fix health work queue spin lock to IRQ safe (kernels >= 4.13) ==================== Signed-off-by: David S. Miller commit 90edaac62729d3b9cbb97756261a0049a7fdd6a0 Author: Ingo Molnar Date: Fri Oct 27 10:03:13 2017 +0200 Revert "x86/mm: Limit mmap() of /dev/mem to valid physical addresses" This reverts commit ce56a86e2ade45d052b3228cdfebe913a1ae7381. There's unanticipated interaction with some boot parameters like 'mem=', which now cause the new checks via valid_mmap_phys_addr_range() to be too restrictive, crashing a Qemu bootup in fact, as reported by Fengguang Wu. So while the motivation of the change is still entirely valid, we need a few more rounds of testing to get it right - it's way too late after -rc6, so revert it for now. Reported-by: Fengguang Wu Signed-off-by: Ingo Molnar Acked-by: Craig Bergstrom 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: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: dsafonov@virtuozzo.com Cc: kirill.shutemov@linux.intel.com Cc: mhocko@suse.com Cc: oleg@redhat.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/io.h | 4 ---- arch/x86/mm/mmap.c | 12 ------------ 2 files changed, 16 deletions(-) commit 8fc669ea1639f3f6fb2c3a4a4a1e31d975d0e254 Author: Juergen Gross Date: Thu Oct 26 12:31:54 2017 +0200 maintainers: drop Chris Wright from pvops Mails to chrisw@sous-sol.org are not deliverable since several months. Drop him as PARAVIRT_OPS maintainer. Signed-off-by: Juergen Gross Acked-by: Chris Wright Signed-off-by: Juergen Gross MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 9618aec3349b7669b6bf123c7c6121789cb82861 Merge: 78e0ea6 cfbb0d9 Author: David S. Miller Date: Fri Oct 27 13:50:06 2017 +0900 Merge tag 'mac80211-for-davem-2017-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== pull-request: mac80211 2017-10-25 Here are: * follow-up fixes for the WoWLAN security issue, to fix a partial TKIP key material problem and to use crypto_memneq() * a change for better enforcement of FQ's memory limit * a disconnect/connect handling fix, and * a user rate mask validation fix ==================== Signed-off-by: David S. Miller commit ce485df43dc286f3ad96f9992b22e3974d051c44 Merge: 522dbb3 894e287 Author: Dave Airlie Date: Fri Oct 27 11:43:17 2017 +1000 Merge tag 'drm-intel-fixes-2017-10-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes One fix for stable: - fix perf enable/disable ioctls for 32bits (Lionel) Plus GVT fixes: - Fix per_ctx_bb check (Zhenyu) - Fix GPU hang of Linux guest (Xion) - Refine MMIO_RING_F to check for presence of VCS2 ring (Zhi) * tag 'drm-intel-fixes-2017-10-26' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/gvt: Adding ACTHD mmio read handler drm/i915/gvt: Extract mmio_read_from_hw() common function drm/i915/gvt: Refine MMIO_RING_F() drm/i915/gvt: properly check per_ctx bb valid state commit 15f859ae5c43c7f0a064ed92d33f7a5bc5de6de0 Merge: 80c094a b4d91ae Author: Linus Torvalds Date: Thu Oct 26 23:04:14 2017 +0200 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fix from Doug Ledford: "Fix an oops issue in the new RDMA netlink code" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: RDMA/netlink: OOPs in rdma_nl_rcv_msg() from misinterpreted flag commit a494ee6cfd771c2b37721a18a1c9209b61bdf81d Author: Sebastian Andrzej Siewior Date: Thu Oct 5 14:56:53 2017 +0200 arm/xen: 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: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky arch/arm/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 894e287b3dcc8bfc8d974f883dab3b5c66344089 Author: Xiong Zhang Date: Sat Oct 14 06:34:47 2017 +0800 drm/i915/gvt: Adding ACTHD mmio read handler When a workload is too heavy to finish it in gpu hang check timer intervals(1.5), gpu hang check function will check ACTHD register value to decide whether gpu is real dead or not. On real hw, ACTHD is updated by HW when workload is running, then host kernel won't think it is gpu hang. while guest kernel always read a constant ACTHD value as GVT doesn't supply ACTHD emulate handler, then guest kernel detects a fake gpu hang. To remove such guest fake gpu hang, this patch supply ACTHD mmio read handler which read real HW ACTHD register directly. Signed-off-by: Xiong Zhang Signed-off-by: Zhi Wang Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/b4c9a097-3e62-124e-6856-b0c37764df7b@intel.com drivers/gpu/drm/i915/gvt/handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 20a2bcdec5071f78bebe48c5eecdb89de6e96acb Author: Xiong Zhang Date: Sat Oct 14 06:34:46 2017 +0800 drm/i915/gvt: Extract mmio_read_from_hw() common function The mmio read handler for ring timestmap / instdone register are same as reading hw value directly. Extract it as common function to reduce code duplications. Signed-off-by: Xiong Zhang Signed-off-by: Zhi Wang drivers/gpu/drm/i915/gvt/handlers.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit edee7ecdb4d7311f351feaeb53e269f416bb1b57 Author: Zhi Wang Date: Sat Sep 30 17:32:16 2017 +0800 drm/i915/gvt: Refine MMIO_RING_F() Inspect if the host has VCS2 ring by host i915 macro in MMIO_RING_F(). Also this helps on reducing some LOCs. Signed-off-by: Zhi Wang drivers/gpu/drm/i915/gvt/handlers.c | 44 ++----------------------------------- drivers/gpu/drm/i915/gvt/reg.h | 3 --- 2 files changed, 2 insertions(+), 45 deletions(-) commit 8f63fc2bc64716c16e269ab951130eeda78fe37a Author: Zhenyu Wang Date: Thu Oct 19 13:54:06 2017 +0800 drm/i915/gvt: properly check per_ctx bb valid state Need to check valid state for per_ctx bb and bypass batch buffer combine for scan if necessary. Otherwise adding invalid MI batch buffer start cmd for per_ctx bb will cause scan failure, which is taken as -EFAULT now so vGPU would be put in failsafe. This trys to fix that by checking per_ctx bb valid state. Also remove old invalid WARNING that indirect ctx bb shouldn't depend on valid per_ctx bb. Signed-off-by: Zhenyu Wang Signed-off-by: Zhi Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 3 +++ drivers/gpu/drm/i915/gvt/execlist.c | 3 +-- drivers/gpu/drm/i915/gvt/scheduler.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 80c094a47dd4ea63375e3f60b5e076064f16e857 Author: Linus Torvalds Date: Thu Oct 26 19:35:35 2017 +0200 Revert "apparmor: add base infastructure for socket mediation" This reverts commit 651e28c5537abb39076d3949fb7618536f1d242e. This caused a regression: "The specific problem is that dnsmasq refuses to start on openSUSE Leap 42.2. The specific cause is that and attempt to open a PF_LOCAL socket gets EACCES. This means that networking doesn't function on a system with a 4.14-rc2 system." Sadly, the developers involved seemed to be in denial for several weeks about this, delaying the revert. This has not been a good release for the security subsystem, and this area needs to change development practices. Reported-and-bisected-by: James Bottomley Tracked-by: Thorsten Leemhuis Cc: John Johansen Cc: Vlastimil Babka Cc: Seth Arnold Signed-off-by: Linus Torvalds security/apparmor/.gitignore | 1 - security/apparmor/Makefile | 43 +---- security/apparmor/apparmorfs.c | 1 - security/apparmor/file.c | 30 --- security/apparmor/include/audit.h | 26 +-- security/apparmor/include/net.h | 114 ----------- security/apparmor/include/perms.h | 5 +- security/apparmor/include/policy.h | 13 -- security/apparmor/lib.c | 5 +- security/apparmor/lsm.c | 387 ------------------------------------- security/apparmor/net.c | 184 ------------------ security/apparmor/policy_unpack.c | 47 +---- 12 files changed, 16 insertions(+), 840 deletions(-) commit 4587eee04e2ac7ac3ac9fa2bc164fb6e548f99cd Author: Steve French Date: Wed Oct 25 15:58:31 2017 -0500 SMB3: Validate negotiate request must always be signed According to MS-SMB2 3.2.55 validate_negotiate request must always be signed. Some Windows can fail the request if you send it unsigned See kernel bugzilla bug 197311 CC: Stable Acked-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2pdu.c | 3 +++ 1 file changed, 3 insertions(+) commit 567825502730b6bc108f926bdb1cf2de7ae436ca Merge: 3b5a9a8 0cc2b4e Author: Linus Torvalds Date: Thu Oct 26 19:10:39 2017 +0200 Merge tag 'pm-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes a device power management quality of service (PM QoS) framework implementation issue causing 'no restriction' requests for device resume latency, including 'no restriction' set by user space, to effectively override requests with specific device resume latency requirements. It is late in the cycle, but the bug in question is in the 'user space can trigger unexpected behavior' category and the fix is stable-candidate, so here it goes" * tag 'pm-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / QoS: Fix device resume latency PM QoS commit 814eae5982cc55988f642f7f1d10eaf340845c00 Author: Lorenzo Pieralisi Date: Thu Oct 26 15:54:15 2017 +0100 alpha/PCI: Move pci_map_irq()/pci_swizzle() out of initdata The introduction of {map/swizzle}_irq() hooks in the struct pci_host_bridge allowed to replace the pci_fixup_irqs() PCI IRQ allocation in alpha arch PCI code with per-bridge map/swizzle functions with commit 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks"). As a side effect of converting PCI IRQ allocation to the struct pci_host_bridge {map/swizzle}_irq() hooks mechanism, the actual PCI IRQ allocation function (ie pci_assign_irq()) is carried out per-device in pci_device_probe() that is called when a PCI device driver is about to be probed. This means that, for drivers compiled as loadable modules, the actual PCI device IRQ allocation can now happen after the system has booted so the struct pci_host_bridge {map/swizzle}_irq() hooks pci_assign_irq() relies on must stay valid after the system has booted so that PCI core can carry out PCI IRQ allocation correctly. Most of the alpha board structures pci_map_irq() and pci_swizzle() hooks (that are used to initialize their struct pci_host_bridge equivalent through the alpha_mv global variable - that represents the struct alpha_machine_vector of the running kernel) are marked as __init/__initdata; this causes freed memory dereferences when PCI IRQ allocation is carried out after the kernel has booted (ie when loading PCI drivers as loadable module) because when the kernel tries to bind the PCI device to its (module) driver, the function pci_assign_irq() is called, that in turn retrieves the struct pci_host_bridge {map/swizzle}_irq() hooks to carry out PCI IRQ allocation; if those hooks are marked as __init code/__initdata they point at freed/invalid memory. Fix the issue by removing the __init/__initdata markers from all subarch struct alpha_machine_vector.pci_map_irq()/pci_swizzle() functions (and data). Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Link: http://lkml.kernel.org/r/alpine.LRH.2.21.1710251043170.7098@math.ut.ee Reported-by: Meelis Roos Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Meelis Roos Cc: Matt Turner arch/alpha/kernel/sys_alcor.c | 4 ++-- arch/alpha/kernel/sys_cabriolet.c | 12 ++++++------ arch/alpha/kernel/sys_dp264.c | 20 ++++++++++---------- arch/alpha/kernel/sys_eb64p.c | 4 ++-- arch/alpha/kernel/sys_eiger.c | 4 ++-- arch/alpha/kernel/sys_miata.c | 6 +++--- arch/alpha/kernel/sys_mikasa.c | 4 ++-- arch/alpha/kernel/sys_nautilus.c | 2 +- arch/alpha/kernel/sys_noritake.c | 6 +++--- arch/alpha/kernel/sys_rawhide.c | 4 ++-- arch/alpha/kernel/sys_ruffian.c | 6 +++--- arch/alpha/kernel/sys_rx164.c | 4 ++-- arch/alpha/kernel/sys_sable.c | 10 +++++----- arch/alpha/kernel/sys_sio.c | 8 ++++---- arch/alpha/kernel/sys_sx164.c | 4 ++-- arch/alpha/kernel/sys_takara.c | 6 +++--- arch/alpha/kernel/sys_wildfire.c | 4 ++-- 17 files changed, 54 insertions(+), 54 deletions(-) commit cda80a82ac3e89309706c027ada6ab232be1d640 Author: Yan Markman Date: Sun Oct 16 00:22:32 2016 +0300 ARM: dts: mvebu: pl310-cache disable double-linefill Under heavy system stress mvebu SoC using Cortex A9 sporadically encountered instability issues. The "double linefill" feature of L2 cache was identified as causing dependency between read and write which lead to the deadlock. Especially, it was the cause of deadlock seen under heavy PCIe traffic, as this dependency violates PCIE overtaking rule. Fixes: c8f5a878e554 ("ARM: mvebu: use DT properties to fine-tune the L2 configuration") Cc: stable@vger.kernel.org Signed-off-by: Yan Markman Signed-off-by: Igal Liberman Signed-off-by: Nadav Haklai [gregory.clement@free-electrons.com: reformulate commit log, add Armada 375 and add Fixes tag] Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-375.dtsi | 4 ++-- arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- arch/arm/boot/dts/armada-39x.dtsi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 3b5a9a8e654c3695e7b499b0784341f299adef48 Merge: 832c6b1 32e67a3 Author: Linus Torvalds Date: Thu Oct 26 17:08:48 2017 +0200 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few select fixes that should go into this series. Mainly for NVMe, but also a single stable fix for nbd from Josef" * 'for-linus' of git://git.kernel.dk/linux-block: nbd: handle interrupted sendmsg with a sndtimeo set nvme-rdma: Fix error status return in tagset allocation failure nvme-rdma: Fix possible double free in reconnect flow nvmet: synchronize sqhd update nvme-fc: retry initial controller connections 3 times nvme-fc: fix iowait hang commit 832c6b18f904b96f494d43d6023db68c9f330cf0 Merge: 601c5c2 7555aa7 Author: Linus Torvalds Date: Thu Oct 26 17:06:35 2017 +0200 Merge tag 'spi-fix-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "There are a bunch of device specific fixes (more than I'd like, I've been lax sending these) plus one important core fix for the conversion to use an IDR for bus number allocation which avoids issues with collisions when some but not all of the buses in the system have a fixed bus number specified. The Armada changes are rather large, specificially "spi: armada-3700: Fix padding when sending not 4-byte aligned data", but it's a storage corruption issue and there's things like indentation changes which make it look bigger than it really is. It's been cooking in -next for quite a while now and is part of the reason for the delay" * tag 'spi-fix-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers spi: bcm-qspi: Fix use after free in bcm_qspi_probe() in error path spi: a3700: Return correct value on timeout detection spi: uapi: spidev: add missing ioctl header spi: stm32: Fix logical error in stm32_spi_prepare_mbr() spi: armada-3700: Fix padding when sending not 4-byte aligned data spi: armada-3700: Fix failing commands with quad-SPI commit 601c5c2ee98313f96ec40b4dcc8d7303afff787c Merge: 4ed5902 6c2838f Author: Linus Torvalds Date: Thu Oct 26 17:04:20 2017 +0200 Merge tag 'ceph-for-4.14-rc7' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A small lock imbalance fix, marked for stable" * tag 'ceph-for-4.14-rc7' of git://github.com/ceph/ceph-client: ceph: unlock dangling spinlock in try_flush_caps() commit 62b4c6694dfd3821bd5ea5bed48238bbabd5fe8b Author: Alexander Duyck Date: Sat Oct 21 18:12:29 2017 -0700 i40e: Add programming descriptors to cleaned_count This patch updates the i40e driver to include programming descriptors in the cleaned_count. Without this change it becomes possible for us to leak memory as we don't trigger a large enough allocation when the time comes to allocate new buffers and we end up overwriting a number of rx_buffers equal to the number of programming descriptors we encountered. Fixes: 0e626ff7ccbf ("i40e: Fix support for flow director programming status") Signed-off-by: Alexander Duyck Tested-by: Anders K. Pedersen Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + 1 file changed, 1 insertion(+) commit 10781348cadebbd5291c8fb193e850365c914da8 Author: Alexander Duyck Date: Fri Oct 20 13:59:20 2017 -0700 i40e: Fix incorrect use of tx_itr_setting when checking for Rx ITR setup It looks like there was either a copy/paste error or just a typo that resulted in the Tx ITR setting being used to determine if we were using adaptive Rx interrupt moderation or not. This patch fixes the typo. Fixes: 65e87c0398f5 ("i40evf: support queue-specific settings for interrupt moderation") Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 069db9cd0bbde92d3aa947ed86a09cbd4ceb5f67 Author: Alexander Duyck Date: Thu Oct 19 17:07:13 2017 -0400 ixgbe: Fix Tx map failure path This patch is a partial revert of "ixgbe: Don't bother clearing buffer memory for descriptor rings". Specifically I messed up the exception handling path a bit and this resulted in us incorrectly adding the count back in when we didn't need to. In order to make this simpler I am reverting most of the exception handling path change and instead just replacing the bit that was handled by the unmap_and_free call. Fixes: ffed21bcee7a ("ixgbe: Don't bother clearing buffer memory for descriptor rings") Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 104ba83363d1d42af62abb247f1426c09a80fced Author: Jean-Philippe Brucker Date: Thu Oct 19 20:07:36 2017 +0100 igb: Fix TX map failure path When the driver cannot map a TX buffer, instead of rolling back gracefully and retrying later, we currently get a panic: [ 159.885994] igb 0000:00:00.0: TX DMA map failed [ 159.886588] Unable to handle kernel paging request at virtual address ffff00000a08c7a8 ... [ 159.897031] PC is at igb_xmit_frame_ring+0x9c8/0xcb8 Fix the erroneous test that leads to this situation. Signed-off-by: Jean-Philippe Brucker Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5983587c8c5ef00d6886477544ad67d495bc5479 Author: Colin Ian King Date: Fri Sep 22 18:13:48 2017 +0100 e1000: avoid null pointer dereference on invalid stat type Currently if the stat type is invalid then data[i] is being set either by dereferencing a null pointer p, or it is reading from an incorrect previous location if we had a valid stat type previously. Fix this by skipping over the read of p on an invalid stat type. Detected by CoverityScan, CID#113385 ("Explicit null dereferenced") Signed-off-by: Colin Ian King Reviewed-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 44c445c3d1b4eacff23141fa7977c3b2ec3a45c9 Author: Vincenzo Maffione Date: Sat Sep 16 18:00:00 2017 +0200 e1000: fix race condition between e1000_down() and e1000_watchdog This patch fixes a race condition that can result into the interface being up and carrier on, but with transmits disabled in the hardware. The bug may show up by repeatedly IFF_DOWN+IFF_UP the interface, which allows e1000_watchdog() interleave with e1000_down(). CPU x CPU y -------------------------------------------------------------------- e1000_down(): netif_carrier_off() e1000_watchdog(): if (carrier == off) { netif_carrier_on(); enable_hw_transmit(); } disable_hw_transmit(); e1000_watchdog(): /* carrier on, do nothing */ Signed-off-by: Vincenzo Maffione Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5266b8e4445cc836c46689d80a9ff539fa3bfbda Author: Juergen Gross Date: Thu Oct 26 11:50:56 2017 +0200 xen: fix booting ballooned down hvm guest Commit 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain. For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target. Additionally we have to trigger the ballooning process at once. Cc: # 4.13 Fixes: 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don't online new memory initially") Reported-by: Simon Gaiser Suggested-by: Boris Ostrovsky Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/xen-balloon.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 78e0ea6791d7baafb8a0ca82b1bd0c7b3453c919 Author: Girish Moodalbail Date: Wed Oct 25 00:23:04 2017 -0700 tap: double-free in error path in tap_open() Double free of skb_array in tap module is causing kernel panic. When tap_set_queue() fails we free skb_array right away by calling skb_array_cleanup(). However, later on skb_array_cleanup() is called again by tap_sock_destruct through sock_put(). This patch fixes that issue. Fixes: 362899b8725b35e3 (macvtap: switch to use skb array) Signed-off-by: Girish Moodalbail Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 5889e2c0e441d84060e66211ed5c4517ca591167 Author: Yousuk Seung Date: Tue Oct 24 16:44:42 2017 -0700 tcp: call tcp_rate_skb_sent() when retransmit with unaligned skb->data Current implementation calls tcp_rate_skb_sent() when tcp_transmit_skb() is called when it clones skb only. Not calling tcp_rate_skb_sent() is OK for all such code paths except from __tcp_retransmit_skb() which happens when skb->data address is not aligned. This may rarely happen e.g. when small amount of data is sent initially and the receiver partially acks odd number of bytes for some reason, possibly malicious. Signed-off-by: Yousuk Seung Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 06f877d613be3621604c2520ec0351d9fbdca15f Author: Eric Dumazet Date: Tue Oct 24 08:20:31 2017 -0700 tcp/dccp: fix other lockdep splats accessing ireq_opt In my first attempt to fix the lockdep splat, I forgot we could enter inet_csk_route_req() with a freshly allocated request socket, for which refcount has not yet been elevated, due to complex SLAB_TYPESAFE_BY_RCU rules. We either are in rcu_read_lock() section _or_ we own a refcount on the request. Correct RCU verb to use here is rcu_dereference_check(), although it is not possible to prove we actually own a reference on a shared refcount :/ In v2, I added ireq_opt_deref() helper and use in three places, to fix other possible splats. [ 49.844590] lockdep_rcu_suspicious+0xea/0xf3 [ 49.846487] inet_csk_route_req+0x53/0x14d [ 49.848334] tcp_v4_route_req+0xe/0x10 [ 49.850174] tcp_conn_request+0x31c/0x6a0 [ 49.851992] ? __lock_acquire+0x614/0x822 [ 49.854015] tcp_v4_conn_request+0x5a/0x79 [ 49.855957] ? tcp_v4_conn_request+0x5a/0x79 [ 49.858052] tcp_rcv_state_process+0x98/0xdcc [ 49.859990] ? sk_filter_trim_cap+0x2f6/0x307 [ 49.862085] tcp_v4_do_rcv+0xfc/0x145 [ 49.864055] ? tcp_v4_do_rcv+0xfc/0x145 [ 49.866173] tcp_v4_rcv+0x5ab/0xaf9 [ 49.868029] ip_local_deliver_finish+0x1af/0x2e7 [ 49.870064] ip_local_deliver+0x1b2/0x1c5 [ 49.871775] ? inet_del_offload+0x45/0x45 [ 49.873916] ip_rcv_finish+0x3f7/0x471 [ 49.875476] ip_rcv+0x3f1/0x42f [ 49.876991] ? ip_local_deliver_finish+0x2e7/0x2e7 [ 49.878791] __netif_receive_skb_core+0x6d3/0x950 [ 49.880701] ? process_backlog+0x7e/0x216 [ 49.882589] __netif_receive_skb+0x1d/0x5e [ 49.884122] process_backlog+0x10c/0x216 [ 49.885812] net_rx_action+0x147/0x3df Fixes: a6ca7abe53633 ("tcp/dccp: fix lockdep splat in inet_csk_route_req()") Fixes: c92e8c02fe66 ("tcp/dccp: fix ireq->opt races") Signed-off-by: Eric Dumazet Reported-by: kernel test robot Reported-by: Maciej Żenczykowski Signed-off-by: David S. Miller include/net/inet_sock.h | 6 ++++++ net/dccp/ipv4.c | 2 +- net/ipv4/inet_connection_sock.c | 4 ++-- net/ipv4/tcp_ipv4.c | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) commit a0c0865fa0abcbc142c11fabec3a2bffc1a4229d Author: Håkon Bugge Date: Tue Oct 24 16:16:28 2017 +0200 rds: Fix inaccurate accounting of unsignaled wrs The number of unsignaled work-requests posted to the IB send queue is tracked by a counter in the rds_ib_connection struct. When it reaches zero, or the caller explicitly asks for it, the send-signaled bit is set in send_flags and the counter is reset. This is performed by the rds_ib_set_wr_signal_state() function. However, this function is not always used which yields inaccurate accounting. This commit fixes this, re-factors a code bloat related to the matter, and makes the actual parameter type to the function consistent. Signed-off-by: Håkon Bugge Signed-off-by: David S. Miller net/rds/ib_send.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e9a0b99804ff662d02b78a556a84e22308066fe1 Author: Håkon Bugge Date: Tue Oct 24 18:17:18 2017 +0200 rds: ib: Fix uninitialized variable send_flags needs to be initialized before calling rds_ib_set_wr_signal_state(). Signed-off-by: Håkon Bugge Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_send.c | 1 + 1 file changed, 1 insertion(+) commit d2c2490e7eed7f8199feb77caf28573c35aef680 Merge: 239dd4e e1d2d13 Author: David S. Miller Date: Thu Oct 26 17:17:45 2017 +0900 Merge tag 'linux-can-fixes-for-4.14-20171024' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-10-24 here's another pull request for net/master. The patch by Gerhard Bertelsmann fixes the CAN_CTRLMODE_LOOPBACK in the sun4i driver. Two patches by Jimmy Assarsson for the kvaser_usb driver fix a print in the error path of the kvaser_usb_close() and remove a wrong warning message with the Leaf v2 firmware version v4.1.844. ==================== Signed-off-by: David S. Miller commit 239dd4ee4838523419ad16e05b16a2003b71d317 Author: Antoine Tenart Date: Tue Oct 24 11:41:28 2017 +0200 net: mvpp2: do not sleep in set_rx_mode This patch replaces GFP_KERNEL by GFP_ATOMIC to avoid sleeping in the ndo_set_rx_mode() call which is called with BH disabled. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20746d717ea390ac6ac3aa531f27ac156bf2e747 Author: Antoine Tenart Date: Tue Oct 24 11:41:27 2017 +0200 net: mvpp2: fix invalid parameters order when calling the tcam init When calling mvpp2_prs_mac_multi_set() from mvpp2_prs_mac_init(), two parameters (the port index and the table index) are inverted. Fixes this. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef4816f0ee576d4a27ed35cd1090904121391cb9 Author: Antoine Tenart Date: Tue Oct 24 11:41:26 2017 +0200 net: mvpp2: fix typo in the tcam setup This patch fixes a typo in the mvpp2_prs_tcam_data_cmp() function, as the shift value is inverted with the data. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be0f161ef141e4df368aa3f417a1c2ab9c362e75 Author: Huy Nguyen Date: Thu Sep 28 15:33:50 2017 -0500 net/mlx5e: DCBNL, Implement tc with ets type and zero bandwidth Previously, tc with ets type and zero bandwidth is not accepted by driver. This behavior does not follow the IEEE802.1qaz spec. If there are tcs with ets type and zero bandwidth, these tcs are assigned to the lowest priority tc_group #0. We equally distribute 100% bw of the tc_group #0 to these zero bandwidth ets tcs. Also, the non zero bandwidth ets tcs are assigned to tc_group #1. If there is no zero bandwidth ets tc, the non zero bandwidth ets tcs are assigned to tc_group #0. Fixes: cdcf11212b22 ("net/mlx5e: Validate BW weight values of ETS") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 113 +++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/port.c | 21 ++++ include/linux/mlx5/port.h | 2 + 3 files changed, 106 insertions(+), 30 deletions(-) commit 3c37745ec614ff048d5dce38f976804b05d307ee Author: Or Gerlitz Date: Tue Oct 17 12:33:43 2017 +0200 net/mlx5e: Properly deal with encap flows add/del under neigh update Currently, the encap action offload is handled in the actions parse function and not in mlx5e_tc_add_fdb_flow() where we deal with all the other aspects of offloading actions (vlan, modify header) and the rule itself. When the neigh update code (mlx5e_tc_encap_flows_add()) recreates the encap entry and offloads the related flows, we wrongly call again into mlx5e_tc_add_fdb_flow(), this for itself would cause us to handle again the offloading of vlans and header re-write which puts things in non consistent state and step on freed memory (e.g the modify header parse buffer which is already freed). Since on error, mlx5e_tc_add_fdb_flow() detaches and may release the encap entry, it causes a corruption at the neigh update code which goes over the list of flows associated with this encap entry, or double free when the tc flow is later deleted by user-space. When neigh update (mlx5e_tc_encap_flows_del()) unoffloads the flows related to an encap entry which is now invalid, we do a partial repeat of the eswitch flow removal code which is wrong too. To fix things up we do the following: (1) handle the encap action offload in the eswitch flow add function mlx5e_tc_add_fdb_flow() as done for the other actions and the rule itself. (2) modify the neigh update code (mlx5e_tc_encap_flows_add/del) to only deal with the encap entry and rules delete/add and not with any of the other offloaded actions. Fixes: 232c001398ae ('net/mlx5e: Add support to neighbour update flow') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 89 +++++++++++++++---------- 1 file changed, 54 insertions(+), 35 deletions(-) commit 4ca637a20a524cd8ddbca696f12bfa92111c96e3 Author: Huy Nguyen Date: Wed Oct 4 17:58:21 2017 -0500 net/mlx5: Delay events till mlx5 interface's add complete for pci resume mlx5_ib_add is called during mlx5_pci_resume after a pci error. Before mlx5_ib_add completes, there are multiple events which trigger function mlx5_ib_event. This cause kernel panic because mlx5_ib_event accesses unitialized resources. The fix is to extend Erez Shitrit's patch <97834eba7c19> ("net/mlx5: Delay events till ib registration ends") to cover the pci resume code path. Trace: mlx5_core 0001:01:00.6: mlx5_pci_resume was called mlx5_core 0001:01:00.6: firmware version: 16.20.1011 mlx5_core 0001:01:00.6: mlx5_attach_interface:164:(pid 779): mlx5_ib_event:2996:(pid 34777): warning: event on port 1 mlx5_ib_event:2996:(pid 34782): warning: event on port 1 Unable to handle kernel paging request for data at address 0x0001c104 Faulting instruction address: 0xd000000008f411fc Oops: Kernel access of bad area, sig: 11 [#1] ... ... Call Trace: [c000000fff77bb70] [d000000008f4119c] mlx5_ib_event+0x64/0x470 [mlx5_ib] (unreliable) [c000000fff77bc60] [d000000008e67130] mlx5_core_event+0xb8/0x210 [mlx5_core] [c000000fff77bd10] [d000000008e4bd00] mlx5_eq_int+0x528/0x860[mlx5_core] Fixes: 97834eba7c19 ("net/mlx5: Delay events till ib registration ends") Signed-off-by: Huy Nguyen Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/dev.c | 70 ++++++++++++++++----------- 1 file changed, 41 insertions(+), 29 deletions(-) commit 6377ed0bbae6fa28853e1679d068a9106c8a8908 Author: Moshe Shemesh Date: Thu Oct 19 14:14:29 2017 +0300 net/mlx5: Fix health work queue spin lock to IRQ safe spin_lock/unlock of health->wq_lock should be IRQ safe. It was changed to spin_lock_irqsave since adding commit 0179720d6be2 ("net/mlx5: Introduce trigger_health_work function") which uses spin_lock from asynchronous event (IRQ) context. Thus, all spin_lock/unlock of health->wq_lock should have been moved to IRQ safe mode. However, one occurrence on new code using this lock missed that change, resulting in possible deadlock: kernel: Possible unsafe locking scenario: kernel: CPU0 kernel: ---- kernel: lock(&(&health->wq_lock)->rlock); kernel: kernel: lock(&(&health->wq_lock)->rlock); kernel: #012 *** DEADLOCK *** Fixes: 2a0165a034ac ("net/mlx5: Cancel delayed recovery work when unloading the driver") Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4ed590271a65b0fbe3eb1cf828ad5af16603c8ce Merge: 035bcf8 942491c Author: Linus Torvalds Date: Thu Oct 26 08:45:40 2017 +0200 Merge tag 'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "Here's (hopefully) the last bugfix for 4.14: - Rework nowait locking code to reduce locking overhead penalty" * tag 'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix AIM7 regression commit 2b06cdf3e688b98fcc9945873b5d42792bd4eee0 Author: Jonathan Basseri Date: Wed Oct 25 09:52:27 2017 -0700 xfrm: Clear sk_dst_cache when applying per-socket policy. If a socket has a valid dst cache, then xfrm_lookup_route will get skipped. However, the cache is not invalidated when applying policy to a socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are sometimes ignored on those sockets. (Note: This was broken for IPv4 and IPv6 at different times.) This can be demonstrated like so, 1. Create UDP socket. 2. connect() the socket. 3. Apply an outbound XFRM policy to the socket. (setsockopt) 4. send() data on the socket. Packets will continue to be sent in the clear instead of matching an xfrm or returning a no-match error (EAGAIN). This affects calls to send() and not sendto(). Invalidating the sk_dst_cache is necessary to correctly apply xfrm policies. Since we do this in xfrm_user_policy(), the sk_lock was already acquired in either do_ip_setsockopt() or do_ipv6_setsockopt(), and we may call __sk_dst_reset(). Performance impact should be negligible, since this code is only called when changing xfrm policy, and only affects the socket in question. Fixes: 00bc0ef5880d ("ipv6: Skip XFRM lookup if dst_entry in socket cache is valid") Tested: https://android-review.googlesource.com/517555 Tested: https://android-review.googlesource.com/418659 Signed-off-by: Jonathan Basseri Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 1 + 1 file changed, 1 insertion(+) commit 035bcf88d52d922a36931aaaafe4f82bbfa91f14 Merge: ecda3d9 d072543 Author: Linus Torvalds Date: Thu Oct 26 08:11:44 2017 +0200 Merge tag 'hwmon-for-linus-v4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix initial temperature readings for TMP102 - Fix timeouts in DA9052 driver by increasing its sampling rate * tag 'hwmon-for-linus-v4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (tmp102) Fix first temperature reading hwmon: (da9052) Increase sample rate when using TSI commit ecda3d95ec59054358af63657f794492d8e5127d Merge: f341578 f265788 Author: Linus Torvalds Date: Thu Oct 26 08:02:42 2017 +0200 Merge tag 'sound-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just two HD-audio fixups for a recent Realtek codec model. It's pretty safe to apply (and unsurprisingly boring)" * tag 'sound-4.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - fix headset mic problem for Dell machines with alc236 ALSA: hda/realtek - Add support for ALC236/ALC3204 commit 5c25f65fd1e42685f7ccd80e0621829c105785d9 Author: Julien Gomes Date: Wed Oct 25 11:50:50 2017 -0700 tun: allow positive return values on dev_get_valid_name() call If the name argument of dev_get_valid_name() contains "%d", it will try to assign it a unit number in __dev__alloc_name() and return either the unit number (>= 0) or an error code (< 0). Considering positive values as error values prevent tun device creations relying this mechanism, therefor we should only consider negative values as errors here. Signed-off-by: Julien Gomes Acked-by: Cong Wang Signed-off-by: David S. Miller drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d309ae5c6a00648198d1932e6db483d612c2e260 Author: Pieter Jansen van Vuuren Date: Wed Oct 25 11:47:05 2017 -0700 nfp: refuse offloading filters that redirects to upper devices Previously we did not ensure that a netdev is a representative netdev before dereferencing its private data. This can occur when an upper netdev is created on a representative netdev. This patch corrects this by first ensuring that the netdev is a representative netdev before using it. Checking only switchdev_port_same_parent_id is not sufficient to ensure that we can safely use the netdev. Failing to check that the netdev is also a representative netdev would result in incorrect dereferencing. Fixes: 1a1e586f54bf ("nfp: add basic action capabilities to flower offloads") Signed-off-by: Jakub Kicinski Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 2 ++ 1 file changed, 2 insertions(+) commit 0f5da659d8f1810f44de14acf2c80cd6499623a0 Author: Andrei Vagin Date: Wed Oct 25 10:16:42 2017 -0700 net/unix: don't show information about sockets from other namespaces socket_diag shows information only about sockets from a namespace where a diag socket lives. But if we request information about one unix socket, the kernel don't check that its netns is matched with a diag socket namespace, so any user can get information about any unix socket in a system. This looks like a bug. v2: add a Fixes tag Fixes: 51d7cccf0723 ("net: make sock diag per-namespace") Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller net/unix/diag.c | 2 ++ 1 file changed, 2 insertions(+) commit 522dbb354e8b6149d69244b4cf745a3222ddbb05 Merge: 5a28747 7277f75 Author: Dave Airlie Date: Thu Oct 26 10:25:31 2017 +1000 Merge tag 'drm-intel-fixes-2017-10-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm-intel-fixes-2017-10-25: only 1 fix for stable: - fix perf enable/disable ioctls for 32bits (lionel) * tag 'drm-intel-fixes-2017-10-25' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/perf: fix perf enable/disable ioctls with 32bits userspace commit 5a28747b4a74aebadde81044241a704c0c40893a Merge: bb176f6 d3daa2c Author: Dave Airlie Date: Thu Oct 26 05:30:39 2017 +1000 Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes two suspend/resume regression fixes. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: drm/amd/amdgpu: Remove workaround check for UVD6 on APUs drm/amd/powerplay: fix uninitialized variable commit b4d91aeb6e120b7e2f207021c31b914895c69bc4 Author: Michael J. Ruhl Date: Tue Oct 24 08:41:01 2017 -0400 RDMA/netlink: OOPs in rdma_nl_rcv_msg() from misinterpreted flag rdma_nl_rcv_msg() checks to see if it should use the .dump() callback or the .doit() callback. The check is done with this check: if (flags & NLM_F_DUMP) ... The NLM_F_DUMP flag is two bits (NLM_F_ROOT | NLM_F_MATCH). When an RDMA_NL_LS message (response) is received, the bit used for indicating an error is the same bit as NLM_F_ROOT. NLM_F_ROOT == (0x100) == RDMA_NL_LS_F_ERR. ibacm sends a response with the RDMA_NL_LS_F_ERR bit set if an error occurs in the service. The current code then misinterprets the NLM_F_DUMP bit and trys to call the .dump() callback. If the .dump() callback for the specified request is not available (which is true for the RDMA_NL_LS messages) the following Oops occurs: [ 4555.960256] BUG: unable to handle kernel NULL pointer dereference at (null) [ 4555.969046] IP: (null) [ 4555.972664] PGD 10543f1067 P4D 10543f1067 PUD 1033f93067 PMD 0 [ 4555.979287] Oops: 0010 [#1] SMP [ 4555.982809] Modules linked in: rpcrdma ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm dm_mirror dm_region_hash dm_log dm_mod dax sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel crypto_simd glue_helper cryptd hfi1 rdmavt iTCO_wdt iTCO_vendor_support ib_core mei_me lpc_ich pcspkr mei ioatdma sg shpchp i2c_i801 mfd_core wmi ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter acpi_pad nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 sd_mod mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm igb ahci crc32c_intel ptp libahci pps_core drm dca libata i2c_algo_bit i2c_core [ 4556.061190] CPU: 54 PID: 9841 Comm: ibacm Tainted: G I 4.14.0-rc2+ #6 [ 4556.069667] Hardware name: Intel Corporation S2600WT2/S2600WT2, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [ 4556.081339] task: ffff880855f42d00 task.stack: ffffc900246b4000 [ 4556.087967] RIP: 0010: (null) [ 4556.092166] RSP: 0018:ffffc900246b7bc8 EFLAGS: 00010246 [ 4556.098018] RAX: ffffffff81dbe9e0 RBX: ffff881058bb1000 RCX: 0000000000000000 [ 4556.105997] RDX: 0000000000001100 RSI: ffff881058bb1320 RDI: ffff881056362000 [ 4556.113984] RBP: ffffc900246b7bf8 R08: 0000000000000ec0 R09: 0000000000001100 [ 4556.121971] R10: ffff8810573a5000 R11: 0000000000000000 R12: ffff881056362000 [ 4556.129957] R13: 0000000000000ec0 R14: ffff881058bb1320 R15: 0000000000000ec0 [ 4556.137945] FS: 00007fe0ba5a38c0(0000) GS:ffff88105f080000(0000) knlGS:0000000000000000 [ 4556.147000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4556.153433] CR2: 0000000000000000 CR3: 0000001056f5d003 CR4: 00000000001606e0 [ 4556.161419] Call Trace: [ 4556.164167] ? netlink_dump+0x12c/0x290 [ 4556.168468] __netlink_dump_start+0x186/0x1f0 [ 4556.173357] rdma_nl_rcv_msg+0x193/0x1b0 [ib_core] [ 4556.178724] rdma_nl_rcv+0xdc/0x130 [ib_core] [ 4556.183604] netlink_unicast+0x181/0x240 [ 4556.187998] netlink_sendmsg+0x2c2/0x3b0 [ 4556.192392] sock_sendmsg+0x38/0x50 [ 4556.196299] SYSC_sendto+0x102/0x190 [ 4556.200308] ? __audit_syscall_entry+0xaf/0x100 [ 4556.205387] ? syscall_trace_enter+0x1d0/0x2b0 [ 4556.210366] ? __audit_syscall_exit+0x209/0x290 [ 4556.215442] SyS_sendto+0xe/0x10 [ 4556.219060] do_syscall_64+0x67/0x1b0 [ 4556.223165] entry_SYSCALL64_slow_path+0x25/0x25 [ 4556.228328] RIP: 0033:0x7fe0b9db2a63 [ 4556.232333] RSP: 002b:00007ffc55edc260 EFLAGS: 00000293 ORIG_RAX: 000000000000002c [ 4556.240808] RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 00007fe0b9db2a63 [ 4556.248796] RDX: 0000000000000010 RSI: 00007ffc55edc280 RDI: 000000000000000d [ 4556.256782] RBP: 00007ffc55edc670 R08: 00007ffc55edc270 R09: 000000000000000c [ 4556.265321] R10: 0000000000000000 R11: 0000000000000293 R12: 00007ffc55edc280 [ 4556.273846] R13: 000000000260b400 R14: 000000000000000d R15: 0000000000000001 [ 4556.282368] Code: Bad RIP value. [ 4556.286629] RIP: (null) RSP: ffffc900246b7bc8 [ 4556.293013] CR2: 0000000000000000 [ 4556.297292] ---[ end trace 8d67abcfd10ec209 ]--- [ 4556.305465] Kernel panic - not syncing: Fatal exception [ 4556.313786] Kernel Offset: disabled [ 4556.321563] ---[ end Kernel panic - not syncing: Fatal exception [ 4556.328960] ------------[ cut here ]------------ Special case RDMA_NL_LS response messages to call the appropriate callback. Additionally, make sure that the .dump() callback is not NULL before calling it. Fixes: 647c75ac59a48a54 ("RDMA/netlink: Convert LS to doit callback") Reviewed-by: Mike Marciniszyn Reviewed-by: Kaike Wan Reviewed-by: Alex Estrin Signed-off-by: Michael J. Ruhl Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/core/netlink.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit a2d9daad1d2dfbd307ab158044d1c323d7babbde Author: David Disseldorp Date: Fri Oct 20 14:49:38 2017 +0200 SMB: fix validate negotiate info uninitialised memory use An undersize validate negotiate info server response causes the client to use uninitialised memory for struct validate_negotiate_info_rsp comparisons of Dialect, SecurityMode and/or Capabilities members. Link: https://bugzilla.samba.org/show_bug.cgi?id=13092 Fixes: 7db0a6efdc3e ("SMB3: Work around mount failure when using SMB3 dialect to Macs") Signed-off-by: David Disseldorp Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe83bebc05228e838ed5cbbc62712ab50dd40e18 Author: David Disseldorp Date: Fri Oct 20 14:49:37 2017 +0200 SMB: fix leak of validate negotiate info response buffer Fixes: ff1c038addc4 ("Check SMB3 dialects against downgrade attacks") Signed-off-by: David Disseldorp Signed-off-by: Steve French fs/cifs/smb2pdu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit db3b5474f462e77b82ca1e27627f03c47b622c99 Author: Aurélien Aptel Date: Wed Oct 11 13:23:36 2017 +0200 CIFS: Fix NULL pointer deref on SMB2_tcon() failure If SendReceive2() fails rsp is set to NULL but is dereferenced in the error handling code. Cc: stable@vger.kernel.org Signed-off-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48923d2a9d4f6ca909102061a4240b9896ff8ea2 Author: Aurelien Aptel Date: Tue Oct 17 14:47:17 2017 +0200 CIFS: do not send invalid input buffer on QUERY_INFO requests query_info() doesn't use the InputBuffer field of the QUERY_INFO request, therefore according to [MS-SMB2] it must: a) set the InputBufferOffset to 0 b) send a zero-length InputBuffer Doing a) is trivial but b) is a bit more tricky. The packet is allocated according to it's StructureSize, which takes into account an extra 1 byte buffer which we don't need here. StructureSize fields must have constant values no matter the actual length of the whole packet so we can't just edit that constant. Both the NetBIOS-over-TCP message length ("rfc1002 length") L and the iovec length L' have to be updated. Since L' is computed from L we just update L by decrementing it by one. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/smb2pdu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5b454a64555055aaa5769b3ba877bd911d375d5a Author: Benjamin Gilbert Date: Thu Oct 19 13:09:29 2017 -0700 cifs: Select all required crypto modules Some dependencies were lost when CIFS_SMB2 was merged into CIFS. Fixes: 2a38e12053b7 ("[SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred") Signed-off-by: Benjamin Gilbert Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French fs/cifs/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 298d275d4d9bea3524ff4bc76678c140611d8a8d Author: Juergen Gross Date: Wed Oct 25 17:08:07 2017 +0200 xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap() In case gntdev_mmap() succeeds only partially in mapping grant pages it will leave some vital information uninitialized needed later for cleanup. This will lead to an out of bounds array access when unmapping the already mapped pages. So just initialize the data needed for unmapping the pages a little bit earlier. Cc: Reported-by: Arthur Borsboom Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 331c7cb307971eac38e9470340e10c87855bf4bc Author: Ravi Bangoria Date: Tue Oct 24 19:50:06 2017 +0530 perf symbols: Fix memory corruption because of zero length symbols Perf top is often crashing at very random locations on powerpc. After investigating, I found the crash only happens when sample is of zero length symbol. Powerpc kernel has many such symbols which does not contain length details in vmlinux binary and thus start and end addresses of such symbols are same. Structure struct sym_hist { u64 nr_samples; u64 period; struct sym_hist_entry addr[0]; }; has last member 'addr[]' of size zero. 'addr[]' is an array of addresses that belongs to one symbol (function). If function consist of 100 instructions, 'addr' points to an array of 100 'struct sym_hist_entry' elements. For zero length symbol, it points to the *empty* array, i.e. no members in the array and thus offset 0 is also invalid for such array. static int __symbol__inc_addr_samples(...) { ... offset = addr - sym->start; h = annotation__histogram(notes, evidx); h->nr_samples++; h->addr[offset].nr_samples++; h->period += sample->period; h->addr[offset].period += sample->period; ... } Here, when 'addr' is same as 'sym->start', 'offset' becomes 0, which is valid for normal symbols but *invalid* for zero length symbols and thus updating h->addr[offset] causes memory corruption. Fix this by adding one dummy element for zero length symbols. Link: https://lkml.org/lkml/2016/10/10/148 Fixes: edee44be5919 ("perf annotate: Don't throw error for zero length symbols") Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jin Yao Cc: Kim Phillips Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/1508854806-10542-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 26e53d5ebe2e2a5ff7343e820f0ffd69dd503f8e Author: Nicholas Piggin Date: Tue Oct 24 23:06:52 2017 +1000 powerpc/64s/radix: Fix preempt imbalance in TLB flush Fixes: 424de9c6e3f8 ("powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 2 ++ 1 file changed, 2 insertions(+) commit 7277f755048da562eb2489becacd38d0d05e1e06 Author: Lionel Landwerlin Date: Tue Oct 24 16:27:28 2017 +0100 drm/i915/perf: fix perf enable/disable ioctls with 32bits userspace The compat callback was missing and triggered failures in 32bits userspace when enabling/disable the perf stream. We don't require any particular processing here as these ioctls don't take any argument. Signed-off-by: Lionel Landwerlin Fixes: eec688e1420 ("drm/i915: Add i915 perf infrastructure") Cc: linux-stable Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171024152728.4873-1-lionel.g.landwerlin@intel.com (cherry picked from commit 191f896085cf3b5d85920d58a759da4eea141721) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_perf.c | 4 ++++ 1 file changed, 4 insertions(+) commit c6cdd51404b7ac12dd95173ddfc548c59ecf037f Author: Miklos Szeredi Date: Wed Oct 25 16:34:27 2017 +0200 fuse: fix READDIRPLUS skipping an entry Marios Titas running a Haskell program noticed a problem with fuse's readdirplus: when it is interrupted by a signal, it skips one directory entry. The reason is that fuse erronously updates ctx->pos after a failed dir_emit(). The issue originates from the patch adding readdirplus support. Reported-by: Jakob Unterwurzacher Tested-by: Marios Titas Signed-off-by: Miklos Szeredi Fixes: 0b05b18381ee ("fuse: implement NFS-like readdirplus support") Cc: # v3.9 fs/fuse/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3daa2c7865cbfa830651b11c8ad1df23465b46e Author: Tom St Denis Date: Mon Oct 23 11:27:35 2017 -0400 drm/amd/amdgpu: Remove workaround check for UVD6 on APUs On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume. Signed-off-by: Tom St Denis Acked-by: Alex Deucher Reviewed-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 0414c78f14861cb704d6e6888efd53dd36e3bdde Author: Anatole Denis Date: Wed Oct 4 01:17:14 2017 +0100 netfilter: nft_set_hash: disable fast_ops for 2-len keys jhash_1word of a u16 is a different value from jhash of the same u16 with length 2. Since elements are always inserted in sets using jhash over the actual klen, this would lead to incorrect lookups on fixed-size sets with a key length of 2, as they would be inserted with hash value jhash(key, 2) and looked up with hash value jhash_1word(key), which is different. Example reproducer(v4.13+), using anonymous sets which always have a fixed size: table inet t { chain c { type filter hook output priority 0; policy accept; tcp dport { 10001, 10003, 10005, 10007, 10009 } counter packets 4 bytes 240 reject tcp dport 10001 counter packets 4 bytes 240 reject tcp dport 10003 counter packets 4 bytes 240 reject tcp dport 10005 counter packets 4 bytes 240 reject tcp dport 10007 counter packets 0 bytes 0 reject tcp dport 10009 counter packets 4 bytes 240 reject } } then use nc -z localhost to probe; incorrectly hashed ports will pass through the set lookup and increment the counter of an individual rule. jhash being seeded with a random value, it is not deterministic which ports will incorrectly hash, but in testing with 5 ports in the set I always had 4 or 5 with an incorrect hash value. Signed-off-by: Anatole Denis Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 1 - 1 file changed, 1 deletion(-) commit 7555aa766b63f00fea8280883eb7db6834204605 Merge: bb176f6 5a866ec 226584a c0368e4 8b5d729 a2b4a79 Author: Mark Brown Date: Wed Oct 25 14:06:34 2017 +0200 Merge remote-tracking branches 'spi/fix/armada', 'spi/fix/idr', 'spi/fix/qspi', 'spi/fix/stm32' and 'spi/fix/uapi' into spi-linus commit 158f19698b594eb8a1bdf7d7937617abfaa4c4d9 Author: Paul Mackerras Date: Wed Oct 25 18:16:53 2017 +1100 powerpc: Fix check for copy/paste instructions in alignment handler Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch when possible", 2017-06-09) changed the definition of PPC_INST_COPY and in so doing inadvertently broke the check for copy/paste instructions in the alignment fault handler. The check currently matches no instructions. This fixes it by ANDing both sides of the comparison with the mask. Fixes: 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch when possible") Cc: stable@vger.kernel.org # v4.13+ Reported-by: Markus Trippelsdorf Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kernel/align.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b167f11085a34281349f395d200052b61a7e221 Author: Guilherme G. Piccoli Date: Thu Oct 19 17:41:33 2017 -0200 powerpc/perf: Fix IMC allocation routine When setting nr_cpus=1, we observed a crash in IMC code during boot due to a missing allocation: basically, IMC code is taking the number of threads into account in imc_mem_init() and if we manually set nr_cpus for a value that is not multiple of the number of threads per core, an integer division in that function will discard the decimal portion, leading IMC to not allocate one mem_info struct. This causes a NULL pointer dereference later, on is_core_imc_mem_inited(). This patch just rounds that division up, fixing the bug. Signed-off-by: Guilherme G. Piccoli Acked-by: Anju T Sudhakar Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38fb6652229c2149e8694d57db442878fdf8a1bd Author: Ard Biesheuvel Date: Wed Oct 25 11:04:48 2017 +0100 efi/libstub/arm: Don't randomize runtime regions when CONFIG_HIBERNATION=y Commit: e69176d68d26 ("ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region") implemented randomization of the virtual mapping that the OS chooses for the UEFI runtime services. This was motivated by the fact that UEFI usually does not bother to specify any permission restrictions for those regions, making them prime real estate for exploitation now that the OS is getting more and more careful not to leave any R+W+X mapped regions lying around. However, this randomization breaks assumptions in the resume from hibernation code, which expects all memory regions populated by UEFI to remain in the same place, including their virtual mapping into the OS memory space. While this assumption may not be entirely reasonable in the first place, breaking it deliberately does not make a lot of sense either. So let's refrain from this randomization pass if CONFIG_HIBERNATION=y. Signed-off-by: Ard Biesheuvel Cc: James Morse Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20171025100448.26056-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm-stub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 092e72c9edab16d4d6ad10c683a95047d53b6db4 Author: Dan Carpenter Date: Wed Oct 25 11:04:47 2017 +0100 efi/efi_test: Prevent an Oops in efi_runtime_query_capsulecaps() If "qcaps.capsule_count" is ULONG_MAX then "qcaps.capsule_count + 1" will overflow to zero and kcalloc() will return the ZERO_SIZE_PTR. We try to dereference it inside the loop and crash. Signed-off-by: Dan Carpenter Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Acked-by: Ivan Hu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: ff6301dabc3c ("efi: Add efi_test driver for exporting UEFI runtime service interfaces") Link: http://lkml.kernel.org/r/20171025100448.26056-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/test/efi_test.c | 3 +++ 1 file changed, 3 insertions(+) commit cfbb0d90a7abb289edc91833d0905931f8805f12 Author: Johannes Berg Date: Tue Oct 24 21:12:13 2017 +0200 mac80211: don't compare TKIP TX MIC key in reinstall prevention For the reinstall prevention, the code I had added compares the whole key. It turns out though that iwlwifi firmware doesn't provide the TKIP TX MIC key as it's not needed in client mode, and thus the comparison will always return false. For client mode, thus always zero out the TX MIC key part before doing the comparison in order to avoid accepting the reinstall of the key with identical encryption and RX MIC key, but not the same TX MIC key (since the supplicant provides the real one.) Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything") Signed-off-by: Johannes Berg net/mac80211/key.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 6c2838fbdedb9b72a81c931d49e56b229b6cdbca Author: Jeff Layton Date: Thu Oct 19 08:52:58 2017 -0400 ceph: unlock dangling spinlock in try_flush_caps() sparse warns: fs/ceph/caps.c:2042:9: warning: context imbalance in 'try_flush_caps' - wrong count at exit We need to exit this function with the lock unlocked, but a couple of cases leave it locked. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a5e2ec2647737907d267c09dc9a25fab1468865 Author: Martin Schwidefsky Date: Thu Oct 5 08:29:47 2017 +0200 s390/kvm: fix detection of guest machine checks The new detection code for guest machine checks added a check based on %r11 to .Lcleanup_sie to distinguish between normal asynchronous interrupts and machine checks. But the funtion is called from the program check handler as well with an undefined value in %r11. The effect is that all program exceptions pointing to the SIE instruction will set the CIF_MCCK_GUEST bit. The bit stays set for the CPU until the next machine check comes in which will incorrectly be interpreted as a guest machine check. The simplest fix is to stop using .Lcleanup_sie in the program check handler and duplicate a few instructions. Fixes: c929500d7a5a ("s390/nmi: s390: New low level handling for machine check happening in guest") Cc: # v4.13+ Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f34157878d3b17641ad2366988600c23c89d98b2 Merge: ae59df0 528fd35 Author: Linus Torvalds Date: Wed Oct 25 06:46:43 2017 +0200 Merge tag 'nfs-for-4.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: - Fix a list corruption in xprt_release() - Fix a workqueue lockdep warning due to unsafe use of cancel_work_sync() * tag 'nfs-for-4.14-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Destroy transport from the system workqueue SUNRPC: fix a list corruption issue in xprt_release() commit 3eb8feeb1708c7dbfd2e97df92a2a407c116606e Author: Vivien Didelot Date: Tue Oct 24 16:37:19 2017 -0400 net: dsa: check master device before put In the case of pdata, the dsa_cpu_parse function calls dev_put() before making sure it isn't NULL. Fix this. Fixes: 71e0bbde0d88 ("net: dsa: Add support for platform data") Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 829385f08ae99740276cbd46c9db29764c519211 Author: Tom Herbert Date: Fri Oct 20 16:40:43 2017 -0700 strparser: Use delayed work instead of timer for msg timeout Sock lock may be taken in the message timer function which is a problem since timers run in BH. Instead of timers use delayed_work. Reported-by: Eric Dumazet Fixes: bbb03029a899 ("strparser: Generalize strparser") Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/strparser.h | 3 +-- net/strparser/strparser.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 32e67a3a06b88904155170560b7a63d372b320bd Author: Josef Bacik Date: Tue Oct 24 15:57:18 2017 -0400 nbd: handle interrupted sendmsg with a sndtimeo set If you do not set sk_sndtimeo you will get -ERESTARTSYS if there is a pending signal when you enter sendmsg, which we handle properly. However if you set a timeout for your commands we'll set sk_sndtimeo to that timeout, which means that sendmsg will start returning -EINTR instead of -ERESTARTSYS. Fix this by checking either cases and doing the correct thing. Cc: stable@vger.kernel.org Fixes: dc88e34d69d8 ("nbd: set sk->sk_sndtimeo for our sockets") Reported-and-tested-by: Daniel Xu Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 57a95b41869b8f0d1949c24df2a9dac1ca7082ee Author: Kai-Heng Feng Date: Tue Oct 24 11:08:18 2017 -0700 Input: elan_i2c - add ELAN0611 to the ACPI table ELAN0611 touchpad uses elan_i2c as its driver. It can be found on Lenovo ideapad 320-15IKB. So add it to ACPI table to enable the touchpad. [Ido Adiv reports that the same ACPI ID is used for Elan touchpad in ideapad 520]. BugLink: https://bugs.launchpad.net/bugs/1723736 Signed-off-by: Kai-Heng Feng Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+) commit ae59df0349baf44c988b32a3b4dc21363d87df15 Merge: 6cff0a1 cc9085b Author: Linus Torvalds Date: Tue Oct 24 18:51:59 2017 +0200 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "PPC fixes for potential host oops and hangs" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: PPC: Book3S HV: Add more barriers in XIVE load/unload code KVM: PPC: Book3S: Protect kvmppc_gpa_to_ua() with SRCU KVM: PPC: Book3S HV: POWER9 more doorbell fixes KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM commit fa0096e3bad69ed6f34843fd7ae1c45ca987012a Author: Amir Goldstein Date: Tue Oct 24 12:24:11 2017 +0300 ovl: do not cleanup unsupported index entries With index=on, ovl_indexdir_cleanup() tries to cleanup invalid index entries (e.g. bad index name). This behavior could result in cleaning of entries created by newer kernels and is therefore undesirable. Instead, abort mount if such entries are encountered. We still cleanup 'stale' entries and 'orphan' entries, both those cases can be a result of offline changes to lower and upper dirs. When encoutering an index entry of type directory or whiteout, kernel was supposed to fallback to read-only mount, but the fill_super() operation returns EROFS in this case instead of returning success with read-only mount flag, so mount fails when encoutering directory or whiteout index entries. Bless this behavior by returning -EINVAL on directory and whiteout index entries as we do for all unsupported index entries. Fixes: 61b674710cd9 ("ovl: do not cleanup directory and whiteout index..") Cc: # v4.13 Signed-off-by: Amir Goldstein fs/overlayfs/namei.c | 7 +++---- fs/overlayfs/readdir.c | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) commit 7937a56fdf0b064c2ffa33025210f725a4ebc822 Author: Amir Goldstein Date: Fri Oct 20 17:19:06 2017 +0300 ovl: handle ENOENT on index lookup Treat ENOENT from index entry lookup the same way as treating a returned negative dentry. Apparently, either could be returned if file is not found, depending on the underlying file system. Fixes: 359f392ca53e ("ovl: lookup index entry for copy up origin") Cc: # v4.13 Signed-off-by: Amir Goldstein fs/overlayfs/namei.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6eaf011144af10cad34c0d46f82e50d382c8e926 Author: Amir Goldstein Date: Thu Oct 12 19:03:04 2017 +0300 ovl: fix EIO from lookup of non-indexed upper Commit fbaf94ee3cd5 ("ovl: don't set origin on broken lower hardlink") attempt to avoid the condition of non-indexed upper inode with lower hardlink as origin. If this condition is found, lookup returns EIO. The protection of commit mentioned above does not cover the case of lower that is not a hardlink when it is copied up (with either index=off/on) and then lower is hardlinked while overlay is offline. Changes to lower layer while overlayfs is offline should not result in unexpected behavior, so a permanent EIO error after creating a link in lower layer should not be considered as correct behavior. This fix replaces EIO error with success in cases where upper has origin but no index is found, or index is found that does not match upper inode. In those cases, lookup will not fail and the returned overlay inode will be hashed by upper inode instead of by lower origin inode. Fixes: 359f392ca53e ("ovl: lookup index entry for copy up origin") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 20 ++++++++++++++++---- fs/overlayfs/namei.c | 20 ++++++++------------ fs/overlayfs/overlayfs.h | 3 ++- 3 files changed, 26 insertions(+), 17 deletions(-) commit 0cc2b4e5a020fc7f4d1795741c116c983e9467d7 Author: Rafael J. Wysocki Date: Tue Oct 24 15:20:45 2017 +0200 PM / QoS: Fix device resume latency PM QoS 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 Tested-by: Reinette Chatre Signed-off-by: Rafael J. Wysocki Acked-by: Alex Shi Cc: All applicable Documentation/ABI/testing/sysfs-devices-power | 4 +- drivers/base/cpu.c | 3 +- drivers/base/power/domain_governor.c | 53 +++++++++++++++------------ drivers/base/power/qos.c | 2 +- drivers/base/power/runtime.c | 2 +- drivers/base/power/sysfs.c | 25 +++++++++++-- drivers/cpuidle/governors/menu.c | 4 +- include/linux/pm_qos.h | 5 ++- 8 files changed, 63 insertions(+), 35 deletions(-) commit d0725439354a58f2b13b9f5234420641b662b9c4 Author: Guenter Roeck Date: Mon Oct 23 17:36:03 2017 -0700 hwmon: (tmp102) Fix first temperature reading Commit 3d8f7a89a197 ("hwmon: (tmp102) Improve handling of initial read delay") reduced the initial temperature read delay and made it dependent on the chip's shutdown mode. If the chip was not in shutdown mode at probe, the read delay no longer applies. This ignores the fact that the chip initialization changes the temperature sensor resolution, and that the temperature register values change when the resolution is changed. As a result, the reported temperature is twice as high as the real temperature until the first temperature conversion after the configuration change is complete. This can result in unexpected behavior and, worst case, in a system shutdown. To fix the problem, let's just always wait for a conversion to complete before reporting a temperature. Fixes: 3d8f7a89a197 ("hwmon: (tmp102) Improve handling of initial read delay") Link: https://bugzilla.kernel.org/show_bug.cgi?id=197167 Reported-by: Ralf Goebel Cc: Ralf Goebel Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/tmp102.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit f265788c336979090ac80b9ae173aa817c4fe40d Author: Hui Wang Date: Tue Oct 24 16:53:34 2017 +0800 ALSA: hda - fix headset mic problem for Dell machines with alc236 We have several Dell laptops which use the codec alc236, the headset mic can't work on these machines. Following the commit 736f20a70, we add the pin cfg table to make the headset mic work. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ec650b23ecda1e354a9a2961833222552e629ba8 Author: Steffen Klassert Date: Tue Oct 24 10:28:43 2017 +0200 xfrm: Fix xfrm_dst_cache memleak We have a memleak whenever a flow matches a policy without a matching SA. In this case we generate a dummy bundle and take an additional refcount on the dst_entry. This was needed as long as we had the flowcache. The flowcache removal patches deleted all related refcounts but forgot the one for the dummy bundle case. Fix the memleak by removing this refcount. Fixes: 3ca28286ea80 ("xfrm_policy: bypass flow_cache_lookup") Reported-by: Maxime Bizon Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 1 - 1 file changed, 1 deletion(-) commit 2eece390bf68ec8f733d7e4a3ba8a5ea350082ae Author: Alexander Shishkin Date: Mon Oct 23 15:35:33 2017 +0300 perf/x86/intel/bts: Fix exclusive event reference leak Commit: d2878d642a4ed ("perf/x86/intel/bts: Disallow use by unprivileged users on paranoid systems") ... adds a privilege check in the exactly wrong place in the event init path: after the 'LBR exclusive' reference has been taken, and doesn't release it in the case of insufficient privileges. After this, nobody in the system gets to use PT or LBR afterwards. This patch moves the privilege check to where it should have been in the first place. Signed-off-by: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d2878d642a4ed ("perf/x86/intel/bts: Disallow use by unprivileged users on paranoid systems") Link: http://lkml.kernel.org/r/20171023123533.16973-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/bts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 864f5af3a3525f588391cd230cb8129ad758708e Merge: b71d21c 1137b5e Author: David S. Miller Date: Tue Oct 24 20:17:38 2017 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-10-24 1) Fix a memleak when we don't find a inner_mode during bundle creation. From David Miller. 2) Fix a xfrm policy dump crash. We may crash on error when dumping policies via netlink. Fix this by initializing the policy walk with the cb->start method. This fix is a serious stable candidate. From Herbert Xu. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit e1d2d1329a5722dbecc9c278303fcc4aa01f8790 Author: Jimmy Assarsson Date: Tue Oct 24 12:23:29 2017 +0200 can: kvaser_usb: Ignore CMD_FLUSH_QUEUE_REPLY messages To avoid kernel warning "Unhandled message (68)", ignore the CMD_FLUSH_QUEUE_REPLY message for now. As of Leaf v2 firmware version v4.1.844 (2017-02-15), flush tx queue is synchronous. There is a capability bit indicating whether flushing tx queue is synchronous or asynchronous. A proper solution would be to query the device for capabilities. If the synchronous tx flush capability bit is set, we should wait for CMD_FLUSH_QUEUE_REPLY message, while flushing the tx queue. Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8f65a923e6b628e187d5e791cf49393dd5e8c2f9 Author: Jimmy Assarsson Date: Tue Oct 24 12:23:28 2017 +0200 can: kvaser_usb: Correct return value in printout If the return value from kvaser_usb_send_simple_msg() was non-zero, the return value from kvaser_usb_flush_queue() was printed in the kernel warning. Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3a379f5b36ae039dfeb6f73316e47ab1af4945df Author: Gerhard Bertelsmann Date: Thu Aug 17 15:59:49 2017 +0200 can: sun4i: fix loopback mode Fix loopback mode by setting the right flag and remove presume mode. Signed-off-by: Gerhard Bertelsmann Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/sun4i_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b71d21c274eff20a9db8158882b545b141b73ab8 Author: Laszlo Toth Date: Mon Oct 23 19:19:33 2017 +0200 sctp: full support for ipv6 ip_nonlocal_bind & IP_FREEBIND Commit 9b9742022888 ("sctp: support ipv6 nonlocal bind") introduced support for the above options as v4 sctp did, so patched sctp_v6_available(). In the v4 implementation it's enough, because sctp_inet_bind_verify() just returns with sctp_v4_available(). However sctp_inet6_bind_verify() has an extra check before that for link-local scope_id, which won't respect the above options. Added the checks before calling ipv6_chk_addr(), but not before the validation of scope_id. before (w/ both options): ./v6test fe80::10 sctp bind failed, errno: 99 (Cannot assign requested address) ./v6test fe80::10 tcp bind success, errno: 0 (Success) after (w/ both options): ./v6test fe80::10 sctp bind success, errno: 0 (Success) Signed-off-by: Laszlo Toth Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/ipv6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 082297e61480c4d72ed75b31077e74aca0e7c799 Author: Antoine Tenart Date: Mon Oct 23 15:24:31 2017 +0200 net: mvpp2: do not call txq_done from the Tx path when Tx irqs are used When Tx IRQs are used, txq_bufs_free() can be called from both the Tx path and from NAPI poll(). This led to CPU stalls as if these two tasks (Tx and Poll) are scheduled on two CPUs at the same time, DMA unmapping operations are done on the same txq buffers. This patch adds a check not to call txq_done() from the Tx path if Tx interrupts are used as it does not make sense to do so. Fixes: edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer") 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 20920267885218fda08dc12c7d3814938ab15b54 Author: Antoine Tenart Date: Mon Oct 23 15:24:30 2017 +0200 net: mvpp2: do not unmap TSO headers buffers The TSO header buffers are coming from a per cpu pool and should not be unmapped as they are reused. The PPv2 driver was unmapping all descriptors buffers unconditionally. This patch fixes this by checking the buffers dma addresses before unmapping them, and by not unmapping those who are located in the TSO header pool. Fixes: 186cd4d4e414 ("net: mvpp2: software tso support") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 822eaf7cfb7c4783375bceadbc7651137346ac00 Author: Yan Markman Date: Mon Oct 23 15:24:29 2017 +0200 net: mvpp2: fix TSO headers allocation and management TSO headers are managed with txq index and therefore should be aligned with the txq size, not with the aggregated txq size. Fixes: 186cd4d4e414 ("net: mvpp2: software tso support") Reported-by: Marc Zyngier Signed-off-by: Yan Markman 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 1cce91dfc8f7990ca3aea896bfb148f240b12860 Author: Arnd Bergmann Date: Fri Oct 20 21:17:05 2017 +0100 ARM: 8715/1: add a private asm/unaligned.h The asm-generic/unaligned.h header provides two different implementations for accessing unaligned variables: the access_ok.h version used when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set pretends that all pointers are in fact aligned, while the le_struct.h version convinces gcc that the alignment of a pointer is '1', to make it issue the correct load/store instructions depending on the architecture flags. On ARMv5 and older, we always use the second version, to let the compiler use byte accesses. On ARMv6 and newer, we currently use the access_ok.h version, so the compiler can use any instruction including stm/ldm and ldrd/strd that will cause an alignment trap. This trap can significantly impact performance when we have to do a lot of fixups and, worse, has led to crashes in the LZ4 decompressor code that does not have a trap handler. This adds an ARM specific version of asm/unaligned.h that uses the le_struct.h/be_struct.h implementation unconditionally. This should lead to essentially the same code on ARMv6+ as before, with the exception of using regular load/store instructions instead of the trapping instructions multi-register variants. The crash in the LZ4 decompressor code was probably introduced by the patch replacing the LZ4 implementation, commit 4e1a33b105dd ("lib: update LZ4 compressor module"), so linux-4.11 and higher would be affected most. However, we probably want to have this backported to all older stable kernels as well, to help with the performance issues. There are two follow-ups that I think we should also work on, but not backport to stable kernels, first to change the asm-generic version of the header to remove the ARM special case, and second to review all other uses of CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to see if they might be affected by the same problem on ARM. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/include/asm/Kbuild | 1 - arch/arm/include/asm/unaligned.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit 07f37efdaa3fa327ecbfd519110bc6bd0c2582cc Author: Aleksander Morgado Date: Mon Oct 23 17:16:41 2017 +0200 cdc_ether: flag the Huawei ME906/ME909 as WWAN The Huawei ME906 (12d1:15c1) comes with a standard ECM interface that requires management via AT commands sent over one of the control TTYs (e.g. connected with AT^NDISDUP). Signed-off-by: Aleksander Morgado Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d11b06638f6aa30d099090e6b8a540c558295ac Author: Ran Wang Date: Mon Oct 23 18:10:23 2017 +0800 drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet This product is named 'TP-LINK USB 3.0 Gigabit Ethernet Network Adapter (Model No.is UE300)'. It uses chip RTL8153 and works with driver drivers/net/usb/r8152.c Signed-off-by: Ran Wang Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 8 ++++++++ drivers/net/usb/r8152.c | 2 ++ 2 files changed, 10 insertions(+) commit db9d79f6e7de3e059d897234f93cbe1e55a0ed50 Author: Masahiro Yamada Date: Fri Oct 13 21:54:46 2017 +0900 clk: uniphier: fix clock data for PXs3 Fix reg offsets of USB clocks. Fixes: 736de651a836 ("clk: uniphier: add PXs3 clock data") Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 942491c9e6d631c012f3c4ea8e7777b0b02edeab Author: Christoph Hellwig Date: Mon Oct 23 18:31:50 2017 -0700 xfs: fix AIM7 regression Apparently our current rwsem code doesn't like doing the trylock, then lock for real scheme. So change our read/write methods to just do the trylock for the RWF_NOWAIT case. This fixes a ~25% regression in AIM7. Fixes: 91f9943e ("fs: support RWF_NOWAIT for buffered reads") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit bb3f38c3c5b759163e09b9152629cc789731de47 Author: David Lin Date: Fri Oct 20 14:09:13 2017 -0700 kbuild: clang: fix build failures with sparse check We should avoid using the space character when passing arguments to clang, because static code analysis check tool such as sparse may misinterpret the arguments followed by spaces as build targets hence cause the build to fail. Signed-off-by: David Lin Signed-off-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d87e47e13a9b347801be08da81f16ae65f1eda0f Author: Cao jin Date: Thu Oct 19 11:17:05 2017 +0800 kbuild doc: a bundle of fixes on makefiles.txt It does several fixes: 1. move the displaced ld example to its reasonable place. 2. add new example for command gzip. 3. fix 2 number errors. 4. fix format of chapter 7.x, make it looks the same as other chapters. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 6cff0a118f23b98c604a3604ea9de11338e24fbe Merge: 06987da 6687aeb Author: Linus Torvalds Date: Mon Oct 23 13:43:30 2017 -0400 Merge tag 'platform-drivers-x86-v4.14-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Use a spin_lock instead of mutex in atomic context. The devm_ fix is a dependency. Summary: intel_pmc_ipc: - Use spin_lock to protect GCR updates - Use devm_* calls in driver probe function" * tag 'platform-drivers-x86-v4.14-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updates platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe function commit 6687aeb9cd3d40904d1f9e884d2145603c23adfa 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 83beee5c88a6c71ded70e2eef5ca7406a02605cc 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 8e0f1168f80acf6de4bcf68482e5e10d363d653c Author: Martin K. Petersen Date: Mon Oct 23 09:03:20 2017 -0400 Documentation: Add my name to kernel enforcement statement The kernel enforcement statement commit had my Acked-by: but missed my name in the document signatures. Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 06987dad0a563e406e7841df0f8759368523714f Merge: 2f1b11c 692b482 Author: Linus Torvalds Date: Mon Oct 23 11:24:52 2017 -0400 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "This is a fix for an old bug in workqueue. Workqueue used a mutex to arbitrate who gets to be the manager of a pool. When the manager role gets released, the mutex gets unlocked while holding the pool's irqsafe spinlock. This can lead to deadlocks as mutex's internal spinlock isn't irqsafe. This got discovered by recent fixes to mutex lockdep annotations. The fix is a bit invasive for rc6 but if anything were wrong with the fix it would likely have already blown up in -next, and we want the fix in -stable anyway" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: replace pool->manager_arb mutex with a flag commit 2f1b11c575acb2fc9e63b8ce11e4a3f6069ba6f6 Merge: 468b0e0 5986170 Author: Linus Torvalds Date: Mon Oct 23 10:36:04 2017 -0400 Merge tag 'pinctrl-v4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two last minute fixes for pin controllers, both regressions in specific drivers: - Fix a touchpad pin control issue on the AMD affecting Asus laptops - Fix an interrupt handling regression on the MCP23s08" * tag 'pinctrl-v4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: mcp23s08: fix interrupt handling regression pinctrl/amd: fix masking of GPIO interrupts commit 468b0e0cf84ebb73a4e59beecec975207dd31f92 Merge: bb176f6 2ab19d5 Author: Linus Torvalds Date: Mon Oct 23 10:32:59 2017 -0400 Merge tag 'regulator-fix-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small driver specific bug fixes that have been collected since the merge window" * tag 'regulator-fix-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: rn5t618: Do not index regulator_desc arrays by id regulator: axp20x: Fix poly-phase bit offset for AXP803 DCDC5/6 commit 7db814465395f3196ee98c8bd40d214d63e4f708 Author: Sagi Grimberg Date: Mon Oct 23 16:04:11 2017 +0300 nvme-rdma: fix possible hang when issuing commands during ctrl removal nvme_rdma_queue_is_ready() fails requests in case a queue is not LIVE. If the controller is in RECONNECTING state, we might be in this state for a long time (until we successfully reconnect) and we are better off with failing the request fast. Otherwise, we fail with BLK_STS_RESOURCE to have the block layer try again soon. In case we are removing the controller when the admin queue is not LIVE, we will terminate the request with BLK_STS_RESOURCE but it happens before we call blk_mq_start_request() so the request timeout never expires, and the queue will never get back to LIVE (because we are removing the controller). This causes the removal operation to block infinitly [1]. Thus, if we are removing (state DELETING), and the queue is not LIVE, we need to fail the request permanently as there is no chance for it to ever complete successfully. [1] -- sysrq: SysRq : Show Blocked State task PC stack pid father kworker/u66:2 D 0 440 2 0x80000000 Workqueue: nvme-wq nvme_rdma_del_ctrl_work [nvme_rdma] Call Trace: __schedule+0x3e9/0xb00 schedule+0x40/0x90 schedule_timeout+0x221/0x580 io_schedule_timeout+0x1e/0x50 wait_for_completion_io_timeout+0x118/0x180 blk_execute_rq+0x86/0xc0 __nvme_submit_sync_cmd+0x89/0xf0 nvmf_reg_write32+0x4b/0x90 [nvme_fabrics] nvme_shutdown_ctrl+0x41/0xe0 nvme_rdma_shutdown_ctrl+0xca/0xd0 [nvme_rdma] nvme_rdma_remove_ctrl+0x2b/0x40 [nvme_rdma] nvme_rdma_del_ctrl_work+0x25/0x30 [nvme_rdma] process_one_work+0x1fd/0x630 worker_thread+0x1db/0x3b0 kthread+0x11e/0x150 ret_from_fork+0x27/0x40 01 D 0 2868 2862 0x00000000 Call Trace: __schedule+0x3e9/0xb00 schedule+0x40/0x90 schedule_timeout+0x260/0x580 wait_for_completion+0x108/0x170 flush_work+0x1e0/0x270 nvme_rdma_del_ctrl+0x5a/0x80 [nvme_rdma] nvme_sysfs_delete+0x2a/0x40 dev_attr_store+0x18/0x30 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x124/0x1c0 __vfs_write+0x28/0x150 vfs_write+0xc7/0x1b0 SyS_write+0x49/0xa0 entry_SYSCALL_64_fastpath+0x18/0xad -- Reported-by: Bart Van Assche Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 88796e7e5c457cae72833196cb98e6895dd107e2 Author: Davidlohr Bueso Date: Fri Oct 20 10:13:46 2017 -0700 sched/swait: Document it clearly that the swait facilities are special and shouldn't be used We currently welcome using swait over wait whenever possible because it is a slimmer data structure. However, Linus has made it very clear that he does not want this used, unless under very specific RT scenarios (such as current users). Update the comments before kernel hipsters start thinking swait is the cool thing to do. Signed-off-by: Davidlohr Bueso Acked-by: Luis R. Rodriguez Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: wagi@monom.org Link: http://lkml.kernel.org/r/20171020171346.24445-1-dave@stgolabs.net Signed-off-by: Ingo Molnar include/linux/swait.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 58c3862b521ead4f69a24ef009a679cb3c519620 Author: Josh Poimboeuf Date: Fri Oct 20 11:21:34 2017 -0500 x86/unwind: Show function name+offset in ORC error messages Improve the warning messages to show the relevant function name+offset. This makes it much easier to diagnose problems with the ORC metadata. Before: WARNING: can't dereference iret registers at ffff8801c5f17fe0 for ip ffffffff95f0d94b After: WARNING: can't dereference iret registers at ffff880178f5ffe0 for ip int3+0x5b/0x60 Reported-by: Andrei Vagin Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder") Link: http://lkml.kernel.org/r/6bada6b9eac86017e16bd79e1e77877935cb50bb.1508516398.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_orc.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 98990a33b77dda9babf91cb235654f6729e5702e Author: Josh Poimboeuf Date: Fri Oct 20 11:21:33 2017 -0500 x86/entry: Fix idtentry unwind hint This fixes the following ORC warning in the 'int3' entry code: WARNING: can't dereference iret registers at ffff8801c5f17fe0 for ip ffffffff95f0d94b The ORC metadata had the wrong stack offset for the iret registers. Their location on the stack is dependent on whether the exception has an error code. Reported-and-tested-by: Andrei Vagin Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 8c1f75587a18 ("x86/entry/64: Add unwind hint annotations") Link: http://lkml.kernel.org/r/931d57f0551ed7979d5e7e05370d445c8e5137f8.1508516398.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb176f67090ca54869fc1262c913aa69d2ede070 Author: Linus Torvalds Date: Mon Oct 23 06:49:47 2017 -0400 Linux 4.14-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd9d064e34a1b1c96d631cca73e2a6efc5834f4a Merge: 17e7637 c97d96b Author: Linus Torvalds Date: Mon Oct 23 06:37:16 2017 -0400 Merge tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are a small number of patches to resolve some reported IIO and a staging driver problem. Nothing major here, full details are in the shortlog below. All have been in linux-next with no reported issues" * tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: bcm2835-audio: Fix memory corruption iio: adc: at91-sama5d2_adc: fix probe error on missing trigger property iio: adc: dln2-adc: fix build error iio: dummy: events: Add missing break staging: iio: ade7759: fix signed extension bug on shift of a u8 iio: pressure: zpa2326: Remove always-true check which confuses gcc iio: proximity: as3935: noise detection + threshold changes commit 17e7637f5947284cd7f41c1b26ff8cbee9a794a4 Merge: 5805992 ae65c85 Author: Linus Torvalds Date: Mon Oct 23 06:35:01 2017 -0400 Merge tag 'char-misc-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are four small fixes for 4.14-rc6. Three of them are binder driver fixes for reported issues, and the last one is a hyperv driver bugfix. Nothing major, but good fixes to get into 4.14-final. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: android: binder: Fix null ptr dereference in debug msg android: binder: Don't get mm from task vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister() binder: call poll_wait() unconditionally. commit 5805992184f97b7797f24b74d511825f8992861e Merge: 02982f8 1ac7db6 Author: Linus Torvalds Date: Mon Oct 23 06:33:05 2017 -0400 Merge tag 'usb-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are a small number of USB and PHY driver fixes for 4.14-rc6 There is the usual musb and xhci fixes in here, as well as some needed phy patches. Also is a nasty regression fix for usbfs that has started to hit a lot of people using virtual machines. All of these have been in linux-next with no reported problems" * tag 'usb-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) usb: hub: Allow reset retry for USB2 devices on connect bounce USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor() MAINTAINERS: fix git tree url for musb module usb: quirks: add quirk for WORLDE MINI MIDI keyboard usb: musb: sunxi: Explicitly release USB PHY on exit usb: musb: Check for host-mode using is_host_active() on reset interrupt usb: musb: musb_cppi41: Configure the number of channels for DA8xx usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers USB: musb: fix late external abort on suspend USB: musb: fix session-bit runtime-PM quirk usb: cdc_acm: Add quirk for Elatec TWN3 USB: devio: Revert "USB: devio: Don't corrupt user memory" usb: xhci: Handle error condition in xhci_stop_device() usb: xhci: Reset halted endpoint if trb is noop xhci: Cleanup current_cmd in xhci_cleanup_command_queue() xhci: Identify USB 3.1 capable hosts by their port protocol capability USB: serial: metro-usb: add MS7820 device id phy: rockchip-typec: Check for errors from tcphy_phy_init() phy: rockchip-typec: Don't set the aux voltage swing to 400 mV ... commit 2ab19d521ebe900f42be1d41333a8e66974dcc7e Merge: 33d930e 986e7b7 d824c7a Author: Mark Brown Date: Mon Oct 23 11:46:30 2017 +0200 Merge remote-tracking branches 'regulator/fix/axp20x' and 'regulator/fix/rn5t618' into regulator-linus commit 8fe8ffb12c81b36877984274db184953c337db73 Author: Bart Van Assche Date: Fri Oct 20 11:46:45 2017 -0700 scsi: Suppress a kernel warning in case the prep function returns BLKPREP_DEFER The legacy block layer handles requests as follows: - If the prep function returns BLKPREP_OK, let blk_peek_request() return the pointer to that request. - If the prep function returns BLKPREP_DEFER, keep the RQF_STARTED flag and retry calling the prep function later. - If the prep function returns BLKPREP_KILL or BLKPREP_INVALID, end the request. In none of these cases it is correct to clear the SCMD_INITIALIZED flag from inside scsi_prep_fn(). Since scsi_prep_fn() already guarantees that scsi_init_command() will be called once even if scsi_prep_fn() is called multiple times, remove the code that clears SCMD_INITIALIZED from scsi_prep_fn(). The scsi-mq code handles requests as follows: - If scsi_mq_prep_fn() returns BLKPREP_OK, set the RQF_DONTPREP flag and submit the request to the SCSI LLD. - If scsi_mq_prep_fn() returns BLKPREP_DEFER, call blk_mq_delay_run_hw_queue() and return BLK_STS_RESOURCE. - If the prep function returns BLKPREP_KILL or BLKPREP_INVALID, call scsi_mq_uninit_cmd() and let the blk-mq core end the request. In none of these cases scsi_mq_prep_fn() should clear the SCMD_INITIALIZED flag. Hence remove the code from scsi_mq_prep_fn() function that clears that flag. This patch avoids that the following warning is triggered when using the legacy block layer: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 4198 at drivers/scsi/scsi_lib.c:654 scsi_end_request+0x1de/0x220 CPU: 1 PID: 4198 Comm: mkfs.f2fs Not tainted 4.14.0-rc5+ #1 task: ffff91c147a4b800 task.stack: ffffb282c37b8000 RIP: 0010:scsi_end_request+0x1de/0x220 Call Trace: scsi_io_completion+0x204/0x5e0 scsi_finish_command+0xce/0xe0 scsi_softirq_done+0x126/0x130 blk_done_softirq+0x6e/0x80 __do_softirq+0xcf/0x2a8 irq_exit+0xab/0xb0 do_IRQ+0x7b/0xc0 common_interrupt+0x90/0x90 RIP: 0010:_raw_spin_unlock_irqrestore+0x9/0x10 __test_set_page_writeback+0xc7/0x2c0 __block_write_full_page+0x158/0x3b0 block_write_full_page+0xc4/0xd0 blkdev_writepage+0x13/0x20 __writepage+0x12/0x40 write_cache_pages+0x204/0x500 generic_writepages+0x48/0x70 blkdev_writepages+0x9/0x10 do_writepages+0x34/0xc0 __filemap_fdatawrite_range+0x6c/0x90 file_write_and_wait_range+0x31/0x90 blkdev_fsync+0x16/0x40 vfs_fsync_range+0x44/0xa0 do_fsync+0x38/0x60 SyS_fsync+0xb/0x10 entry_SYSCALL_64_fastpath+0x13/0x94 ---[ end trace 86e8ef85a4a6c1d1 ]--- Fixes: commit 64104f703212 ("scsi: Call scsi_initialize_rq() for filesystem requests") Signed-off-by: Bart Van Assche Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 1137b5e2529a8f5ca8ee709288ecba3e68044df2 Author: Herbert Xu Date: Thu Oct 19 20:51:10 2017 +0800 ipsec: Fix aborted xfrm policy dump crash An independent security researcher, Mohamed Ghannam, has reported this vulnerability to Beyond Security's SecuriTeam Secure Disclosure program. The xfrm_dump_policy_done function expects xfrm_dump_policy to have been called at least once or it will crash. This can be triggered if a dump fails because the target socket's receive buffer is full. This patch fixes it by using the cb->start mechanism to ensure that the initialisation is always done regardless of the buffer situation. Fixes: 12a169e7d8f4 ("ipsec: Put dumpers on the dump list") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit a6ca7abe53633d08eea1c6756cb49c9b2d4c90bf Author: Eric Dumazet Date: Sun Oct 22 12:33:57 2017 -0700 tcp/dccp: fix lockdep splat in inet_csk_route_req() This patch fixes the following lockdep splat in inet_csk_route_req() lockdep_rcu_suspicious inet_csk_route_req tcp_v4_send_synack tcp_rtx_synack inet_rtx_syn_ack tcp_fastopen_synack_time tcp_retransmit_timer tcp_write_timer_handler tcp_write_timer call_timer_fn Thread running inet_csk_route_req() owns a reference on the request socket, so we have the guarantee ireq->ireq_opt wont be changed or freed. lockdep can enforce this invariant for us. Fixes: c92e8c02fe66 ("tcp/dccp: fix ireq->opt races") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3a91d29f20276fa7cd4d0c9c7f3e78b30708159d Author: Koichiro Den Date: Sun Oct 22 13:13:16 2017 +0900 tcp: do tcp_mstamp_refresh before retransmits on TSQ handler When retransmission on TSQ handler was introduced in the commit f9616c35a0d7 ("tcp: implement TSQ for retransmits"), the retransmitted skbs' timestamps were updated on the actual transmission. In the later commit 385e20706fac ("tcp: use tp->tcp_mstamp in output path"), it stops being done so. In the commit, the comment says "We try to refresh tp->tcp_mstamp only when necessary", and at present tcp_tsq_handler and tcp_v4_mtu_reduced applies to this. About the latter, it's okay since it's rare enough. About the former, even though possible retransmissions on the tasklet comes just after the destructor run in NET_RX softirq handling, the time between them could be nonnegligibly large to the extent that tcp_rack_advance or rto rearming be affected if other (remaining) RX, BLOCK and (preceding) TASKLET sofirq handlings are unexpectedly heavy. So in the same way as tcp_write_timer_handler does, doing tcp_mstamp_refresh ensures the accuracy of algorithms relying on it. Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") Signed-off-by: Koichiro Den Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02982f8550b3f2d908848f417ba802193dee5f4a Merge: 936fd00 09c3e01 Author: Linus Torvalds Date: Sun Oct 22 16:19:12 2017 -0400 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: "A fix for a broken commit in the previous pull breaking automatic module loading of input handlers, such ad evdev" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: do not use property bits when generating module alias commit 09c3e01b255fe89eb1f1b7ded68b1b7d55e6d02b Author: Dmitry Torokhov Date: Sun Oct 22 11:42:29 2017 -0700 Input: do not use property bits when generating module alias The commit 8724ecb07229 ("Input: allow matching device IDs on property bits") started using property bits when generating module aliases for input handlers, but did not adjust the generation of MODALIAS attribute on input device uevents, breaking automatic module loading. Given that no handler currently uses property bits in their module tables, let's revert this part of the commit for now. Reported-by: Damien Wyart Tested-by: Damien Wyart Fixes: 8724ecb07229 ("Input: allow matching device IDs on property bits") Signed-off-by: Dmitry Torokhov scripts/mod/devicetable-offsets.c | 1 - scripts/mod/file2alias.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) commit bfc1168de949cd3e9ca18c3480b5085deff1ea7c Author: Borislav Petkov Date: Sun Oct 22 12:47:31 2017 +0200 x86/cpu/AMD: Apply the Erratum 688 fix when the BIOS doesn't Some F14h machines have an erratum which, "under a highly specific and detailed set of internal timing conditions" can lead to skipping instructions and RIP corruption. Add the fix for those machines when their BIOS doesn't apply it or there simply isn't BIOS update for them. Tested-by: Signed-off-by: Borislav Petkov Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sherry Hurwitz Cc: Thomas Gleixner Cc: Yazen Ghannam Link: http://lkml.kernel.org/r/20171022104731.28249-1-bp@alien8.de Link: https://bugzilla.kernel.org/show_bug.cgi?id=197285 [ Added pr_info() that we activated the workaround. ] Signed-off-by: Ingo Molnar arch/x86/kernel/amd_nb.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 936fd00549d26a19be723cf7cc1c0b1aa50f9fde Merge: 9e415a8 ce56a86 Author: Linus Torvalds Date: Sun Oct 22 06:58:23 2017 -0400 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 couple of fixes addressing the following issues: - The last polishing for the TLB code, removing the last BUG_ON() and the debug file along with tidying up the lazy TLB code. - Prevent triple fault on 1st Gen. 486 caused by stupidly calling the early IDT setup after the first function which causes a fault which should be caught by the exception table. - Limit the mmap of /dev/mem to valid addresses - Prevent late microcode loading on Broadwell X - Remove a redundant assignment in the cache info code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Limit mmap() of /dev/mem to valid physical addresses x86/mm: Remove debug/x86/tlb_defer_switch_to_init_mm x86/mm: Tidy up "x86/mm: Flush more aggressively in lazy TLB mode" x86/mm/64: Remove the last VM_BUG_ON() from the TLB code x86/microcode/intel: Disable late loading on model 79 x86/idt: Initialize early IDT before cr4_init_shadow() x86/cpu/intel_cacheinfo: Remove redundant assignment to 'this_leaf' commit 9e415a8edce53fb0fed28e15bc06522d122e872e Merge: 5670a84 eb39a7c Author: Linus Torvalds Date: Sun Oct 22 06:56:25 2017 -0400 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 to make the cs5535 clock event driver robust agaist spurious interrupts" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clockevents/drivers/cs5535: Improve resilience to spurious interrupts commit 5670a8471e27ff400e9446b5bab6c296c8d8a733 Merge: 085cf9b 1f7c70d Author: Linus Torvalds Date: Sun Oct 22 06:54:42 2017 -0400 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp/hotplug fix from Thomas Gleixner: "The recent rework of the callback invocation missed to cleanup the leftovers of the operation, so under certain circumstances a subsequent CPU hotplug operation accesses stale data and crashes. Clean it up." * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Reset node state after operation commit 085cf9bfc92a20a7297468f01e868cf2a4f6f4c3 Merge: 4f184d7 275d34b Author: Linus Torvalds Date: Sun Oct 22 06:52:53 2017 -0400 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A series of fixes for perf tooling: - Make xyarray return the X/Y size correctly which fixes a crash in the exit code. - Fix the libc path in test so it works not only on Debian/Ubuntu correctly - Check for eBPF file existance and output a useful error message instead of failing to compile a non existant file - Make sure perf_hpp_fmt is not longer references before freeing it - Use list_del_init() in the histogram code to prevent a crash when the already deleted element is deleted again - Remove the leftovers of the removed '-l' option - Add reviewer entries to the MAINTAINERS file" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu perf xyarray: Fix wrong processing when closing evsel fd perf buildid-list: Fix crash when processing PERF_RECORD_NAMESPACE perf record: Fix documentation for a inexistent option '-l' perf tools: Add long time reviewers to MAINTAINERS perf tools: Check wether the eBPF file exists in event parsing perf hists: Add extra integrity checks to fmt_free() perf hists: Fix crash in perf_hpp__reset_output_field() commit 4f184d7d8492fd5255062b30a6f74fc68f10e55a Merge: b8d389e 3d51969 Author: Linus Torvalds Date: Sun Oct 22 06:42:58 2017 -0400 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 set of small fixes mostly in the irq drivers area: - Make the tango irq chip work correctly, which requires a new function in the generiq irq chip implementation - A set of updates to the GIC-V3 ITS driver removing a bogus BUG_ON() and parsing the VCPU table size correctly" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: generic chip: remove irq_gc_mask_disable_reg_and_ack() irqchip/tango: Use irq_gc_mask_disable_and_ack_set genirq: generic chip: Add irq_gc_mask_disable_and_ack_set() irqchip/gic-v3-its: Add missing changes to support 52bit physical address irqchip/gic-v3-its: Fix the incorrect parsing of VCPU table size irqchip/gic-v3-its: Fix the incorrect BUG_ON in its_init_vpe_domain() DT: arm,gic-v3: Update the ITS size in the examples commit b8d389e8f30eaed04dcd56bb9007e49df7d37c2e Merge: b5ac3be b703798 Author: Linus Torvalds Date: Sun Oct 22 06:39:58 2017 -0400 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Thomas Gleixner: "Plug a memory leak in the instruction decoder" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix memory leak in decode_instructions() commit b5ac3beb5a9f0ef0ea64cd85faf94c0dc4de0e42 Merge: e5f468b 8d5f4b0 Author: Linus Torvalds Date: Sat Oct 21 22:44:48 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "A little more than usual this time around. Been travelling, so that is part of it. Anyways, here are the highlights: 1) Deal with memcontrol races wrt. listener dismantle, from Eric Dumazet. 2) Handle page allocation failures properly in nfp driver, from Jaku Kicinski. 3) Fix memory leaks in macsec, from Sabrina Dubroca. 4) Fix crashes in pppol2tp_session_ioctl(), from Guillaume Nault. 5) Several fixes in bnxt_en driver, including preventing potential NVRAM parameter corruption from Michael Chan. 6) Fix for KRACK attacks in wireless, from Johannes Berg. 7) rtnetlink event generation fixes from Xin Long. 8) Deadlock in mlxsw driver, from Ido Schimmel. 9) Disallow arithmetic operations on context pointers in bpf, from Jakub Kicinski. 10) Missing sock_owned_by_user() check in sctp_icmp_redirect(), from Xin Long. 11) Only TCP is supported for sockmap, make that explicit with a check, from John Fastabend. 12) Fix IP options state races in DCCP and TCP, from Eric Dumazet. 13) Fix panic in packet_getsockopt(), also from Eric Dumazet. 14) Add missing locked in hv_sock layer, from Dexuan Cui. 15) Various aquantia bug fixes, including several statistics handling cures. From Igor Russkikh et al. 16) Fix arithmetic overflow in devmap code, from John Fastabend. 17) Fix busted socket memory accounting when we get a fault in the tcp zero copy paths. From Willem de Bruijn. 18) Don't leave opt->tot_len uninitialized in ipv6, from Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (106 commits) stmmac: Don't access tx_q->dirty_tx before netif_tx_lock ipv6: flowlabel: do not leave opt->tot_len with garbage of_mdio: Fix broken PHY IRQ in case of probe deferral textsearch: fix typos in library helpers rxrpc: Don't release call mutex on error pointer net: stmmac: Prevent infinite loop in get_rx_timestamp_status() net: stmmac: Fix stmmac_get_rx_hwtstamp() net: stmmac: Add missing call to dev_kfree_skb() mlxsw: spectrum_router: Configure TIGCR on init mlxsw: reg: Add Tunneling IPinIP General Configuration Register net: ethtool: remove error check for legacy setting transceiver type soreuseport: fix initialization race net: bridge: fix returning of vlan range op errors sock: correct sk_wmem_queued accounting on efault in tcp zerocopy bpf: add test cases to bpf selftests to cover all access tests bpf: fix pattern matches for direct packet access bpf: fix off by one for range markings with L{T, E} patterns bpf: devmap fix arithmetic overflow in bitmap_size calculation net: aquantia: Bad udp rate on default interrupt coalescing net: aquantia: Enable coalescing management via ethtool interface ... commit 8d5f4b07174976c55a5f5d6967777373c6826944 Author: Bernd Edlinger Date: Sat Oct 21 06:51:30 2017 +0000 stmmac: Don't access tx_q->dirty_tx before netif_tx_lock This is the possible reason for different hard to reproduce problems on my ARMv7-SMP test system. The symptoms are in recent kernels imprecise external aborts, and in older kernels various kinds of network stalls and unexpected page allocation failures. My testing indicates that the trouble started between v4.5 and v4.6 and prevails up to v4.14. Using the dirty_tx before acquiring the spin lock is clearly wrong and was first introduced with v4.6. Fixes: e3ad57c96715 ("stmmac: review RX/TX ring management") Signed-off-by: Bernd Edlinger Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 864e2a1f8aac05effac6063ce316b480facb46ff Author: Eric Dumazet Date: Sat Oct 21 12:26:23 2017 -0700 ipv6: flowlabel: do not leave opt->tot_len with garbage When syzkaller team brought us a C repro for the crash [1] that had been reported many times in the past, I finally could find the root cause. If FlowLabel info is merged by fl6_merge_options(), we leave part of the opt_space storage provided by udp/raw/l2tp with random value in opt_space.tot_len, unless a control message was provided at sendmsg() time. Then ip6_setup_cork() would use this random value to perform a kzalloc() call. Undefined behavior and crashes. Fix is to properly set tot_len in fl6_merge_options() At the same time, we can also avoid consuming memory and cpu cycles to clear it, if every option is copied via a kmemdup(). This is the change in ip6_setup_cork(). [1] kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 6613 Comm: syz-executor0 Not tainted 4.14.0-rc4+ #127 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801cb64a100 task.stack: ffff8801cc350000 RIP: 0010:ip6_setup_cork+0x274/0x15c0 net/ipv6/ip6_output.c:1168 RSP: 0018:ffff8801cc357550 EFLAGS: 00010203 RAX: dffffc0000000000 RBX: ffff8801cc357748 RCX: 0000000000000010 RDX: 0000000000000002 RSI: ffffffff842bd1d9 RDI: 0000000000000014 RBP: ffff8801cc357620 R08: ffff8801cb17f380 R09: ffff8801cc357b10 R10: ffff8801cb64a100 R11: 0000000000000000 R12: ffff8801cc357ab0 R13: ffff8801cc357b10 R14: 0000000000000000 R15: ffff8801c3bbf0c0 FS: 00007f9c5c459700(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020324000 CR3: 00000001d1cf2000 CR4: 00000000001406f0 DR0: 0000000020001010 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: ip6_make_skb+0x282/0x530 net/ipv6/ip6_output.c:1729 udpv6_sendmsg+0x2769/0x3380 net/ipv6/udp.c:1340 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+0x358/0x5a0 net/socket.c:1750 SyS_sendto+0x40/0x50 net/socket.c:1718 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007f9c5c458c08 EFLAGS: 00000216 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000000000000001 RSI: 0000000020fd1000 RDI: 0000000000000016 RBP: 0000000000000086 R08: 0000000020e0afe4 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004bb1ee R13: 00000000ffffffff R14: 0000000000000016 R15: 0000000000000029 Code: e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 ea 0f 00 00 48 8d 79 04 48 b8 00 00 00 00 00 fc ff df 45 8b 74 24 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 RIP: ip6_setup_cork+0x274/0x15c0 net/ipv6/ip6_output.c:1168 RSP: ffff8801cc357550 Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/ipv6/ip6_flowlabel.c | 1 + net/ipv6/ip6_output.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 66bdede495c71da9c5ce18542976fae53642880b Author: Geert Uytterhoeven Date: Wed Oct 18 13:54:03 2017 +0200 of_mdio: Fix broken PHY IRQ in case of probe deferral If an Ethernet PHY is initialized before the interrupt controller it is connected to, a message like the following is printed: irq: no irq domain found for /interrupt-controller@e61c0000 ! However, the actual error is ignored, leading to a non-functional (POLL) PHY interrupt later: Micrel KSZ8041RNLI ee700000.ethernet-ffffffff:01: attached PHY driver [Micrel KSZ8041RNLI] (mii_bus:phy_addr=ee700000.ethernet-ffffffff:01, irq=POLL) Depending on whether the PHY driver will fall back to polling, Ethernet may or may not work. To fix this: 1. Switch of_mdiobus_register_phy() from irq_of_parse_and_map() to of_irq_get(). Unlike the former, the latter returns -EPROBE_DEFER if the interrupt controller is not yet available, so this condition can be detected. Other errors are handled the same as before, i.e. use the passed mdio->irq[addr] as interrupt. 2. Propagate and handle errors from of_mdiobus_register_phy() and of_mdiobus_register_device(). Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/of/of_mdio.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 7433a8d6fa60a2f6910206fa10f3550c8f11f45f Author: Randy Dunlap Date: Fri Oct 20 12:15:52 2017 -0700 textsearch: fix typos in library helpers Fix spellos (typos) in textsearch library helpers. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller lib/ts_fsm.c | 2 +- lib/ts_kmp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6cb3ece9685f78f9b288dd2afea58c35784e40b8 Author: David Howells Date: Fri Oct 20 17:01:22 2017 +0100 rxrpc: Don't release call mutex on error pointer Don't release call mutex at the end of rxrpc_kernel_begin_call() if the call pointer actually holds an error value. Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Reported-by: Marc Dionne 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 748759d57e1b33427113bad7dc685ea3c139649e Merge: 0247880 9454360 Author: David S. Miller Date: Sun Oct 22 02:50:40 2017 +0100 Merge branch 'stmmac-hw-tstamp-fixes' Jose Abreu says: ==================== net: stmmac: Fix HW timestamping Three fixes for HW timestamping feature, all of them for RX side. ==================== Signed-off-by: David S. Miller commit 9454360dec1c96800576693955b92a2792b74def Author: Jose Abreu Date: Fri Oct 20 14:37:36 2017 +0100 net: stmmac: Prevent infinite loop in get_rx_timestamp_status() Prevent infinite loop by correctly setting the loop condition to break when i == 10. 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/dwmac4_descs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98870943a561c64aca22d10820a881aa4fa728e4 Author: Jose Abreu Date: Fri Oct 20 14:37:35 2017 +0100 net: stmmac: Fix stmmac_get_rx_hwtstamp() When using GMAC4 the valid timestamp is from CTX next desc but we are passing the previous desc to get_rx_timestamp_status() callback. Fix this and while at it rework a little bit the function logic. 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/stmmac_main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 9c8080d068b861a80d430ba0b42d8c9b07366b66 Author: Jose Abreu Date: Fri Oct 20 14:37:34 2017 +0100 net: stmmac: Add missing call to dev_kfree_skb() When RX HW timestamp is enabled and a frame is discarded we are not freeing the skb but instead only setting to NULL the entry. Add a call to dev_kfree_skb_any() so that skb entry is correctly freed. 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/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) commit e5f468b3f23313994c5e6c356135f9b0d76bcb94 Merge: ec0145e ea04efe Author: Linus Torvalds Date: Sat Oct 21 21:46:39 2017 -0400 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - joydev now implements a blacklist to avoid creating joystick nodes for accelerometers found in composite devices such as PlaStation controllers - assorted driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ims-psu - check if CDC union descriptor is sane Input: joydev - blacklist ds3/ds4/udraw motion sensors Input: allow matching device IDs on property bits Input: factor out and export input_device_id matching code Input: goodix - poll the 'buffer status' bit before reading data Input: axp20x-pek - fix module not auto-loading for axp221 pek Input: tca8418 - enable interrupt after it has been requested Input: stmfts - fix setting ABS_MT_POSITION_* maximum size Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen Input: synaptics - disable kernel tracking on SMBus devices commit ec0145e9cc46c2e8636b14f08f53c3011967c20e Merge: 0787643 357fdad Author: Linus Torvalds Date: Sat Oct 21 21:39:18 2017 -0400 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "MS_I_VERSION fixes - Mimi's fix + missing bits picked from Matthew (his patch contained a duplicate of the fs/namespace.c fix as well, but by that point the original fix had already been applied)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Convert fs/*/* to SB_I_VERSION vfs: fix mounting a filesystem with i_version commit 0247880a09a145be00daabf6c08f28fd739de560 Merge: 95491e3 dcbda28 Author: David S. Miller Date: Sun Oct 22 02:19:03 2017 +0100 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: spectrum: Configure TTL of "inherit" for offloaded tunnels Petr says: Currently mlxsw only offloads tunnels that are configured with TTL of "inherit" (which is the default). However, Spectrum defaults to 255 and the driver neglects to change the configuration. Thus the tunnel packets from offloaded tunnels always have TTL of 255, even though tunnels with explicit TTL of 255 are never actually offloaded. To fix this, introduce support for TIGCR, the register that keeps the related bits of global tunnel configuration, and use it on first offload to properly configure inheritance of TTL of tunnel packets from overlay packets. ==================== Signed-off-by: David S. Miller commit dcbda2820ff91a692338fed2c99bb9b1af37a05a Author: Petr Machata Date: Fri Oct 20 09:16:16 2017 +0200 mlxsw: spectrum_router: Configure TIGCR on init Spectrum tunnels do not default to ttl of "inherit" like the Linux ones do. Configure TIGCR on router init so that the TTL of tunnel packets is copied from the overlay packets. Fixes: ee954d1a91b2 ("mlxsw: spectrum_router: Support GRE 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 14aefd9011f14ecf1f821fcd1754f009f4ab3df9 Author: Petr Machata Date: Fri Oct 20 09:16:15 2017 +0200 mlxsw: reg: Add Tunneling IPinIP General Configuration Register The TIGCR register is used for setting up the IPinIP Tunnel configuration. Fixes: ee954d1a91b2 ("mlxsw: spectrum_router: Support GRE 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/reg.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 95491e3cf37840c518d81e1a3a6a8ef554e03c54 Author: Niklas Söderlund Date: Fri Oct 20 01:32:08 2017 +0200 net: ethtool: remove error check for legacy setting transceiver type Commit 9cab88726929605 ("net: ethtool: Add back transceiver type") restores the transceiver type to struct ethtool_link_settings and convert_link_ksettings_to_legacy_settings() but forgets to remove the error check for the same in convert_legacy_settings_to_link_ksettings(). This prevents older versions of ethtool to change link settings. # ethtool --version ethtool version 3.16 # ethtool -s eth0 autoneg on speed 100 duplex full Cannot set new settings: Invalid argument not setting speed not setting duplex not setting autoneg While newer versions of ethtool works. # ethtool --version ethtool version 4.10 # ethtool -s eth0 autoneg on speed 100 duplex full [ 57.703268] sh-eth ee700000.ethernet eth0: Link is Down [ 59.618227] sh-eth ee700000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx Fixes: 19cab88726929605 ("net: ethtool: Add back transceiver type") Signed-off-by: Niklas Söderlund Reported-by: Renjith R V Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller net/core/ethtool.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1b5f962e71bfad6284574655c406597535c3ea7a Author: Craig Gallek Date: Thu Oct 19 15:00:29 2017 -0400 soreuseport: fix initialization race Syzkaller stumbled upon a way to trigger WARNING: CPU: 1 PID: 13881 at net/core/sock_reuseport.c:41 reuseport_alloc+0x306/0x3b0 net/core/sock_reuseport.c:39 There are two initialization paths for the sock_reuseport structure in a socket: Through the udp/tcp bind paths of SO_REUSEPORT sockets or through SO_ATTACH_REUSEPORT_[CE]BPF before bind. The existing implementation assumedthat the socket lock protected both of these paths when it actually only protects the SO_ATTACH_REUSEPORT path. Syzkaller triggered this double allocation by running these paths concurrently. This patch moves the check for double allocation into the reuseport_alloc function which is protected by a global spin lock. Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") Fixes: c125e80b8868 ("soreuseport: fast reuseport TCP socket selection") Signed-off-by: Craig Gallek Signed-off-by: David S. Miller net/core/sock_reuseport.c | 12 +++++++++--- net/ipv4/inet_hashtables.c | 5 +---- net/ipv4/udp.c | 5 +---- 3 files changed, 11 insertions(+), 11 deletions(-) commit 66c54517540cedf5a22911c6b7f5c7d8b5d1e1be Author: Nikolay Aleksandrov Date: Thu Oct 19 20:17:32 2017 +0300 net: bridge: fix returning of vlan range op errors When vlan tunnels were introduced, vlan range errors got silently dropped and instead 0 was returned always. Restore the previous behaviour and return errors to user-space. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54d431176429e9cf064461589e5174349a9f73da Author: Willem de Bruijn Date: Thu Oct 19 12:40:39 2017 -0400 sock: correct sk_wmem_queued accounting on efault in tcp zerocopy Syzkaller hits WARN_ON(sk->sk_wmem_queued) in sk_stream_kill_queues after triggering an EFAULT in __zerocopy_sg_from_iter. On this error, skb_zerocopy_stream_iter resets the skb to its state before the operation with __pskb_trim. It cannot kfree_skb like datagram callers, as the skb may have data from a previous send call. __pskb_trim calls skb_condense for unowned skbs, which adjusts their truesize. These tcp skbuffs are owned and their truesize must add up to sk_wmem_queued. But they match because their skb->sk is NULL until tcp_transmit_skb. Temporarily set skb->sk when calling __pskb_trim to signal that the skbuffs are owned and avoid the skb_condense path. Fixes: 52267790ef52 ("sock: add MSG_ZEROCOPY") Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 4 ++++ 1 file changed, 4 insertions(+) commit d2b2762433435d81fe76be6d16078c436b45cf3b Merge: 8695a53 b37242c Author: David S. Miller Date: Sun Oct 22 00:56:10 2017 +0100 Merge branch 'bpf-range-marking-fixes' Daniel Borkmann says: ==================== Two BPF fixes for range marking The set contains two fixes for direct packet access range markings and test cases for all direct packet access patterns that the verifier matches on. They are targeted for net tree, note that once net gets merged into net-next, there will be a minor merge conflict due to signature change of the function find_good_pkt_pointers() as well as data_meta patterns present in net-next tree. You can just add bool false to the data_meta patterns and I will follow-up with properly converting the patterns for data_meta in a similar way. ==================== Signed-off-by: David S. Miller commit b37242c773b21edcd566e3bf995fb91d06b9537a Author: Daniel Borkmann Date: Sat Oct 21 02:34:23 2017 +0200 bpf: add test cases to bpf selftests to cover all access tests Lets add test cases to cover really all possible direct packet 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 | 480 ++++++++++++++++++++++++++++ 1 file changed, 480 insertions(+) commit 0fd4759c5515b7f2297d7fee5c45e5d9dd733001 Author: Daniel Borkmann Date: Sat Oct 21 02:34:22 2017 +0200 bpf: fix pattern matches for direct packet access Alexander had a test program with direct packet access, where the access test was in the form of data + X > data_end. In an unrelated change to the program LLVM decided to swap the branches and emitted code for the test in form of data + X <= data_end. We hadn't seen these being generated previously, thus verifier would reject the program. Therefore, fix up the verifier to detect all test cases, so we don't run into such issues in the future. Fixes: b4e432f1000a ("bpf: enable BPF_J{LT, LE, SLT, SLE} opcodes in verifier") Reported-by: Alexander Alemayhu Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/verifier.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit fb2a311a31d3457fe8c3ee16f5609877e2ead9f7 Author: Daniel Borkmann Date: Sat Oct 21 02:34:21 2017 +0200 bpf: fix off by one for range markings with L{T, E} patterns During review I noticed that the current logic for direct packet access marking in check_cond_jmp_op() has an off by one for the upper right range border when marking in find_good_pkt_pointers() with BPF_JLT and BPF_JLE. It's not really harmful given access up to pkt_end is always safe, but we should nevertheless correct the range marking before it becomes ABI. If pkt_data' denotes a pkt_data derived pointer (pkt_data + X), then for pkt_data' < pkt_end in the true branch as well as for pkt_end <= pkt_data' in the false branch we mark the range with X although it should really be X - 1 in these cases. For example, X could be pkt_end - pkt_data, then when testing for pkt_data' < pkt_end the verifier simulation cannot deduce that a byte load of pkt_data' - 1 would succeed in this branch. Fixes: b4e432f1000a ("bpf: enable BPF_J{LT, LE, SLT, SLE} opcodes in verifier") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/verifier.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit 8695a5395661fbb4a4f26c97f801f3800ae4754e Author: John Fastabend Date: Thu Oct 19 09:03:52 2017 -0700 bpf: devmap fix arithmetic overflow in bitmap_size calculation An integer overflow is possible in dev_map_bitmap_size() when calculating the BITS_TO_LONG logic which becomes, after macro replacement, (((n) + (d) - 1)/ (d)) where 'n' is a __u32 and 'd' is (8 * sizeof(long)). To avoid overflow cast to u64 before arithmetic. Reported-by: Richard Weinberger Acked-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b95f4f730cba02ef6febbdc4ca7e55ca045b00e Author: Rex Zhu Date: Fri Oct 20 15:07:41 2017 +0800 drm/amd/powerplay: fix uninitialized variable refresh_rate was not initialized when program display gap. this patch can fix vce ring test failed when do S3 on Polaris10. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103102 bug: https://bugzilla.kernel.org/show_bug.cgi?id=196615 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/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0787643a5f6aad1f0cdeb305f7fe492b71943ea4 Merge: 9c323bf c5709d3 Author: Linus Torvalds Date: Sat Oct 21 14:32:46 2017 -0400 Merge tag 'dmaengine-fix-4.14-rc6' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fix from Vinod Koul: "Late fix for altera driver which fixes the locking in driver" * tag 'dmaengine-fix-4.14-rc6' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: altera: Use IRQ-safe spinlock calls in the error paths as well commit b16918a5fd87983d421a7e2241a1314e877c4ea2 Author: Martyn Welch Date: Thu Oct 19 16:51:44 2017 +0100 hwmon: (da9052) Increase sample rate when using TSI The TSI channel, which is usually used for touchscreen support, but can be used as 4 general purpose ADCs. When used as a touchscreen interface the touchscreen driver switches the device into 1ms sampling mode (rather than the default 10ms economy mode) as recommended by the manufacturer. When using the TSI channels as a general purpose ADC we are currently not doing this and testing suggests that this can result in ADC timeouts: [ 5827.198289] da9052 spi2.0: timeout waiting for ADC conversion interrupt [ 5827.728293] da9052 spi2.0: timeout waiting for ADC conversion interrupt [ 5993.808335] da9052 spi2.0: timeout waiting for ADC conversion interrupt [ 5994.328441] da9052 spi2.0: timeout waiting for ADC conversion interrupt [ 5994.848291] da9052 spi2.0: timeout waiting for ADC conversion interrupt Switching to the 1ms timing resolves this issue. Fixes: 4f16cab19a3d5 ("hwmon: da9052: Add support for TSI channel") Signed-off-by: Martyn Welch Acked-by: Steve Twiss Signed-off-by: Guenter Roeck drivers/hwmon/da9052-hwmon.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9b269f3098121b5d54aaf822e0898c8ed1d3fec Author: Julien Thierry Date: Fri Oct 20 12:34:17 2017 +0100 arm/arm64: kvm: Disable branch profiling in HYP code When HYP code runs into branch profiling code, it attempts to jump to unmapped memory, causing a HYP Panic. Disable the branch profiling for code designed to run at HYP mode. Signed-off-by: Julien Thierry Acked-by: Marc Zyngier Cc: Christoffer Dall Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/Makefile | 2 +- arch/arm64/kvm/hyp/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fe7d7b03c61f6dab70a973fb32c90f2254784e03 Author: Julien Thierry Date: Fri Oct 20 12:34:16 2017 +0100 arm/arm64: kvm: Move initialization completion message KVM is being a bit too optimistic, Hyp mode is said to be initialized when Hyp segments have only been mapped. Notify KVM's successful initialization only once it is really fully initialized. Signed-off-by: Julien Thierry Acked-by: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit fd6c8c206fc5d0717b0433b191de0715122f33bb Author: Dongjiu Geng Date: Tue Oct 17 22:23:49 2017 +0800 arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort When a exception is trapped to EL2, hardware uses ELR_ELx to hold the current fault instruction address. If KVM wants to inject a abort to 32 bit guest, it needs to set the LR register for the guest to emulate this abort happened in the guest. Because ARM32 architecture is pipelined execution, so the LR value has an offset to the fault instruction address. The offsets applied to Link value for exceptions as shown below, which should be added for the ARM32 link register(LR). Table taken from ARMv8 ARM DDI0487B-B, table G1-10: Exception Offset, for PE state of: A32 T32 Undefined Instruction +4 +2 Prefetch Abort +4 +4 Data Abort +8 +8 IRQ or FIQ +4 +4 [ Removed unused variables in inject_abt to avoid compile warnings. -- Christoffer ] Cc: Signed-off-by: Dongjiu Geng Tested-by: Haibin Zhang Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/emulate.c | 6 ++---- arch/arm64/kvm/inject_fault.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) commit 191643403b770d6adbc10a5bb5ed539845e9d1ad Author: Greg Kroah-Hartman Date: Sat Oct 21 17:01:49 2017 +0200 Documentation: kernel-enforcement-statement.rst: proper sort names Eduardo was not in the correct alphabetical order, and Ivan was somehow listed twice, so fix these sorting issues up. Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1f7c70d6b2bc5de301f30456621e1161fddf4242 Author: Thomas Gleixner Date: Sat Oct 21 16:06:52 2017 +0200 cpu/hotplug: Reset node state after operation The recent rework of the cpu hotplug internals changed the usage of the per cpu state->node field, but missed to clean it up after usage. So subsequent hotplug operations use the stale pointer from a previous operation and hand it into the callback functions. The callbacks then dereference a pointer which either belongs to a different facility or points to freed and potentially reused memory. In either case data corruption and crashes are the obvious consequence. Reset the node and the last pointers in the per cpu state to NULL after the operation which set them has completed. Fixes: 96abb968549c ("smp/hotplug: Allow external multi-instance rollback") Reported-by: Tvrtko Ursulin Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Boris Ostrovsky Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1710211606130.3213@nanos kernel/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 43ebf97fa40fc49242110d2bd50334fc6e95c802 Merge: 197df02 417a3ae Author: David S. Miller Date: Sat Oct 21 12:32:25 2017 +0100 Merge branch 'aquantia-fixes' Igor Russkikh says: ==================== net: aquantia: Atlantic driver 10/2017 updates This patchset fixes various issues in driver, improves parameters for better performance on 10Gbit link ==================== Signed-off-by: David S. Miller commit 417a3ae4b14909439bb49790f90201f450399845 Author: Igor Russkikh Date: Thu Oct 19 18:23:59 2017 +0300 net: aquantia: Bad udp rate on default interrupt coalescing Default Tx rates cause very long ISR delays on Tx. 0xff is 510us delay, giving only ~ 2000 interrupts per seconds for Tx rings cleanup. With these settings udp tx rate was never higher than ~800Mbps on a single stream. Changing min delay to 0xF makes it way better with ~6Gbps TCP stream performance is almost unaffected by this change, since LSO optimizations play important role. CPU load is affected insignificantly by this change. 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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b82ee71a86b0ea66da79a91959d800ffb696a5cb Author: Igor Russkikh Date: Thu Oct 19 18:23:58 2017 +0300 net: aquantia: Enable coalescing management via ethtool interface Aquantia NIC allows both TX and RX interrupt throttle rate (ITR) management, but this was used in a very limited way via predefined values. This patch allows to setup ITR default values via module command line arguments and via standard ethtool coalescing settings. Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 8 ++- .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 65 ++++++++++++++++++ drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 3 +- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 36 +++++++--- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 4 +- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 20 +++--- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 76 ++++++++++++---------- .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 3 + .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 2 - 9 files changed, 155 insertions(+), 62 deletions(-) commit 6849540adc0bcc8c648d7c11be169d2ca267fbca Author: Igor Russkikh Date: Thu Oct 19 18:23:57 2017 +0300 net: aquantia: mmio unmap was not performed on driver removal That may lead to mmio resource leakage. Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 3 +++ 1 file changed, 3 insertions(+) commit 4c8bb609d304df72858aa2e5e74abab5246bd24b Author: Igor Russkikh Date: Thu Oct 19 18:23:56 2017 +0300 net: aquantia: Limit number of MSIX irqs to the number of cpus There is no much practical use from having MSIX vectors more that number of cpus, thus cap this first with preconfigured limit, then with number of cpus online. Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 93d87b8fbe6cf17f0ad9552a934b5a6623ccd7d1 Author: Igor Russkikh Date: Thu Oct 19 18:23:55 2017 +0300 net: aquantia: Fixed transient link up/down/up notification When doing ifconfig down/up, driver did not reported carrier_off neither in nic_stop nor in nic_start. That caused link to be visible as "up" during couple of seconds immediately after "ifconfig up". Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) commit 5d8d84e91d7432cd206b27ad791a11220689ac53 Author: Igor Russkikh Date: Thu Oct 19 18:23:54 2017 +0300 net: aquantia: Add queue restarts stats counter Queue stat strings are cleaned up, duplicate stat name strings removed, queue restarts counter added Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 92 ++++++++-------------- drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 3 + 2 files changed, 37 insertions(+), 58 deletions(-) commit 65e665e68d097edfe667372f13d54f3e4edcb69c Author: Igor Russkikh Date: Thu Oct 19 18:23:53 2017 +0300 net: aquantia: Reset nic statistics on interface up/down Internal statistics system on chip never gets reset until hardware reboot. This is quite inconvenient in terms of ethtool statistics usage. This patch implements incremental statistics update inside of service callback. Upon nic initialization, first request is done to fetch initial stat data, current collected stat data gets cleared. Internal statistics mailbox readout is improved to save space and increase readability Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 2 + drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 + .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 1 + .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 1 + .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 69 +++++++++++++++++----- .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 16 ++++- 6 files changed, 75 insertions(+), 17 deletions(-) commit ea968da7d45d4a1305e42107c5356fba0ab1ed3c Author: Bard Liao Date: Fri Oct 20 15:46:55 2017 +0800 ASoC: rt5616: fix 0x91 default value The default value of register 0x91 is 0x0c00 instead of 0x0000. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae65c8510f3319dfb2114cc48d476b81232e27b3 Author: Sherry Yang Date: Fri Oct 20 20:58:59 2017 -0400 android: binder: Fix null ptr dereference in debug msg Don't access next->data in kernel debug message when the next buffer is null. 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 a0c2baaf81bd53dc76fccdddc721ba7dbb62be21 Author: Sherry Yang Date: Fri Oct 20 20:58:58 2017 -0400 android: binder: Don't get mm from task Use binder_alloc struct's mm_struct rather than getting a reference to the mm struct through get_task_mm to avoid a potential deadlock between lru lock, task lock and dentry lock, since a thread can be holding the task lock and the dentry lock while trying to acquire the lru lock. Acked-by: Arve Hjønnevåg Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 22 +++++++++------------- drivers/android/binder_alloc.h | 1 - 2 files changed, 9 insertions(+), 14 deletions(-) commit b92ca54eb563df0d1963d2a4f5cac1713c581a8a Author: Catalin Marinas Date: Fri Oct 20 18:15:26 2017 +0100 Documentation: Add Arm Ltd to kernel-enforcement-statement.rst Adding a couple of names on behalf of Arm Ltd. Acked-by: Marc Zyngier Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 2 ++ 1 file changed, 2 insertions(+) commit 197df02cb3d3e969fb1d6fc11f5a634b7bfc2124 Author: Matteo Croce Date: Thu Oct 19 14:22:17 2017 +0200 udp: make some messages more descriptive In the UDP code there are two leftover error messages with very few meaning. Replace them with a more descriptive error message as some users reported them as "strange network error". Signed-off-by: Matteo Croce Signed-off-by: David S. Miller net/ipv4/udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 772e97b57a4aa00170ad505a40ffad31d987ce1d Author: Stefano Brivio Date: Thu Oct 19 13:31:28 2017 +0200 geneve: Fix function matching VNI and tunnel ID on big-endian On big-endian machines, functions converting between tunnel ID and VNI use the three LSBs of tunnel ID storage to map VNI. The comparison function eq_tun_id_and_vni(), on the other hand, attempted to map the VNI from the three MSBs. Fix it by using the same check implemented on LE, which maps VNI from the three LSBs of tunnel ID. Fixes: 2e0b26e10352 ("geneve: Optimize geneve device lookup.") Signed-off-by: Stefano Brivio Reviewed-by: Jakub Sitnicki Signed-off-by: David S. Miller drivers/net/geneve.c | 6 ------ 1 file changed, 6 deletions(-) commit c69d75ae1552744083f3575c63d269ca485c0241 Merge: b4562ca 97819f9 Author: David S. Miller Date: Sat Oct 21 02:30:31 2017 +0100 Merge tag 'linux-can-fixes-for-4.14-20171019' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-10-19 this is a pull request of 11 patches for the upcoming 4.14 release. There are 6 patches by ZHU Yi for the flexcan driver, that work around the CAN error handling state transition problems found in various incarnations of the flexcan IP core. The patch by Colin Ian King fixes a potential NULL pointer deref in the CAN broad cast manager (bcm). One patch by me replaces a direct deref of a RCU protected pointer by rcu_access_pointer. My second patch adds missing OOM error handling in af_can. A patch by Stefan Mätje for the esd_usb2 driver fixes the dlc in received RTR frames. And the last patch is by Wolfgang Grandegger, it fixes a busy loop in the gs_usb driver in case it runs out of TX contexts. ==================== Signed-off-by: David S. Miller commit b4562ca7925a3bedada87a3dd072dd5bad043288 Author: Dexuan Cui Date: Thu Oct 19 03:33:14 2017 +0000 hv_sock: add locking in the open/close/release code paths Without the patch, when hvs_open_connection() hasn't completely established a connection (e.g. it has changed sk->sk_state to SS_CONNECTED, but hasn't inserted the sock into the connected queue), vsock_stream_connect() may see the sk_state change and return the connection to the userspace, and next when the userspace closes the connection quickly, hvs_release() may not see the connection in the connected queue; finally hvs_open_connection() inserts the connection into the queue, but we won't be able to purge the connection for ever. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Rolf Neugebauer Cc: Marcelo Cerri Signed-off-by: David S. Miller net/vmw_vsock/hyperv_transport.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 0a90e251988ceedc528c8db98f25b051cf190f44 Author: Gavin Shan Date: Thu Oct 19 13:43:09 2017 +1100 net/ncsi: Fix length of GVI response packet The length of GVI (GetVersionInfo) response packet should be 40 instead of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats. # ethtool --ncsi eth0 swstats : RESPONSE OK TIMEOUT ERROR ======================================= GVI 0 0 2 With this applied, no error reported on GVI response packets: # ethtool --ncsi eth0 swstats : RESPONSE OK TIMEOUT ERROR ======================================= GVI 2 0 0 Signed-off-by: Gavin Shan Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-rsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52b4c8627f9f0d882e969967a207a27a80c9c753 Author: Gavin Shan Date: Thu Oct 19 13:43:08 2017 +1100 net/ncsi: Enforce failover on link monitor timeout The NCSI channel has been configured to provide service if its link monitor timer is enabled, regardless of its state (inactive or active). So the timeout event on the link monitor indicates the out-of-service on that channel, for which a failover is needed. This sets NCSI_DEV_RESHUFFLE flag to enforce failover on link monitor timeout, regardless the channel's original state (inactive or active). Also, the link is put into "down" state to give the failing channel lowest priority when selecting for the active channel. The state of failing channel should be set to active in order for deinitialization and failover to be done. Signed-off-by: Gavin Shan Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 100ef01f3ea4badbee6479290a41f74abd0e523f Author: Gavin Shan Date: Thu Oct 19 13:43:07 2017 +1100 net/ncsi: Disable HWA mode when no channels are found When there are no NCSI channels probed, HWA (Hardware Arbitration) mode is enabled. It's not correct because HWA depends on the fact: NCSI channels exist and all of them support HWA mode. This disables HWA when no channels are probed. Signed-off-by: Gavin Shan Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0795fb2021f07969949f523ea33c39785bfae9d6 Author: Samuel Mendoza-Jonas Date: Thu Oct 19 13:43:06 2017 +1100 net/ncsi: Stop monitor if channel times out or is inactive ncsi_channel_monitor() misses stopping the channel monitor in several places that it should, causing a WARN_ON_ONCE() to trigger when the monitor is re-started later, eg: [ 459.040000] WARNING: CPU: 0 PID: 1093 at net/ncsi/ncsi-manage.c:269 ncsi_start_channel_monitor+0x7c/0x90 [ 459.040000] CPU: 0 PID: 1093 Comm: kworker/0:3 Not tainted 4.10.17-gaca2fdd #140 [ 459.040000] Hardware name: ASpeed SoC [ 459.040000] Workqueue: events ncsi_dev_work [ 459.040000] [<80010094>] (unwind_backtrace) from [<8000d950>] (show_stack+0x20/0x24) [ 459.040000] [<8000d950>] (show_stack) from [<801dbf70>] (dump_stack+0x20/0x28) [ 459.040000] [<801dbf70>] (dump_stack) from [<80018d7c>] (__warn+0xe0/0x108) [ 459.040000] [<80018d7c>] (__warn) from [<80018e70>] (warn_slowpath_null+0x30/0x38) [ 459.040000] [<80018e70>] (warn_slowpath_null) from [<803f6a08>] (ncsi_start_channel_monitor+0x7c/0x90) [ 459.040000] [<803f6a08>] (ncsi_start_channel_monitor) from [<803f7664>] (ncsi_configure_channel+0xdc/0x5fc) [ 459.040000] [<803f7664>] (ncsi_configure_channel) from [<803f8160>] (ncsi_dev_work+0xac/0x474) [ 459.040000] [<803f8160>] (ncsi_dev_work) from [<8002d244>] (process_one_work+0x1e0/0x450) [ 459.040000] [<8002d244>] (process_one_work) from [<8002d510>] (worker_thread+0x5c/0x570) [ 459.040000] [<8002d510>] (worker_thread) from [<80033614>] (kthread+0x124/0x164) [ 459.040000] [<80033614>] (kthread) from [<8000a5e8>] (ret_from_fork+0x14/0x2c) This also updates the monitor instead of just returning if ncsi_xmit_cmd() fails to send the get-link-status command so that the monitor properly times out. Fixes: e6f44ed6d04d3 "net/ncsi: Package and channel management" Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 6850d0f8b2542112629061808ed950b35eb982e4 Author: Samuel Mendoza-Jonas Date: Thu Oct 19 13:43:05 2017 +1100 net/ncsi: Fix AEN HNCDSC packet length Correct the value of the HNCDSC AEN packet. Fixes: 7a82ecf4cfb85 "net/ncsi: NCSI AEN packet handler" Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-aen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 509c7a1ecc8601f94ffba8a00889fefb239c00c6 Author: Eric Dumazet Date: Wed Oct 18 16:14:52 2017 -0700 packet: avoid panic in packet_getsockopt() syzkaller got crashes in packet_getsockopt() processing PACKET_ROLLOVER_STATS command while another thread was managing to change po->rollover Using RCU will fix this bug. We might later add proper RCU annotations for sparse sake. In v2: I replaced kfree(rollover) in fanout_add() to kfree_rcu() variant, as spotted by John. Fixes: a9b6391814d5 ("packet: rollover statistics") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: John Sperbeck Signed-off-by: David S. Miller net/packet/af_packet.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit c92e8c02fe664155ac4234516e32544bec0f113d Author: Eric Dumazet Date: Fri Oct 20 09:04:13 2017 -0700 tcp/dccp: fix ireq->opt races syzkaller found another bug in DCCP/TCP stacks [1] For the reasons explained in commit ce1050089c96 ("tcp/dccp: fix ireq->pktopts race"), we need to make sure we do not access ireq->opt unless we own the request sock. Note the opt field is renamed to ireq_opt to ease grep games. [1] BUG: KASAN: use-after-free in ip_queue_xmit+0x1687/0x18e0 net/ipv4/ip_output.c:474 Read of size 1 at addr ffff8801c951039c by task syz-executor5/3295 CPU: 1 PID: 3295 Comm: syz-executor5 Not tainted 4.14.0-rc4+ #80 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 ip_queue_xmit+0x1687/0x18e0 net/ipv4/ip_output.c:474 tcp_transmit_skb+0x1ab7/0x3840 net/ipv4/tcp_output.c:1135 tcp_send_ack.part.37+0x3bb/0x650 net/ipv4/tcp_output.c:3587 tcp_send_ack+0x49/0x60 net/ipv4/tcp_output.c:3557 __tcp_ack_snd_check+0x2c6/0x4b0 net/ipv4/tcp_input.c:5072 tcp_ack_snd_check net/ipv4/tcp_input.c:5085 [inline] tcp_rcv_state_process+0x2eff/0x4850 net/ipv4/tcp_input.c:6071 tcp_child_process+0x342/0x990 net/ipv4/tcp_minisocks.c:816 tcp_v4_rcv+0x1827/0x2f80 net/ipv4/tcp_ipv4.c:1682 ip_local_deliver_finish+0x2e2/0xba0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:249 [inline] ip_local_deliver+0x1ce/0x6e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:464 [inline] ip_rcv_finish+0x887/0x19a0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:249 [inline] ip_rcv+0xc3f/0x1820 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1a3e/0x34b0 net/core/dev.c:4476 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4514 netif_receive_skb_internal+0x10b/0x670 net/core/dev.c:4587 netif_receive_skb+0xae/0x390 net/core/dev.c:4611 tun_rx_batched.isra.50+0x5ed/0x860 drivers/net/tun.c:1372 tun_get_user+0x249c/0x36d0 drivers/net/tun.c:1766 tun_chr_write_iter+0xbf/0x160 drivers/net/tun.c:1792 call_write_iter include/linux/fs.h:1770 [inline] new_sync_write fs/read_write.c:468 [inline] __vfs_write+0x68a/0x970 fs/read_write.c:481 vfs_write+0x18f/0x510 fs/read_write.c:543 SYSC_write fs/read_write.c:588 [inline] SyS_write+0xef/0x220 fs/read_write.c:580 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x40c341 RSP: 002b:00007f469523ec10 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 000000000040c341 RDX: 0000000000000037 RSI: 0000000020004000 RDI: 0000000000000015 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000f4240 R11: 0000000000000293 R12: 00000000004b7fd1 R13: 00000000ffffffff R14: 0000000020000000 R15: 0000000000025000 Allocated by task 3295: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x162/0x760 mm/slab.c:3734 kmalloc include/linux/slab.h:498 [inline] tcp_v4_save_options include/net/tcp.h:1962 [inline] tcp_v4_init_req+0x2d3/0x3e0 net/ipv4/tcp_ipv4.c:1271 tcp_conn_request+0xf6d/0x3410 net/ipv4/tcp_input.c:6283 tcp_v4_conn_request+0x157/0x210 net/ipv4/tcp_ipv4.c:1313 tcp_rcv_state_process+0x8ea/0x4850 net/ipv4/tcp_input.c:5857 tcp_v4_do_rcv+0x55c/0x7d0 net/ipv4/tcp_ipv4.c:1482 tcp_v4_rcv+0x2d10/0x2f80 net/ipv4/tcp_ipv4.c:1711 ip_local_deliver_finish+0x2e2/0xba0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:249 [inline] ip_local_deliver+0x1ce/0x6e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:464 [inline] ip_rcv_finish+0x887/0x19a0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:249 [inline] ip_rcv+0xc3f/0x1820 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1a3e/0x34b0 net/core/dev.c:4476 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4514 netif_receive_skb_internal+0x10b/0x670 net/core/dev.c:4587 netif_receive_skb+0xae/0x390 net/core/dev.c:4611 tun_rx_batched.isra.50+0x5ed/0x860 drivers/net/tun.c:1372 tun_get_user+0x249c/0x36d0 drivers/net/tun.c:1766 tun_chr_write_iter+0xbf/0x160 drivers/net/tun.c:1792 call_write_iter include/linux/fs.h:1770 [inline] new_sync_write fs/read_write.c:468 [inline] __vfs_write+0x68a/0x970 fs/read_write.c:481 vfs_write+0x18f/0x510 fs/read_write.c:543 SYSC_write fs/read_write.c:588 [inline] SyS_write+0xef/0x220 fs/read_write.c:580 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3306: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xca/0x250 mm/slab.c:3820 inet_sock_destruct+0x59d/0x950 net/ipv4/af_inet.c:157 __sk_destruct+0xfd/0x910 net/core/sock.c:1560 sk_destruct+0x47/0x80 net/core/sock.c:1595 __sk_free+0x57/0x230 net/core/sock.c:1603 sk_free+0x2a/0x40 net/core/sock.c:1614 sock_put include/net/sock.h:1652 [inline] inet_csk_complete_hashdance+0xd5/0xf0 net/ipv4/inet_connection_sock.c:959 tcp_check_req+0xf4d/0x1620 net/ipv4/tcp_minisocks.c:765 tcp_v4_rcv+0x17f6/0x2f80 net/ipv4/tcp_ipv4.c:1675 ip_local_deliver_finish+0x2e2/0xba0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:249 [inline] ip_local_deliver+0x1ce/0x6e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:464 [inline] ip_rcv_finish+0x887/0x19a0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:249 [inline] ip_rcv+0xc3f/0x1820 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1a3e/0x34b0 net/core/dev.c:4476 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4514 netif_receive_skb_internal+0x10b/0x670 net/core/dev.c:4587 netif_receive_skb+0xae/0x390 net/core/dev.c:4611 tun_rx_batched.isra.50+0x5ed/0x860 drivers/net/tun.c:1372 tun_get_user+0x249c/0x36d0 drivers/net/tun.c:1766 tun_chr_write_iter+0xbf/0x160 drivers/net/tun.c:1792 call_write_iter include/linux/fs.h:1770 [inline] new_sync_write fs/read_write.c:468 [inline] __vfs_write+0x68a/0x970 fs/read_write.c:481 vfs_write+0x18f/0x510 fs/read_write.c:543 SYSC_write fs/read_write.c:588 [inline] SyS_write+0xef/0x220 fs/read_write.c:580 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets") Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_sock.h | 2 +- net/dccp/ipv4.c | 13 ++++++++----- net/ipv4/cipso_ipv4.c | 24 +++++++----------------- net/ipv4/inet_connection_sock.c | 8 +++----- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c | 22 +++++++++++++--------- 7 files changed, 34 insertions(+), 39 deletions(-) commit 9c323bff13f92832e03657cabdd70d731408d621 Merge: 545ea16 ee3eaee Author: Linus Torvalds Date: Fri Oct 20 18:20:17 2017 -0400 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Three fixes this time around: - ensure sparse realises that we're building for a 32-bit arch on 64-bit hosts. - use the correct instruction for semihosting on v7m (nommu) CPUs. - reserve address 0 to prevent the first page of memory being used on nommu systems" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8704/1: semihosting: use proper instruction on v7m processors ARM: 8701/1: fix sparse flags for build on 64bit machines ARM: 8700/1: nommu: always reserve address 0 away commit 545ea16f7c42969f94c769d0c2267cf4a65e5850 Merge: 1c9fec4 6bf99a6 Author: Linus Torvalds Date: Fri Oct 20 18:17:43 2017 -0400 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Here is another set of bugfixes for ARM SoCs, mostly harmless: - a boot regression fix on ux500 - PCIe interrupts on NXP i.MX7 and on Marvell Armada 7K/8K were wired up wrong, in different ways - Armada XP support for large memory never worked - the socfpga reset controller now builds on 64-bit - minor device tree corrections on gemini, mvebu, r-pi 3, rockchip and at91" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: ux500: Fix regression while init PM domains ARM: dts: fix PCLK name on Gemini and MOXA ART arm64: dts: rockchip: fix typo in iommu nodes arm64: dts: rockchip: correct vqmmc voltage for rk3399 platforms ARM: dts: imx7d: Invert legacy PCI irq mapping bus: mbus: fix window size calculation for 4GB windows ARM: dts: at91: sama5d2: add ADC hw trigger edge type ARM: dts: at91: sama5d2_xplained: enable ADTRG pin ARM: dts: at91: at91-sama5d27_som1: fix PHY ID ARM: dts: bcm283x: Fix console path on RPi3 reset: socfpga: fix for 64-bit compilation ARM: dts: Fix I2C repeated start issue on Armada-38x arm64: dts: marvell: fix interrupt-map property for Armada CP110 PCIe controller arm64: dts: salvator-common: add 12V regulator to backlight ARM: dts: sun6i: Fix endpoint IDs in second display pipeline arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0 commit 6bf99a6cb69f78de0083b76a7c033918f853f580 Merge: 716479a a231d27 Author: Arnd Bergmann Date: Fri Oct 20 22:24:48 2017 +0200 Merge tag 'sunxi-fixes-for-4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Pull "Allwinner fixes for 4.14" from Maxime Ripard: Two fixes, one for the A31 DRM binding, and one for a missing regulator on the pine MMC controller. * tag 'sunxi-fixes-for-4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun6i: Fix endpoint IDs in second display pipeline arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0 commit 1c9fec470b81ca5e89391c20a11ead31a1e9314b Author: Kees Cook Date: Fri Oct 20 07:36:05 2017 -0700 waitid(): Avoid unbalanced user_access_end() on access_ok() error As pointed out by Linus and David, the earlier waitid() fix resulted in a (currently harmless) unbalanced user_access_end() call. This fixes it to just directly return EFAULT on access_ok() failure. Fixes: 96ca579a1ecc ("waitid(): Add missing access_ok() checks") Acked-by: David Daney Cc: Al Viro Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds kernel/exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deaa55196e0cb6eccc3d5374ddd7c47e7ec61da3 Author: Masahiro Yamada Date: Fri Oct 20 14:16:21 2017 +0900 arm64: dts: uniphier: add STDMAC clock to EHCI nodes Without the STDMAC clock enabled, the USB 2.0 hosts do not work. This clock must be explicitly listed in the "clocks" property because it is independent of the other clocks. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ad81e78a89b9c5ac61139a968ccb8612e73d57c3 Author: Masahiro Yamada Date: Fri Oct 20 14:16:20 2017 +0900 ARM: dts: uniphier: add STDMAC clock to EHCI nodes Without the STDMAC clock enabled, the USB 2.0 hosts do not work. This clock must be explicitly listed in the "clocks" property because it is independent of the other clocks. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 9 ++++++--- arch/arm/boot/dts/uniphier-pro4.dtsi | 6 ++++-- arch/arm/boot/dts/uniphier-sld8.dtsi | 9 ++++++--- 3 files changed, 16 insertions(+), 8 deletions(-) commit 875397464a55dd750198f799626959ad4cf45563 Merge: 73d3393 f04b9cc Author: Jens Axboe Date: Fri Oct 20 08:03:44 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Below are two regression fixes each for RDMA and FC, and a fix for a SQHD update race in the target." commit 9d35593b4f0b89ab0c194349c7d357b3b159e99a Author: Dexuan Cui Date: Wed Oct 18 02:08:40 2017 -0700 vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister() Without the patch, vmbus_hvsock_device_unregister() can destroy the device prematurely when close() is called, and can cause NULl dereferencing or potential data loss (the last portion of the data stream may be dropped prematurely). Signed-off-by: Dexuan Cui Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e95c6cf447ecac5ab5bc38600e1d2ac7b3d54aae Merge: 1cc276c 9ef2a8c Author: David S. Miller Date: Fri Oct 20 13:01:30 2017 +0100 Merge branch 'sockmap-fixes' John Fastabend says: ==================== sockmap fixes for net The following implements a set of fixes for sockmap and changes the API slightly in a few places to reduce preempt_disable/enable scope. We do this here in net because it requires an API change and this avoids getting stuck with legacy API going forward. The short description: Access to skb mark is removed, it is problematic when we add features in the future because mark is a union and used by the TCP/socket code internally. We don't want to expose this to the BPF programs or let programs change the values. The other change is caching metadata in the skb itself between when the BPF program returns a redirect code and the core code implements the redirect. This avoids having per cpu metadata. Finally, tighten restriction on using sockmap to CAP_NET_ADMIN and only SOCK_STREAM sockets. ==================== Signed-off-by: David S. Miller commit 9ef2a8cd5c0dcb8e1f1534615c56eb13b630c363 Author: John Fastabend Date: Wed Oct 18 07:11:44 2017 -0700 bpf: require CAP_NET_ADMIN when using devmap Devmap is used with XDP which requires CAP_NET_ADMIN so lets also make CAP_NET_ADMIN required to use the map. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/devmap.c | 3 +++ 1 file changed, 3 insertions(+) commit fb50df8d32283cd95932a182a46a10070c4a8832 Author: John Fastabend Date: Wed Oct 18 07:11:22 2017 -0700 bpf: require CAP_NET_ADMIN when using sockmap maps Restrict sockmap to CAP_NET_ADMIN. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 3 +++ 1 file changed, 3 insertions(+) commit f7e9cb1ecb6d922584abff16db07930162c57155 Author: John Fastabend Date: Wed Oct 18 07:10:58 2017 -0700 bpf: remove mark access for SK_SKB program types The skb->mark field is a union with reserved_tailroom which is used in the TCP code paths from stream memory allocation. Allowing SK_SKB programs to set this field creates a conflict with future code optimizations, such as "gifting" the skb to the egress path instead of creating a new skb and doing a memcpy. Because we do not have a released version of SK_SKB yet lets just remove it for now. A more appropriate scratch pad to use at the socket layer is dev_scratch, but lets add that in future kernels when needed. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) commit 34f79502bbcfab659b8729da68b5e387f96eb4c1 Author: John Fastabend Date: Wed Oct 18 07:10:36 2017 -0700 bpf: avoid preempt enable/disable in sockmap using tcp_skb_cb region SK_SKB BPF programs are run from the socket/tcp context but early in the stack before much of the TCP metadata is needed in tcp_skb_cb. So we can use some unused fields to place BPF metadata needed for SK_SKB programs when implementing the redirect function. This allows us to drop the preempt disable logic. It does however require an API change so sk_redirect_map() has been updated to additionally provide ctx_ptr to skb. Note, we do however continue to disable/enable preemption around actual BPF program running to account for map updates. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 2 +- include/net/tcp.h | 5 ++++ kernel/bpf/sockmap.c | 19 +++++++------- net/core/filter.c | 29 +++++++++++----------- samples/sockmap/sockmap_kern.c | 2 +- tools/include/uapi/linux/bpf.h | 3 ++- tools/testing/selftests/bpf/bpf_helpers.h | 2 +- tools/testing/selftests/bpf/sockmap_verdict_prog.c | 4 +-- 8 files changed, 36 insertions(+), 30 deletions(-) commit 435bf0d3f99a164df7e8c30428cef266b91d1d3b Author: John Fastabend Date: Wed Oct 18 07:10:15 2017 -0700 bpf: enforce TCP only support for sockmap Only TCP sockets have been tested and at the moment the state change callback only handles TCP sockets. This adds a check to ensure that sockets actually being added are TCP sockets. For net-next we can consider UDP support. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 6 ++++++ tools/testing/selftests/bpf/test_maps.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 1cc276cec9ec574d41cf47dfc0f51406b6f26ab4 Author: Xin Long Date: Wed Oct 18 21:37:49 2017 +0800 sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect Now sctp processes icmp redirect packet in sctp_icmp_redirect where it calls sctp_transport_dst_check in which tp->dst can be released. The problem is before calling sctp_transport_dst_check, it doesn't check sock_owned_by_user, which means tp->dst could be freed while a process is accessing it with owning the socket. An use-after-free issue could be triggered by this. This patch is to fix it by checking sock_owned_by_user before calling sctp_transport_dst_check in sctp_icmp_redirect, so that it would not release tp->dst if users still hold sock lock. Besides, the same issue fixed in commit 45caeaa5ac0b ("dccp/tcp: fix routing redirect race") on sctp also needs this check. Fixes: 55be7a9c6074 ("ipv4: Add redirect support to all protocol icmp error handlers") Reported-by: Eric Dumazet Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb39a7c0355393c5a8d930f342ad7a6231b552c4 Author: David Kozub Date: Thu Oct 19 22:57:02 2017 +0200 clockevents/drivers/cs5535: Improve resilience to spurious interrupts The interrupt handler mfgpt_tick() is not robust versus spurious interrupts which happen before the clock event device is registered and fully initialized. The reason is that the safe guard against spurious interrupts solely checks for the clockevents shutdown state, but lacks a check for detached state. If the interrupt hits while the device is in detached state it passes the safe guard and dereferences the event handler call back which is NULL. Add the missing state check. Fixes: 8f9327cbb6e8 ("clockevents/drivers/cs5535: Migrate to new 'set-state' interface") Suggested-by: Thomas Gleixner Signed-off-by: David Kozub Signed-off-by: Thomas Gleixner Cc: Daniel Lezcano Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171020093103.3317F6004D@linux.fjfi.cvut.cz drivers/clocksource/cs5535-clockevt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9a27ded2195aaec2041ed2525ba7f373c60920c7 Merge: c925e0e e1043a4 Author: Linus Torvalds Date: Fri Oct 20 06:58:43 2017 -0400 Merge tag 'for-linus-4.14c-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A fix for the Xen pv network drivers (frontend and backend) avoiding the network connection to become unusable due to an illegal MTU" * tag 'for-linus-4.14c-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-netfront, xen-netback: Use correct minimum MTU values commit 66b83a4cdd3b73effdc285d1d66763c69ffe2ee8 Author: Martijn Coenen Date: Mon Oct 9 14:26:56 2017 +0200 binder: call poll_wait() unconditionally. Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit c925e0ea500d6bce337a26a649eba122f45aecb2 Merge: d92116a eb701ce Author: Linus Torvalds Date: Fri Oct 20 06:52:05 2017 -0400 Merge tag 'mmc-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "sdhci-pci: Fix default d3_retune for Intel host controllers" * tag 'mmc-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci: Fix default d3_retune for Intel host controllers commit d92116a089eba1eed02ab8cf8bf6d16a260bb7dc Merge: eb62722 2cb3a34 Author: Linus Torvalds Date: Fri Oct 20 06:38:56 2017 -0400 Merge tag 'drm-fixes-for-v4.14-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Standard fixes pull for rc6: one regression fix for amdgpu, a bunch of nouveau fixes that I'd missed a pull req for from Ben last week, some exynos regression fixes, and a few fixes for i915" * tag 'drm-fixes-for-v4.14-rc6' of git://people.freedesktop.org/~airlied/linux: drm/nouveau/fbcon: fix oops without fbdev emulation Revert "drm/amdgpu: discard commands of killed processes" drm/i915: Use a mask when applying WaProgramL3SqcReg1Default drm/i915: Report -EFAULT before pwrite fast path into shmemfs drm/i915/cnl: Fix PLL initialization for HDMI. drm/i915/cnl: Fix PLL mapping. drm/i915: Use bdw_ddi_translations_fdi for Broadwell drm/i915: Fix eviction when the GGTT is idle but full drm/i915/gvt: Fix GPU hang after reusing vGPU instance across different guest OS drm/exynos: Clear drvdata after component unbind drm/exynos: Fix potential NULL pointer dereference in suspend/resume paths drm/nouveau/kms/nv50: fix oops during DP IRQ handling on non-MST boards drm/nouveau/bsp/g92: disable by default drm/nouveau/mmu: flush tlbs before deleting page tables commit eb62722a06c4e6715c71e5c8fcf14aed857c0964 Merge: 03b652e 883b3b6 Author: Linus Torvalds Date: Fri Oct 20 06:32:26 2017 -0400 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A couple of bugfixes for I2C drivers. Because the changes for the piix4 driver are larger than usual, the patches have been in linux-next for more than a week with no reports coming in. The rest is usual stuff" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: omap: Fix error handling for clk_get() i2c: piix4: Disable completely the IMC during SMBUS_BLOCK_DATA i2c: piix4: Fix SMBus port selection for AMD Family 17h chips i2c: imx: fix misleading bus recovery debug message i2c: imx: use IRQF_SHARED mode to request IRQ i2c: ismt: Separate I2C block read from SMBus block read commit 03b652e5c0cdbdfe31314b644d2b0bc77e736693 Merge: ce43f4f 76ba89c Author: Linus Torvalds Date: Fri Oct 20 06:19:38 2017 -0400 Merge branch 'fixes-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling fixes from James Morris: "This includes a fix for the capabilities code from Colin King, and a set of further fixes for the keys subsystem. From David: - Fix a bunch of places where kernel drivers may access revoked user-type keys and don't do it correctly. - Fix some ecryptfs bits. - Fix big_key to require CONFIG_CRYPTO. - Fix a couple of bugs in the asymmetric key type. - Fix a race between updating and finding negative keys. - Prevent add_key() from updating uninstantiated keys. - Make loading of key flags and expiry time atomic when not holding locks" * 'fixes-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: commoncap: move assignment of fs_ns to avoid null pointer dereference pkcs7: Prevent NULL pointer dereference, since sinfo is not always set. KEYS: load key flags and expiry time atomically in proc_keys_show() KEYS: Load key expiry time atomically in keyring_search_iterator() KEYS: load key flags and expiry time atomically in key_validate() KEYS: don't let add_key() update an uninstantiated key KEYS: Fix race between updating and finding a negative key KEYS: checking the input id parameters before finding asymmetric key KEYS: Fix the wrong index when checking the existence of second id security/keys: BIG_KEY requires CONFIG_CRYPTO ecryptfs: fix dereference of NULL user_key_payload fscrypt: fix dereference of NULL user_key_payload lib/digsig: fix dereference of NULL user_key_payload FS-Cache: fix dereference of NULL user_key_payload KEYS: encrypted: fix dereference of NULL user_key_payload commit 48e1dc10a9440872c0fc07a7fbcfce177f996fd4 Author: Yoshihiro Shimoda Date: Fri Oct 20 12:12:42 2017 +0900 mmc: renesas_sdhi: fix kernel panic in _internal_dmac.c Since this driver checks if the return value of dma_map_sg() is minus or not and keeps to enable the DMAC, it may cause kernel panic when the dma_map_sg() returns 0. So, this patch fixes the issue. Reported-by: Dirk Behme Fixes: 2a68ea7896e3 ("mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit e90e8da72ad694a16a4ffa6e5adae3610208f73b Author: Yoshihiro Shimoda Date: Fri Oct 20 12:12:41 2017 +0900 mmc: tmio: fix swiotlb buffer is full Since the commit de3ee99b097d ("mmc: Delete bounce buffer handling") deletes the bounce buffer handling, a request data size will be referred to max_{req,seg}_size instead of MMC_QUEUE_BOUNCESZ (64k bytes). In other hand, renesas_sdhi_internal_dmac.c will set very big value of max_{req,seg}_size because the max_blk_count is set to 0xffffffff. And then, "swiotlb buffer is full" happens because swiotlb can handle a memory size up to 256k bytes only (IO_TLB_SEGSIZE = 128 and IO_TLB_SHIFT = 11). So, as a workaround, this patch avoids the issue by setting the max_{req,seg}_size up to 256k bytes if swiotlb is running. Reported-by: Dirk Behme Signed-off-by: Yoshihiro Shimoda Acked-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 736f20a7060857ff569e9e9586ae6c1204a73e07 Author: Kailang Yang Date: Fri Oct 20 15:06:34 2017 +0800 ALSA: hda/realtek - Add support for ALC236/ALC3204 Add support for ALC236/ALC3204. Add headset mode support for ALC236/ALC3204. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ce56a86e2ade45d052b3228cdfebe913a1ae7381 Author: Craig Bergstrom Date: Thu Oct 19 13:28:56 2017 -0600 x86/mm: Limit mmap() of /dev/mem to valid physical addresses Currently, it is possible to mmap() any offset from /dev/mem. If a program mmaps() /dev/mem offsets outside of the addressable limits of a system, the page table can be corrupted by setting reserved bits. For example if you mmap() offset 0x0001000000000000 of /dev/mem on an x86_64 system with a 48-bit bus, the page fault handler will be called with error_code set to RSVD. The kernel then crashes with a page table corruption error. This change prevents this page table corruption on x86 by refusing to mmap offsets higher than the highest valid address in the system. Signed-off-by: Craig Bergstrom 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: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: dsafonov@virtuozzo.com Cc: kirill.shutemov@linux.intel.com Cc: mhocko@suse.com Cc: oleg@redhat.com Link: http://lkml.kernel.org/r/20171019192856.39672-1-craigb@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/io.h | 4 ++++ arch/x86/mm/mmap.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) commit b703798386fb7288d5a995bd2284a984a5e24f3c Author: Kamalesh Babulal Date: Thu Oct 19 11:27:24 2017 -0500 objtool: Fix memory leak in decode_instructions() When an error occurs before adding an allocated insn to the list, free it before returning. Signed-off-by: Kamalesh Babulal Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/336da800bf6070eae11f4e0a3b9ca64c27658114.1508430423.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 275d34b82561e695339b782950d49c386169dae3 Merge: ce43f4f 74f8e22 Author: Ingo Molnar Date: Fri Oct 20 09:14:06 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20171019' 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 crash in perf_hpp__reset_output_field() (Jiri Olsa) - Fix eBPF file/vendor events ambiguity in event specification (Jiri Olsa) - Fix closing evsel fd in 'perf stat' (Jin Yao) - Make perf test shell trace+probe_libc_inet_pton.sh pass in Debian/Ubuntu (Li Zhijian) - Fix 'perf buildid-list --with-hits' crash when processing PERF_RECORD_NAMESPACE (Namhyung Kim) - Fix documentation for an inexistent option 'perf record -l' (Taeung Song) - Add long time reviewers to MAINTAINERS (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit c5709d37693b72761d866cb1cd556093a6607c80 Author: Stefan Roese Date: Mon Oct 16 08:13:53 2017 +0200 dmaengine: altera: Use IRQ-safe spinlock calls in the error paths as well The patch edf10919 [dmaengine: altera: fix spinlock usage] missed to change 2 occurrences of spin_unlock_bh() to spin_unlock_irqrestore(). This patch fixes this by moving to the IRQ-safe call in the error paths as well. Fixes: edf10919 (dmaengine: altera: fix spinlock usage) Signed-off-by: Stefan Roese Reviewed-by: Sylvain Lesne [add fixes tag and fix typo in log] Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce43f4fd6f103681c7485c2b1967179647e73555 Merge: 27fdb35 c97cc7d Author: Linus Torvalds Date: Thu Oct 19 22:49:21 2017 -0400 Merge tag 'pm-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This reverts a problematic commit modifying the turbostat utility that went in during the 4.13 cycle (Len Brown)" * tag 'pm-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "tools/power turbostat: stop migrating, unless '-m'" commit 27fdb35fe99011d86bcc54f62fe84712c53f4d05 Author: Paul E. McKenney Date: Thu Oct 19 14:26:21 2017 -0700 doc: Fix various RCU docbook comment-header problems Because many of RCU's files have not been included into docbook, a number of errors have accumulated. This commit fixes them. Signed-off-by: Paul E. McKenney Signed-off-by: Linus Torvalds include/linux/rculist.h | 2 +- include/linux/rcupdate.h | 22 ++++++++++++++-------- include/linux/srcu.h | 1 + kernel/rcu/srcutree.c | 2 +- kernel/rcu/sync.c | 9 ++++++--- kernel/rcu/tree.c | 18 ++++++++++-------- 6 files changed, 33 insertions(+), 21 deletions(-) commit 533966c8ad9ec779d81179ea6a182055066c62a3 Author: Paul E. McKenney Date: Thu Oct 19 14:26:20 2017 -0700 doc: Fix RCU's docbook options Commit 764f80798b95 ("doc: Add RCU files to docbook-generation files") added :external: options for RCU source files in the file Documentation/core-api/kernel-api.rst. However, this now means nothing, so this commit removes them. Reported-by: Randy Dunlap Reported-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Signed-off-by: Linus Torvalds Documentation/core-api/kernel-api.rst | 14 -------------- 1 file changed, 14 deletions(-) commit a961e40917fb14614d368d8bc9782ca4d6a8cd11 Author: Mathieu Desnoyers Date: Thu Oct 19 13:30:15 2017 -0400 membarrier: Provide register expedited private command This introduces a "register private expedited" membarrier command which allows eventual removal of important memory barrier constraints on the scheduler fast-paths. It changes how the "private expedited" membarrier command (new to 4.14) is used from user-space. This new command allows processes to register their intent to use the private expedited command. This affects how the expedited private command introduced in 4.14-rc is meant to be used, and should be merged before 4.14 final. Processes are now required to register before using MEMBARRIER_CMD_PRIVATE_EXPEDITED, otherwise that command returns EPERM. This fixes a problem that arose when designing requested extensions to sys_membarrier() to allow JITs to efficiently flush old code from instruction caches. Several potential algorithms are much less painful if the user register intent to use this functionality early on, for example, before the process spawns the second thread. Registering at this time removes the need to interrupt each and every thread in that process at the first expedited sys_membarrier() system call. Signed-off-by: Mathieu Desnoyers Acked-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Alexander Viro Signed-off-by: Linus Torvalds fs/exec.c | 1 + include/linux/mm_types.h | 3 +++ include/linux/sched/mm.h | 16 ++++++++++++++++ include/uapi/linux/membarrier.h | 23 ++++++++++++++++------- kernel/sched/membarrier.c | 34 ++++++++++++++++++++++++++++++---- 5 files changed, 66 insertions(+), 11 deletions(-) commit ea04efee7635c9120d015dcdeeeb6988130cb67a Author: Dmitry Torokhov Date: Sat Oct 7 11:07:47 2017 -0700 Input: ims-psu - check if CDC union descriptor is sane Before trying to use CDC union descriptor, try to validate whether that it is sane by checking that intf->altsetting->extra is big enough and that descriptor bLength is not too big and not too small. Reported-by: Andrey Konovalov Signed-off-by: Dmitry Torokhov drivers/input/misc/ims-pcu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 20ac95d52a28f55472a54cc751eeec49fd445cb1 Author: Roderick Colenbrander Date: Mon Oct 9 12:02:03 2017 -0700 Input: joydev - blacklist ds3/ds4/udraw motion sensors Introduce a device table used for blacklisting devices. We currently blacklist the motion sensor subdevice of THQ Udraw and Sony ds3/ds4. Signed-off-by: Roderick Colenbrander [dtor: siwtched to blacklist built on input_device_id and using input_match_device_id()] Signed-off-by: Dmitry Torokhov drivers/input/joydev.c | 70 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 6 deletions(-) commit 8724ecb072293f109a6f5dc93be8a98bf61fe14f Author: Dmitry Torokhov Date: Mon Oct 9 12:01:14 2017 -0700 Input: allow matching device IDs on property bits Let's allow matching input devices on their property bits, both in-kernel and when generating module aliases. Tested-by: Roderick Colenbrander Signed-off-by: Dmitry Torokhov drivers/input/input.c | 3 ++- include/linux/input.h | 4 ++++ include/linux/mod_devicetable.h | 3 +++ scripts/mod/devicetable-offsets.c | 1 + scripts/mod/file2alias.c | 6 +++++- 5 files changed, 15 insertions(+), 2 deletions(-) commit 55dfce873dca46df00304c44a568d7933bffff89 Author: Dmitry Torokhov Date: Mon Oct 9 11:09:33 2017 -0700 Input: factor out and export input_device_id matching code Factor out and export input_match_device_id() so that modules may use it. It will be needed by joydev to blacklist accelerometers in composite devices. Tested-by: Roderick Colenbrander Signed-off-by: Dmitry Torokhov drivers/input/input.c | 83 +++++++++++++++++++++++---------------------------- include/linux/input.h | 3 ++ 2 files changed, 41 insertions(+), 45 deletions(-) commit 9b5db7aab4d6b66f84f5e147c87eff4fe8b48651 Author: Paul Cercueil Date: Fri Oct 13 11:04:48 2017 -0700 Input: goodix - poll the 'buffer status' bit before reading data The Goodix panel triggers an interrupt on touch events. However, its registers will contain the valid values a short time after the interrupt, and not when it's raised. At that moment, the 'buffer status' bit is set. Previously, if the 'buffer status' bit was not set when the registers were read, the data was discarded and no input event was emitted, causing "finger down" or "finger up" events to be missed sometimes. This went unnoticed until v4.9, as the DesignWare I2C driver commonly used with this driver had enough latency for that bug to never trigger until commit 2702ea7dbec5 ("i2c: designware: wait for disable/enable only if necessary"). Now, in the IRQ handler we will poll (with a timeout) the 'buffer status' bit and process the data of the panel as soon as this bit gets set. Note that the Goodix panel will send a few spurious interrupts after the 'finger up' event, in which the 'buffer status' bit will never be set. Cc: Bastien Nocera Cc: russianneuromancer@ya.ru Signed-off-by: Paul Cercueil [hdegoede@redhat.com: Change poll loop to use jiffies, add comment about typical poll time] Signed-off-by: Hans de Goede [dtor: rearranged control flow a bit to avoid explicit goto and double check] Reviewed-by: Bastien Nocera Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 67 +++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 23 deletions(-) commit 481c209fa016a9e594427a306718cdf48ceeb1c6 Author: Hans de Goede Date: Thu Oct 19 15:38:50 2017 -0700 Input: axp20x-pek - fix module not auto-loading for axp221 pek Now that we have a platform_device_id table and multiple supported ids we should be using MODULE_DEVICE_TABLE instead of MODULE_ALIAS. This fixes a regression on Bay and Cherry Trail devices, where the power button is now enumerated as an "axp221-pek" and it was impossible to wakeup these devices from suspend since the module did not load. Fixes: c3cc94470bd3 ("Input: axp20x-pek - add support for AXP221 PEK") Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f75bc3377fa6f2af16383cc8346abd81909353f Author: Damien Riegel Date: Thu Oct 19 15:34:55 2017 -0700 Input: tca8418 - enable interrupt after it has been requested Currently, enabling keypad interrupts is one of the first operations done on the keypad, even before the interrupt is requested, so there is a small time window where the keypad can fire interrupts but the driver is not yet ready to handle them. It's fine for level interrupts because they will be handled anyway, but not so much for edge ones. This commit modifies and moves the function in charge of configuring the keypad. Enabling interrupts is now the last thing done on the keypad, and after the interrupt has been requested by the driver. Writing to the config register was also used to determine if the device was indeed present on the bus or not, this has been replaced by reading the lock/event count register to keep the same functionality. Signed-off-by: Damien Riegel Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 96f893abc87bd29339c973edf6068a064cb8a756 Merge: 962556b 8642b31 Author: Linus Torvalds Date: Thu Oct 19 16:18:58 2017 -0400 Merge branch 'parisc-4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Three small important fixes for the parisc architecture: - Export __cmpxchg_u64() symbol on 32bit kernel too. This unbreaks building the kernel with ixgbe kernel module. From Guenter Roeck. - Fix 64-bit atomic cmpxchg kernel helper function for 32-bit kernel in LWS code for userspace. This unbreaks e.g. the 64-bit variant of the glibc function __sync_fetch_and_add() with a 32-bit parisc kernel. From John David Anglin, tagged for backport to v3.13+. - Detect nonsynchronous CPU-internal cr16 cycle counters more reliable. This avoids stalled CPU warnings by the kernel soft lockup detector. From me, tagged for backport to v4.13+" * 'parisc-4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix detection of nonsynchronous cr16 cycle counters parisc: Export __cmpxchg_u64 unconditionally parisc: Fix double-word compare and exchange in LWS code on 32-bit kernels commit 962556b57c7dcc4510c2bd6cc332fc9c6bc87dc9 Merge: 73d3393 a91d661 Author: Linus Torvalds Date: Thu Oct 19 16:15:17 2017 -0400 Merge tag 'sound-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "We've got slightly more fixes than wished, but heading to a good shape. Most of changes are about HD-audio fixes, one for a buggy code that went into 4.13, and another for avoiding a crash due to buggy BIOS. Apart from HD-audio, a sequencer core change that is only for UP config (which must be pretty rare nowadays), and a USB-audio quirk as usual" * tag 'sound-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal ALSA: hda: Remove superfluous '-' added by printk conversion ALSA: hda: Abort capability probe at invalid register read ALSA: seq: Enable 'use' locking in all configurations ALSA: usb-audio: Add native DSD support for Pro-Ject Pre Box S2 Digital commit c8a8b7e672b74276abadcd987452acc8dc473aca Author: Andrea Arcangeli Date: Wed Oct 18 20:32:16 2017 +0200 Documentation: kernel-enforcement-statement.rst: Remove Red Hat markings Doc update because significance of corporate affiliation was unclear. Acked-by: Doug Ledford Acked-by: Paolo Bonzini Acked-by: Hans de Goede Acked-by: Xin Long Signed-off-by: Andrea Arcangeli Signed-off-by: Richard Fontana Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 528fd3547bad0bdd31c8f987e5bd00c83df8af39 Author: Trond Myklebust Date: Thu Oct 19 12:13:10 2017 -0400 SUNRPC: Destroy transport from the system workqueue The transport may need to flush transport connect and receive tasks that are running on rpciod. In order to do so safely, we need to ensure that the caller of cancel_work_sync() etc is not itself running on rpciod. Do so by running the destroy task from the system workqueue. Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 716479a39fc9f1f867735fc0dafaa8cd547bc72b Merge: 72ecd79 829e488 Author: Arnd Bergmann Date: Thu Oct 19 17:58:13 2017 +0200 Merge tag 'renesas-fixes-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Renesas ARM Based SoC Fixes for v4.14" from Simon Horman: Add 12V regulator to backlight allowing the power supply for the backlight to be found. * tag 'renesas-fixes-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: salvator-common: add 12V regulator to backlight commit 72ecd793865f91c3cdeb06884f230f38f434c67c Author: Ulf Hansson Date: Fri Oct 6 06:20:25 2017 +0200 ARM: ux500: Fix regression while init PM domains The commit afece3ab9a36 ("PM / Domains: Add time accounting to various genpd states") causes a boot regression for ux500. The problem occurs when the ux500 machine code calls pm_genpd_init(), which since the above change triggers a call to ktime_get(). More precisely, because ux500 initializes PM domains in the init_IRQ() phase of the boot, timekeeping has not yet been initialized. Fix the problem by moving the initialization of the PM domains to after timekeeping has been initialized. Fixes: afece3ab9a36 ("PM / Domains: Add time accounting to various genpd..") Cc: Thara Gopinath Cc: "Rafael J. Wysocki" Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/mach-ux500/cpu-db8500.c | 4 ++++ arch/arm/mach-ux500/pm.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8633e4f2e94a4d12cfb413fedfe4c072a6b99a79 Author: Linus Walleij Date: Mon Oct 16 16:26:07 2017 +0200 ARM: dts: fix PCLK name on Gemini and MOXA ART These platforms provide a clock to their watchdog, in each case this is the peripheral clock (PCLK), so explicitly name the clock in the device tree. Take this opportunity to add the "faraday,ftwdt010" compatible as fallback to the watchdog IP blocks. Cc: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/gemini.dtsi | 3 ++- arch/arm/boot/dts/moxart.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit be2f9d36b2b39aaf986c2206a64f957c449ac182 Merge: 611e91e f450f28 Author: Arnd Bergmann Date: Thu Oct 19 17:43:43 2017 +0200 Merge tag 'reset-fixes-for-4.14-2' of git://git.pengutronix.de/git/pza/linux into fixes Pull "Reset controller fixes for v4.14" from Philipp Zabel: Fix SoCFPGA reset controller for 64-bit systems. This patch removes the assumption that BITS_PER_LONG is 32, which is not the case on Stratix10. * tag 'reset-fixes-for-4.14-2' of git://git.pengutronix.de/git/pza/linux: reset: socfpga: fix for 64-bit compilation commit 611e91e15ef61e8c838c8695d593db919d9491c2 Merge: a777713 b521102 Author: Arnd Bergmann Date: Thu Oct 19 17:42:30 2017 +0200 Merge tag 'v4.14-rockchip-dts64fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Pull "Rockchip dts64 Fixes for 4.14 part 2" from Heiko Stübner: The vqmmc voltages on rk3399 pose a risk for the chip if they exceed 3.0V, so they got fixed to not be at 3.3V And Arnd found a typo in the recently added iommu nodes. * tag 'v4.14-rockchip-dts64fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: fix typo in iommu nodes arm64: dts: rockchip: correct vqmmc voltage for rk3399 platforms commit a777713c3aec461a4a4d516b45c799e7c5d847a9 Merge: 840907f 1c86c9d Author: Arnd Bergmann Date: Thu Oct 19 17:41:22 2017 +0200 Merge tag 'imx-fixes-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Pull "i.MX fixes for 4.14" from Shawn Guo: - Fix the legacy PCI interrupt numbers for i.MX7. The numbers were wrongly coded in an inverted order than what Reference Manual tells. It causes problem for PCI devices using legacy interrupt. * tag 'imx-fixes-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7d: Invert legacy PCI irq mapping commit 840907f94117f7a77846a8cfe3bca6ecabc0abe5 Merge: ca7325a 2bbbd96 Author: Arnd Bergmann Date: Thu Oct 19 17:40:11 2017 +0200 Merge tag 'mvebu-fixes-4.14-2' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu fixes for 4.14 (part 2)" from Gregory CLEMENT Two device tree related fixes: - One on Armada 38x using a other compatible string for I2C in order to cover an errata. - One for Armada 7K/8K fixing a typo on interrupt-map property for PCIe leading to fail PME and AER root port service initialization And the last one for the mbus fixing the window size calculation when it exceed 32bits * tag 'mvebu-fixes-4.14-2' of git://git.infradead.org/linux-mvebu: bus: mbus: fix window size calculation for 4GB windows ARM: dts: Fix I2C repeated start issue on Armada-38x arm64: dts: marvell: fix interrupt-map property for Armada CP110 PCIe controller commit ca7325a2b1fb6bba48e13afe4dce070e29467cc5 Merge: 4cb4261 27d90f4 Author: Arnd Bergmann Date: Thu Oct 19 17:36:08 2017 +0200 Merge tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes Fixes: second batch for 4.14: - one DT phy address fix for the new sama5d27 som1 ek - two DT ADC patches that were forgotten while moving to hardware triggers for sama5d2 (iio changes already applied) * tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sama5d2: add ADC hw trigger edge type ARM: dts: at91: sama5d2_xplained: enable ADTRG pin ARM: dts: at91: at91-sama5d27_som1: fix PHY ID commit 4cb4261dc2908557d04c982060982d69e809c25c Merge: 8a5776a 80a86db Author: Arnd Bergmann Date: Thu Oct 19 17:30:31 2017 +0200 Merge tag 'arm-soc/for-4.14/devicetree-fixes' of http://github.com/Broadcom/stblinux into fixes Pull "Broadcom devicetree fixes for 4.14" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC Device Tree fixes for 4.14, please pull the following: - Loic fixes the console path on the Raspberry Pi 3 which was not correctly set and would cause all sorts of confusion between the Bluetooth controller and the kernel console * tag 'arm-soc/for-4.14/devicetree-fixes' of http://github.com/Broadcom/stblinux: ARM: dts: bcm283x: Fix console path on RPi3 commit f04b9cc87b5fc466b1b7231ba7b078e885956c5b Author: Sagi Grimberg Date: Thu Oct 19 18:10:53 2017 +0300 nvme-rdma: Fix error status return in tagset allocation failure We should make sure to escelate allocation failures to prevent a use-after-free in nvmf_create_ctrl. Fixes: b28a308ee777 ("nvme-rdma: move tagset allocation to a dedicated routine") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bd9f07590a17f3158b51fb869dca723f1f606bdc Author: Sagi Grimberg Date: Thu Oct 19 16:00:30 2017 +0300 nvme-rdma: Fix possible double free in reconnect flow The fact that we free the async event buffer in nvme_rdma_destroy_admin_queue can cause us to free it more than once because this happens in every reconnect attempt since commit 31fdf1840170. we rely on the queue state flags DELETING to avoid this for other resources. A more complete fix is to not destroy the admin/io queues unconditionally on every reconnect attempt, but its a bit more extensive and will go in the next release. Fixes: 31fdf1840170 ("nvme-rdma: reuse configure/destroy_admin_queue") Reported-by: Yi Zhang Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0ce5cdc9d79277e55c3d80bf7d2b1adea2752078 Author: Dan Carpenter Date: Fri Sep 22 23:45:18 2017 +0300 ovl: Return -ENOMEM if an allocation fails ovl_lookup() The error code is missing here so it means we return ERR_PTR(0) or NULL. The other error paths all return an error code so this probably should as well. Fixes: 02b69b284cd7 ("ovl: lookup redirects") Signed-off-by: Dan Carpenter Reviewed-by: Chandan Rajendra Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 1 + 1 file changed, 1 insertion(+) commit b3885bd6edb41b91a0e3976469f72ae31bfb8d95 Author: Hirofumi Nakagawa Date: Tue Sep 26 03:09:53 2017 +0900 ovl: add NULL check in ovl_alloc_inode This was detected by fault injection test Signed-off-by: Hirofumi Nakagawa Fixes: 13cf199d0088 ("ovl: allocate an ovl_inode struct") Cc: # v4.13 fs/overlayfs/super.c | 3 +++ 1 file changed, 3 insertions(+) commit cc9085b6875323fd0c935ee7176583bb572821ee Merge: 33d930e ad98dd1 Author: Radim Krčmář Date: Thu Oct 19 14:42:09 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc Fix potential host oops and hangs. commit df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 Author: Xin Long Date: Tue Oct 17 23:26:10 2017 +0800 sctp: do not peel off an assoc from one netns to another one Now when peeling off an association to the sock in another netns, all transports in this assoc are not to be rehashed and keep use the old key in hashtable. As a transport uses sk->net as the hash key to insert into hashtable, it would miss removing these transports from hashtable due to the new netns when closing the sock and all transports are being freeed, then later an use-after-free issue could be caused when looking up an asoc and dereferencing those transports. This is a very old issue since very beginning, ChunYu found it with syzkaller fuzz testing with this series: socket$inet6_sctp() bind$inet6() sendto$inet6() unshare(0x40000000) getsockopt$inet_sctp6_SCTP_GET_ASSOC_ID_LIST() getsockopt$inet_sctp6_SCTP_SOCKOPT_PEELOFF() This patch is to block this call when peeling one assoc off from one netns to another one, so that the netns of all transport would not go out-sync with the key in hashtable. Note that this patch didn't fix it by rehashing transports, as it's difficult to handle the situation when the tuple is already in use in the new netns. Besides, no one would like to peel off one assoc to another netns, considering ipaddrs, ifaces, etc. are usually different. Reported-by: ChunYu Wang Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4bbb5083484016d4448739237aa1e6a9577ebb43 Merge: 3fd3b03 bc6d503 Author: David S. Miller Date: Thu Oct 19 13:14:03 2017 +0100 Merge branch 'bpf-Fix-for-BPF-devmap-percpu-allocation-splat' Daniel Borkmann says: ==================== bpf: Fix for BPF devmap percpu allocation splat The set fixes a splat in devmap percpu allocation when we alloc the flush bitmap. Patch 1 is a prerequisite for the fix in patch 2, patch 1 is rather small, so if this could be routed via -net, for example, with Tejun's Ack that would be good. Patch 3 gets rid of remaining PCPU_MIN_UNIT_SIZE checks, which are percpu allocator internals and should not be used. ==================== Signed-off-by: David S. Miller commit bc6d5031b43a2291de638ab9304320b4cae61689 Author: Daniel Borkmann Date: Tue Oct 17 16:55:54 2017 +0200 bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations PCPU_MIN_UNIT_SIZE is an implementation detail of the percpu allocator. Given we support __GFP_NOWARN now, lets just let the allocation request fail naturally instead. The two call sites from BPF mistakenly assumed __GFP_NOWARN would work, so no changes needed to their actual __alloc_percpu_gfp() calls which use the flag already. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/arraymap.c | 2 +- kernel/bpf/hashtab.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit 82f8dd28bd3abe181b7a66ea4ea132134d37a400 Author: Daniel Borkmann Date: Tue Oct 17 16:55:53 2017 +0200 bpf: fix splat for illegal devmap percpu allocation It was reported that syzkaller was able to trigger a splat on devmap percpu allocation due to illegal/unsupported allocation request size passed to __alloc_percpu(): [ 70.094249] illegal size (32776) or align (8) for percpu allocation [ 70.094256] ------------[ cut here ]------------ [ 70.094259] WARNING: CPU: 3 PID: 3451 at mm/percpu.c:1365 pcpu_alloc+0x96/0x630 [...] [ 70.094325] Call Trace: [ 70.094328] __alloc_percpu_gfp+0x12/0x20 [ 70.094330] dev_map_alloc+0x134/0x1e0 [ 70.094331] SyS_bpf+0x9bc/0x1610 [ 70.094333] ? selinux_task_setrlimit+0x5a/0x60 [ 70.094334] ? security_task_setrlimit+0x43/0x60 [ 70.094336] entry_SYSCALL_64_fastpath+0x1a/0xa5 This was due to too large max_entries for the map such that we surpassed the upper limit of PCPU_MIN_UNIT_SIZE. It's fine to fail naturally here, so switch to __alloc_percpu_gfp() and pass __GFP_NOWARN instead. Fixes: 11393cc9b9be ("xdp: Add batching support to redirect map") Reported-by: Mark Rutland Reported-by: Shankara Pailoor Reported-by: Richard Weinberger Signed-off-by: Daniel Borkmann Cc: John Fastabend Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/devmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ea7eeec24be5f04ae80d68f5b1ea3a11f49de2f Author: Daniel Borkmann Date: Tue Oct 17 16:55:52 2017 +0200 mm, percpu: add support for __GFP_NOWARN flag Add an option for pcpu_alloc() to support __GFP_NOWARN flag. Currently, we always throw a warning when size or alignment is unsupported (and also dump stack on failed allocation requests). The warning itself is harmless since we return NULL anyway for any failed request, which callers are required to handle anyway. However, it becomes harmful when panic_on_warn is set. The rationale for the WARN() in pcpu_alloc() is that it can be tracked when larger than supported allocation requests are made such that allocations limits can be tweaked if warranted. This makes sense for in-kernel users, however, there are users of pcpu allocator where allocation size is derived from user space requests, e.g. when creating BPF maps. In these cases, the requests should fail gracefully without throwing a splat. The current work-around was to check allocation size against the upper limit of PCPU_MIN_UNIT_SIZE from call-sites for bailing out prior to a call to pcpu_alloc() in order to avoid throwing the WARN(). This is bad in multiple ways since PCPU_MIN_UNIT_SIZE is an implementation detail, and having the checks on call-sites only complicates the code for no good reason. Thus, lets fix it generically by supporting the __GFP_NOWARN flag that users can then use with calling the __alloc_percpu_gfp() helper instead. Signed-off-by: Daniel Borkmann Cc: Tejun Heo Cc: Mark Rutland Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller mm/percpu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3fd3b03b4359852914b0a504cc87d1c1170c5d7c Merge: 28e33f9 a59df39 Author: David S. Miller Date: Thu Oct 19 12:49:16 2017 +0100 Merge branch 'ena-fixes' Netanel Belgazal says: ==================== ENA ethernet driver bug fixes Some fixes for ENA ethernet driver ==================== Signed-off-by: David S. Miller commit a59df396768a7e37c6ddafeb9666a30c8ac07854 Author: Netanel Belgazal Date: Tue Oct 17 07:33:05 2017 +0000 net: ena: fix wrong max Tx/Rx queues on ethtool ethtool ena_get_channels() expose the max number of queues as the max number of queues ENA supports (128 queues) and not the actual number of created queues. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 411838e7b41c52cf4afa51929cec54c2162472ff Author: Netanel Belgazal Date: Tue Oct 17 07:33:04 2017 +0000 net: ena: fix rare kernel crash when bar memory remap fails This failure is rare and only found on testing where deliberately fail devm_ioremap() [ 451.170464] ena 0000:04:00.0: failed to remap regs bar 451.170549] Workqueue: pciehp-1 pciehp_power_thread [ 451.170551] task: ffff88085a5f2d00 task.stack: ffffc9000756c000 [ 451.170552] RIP: 0010:devm_iounmap+0x2d/0x40 [ 451.170553] RSP: 0018:ffffc9000756fac0 EFLAGS: 00010282 [ 451.170554] RAX: 00000000fffffffe RBX: 0000000000000000 RCX: 0000000000000000 [ 451.170555] RDX: ffffffff813a7e00 RSI: 0000000000000282 RDI: 0000000000000282 [ 451.170556] RBP: ffffc9000756fac8 R08: 00000000fffffffe R09: 00000000000009b7 [ 451.170557] R10: 0000000000000005 R11: 00000000000009b6 R12: ffff880856c9d0a0 [ 451.170558] R13: ffffc9000f5c90c0 R14: ffff880856c9d0a0 R15: 0000000000000028 [ 451.170559] FS: 0000000000000000(0000) GS:ffff88085f400000(0000) knlGS:0000000000000000 [ 451.170560] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 451.170561] CR2: 00007f169038b000 CR3: 0000000001c09000 CR4: 00000000003406f0 [ 451.170562] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 451.170562] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 451.170563] Call Trace: [ 451.170572] ena_release_bars.isra.48+0x34/0x60 [ena] [ 451.170574] ena_probe+0x144/0xd90 [ena] [ 451.170579] ? ida_simple_get+0x98/0x100 [ 451.170585] ? kernfs_next_descendant_post+0x40/0x50 [ 451.170591] local_pci_probe+0x45/0xa0 [ 451.170592] pci_device_probe+0x157/0x180 [ 451.170599] driver_probe_device+0x2a8/0x460 [ 451.170600] __device_attach_driver+0x7e/0xe0 [ 451.170602] ? driver_allows_async_probing+0x30/0x30 [ 451.170603] bus_for_each_drv+0x68/0xb0 [ 451.170605] __device_attach+0xdd/0x160 [ 451.170607] device_attach+0x10/0x20 [ 451.170610] pci_bus_add_device+0x4f/0xa0 [ 451.170611] pci_bus_add_devices+0x39/0x70 [ 451.170613] pciehp_configure_device+0x96/0x120 [ 451.170614] pciehp_enable_slot+0x1b3/0x290 [ 451.170616] pciehp_power_thread+0x3b/0xb0 [ 451.170622] process_one_work+0x149/0x360 [ 451.170623] worker_thread+0x4d/0x3c0 [ 451.170626] kthread+0x109/0x140 [ 451.170627] ? rescuer_thread+0x380/0x380 [ 451.170628] ? kthread_park+0x60/0x60 [ 451.170632] ret_from_fork+0x25/0x30 Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd7aea1875c54c69a54a333b75e9d8732503f273 Author: Netanel Belgazal Date: Tue Oct 17 07:33:03 2017 +0000 net: ena: reduce the severity of some printouts Decrease log level of checksum errors as these messages can be triggered remotely by bad packets. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97819f943063b622eca44d3644067c190dc75039 Author: Wolfgang Grandegger Date: Thu Sep 14 18:37:14 2017 +0200 can: gs_usb: fix busy loop if no more TX context is available If sending messages with no cable connected, it quickly happens that there is no more TX context available. Then "gs_can_start_xmit()" returns with "NETDEV_TX_BUSY" and the upper layer does retry immediately keeping the CPU busy. To fix that issue, I moved "atomic_dec(&dev->active_tx_urbs)" from "gs_usb_xmit_callback()" to the TX done handling in "gs_usb_receive_bulk_callback()". Renaming "active_tx_urbs" to "active_tx_contexts" and moving it into "gs_[alloc|free]_tx_context()" would also make sense. Signed-off-by: Wolfgang Grandegger Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 72d92e865d1560723e1957ee3f393688c49ca5bf Author: Stefan Mätje Date: Wed Oct 18 13:25:17 2017 +0200 can: esd_usb2: Fix can_dlc value for received RTR, frames The dlc member of the struct rx_msg contains also the ESD_RTR flag to mark received RTR frames. Without the fix the can_dlc value for received RTR frames would always be set to 8 by get_can_dlc() instead of the received value. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Signed-off-by: Stefan Mätje Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a606223c6b5b7560da253ed52e62c67fa18e29b Author: Marc Kleine-Budde Date: Sat Jul 29 11:51:01 2017 +0200 can: af_can: can_pernet_init(): add missing error handling for kzalloc returning NULL This patch adds the missing check and error handling for out-of-memory situations, when kzalloc cannot allocate memory. Fixes: cb5635a36776 ("can: complete initial namespace support") Acked-by: Oliver Hartkopp Cc: linux-stable Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit cae1d5b78fb4874086170ad07921bca59ea2e893 Author: Marc Kleine-Budde Date: Tue Oct 17 07:18:35 2017 +0200 can: af_can: do not access proto_tab directly use rcu_access_pointer instead "proto_tab" is a RCU protected array, when directly accessing the array, sparse throws these warnings: CHECK /srv/work/frogger/socketcan/linux/net/can/af_can.c net/can/af_can.c:115:14: error: incompatible types in comparison expression (different address spaces) net/can/af_can.c:795:17: error: incompatible types in comparison expression (different address spaces) net/can/af_can.c:816:9: error: incompatible types in comparison expression (different address spaces) This patch fixes the problem by using rcu_access_pointer() and annotating "proto_tab" array as __rcu. Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62c04647c6f44fa3d5d0c077133da0aa1cbbc34c Author: Colin Ian King Date: Fri Sep 8 16:02:35 2017 +0100 can: bcm: check for null sk before deferencing it via the call to sock_net The assignment of net via call sock_net will dereference sk. This is performed before a sanity null check on sk, so there could be a potential null dereference on the sock_net call if sk is null. Fix this by assigning net after the sk null check. Also replace the sk == NULL with the more usual !sk idiom. Detected by CoverityScan CID#1431862 ("Dereference before null check") Fixes: 384317ef4187 ("can: network namespace support for CAN_BCM protocol") Signed-off-by: Colin Ian King Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/bcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fb5b91d61bebc24686ffc379138fd67808b1a1e6 Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 07:09:37 2017 +0000 can: flexcan: fix p1010 state transition issue Enable FLEXCAN_QUIRK_BROKEN_WERR_STATE and FLEXCAN_QUIRK_BROKEN_PERR_STATE for p1010 to report correct state transitions. Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Acked-by: Wolfgang Grandegger Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 083c5571290a2d4308b75f1a59cf376b6e907808 Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 07:08:23 2017 +0000 can: flexcan: fix i.MX28 state transition issue Enable FLEXCAN_QUIRK_BROKEN_PERR_STATE for i.MX28 to report correct state transitions, especially to error passive. Signed-off-by: Wolfgang Grandegger Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf9c04677f2bf599b44511963039ec6e25583feb Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 07:05:50 2017 +0000 can: flexcan: fix i.MX6 state transition issue Enable FLEXCAN_QUIRK_BROKEN_PERR_STATE for i.MX6 to report correct state transitions. Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Acked-by: Wolfgang Grandegger Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da49a8075c00b4d98ef069a0ee201177a8b79ead Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 07:03:58 2017 +0000 can: flexcan: implement error passive state quirk Add FLEXCAN_QUIRK_BROKEN_PERR_STATE for better description of the missing error passive interrupt quirk. Error interrupt flooding may happen if the broken error state quirk fix is enabled. For example, in case there is singled out node on the bus and the node sends a frame, then error interrupt flooding happens and will not stop because the node cannot go to bus off. The flooding will stop after another node connected to the bus again. If high bitrate configured on the low end system, then the flooding may causes performance issue, hence, this patch mitigates this by: 1. disable error interrupt upon error passive state transition 2. re-enable error interrupt upon error warning state transition 3. disable/enable error interrupt upon error active state transition depends on FLEXCAN_QUIRK_BROKEN_WERR_STATE In this way, the driver is still able to report correct state transitions without additional latency. When there are bus problems, flooding of error interrupts is limited to the number of frames required to change state from error warning to error passive if the core has [TR]WRN_INT connected (FLEXCAN_QUIRK_BROKEN_WERR_STATE is not enabled), otherwise, the flooding is limited to the number of frames required to change state from error active to error passive. Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Acked-by: Wolfgang Grandegger Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 75 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 9 deletions(-) commit 2f8639b24b4f4f9dd6cf7c1f2aea90e2fcbcc451 Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 07:01:23 2017 +0000 can: flexcan: rename legacy error state quirk Rename FLEXCAN_QUIRK_BROKEN_ERR_STATE to FLEXCAN_QUIRK_BROKEN_WERR_STATE for better description of the missing [TR]WRN_INT quirk. Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Acked-by: Wolfgang Grandegger Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ad2302345d59d29232cb668baaae9e840925d153 Author: ZHU Yi (ST-FIR/ENG1-Zhu) Date: Fri Sep 15 06:59:15 2017 +0000 can: flexcan: fix state transition regression Update state upon any interrupt to report correct state transitions in case the flexcan core enabled the broken error state quirk fix. Signed-off-by: Zhu Yi Signed-off-by: Mark Jonas Acked-by: Wolfgang Grandegger 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 59861701076b0cfac0b5eaa67a380fff6ab85b9e Author: Dmitry Mastykin Date: Wed Oct 18 17:21:02 2017 +0300 pinctrl: mcp23s08: fix interrupt handling regression interrupt handling was broken with conversion to using regmap caching. cached_gpio value was updated by boolean status instead of gpio reading. Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Tested-by: Phil Reid Signed-off-by: Dmitry Mastykin Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6afb10267c1692ada3a2903e31ea339917ad3ac0 Author: Daniel Drake Date: Mon Oct 2 12:00:54 2017 +0800 pinctrl/amd: fix masking of GPIO interrupts On Asus laptop models X505BA, X505BP, X542BA and X542BP, the i2c-hid touchpad (using a GPIO for interrupts) becomes unresponsive after a few minutes of usage, or after placing two fingers on the touchpad, which seems to have the effect of queuing up a large amount of input data to be transferred. When the touchpad is in unresponsive state, we observed that the GPIO level-triggered interrupt is still at it's active level, however the pinctrl-amd driver is not receiving/dispatching more interrupts at this point. After the initial interrupt arrives, amd_gpio_irq_mask() is called however we then see amd_gpio_irq_handler() being called repeatedly for the same irq; the interrupt mask is not taking effect because of the following sequence of events: - amd_gpio_irq_handler fires, reads and caches pin reg - amd_gpio_irq_handler calls generic_handle_irq() - During IRQ handling, amd_gpio_irq_mask() is called and modifies pin reg - amd_gpio_irq_handler clears interrupt by writing cached value The stale cached value written at the final stage undoes the masking. Fix this by re-reading the register before clearing the interrupt. I also spotted that the interrupt-clearing code can race against amd_gpio_irq_mask() / amd_gpio_irq_unmask(), so add locking there. Presumably this race was leading to the loss of interrupts. After these changes, the touchpad appears to be working fine. Signed-off-by: Daniel Drake Acked-by: Shah, Nehal-bakulchandra Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1ac7db63333db1eeff901bfd6bbcd502b4634fa4 Author: Mathias Nyman Date: Tue Oct 17 16:07:33 2017 +0300 usb: hub: Allow reset retry for USB2 devices on connect bounce If the connect status change is set during reset signaling, but the status remains connected just retry port reset. This solves an issue with connecting a 90W HP Thunderbolt 3 dock with a Lenovo Carbon x1 (5th generation) which causes a 30min loop of a high speed device being re-discovererd before usb ports starts working. [...] [ 389.023845] usb 3-1: new high-speed USB device number 55 using xhci_hcd [ 389.491841] usb 3-1: new high-speed USB device number 56 using xhci_hcd [ 389.959928] usb 3-1: new high-speed USB device number 57 using xhci_hcd [...] This is caused by a high speed device that doesn't successfully go to the enabled state after the second port reset. Instead the connection bounces (connected, with connect status change), bailing out completely from enumeration just to restart from scratch. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716332 Cc: Stable Signed-off-by: Mathias Nyman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e7d6a32f0d1505695d4417caf93e4a64c06ffe9f Merge: 1c0edc3 31dc3f8 Author: Greg Kroah-Hartman Date: Thu Oct 19 09:31:18 2017 +0200 Merge tag 'usb-serial-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.14-rc6 Here's a new metro-usb device id for another bar-code scanner. Signed-off-by: Johan Hovold commit 8642b31ba9eef8a01845146a26682d4869e62513 Author: Helge Deller Date: Wed Oct 18 22:25:00 2017 +0200 parisc: Fix detection of nonsynchronous cr16 cycle counters For CPUs which have an unknown or invalid CPU location (physical location) assume that their cycle counters aren't syncronized across CPUs. Signed-off-by: Helge Deller Fixes: c8c3735997a3 ("parisc: Enhance detection of synchronous cr16 clocksources") Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Helge Deller arch/parisc/kernel/time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f9cf2a64912d67c9cf49c316a0a0ada0ea7ed1da Author: James Smart Date: Wed Oct 18 14:33:59 2017 -0700 nvmet: synchronize sqhd update In testing target io in read write mix, we did indeed get into cases where sqhd didn't update properly and slowly missed enough updates to shutdown the queue. Protect the updating sqhd by using cmpxchg, and for that turn the sqhd field into a u32 so that cmpxchg works on it for all architectures. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 15 ++++++++++++--- drivers/nvme/target/nvmet.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) commit 2aae008ca6b3f5e978bea7aff265def4f2282f90 Author: Guenter Roeck Date: Sun Sep 24 10:28:09 2017 -0700 parisc: Export __cmpxchg_u64 unconditionally __cmpxchg_u64 is built and used outside CONFIG_64BIT and thus needs to be exported. This fixes the following build error seen when building parisc:allmodconfig. ERROR: "__cmpxchg_u64" [drivers/net/ethernet/intel/i40e/i40e.ko] undefined! Signed-off-by: Guenter Roeck Signed-off-by: Helge Deller arch/parisc/kernel/parisc_ksyms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 374b3bf8e8b519f61eb9775888074c6e46b3bf0c Author: John David Anglin Date: Sat Sep 30 17:24:23 2017 -0400 parisc: Fix double-word compare and exchange in LWS code on 32-bit kernels As discussed on the debian-hppa list, double-wordcompare and exchange operations fail on 32-bit kernels. Looking at the code, I realized that the ",ma" completer does the wrong thing in the "ldw,ma 4(%r26), %r29" instruction. This increments %r26 and causes the following store to write to the wrong location. Note by Helge Deller: The patch applies cleanly to stable kernel series if this upstream commit is merged in advance: f4125cfdb300 ("parisc: Avoid trashing sr2 and sr3 in LWS code"). Signed-off-by: John David Anglin Tested-by: Christoph Biedl Fixes: 89206491201c ("parisc: Implement new LWS CAS supporting 64 bit operations.") 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 b4714784df6afdf90e8bb70c381110e4299fab40 Author: Laura Abbott Date: Wed Oct 18 16:20:47 2017 -0700 Documentation: Add myself to the enforcement statement list I already Acked the patch, add my name to the list as well. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 2cb3a34abd035756f9ba3cde12f44f4b3e4c234b Merge: 3eea56c dd00ed9 Author: Dave Airlie Date: Thu Oct 19 15:00:47 2017 +1000 Merge tag 'drm-intel-fixes-2017-10-18-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Fix for stable: - Fix DDI translation tables for BDW (Chris). Critical fix: - Fix GPU Hang on GVT (Changbin). Other fixes: - Fix eviction when GGTT is idle (Chris). - CNL PLL fixes (Rodrigo). - Fix pwrite into shmemfs (Chris). - Mask bits for BXT and CHV L3 Workaround WaProgramL3SqcReg1Default (Oscar). * tag 'drm-intel-fixes-2017-10-18-1' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Use a mask when applying WaProgramL3SqcReg1Default drm/i915: Report -EFAULT before pwrite fast path into shmemfs drm/i915/cnl: Fix PLL initialization for HDMI. drm/i915/cnl: Fix PLL mapping. drm/i915: Use bdw_ddi_translations_fdi for Broadwell drm/i915: Fix eviction when the GGTT is idle but full drm/i915/gvt: Fix GPU hang after reusing vGPU instance across different guest OS commit 76ba89c76f2c74e208d93a9e7c698e39eeb3b85c Author: Colin Ian King Date: Mon Sep 4 18:50:05 2017 +0100 commoncap: move assignment of fs_ns to avoid null pointer dereference The pointer fs_ns is assigned from inode->i_ib->s_user_ns before a null pointer check on inode, hence if inode is actually null we will get a null pointer dereference on this assignment. Fix this by only dereferencing inode after the null pointer check on inode. Detected by CoverityScan CID#1455328 ("Dereference before null check") Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") Signed-off-by: Colin Ian King Cc: stable@vger.kernel.org Acked-by: Serge Hallyn Signed-off-by: James Morris security/commoncap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 494b9ae7abb84e6d88d7587906aff29dd26cf9d0 Merge: 73d3393 68a1fdb Author: James Morris Date: Thu Oct 19 12:28:38 2017 +1100 Merge commit 'tags/keys-fixes-20171018' into fixes-v4.14-rc5 commit c9bfb2f0031a2de664147ebbfb90f95bb12fdf79 Author: Chanwoo Choi Date: Wed Oct 18 17:28:36 2017 -0700 Input: stmfts - fix setting ABS_MT_POSITION_* maximum size The commit 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen) used the 'touchscreen_parse_properties()' helper function in order to get the value of common properties. But, commit 78bcac7b2ae1e didn't set the capability of ABS_MT_POSITION_* before calling touchscreen_parse_properties(). In result, the max_x and max_y of 'struct touchscreen_properties' were not set. Fixes: 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen") Cc: stable@vger.kernel.org Signed-off-by: Chanwoo Choi Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/stmfts.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cf5dd48907bebaefdb43a8ca079be77e8da2cb20 Author: Jeff Lance Date: Wed Oct 18 17:25:52 2017 -0700 Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen Step config setting for 5 wire touchscreen is incorrect for Y coordinates. It was broken while we moved to DT. If you look close at the offending commit bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made configurable"), the change was: - STEPCONFIG_XNP | STEPCONFIG_YPN; + ts_dev->bit_xn | ts_dev->bit_yp; while bit_xn = STEPCONFIG_XNN and bit_yp = STEPCONFIG_YNN. Not quite the same. Fixes: bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made configurable") Signed-off-by: Jeff Lance [vigneshr@ti.com: Rebase to v4.14-rc1] Signed-off-by: Vignesh R Reviewed-by: Michael Nazzareno Trimarchi Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ti_am335x_tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eea56cc5ab6992f4e1265b61e191a85fd183a08 Merge: a3a3d479 c945012 Author: Dave Airlie Date: Thu Oct 19 10:02:26 2017 +1000 Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Single amdgpu regression fix. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: Revert "drm/amdgpu: discard commands of killed processes" commit 357fdad075abb976ee43f2dd450c40dcef4b7e2d Author: Matthew Garrett Date: Wed Oct 18 13:56:26 2017 -0700 Convert fs/*/* to SB_I_VERSION [AV: in addition to the fix in previous commit] Signed-off-by: Matthew Garrett Cc: David Howells Cc: Alexander Viro Reviewed-by: David Howells Signed-off-by: Al Viro fs/btrfs/super.c | 2 +- fs/ext4/super.c | 4 ++-- fs/fuse/inode.c | 2 +- fs/xfs/xfs_super.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit a3a3d47935e0f31074c885b65c6869322e3e5044 Merge: 2de0307 4813766 Author: Dave Airlie Date: Thu Oct 19 08:09:57 2017 +1000 Merge branch 'linux-4.14' of git://github.com/skeggsb/linux into drm-fixes some nouveau fixes. * 'linux-4.14' of git://github.com/skeggsb/linux: drm/nouveau/fbcon: fix oops without fbdev emulation drm/nouveau/kms/nv50: fix oops during DP IRQ handling on non-MST boards drm/nouveau/bsp/g92: disable by default drm/nouveau/mmu: flush tlbs before deleting page tables commit 4813766325374af6ed0b66879ba6a0bbb05c83b6 Author: Pavel Roskin Date: Sat Sep 23 13:10:33 2017 -0700 drm/nouveau/fbcon: fix oops without fbdev emulation This is similar to an earlier commit 52dfcc5ccfbb ("drm/nouveau: fix for disabled fbdev emulation"), but protects all occurrences of helper.fbdev in the source. I see oops in nouveau_fbcon_accel_save_disable() called from nouveau_fbcon_set_suspend_work() on Linux 3.13 when CONFIG_DRM_FBDEV_EMULATION option is disabled. Signed-off-by: Pavel Roskin Reviewed-by: Daniel Vetter Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 513a6f750b836dd17bb6fe69aa83be59557903f3 Author: Dennis Dalessandro Date: Wed Oct 18 12:34:54 2017 -0700 Documentation: Sign kernel enforcement statement Add my name to the kernel enforcement statement as it is something I support speaking on my own behalf and not a statement of my current employer. Signed-off-by: Dennis Dalessandro Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit 73d3393ada4f70fa3df5639c8d438f2f034c0ecb Merge: 020b302 785545c Author: Linus Torvalds Date: Wed Oct 18 14:51:50 2017 -0400 Merge tag 'xfs-4.14-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - fix some more CONFIG_XFS_RT related build problems - fix data loss when writeback at eof races eofblocks gc and loses - invalidate page cache after fs finishes a dio write - remove dirty page state when invalidating pages so releasepage does the right thing when handed a dirty page * tag 'xfs-4.14-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: move two more RT specific functions into CONFIG_XFS_RT xfs: trim writepage mapping to within eof fs: invalidate page cache after end_io() in dio completion xfs: cancel dirty pages on invalidation commit 020b3023762fdf6cc816ed154e3b1f8eafaf0836 Merge: 3e0cc09 ffe51f0 Author: Linus Torvalds Date: Wed Oct 18 14:43:40 2017 -0400 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three small fixes: - A fix for skd, it was using kfree() to free a structure allocate with kmem_cache_alloc(). - Stable fix for nbd, fixing a regression using the normal ioctl based tools. - Fix for a previous fix in this series, that fixed up inconsistencies between buffered and direct IO" * 'for-linus' of git://git.kernel.dk/linux-block: fs: Avoid invalidation in interrupt context in dio_complete() nbd: don't set the device size until we're connected skd: Use kmem_cache_free commit 17c4dc6eb7e1b2fb1ce6a52467e3be635224606e Author: James Smart Date: Mon Oct 9 16:39:22 2017 -0700 nvme-fc: retry initial controller connections 3 times Currently, if a frame is lost of command fails as part of initial association create for a new controller, the new controller connection request will immediately fail. Add in an immediate 3 retry loop before giving up. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 8a82dbf19129dde9e6fc9ab25a00dbc7569abe6a Author: James Smart Date: Mon Oct 9 13:39:44 2017 -0700 nvme-fc: fix iowait hang Add missing iowait head initialization. Fix irqsave vs irq: wait_event_lock_irq() doesn't do irq save/restore Fixes: 36715cf4b366 ("nvme_fc: replace ioabort msleep loop with completion”) Cc: # 4.13 Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Himanshu Madhani Tested-by: Himanshu Madhani Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1c0edc3633b56000e18d82fc241e3995ca18a69e Author: Alan Stern Date: Wed Oct 18 12:49:38 2017 -0400 USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor() Andrey used the syzkaller fuzzer to find an out-of-bounds memory access in usb_get_bos_descriptor(). The code wasn't checking that the next usb_dev_cap_header structure could fit into the remaining buffer space. This patch fixes the error and also reduces the bNumDeviceCaps field in the header to match the actual number of capabilities found, in cases where there are fewer than expected. Reported-by: Andrey Konovalov Signed-off-by: Alan Stern Tested-by: Andrey Konovalov CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c94501279bb191ccf204f496e9576ce036f81bcd Author: Alex Deucher Date: Thu Oct 12 13:08:48 2017 -0400 Revert "drm/amdgpu: discard commands of killed processes" This causes instability in piglit. It's fixed in drm-next with: 515c6faf85970af529953ec137b4b6fcb3272e25 1650c14b459ff9c85767746f1ef795a780653128 214a91e6bfabaa6cbfa692df8732000aab050795 29d253553559dba919315be847f4f2cce29edd42 79867462634836ee5c39a2cdf624719feeb189bd This reverts commit 6af0883ed9770cf9b0a4f224c91481484cd1b025. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit 4572f0539c731c588cdce9575cb7d60ef23a521d Author: Long Li Date: Sun Oct 1 19:30:24 2017 -0700 CIFS: SMBD: Fix the definition for SMB2_CHANNEL_RDMA_V1_INVALIDATE The channel value for requesting server remote invalidating local memory registration should be 0x00000002 Signed-off-by: Long Li Signed-off-by: Steve French fs/cifs/smb2pdu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cb3def44ce834e5ea462fd900505af4cd68b3d5 Author: Ronnie Sahlberg Date: Thu Sep 28 09:39:58 2017 +1000 cifs: handle large EA requests more gracefully in smb2+ Update reading the EA using increasingly larger buffer sizes until the response will fit in the buffer, or we exceed the (arbitrary) maximum set to 64kb. Without this change, a user is able to add more and more EAs using setfattr until the point where the total space of all EAs exceed 2kb at which point the user can no longer list the EAs at all and getfattr will abort with an error. The same issue still exists for EAs in SMB1. Signed-off-by: Ronnie Sahlberg Reported-by: Xiaoli Feng Signed-off-by: Steve French fs/cifs/smb2maperror.c | 2 +- fs/cifs/smb2ops.c | 31 +++++++++++++++++++++++++------ fs/cifs/smb2pdu.c | 6 +++--- fs/cifs/smb2pdu.h | 3 ++- fs/cifs/smb2proto.h | 1 + 5 files changed, 32 insertions(+), 11 deletions(-) commit 06e2290844fa408d3295ac03a1647f0798518ebe Author: Steve French Date: Mon Sep 25 20:11:58 2017 -0500 Fix encryption labels and lengths for SMB3.1.1 SMB3.1.1 is most secure and recent dialect. Fixup labels and lengths for sMB3.1.1 signing and encryption. Signed-off-by: Steve French CC: Stable fs/cifs/cifsglob.h | 8 ++++++-- fs/cifs/smb2transport.c | 26 ++++++++++++++------------ 2 files changed, 20 insertions(+), 14 deletions(-) commit 3587cddfacf67cf50d288572453eb47ff2603575 Author: Trond Myklebust Date: Wed Oct 18 12:11:58 2017 -0400 Add ack for Trond Myklebust to the enforcement statement Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit e3aca5508d509363778bda04b1fd53731d809fce Author: Eduardo Valentin Date: Tue Oct 17 08:06:53 2017 -0700 Documentation: update kernel enforcement support list Adding myself to the list as I missed the window to be in the original patch. Cc: Jonathan Corbet Cc: Bart Van Assche Cc: Namhyung Kim Cc: Olof Johansson Cc: Juergen Gross Cc: Javier Martinez Canillas Signed-off-by: Eduardo Valentin Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit d950770f628d54f74f995d9ec495733ab2fe9e60 Author: Stephen Hemminger Date: Wed Oct 18 09:16:15 2017 -0700 Documentation: add my name to supporters Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) commit dd00ed9eff1e1819922f91da965f0e57e6a94216 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 (cherry picked from commit 930a784d02339be437fec07b3bb7213bde0ed53b) Signed-off-by: Rodrigo Vivi 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 ca8d7822054287352c41ff38f656e68fef959732 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 (cherry picked from commit a6d65e451cc4e7127698384868a4447ee7be7d16) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ac7f2c315ef76437f5119df354d334448534fb5 Author: Andy Lutomirski Date: Sat Oct 14 09:59:51 2017 -0700 x86/mm: Remove debug/x86/tlb_defer_switch_to_init_mm Borislav thinks that we don't need this knob in a released kernel. Get rid of it. Requested-by: Borislav Petkov Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b956575bed91 ("x86/mm: Flush more aggressively in lazy TLB mode") Link: http://lkml.kernel.org/r/1fa72431924e81e86c164ff7881bf9240d1f1a6c.1508000261.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 20 ++++++++------ arch/x86/mm/tlb.c | 58 ----------------------------------------- 2 files changed, 12 insertions(+), 66 deletions(-) commit 4e57b94664fef55aa71cac33b4632fdfdd52b695 Author: Andy Lutomirski Date: Sat Oct 14 09:59:50 2017 -0700 x86/mm: Tidy up "x86/mm: Flush more aggressively in lazy TLB mode" Due to timezones, commit: b956575bed91 ("x86/mm: Flush more aggressively in lazy TLB mode") was an outdated patch that well tested and fixed the bug but didn't address Borislav's review comments. Tidy it up: - The name "tlb_use_lazy_mode()" was highly confusing. Change it to "tlb_defer_switch_to_init_mm()", which describes what it actually means. - Move the static_branch crap into a helper. - Improve comments. Actually removing the debugfs option is in the next patch. Reported-by: Borislav Petkov Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b956575bed91 ("x86/mm: Flush more aggressively in lazy TLB mode") Link: http://lkml.kernel.org/r/154ef95428d4592596b6e98b0af1d2747d6cfbf8.1508000261.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 7 ++++++- arch/x86/mm/tlb.c | 30 ++++++++++++++++++------------ 2 files changed, 24 insertions(+), 13 deletions(-) commit e8b9b0cc8269c85d8167aaee024bfcbb4976c031 Author: Andy Lutomirski Date: Sat Oct 14 09:59:49 2017 -0700 x86/mm/64: Remove the last VM_BUG_ON() from the TLB code Let's avoid hard-to-diagnose crashes in the future. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f423bbc97864089fbdeb813f1ea126c6eaed844a.1508000261.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 723f2828a98c8ca19842042f418fb30dd8cfc0f7 Author: Borislav Petkov Date: Wed Oct 18 13:12:25 2017 +0200 x86/microcode/intel: Disable late loading on model 79 Blacklist Broadwell X model 79 for late loading due to an erratum. Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171018111225.25635-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/intel.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c97d96b4e612c7dc1b37d7afc61b598a9a25994d Author: Phil Elwell Date: Sun Sep 24 15:20:49 2017 +0100 staging: bcm2835-audio: Fix memory corruption The previous commit (0adbfd46) fixed a memory leak but also freed a block in the success case, causing a stale pointer to be used with potentially fatal results. Only free the vchi_instance block in the case that vchi_connect fails; once connected, the instance is retained for subsequent connections. Simplifying the code by removing a bunch of gotos and returning errors directly. Signed-off-by: Phil Elwell Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") Cc: stable # 4.12+ Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 28e33f9d78eefe98ea86673ab31e988b37a9a738 Author: Jakub Kicinski Date: Mon Oct 16 11:16:55 2017 -0700 bpf: disallow arithmetic operations on context pointer Commit f1174f77b50c ("bpf/verifier: rework value tracking") removed the crafty selection of which pointer types are allowed to be modified. This is OK for most pointer types since adjust_ptr_min_max_vals() will catch operations on immutable pointers. One exception is PTR_TO_CTX which is now allowed to be offseted freely. The intent of aforementioned commit was to allow context access via modified registers. The offset passed to ->is_valid_access() verifier callback has been adjusted by the value of the variable offset. What is missing, however, is taking the variable offset into account when the context register is used. Or in terms of the code adding the offset to the value passed to the ->convert_ctx_access() callback. This leads to the following eBPF user code: r1 += 68 r0 = *(u32 *)(r1 + 8) exit being translated to this in kernel space: 0: (07) r1 += 68 1: (61) r0 = *(u32 *)(r1 +180) 2: (95) exit Offset 8 is corresponding to 180 in the kernel, but offset 76 is valid too. Verifier will "accept" access to offset 68+8=76 but then "convert" access to offset 8 as 180. Effective access to offset 248 is beyond the kernel context. (This is a __sk_buff example on a debug-heavy kernel - packet mark is 8 -> 180, 76 would be data.) Dereferencing the modified context pointer is not as easy as dereferencing other types, because we have to translate the access to reading a field in kernel structures which is usually at a different offset and often of a different size. To allow modifying the pointer we would have to make sure that given eBPF instruction will always access the same field or the fields accessed are "compatible" in terms of offset and size... Disallow dereferencing modified context pointers and add to selftests the test case described here. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Edward Cree Signed-off-by: David S. Miller kernel/bpf/verifier.c | 8 ++++++-- tools/testing/selftests/bpf/test_verifier.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) commit 74f8e22c153f4464060a0c2e4cfd1d6e51af2109 Author: Li Zhijian Date: Wed Oct 18 16:34:09 2017 +0800 perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu In debian/ubuntu, libc.so is located at a different place, /lib/x86_64-linux-gnu/libc-2.23.so, so it outputs like this when testing: PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.040 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.040/0.040/0.040/0.000 ms 0.000 probe_libc:inet_pton:(7f0e2db741c0)) __GI___inet_pton (/lib/x86_64-linux-gnu/libc-2.23.so) getaddrinfo (/lib/x86_64-linux-gnu/libc-2.23.so) [0xffffa9d40f34ff4d] (/bin/ping) Fix up the libc path to make sure this test works in more OSes. Committer testing: When this test fails one can use 'perf test -v', i.e. in verbose mode, where it'll show the expected backtrace, so, after applying this test: On Fedora 26: # perf test -v ping 62: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 23322 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.058 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.058/0.058/0.058/0.000 ms 0.000 probe_libc:inet_pton:(7fe344310d80)) __GI___inet_pton (/usr/lib64/libc-2.25.so) getaddrinfo (/usr/lib64/libc-2.25.so) _init (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok # Signed-off-by: Li Zhijian Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Kim Phillips Cc: Li Zhijian Cc: Peter Zijlstra Cc: Philip Li Link: http://lkml.kernel.org/r/1508315649-18836-1-git-send-email-lizhijian@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3d8bba9535ac6e79453c769dd0c8ea852a51ad60 Author: Jin Yao Date: Wed Oct 18 23:11:18 2017 +0800 perf xyarray: Fix wrong processing when closing evsel fd In current xyarray code, xyarray__max_x() returns max_y, and xyarray__max_y() returns max_x. It's confusing and for code logic it looks not correct. Error happens when closing evsel fd. Let's see this scenario: 1. Allocate an fd (pseudo-code) perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) { evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); } xyarray__new(int xlen, int ylen, size_t entry_size) { size_t row_size = ylen * entry_size; struct xyarray *xy = zalloc(sizeof(*xy) + xlen * row_size); xy->entry_size = entry_size; xy->row_size = row_size; xy->entries = xlen * ylen; xy->max_x = xlen; xy->max_y = ylen; ...... } So max_x is ncpus, max_y is nthreads and row_size = nthreads * 4. 2. Use perf syscall and get the fd int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, struct thread_map *threads) { for (cpu = 0; cpu < cpus->nr; cpu++) { for (thread = 0; thread < nthreads; thread++) { int fd, group_fd; fd = sys_perf_event_open(&evsel->attr, pid, cpus->map[cpu], group_fd, flags); FD(evsel, cpu, thread) = fd; } } static inline void *xyarray__entry(struct xyarray *xy, int x, int y) { return &xy->contents[x * xy->row_size + y * xy->entry_size]; } These codes don't have issues. The issue happens in the closing of fd. 3. Close fd. void perf_evsel__close_fd(struct perf_evsel *evsel) { int cpu, thread; for (cpu = 0; cpu < xyarray__max_x(evsel->fd); cpu++) for (thread = 0; thread < xyarray__max_y(evsel->fd); ++thread) { close(FD(evsel, cpu, thread)); FD(evsel, cpu, thread) = -1; } } Since xyarray__max_x() returns max_y (nthreads) and xyarry__max_y() returns max_x (ncpus), so above code is actually to be: for (cpu = 0; cpu < nthreads; cpu++) for (thread = 0; thread < ncpus; ++thread) { close(FD(evsel, cpu, thread)); FD(evsel, cpu, thread) = -1; } It's not correct! This change is introduced by "475fb533fb7d" ("perf evsel: Fix buffer overflow while freeing events") This fix is to let xyarray__max_x() return max_x (ncpus) and let xyarry__max_y() return max_y (nthreads) Committer note: This was also fixed by Ravi Bangoria, who provided the same patch, noticing the problem with 'perf record': I see 'perf record -p ' crashes with following log: *** Error in `./perf': free(): invalid next size (normal): 0x000000000298b340 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f7fd85c87e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f7fd85d137a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f7fd85d553c] ./perf(perf_evsel__close+0xb4)[0x4b7614] ./perf(perf_evlist__delete+0x100)[0x4ab180] ./perf(cmd_record+0x1d9)[0x43a5a9] ./perf[0x49aa2f] ./perf(main+0x631)[0x427841] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f7fd8571830] ./perf(_start+0x29)[0x427a59] Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Cc: Ravi Bangoria Fixes: d74be4767367 ("perf xyarray: Save max_x, max_y") Link: http://lkml.kernel.org/r/1508339478-26674-1-git-send-email-yao.jin@linux.intel.com Link: http://lkml.kernel.org/r/1508327446-15302-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/xyarray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48044eb490be71c203e14dd89e8bae87209eab52 Author: Johannes Berg Date: Mon Oct 16 17:09:53 2017 +0200 netlink: fix netlink_ack() extack race It seems that it's possible to toggle NETLINK_F_EXT_ACK through setsockopt() while another thread/CPU is building a message inside netlink_ack(), which could then trigger the WARN_ON()s I added since if it goes from being turned off to being turned on between allocating and filling the message, the skb could end up being too small. Avoid this whole situation by storing the value of this flag in a separate variable and using that throughout the function instead. Fixes: 2d4bc93368f5 ("netlink: extended ACK reporting") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2de09681e4ce8b1caa79d2e4482b72d8ef41c550 Author: Thomas Falcon Date: Mon Oct 16 10:02:11 2017 -0500 ibmvnic: Fix calculation of number of TX header descriptors This patch correctly sets the number of additional header descriptors that will be sent in an indirect SCRQ entry. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d965465b60bad79d0b067f1009ba80ae76a6561a Author: Ido Schimmel Date: Mon Oct 16 16:28:28 2017 +0200 mlxsw: core: Fix possible deadlock When an EMAD is transmitted, a timeout work item is scheduled with a delay of 200ms, so that another EMAD will be retried until a maximum of five retries. In certain situations, it's possible for the function waiting on the EMAD to be associated with a work item that is queued on the same workqueue (`mlxsw_core`) as the timeout work item. This results in flushing a work item on the same workqueue. According to commit e159489baa71 ("workqueue: relax lockdep annotation on flush_work()") the above may lead to a deadlock in case the workqueue has only one worker active or if the system in under memory pressure and the rescue worker is in use. The latter explains the very rare and random nature of the lockdep splats we have been seeing: [ 52.730240] ============================================ [ 52.736179] WARNING: possible recursive locking detected [ 52.742119] 4.14.0-rc3jiri+ #4 Not tainted [ 52.746697] -------------------------------------------- [ 52.752635] kworker/1:3/599 is trying to acquire lock: [ 52.758378] (mlxsw_core_driver_name){+.+.}, at: [] flush_work+0x3a4/0x5e0 [ 52.767837] but task is already holding lock: [ 52.774360] (mlxsw_core_driver_name){+.+.}, at: [] process_one_work+0x7d4/0x12f0 [ 52.784495] other info that might help us debug this: [ 52.791794] Possible unsafe locking scenario: [ 52.798413] CPU0 [ 52.801144] ---- [ 52.803875] lock(mlxsw_core_driver_name); [ 52.808556] lock(mlxsw_core_driver_name); [ 52.813236] *** DEADLOCK *** [ 52.819857] May be due to missing lock nesting notation [ 52.827450] 3 locks held by kworker/1:3/599: [ 52.832221] #0: (mlxsw_core_driver_name){+.+.}, at: [] process_one_work+0x7d4/0x12f0 [ 52.842846] #1: ((&(&bridge->fdb_notify.dw)->work)){+.+.}, at: [] process_one_work+0x7d4/0x12f0 [ 52.854537] #2: (rtnl_mutex){+.+.}, at: [] rtnl_lock+0x17/0x20 [ 52.863021] stack backtrace: [ 52.867890] CPU: 1 PID: 599 Comm: kworker/1:3 Not tainted 4.14.0-rc3jiri+ #4 [ 52.875773] Hardware name: Mellanox Technologies Ltd. "MSN2100-CB2F"/"SA001017", BIOS 5.6.5 06/07/2016 [ 52.886267] Workqueue: mlxsw_core mlxsw_sp_fdb_notify_work [mlxsw_spectrum] [ 52.894060] Call Trace: [ 52.909122] __lock_acquire+0xf6f/0x2a10 [ 53.025412] lock_acquire+0x158/0x440 [ 53.047557] flush_work+0x3c4/0x5e0 [ 53.087571] __cancel_work_timer+0x3ca/0x5e0 [ 53.177051] cancel_delayed_work_sync+0x13/0x20 [ 53.182142] mlxsw_reg_trans_bulk_wait+0x12d/0x7a0 [mlxsw_core] [ 53.194571] mlxsw_core_reg_access+0x586/0x990 [mlxsw_core] [ 53.225365] mlxsw_reg_query+0x10/0x20 [mlxsw_core] [ 53.230882] mlxsw_sp_fdb_notify_work+0x2a3/0x9d0 [mlxsw_spectrum] [ 53.237801] process_one_work+0x8f1/0x12f0 [ 53.321804] worker_thread+0x1fd/0x10c0 [ 53.435158] kthread+0x28e/0x370 [ 53.448703] ret_from_fork+0x2a/0x40 [ 53.453017] mlxsw_spectrum 0000:01:00.0: EMAD retries (2/5) (tid=bf4549b100000774) [ 53.453119] mlxsw_spectrum 0000:01:00.0: EMAD retries (5/5) (tid=bf4549b100000770) [ 53.453132] mlxsw_spectrum 0000:01:00.0: EMAD reg access failed (tid=bf4549b100000770,reg_id=200b(sfn),type=query,status=0(operation performed)) [ 53.453143] mlxsw_spectrum 0000:01:00.0: Failed to get FDB notifications Fix this by creating another workqueue for EMAD timeouts, thereby preventing the situation of a work item trying to flush a work item queued on the same workqueue. Fixes: caf7297e7ab5f ("mlxsw: core: Introduce support for asynchronous EMAD register access") Signed-off-by: Ido Schimmel Reported-by: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3e0cc09a3a2c40ec1ffb6b4e12da86e98feccb11 Merge: 96b0e52 9ed9512 Author: Linus Torvalds Date: Wed Oct 18 06:47:59 2017 -0400 Merge tag 'enforcement-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull enforcement policy update from Greg KH: "Documentation: Add a file explaining the requested Linux kernel license enforcement policy Here's a new file to the kernel's Documentation directory. It adds a short document describing the views of how the Linux kernel community feels about enforcing the license of the kernel. The patch has been reviewed by a large number of kernel developers already, as seen by their acks on the patch, and their agreement of the statement with their names on it. The location of the file was also agreed upon by the Documentation maintainer, so all should be good there. For some background information about this statement, see this article written by some of the kernel developers involved in drafting it: http://kroah.com/log/blog/2017/10/16/linux-kernel-community-enforcement-statement/ and this article that answers a number of questions that came up in the discussion of this statement with the kernel developer community: http://kroah.com/log/blog/2017/10/16/linux-kernel-community-enforcement-statement-faq/ If anyone has any further questions about it, please let me, and the TAB members, know and we will be glad to help answer them" * tag 'enforcement-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: Add a file explaining the Linux kernel license enforcement policy commit 96b0e525af62eb3dcc084b091b40add082467150 Merge: 503f7e2 0015a97 Author: Linus Torvalds Date: Wed Oct 18 06:45:52 2017 -0400 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Two bug fixes: - A fix for cputime accounting vs CPU hotplug - Add two options to zfcpdump_defconfig to make SCSI dump work again" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix zfcpdump-config s390/cputime: fix guest/irq/softirq times after CPU hotplug commit 503f7e297d76bf109533eef3287ad821f05e47a4 Merge: ebe6e90 6575257 Author: Linus Torvalds Date: Wed Oct 18 06:43:30 2017 -0400 Merge tag 'trace-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Testing a new trace event format, I triggered a bug by doing: # modprobe trace-events-sample # echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable # rmmod trace-events-sample This would cause an oops. The issue is that I added another trace event sample that reused a reg function of another trace event to create a thread to call the tracepoints. The problem was that the reg function couldn't handle nested calls (reg; reg; unreg; unreg;) and created two threads (instead of one) and only removed one on exit. This isn't a critical bug as the bug is only in sample code. But sample code should be free of known bugs to prevent others from copying it. This is why this is also marked for stable" * tag 'trace-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/samples: Fix creation and deletion of simple_thread_fn creation commit a6189d371d05863720e4381361f83ce5d376fad7 Author: Bard Liao Date: Mon Oct 16 19:15:14 2017 +0800 ASoC: rt5659: connect LOUT Amp with Charge Pump "Charge Pump" is necessary for "LOUT Amp". Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 1 + 1 file changed, 1 insertion(+) commit d1e84308ac8ad945a77f4fd7b08725d14181703b Author: Bard Liao Date: Mon Oct 16 19:15:13 2017 +0800 ASoC: rt5659: register power bit of LOUT Amp There is a power bit for LOUT Amp. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a91d66129fb9bcead12af3ed2008d6ddbf179509 Author: Takashi Iwai Date: Mon Oct 16 11:39:28 2017 +0200 ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal The commit 99b5c5bb9a54 ("ALSA: hda - Remove the use of set_fs()") converted the get_kctl_0dB_offset() call for killing set_fs() usage in HD-audio codec code. The conversion assumed that the TLV callback used in HD-audio code is only snd_hda_mixer_amp() and applies the TLV calculation locally. Although this assumption is correct, and all slave kctls are actually with that callback, the current code is still utterly buggy; it doesn't hit this condition and falls back to the next check. It's because the function gets called after adding slave kctls to vmaster. By assigning a slave kctl, the slave kctl object is faked inside vmaster code, and the whole kctl ops are overridden. Thus the callback op points to a different value from what we've assumed. More badly, as reported by the KERNEXEC and UDEREF features of PaX, the code flow turns into the unexpected pitfall. The next fallback check is SNDRV_CTL_ELEM_ACCESS_TLV_READ access bit, and this always hits for each kctl with TLV. Then it evaluates the callback function pointer wrongly as if it were a TLV array. Although currently its side-effect is fairly limited, this incorrect reference may lead to an unpleasant result. For addressing the regression, this patch introduces a new helper to vmaster code, snd_ctl_apply_vmaster_slaves(). This works similarly like the existing map_slaves() in hda_codec.c: it loops over the slave list of the given master, and applies the given function to each slave. Then the initializer function receives the right kctl object and we can compare the correct pointer instead of the faked one. Also, for catching the similar breakage in future, give an error message when the unexpected TLV callback is found and bail out immediately. Fixes: 99b5c5bb9a54 ("ALSA: hda - Remove the use of set_fs()") Reported-by: PaX Team Cc: # v4.13 Signed-off-by: Takashi Iwai include/sound/control.h | 3 ++ sound/core/vmaster.c | 31 +++++++++++++++ sound/pci/hda/hda_codec.c | 97 +++++++++++++++++++++++++++-------------------- 3 files changed, 89 insertions(+), 42 deletions(-) commit 6bf88a343db2b3c160edf9b82a74966b31cc80bd Author: Takashi Iwai Date: Tue Oct 17 11:58:17 2017 +0200 ALSA: hda: Remove superfluous '-' added by printk conversion While converting the error messages to the standard macros in the commit 4e76a8833fac ("ALSA: hda - Replace with standard printk"), a superfluous '-' slipped in the code mistakenly. Its influence is almost negligible, merely shows a dB value as negative integer instead of positive integer (or vice versa) in the rare error message. So let's kill this embarrassing byte to show more correct value. Fixes: 4e76a8833fac ("ALSA: hda - Replace with standard printk") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 098a0a62c1554f5a3813ef1b8539563214ada8f6 Author: Takashi Iwai Date: Tue Oct 17 16:38:55 2017 +0200 ALSA: hda: Abort capability probe at invalid register read The loop in snd_hdac_bus_parse_capabilities() may go to nirvana when it hits an invalid register value read: BUG: unable to handle kernel paging request at ffffad5dc41f3fff IP: pci_azx_readl+0x5/0x10 [snd_hda_intel] Call Trace: snd_hdac_bus_parse_capabilities+0x3c/0x1f0 [snd_hda_core] azx_probe_continue+0x7d5/0x940 [snd_hda_intel] ..... This happened on a new Intel machine, and we need to check the value and abort the loop accordingly. [Note: the fixes tag below indicates only the commit where this patch can be applied; the original problem was introduced even before that commit] Fixes: 6720b38420a0 ("ALSA: hda - move bus_parse_capabilities to core") Cc: Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 5 +++++ 1 file changed, 5 insertions(+) commit d824c7a8e88a7162d14782e73a6a6c867a266500 Author: Leonard Crestez Date: Fri Oct 13 19:37:31 2017 +0300 regulator: rn5t618: Do not index regulator_desc arrays by id The regulator_desc arrays in this driver are indexed by RN5T618_* constants and some elements can be missing. This causes probe failures on older models: rn5t618-regulator rn5t618-regulator: failed to register (null) regulator rn5t618-regulator: probe of rn5t618-regulator failed with error -22 Fix this by making the arrays flat. This also saves a little memory because the regulator_desc arrays become smaller. Signed-off-by: Leonard Crestez Fixes: 83b2a3c2ab24 ("regulator: rn5t618: add RC5T619 PMIC support") Signed-off-by: Mark Brown drivers/regulator/rn5t618-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68a1fdbbf8bd3378325e45c19e167a165f9ffc3a Author: Eric Sesterhenn Date: Sun Oct 8 20:02:32 2017 +0200 pkcs7: Prevent NULL pointer dereference, since sinfo is not always set. The ASN.1 parser does not necessarily set the sinfo field, this patch prevents a NULL pointer dereference on broken input. Fixes: 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type") Signed-off-by: Eric Sesterhenn Signed-off-by: David Howells cc: stable@vger.kernel.org # 4.3+ crypto/asymmetric_keys/pkcs7_parser.c | 3 +++ 1 file changed, 3 insertions(+) commit ab5c69f01313c80df948e4f768efe616258f85f4 Author: Eric Biggers Date: Wed Sep 27 12:50:46 2017 -0700 KEYS: load key flags and expiry time atomically in proc_keys_show() In proc_keys_show(), the key semaphore is not held, so the key ->flags and ->expiry can be changed concurrently. We therefore should read them atomically just once. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/proc.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 9d6c8711b6a751a694bcfaf49fb557b82092ee46 Author: Eric Biggers Date: Wed Sep 27 12:50:45 2017 -0700 KEYS: Load key expiry time atomically in keyring_search_iterator() Similar to the case for key_validate(), we should load the key ->expiry once atomically in keyring_search_iterator(), since it can be changed concurrently with the flags whenever the key semaphore isn't held. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1823d475a5eeaa0f52789b1b7e2d31a592ae92ea Author: Eric Biggers Date: Wed Sep 27 12:50:44 2017 -0700 KEYS: load key flags and expiry time atomically in key_validate() In key_validate(), load the flags and expiry time once atomically, since these can change concurrently if key_validate() is called without the key semaphore held. And we don't want to get inconsistent results if a variable is referenced multiple times. For example, key->expiry was referenced in both 'if (key->expiry)' and in 'if (now.tv_sec >= key->expiry)', making it theoretically possible to see a spurious EKEYEXPIRED while the expiration time was being removed, i.e. set to 0. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/permission.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 60ff5b2f547af3828aebafd54daded44cfb0807a Author: David Howells Date: Thu Oct 12 16:00:41 2017 +0100 KEYS: don't let add_key() update an uninstantiated key Currently, when passed a key that already exists, add_key() will call the key's ->update() method if such exists. But this is heavily broken in the case where the key is uninstantiated because it doesn't call __key_instantiate_and_link(). Consequently, it doesn't do most of the things that are supposed to happen when the key is instantiated, such as setting the instantiation state, clearing KEY_FLAG_USER_CONSTRUCT and awakening tasks waiting on it, and incrementing key->user->nikeys. It also never takes key_construction_mutex, which means that ->instantiate() can run concurrently with ->update() on the same key. In the case of the "user" and "logon" key types this causes a memory leak, at best. Maybe even worse, the ->update() methods of the "encrypted" and "trusted" key types actually just dereference a NULL pointer when passed an uninstantiated key. Change key_create_or_update() to wait interruptibly for the key to finish construction before continuing. This patch only affects *uninstantiated* keys. For now we still allow a negatively instantiated key to be updated (thereby positively instantiating it), although that's broken too (the next patch fixes it) and I'm not sure that anyone actually uses that functionality either. Here is a simple reproducer for the bug using the "encrypted" key type (requires CONFIG_ENCRYPTED_KEYS=y), though as noted above the bug pertained to more than just the "encrypted" key type: #include #include #include int main(void) { int ringid = keyctl_join_session_keyring(NULL); if (fork()) { for (;;) { const char payload[] = "update user:foo 32"; usleep(rand() % 10000); add_key("encrypted", "desc", payload, sizeof(payload), ringid); keyctl_clear(ringid); } } else { for (;;) request_key("encrypted", "desc", "callout_info", ringid); } } It causes: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: encrypted_update+0xb0/0x170 PGD 7a178067 P4D 7a178067 PUD 77269067 PMD 0 PREEMPT SMP CPU: 0 PID: 340 Comm: reproduce Tainted: G D 4.14.0-rc1-00025-g428490e38b2e #796 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff8a467a39a340 task.stack: ffffb15c40770000 RIP: 0010:encrypted_update+0xb0/0x170 RSP: 0018:ffffb15c40773de8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8a467a275b00 RCX: 0000000000000000 RDX: 0000000000000005 RSI: ffff8a467a275b14 RDI: ffffffffb742f303 RBP: ffffb15c40773e20 R08: 0000000000000000 R09: ffff8a467a275b17 R10: 0000000000000020 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8a4677057180 R15: ffff8a467a275b0f FS: 00007f5d7fb08700(0000) GS:ffff8a467f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 0000000077262005 CR4: 00000000001606f0 Call Trace: key_create_or_update+0x2bc/0x460 SyS_add_key+0x10c/0x1d0 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x7f5d7f211259 RSP: 002b:00007ffed03904c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 000000003b2a7955 RCX: 00007f5d7f211259 RDX: 00000000004009e4 RSI: 00000000004009ff RDI: 0000000000400a04 RBP: 0000000068db8bad R08: 000000003b2a7955 R09: 0000000000000004 R10: 000000000000001a R11: 0000000000000246 R12: 0000000000400868 R13: 00007ffed03905d0 R14: 0000000000000000 R15: 0000000000000000 Code: 77 28 e8 64 34 1f 00 45 31 c0 31 c9 48 8d 55 c8 48 89 df 48 8d 75 d0 e8 ff f9 ff ff 85 c0 41 89 c4 0f 88 84 00 00 00 4c 8b 7d c8 <49> 8b 75 18 4c 89 ff e8 24 f8 ff ff 85 c0 41 89 c4 78 6d 49 8b RIP: encrypted_update+0xb0/0x170 RSP: ffffb15c40773de8 CR2: 0000000000000018 Cc: # v2.6.12+ Reported-by: Eric Biggers Signed-off-by: David Howells cc: Eric Biggers security/keys/key.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 363b02dab09b3226f3bd1420dad9c72b79a42a76 Author: David Howells Date: Wed Oct 4 16:43:25 2017 +0100 KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unioned with the payload pointers. This deals with the problem that the state is spread over three different objects (two bits and a separate variable) and reading or updating them atomically isn't practical, given that not only can uninstantiated keys change into instantiated or rejected keys, but rejected keys can also turn into instantiated keys - and someone accessing the key might not be using any locking. The main side effect of this problem is that what was held in the payload may change, depending on the state. For instance, you might observe the key to be in the rejected state. You then read the cached error, but if the key semaphore wasn't locked, the key might've become instantiated between the two reads - and you might now have something in hand that isn't actually an error code. The state is now KEY_IS_UNINSTANTIATED, KEY_IS_POSITIVE or a negative error code if the key is negatively instantiated. The key_is_instantiated() function is replaced with key_is_positive() to avoid confusion as negative keys are also 'instantiated'. Additionally, barriering is included: (1) Order payload-set before state-set during instantiation. (2) Order state-read before payload-read when using the key. Further separate barriering is necessary if RCU is being used to access the payload content after reading the payload pointers. Fixes: 146aa8b1453b ("KEYS: Merge the type-specific data with the payload data") Cc: stable@vger.kernel.org # v4.4+ Reported-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: Eric Biggers include/linux/key.h | 47 ++++++++++++++++++++------------ net/dns_resolver/dns_key.c | 2 +- security/keys/big_key.c | 4 +-- security/keys/encrypted-keys/encrypted.c | 2 +- security/keys/gc.c | 8 +++--- security/keys/key.c | 31 +++++++++++++-------- security/keys/keyctl.c | 9 +++--- security/keys/keyring.c | 10 +++---- security/keys/proc.c | 7 +++-- security/keys/process_keys.c | 2 +- security/keys/request_key.c | 7 ++--- security/keys/request_key_auth.c | 2 +- security/keys/trusted.c | 2 +- security/keys/user_defined.c | 4 +-- 14 files changed, 80 insertions(+), 57 deletions(-) commit b3811d36a3e7e7e8ed660bf01151496cf99cf9ed Author: Chun-Yi Lee Date: Wed Oct 4 16:45:09 2017 +0800 KEYS: checking the input id parameters before finding asymmetric key For finding asymmetric key, the input id_0 and id_1 parameters can not be NULL at the same time. This patch adds the BUG_ON checking for id_0 and id_1. Cc: David Howells Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: Chun-Yi Lee Signed-off-by: David Howells crypto/asymmetric_keys/asymmetric_type.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a6d2a77addce6bc26ccb53df34478b1593f0fbf Author: Chun-Yi Lee Date: Wed Oct 4 19:18:22 2017 +0800 KEYS: Fix the wrong index when checking the existence of second id Fix the wrong index number when checking the existence of second id in function of finding asymmetric key. The id_1 is the second id that the index in array must be 1 but not 0. Fixes: 9eb029893ad5 (KEYS: Generalise x509_request_asymmetric_key()) Cc: David Howells Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: Chun-Yi Lee Signed-off-by: David Howells crypto/asymmetric_keys/asymmetric_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cd18d1981731d5f74b8e437009124ac99905d14 Author: Arnd Bergmann Date: Wed Oct 4 12:27:00 2017 +0200 security/keys: BIG_KEY requires CONFIG_CRYPTO The recent rework introduced a possible randconfig build failure when CONFIG_CRYPTO configured to only allow modules: security/keys/big_key.o: In function `big_key_crypt': big_key.c:(.text+0x29f): undefined reference to `crypto_aead_setkey' security/keys/big_key.o: In function `big_key_init': big_key.c:(.init.text+0x1a): undefined reference to `crypto_alloc_aead' big_key.c:(.init.text+0x45): undefined reference to `crypto_aead_setauthsize' big_key.c:(.init.text+0x77): undefined reference to `crypto_destroy_tfm' crypto/gcm.o: In function `gcm_hash_crypt_remain_continue': gcm.c:(.text+0x167): undefined reference to `crypto_ahash_finup' crypto/gcm.o: In function `crypto_gcm_exit_tfm': gcm.c:(.text+0x847): undefined reference to `crypto_destroy_tfm' When we 'select CRYPTO' like the other users, we always get a configuration that builds. Fixes: 428490e38b2e ("security/keys: rewrite all of big_key crypto") Signed-off-by: Arnd Bergmann Signed-off-by: David Howells security/keys/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0bfe649fbb1337400065fa47679b381b2ac845f0 Author: Toke Høiland-Jørgensen Date: Mon Oct 16 17:05:57 2017 +0200 fq_impl: Properly enforce memory limit The fq structure would fail to properly enforce the memory limit in the case where the packet being enqueued was bigger than the packet being removed to bring the memory usage down. So keep dropping packets until the memory usage is back below the limit. Also, fix the statistics for memory limit violations. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg include/net/fq_impl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e5f5ce37a7918ed7406c52987c7cc8b670ed5e14 Author: Johannes Berg Date: Wed Oct 18 09:36:51 2017 +0200 mac80211: validate user rate mask before configuring driver Ben reported that when the user rate mask is rejected for not matching any basic rate, the driver had already been configured. This is clearly an oversight in my original change, fix this by doing the validation before calling the driver. Reported-by: Ben Greear Fixes: e8e4f5280ddd ("mac80211: reject/clear user rate mask if not usable") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 51e13359cd5ea34acc62c90627603352956380af Author: Johannes Berg Date: Tue Oct 17 21:56:20 2017 +0200 cfg80211: fix connect/disconnect edge cases If we try to connect while already connected/connecting, but this fails, we set ssid_len=0 but leave current_bss hanging, leading to errors. Check all of this better, first of all ensuring that we can't try to connect to a different SSID while connected/ing; ensure that prev_bssid is set for re-association attempts even in the case of the driver supporting the connect() method, and don't reset ssid_len in the failure cases. While at it, also reset ssid_len while disconnecting unless we were connected and expect a disconnected event, and warn on a successful connection without ssid_len being set. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/wireless/sme.c | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) commit 2bdd713b92a9cade239d3c7d15205a09f556624d Author: Jason A. Donenfeld Date: Tue Oct 17 20:32:07 2017 +0200 mac80211: use constant time comparison with keys Otherwise we risk leaking information via timing side channel. Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything") Signed-off-by: Jason A. Donenfeld Signed-off-by: Johannes Berg net/mac80211/key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8009d506a1dd00cf436b0c4cca0dcec130580a21 Author: Ben Hutchings Date: Wed Oct 18 00:45:49 2017 +0100 ALSA: seq: Enable 'use' locking in all configurations The 'use' locking macros are no-ops if neither SMP or SND_DEBUG is enabled. This might once have been OK in non-preemptible configurations, but even in that case snd_seq_read() may sleep while relying on a 'use' lock. So always use the proper implementations. Cc: stable@vger.kernel.org Signed-off-by: Ben Hutchings Signed-off-by: Takashi Iwai sound/core/seq/seq_lock.c | 4 ---- sound/core/seq/seq_lock.h | 12 ------------ 2 files changed, 16 deletions(-) commit 587c3c9f286cee5c9cac38d28c8ae1875f4ec85b Author: Ben Hutchings Date: Sun Oct 15 18:16:33 2017 +0100 scsi: sg: Re-fix off by one in sg_fill_request_table() Commit 109bade9c625 ("scsi: sg: use standard lists for sg_requests") introduced an off-by-one error in sg_ioctl(), which was fixed by commit bd46fc406b30 ("scsi: sg: off by one in sg_ioctl()"). Unfortunately commit 4759df905a47 ("scsi: sg: factor out sg_fill_request_table()") moved that code, and reintroduced the bug (perhaps due to a botched rebase). Fix it again. Fixes: 4759df905a47 ("scsi: sg: factor out sg_fill_request_table()") Cc: stable@vger.kernel.org Signed-off-by: Ben Hutchings Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c97cc7dbce2fe6f46e137f4b040f915a0181ee85 Author: Len Brown Date: Tue Oct 17 16:00:02 2017 -0400 Revert "tools/power turbostat: stop migrating, unless '-m'" This reverts commit c91fc8519d87715a3a173475ea3778794c139996. That change caused a C6 and PC6 residency regression on large idle systems. Users also complained about new output indicating jitter: turbostat: cpu6 jitter 3794 9142 Signed-off-by: Len Brown Cc: 4.13+ # v4.13+ Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 883b3b6567bfc8b5da7b3f0cec80513af111d2f5 Author: Tony Lindgren Date: Mon Oct 16 14:06:14 2017 -0700 i2c: omap: Fix error handling for clk_get() Otherwise we can get the following if the fck alias is missing: Unable to handle kernel paging request at virtual address fffffffe ... PC is at clk_get_rate+0x8/0x10 LR is at omap_i2c_probe+0x278/0x6ec ... [] (clk_get_rate) from [] (omap_i2c_probe+0x278/0x6ec) [] (omap_i2c_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x264/0x2ec) [] (driver_probe_device) from [] (bus_for_each_drv+0x70/0xb8) [] (bus_for_each_drv) from [] (__device_attach+0xcc/0x13c) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (deferred_probe_work_func+0x4c/0x14c) Signed-off-by: Tony Lindgren Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-omap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ebe6e90ccc6679cb01d2b280e4b61e6092d4bedb Merge: 3728e6a 8d30371 Author: Linus Torvalds Date: Tue Oct 17 15:54:41 2017 -0400 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four mostly error leg fixes and one more important regression in a prior commit (the qla2xxx one)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fc: check for rport presence in fc_block_scsi_eh scsi: qla2xxx: Fix uninitialized work element scsi: libiscsi: fix shifting of DID_REQUEUE host byte scsi: libfc: fix a deadlock in fc_rport_work scsi: fixup kernel warning during rmmod() commit 6575257c60e1a26a5319ccf2b5ce5b6449001017 Author: Steven Rostedt (VMware) Date: Tue Oct 17 14:55:24 2017 -0400 tracing/samples: Fix creation and deletion of simple_thread_fn creation Commit 7496946a8 ("tracing: Add samples of DECLARE_EVENT_CLASS() and DEFINE_EVENT()") added template examples for all the events. It created a DEFINE_EVENT_FN() example which reused the foo_bar_reg and foo_bar_unreg functions. Enabling both the TRACE_EVENT_FN() and DEFINE_EVENT_FN() example trace events caused the foo_bar_reg to be called twice, creating the test thread twice. The foo_bar_unreg would remove it only once, even if it was called multiple times, leaving a thread existing when the module is unloaded, causing an oops. Add a ref count and allow foo_bar_reg() and foo_bar_unreg() be called by multiple trace events. Cc: stable@vger.kernel.org Fixes: 7496946a8 ("tracing: Add samples of DECLARE_EVENT_CLASS() and DEFINE_EVENT()") Signed-off-by: Steven Rostedt (VMware) samples/trace_events/trace-events-sample.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b521102d935d0501f5d95242ade2988f3f069c77 Author: Arnd Bergmann Date: Tue Oct 10 10:56:01 2017 +0200 arm64: dts: rockchip: fix typo in iommu nodes The latest dtc warns about an extraneous cell in the interrupt property of two of the iommu device nodes: Warning (interrupts_property): interrupts size is (16), expected multiple of 12 in /iommu@ff373f00 Warning (interrupts_property): interrupts size is (16), expected multiple of 12 in /iommu@ff900800 This removes the typo. Fixes: cede4c79de28 ("arm64: dts: rockchip: add rk3368 iommu nodes") Fixes: 49c82f2b7c5d ("arm64: dts: rockchip: add rk3328 iommu nodes") Signed-off-by: Arnd Bergmann Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b31ce3041787b61f2dad39d2dcda5c4a81d10e2b Author: Shawn Lin Date: Tue Oct 17 11:38:04 2017 +0800 arm64: dts: rockchip: correct vqmmc voltage for rk3399 platforms The vcc_sd or vcc_sdio used for IO voltage for sdmmc and sdio interface on rk3399 platform have a limitation that it can't be larger than 3.0v, otherwise it has a potential risk for the chip. Correct all of them. Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board") Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Fixes: 8164a84cca12 ("arm64: dts: rockchip: Add support for rk3399 sapphire SOM") Cc: stable@vger.kernel.org Signed-off-by: Shawn Lin Tested-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 4 ++-- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 4 ++-- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit ffe51f0142a291a957eebb9687cafb15f2b3fc14 Author: Lukas Czerner Date: Tue Oct 17 08:43:09 2017 -0600 fs: Avoid invalidation in interrupt context in dio_complete() Currently we try to defer completion of async DIO to the process context in case there are any mapped pages associated with the inode so that we can invalidate the pages when the IO completes. However the check is racy and the pages can be mapped afterwards. If this happens we might end up calling invalidate_inode_pages2_range() in dio_complete() in interrupt context which could sleep. This can be reproduced by generic/451. Fix this by passing the information whether we can or can't invalidate to the dio_complete(). Thanks Eryu Guan for reporting this and Jan Kara for suggesting a fix. Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO") Reported-by: Eryu Guan Reviewed-by: Jan Kara Tested-by: Eryu Guan Signed-off-by: Lukas Czerner Signed-off-by: Jens Axboe fs/direct-io.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 671632a019853744bc6c0b2ed8bcfdbcea371848 Author: Bin Liu Date: Tue Oct 17 08:22:25 2017 -0500 MAINTAINERS: fix git tree url for musb module Commit 3b2435192fe91 ("MAINTAINERS: drop OMAP USB and MUSB maintainership") switched the maintainer for musb module, but didn't update the git tree location. Delete the git tree information, since the current maintainer doesn't have a public tree. Reported-by: Jonathan Liu Signed-off-by: Bin Liu Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 7f0cd23615040b9e53bb4980c986b721cba08bbc Author: Namhyung Kim Date: Tue Oct 17 22:29:00 2017 +0900 perf buildid-list: Fix crash when processing PERF_RECORD_NAMESPACE Thomas reported that 'perf buildid-list' gets a SEGFAULT due to NULL pointer deref when he ran it on a data with namespace events. It was because the buildid_id__mark_dso_hit_ops lacks the namespace event handler and perf_too__fill_default() didn't set it. Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () Missing separate debuginfos, use: dnf debuginfo-install audit-libs-2.7.7-1.fc25.s390x bzip2-libs-1.0.6-21.fc25.s390x elfutils-libelf-0.169-1.fc25.s390x +elfutils-libs-0.169-1.fc25.s390x libcap-ng-0.7.8-1.fc25.s390x numactl-libs-2.0.11-2.ibm.fc25.s390x openssl-libs-1.1.0e-1.1.ibm.fc25.s390x perl-libs-5.24.1-386.fc25.s390x +python-libs-2.7.13-2.fc25.s390x slang-2.3.0-7.fc25.s390x xz-libs-5.2.3-2.fc25.s390x zlib-1.2.8-10.fc25.s390x (gdb) where #0 0x0000000000000000 in ?? () #1 0x00000000010fad6a in machines__deliver_event (machines=, machines@entry=0x2c6fd18, evlist=, event=event@entry=0x3fffdf00470, sample=0x3ffffffe880, sample@entry=0x3ffffffe888, tool=tool@entry=0x1312968 , file_offset=1136) at util/session.c:1287 #2 0x00000000010fbf4e in perf_session__deliver_event (file_offset=1136, tool=0x1312968 , sample=0x3ffffffe888, event=0x3fffdf00470, session=0x2c6fc30) at util/session.c:1340 #3 perf_session__process_event (session=0x2c6fc30, session@entry=0x0, event=event@entry=0x3fffdf00470, file_offset=file_offset@entry=1136) at util/session.c:1522 #4 0x00000000010fddde in __perf_session__process_events (file_size=11880, data_size=, data_offset=, session=0x0) at util/session.c:1899 #5 perf_session__process_events (session=0x0, session@entry=0x2c6fc30) at util/session.c:1953 #6 0x000000000103b2ac in perf_session__list_build_ids (with_hits=, force=) at builtin-buildid-list.c:83 #7 cmd_buildid_list (argc=, argv=) at builtin-buildid-list.c:115 #8 0x00000000010a026c in run_builtin (p=0x1311f78 , argc=argc@entry=2, argv=argv@entry=0x3fffffff3c0) at perf.c:296 #9 0x000000000102bc00 in handle_internal_command (argv=, argc=2) at perf.c:348 #10 run_argv (argcp=, argv=) at perf.c:392 #11 main (argc=, argv=0x3fffffff3c0) at perf.c:536 (gdb) Fix it by adding a stub event handler for namespace event. Committer testing: Further clarifying, plain using 'perf buildid-list' will not end up in a SEGFAULT when processing a perf.data file with namespace info: # perf record -a --namespaces sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.024 MB perf.data (1058 samples) ] # perf buildid-list | wc -l 38 # perf buildid-list | head -5 e2a171c7b905826fc8494f0711ba76ab6abbd604 /lib/modules/4.14.0-rc3+/build/vmlinux 874840a02d8f8a31cedd605d0b8653145472ced3 /lib/modules/4.14.0-rc3+/kernel/arch/x86/kvm/kvm-intel.ko ea7223776730cd8a22f320040aae4d54312984bc /lib/modules/4.14.0-rc3+/kernel/drivers/gpu/drm/i915/i915.ko 5961535e6732a8edb7f22b3f148bb2fa2e0be4b9 /lib/modules/4.14.0-rc3+/kernel/drivers/gpu/drm/drm.ko f045f54aa78cf1931cc893f78b6cbc52c72a8cb1 /usr/lib64/libc-2.25.so # It is only when one asks for checking what of those entries actually had samples, i.e. when we use either -H or --with-hits, that we will process all the PERF_RECORD_ events, and since tools/perf/builtin-buildid-list.c neither explicitely set a perf_tool.namespaces() callback nor the default stub was set that we end up, when processing a PERF_RECORD_NAMESPACE record, causing a SEGFAULT: # perf buildid-list -H Segmentation fault (core dumped) ^C # Reported-and-Tested-by: Thomas-Mich Richter Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Hari Bathini Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Thomas-Mich Richter Fixes: f3b3614a284d ("perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info") Link: http://lkml.kernel.org/r/20171017132900.11043-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 ++ 1 file changed, 2 insertions(+) commit 3f50f614d61f91ad30b1947c429d1f235493a7f9 Author: Taeung Song Date: Sat Oct 14 00:10:12 2017 +0900 perf record: Fix documentation for a inexistent option '-l' 'perf record' had a '-l' option that meant "scale counter values" a very long time ago, but it currently belongs to 'perf stat' as '-c'. So remove it. I found this problem in the below case. $ perf record -e cycles -l sleep 3 Error: unknown switch `l Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1507907412-19813-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2811501e6d8f5747d08f8e25b9ecf472d0dc4c7d Author: Felipe Balbi Date: Tue Oct 3 11:16:43 2017 +0300 usb: quirks: add quirk for WORLDE MINI MIDI keyboard This keyboard doesn't implement Get String descriptors properly even though string indexes are valid. What happens is that when requesting for the String descriptor, the device disconnects and reconnects. Without this quirk, this loop will continue forever. Cc: Alan Stern Reported-by: Владимир Мартьянов Cc: stable Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3728e6a255b50382591ee374c70e6f5276a47d0a Merge: 33d930e ead6660 Author: Linus Torvalds Date: Tue Oct 17 06:23:09 2017 -0400 Merge tag 'media/v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Core fixes: - cec: Respond to unregistered initiators, when applicable - dvb_frontend: only use kref after initialized Driver-specific fixes: - qcom, camss: Make function vfe_set_selection static - qcom: VIDEO_QCOM_CAMSS should depend on HAS_DMA - s5p-cec: add NACK detection support - media: staging/imx: Fix uninitialized variable warning - dib3000mc: i2c transfers over usb cannot be done from stack - venus: init registered list on streamoff" * tag 'media/v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: dvb_frontend: only use kref after initialized media: platform: VIDEO_QCOM_CAMSS should depend on HAS_DMA media: cec: Respond to unregistered initiators, when applicable media: s5p-cec: add NACK detection support media: staging/imx: Fix uninitialized variable warning media: qcom: camss: Make function vfe_set_selection static media: venus: init registered list on streamoff media: dvb: i2c transfers over usb cannot be done from stack commit 6ed05c68cbcae42cd52b8e53b66952bfa9c002ce Author: Jonathan Liu Date: Mon Oct 9 22:46:13 2017 -0500 usb: musb: sunxi: Explicitly release USB PHY on exit This fixes a kernel oops when unloading the driver due to usb_put_phy being called after usb_phy_generic_unregister when the device is detached. Calling usb_phy_generic_unregister causes x->dev->driver to be NULL in usb_put_phy and results in a NULL pointer dereference. Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Jonathan Liu Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/sunxi.c | 2 ++ 1 file changed, 2 insertions(+) commit 445ef61543da3db5b699f87fb0aa4f227165f6ed Author: Jonathan Liu Date: Mon Oct 9 22:46:12 2017 -0500 usb: musb: Check for host-mode using is_host_active() on reset interrupt The sunxi musb has a bug where sometimes it will generate a babble error on device disconnect instead of a disconnect IRQ. When this happens the musb controller switches from host mode to device mode (it clears MUSB_DEVCTL_HM/MUSB_DEVCTL_SESSION and sets MUSB_DEVCTL_BDEVICE) and gets stuck in this state. The babble error is misdetected as a bus reset because MUSB_DEVCTL_HM was cleared. To fix this, use is_host_active() rather than (devctl & MUSB_DEVCTL_HM) to detect babble error so that sunxi musb babble recovery can handle it by restoring the mode. This information is provided by the driver logic and does not rely on register contents. Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Jonathan Liu Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 297d7fe9e439473800ab1f2f853b4b5f8c888500 Author: Alexandre Bailon Date: Mon Oct 9 22:46:11 2017 -0500 usb: musb: musb_cppi41: Configure the number of channels for DA8xx Currently, the number of channels is set to 15 but in the case of DA8xx, the number of channels is 4. Update the driver to configure the number of channels at runtime. Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alexandre Bailon Tested-by: Sekhar Nori Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit e10c5b0c773efb8643ee89d387d310584ca30830 Author: Alexandre Bailon Date: Mon Oct 9 22:46:10 2017 -0500 usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx The way to configure the DMA mode on DA8xx is different from DSPS. Add a new function to configure DMA mode on DA8xx and use a callback to call the right function based on the platform. Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alexandre Bailon Tested-by: Sekhar Nori Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit bfa53e0e366b98185fadb03f7916d1538cb90ebd Author: Alexandre Bailon Date: Mon Oct 9 22:46:09 2017 -0500 usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers The DA8xx and DSPS platforms don't use the same address for few registers. On Da8xx, this is causing some issues (e.g. teardown that doesn't work). Configure the address of the register during the init and use them instead of constants. Cc: stable@vger.kernel.org # v4.12+ Reported-by: nsekhar@ti.com Signed-off-by: Alexandre Bailon Tested-by: Sekhar Nori Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 Author: Johan Hovold Date: Mon Oct 9 22:46:08 2017 -0500 USB: musb: fix late external abort on suspend The musb delayed irq work was never flushed on suspend, something which since 4.9 can lead to an external abort if the work is scheduled after the grandparent's clock has been disabled: PM: Suspending system (mem) PM: suspend of devices complete after 125.224 msecs PM: suspend devices took 0.132 seconds PM: late suspend of devices complete after 7.423 msecs PM: noirq suspend of devices complete after 7.083 msecs suspend debug: Waiting for 5 second(s). Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0262c60 ... [] (musb_default_readb) from [] (musb_irq_work+0x48/0x220) [] (musb_irq_work) from [] (process_one_work+0x1f4/0x758) [] (process_one_work) from [] (worker_thread+0x54/0x514) [] (worker_thread) from [] (kthread+0x128/0x158) [] (kthread) from [] (ret_from_fork+0x14/0x24) Commit 2bff3916fda9 ("usb: musb: Fix PM for hub disconnect") started scheduling musb_irq_work with a delay of up to a second and with retries thereby making this easy to trigger, for example, by suspending shortly after a disconnect. Note that we set a flag to prevent the irq work from rescheduling itself during suspend and instead process a disconnect immediately. This takes care of the case where we are disconnected shortly before suspending. However, when in host mode, a disconnect while suspended will still go unnoticed and thus prevent the controller from runtime suspending upon resume as the session bit is always set. This will need to be addressed separately. Fixes: 550a7375fe72 ("USB: Add MUSB and TUSB support") Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Fixes: 2bff3916fda9 ("usb: musb: Fix PM for hub disconnect") Cc: stable # 4.9 Cc: Felipe Balbi Cc: Tony Lindgren Signed-off-by: Johan Hovold Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 11 +++++++++-- drivers/usb/musb/musb_core.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 4f190e0b9de89c4c917c3ffb3799e9d00fc534ac Author: Johan Hovold Date: Mon Oct 9 22:46:07 2017 -0500 USB: musb: fix session-bit runtime-PM quirk The current session-bit quirk implementation does not prevent the retry counter from underflowing, something which could break runtime PM and keep the device active for a very long time (about 2^32 seconds) after a disconnect. This notably breaks the B-device timeout case, but could potentially cause problems also when the controller is operating as an A-device. Fixes: 2bff3916fda9 ("usb: musb: Fix PM for hub disconnect") Cc: stable # 4.9 Cc: Tony Lindgren Signed-off-by: Johan Hovold Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 765fb2f181cad669f2beb87842a05d8071f2be85 Author: Maksim Salau Date: Wed Oct 11 11:10:52 2017 +0300 usb: cdc_acm: Add quirk for Elatec TWN3 Elatec TWN3 has the union descriptor on data interface. This results in failure to bind the device to the driver with the following log: usb 1-1.2: new full speed USB device using streamplug-ehci and address 4 usb 1-1.2: New USB device found, idVendor=09d8, idProduct=0320 usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-1.2: Product: RFID Device (COM) usb 1-1.2: Manufacturer: OEM cdc_acm 1-1.2:1.0: Zero length descriptor references cdc_acm: probe of 1-1.2:1.0 failed with error -22 Adding the NO_UNION_NORMAL quirk for the device fixes the issue. `lsusb -v` of the device: Bus 001 Device 003: ID 09d8:0320 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 32 idVendor 0x09d8 idProduct 0x0320 bcdDevice 3.00 iManufacturer 1 OEM iProduct 2 RFID Device (COM) iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 67 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 250mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0020 1x 32 bytes bInterval 2 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0020 1x 32 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0020 1x 32 bytes bInterval 0 CDC Header: bcdCDC 1.10 CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 1 CDC ACM: bmCapabilities 0x06 sends break line coding and serial state CDC Union: bMasterInterface 0 bSlaveInterface 1 Device Status: 0x0000 (Bus Powered) Signed-off-by: Maksim Salau Acked-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) commit 845d584f41eac3475c21e4a7d5e88d0f6e410cf7 Author: Hans de Goede Date: Mon Oct 16 16:21:19 2017 +0200 USB: devio: Revert "USB: devio: Don't corrupt user memory" Taking the uurb->buffer_length userspace passes in as a maximum for the actual urbs transfer_buffer_length causes 2 serious issues: 1) It breaks isochronous support for all userspace apps using libusb, as existing libusb versions pass in 0 for uurb->buffer_length, relying on the kernel using the lenghts of the usbdevfs_iso_packet_desc descriptors passed in added together as buffer length. This for example causes redirection of USB audio and Webcam's into virtual machines using qemu-kvm to no longer work. This is a userspace ABI break and as such must be reverted. Note that the original commit does not protect other users / the kernels memory, it only stops the userspace process making the call from shooting itself in the foot. 2) It may cause the kernel to program host controllers to DMA over random memory. Just as the devio code used to only look at the iso_packet_desc lenghts, the host drivers do the same, relying on the submitter of the urbs to make sure the entire buffer is large enough and not checking transfer_buffer_length. But the "USB: devio: Don't corrupt user memory" commit now takes the userspace provided uurb->buffer_length for the buffer-size while copying over the user-provided iso_packet_desc lengths 1:1, allowing the user to specify a small buffer size while programming the host controller to dma a lot more data. (Atleast the ohci, uhci, xhci and fhci drivers do not check transfer_buffer_length for isoc transfers.) This reverts commit fa1ed74eb1c2 ("USB: devio: Don't corrupt user memory") fixing both these issues. Cc: Dan Carpenter Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 283776e9b72502c71c34f489e1015841bd8681ab Merge: b3207c6 2fb8500 Author: Greg Kroah-Hartman Date: Tue Oct 17 10:50:27 2017 +0200 Merge tag 'phy-for-4.14-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.14 -rc *) Handle error return values in rockchip-typec and tegra-xusb *) Fix MUX error check and ioremap_resource error check in mvebu-cp110-comphy *) Fix NULL pointer dereference error in phy-mtk-tphy *) Make sure pipe selector is not set to incompatible value *) Fix flaky aux channel communication with rockchip-typec PHY *) Fix DP monitors detection issue in rockchip-typec PHY Signed-off-by: Kishon Vijay Abraham I commit b3207c65dfafae27e7c492cb9188c0dc0eeaf3fd Author: Mayank Rana Date: Fri Oct 6 17:45:30 2017 +0300 usb: xhci: Handle error condition in xhci_stop_device() xhci_stop_device() calls xhci_queue_stop_endpoint() multiple times without checking the return value. xhci_queue_stop_endpoint() can return error if the HC is already halted or unable to queue commands. This can cause a deadlock condition as xhci_stop_device() would end up waiting indefinitely for a completion for the command that didn't get queued. Fix this by checking the return value and bailing out of xhci_stop_device() in case of error. This patch happens to fix potential memory leaks of the allocated command structures as well. Fixes: c311e391a7ef ("xhci: rework command timeout and cancellation,") Cc: Signed-off-by: Mayank Rana Signed-off-by: Jack Pham Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 810a624bd1b64b13ddcc2eb5c1880526a750a870 Author: Lu Baolu Date: Fri Oct 6 17:45:29 2017 +0300 usb: xhci: Reset halted endpoint if trb is noop When a URB is cancled, xhci driver turns the untransferred trbs into no-ops. If an endpoint stalls on a no-op trb that belongs to the cancelled URB, the event handler won't reset the endpoint. Hence, it will stay halted. Link: http://marc.info/?l=linux-usb&m=149582598330127&w=2 Cc: Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit d1aad52cf8b3f95dfe9b5b64da66343306ddf73b Author: Jeffy Chen Date: Fri Oct 6 17:45:28 2017 +0300 xhci: Cleanup current_cmd in xhci_cleanup_command_queue() KASAN reported use-after-free bug when xhci host controller died: [ 176.952537] BUG: KASAN: use-after-free in xhci_handle_command_timeout+0x68/0x224 [ 176.960846] Write of size 4 at addr ffffffc0cbb01608 by task kworker/3:3/1680 ... [ 177.180644] Freed by task 0: [ 177.183882] kasan_slab_free+0x90/0x15c [ 177.188194] kfree+0x114/0x28c [ 177.191630] xhci_cleanup_command_queue+0xc8/0xf8 [ 177.196916] xhci_hc_died+0x84/0x358 Problem here is that when the cmd_timer fired, it would try to access current_cmd while the command queue is already freed by xhci_hc_died(). Cleanup current_cmd in xhci_cleanup_command_queue() to avoid that. Fixes: d9f11ba9f107 ("xhci: Rework how we handle unresponsive or hoptlug removed hosts") Cc: # v4.12+ Signed-off-by: Jeffy Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 1 + 1 file changed, 1 insertion(+) commit ea7d0d69426cab6747ed311c53f4142eb48b9454 Author: Mathias Nyman Date: Fri Oct 6 17:45:27 2017 +0300 xhci: Identify USB 3.1 capable hosts by their port protocol capability Many USB 3.1 capable hosts never updated the Serial Bus Release Number (SBRN) register to USB 3.1 from USB 3.0 xhci driver identified USB 3.1 capable hosts based on this SBRN register, which according to specs "contains the release of the Universal Serial Bus Specification with which this Universal Serial Bus Host Controller module is compliant." but still in october 2017 gives USB 3.0 as the only possible option. Make an additional check for USB 3.1 support and enable it if the xHCI supported protocol capablity lists USB 3.1 capable ports. Cc: # v4.6+ Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 917086ff231f614e6705927d8fe3eb6aa74b21bf Author: Mimi Zohar Date: Sun Oct 8 00:28:21 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" Signed-off-by: Mimi Zohar Signed-off-by: Al Viro fs/namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 45348de2c8a7a1e64c5be27b22c9786b4152dd41 Author: Raghava Aditya Renukunta Date: Mon Oct 16 17:22:31 2017 -0700 scsi: aacraid: Fix controller initialization failure This is a fix to an issue where the driver sends its periodic WELLNESS command to the controller after the driver shut it down.This causes the controller to crash. The window where this can happen is small, but it can be hit at around 4 hours of constant resets. Cc: Fixes: fbd185986eba (aacraid: Fix AIF triggered IOP_RESET) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/comminit.c | 8 +++++--- drivers/scsi/aacraid/linit.c | 7 ++++++- 2 files changed, 11 insertions(+), 4 deletions(-) commit c99dfd20f295b2b8c46da5185c0889493ba1f291 Author: Christos Gkekas Date: Mon Oct 16 20:28:02 2017 +0100 scsi: hpsa: Fix configured_logical_drive_count·check Check whether configured_logical_drive_count is less than 255. Previous check was always evaluating to true as this variable is defined as u8. Signed-off-by: Christos Gkekas Acked-by: Don Brace drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1010f21ecf8ac43be676d498742de18fa6c20987 Author: Himanshu Madhani Date: Mon Oct 16 11:26:05 2017 -0700 scsi: qla2xxx: Initialize Work element before requesting IRQs commit a9e170e28636 ("scsi: qla2xxx: Fix uninitialized work element") moved initializiation of work element earlier in the probe to fix call stack. However, it still leaves a window where interrupt can be generated before work element is initialized. Fix that window by initializing work element before we are requesting IRQs. [mkp: fixed typos] Fixes: a9e170e28636 ("scsi: qla2xxx: Fix uninitialized work element") Cc: # 4.13 Signed-off-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab31fd0ce65ec93828b617123792c1bb7c6dcc42 Author: Steffen Maier Date: Fri Oct 13 15:40:07 2017 +0200 scsi: zfcp: fix erp_action use-before-initialize in REC action trace v4.10 commit 6f2ce1c6af37 ("scsi: zfcp: fix rport unblock race with LUN recovery") extended accessing parent pointer fields of struct zfcp_erp_action for tracing. If an erp_action has never been enqueued before, these parent pointer fields are uninitialized and NULL. Examples are zfcp objects freshly added to the parent object's children list, before enqueueing their first recovery subsequently. In zfcp_erp_try_rport_unblock(), we iterate such list. Accessing erp_action fields can cause a NULL pointer dereference. Since the kernel can read from lowcore on s390, it does not immediately cause a kernel page fault. Instead it can cause hangs on trying to acquire the wrong erp_action->adapter->dbf->rec_lock in zfcp_dbf_rec_action_lvl() ^bogus^ while holding already other locks with IRQs disabled. Real life example from attaching lots of LUNs in parallel on many CPUs: crash> bt 17723 PID: 17723 TASK: ... CPU: 25 COMMAND: "zfcperp0.0.1800" LOWCORE INFO: -psw : 0x0404300180000000 0x000000000038e424 -function : _raw_spin_lock_wait_flags at 38e424 ... #0 [fdde8fc90] zfcp_dbf_rec_action_lvl at 3e0004e9862 [zfcp] #1 [fdde8fce8] zfcp_erp_try_rport_unblock at 3e0004dfddc [zfcp] #2 [fdde8fd38] zfcp_erp_strategy at 3e0004e0234 [zfcp] #3 [fdde8fda8] zfcp_erp_thread at 3e0004e0a12 [zfcp] #4 [fdde8fe60] kthread at 173550 #5 [fdde8feb8] kernel_thread_starter at 10add2 zfcp_adapter zfcp_port zfcp_unit
, 0x404040d600000000 scsi_device NULL, returning early! zfcp_scsi_dev.status = 0x40000000 0x40000000 ZFCP_STATUS_COMMON_RUNNING crash> zfcp_unit
struct zfcp_unit { erp_action = { adapter = 0x0, port = 0x0, unit = 0x0, }, } zfcp_erp_action is always fully embedded into its container object. Such container object is never moved in its object tree (only add or delete). Hence, erp_action parent pointers can never change. To fix the issue, initialize the erp_action parent pointers before adding the erp_action container to any list and thus before it becomes accessible from outside of its initializing function. In order to also close the time window between zfcp_erp_setup_act() memsetting the entire erp_action to zero and setting the parent pointers again, drop the memset and instead explicitly initialize individually all erp_action fields except for parent pointers. To be extra careful not to introduce any other unintended side effect, even keep zeroing the erp_action fields for list and timer. Also double-check with WARN_ON_ONCE that erp_action parent pointers never change, so we get to know when we would deviate from previous behavior. Signed-off-by: Steffen Maier Fixes: 6f2ce1c6af37 ("scsi: zfcp: fix rport unblock race with LUN recovery") Cc: #2.6.32+ Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_aux.c | 5 +++++ drivers/s390/scsi/zfcp_erp.c | 18 +++++++++++------- drivers/s390/scsi/zfcp_scsi.c | 5 +++++ 3 files changed, 21 insertions(+), 7 deletions(-) commit 2de0307323fc42c6395d0eafec9879d55e042c85 Merge: 33d930e 238604c Author: Dave Airlie Date: Tue Oct 17 10:14:56 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - Fix potential use-after-free issue in suspend/resume by cleanning up drvdata at unbind. - Fix potential NULL pointer dereference issue in suspend/resume by setting drm_dev after checking if drm_dev is null or not. * tag 'exynos-drm-fixes-for-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: Clear drvdata after component unbind drm/exynos: Fix potential NULL pointer dereference in suspend/resume paths commit 038daf5556a486cefc7a239ca4528003a5a4ef00 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 (cherry picked from commit 614ee07acfbb55f2debfc3223ffae97fee17ed14) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41e64c1ac73bbc2380d7b85357a4b693043a5ba8 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 (cherry picked from commit 87145d95c3d8297fb74762bd92e022d7f5cc250c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fbe776cc3a753618877f7ce87a28ae3480743348 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ä (cherry picked from commit 1210d3889077653b90b0bfd2cc54e19f4766e4e6) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99b169d3c2052717a9a56b2c8aab0cabd96f0598 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 (cherry picked from commit 55b4f1ce2f23692c57205b9974fba61baa4b9321) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_evict.c | 63 ++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 24 deletions(-) commit 4a18fb8d555a5299256d77d100fadbd15b1c7749 Merge: 33d930e ba3ee00 Author: Rodrigo Vivi Date: Mon Oct 16 17:07:35 2017 -0700 Merge tag 'gvt-fixes-2017-10-16' of https://github.com/01org/gvt-linux into drm-intel-fixes Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d87b1644-58cc-f7a8-57f5-126fe2b1eecd@intel.com commit 1b72bf5a0777d7cec6c2d857ac15599022b3c123 Merge: 823038c fdf7cb4 Author: David S. Miller Date: Mon Oct 16 21:27:16 2017 +0100 Merge tag 'mac80211-for-davem-2017-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a single fix, for a WoWLAN-related part of CVE-2017-13080. ==================== Signed-off-by: David S. Miller commit 823038ca030e9f8283518b1e6a5a6879edcbe057 Author: Xin Long Date: Mon Oct 16 19:43:15 2017 +0800 dev_ioctl: add missing NETDEV_CHANGE_TX_QUEUE_LEN event notification When changing dev tx_queue_len via netlink or net-sysfs, a NETDEV_CHANGE_TX_QUEUE_LEN event notification will be called. But dev_ioctl missed this event notification, which could cause no userspace notification would be sent. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/core/dev_ioctl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c019b5166e11faaf9ed3b64316ed338eaa19de60 Author: Or Gerlitz Date: Mon Oct 16 12:19:48 2017 +0300 net/sched: cls_flower: Set egress_dev mark when calling into the HW driver Commit 7091d8c '(net/sched: cls_flower: Add offload support using egress Hardware device') made sure (when fl_hw_replace_filter is called) to put the egress_dev mark on persisent structure instance. Hence, following calls into the HW driver for stats and deletion will note it and act accordingly. With commit de4784ca030f this property is lost and hence when called, the HW driver failes to operate (stats, delete) on the offloaded flow. Fix it by setting the egress_dev flag whenever the ingress device is different from the hw device since this is exactly the condition under which we're calling into the HW driver through the egress port net-device. Fixes: de4784ca030f ('net: sched: get rid of struct tc_to_netdev') Signed-off-by: Or Gerlitz Signed-off-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 2 ++ 1 file changed, 2 insertions(+) commit 226584aedd94acd61ffa51fb69bcf6b3309a7b8f 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 0ad646c81b2182f7fa67ec0c8c825e0ee165696d Author: Cong Wang Date: Fri Oct 13 11:58:53 2017 -0700 tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move these initializations into a ->ndo_init() so that register_netdevice() knows better, however this is still complicated due to the logic in tun_detach(). Therefore, I choose to just call dev_get_valid_name() before register_netdevice(), which is quicker and much easier to audit. And for this specific case, it is already enough. Fixes: 96442e42429e ("tuntap: choose the txq based on rxq") Reported-by: Dmitry Alexeev Cc: Jason Wang Cc: "Michael S. Tsirkin" Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/tun.c | 3 +++ include/linux/netdevice.h | 3 +++ net/core/dev.c | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) commit e1043a4bb9fce6cfc7d55c5767e429a18ac8c4eb Author: Mohammed Gamal Date: Mon Oct 16 15:20:32 2017 +0200 xen-netfront, xen-netback: Use correct minimum MTU values RFC791 specifies the minimum MTU to be 68, while xen-net{front|back} drivers use a minimum value of 0. When set MTU to 0~67 with xen_net{front|back} driver, the network will become unreachable immediately, the guest can no longer be pinged. xen_net{front|back} should not allow the user to set this value which causes network problems. Reported-by: Chen Shi Signed-off-by: Mohammed Gamal Acked-by: Wei Liu Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/net/xen-netback/interface.c | 2 +- drivers/net/xen-netfront.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2459b4c635858094df78abb9ca87d99f89fe8ca5 Author: Nicolas Dichtel Date: Wed Oct 11 16:24:48 2017 +0200 net: enable interface alias removal via rtnl IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of the attribute is 1 ("\0"). However, to remove an alias, the attribute length must be 0 (see dev_set_alias()). Let's define the type to NLA_BINARY to allow 0-length string, so that the alias can be removed. Example: $ ip l s dummy0 alias foo $ ip l l dev dummy0 5: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:20:30:4f:a7:f3 brd ff:ff:ff:ff:ff:ff alias foo Before the patch: $ ip l s dummy0 alias "" RTNETLINK answers: Numerical result out of range After the patch: $ ip l s dummy0 alias "" $ ip l l dev dummy0 5: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:20:30:4f:a7:f3 brd ff:ff:ff:ff:ff:ff CC: Oliver Hartkopp CC: Stephen Hemminger Fixes: 96ca4a2cc145 ("net: remove ifalias on empty given alias") Reported-by: Julien FLoret Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/rtnetlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2fd7c5abb8f35d6b701617f49aea9f0873284aee Merge: 8f718fa 2d7f669 Author: David S. Miller Date: Mon Oct 16 20:48:45 2017 +0100 Merge branch 'rtnetlink-dev-notification-fixes' Xin Long says: ==================== rtnetlink: a bunch of fixes for userspace notifications in changing dev properties Whenever any property of a link, address, route, etc. changes by whatever way, kernel should notify the programs that listen for such events in userspace. The patchet "rtnetlink: Cleanup user notifications for netdev events" tried to fix a redundant notifications issue, but it also introduced a side effect. After that, user notifications could only be sent when changing dev properties via netlink api. As it removed some events process in rtnetlink_event where the notifications was sent to users. It resulted in no notification generated when dev properties are changed via other ways, like ioctl, sysfs, etc. It may cause some user programs doesn't work as expected because of the missing notifications. This patchset will fix it by bringing some of these netdev events back and also fix the old redundant notifications issue with a proper way. ==================== Signed-off-by: David S. Miller commit 2d7f669b42a97022c8c2b6cd86f3990be5fcd1bc Author: Xin Long Date: Sun Oct 15 18:13:46 2017 +0800 rtnetlink: do not set notification for tx_queue_len in do_setlink NETDEV_CHANGE_TX_QUEUE_LEN event process in rtnetlink_event would send a notification for userspace and tx_queue_len's setting in do_setlink would trigger NETDEV_CHANGE_TX_QUEUE_LEN. So it shouldn't set DO_SETLINK_NOTIFY status for this change to send a notification any more. Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64ff90cc2e6f42596d7a0c37e41dc95292bb63b1 Author: Xin Long Date: Sun Oct 15 18:13:45 2017 +0800 rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink The check 'status & DO_SETLINK_NOTIFY' in do_setlink doesn't really work after status & DO_SETLINK_MODIFIED, as: DO_SETLINK_MODIFIED 0x1 DO_SETLINK_NOTIFY 0x3 Considering that notifications are suppposed to be sent only when status have the flag DO_SETLINK_NOTIFY, the right check would be: (status & DO_SETLINK_NOTIFY) == DO_SETLINK_NOTIFY This would avoid lots of duplicated notifications when setting some properties of a link. Fixes: ba9989069f4e ("rtnl/do_setlink(): notify when a netdev is modified") Signed-off-by: Xin Long Acked-by: David Ahern Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc709f375743ebf5c9326cc9b946f6f09a34ac44 Author: Xin Long Date: Sun Oct 15 18:13:44 2017 +0800 rtnetlink: bring NETDEV_CHANGEUPPER event process back in rtnetlink_event libteam needs this event notification in userspace when dev's master dev has been changed. After this, the redundant notifications issue would be fixed in the later patch 'rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink'. Fixes: b6b36eb23a46 ("rtnetlink: Do not generate notifications for NETDEV_CHANGEUPPER event") Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit e6e6659446c87057aede26a39d9f16b19001716f Author: Xin Long Date: Sun Oct 15 18:13:43 2017 +0800 rtnetlink: bring NETDEV_POST_TYPE_CHANGE event process back in rtnetlink_event As I said in patch 'rtnetlink: bring NETDEV_CHANGEMTU event process back in rtnetlink_event', removing NETDEV_POST_TYPE_CHANGE event was not the right fix for the redundant notifications issue. So bring this event process back to rtnetlink_event and the old redundant notifications issue would be fixed in the later patch 'rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink'. Fixes: aef091ae58aa ("rtnetlink: Do not generate notifications for POST_TYPE_CHANGE event") Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit ebdcf0450b020748c2dab6bfe44a5ac3c5159fb0 Author: Xin Long Date: Sun Oct 15 18:13:42 2017 +0800 rtnetlink: bring NETDEV_CHANGE_TX_QUEUE_LEN event process back in rtnetlink_event The same fix for changing mtu in the patch 'rtnetlink: bring NETDEV_CHANGEMTU event process back in rtnetlink_event' is needed for changing tx_queue_len. Note that the redundant notifications issue for tx_queue_len will be fixed in the later patch 'rtnetlink: do not send notification for tx_queue_len in do_setlink'. Fixes: 27b3b551d8a7 ("rtnetlink: Do not generate notifications for NETDEV_CHANGE_TX_QUEUE_LEN event") Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 8a212589fe0e45f26c549dfa271a157ca8eea1ac Author: Xin Long Date: Sun Oct 15 18:13:41 2017 +0800 rtnetlink: bring NETDEV_CHANGEMTU event process back in rtnetlink_event Commit 085e1a65f04f ("rtnetlink: Do not generate notifications for MTU events") tried to fix the redundant notifications issue when ip link set mtu by removing NETDEV_CHANGEMTU event process in rtnetlink_event. But it also resulted in no notification generated when dev's mtu is changed via other methods, like: 'ifconfig eth1 mtu 1400' or 'echo 1400 > /sys/class/net/eth1/mtu' It would cause users not to be notified by this change. This patch is to fix it by bringing NETDEV_CHANGEMTU event back into rtnetlink_event, and the redundant notifications issue will be fixed in the later patch 'rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink'. Fixes: 085e1a65f04f ("rtnetlink: Do not generate notifications for MTU events") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 785545c8982604fe3ba79d16409e83993be77d5e Author: Arnd Bergmann Date: Fri Oct 13 09:47:47 2017 -0700 xfs: move two more RT specific functions into CONFIG_XFS_RT The last cleanup introduced two harmless warnings: fs/xfs/xfs_fsmap.c:480:1: warning: '__xfs_getfsmap_rtdev' defined but not used fs/xfs/xfs_fsmap.c:372:1: warning: 'xfs_getfsmap_rtdev_rtbitmap_helper' defined but not used This moves those two functions as well. Fixes: bb9c2e543325 ("xfs: move more RT specific code under CONFIG_XFS_RT") Signed-off-by: Arnd Bergmann Reviewed-by: Brian Foster Acked-by: Geert Uytterhoeven Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_fsmap.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 40214d128e07dd21bb07a8ed6a7fe2f911281ab2 Author: Brian Foster Date: Fri Oct 13 09:47:46 2017 -0700 xfs: trim writepage mapping to within eof The writeback rework in commit fbcc02561359 ("xfs: Introduce writeback context for writepages") introduced a subtle change in behavior with regard to the block mapping used across the ->writepages() sequence. The previous xfs_cluster_write() code would only flush pages up to EOF at the time of the writepage, thus ensuring that any pages due to file-extending writes would be handled on a separate cycle and with a new, updated block mapping. The updated code establishes a block mapping in xfs_writepage_map() that could extend beyond EOF if the file has post-eof preallocation. Because we now use the generic writeback infrastructure and pass the cached mapping to each writepage call, there is no implicit EOF limit in place. If eofblocks trimming occurs during ->writepages(), any post-eof portion of the cached mapping becomes invalid. The eofblocks code has no means to serialize against writeback because there are no pages associated with post-eof blocks. Therefore if an eofblocks trim occurs and is followed by a file-extending buffered write, not only has the mapping become invalid, but we could end up writing a page to disk based on the invalid mapping. Consider the following sequence of events: - A buffered write creates a delalloc extent and post-eof speculative preallocation. - Writeback starts and on the first writepage cycle, the delalloc extent is converted to real blocks (including the post-eof blocks) and the mapping is cached. - The file is closed and xfs_release() trims post-eof blocks. The cached writeback mapping is now invalid. - Another buffered write appends the file with a delalloc extent. - The concurrent writeback cycle picks up the just written page because the writeback range end is LLONG_MAX. xfs_writepage_map() attributes it to the (now invalid) cached mapping and writes the data to an incorrect location on disk (and where the file offset is still backed by a delalloc extent). This problem is reproduced by xfstests test generic/464, which triggers racing writes, appends, open/closes and writeback requests. To address this problem, trim the mapping used during writeback to within EOF when the mapping is validated. This ensures the mapping is revalidated for any pages encountered beyond EOF as of the time the current mapping was cached or last validated. Reported-by: Eryu Guan Diagnosed-by: Eryu Guan Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 11 +++++++++++ fs/xfs/libxfs/xfs_bmap.h | 1 + fs/xfs/xfs_aops.c | 13 +++++++++++++ 3 files changed, 25 insertions(+) commit 5e25c269e17de4c5a23ce886cda612b01365a944 Author: Eryu Guan Date: Fri Oct 13 09:47:46 2017 -0700 fs: invalidate page cache after end_io() in dio completion Commit 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO") moved page cache invalidation from iomap_dio_rw() to iomap_dio_complete() for iomap based direct write path, but before the dio->end_io() call, and it re-introdued the bug fixed by commit c771c14baa33 ("iomap: invalidate page caches should be after iomap_dio_complete() in direct write"). I found this because fstests generic/418 started failing on XFS with v4.14-rc3 kernel, which is the regression test for this specific bug. So similarly, fix it by moving dio->end_io() (which does the unwritten extent conversion) before page cache invalidation, to make sure next buffer read reads the final real allocations not unwritten extents. I also add some comments about why should end_io() go first in case we get it wrong again in the future. Note that, there's no such problem in the non-iomap based direct write path, because we didn't remove the page cache invalidation after the ->direct_IO() in generic_file_direct_write() call, but I decided to fix dio_complete() too so we don't leave a landmine there, also be consistent with iomap_dio_complete(). Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO") Signed-off-by: Eryu Guan Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Lukas Czerner fs/direct-io.c | 20 ++++++++++++-------- fs/iomap.c | 41 ++++++++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 25 deletions(-) commit 793d7dbe6d82a50b9d14bf992b9eaacb70a11ce6 Author: Dave Chinner Date: Fri Oct 13 09:47:45 2017 -0700 xfs: cancel dirty pages on invalidation Recently we've had warnings arise from the vm handing us pages without bufferheads attached to them. This should not ever occur in XFS, but we don't defend against it properly if it does. The only place where we remove bufferheads from a page is in xfs_vm_releasepage(), but we can't tell the difference here between "page is dirty so don't release" and "page is dirty but is being invalidated so release it". In some places that are invalidating pages ask for pages to be released and follow up afterward calling ->releasepage by checking whether the page was dirty and then aborting the invalidation. This is a possible vector for releasing buffers from a page but then leaving it in the mapping, so we really do need to avoid dirty pages in xfs_vm_releasepage(). To differentiate between invalidated pages and normal pages, we need to clear the page dirty flag when invalidating the pages. This can be done through xfs_vm_invalidatepage(), and will result xfs_vm_releasepage() seeing the page as clean which matches the bufferhead state on the page after calling block_invalidatepage(). Hence we can re-add the page dirty check in xfs_vm_releasepage to catch the case where we might be releasing a page that is actually dirty and so should not have the bufferheads on it removed. This will remove one possible vector of "dirty page with no bufferheads" and so help narrow down the search for the root cause of that problem. Signed-Off-By: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 9c48c0965b97e14ddcf75490a754e84e05aaa062 Author: Thomas Gleixner Date: Mon Oct 16 12:12:16 2017 +0200 x86/idt: Initialize early IDT before cr4_init_shadow() Moving the early IDT setup out of assembly code breaks the boot on first generation 486 systems. The reason is that the call of idt_setup_early_handler, which sets up the early handlers was added after the call to cr4_init_shadow(). cr4_init_shadow() tries to read CR4 which is not available on those systems. The accessor function uses a extable fixup to handle the resulting fault. As the IDT is not set up yet, the cr4 read exception causes an instantaneous reboot for obvious reasons. Call idt_setup_early_handler() before cr4_init_shadow() so IDT is set up before the first exception hits. Fixes: 87e81786b13b ("x86/idt: Move early IDT setup out of 32-bit asm") Reported-and-tested-by: Matthew Whitehead Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1710161210290.1973@nanos arch/x86/kernel/head32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba3ee00683bc2dad4c14fba805c2241ae23acff9 Author: Changbin Du Date: Fri Sep 22 10:00:09 2017 +0800 drm/i915/gvt: Fix GPU hang after reusing vGPU instance across different guest OS We have implemented delayed ring mmio switch mechanism to reduce unnecessary mmio switch. While the vGPU is being destroyed or detached from VM, we need to force the ring switch to host context. The later deadline is missed. Then it got a chance that word load from VM2 might execute under the ring context of VM1 which was attached to a same vGPU instance. Finally, the GPU is hang. This patch guarantee the two deadline are performed. v2: Remove unused variable 'scheduler' Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 8bc9481f43103da77d75a532d9eae55790b9eea6 Author: Arnaldo Carvalho de Melo Date: Mon Oct 16 10:47:39 2017 -0300 perf tools: Add long time reviewers to MAINTAINERS Jiri and Namhyung have long contributed a lot of code and time reviewing patches to tools/, so lets make that reflected in the MAINTAINERS file to encourage patch submitters to add them to the CC list, speeding up the process of tools/perf/ patch processing. Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-onicopw68bg6kn56lnybfpns@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 4c625a974fb81724e60966b677e47fcba782c950 Author: Trond Myklebust Date: Fri Oct 13 14:08:55 2017 -0400 SUNRPC: fix a list corruption issue in xprt_release() We remove the request from the receive list before we call xprt_wait_on_pinned_rqst(), and so we need to use list_del_init(). Otherwise, we will see list corruption when xprt_complete_rqst() is called. Reported-by: Emre Celebi Fixes: ce7c252a8c741 ("SUNRPC: Add a separate spinlock to protect...") Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bb201a5d5acc733943e8af7151cceab9d976a69 Author: Jussi Laako Date: Sun Oct 15 12:41:32 2017 +0300 ALSA: usb-audio: Add native DSD support for Pro-Ject Pre Box S2 Digital Add native DSD support quirk for Pro-Ject Pre Box S2 Digital USB id 2772:0230. Signed-off-by: Jussi Laako Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit fdf7cb4185b60c68e1a75e61691c4afdc15dea0e Author: Johannes Berg Date: Tue Sep 5 14:54:54 2017 +0200 mac80211: accept key reinstall without changing anything When a key is reinstalled we can reset the replay counters etc. which can lead to nonce reuse and/or replay detection being impossible, breaking security properties, as described in the "KRACK attacks". In particular, CVE-2017-13080 applies to GTK rekeying that happened in firmware while the host is in D3, with the second part of the attack being done after the host wakes up. In this case, the wpa_supplicant mitigation isn't sufficient since wpa_supplicant doesn't know the GTK material. In case this happens, simply silently accept the new key coming from userspace but don't take any action on it since it's the same key; this keeps the PN replay counters intact. Signed-off-by: Johannes Berg net/mac80211/key.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 9ed95129ffcabbde564b40ffbbf9c26e8702d858 Author: Greg Kroah-Hartman Date: Wed Oct 4 16:17:55 2017 +0200 Documentation: Add a file explaining the Linux kernel license enforcement policy This adds a short document describing the views of how the Linux kernel community feels about enforcing the license of the kernel. Acked-by: Al Viro Acked-by: Alex Elder (Linaro) Acked-by: Andrea Arcangeli Acked-by: Andy Gross Acked-by: Aneesh Kumar K.V Acked-by: Anna Schumaker Acked-by: Ard Biesheuvel Acked-by: Arnd Bergmann Acked-by: Arvind Yadav Acked-by: Bart Van Assche Acked-by: Bhumika Goyal Acked-by: Bjorn Andersson Acked-by: Borislav Petkov Acked-by: Christian Borntraeger Acked-by: Christian König Acked-by: Christophe JAILLET Acked-by: Chuck Lever Acked-by: Colin Ian King Acked-by: Daniel Borkmann Acked-by: Daniel Lezcano Acked-by: Daniel Vetter Acked-by: Darrick J. Wong (Oracle) Acked-by: Darrick J. Wong Acked-by: David Kershner Acked-by: David S. Miller Acked-by: Dmitry Torokhov Acked-by: Doug Ledford Acked-by: Fabio Estevam Acked-by: Felipe Balbi Acked-by: Florian Westphal Acked-by: Geert Uytterhoeven Acked-by: Guenter Roeck Acked-by: Hannes Reinecke Acked-by: Hans de Goede Acked-by: Heiko Carstens Acked-by: Heiko Stuebner Acked-by: Heiner Kallweit Acked-by: Ingo Molnar Acked-by: Ivan Safonov Acked-by: Jaegeuk Kim Acked-by: Jan Kara (SUSE) Acked-by: Javier Martinez Canillas Acked-by: Jeff Kirsher Acked-by: Jens Axboe Acked-by: Jes Sorensen Acked-by: Jiri Kosina Acked-by: Jiri Pirko Acked-by: Joe Perches Acked-by: Joerg Roedel (SUSE) Acked-by: Johan Hovold Acked-by: Josh Poimboeuf Acked-by: Juergen Gross Acked-by: Julia Lawall Acked-by: K. Y. Srinivasan Acked-by: Khalid Aziz Acked-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Acked-by: Larry Finger Acked-by: Laura Abbott Acked-by: Lee Jones Acked-by: Leon Romanovsky Acked-by: Linus Walleij (Linaro) Acked-by: Lv Zheng Acked-by: Martin K. Petersen (Oracle) Acked-by: Masahiro Yamada Acked-by: Masami Hiramatsu Acked-by: Mel Gorman Acked-by: Michael S. Tsirkin Acked-by: Michal Hocko Acked-by: Mike Marshall Acked-by: Namhyung Kim Acked-by: Neil Armstrong Acked-by: Olof Johansson Acked-by: Pablo Neira Ayuso Acked-by: Paolo Bonzini Acked-by: Paul Burton Acked-by: Paul E. McKenney Acked-by: Peter Zijlstra Acked-by: Rafael J. Wysocki Acked-by: Ralf Baechle Acked-by: Richard Weinberger Acked-by: Rik van Riel Acked-by: Rob Clark Acked-by: Rob Herring Acked-by: Sebastian Reichel (Collabora) Acked-by: Shawn Guo Acked-by: Shuah Khan Acked-by: Simon Horman Acked-by: Srinivas Kandagatla Acked-by: Steven Rostedt (VMware) Acked-by: Sven Eckelmann Acked-by: Takashi Iwai (SUSE) Acked-by: Tejun Heo Acked-by: Thierry Reding Acked-by: Tony Luck Acked-by: Ulf Hansson Acked-by: Vinod Koul Acked-by: Viresh Kumar Acked-by: Vivien Didelot Acked-by: Wei Yongjun Acked-by: Xin Long Signed-off-by: Greg Kroah-Hartman Documentation/process/index.rst | 1 + .../process/kernel-enforcement-statement.rst | 147 +++++++++++++++++++++ 2 files changed, 148 insertions(+) commit 3d51969ce318963e5330bda74dcfac22da180c71 Merge: 33d930e 0d08af3 Author: Thomas Gleixner Date: Mon Oct 16 10:26:46 2017 +0200 Merge tag 'irqchip-4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip updates for 4.14-rc5 from Marc Zyngier: - Fix unfortunate mistake in the GICv3 ITS binding example - Two fixes for the recently merged GICv4 support - GICv3 ITS 52bit PA fixes - Generic irqchip mask-ack fix, and its application to the tango irqchip commit 31dc3f819bac28a0990b36510197560258ab7421 Author: Johan Hovold Date: Thu Oct 12 14:50:46 2017 +0200 USB: serial: metro-usb: add MS7820 device id Add device-id entry for (Honeywell) Metrologic MS7820 bar code scanner. The device has two interfaces (in this mode?); a vendor-specific interface with two interrupt endpoints and a second HID interface, which we do not bind to. Reported-by: Ladislav Dobrovsky Tested-by: Ladislav Dobrovsky Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 1 + 1 file changed, 1 insertion(+) commit e6fc454b7794fc45c27364c7896b8f03094635ee Author: Colin Ian King Date: Sun Oct 15 17:02:03 2017 +0100 x86/cpu/intel_cacheinfo: Remove redundant assignment to 'this_leaf' The 'this_leaf' variable is assigned a value that is never read and it is updated a little later with a newer value, hence we can remove the redundant assignment. Cleans up the following Clang warning: Value stored to 'this_leaf' is never read Signed-off-by: Colin Ian King Reviewed-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20171015160203.12332-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/intel_cacheinfo.c | 1 - 1 file changed, 1 deletion(-) commit 0015a978a254c528f52ce17bbeba612be0d75e22 Author: Dimitri John Ledkov Date: Thu Oct 12 11:15:09 2017 +0100 s390: fix zfcpdump-config zipl from s390-tools generates root=/dev/ram0 kernel cmdline for zfcpdump, thus BLK_DEV_RAM is required. zfcpdump initrd mounts DEBUG_FS, thus is also required. Bug-Ubuntu: https://launchpad.net/bugs/1722735 Bug-Ubuntu: https://launchpad.net/bugs/1719290 Signed-off-by: Dimitri John Ledkov Signed-off-by: Martin Schwidefsky arch/s390/configs/zfcpdump_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit b7662eef14caf4f582d453d45395825b5a8f594c Author: Christian Borntraeger Date: Wed Oct 4 14:46:17 2017 +0200 s390/cputime: fix guest/irq/softirq times after CPU hotplug On CPU hotplug some cpu stats contain bogus values: $ cat /proc/stat cpu 0 0 49 1280 0 0 0 3 0 0 cpu0 0 0 49 618 0 0 0 3 0 0 cpu1 0 0 0 662 0 0 0 0 0 0 [...] $ echo 0 > /sys/devices/system/cpu/cpu1/online $ echo 1 > /sys/devices/system/cpu/cpu1/online $ cat /proc/stat cpu 0 0 49 3200 0 450359962737 450359962737 3 0 0 cpu0 0 0 49 1956 0 0 0 3 0 0 cpu1 0 0 0 1244 0 450359962737 450359962737 0 0 0 [...] pcpu_attach_task() needs the same assignments as vtime_task_switch. Signed-off-by: Christian Borntraeger Fixes: b7394a5f4ce9 ("sched/cputime, s390: Implement delayed accounting of system time") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Martin Schwidefsky arch/s390/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) commit 33d930e59a98fa10a0db9f56c7fa2f21a4aef9b9 Author: Linus Torvalds Date: Sun Oct 15 21:01:12 2017 -0400 Linux 4.14-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 238604ca0b708319e089e22545bcda39afb5faa8 Author: Marek Szyprowski Date: Mon Oct 9 10:44:01 2017 +0200 drm/exynos: Clear drvdata after component unbind When components are unbound, DRM driver is unregistered and freed, so clear drvdata to avoid potential use-after-free issue in suspend/resume paths. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 + 1 file changed, 1 insertion(+) commit 0a51897bfac9886d36e986d009df0317582b19a2 Author: Marek Szyprowski Date: Mon Oct 9 10:43:53 2017 +0200 drm/exynos: Fix potential NULL pointer dereference in suspend/resume paths The patch 6e8edf8a7d8d: "drm/exynos: Fix suspend/resume support" introduced a new code in suspend/resume paths. However it unconditionally dereference drm_dev pointer, which might be NULL if suspend/resume happens before Exynos DRM driver components bind. This patch fixes this issue. Reported-by: Dan Carpenter Fixes: 6e8edf8a7d8d "drm/exynos: Fix suspend/resume support" Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ad98dd1a75ac6a8b68cd2f7bf4676b65734f2a43 Author: Benjamin Herrenschmidt Date: Mon Oct 16 08:37:54 2017 +1100 KVM: PPC: Book3S HV: Add more barriers in XIVE load/unload code On POWER9 systems, we push the VCPU context onto the XIVE (eXternal Interrupt Virtualization Engine) hardware when entering a guest, and pull the context off the XIVE when exiting the guest. The push is done with cache-inhibited stores, and the pull with cache-inhibited loads. Testing has revealed that it is possible (though very rare) for the stores to get reordered with the loads so that we end up with the guest VCPU context still loaded on the XIVE after we have exited the guest. When that happens, it is possible for the same VCPU context to then get loaded on another CPU, which causes the machine to checkstop. To fix this, we add I/O barrier instructions (eieio) before and after the push and pull operations. As partial compensation for the potential slowdown caused by the extra barriers, we remove the eieio instructions between the two stores in the push operation, and between the two loads in the pull operation. (The architecture requires loads to cache-inhibited, guarded storage to be kept in order, and requires stores to cache-inhibited, guarded storage likewise to be kept in order, but allows such loads and stores to be reordered with respect to each other.) Reported-by: Carol L Soto Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ae7df8f985f1b0445366ae6f6324cd08a218526e Merge: 7a263b1 512cf46 Author: Linus Torvalds Date: Sun Oct 15 07:50:38 2017 -0400 Merge tag 'char-misc-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are 4 patches to resolve some char/misc driver issues found these past weeks. One of them is a mei bugfix and another is a new mei device id. There is also a hyper-v fix for a reported issue, and a binder issue fix for a problem reported by a few people. All of these have been in my tree for a while, I don't know if linux-next is really testing much this month. But 0-day is happy with them :)" * tag 'char-misc-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: fix use-after-free in binder_transaction() Drivers: hv: vmbus: Fix bugs in rescind handling mei: me: add gemini lake devices id mei: always use domain runtime pm callbacks. commit 7a263b16c5a258b2f3fe5b58a7c461cc9d34e99a Merge: 7a23c5a 2d30408 Author: Linus Torvalds Date: Sun Oct 15 07:49:16 2017 -0400 Merge tag 'usb-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a handful of USB driver fixes for 4.14-rc5. There is the "usual" usb-serial fixes and device ids, USB gadget fixes, and some more fixes found by the fuzz testing that is happening on the USB layer right now. All of these have been in my tree this week with no reported issues" * tag 'usb-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: usbtest: fix NULL pointer dereference usb: gadget: configfs: Fix memory leak of interface directory data usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options usb: misc: usbtest: Fix overflow in usbtest_do_ioctl() usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet USB: dummy-hcd: Fix deadlock caused by disconnect detection usb: phy: tegra: Fix phy suspend for UDC USB: serial: console: fix use-after-free after failed setup USB: serial: console: fix use-after-free on disconnect USB: serial: qcserial: add Dell DW5818, DW5819 USB: serial: cp210x: add support for ELV TFD500 USB: serial: cp210x: fix partnum regression USB: serial: option: add support for TP-Link LTE module USB: serial: ftdi_sio: add id for Cypress WICED dev board commit 7a23c5abb930cefcef85df6dc0c8fb3e8961980c Merge: e7a36a6 edf1091 Author: Linus Torvalds Date: Sun Oct 15 07:47:07 2017 -0400 Merge tag 'dmaengine-fix-4.14-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Here are fixes for this round - fix spinlock usage amd fifo response for altera driver - fix ti crossbar race condition - fix edma memcpy align" * tag 'dmaengine-fix-4.14-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: altera: fix spinlock usage dmaengine: altera: fix response FIFO emptying dmaengine: ti-dma-crossbar: Fix possible race condition with dma_inuse dmaengine: edma: Align the memcpy acnt array size with the transfer commit aa444bd230f832d4e75cfac826255cfd66f545c3 Merge: 8a5776a ca4c302 Author: Greg Kroah-Hartman Date: Sun Oct 15 12:59:53 2017 +0200 Merge tag 'iio-fixes-for-4.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.14 cycle. * ade7759 - Fix a signed extension bug. * as3935 - The default noise and watch dog settings were such that the device was unusuable in most applications. Add device tree parameters to allow it to be configured to something that will actually work. * at91-sama5d2 adc - Fix handling of legacy device trees that don't provide the new trigger edge property. * dln2-adc - Fix a missing Kconfig dependency on IIO_TRIGGERED_BUFFER. * dummy driver - Add a missing break so that writing in_voltage0_thresh_rising_en doesn't always result in an error. * zpa2326 - Drop a test for an always true condition so that gcc won't spit out and unused variable warning. commit 8f718fa6bb668836dce3ca1ab8d29ce4b029a4a7 Merge: 3efc93c 5b1e1a9 Author: David S. Miller Date: Sat Oct 14 18:51:52 2017 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: bug fixes. Various bug fixes for the VF/PF link change logic, VF resource checking, potential firmware response corruption on NVRAM and DCB parameters, and reading the wrong register for PCIe link speed on the VF. ==================== Signed-off-by: David S. Miller commit 5b1e1a9ce06fd94b563d6c3dd896589231995d89 Author: Sankar Patchineelam Date: Fri Oct 13 21:09:34 2017 -0400 bnxt_en: Fix possible corruption in DCB parameters from firmware. hwrm_send_message() is replaced with _hwrm_send_message(), and hwrm_cmd_lock mutex lock is grabbed for the whole period of firmware call until the firmware DCB parameters have been copied. This will prevent possible corruption of the firmware data. Fixes: 7df4ae9fe855 ("bnxt_en: Implement DCBNL to support host-based DCBX.") Signed-off-by: Sankar Patchineelam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit cc72f3b1feb4fd38d33ab7a013d5ab95041cb8ba Author: Michael Chan Date: Fri Oct 13 21:09:33 2017 -0400 bnxt_en: Fix possible corrupted NVRAM parameters from firmware response. In bnxt_find_nvram_item(), it is copying firmware response data after releasing the mutex. This can cause the firmware response data to be corrupted if the next firmware response overwrites the response buffer. The rare problem shows up when running ethtool -i repeatedly. Fix it by calling the new variant _hwrm_send_message_silent() that requires the caller to take the mutex and to release it after the response data has been copied. Fixes: 3ebf6f0a09a2 ("bnxt_en: Add installed-package version reporting via Ethtool GDRVINFO") Reported-by: Sarveswara Rao Mygapula Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) commit 021570793d8cd86cb62ac038c535f4450586b454 Author: Michael Chan Date: Fri Oct 13 21:09:32 2017 -0400 bnxt_en: Fix VF resource checking. In bnxt_sriov_enable(), we calculate to see if we have enough hardware resources to enable the requested number of VFs. The logic to check for minimum completion rings and statistics contexts is missing. Add the required checks so that VF configuration won't fail. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 7ab0760f5178169c4c218852f51646ea90817d7c Author: Vasundhara Volam Date: Fri Oct 13 21:09:31 2017 -0400 bnxt_en: Fix VF PCIe link speed and width logic. PCIE PCIE_EP_REG_LINK_STATUS_CONTROL register is only defined in PF config space, so we must read it from the PF. Fixes: 90c4f788f6c0 ("bnxt_en: Report PCIe link speed and width during driver load") 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 e2dc9b6e38fa3919e63d6d7905da70ca41cbf908 Author: Michael Chan Date: Fri Oct 13 21:09:30 2017 -0400 bnxt_en: Don't use rtnl lock to protect link change logic in workqueue. As a further improvement to the PF/VF link change logic, use a private mutex instead of the rtnl lock to protect link change logic. With the new mutex, we don't have to take the rtnl lock in the workqueue when we have to handle link related functions. If the VF and PF drivers are running on the same host and both take the rtnl lock and one is waiting for the other, it will cause timeout. This patch fixes these timeouts. Fixes: 90c694bb7181 ("bnxt_en: Fix RTNL lock usage on bnxt_update_link().") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 25 ++++++++++++----------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 ++++ 3 files changed, 21 insertions(+), 12 deletions(-) commit c213eae8d3cd4c026f348ce4fd64f4754b3acf2b Author: Michael Chan Date: Fri Oct 13 21:09:29 2017 -0400 bnxt_en: Improve VF/PF link change logic. Link status query firmware messages originating from the VFs are forwarded to the PF. The driver handles these interactions in a workqueue for the VF and PF. The VF driver waits for the response from the PF in the workqueue. If the PF and VF driver are running on the same host and the work for both PF and VF are queued on the same workqueue, the VF driver may not get the response if the PF work item is queued behind it on the same workqueue. This will lead to the VF link query message timing out. To prevent this, we create a private workqueue for PFs instead of using the common workqueue. The VF query and PF response will never be on the same workqueue. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 66 +++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 13 deletions(-) commit 3efc93c2bc243f940beb3324f67aa14e223abdd1 Author: Vivien Didelot Date: Fri Oct 13 13:39:22 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 Reviewed-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/mv88e6060.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5903f594935a3841137c86b9d5b75143a5b7121c Author: Guillaume Nault Date: Fri Oct 13 19:22:35 2017 +0200 l2tp: check ps->sock before running pppol2tp_session_ioctl() When pppol2tp_session_ioctl() is called by pppol2tp_tunnel_ioctl(), the session may be unconnected. That is, it was created by pppol2tp_session_create() and hasn't been connected with pppol2tp_connect(). In this case, ps->sock is NULL, so we need to check for this case in order to avoid dereferencing a NULL pointer. Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 3 +++ 1 file changed, 3 insertions(+) commit 09001b03f722be96827bf8df5ba4d48b7ec0cc30 Author: Wenhua Shi Date: Sat Oct 14 18:51:36 2017 +0200 net: fix typo in skbuff.c Signed-off-by: David S. Miller net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7a36a6ec9cf1b60273e48ee980b8920f333bd4d Merge: a339b35 1f161f6 Author: Linus Torvalds Date: Sat Oct 14 15:26:38 2017 -0400 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "A landry list of fixes: - fix reboot breakage on some PCID-enabled system - fix crashes/hangs on some PCID-enabled systems - fix microcode loading on certain older CPUs - various unwinder fixes - extend an APIC quirk to more hardware systems and disable APIC related warning on virtualized systems - various Hyper-V fixes - a macro definition robustness fix - remove jprobes IRQ disabling - various mem-encryption fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode: Do the family check first x86/mm: Flush more aggressively in lazy TLB mode x86/apic: Update TSC_DEADLINE quirk with additional SKX stepping x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors x86/mm: Disable various instrumentations of mm/mem_encrypt.c and mm/tlb.c x86/hyperv: Fix hypercalls with extended CPU ranges for TLB flushing x86/hyperv: Don't use percpu areas for pcpu_flush/pcpu_flush_ex structures x86/hyperv: Clear vCPU banks between calls to avoid flushing unneeded vCPUs x86/unwind: Disable unwinder warnings on 32-bit x86/unwind: Align stack pointer in unwinder dump x86/unwind: Use MSB for frame pointer encoding on 32-bit x86/unwind: Fix dereference of untrusted pointer x86/alternatives: Fix alt_max_short macro to really be a max() x86/mm/64: Fix reboot interaction with CR4.PCIDE kprobes/x86: Remove IRQ disabling from jprobe handlers kprobes/x86: Set up frame pointer in kprobe trampoline commit a339b351304d5e6b02c7cf8eed895d181e64bce0 Merge: 7b764ce 024c9d2 Author: Linus Torvalds Date: Sat Oct 14 15:20:38 2017 -0400 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Three fixes that address an SMP balancing performance regression" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Ensure load_balance() respects the active_mask sched/core: Address more wake_affine() regressions sched/core: Fix wake_affine() performance regression commit 7b764cedcb1a04e795795dd0fa38570467583be3 Merge: 26c923a 262e681 Author: Linus Torvalds Date: Sat Oct 14 15:19:11 2017 -0400 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Ingo Molnar: "A boot parameter fix, plus a header export fix" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Hide mca_cfg RAS/CEC: Use the right length for "cec_disable" commit 26c923ab196601011b6dd51088f47ed840e7b666 Merge: 60a6ca6 47a74bd Author: Linus Torvalds Date: Sat Oct 14 15:16:49 2017 -0400 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Some tooling fixes plus three kernel fixes: a memory leak fix, a statistics fix and a crash fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Fix memory leaks on allocation failures perf/core: Fix cgroup time when scheduling descendants perf/core: Avoid freeing static PMU contexts when PMU is unregistered tools include uapi bpf.h: Sync kernel ABI header with tooling header perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU perf script: Add missing separator for "-F ip,brstack" (and brstackoff) perf callchain: Compare dsos (as well) for CCKEY_FUNCTION commit 60a6ca6c943bee3c76b5905e66d5fcd83ae8d34f Merge: 2b34218 b483cf3b Author: Linus Torvalds Date: Sat Oct 14 15:14:20 2017 -0400 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 lockdep fixes for bugs introduced by the cross-release dependency tracking feature - plus a commit that disables it because performance regressed in an absymal fashion on some systems" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Disable cross-release features for now locking/selftest: Avoid false BUG report locking/lockdep: Fix stacktrace mess commit 2b34218e893a0ff39f6f46517cb5df2f990db8c0 Merge: a515d05 e43b3b5 Author: Linus Torvalds Date: Sat Oct 14 15:11:21 2017 -0400 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "A CPU hotplug related fix, plus two related sanity checks" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/cpuhotplug: Enforce affinity setting on startup of managed irqs genirq/cpuhotplug: Add sanity check for effective affinity mask genirq: Warn when effective affinity is not updated commit a515d05e96eed14550cbeca08cb9e38dc95b5922 Merge: be1f16b 3dd40cb Author: Linus Torvalds Date: Sat Oct 14 15:09:08 2017 -0400 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Ingo Molnar: "A single objtool fix: avoid silently broken ORC debuginfo builds and error out instead" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Upgrade libelf-devel warning to error for CONFIG_ORC_UNWINDER commit ca4c302398963c0cae29bc168e44cf91e40ff0d3 Author: Eugen Hristev Date: Wed Oct 11 14:21:14 2017 +0300 iio: adc: at91-sama5d2_adc: fix probe error on missing trigger property This fix allows platforms to probe correctly even if the trigger edge property is missing. The hardware trigger will no longer be registered in the sybsystem Preserves backwards compatibility with the support that was in the driver before the hardware trigger. https://storage.kernelci.org/mainline/master/v4.14-rc2-255-g74d83ec2b734/arm/sama5_defconfig/lab-free-electrons/boot-at91-sama5d2_xplained.txt Signed-off-by: Eugen Hristev Fixes: 5e1a1da0f ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 45 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit 1c86c9dd82f859b474474a7fee0d5195da2c9c1d Author: Andrey Smirnov Date: Mon Oct 9 11:43:44 2017 -0700 ARM: dts: imx7d: Invert legacy PCI irq mapping According to i.MX7D reference manual (Rev. 0.1, table 7-1, page 1221) legacy PCI interrupt mapping is as follows: - PCIE INT A is IRQ 122 - PCIE INT B is IRQ 123 - PCIE INT C is IRQ 124 - PCIE INT D is IRQ 125 Invert the mapping information in corresponding DT node to reflect that. Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Andrey Smirnov Fixes: a816d5750edf ("ARM: dts: imx7d: Add node for PCIe controller") Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1f161f67a272cc4f29f27934dd3f74cb657eb5c4 Author: Borislav Petkov Date: Thu Oct 12 13:23:16 2017 +0200 x86/microcode: Do the family check first On CPUs like AMD's Geode, for example, we shouldn't even try to load microcode because they do not support the modern microcode loading interface. However, we do the family check *after* the other checks whether the loader has been disabled on the command line or whether we're running in a guest. So move the family checks first in order to exit early if we're being loaded on an unsupported family. Reported-and-tested-by: Sven Glodowski Signed-off-by: Borislav Petkov Cc: # 4.11.. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://bugzilla.suse.com/show_bug.cgi?id=1061396 Link: http://lkml.kernel.org/r/20171012112316.977-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/core.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit b483cf3bc249d7af706390efa63d6671e80d1c09 Author: Ingo Molnar Date: Sat Oct 14 09:26:59 2017 +0200 locking/lockdep: Disable cross-release features for now Johan Hovold reported a big lockdep slowdown on his system, caused by lockdep: > I had noticed that the BeagleBone Black boot time appeared to have > increased significantly with 4.14 and yesterday I finally had time to > investigate it. > > 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") Because the final v4.14 release is close, disable the cross-release lockdep features for now. Bisected-by: Johan Hovold Debugged-by: Johan Hovold Reported-by: Johan Hovold Cc: Arnd Bergmann Cc: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Lindgren Cc: kernel-team@lge.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mm@kvack.org Cc: linux-omap@vger.kernel.org Link: http://lkml.kernel.org/r/20171014072659.f2yr6mhm5ha3eou7@gmail.com Signed-off-by: Ingo Molnar lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be1f16ba35d97aff4d85c0daba0a02da51b7c83c Merge: 9aa0d2d ca8eb05 Author: Linus Torvalds Date: Sat Oct 14 06:49:15 2017 -0400 Merge branch '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "More MIPS fixes for 4.14: - Loongson 1: Set the default number of RX and TX queues to accomodate for recent changes of stmmac driver. - BPF: Fix uninitialised target compiler error. - Fix cmpxchg on 32 bit signed ints for 64 bit kernels with !kernel_uses_llsc - Fix generic-board-config.sh for builds using O= - Remove pr_err() calls from fpu_emu() for a case which is not a kernel error" * '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: math-emu: Remove pr_err() calls from fpu_emu() MIPS: Fix generic-board-config.sh for builds using O= MIPS: Fix cmpxchg on 32b signed ints for 64b kernel with !kernel_uses_llsc MIPS: loongson1: set default number of rx and tx queues for stmmac MIPS: bpf: Fix uninitialised target compiler error commit b956575bed91ecfb136a8300742ecbbf451471ab Author: Andy Lutomirski Date: Mon Oct 9 09:50:49 2017 -0700 x86/mm: Flush more aggressively in lazy TLB mode Since commit: 94b1b03b519b ("x86/mm: Rework lazy TLB mode and TLB freshness tracking") x86's lazy TLB mode has been all the way lazy: when running a kernel thread (including the idle thread), the kernel keeps using the last user mm's page tables without attempting to maintain user TLB coherence at all. From a pure semantic perspective, this is fine -- kernel threads won't attempt to access user pages, so having stale TLB entries doesn't matter. Unfortunately, I forgot about a subtlety. By skipping TLB flushes, we also allow any paging-structure caches that may exist on the CPU to become incoherent. This means that we can have a paging-structure cache entry that references a freed page table, and the CPU is within its rights to do a speculative page walk starting at the freed page table. I can imagine this causing two different problems: - A speculative page walk starting from a bogus page table could read IO addresses. I haven't seen any reports of this causing problems. - A speculative page walk that involves a bogus page table can install garbage in the TLB. Such garbage would always be at a user VA, but some AMD CPUs have logic that triggers a machine check when it notices these bogus entries. I've seen a couple reports of this. Boris further explains the failure mode: > It is actually more of an optimization which assumes that paging-structure > entries are in WB DRAM: > > "TlbCacheDis: cacheable memory disable. Read-write. 0=Enables > performance optimization that assumes PML4, PDP, PDE, and PTE entries > are in cacheable WB-DRAM; memory type checks may be bypassed, and > addresses outside of WB-DRAM may result in undefined behavior or NB > protocol errors. 1=Disables performance optimization and allows PML4, > PDP, PDE and PTE entries to be in any memory type. Operating systems > that maintain page tables in memory types other than WB- DRAM must set > TlbCacheDis to insure proper operation." > > The MCE generated is an NB protocol error to signal that > > "Link: A specific coherent-only packet from a CPU was issued to an > IO link. This may be caused by software which addresses page table > structures in a memory type other than cacheable WB-DRAM without > properly configuring MSRC001_0015[TlbCacheDis]. This may occur, for > example, when page table structure addresses are above top of memory. In > such cases, the NB will generate an MCE if it sees a mismatch between > the memory operation generated by the core and the link type." > > I'm assuming coherent-only packets don't go out on IO links, thus the > error. To fix this, reinstate TLB coherence in lazy mode. With this patch applied, we do it in one of two ways: - If we have PCID, we simply switch back to init_mm's page tables when we enter a kernel thread -- this seems to be quite cheap except for the cost of serializing the CPU. - If we don't have PCID, then we set a flag and switch to init_mm the first time we would otherwise need to flush the TLB. The /sys/kernel/debug/x86/tlb_use_lazy_mode debug switch can be changed to override the default mode for benchmarking. In theory, we could optimize this better by only flushing the TLB in lazy CPUs when a page table is freed. Doing that would require auditing the mm code to make sure that all page table freeing goes through tlb_remove_page() as well as reworking some data structures to implement the improved flush logic. Reported-by: Markus Trippelsdorf Reported-by: Adam Borowski Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Daniel Borkmann Cc: Eric Biggers Cc: Johannes Hirte Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Roman Kagan Cc: Thomas Gleixner Fixes: 94b1b03b519b ("x86/mm: Rework lazy TLB mode and TLB freshness tracking") Link: http://lkml.kernel.org/r/20171009170231.fkpraqokz6e4zeco@pd.tnic Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 8 +- arch/x86/include/asm/tlbflush.h | 24 ++++++ arch/x86/mm/tlb.c | 153 +++++++++++++++++++++++++++---------- 3 files changed, 136 insertions(+), 49 deletions(-) commit 9aa0d2dde6ebd14e9d16e28081a24721d5b41cc8 Merge: 06d97c5 a480f30 Author: Linus Torvalds Date: Fri Oct 13 18:10:35 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Couple of the arm people seem to wake up so this has imx and msm fixes, along with a bunch of i915 stable bounds fixes and an amdgpu regression fix. All seems pretty okay for now" * tag 'drm-fixes-for-v4.14-rc5' of git://people.freedesktop.org/~airlied/linux: drm/msm: fix _NO_IMPLICIT fencing case drm/msm: fix error path cleanup drm/msm/mdp5: Remove extra pm_runtime_put call in mdp5_crtc_cursor_set() drm/msm/dsi: Use correct pm_runtime_put variant during host_init drm/msm: fix return value check in _msm_gem_kernel_new() drm/msm: use proper memory barriers for updating tail/head drm/msm/mdp5: add missing max size for 8x74 v1 drm/amdgpu: fix placement flags in amdgpu_ttm_bind drm/i915/bios: parse DDI ports also for CHV for HDMI DDC pin and DP AUX channel gpu: ipu-v3: pre: implement workaround for ERR009624 gpu: ipu-v3: prg: wait for double buffers to be filled on channel startup gpu: ipu-v3: Allow channel burst locking on i.MX6 only drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get() drm/i915: Order two completing nop_submit_request drm/i915: Silence compiler warning for hsw_power_well_enable() drm/i915: Use crtc_state_is_legacy_gamma in intel_color_check drm/i915/edp: Increase the T12 delay quirk to 1300ms drm/i915/edp: Get the Panel Power Off timestamp after panel is off sync_file: Return consistent status in SYNC_IOC_FILE_INFO drm/atomic: Unref duplicated drm_atomic_state in drm_atomic_helper_resume() commit 8f6a9f0d0604817f7c8d4376fd51718f1bf192ee Author: Alexey Kardashevskiy Date: Wed Oct 11 16:00:34 2017 +1100 KVM: PPC: Book3S: Protect kvmppc_gpa_to_ua() with SRCU kvmppc_gpa_to_ua() accesses KVM memory slot array via srcu_dereference_check() and this produces warnings from RCU like below. This extends the existing srcu_read_lock/unlock to cover that kvmppc_gpa_to_ua() as well. We did not hit this before as this lock is not needed for the realmode handlers and hash guests would use the realmode path all the time; however the radix guests are always redirected to the virtual mode handlers and hence the warning. [ 68.253798] ./include/linux/kvm_host.h:575 suspicious rcu_dereference_check() usage! [ 68.253799] other info that might help us debug this: [ 68.253802] rcu_scheduler_active = 2, debug_locks = 1 [ 68.253804] 1 lock held by qemu-system-ppc/6413: [ 68.253806] #0: (&vcpu->mutex){+.+.}, at: [] vcpu_load+0x3c/0xc0 [kvm] [ 68.253826] stack backtrace: [ 68.253830] CPU: 92 PID: 6413 Comm: qemu-system-ppc Tainted: G W 4.14.0-rc3-00553-g432dcba58e9c-dirty #72 [ 68.253833] Call Trace: [ 68.253839] [c000000fd3d9f790] [c000000000b7fcc8] dump_stack+0xe8/0x160 (unreliable) [ 68.253845] [c000000fd3d9f7d0] [c0000000001924c0] lockdep_rcu_suspicious+0x110/0x180 [ 68.253851] [c000000fd3d9f850] [c0000000000e825c] kvmppc_gpa_to_ua+0x26c/0x2b0 [ 68.253858] [c000000fd3d9f8b0] [c00800000e3e1984] kvmppc_h_put_tce+0x12c/0x2a0 [kvm] Fixes: 121f80ba68f1 ("KVM: PPC: VFIO: Add in-kernel acceleration for VFIO") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 2cde3716321ec64a1faeaf567bd94100c7b4160f Author: Nicholas Piggin Date: Tue Oct 10 20:18:28 2017 +1000 KVM: PPC: Book3S HV: POWER9 more doorbell fixes - Add another case where msgsync is required. - Required barrier sequence for global doorbells is msgsync ; lwsync When msgsnd is used for IPIs to other cores, msgsync must be executed by the target to order stores performed on the source before its msgsnd (provided the source executes the appropriate sync). Fixes: 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 5 +++++ 1 file changed, 5 insertions(+) commit ac64115a66c18c01745bbd3c47a36b124e5fd8c0 Author: Greg Kurz Date: Thu Sep 14 23:56:25 2017 +0200 KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM The following program causes a kernel oops: #include #include #include #include #include main() { int fd = open("/dev/kvm", O_RDWR); ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); } This happens because when using the global KVM fd with KVM_CHECK_EXTENSION, kvm_vm_ioctl_check_extension() gets called with a NULL kvm argument, which gets dereferenced in is_kvmppc_hv_enabled(). Spotted while reading the code. Let's use the hv_enabled fallback variable, like everywhere else in this function. Fixes: 23528bb21ee2 ("KVM: PPC: Introduce KVM_CAP_PPC_HTM") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Greg Kurz Reviewed-by: David Gibson Reviewed-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/powerpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a480f30846d19b50106b3243d9d48683d2966249 Merge: 7a5bea7 ea850f6 Author: Dave Airlie Date: Sat Oct 14 09:59:20 2017 +1000 Merge tag 'drm-intel-fixes-2017-10-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for 4.14-rc5: Three fixes for stable: - Use crtc_state_is_legacy_gamma in intel_color_check (Maarten) - Read timings from the correct transcoder (Ville). - Fix HDMI on BSW (Jani). Other fixes: - eDP fixes (Manasi) - Silence compiler warnings (Chris) - Order two completing nop_submit_request (Chris) * tag 'drm-intel-fixes-2017-10-11' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/bios: parse DDI ports also for CHV for HDMI DDC pin and DP AUX channel drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get() drm/i915: Order two completing nop_submit_request drm/i915: Silence compiler warning for hsw_power_well_enable() drm/i915: Use crtc_state_is_legacy_gamma in intel_color_check drm/i915/edp: Increase the T12 delay quirk to 1300ms drm/i915/edp: Get the Panel Power Off timestamp after panel is off commit 7a5bea77b1494f048028037e116ba91c9a7d2822 Merge: a6402e8 06451a3 Author: Dave Airlie Date: Sat Oct 14 09:38:49 2017 +1000 Merge branch 'msm-fixes-4.14-rc4' of git://people.freedesktop.org/~robclark/linux into drm-fixes bunch of msm fixes * 'msm-fixes-4.14-rc4' of git://people.freedesktop.org/~robclark/linux: drm/msm: fix _NO_IMPLICIT fencing case drm/msm: fix error path cleanup drm/msm/mdp5: Remove extra pm_runtime_put call in mdp5_crtc_cursor_set() drm/msm/dsi: Use correct pm_runtime_put variant during host_init drm/msm: fix return value check in _msm_gem_kernel_new() drm/msm: use proper memory barriers for updating tail/head drm/msm/mdp5: add missing max size for 8x74 v1 commit 06d97c58f65cc747573a3fa8569cca0169e5096e Merge: e837d91 61b6397 Author: Linus Torvalds Date: Fri Oct 13 16:29:08 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "18 fixes" * emailed patches from Andrew Morton : 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 lib/Kconfig.debug: kernel hacking menu: runtime testing: keep tests together mm/migrate: fix indexing bug (off by one) and avoid out of bound access commit 61b639723be5a9fc4812d5d85cb769589afa5a38 Author: Huang Ying Date: Fri Oct 13 15:58:29 2017 -0700 mm, swap: use page-cluster as max window of VMA based swap readahead When the VMA based swap readahead was introduced, a new knob /sys/kernel/mm/swap/vma_ra_max_order was added as the max window of VMA swap readahead. This is to make it possible to use different max window for VMA based readahead and original physical readahead. But Minchan Kim pointed out that this will cause a regression because setting page-cluster sysctl to zero cannot disable swap readahead with the change. To fix the regression, the page-cluster sysctl is used as the max window of both the VMA based swap readahead and original physical swap readahead. If more fine grained control is needed in the future, more knobs can be added as the subordinate knobs of the page-cluster sysctl. The vma_ra_max_order knob is deleted. Because the knob was introduced in v4.14-rc1, and this patch is targeting being merged before v4.14 releasing, there should be no existing users of this newly added ABI. Link: http://lkml.kernel.org/r/20171011070847.16003-1-ying.huang@intel.com Fixes: ec560175c0b6fce ("mm, swap: VMA based swap readahead") Signed-off-by: "Huang, Ying" Reported-by: Minchan Kim Acked-by: Minchan Kim Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/testing/sysfs-kernel-mm-swap | 10 ------- mm/swap_state.c | 41 +++++--------------------- 2 files changed, 7 insertions(+), 44 deletions(-) commit a7b100953aa33a5bbdc3e5e7f2241b9c0704606e Author: Will Deacon Date: Fri Oct 13 15:58:25 2017 -0700 mm: page_vma_mapped: ensure pmd is loaded with READ_ONCE outside of lock Loading the pmd without holding the pmd_lock exposes us to races with concurrent updaters of the page tables but, worse still, it also allows the compiler to cache the pmd value in a register and reuse it later on, even if we've performed a READ_ONCE in between and seen a more recent value. In the case of page_vma_mapped_walk, this leads to the following crash when the pmd loaded for the initial pmd_trans_huge check is all zeroes and a subsequent valid table entry is loaded by check_pmd. We then proceed into map_pte, but the compiler re-uses the zero entry inside pte_offset_map, resulting in a junk pointer being installed in pvmw->pte: PC is at check_pte+0x20/0x170 LR is at page_vma_mapped_walk+0x2e0/0x540 [...] Process doio (pid: 2463, stack limit = 0xffff00000f2e8000) Call trace: check_pte+0x20/0x170 page_vma_mapped_walk+0x2e0/0x540 page_mkclean_one+0xac/0x278 rmap_walk_file+0xf0/0x238 rmap_walk+0x64/0xa0 page_mkclean+0x90/0xa8 clear_page_dirty_for_io+0x84/0x2a8 mpage_submit_page+0x34/0x98 mpage_process_page_bufs+0x164/0x170 mpage_prepare_extent_to_map+0x134/0x2b8 ext4_writepages+0x484/0xe30 do_writepages+0x44/0xe8 __filemap_fdatawrite_range+0xbc/0x110 file_write_and_wait_range+0x48/0xd8 ext4_sync_file+0x80/0x4b8 vfs_fsync_range+0x64/0xc0 SyS_msync+0x194/0x1e8 This patch fixes the problem by ensuring that READ_ONCE is used before the initial checks on the pmd, and this value is subsequently used when checking whether or not the pmd is present. pmd_check is removed and the pmd_present check is inlined directly. Link: http://lkml.kernel.org/r/1507222630-5839-1-git-send-email-will.deacon@arm.com Fixes: f27176cfc363 ("mm: convert page_mkclean_one() to use page_vma_mapped_walk()") Signed-off-by: Will Deacon Tested-by: Yury Norov Tested-by: Richard Ruigrok Acked-by: Kirill A. Shutemov Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_vma_mapped.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit ca182551857cc2c1e6a2b7f1e72090a137a15008 Author: Konstantin Khlebnikov Date: Fri Oct 13 15:58:22 2017 -0700 kmemleak: clear stale pointers from task stacks Kmemleak considers any pointers on task stacks as references. This patch clears newly allocated and reused vmap stacks. Link: http://lkml.kernel.org/r/150728990124.744199.8403409836394318684.stgit@buzz Signed-off-by: Konstantin Khlebnikov Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/thread_info.h | 2 +- kernel/fork.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 7e86600606cef21beec725039d70377fb364f881 Author: Eryu Guan Date: Fri Oct 13 15:58:18 2017 -0700 fs/binfmt_misc.c: node could be NULL when evicting inode inode->i_private is assigned by a Node pointer only after registering a new binary format, so it could be NULL if inode was created by bm_fill_super() (or iput() was called by the error path in bm_register_write()), and this could result in NULL pointer dereference when evicting such an inode. e.g. mount binfmt_misc filesystem then umount it immediately: mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc umount /proc/sys/fs/binfmt_misc will result in BUG: unable to handle kernel NULL pointer dereference at 0000000000000013 IP: bm_evict_inode+0x16/0x40 [binfmt_misc] ... Call Trace: evict+0xd3/0x1a0 iput+0x17d/0x1d0 dentry_unlink_inode+0xb9/0xf0 __dentry_kill+0xc7/0x170 shrink_dentry_list+0x122/0x280 shrink_dcache_parent+0x39/0x90 do_one_tree+0x12/0x40 shrink_dcache_for_umount+0x2d/0x90 generic_shutdown_super+0x1f/0x120 kill_litter_super+0x29/0x40 deactivate_locked_super+0x43/0x70 deactivate_super+0x45/0x60 cleanup_mnt+0x3f/0x70 __cleanup_mnt+0x12/0x20 task_work_run+0x86/0xa0 exit_to_usermode_loop+0x6d/0x99 syscall_return_slowpath+0xba/0xf0 entry_SYSCALL_64_fastpath+0xa3/0xa Fix it by making sure Node (e) is not NULL. Link: http://lkml.kernel.org/r/20171010100642.31786-1-eguan@redhat.com Fixes: 83f918274e4b ("exec: binfmt_misc: shift filp_close(interp_file) from kill_node() to bm_evict_inode()") Signed-off-by: Eryu Guan Acked-by: Oleg Nesterov Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f892760aa66a2d657deaf59538fb69433036767c Author: Matthew Wilcox Date: Fri Oct 13 15:58:15 2017 -0700 fs/mpage.c: fix mpage_writepage() for pages with buffers When using FAT on a block device which supports rw_page, we can hit BUG_ON(!PageLocked(page)) in try_to_free_buffers(). This is because we call clean_buffers() after unlocking the page we've written. Introduce a new clean_page_buffers() which cleans all buffers associated with a page and call it from within bdev_write_page(). [akpm@linux-foundation.org: s/PAGE_SIZE/~0U/ per Linus and Matthew] Link: http://lkml.kernel.org/r/20171006211541.GA7409@bombadil.infradead.org Signed-off-by: Matthew Wilcox Reported-by: Toshi Kani Reported-by: OGAWA Hirofumi Tested-by: Toshi Kani Acked-by: Johannes Thumshirn Cc: Ross Zwisler Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 6 ++++-- fs/mpage.c | 14 +++++++++++--- include/linux/buffer_head.h | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) commit e8c97af0c1f23d6ffedcaa3918861f2595e1db62 Author: Randy Dunlap Date: Fri Oct 13 15:58:11 2017 -0700 linux/kernel.h: add/correct kernel-doc notation Add kernel-doc notation for some macros. Correct kernel-doc comments & typos for a few macros. Link: http://lkml.kernel.org/r/76fa1403-1511-be4c-e9c4-456b43edfad3@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 90 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 16 deletions(-) commit e65c62b1375cbff69fa925787bcdae4b27bffb48 Author: Johannes Weiner Date: Fri Oct 13 15:58:08 2017 -0700 tty: fall back to N_NULL if switching to N_TTY fails during hangup We have seen NULL-pointer dereference crashes in tty->disc_data when the N_TTY fallback driver failed to open during hangup. The immediate cause of this open to fail has been addressed in the preceding patch to vmalloc(), but this code could be more robust. As Alan pointed out in commit 8a8dabf2dd68 ("tty: handle the case where we cannot restore a line discipline"), the N_TTY driver, historically the safe fallback that could never fail, can indeed fail, but the surrounding code is not prepared to handle this. To avoid crashes he added a new N_NULL driver to take N_TTY's place as the last resort. Hook that fallback up to the hangup path. Update tty_ldisc_reinit() to reflect the reality that n_tty_open can indeed fail. Link: http://lkml.kernel.org/r/20171004185959.GC2136@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Alan Cox Cc: Christoph Hellwig Cc: Dmitry Vyukov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/tty/tty_ldisc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b8c8a338f75e052d9fa2fed851259320af412e3f Author: Johannes Weiner Date: Fri Oct 13 15:58:05 2017 -0700 Revert "vmalloc: back off when the current task is killed" This reverts commits 5d17a73a2ebe ("vmalloc: back off when the current task is killed") and 171012f56127 ("mm: don't warn when vmalloc() fails due to a fatal signal"). Commit 5d17a73a2ebe ("vmalloc: back off when the current task is killed") made all vmalloc allocations from a signal-killed task fail. We have seen crashes in the tty driver from this, where a killed task exiting tries to switch back to N_TTY, fails n_tty_open because of the vmalloc failing, and later crashes when dereferencing tty->disc_data. Arguably, relying on a vmalloc() call to succeed in order to properly exit a task is not the most robust way of doing things. There will be a follow-up patch to the tty code to fall back to the N_NULL ldisc. But the justification to make that vmalloc() call fail like this isn't convincing, either. The patch mentions an OOM victim exhausting the memory reserves and thus deadlocking the machine. But the OOM killer is only one, improbable source of fatal signals. It doesn't make sense to fail allocations preemptively with plenty of memory in most cases. The patch doesn't mention real-life instances where vmalloc sites would exhaust memory, which makes it sound more like a theoretical issue to begin with. But just in case, the OOM access to memory reserves has been restricted on the allocator side in cd04ae1e2dc8 ("mm, oom: do not rely on TIF_MEMDIE for memory reserves access"), which should take care of any theoretical concerns on that front. Revert this patch, and the follow-up that suppresses the allocation warnings when we fail the allocations due to a signal. Link: http://lkml.kernel.org/r/20171004185906.GB2136@cmpxchg.org Fixes: 171012f56127 ("mm: don't warn when vmalloc() fails due to a fatal signal") Signed-off-by: Johannes Weiner Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Alan Cox Cc: Christoph Hellwig Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 6 ------ 1 file changed, 6 deletions(-) commit ef4650144e76ae361fe4b8c9a0afcd53074cd520 Author: Boris Brezillon Date: Fri Oct 13 15:58:01 2017 -0700 mm/cma.c: take __GFP_NOWARN into account in cma_alloc() cma_alloc() unconditionally prints an INFO message when the CMA allocation fails. Make this message conditional on the non-presence of __GFP_NOWARN in gfp_mask. This patch aims at removing INFO messages that are displayed when the VC4 driver tries to allocate buffer objects. From the driver perspective an allocation failure is acceptable, and the driver can possibly do something to make following allocation succeed (like flushing the VC4 internal cache). Link: http://lkml.kernel.org/r/20171004125447.15195-1-boris.brezillon@free-electrons.com Signed-off-by: Boris Brezillon Acked-by: Laura Abbott Cc: Jaewon Kim Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt 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 51962a9d437f0d580c04cd2c4abc2bd417200da2 Author: Guenter Roeck Date: Fri Oct 13 15:57:58 2017 -0700 scripts/kallsyms.c: ignore symbol type 'n' gcc on aarch64 may emit synbols of type 'n' if the kernel is built with '-frecord-gcc-switches'. In most cases, those symbols are reported with nm as 000000000000000e n $d and with objdump as 0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line 000000000000000e l .GCC.command.line 0000000000000000 $d Those symbols are detected in is_arm_mapping_symbol() and ignored. However, if "--prefix-symbols=" is configured as well, the situation is different. For example, in efi/libstub, arm64 images are built with '--prefix-alloc-sections=.init --prefix-symbols=__efistub_'. In combination with '-frecord-gcc-switches', the symbols are now reported by nm as: 000000000000000e n __efistub_$d and by objdump as: 0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line 000000000000000e l .GCC.command.line 0000000000000000 __efistub_$d Those symbols are no longer ignored and included in the base address calculation. This results in a base address of 000000000000000e, which in turn causes kallsyms to abort with kallsyms failure: relative symbol value 0xffffff900800a000 out of range in relative mode The problem is seen in little endian arm64 builds with CONFIG_EFI enabled and with '-frecord-gcc-switches' set in KCFLAGS. Explicitly ignore symbols of type 'n' since those are clearly debug symbols. Link: http://lkml.kernel.org/r/1507136063-3139-1-git-send-email-linux@roeck-us.net Signed-off-by: Guenter Roeck Acked-by: Ard Biesheuvel Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/kallsyms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ddd8faf4399ab4f4edad5604eab35f8a87caf02 Author: Andrea Arcangeli Date: Fri Oct 13 15:57:54 2017 -0700 userfaultfd: selftest: exercise -EEXIST only in background transfer I was stress testing some backports and with high load, after some time, the latest version of the selftest showed some false positive in connection with the uffdio_copy_retry. This seems to fix it while still exercising -EEXIST in the background transfer once in a while. The fork child will quit after the last UFFDIO_COPY is run, so a repeated UFFDIO_COPY may not return -EEXIST. This change restricts the -EEXIST stress to the background transfer where the memory can't go away from under it. Also updated uffdio_zeropage, so the interface is consistent. Link: http://lkml.kernel.org/r/20171004171541.1495-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Pavel Emelyanov Cc: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 064f0e9302af4f4ab5e9dca03a5a77d6bebfd35e Author: Zhen Lei Date: Fri Oct 13 15:57:50 2017 -0700 mm: only display online cpus of the numa node When I execute numactl -H (which reads /sys/devices/system/node/nodeX/cpumap and displays cpumask_of_node for each node), I get different result on X86 and arm64. For each numa node, the former only displayed online CPUs, and the latter displayed all possible CPUs. Unfortunately, both Linux documentation and numactl manual have not described it clear. I sent a mail to ask for help, and Michal Hocko replied that he preferred to print online cpus because it doesn't really make much sense to bind anything on offline nodes. Will said: "I suspect the vast majority (if not all) code that reads this file was developed for x86, so having the same behaviour for arm64 sounds like something we should do ASAP before people try to special case with things like #ifdef __aarch64__. I'd rather have this in 4.14 if possible." Link: http://lkml.kernel.org/r/1506678805-15392-2-git-send-email-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Acked-by: Michal Hocko Cc: Catalin Marinas Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Tianhong Ding Cc: Hanjun Guo Cc: Libin Cc: Kefeng Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit af0db981f35ea99b00a0b249bf0bedef8cf972e8 Author: Zi Yan Date: Fri Oct 13 15:57:47 2017 -0700 mm: remove unnecessary WARN_ONCE in page_vma_mapped_walk(). A non present pmd entry can appear after pmd_lock is taken in page_vma_mapped_walk(), even if THP migration is not enabled. The WARN_ONCE is unnecessary. Link: http://lkml.kernel.org/r/20171003142606.12324-1-zi.yan@sent.com Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path") Signed-off-by: Zi Yan Reported-by: Abdul Haleem Tested-by: Abdul Haleem Acked-by: Kirill A. Shutemov Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_vma_mapped.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de55c8b251974247edda38e952da8e8dd71683ec Author: Andrey Ryabinin Date: Fri Oct 13 15:57:43 2017 -0700 mm/mempolicy: fix NUMA_INTERLEAVE_HIT counter Commit 3a321d2a3dde ("mm: change the call sites of numa statistics items") separated NUMA counters from zone counters, but the NUMA_INTERLEAVE_HIT call site wasn't updated to use the new interface. So alloc_page_interleave() actually increments NR_ZONE_INACTIVE_FILE instead of NUMA_INTERLEAVE_HIT. Fix this by using __inc_numa_state() interface to increment NUMA_INTERLEAVE_HIT. Link: http://lkml.kernel.org/r/20171003191003.8573-1-aryabinin@virtuozzo.com Fixes: 3a321d2a3dde ("mm: change the call sites of numa statistics items") Signed-off-by: Andrey Ryabinin Acked-by: Mel Gorman Cc: Kemi Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a1ac5dc7be09883051b1bf89a5e57d7ad850fa5 Author: Arnd Bergmann Date: Fri Oct 13 15:57:40 2017 -0700 include/linux/of.h: provide of_n_{addr,size}_cells wrappers for !CONFIG_OF The pci-rcar driver is enabled for compile tests, and this has shown that the driver cannot build without CONFIG_OF, following the inclusion of commit f8f2fe7355fb ("PCI: rcar: Use new OF interrupt mapping when possible"): drivers/pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init': drivers/pci/host/pcie-rcar.c:1039:2: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration] parser->pna = of_n_addr_cells(node); ^ As pointed out by Ben Dooks and Geert Uytterhoeven, this is actually supposed to build fine, which we can achieve if we make the declaration of of_irq_parse_and_map_pci conditional on CONFIG_OF and provide an empty inline function otherwise, as we do for a lot of other of interfaces. This lets us build the rcar_pci driver again without CONFIG_OF for build testing. All platforms using this driver select OF, so this doesn't change anything for the users. [akpm@linux-foundation.org: be consistent with surrounding code] Link: http://lkml.kernel.org/r/20170911200805.3363318-1-arnd@arndb.de Fixes: c25da4778803 ("PCI: rcar: Add Renesas R-Car PCIe driver") Signed-off-by: Arnd Bergmann Reviewed-by: Frank Rowand Acked-by: Geert Uytterhoeven Cc: Bjorn Helgaas Cc: Magnus Damm Cc: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/of.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c02c30093254189a6ef55fed415a4ffb55a74cdf Author: Yang Shi Date: Fri Oct 13 15:57:37 2017 -0700 mm/madvise.c: add description for MADV_WIPEONFORK and MADV_KEEPONFORK mm/madvise.c has a brief description about all MADV_ flags. Add a description for the newly added MADV_WIPEONFORK and MADV_KEEPONFORK. Although man page has the similar information, but it'd better to keep the consistent with other flags. Link: http://lkml.kernel.org/r/1506117328-88228-1-git-send-email-yang.s@alibaba-inc.com Signed-off-by: Yang Shi Reviewed-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cc3fa84045694c2fd7ccf6ce84dee5cba372a7d3 Author: Randy Dunlap Date: Fri Oct 13 15:57:33 2017 -0700 lib/Kconfig.debug: kernel hacking menu: runtime testing: keep tests together Expand the "Runtime testing" menu by including more entries inside it instead of after it. This is just Kconfig symbol movement. This causes the (arch-independent) Runtime tests to be presented (listed) all in one place instead of in multiple places. Link: http://lkml.kernel.org/r/c194e5c4-2042-bf94-a2d8-7aa13756e257@infradead.org Signed-off-by: Randy Dunlap Acked-by: Kees Cook Cc: Dave Hansen Cc: "Luis R. Rodriguez" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 143 +++++++++++++++++++++++++++--------------------------- 1 file changed, 71 insertions(+), 72 deletions(-) commit e20d103b6c37038ca27409f746f0b3351bcd0c44 Author: Mark Hairgrove Date: Fri Oct 13 15:57:30 2017 -0700 mm/migrate: fix indexing bug (off by one) and avoid out of bound access Index was incremented before last use and thus the second array could dereference to an invalid address (not mentioning the fact that it did not properly clear the entry we intended to clear). Link: http://lkml.kernel.org/r/1506973525-16491-1-git-send-email-jglisse@redhat.com Fixes: 8315ada7f095bf ("mm/migrate: allow migrate_vma() to alloc new page on empty entry") Signed-off-by: Mark Hairgrove Signed-off-by: Jérôme Glisse Cc: Reza Arbab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e837d9134be8018d15421546c1defd35a1bb3d06 Merge: 997301a 407dae1 Author: Linus Torvalds Date: Fri Oct 13 13:28:19 2017 -0700 Merge tag 'pci-v4.14-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - revert Tegra MSI change that caused a regression on TrimSlice (Thierry Reding) - finish Aardvark conversion to host bridge IRQ mapping. We missed Aardvark the first time around so it regressed (Thomas Petazzoni) * tag 'pci-v4.14-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: aardvark: Move to struct pci_host_bridge IRQ mapping functions Revert "PCI: tegra: Do not allocate MSI target memory" commit 29479bfe83bafb8aa37f36ca132ee8349d11da0c Author: Jiri Olsa Date: Fri Oct 13 10:37:35 2017 +0200 perf tools: Check wether the eBPF file exists in event parsing Adding the check wether the eBPF file exists, to consider it as eBPF input file. This way we can differentiate eBPF events from events that end up with same suffix as eBPF file. Before: $ perf stat -e 'cpu/uops_executed.core/' true bpf: builtin compilation failed: -95, try external compiler WARNING: unable to get correct kernel building directory. Hint: Set correct kbuild directory using 'kbuild-dir' option in [llvm] section of ~/.perfconfig or set it to "" to suppress kbuild detection. event syntax error: 'cpu/uops_executed.core/' \___ Failed to load cpu/uops_executed.c from source: 'version' section incorrect or lost After: $ perf stat -e 'cpu/uops_executed.core/' true Performance counter stats for 'true': 181,533 cpu/uops_executed.core/:u 0.002795447 seconds time elapsed If user makes type in the eBPF file, we prioritize the event syntax and show following warning: $ perf stat -e 'krava.c//' true event syntax error: 'krava.c//' \___ Cannot find PMU `krava.c'. Missing kernel support? Reported-and-Tested-by: Andi Kleen Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20171013083736.15037-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit d0e35234f647631ddfa5fa8c8ec66c9bc698f0ab Author: Jiri Olsa Date: Fri Oct 13 10:37:29 2017 +0200 perf hists: Add extra integrity checks to fmt_free() Make sure the struct perf_hpp_fmt is properly unhooked before we free it. 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/r/20171013083736.15037-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/hist.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 70b01dfd765dd2196d51f33a49df23954416f34a Author: Jiri Olsa Date: Fri Oct 13 10:37:28 2017 +0200 perf hists: Fix crash in perf_hpp__reset_output_field() Du Changbin reported crash [1] when calling perf_hpp__reset_output_field() after unregistering field via perf_hpp__column_unregister(). This ends up in calling following list_del* sequence on the same format: perf_hpp__column_unregister: list_del(&format->list); perf_hpp__reset_output_field: list_del_init(&fmt->list); where the later list_del_init might touch already freed formats. Fixing this by replacing list_del() with list_del_init() in perf_hpp__column_unregister(). [1] http://marc.info/?l=linux-kernel&m=149059595826019&w=2 Reported-by: Changbin Du Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20171013083736.15037-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88fa2dfb075a20c3464e3d303c57dd8ced9e8309 Author: Ricardo Ribalda Delgado Date: Tue Oct 10 18:11:15 2017 +0200 i2c: piix4: Disable completely the IMC during SMBUS_BLOCK_DATA SMBUS_BLOCK_DATA transactions might fail due to a race condition with the IMC (Integrated Micro Controller), even when the IMC semaphore is used. This bug has been reported and confirmed by AMD, who suggested as a solution an IMC firmware upgrade (obtained via BIOS update) and disabling the IMC during SMBUS_BLOCK_DATA transactions. Even without the IMC upgrade, the SMBUS is much more stable with this patch. Tested on a Bettong-alike board. Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 132 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 126 insertions(+), 6 deletions(-) commit 0fe16195f89173652cf111d7b384941b00c5aabd Author: Guenter Roeck Date: Sat Jul 15 16:51:26 2017 -0700 i2c: piix4: Fix SMBus port selection for AMD Family 17h chips AMD Family 17h uses the KERNCZ SMBus controller. While its documentation is not publicly available, it is documented in the BIOS and Kernel Developer’s Guide for AMD Family 15h Models 60h-6Fh Processors. On this SMBus controller, the port select register is at PMx register 0x02, bit 4:3 (PMx00 register bit 20:19). Without this patch, the 4 SMBus channels on AMD Family 17h chips are mirrored and report the same chips on all channels. Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-piix4.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit eba523b468a1e30384b6e8c1a9419163f325086e Author: Clemens Gruber Date: Mon Oct 9 21:26:14 2017 +0200 i2c: imx: fix misleading bus recovery debug message The arguments for SDA and SCL were swapped. Fix it. Signed-off-by: Clemens Gruber Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df0a2fdab0068f7452bf0a97ea9ba0ad69d49a1f Author: Wei Jinhua Date: Wed Oct 11 15:57:20 2017 +0800 i2c: imx: use IRQF_SHARED mode to request IRQ Some SoC share one irq number between I2C controllers. For example, on the LS2088 board, I2C 1 and I2C 2 share one irq number. In this case, only one I2C controller can register successfully, and others will fail. Signed-off-by: Wei Jinhua Reviewed-by: Jiang Biao Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 997301a860fca1a05ab8e383a8039b65f8abeb1e Merge: 0c080ce ce76353 Author: Linus Torvalds Date: Fri Oct 13 11:49:38 2017 -0700 Merge tag 'iommu-fixes-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - keep an important data structure in the Exynos driver around after kernel-init to fix a kernel-oops - keep SWIOTLB enabled when SME is active in the AMD IOMMU driver - add a missing IOTLB sync to the AMD IOMMU driver * tag 'iommu-fixes-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Finish TLB flush in amd_iommu_unmap() iommu/exynos: Remove initconst attribute to avoid potential kernel oops iommu/amd: Do not disable SWIOTLB if SME is active commit 0c080ceee7e15a371a05c8c8c4b4dda2fa03209f Merge: e18e884 3314c6b Author: Linus Torvalds Date: Fri Oct 13 11:44:09 2017 -0700 Merge tag 'devicetree-fixes-for-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - Fix memory leak in error case of of_console_check - Increase number of reserved memory regions to 32. 16 was not enough on some Power systems. - Fix OF node refcounting for of_fwnode_graph_get_port_parent * tag 'devicetree-fixes-for-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: device property: preserve usecount for node passed to of_fwnode_graph_get_port_parent() drivers: of: increase MAX_RESERVED_REGIONS to 32 of: do not leak console options commit e18e884445aacb319a7b607a5813b02bcaeca834 Merge: 3be5f88 0d8ba16 Author: Linus Torvalds Date: Fri Oct 13 11:39:28 2017 -0700 Merge tag 'powerpc-4.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A fix for a bad bug (written by me) in our livepatch handler. Removal of an over-zealous lockdep_assert_cpus_held() in our topology code. A fix to the recently added emulation of cntlz[wd]. And three small fixes to the recently added IMC PMU driver. Thanks to: Anju T Sudhakar, Balbir Singh, Kamalesh Babulal, Naveen N. Rao, Sandipan Das, Santosh Sivaraj, Thiago Jung Bauermann" * tag 'powerpc-4.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf: Fix IMC initialization crash powerpc/perf: Add ___GFP_NOWARN flag to alloc_pages_node() powerpc/perf: Fix for core/nest imc call trace on cpuhotplug powerpc: Don't call lockdep_assert_cpus_held() from arch_update_cpu_topology() powerpc/lib/sstep: Fix count leading zeros instructions powerpc/livepatch: Fix livepatch stack access commit 3be5f884f60e9ac66f38c11d92929ba367a86cdb Merge: 3d78827 eac779a Author: Linus Torvalds Date: Fri Oct 13 11:35:03 2017 -0700 Merge tag 'for-linus-4.14c-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixlet from Juergen Gross: "A minor fix correcting the cpu hotplug name for Xen guests" * tag 'for-linus-4.14c-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/vcpu: Use a unified name about cpu hotplug state for pv and pvhvm commit c6ebcedbab7ca78984959386012a17b21183e1a3 Author: Pontus Andersson Date: Mon Oct 2 14:45:19 2017 +0200 i2c: ismt: Separate I2C block read from SMBus block read Commit b6c159a9cb69 ("i2c: ismt: Don't duplicate the receive length for block reads") broke I2C block reads. It aimed to fix normal SMBus block read, but changed the correct behavior of I2C block read in the process. According to Documentation/i2c/smbus-protocol, one vital difference between normal SMBus block read and I2C block read is that there is no byte count prefixed in the data sent on the wire: SMBus Block Read: i2c_smbus_read_block_data() S Addr Wr [A] Comm [A] S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P I2C Block Read: i2c_smbus_read_i2c_block_data() S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P Therefore the two transaction types need to be processed differently in the driver by copying of the dma_buffer as done previously for the I2C_SMBUS_I2C_BLOCK_DATA case. Fixes: b6c159a9cb69 ("i2c: ismt: Don't duplicate the receive length for block reads") Signed-off-by: Pontus Andersson Tested-by: Stephen Douthit Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ismt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8c1a8a32438b95792bbd8719d1cd4fe36e9eba03 Author: Christoffer Dall Date: Fri Oct 13 11:40:11 2017 +0200 KVM: arm64: its: Fix missing dynamic allocation check in scan_its_table We currently allocate an entry dynamically, but we never check if the allocation actually succeeded. We actually don't need a dynamic allocation, because we know the maximum size of an ITS table entry, so we can simply use an allocation on the stack. Cc: Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit b9849860675f925da0380f4ea76c3f5041909737 Author: Emiliano Ingrassia Date: Thu Oct 12 11:00:47 2017 +0200 net: stmmac: dwmac_lib: fix interchanged sleep/timeout values in DMA reset function The DMA reset timeout, used in read_poll_timeout, is ten times shorter than the sleep time. This patch fixes these values interchanging them, as it was before the read_poll_timeout introduction. Fixes: 8a70aeca80c2 ("net: stmmac: Use readl_poll_timeout") Signed-off-by: Emiliano Ingrassia Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7ad97938eaccb5a9ff4534167b1abafb507935c Author: Arnd Bergmann Date: Thu Oct 12 11:48:31 2017 +0200 liquidio: fix timespec64_to_ns typo While experimenting with changes to the timekeeping code, I ran into a build error in the liquidio driver: drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'liquidio_ptp_settime': drivers/net/ethernet/cavium/liquidio/lio_main.c:1850:22: error: passing argument 1 of 'timespec_to_ns' from incompatible pointer type [-Werror=incompatible-pointer-types] The driver had a type mismatch since it was first merged, but this never caused problems because it is only built on 64-bit architectures that define timespec and timespec64 to the same type. If we ever want to compile-test the driver on 32-bit or change the way that 64-bit timespec64 is defined, we need to fix it, so let's just do it now. Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters") Signed-off-by: Arnd Bergmann Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db5972c95d78fb7d3e0f67b9b6c90adf0ed96db1 Merge: 12ed377 a6127b4 Author: David S. Miller Date: Fri Oct 13 08:42:53 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.14 Nothing really special standing out, all of these are important fixes which should go to 4.14. iwlwifi * fix support for 3168 device series * fix a potential crash when using FW debugging recording; * improve channel flags parsing to avoid warnings on too long traces * return -ENODATA when the temperature is not available, since the -EIO we were returning was causing fatal errors in userspace * avoid printing too many messages in dmesg when using monitor mode, since this can become very noisy and completely flood the logs brcmsmac * reduce stack usage to avoid frame size warnings with KASAN brcmfmac * add a check to avoid copying uninitialised memory rtlwifi: * fix a regression with rtl8821ae starting from v4.11 where connections was frequently lost ==================== Signed-off-by: David S. Miller commit ce76353f169a6471542d999baf3d29b121dce9c0 Author: Joerg Roedel Date: Fri Oct 13 14:32:37 2017 +0200 iommu/amd: Finish TLB flush in amd_iommu_unmap() The function only sends the flush command to the IOMMU(s), but does not wait for its completion when it returns. Fix that. Fixes: 601367d76bd1 ('x86/amd-iommu: Remove iommu_flush_domain function') Cc: stable@vger.kernel.org # >= 2.6.33 Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 1 + 1 file changed, 1 insertion(+) commit 0d08af35f16a0cc418ad2afde3bc5f70ace82705 Author: Doug Berger Date: Wed Oct 4 14:28:17 2017 +0200 genirq: generic chip: remove irq_gc_mask_disable_reg_and_ack() Any usage of the irq_gc_mask_disable_reg_and_ack() function has been replaced with the desired functionality. The incorrect and ambiguously named function is removed here to prevent accidental misuse. Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier include/linux/irq.h | 1 - kernel/irq/generic-chip.c | 16 ---------------- 2 files changed, 17 deletions(-) commit 16150904d8ba7b93b51d97bcfc671951b7f3dc02 Author: Florian Fainelli Date: Wed Oct 4 14:27:20 2017 +0200 irqchip/tango: Use irq_gc_mask_disable_and_ack_set The only usage of the irq_gc_mask_disable_reg_and_ack() function is by the Tango irqchip driver. This usage is replaced by the irq_gc_mask_disable_and_ack_set() function since it provides the intended functionality. Fixes: 4bba66899ac6 ("irqchip/tango: Add support for Sigma Designs SMP86xx/SMP87xx interrupt controller") Acked-by: Mans Rullgard Acked-by: Marc Gonzalez Signed-off-by: Florian Fainelli Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier drivers/irqchip/irq-tango.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20608924cc2e6bdeaf6f58ccbe9ddfe12dbfa082 Author: Doug Berger Date: Wed Oct 4 14:26:26 2017 +0200 genirq: generic chip: Add irq_gc_mask_disable_and_ack_set() The irq_gc_mask_disable_reg_and_ack() function name implies that it provides the combined functions of irq_gc_mask_disable_reg() and irq_gc_ack(). However, the implementation does not actually do that since it writes the mask instead of the disable register. It also does not maintain the mask cache which makes it inappropriate to use with other masking functions. In addition, commit 659fb32d1b67 ("genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd)") effectively renamed irq_gc_ack() to irq_gc_ack_set_bit() so this function probably should have also been renamed at that time. The generic chip code currently provides three functions for use with the irq_mask member of the irq_chip structure and two functions for use with the irq_ack member of the irq_chip structure. These functions could be combined into six functions for use with the irq_mask_ack member of the irq_chip structure. However, since only one of the combinations is currently used, only the function irq_gc_mask_disable_and_ack_set() is added by this commit. The '_reg' and '_bit' portions of the base function name were left out of the new combined function name in an attempt to keep the function name length manageable with the 80 character source code line length while still allowing the distinct aspects of each combination to be captured by the name. If other combinations are desired in the future please add them to the irq generic chip library at that time. Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier include/linux/irq.h | 1 + kernel/irq/generic-chip.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit 30ae9610d275f8f03f5bf7612ce71d8af6fc400b Author: Shanker Donthineni Date: Mon Oct 9 11:46:55 2017 -0500 irqchip/gic-v3-its: Add missing changes to support 52bit physical address The current ITS driver works fine as long as normal memory and GICR regions are located within the lower 48bit (>=0 && <2^48) physical address space. Some of the registers GICR_PEND/PROP, GICR_VPEND/VPROP and GITS_CBASER are handled properly but not all when configuring the hardware with 52bit physical address. This patch does the following changes to support 52bit PA. -Handle 52bit PA in GITS_BASERn. -Fix ITT_addr width to 52bits, bits[51:8]. -Fix RDbase width to 52bits, bits[51:16]. -Fix VPT_addr width to 52bits, bits[51:16]. Definition of the GITS_BASERn register when ITS PageSize is 64KB: -Bits[47:16] of the register provide bits[47:16] of the table PA. -Bits[15:12] of the register provide bits[51:48] of the table PA. -Bits[15:00] of the base physical address are 0. Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 26 +++++++++++++++++++++----- include/linux/irqchip/arm-gic-v3.h | 2 ++ 2 files changed, 23 insertions(+), 5 deletions(-) commit 32bd44dc19de012e22f1fdebd2606b5fb86d54c5 Author: Shanker Donthineni Date: Sat Oct 7 15:43:48 2017 -0500 irqchip/gic-v3-its: Fix the incorrect parsing of VCPU table size The VCPU table consists of vPE entries, and its size provides the number of VPEs supported by GICv4 hardware. Unfortunately the maximum size of the VPE table is not discoverable like Device table. All VLPI commands limits the number of bits to 16 to hold VPEID, which is index into VCPU table. Don't apply DEVID bits for VCPU table instead assume maximum bits to 16. ITS log messages on QDF2400 without fix: allocated 524288 Devices (indirect, esz 8, psz 64K, shr 1) allocated 8192 Interrupt Collections (flat, esz 8, psz 64K, shr 1) Virtual CPUs Table too large, reduce ids 32->26 Virtual CPUs too large, reduce ITS pages 8192->256 allocated 2097152 Virtual CPUs (flat, esz 8, psz 64K, shr 1) ITS log messages on QDF2400 with fix: allocated 524288 Devices (indirect, esz 8, psz 64K, shr 1) allocated 8192 Interrupt Collections (flat, esz 8, psz 64K, shr 1) allocated 65536 Virtual CPUs (flat, esz 8, psz 64K, shr 1) Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit c427a475b6bc9d3304cca04acdec53464f71f24c Author: Shanker Donthineni Date: Sat Sep 23 13:50:19 2017 -0500 irqchip/gic-v3-its: Fix the incorrect BUG_ON in its_init_vpe_domain() The driver probe path hits 'BUG_ON(entries != vpe_proxy.dev->nr_ites)' on systems where it has VLPI capability, doesn't support direct LPI feature and boot with a single CPU. Relax the BUG_ON() condition to fix the issue. Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a40aedec653bb9e22c01ef4fe0a66278b1a666f Author: Julien Grall Date: Tue Oct 3 15:20:27 2017 +0100 DT: arm,gic-v3: Update the ITS size in the examples Currently, the examples are using 2MB for the ITS size. Per the specification (section 8.18 in ARM IHI 0069D), the ITS address map is 128KB. Update the examples to match the specification. Signed-off-by: Julien Grall Signed-off-by: Marc Zyngier .../devicetree/bindings/interrupt-controller/arm,gic-v3.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d8ba16278ec30a262d931875018abee332f926f Author: Anju T Sudhakar Date: Fri Oct 13 11:29:41 2017 +0530 powerpc/perf: Fix IMC initialization crash Panic observed with latest firmware, and upstream kernel: NIP init_imc_pmu+0x8c/0xcf0 LR init_imc_pmu+0x2f8/0xcf0 Call Trace: init_imc_pmu+0x2c8/0xcf0 (unreliable) opal_imc_counters_probe+0x300/0x400 platform_drv_probe+0x64/0x110 driver_probe_device+0x3d8/0x580 __driver_attach+0x14c/0x1a0 bus_for_each_dev+0x8c/0xf0 driver_attach+0x34/0x50 bus_add_driver+0x298/0x350 driver_register+0x9c/0x180 __platform_driver_register+0x5c/0x70 opal_imc_driver_init+0x2c/0x40 do_one_initcall+0x64/0x1d0 kernel_init_freeable+0x280/0x374 kernel_init+0x24/0x160 ret_from_kernel_thread+0x5c/0x74 While registering nest imc at init, cpu-hotplug callback nest_pmu_cpumask_init() makes an OPAL call to stop the engine. And if the OPAL call fails, imc_common_cpuhp_mem_free() is invoked to cleanup memory and cpuhotplug setup. But when cleaning up the attribute group, we are dereferencing the attribute element array without checking whether the backing element is not NULL. This causes the kernel panic. Add a check for the backing element prior to dereferencing the attribute element, to handle the failing case gracefully. Signed-off-by: Anju T Sudhakar Reported-by: Pridhiviraj Paidipeddi [mpe: Trim change log] Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6402e80fa655bdc68d66784054cb4e65376b82f Merge: 0998077 11aff4b Author: Dave Airlie Date: Fri Oct 13 17:32:30 2017 +1000 Merge tag 'imx-drm-fixes-2017-10-12' of git://git.pengutronix.de/git/pza/linux into drm-fixes drm/imx: i.MX5 regression fix and i.MX6QP PRE/PRG stability fixes - Disable channel burst locking on IPUv3EX (i.MX51) and IPUv3M (i.MX53). This fixes a regression introduced by commit 790cb4c7c954 ("drm/imx: lock scanout transfers for consecutive bursts"). - Give PRG a head start. Waiting for both double buffers to fill up before enabling the IPU improves startup reliability. - Avoid PRE control register updates during unsafe window, workaround for ERR009624. * tag 'imx-drm-fixes-2017-10-12' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: pre: implement workaround for ERR009624 gpu: ipu-v3: prg: wait for double buffers to be filled on channel startup gpu: ipu-v3: Allow channel burst locking on i.MX6 only commit 09980771815545a552b3a3e05d0ed283fa013602 Merge: 545036a 27b94b4 Author: Dave Airlie Date: Fri Oct 13 16:23:34 2017 +1000 Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes single amdgpu regression fix. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix placement flags in amdgpu_ttm_bind commit 12ed3772b7e11b53a58ecbd8ce258271fb148cc6 Author: Stephen Hemminger Date: Wed Oct 11 20:10:31 2017 -0700 ip: update policy routing config help The kernel config help for policy routing was still pointing at an ancient document from 2000 that refers to Linux 2.1. Update it to point to something that is at least occasionally updated. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv4/Kconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3d7882769b5dc929690f96e0c318c29b97f51018 Merge: 8ff0b97 51858a2 Author: Linus Torvalds Date: Thu Oct 12 17:37:23 2017 -0700 Merge tag 'devprop-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fixes from Rafael Wysocki: "These fix an issue related to device removal introduced during the 4.9 cycle and fix up new functionality added recently. Specifics: - Fix a device properties management issue, introduced during the 4.9 cycle, that causes device properties associated with a parent device to go away on a removal of its child in some cases (Jarkko Nikula). - Fix inconsistencies in error codes returned by a new function helper in the device properties framework depending on the underlying low-level firmware interface, DT or ACPI, by making the meaning of error codes returned in the ACPI case agree with the meaning of DT error codes in analogous situations (Sakari Ailus)" * tag 'devprop-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: properties: Fix __acpi_node_get_property_reference() return codes ACPI: properties: Align return codes of __acpi_node_get_property_reference() device property: Track owner device of device property commit 8ff0b97cf2c56247e246167b4ab602469354e917 Merge: 2aab9c3 93e8bef Author: Linus Torvalds Date: Thu Oct 12 14:51:13 2017 -0700 Merge tag 'xfs-4.14-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix a stale kernel memory exposure when logging inodes. - Fix some build problems with CONFIG_XFS_RT=n - Don't change inode mode if the acl write fails, leaving the file totally inaccessible. - Fix a dangling pointer problem when removing an attr fork under memory pressure. - Don't crash while trying to invalidate a null buffer associated with a corrupt metadata pointer. * tag 'xfs-4.14-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: handle error if xfs_btree_get_bufs fails xfs: reinit btree pointer on attr tree inactivation walk xfs: Fix bool initialization/comparison xfs: don't change inode mode if ACL update fails xfs: move more RT specific code under CONFIG_XFS_RT xfs: Don't log uninitialised fields in inode structures commit 2aab9c3ca47dd4fcc19a8743c6e4d348640dd3fa Author: NeilBrown Date: Thu Oct 12 14:22:04 2017 +1100 scripts: fix faddr2line to work on last symbol If faddr2line is given a function name which is the last one listed by "nm -n", it will fail because it never finds the next symbol. So teach the awk script to catch that possibility, and use 'size' to provide the end point of the last function. Signed-off-by: NeilBrown Signed-off-by: Linus Torvalds scripts/faddr2line | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 06451a3d1d777141dedfa947649cbb0c594ac3af 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 6bd6ae2dfc7e091059fd8a650579bb1efc9b4b9f Author: Rob Clark Date: Thu Aug 24 14:24:29 2017 -0400 drm/msm: fix error path cleanup If we fail to attach iommu, gpu->aspace could be IS_ERR().. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3206e7d5e25ef94b5a29e2c81e6fb8d5fb48422f Merge: cbaff87 ac3d793 Author: Linus Torvalds Date: Thu Oct 12 10:56:06 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota fix from Jan Kara: "A fix for a regression in handling of quota grace times and warnings" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Generate warnings for DQUOT_SPACE_NOFAIL allocations commit cbaff8763d67f51812aa78e6c7771ab53dbff38f Merge: 73a752c 8a60aea Author: Linus Torvalds Date: Thu Oct 12 10:42:03 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Another latent bug related to PCID, an out-of-bounds access, and a submaintainer change being finally made official" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: MAINTAINERS: Add Paul Mackerras as maintainer for KVM/powerpc KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit KVM: MMU: always terminate page walks at level 1 KVM: nVMX: update last_nonleaf_level when initializing nested EPT commit 3314c6bdd26880e0dfbcb0cb85a1b36d185ce47c Author: Niklas Söderlund Date: Tue Aug 22 02:19:12 2017 +0200 device property: preserve usecount for node passed to of_fwnode_graph_get_port_parent() Using CONFIG_OF_DYNAMIC=y uncovered an imbalance in the usecount of the node being passed to of_fwnode_graph_get_port_parent(). Preserve the usecount by using of_get_parent() instead of of_get_next_parent() which don't decrement the usecount of the node passed to it. Fixes: 3b27d00e7b6d7c88 ("device property: Move fwnode graph ops to firmware specific locations") Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Rob Herring drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22f8cc6e33731678e7687a18ffd0f578131edb4c Author: Stewart Smith Date: Tue Sep 26 18:40:00 2017 +1000 drivers: of: increase MAX_RESERVED_REGIONS to 32 There are two types of memory reservations firmware can ask the kernel to make in the device tree: static and dynamic. See Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt If you have greater than 16 entries in /reserved-memory (as we do on POWER9 systems) you would get this scary looking error message: [ 0.000000] OF: reserved mem: not enough space all defined regions. This is harmless if all your reservations are static (which with OPAL on POWER9, they are). It is not harmless if you have any dynamic reservations after the 16th. In the first pass over the fdt to find reservations, the child nodes of /reserved-memory are added to a static array in of_reserved_mem.c so that memory can be reserved in a 2nd pass. The array has 16 entries. This is why, on my dual socket POWER9 system, I get that error 4 times with 20 static reservations. We don't have a problem on ppc though, as in arch/powerpc/kernel/prom.c we look at the new style /reserved-ranges property to do reservations, and this logic was introduced in 0962e8004e974 (well before any powernv system shipped). A Google search shows up no occurances of that exact error message, so we're probably safe in that no machine that people use has memory not being reserved when it should be. The simple fix is to bump the length of the array to 32 which "should be enough for everyone(TM)". The simple fix of not recording static allocations in the array would cause problems for devices with "memory-region" properties. A more future-proof fix is likely possible, although more invasive and this simple fix is perfectly suitable in the meantime while a more future-proof fix is developed. Signed-off-by: Stewart Smith Tested-by: Mauricio Faria de Oliveira Signed-off-by: Rob Herring drivers/of/of_reserved_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db179e0d0d1003f10b798e072524be6bcdae5053 Author: Sergey Senozhatsky Date: Tue Sep 26 15:25:10 2017 +0900 of: do not leak console options Do not strdup() console options. It seems that the only reason for it to be strdup()-ed was a compilation warning: printk, UART and console drivers, for some reason, expect char pointer instead of const char pointer. So we can just pass `of_stdout_options', but need to cast it to char pointer. A better fix would be to change printk, console drivers and UART to accept const char `options'; but that will take time - there are lots of drivers to update. The patch also fixes a possible memory leak: add_preferred_console() can fail, but we don't kfree() options. Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Rob Herring drivers/of/base.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9e4621531e2af230611c28c67306a31e1a09f76a Author: Archit Taneja Date: Fri Oct 6 16:27:07 2017 +0530 drm/msm/mdp5: Remove extra pm_runtime_put call in mdp5_crtc_cursor_set() While converting mdp5_enable/disable() calls to pm_runtime_get/put() API, an extra call to pm_runtime_put_autosuspend() crept in mdp5_crtc_cursor_set(). This results in calling the suspend handler twice, and therefore clk_disables twice, which isn't a nice thing to do. Fixes: d68fe15b1878 (drm/msm/mdp5: Use runtime PM get/put API instead ...) Reported-by: Stanimir Varbanov Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 -- 1 file changed, 2 deletions(-) commit a18a0ea0096833ecb52053b183fcf9709f7bafd8 Author: Archit Taneja Date: Fri Oct 6 16:27:06 2017 +0530 drm/msm/dsi: Use correct pm_runtime_put variant during host_init The DSI runtime PM suspend/resume callbacks check whether msm_host->cfg_hnd is non-NULL before trying to enable the bus clocks. This is done to accommodate early calls to these functions that may happen before the bus clocks are even initialized. Calling pm_runtime_put_autosuspend() in dsi_host_init() can result in racy behaviour since msm_host->cfg_hnd is set very soon after. If the suspend callback happens too late, we end up trying to disable clocks that were never enabled, resulting in a bunch of WARN_ON splats. Use pm_runtime_put_sync() so that the suspend callback is called immediately. Reported-by: Nicolas Dechesne Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a752cce2d4e9f704b097e63a79c68d71f7992d Merge: 0de50ea b61907b Author: Linus Torvalds Date: Thu Oct 12 09:32:53 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - fix crashes in skcipher/shash from zero-length input. - fix softirq GFP_KERNEL allocation in shash_setkey_unaligned. - error path bug fix in xts create function. - fix compiler warning regressions in axis and stm32 * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: shash - Fix zero-length shash ahash digest crash crypto: skcipher - Fix crash on zero-length input crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned crypto: xts - Fix an error handling path in 'create()' crypto: stm32 - Try to fix hash padding crypto: axis - hide an unused variable commit 0de50ea7b5c9e232dcd1cc07c014509c324ff1b8 Merge: be7484a ef8daf8 Author: Linus Torvalds Date: Thu Oct 12 09:21:56 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching fix from Jiri Kosina: - bugfix for handling of coming modules (incorrect handling of failure) from Joe Lawrence * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: unpatch all klp_objects if klp_module_coming fails commit f66665c09ab489a11ca490d6a82df57cfc1bea3e Author: Eric Biggers Date: Mon Oct 9 12:51:27 2017 -0700 ecryptfs: fix dereference of NULL user_key_payload In eCryptfs, we failed to verify that the authentication token keys are not revoked before dereferencing their payloads, which is problematic because the payload of a revoked key is NULL. request_key() *does* skip revoked keys, but there is still a window where the key can be revoked before we acquire the key semaphore. Fix it by updating ecryptfs_get_key_payload_data() to return -EKEYREVOKED if the key payload is NULL. For completeness we check this for "encrypted" keys as well as "user" keys, although encrypted keys cannot be revoked currently. Alternatively we could use key_validate(), but since we'll also need to fix ecryptfs_get_key_payload_data() to validate the payload length, it seems appropriate to just check the payload pointer. Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig") Reviewed-by: James Morris Cc: [v2.6.19+] Cc: Michael Halcrow Signed-off-by: Eric Biggers Signed-off-by: David Howells fs/ecryptfs/ecryptfs_kernel.h | 24 +++++++++++++++++------- fs/ecryptfs/keystore.c | 9 ++++++++- 2 files changed, 25 insertions(+), 8 deletions(-) commit d60b5b7854c3d135b869f74fb93eaf63cbb1991a Author: Eric Biggers Date: Mon Oct 9 12:46:18 2017 -0700 fscrypt: fix dereference of NULL user_key_payload When an fscrypt-encrypted file is opened, we request the file's master key from the keyrings service as a logon key, then access its payload. However, a revoked key has a NULL payload, and we failed to check for this. request_key() *does* skip revoked keys, but there is still a window where the key can be revoked before we acquire its semaphore. Fix it by checking for a NULL payload, treating it like a key which was already revoked at the time it was requested. Fixes: 88bd6ccdcdd6 ("ext4 crypto: add encryption key management facilities") Reviewed-by: James Morris Cc: [v4.1+] Signed-off-by: Eric Biggers Signed-off-by: David Howells fs/crypto/keyinfo.c | 5 +++++ 1 file changed, 5 insertions(+) commit 192cabd6a296cbc57b3d8c05c4c89d87fc102506 Author: Eric Biggers Date: Mon Oct 9 12:43:20 2017 -0700 lib/digsig: fix dereference of NULL user_key_payload digsig_verify() requests a user key, then accesses its payload. However, a revoked key has a NULL payload, and we failed to check for this. request_key() *does* skip revoked keys, but there is still a window where the key can be revoked before we acquire its semaphore. Fix it by checking for a NULL payload, treating it like a key which was already revoked at the time it was requested. Fixes: 051dbb918c7f ("crypto: digital signature verification support") Reviewed-by: James Morris Cc: [v3.3+] Cc: Dmitry Kasatkin Signed-off-by: Eric Biggers Signed-off-by: David Howells lib/digsig.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d124b2c53c7bee6569d2a2d0b18b4a1afde00134 Author: Eric Biggers Date: Mon Oct 9 12:40:00 2017 -0700 FS-Cache: fix dereference of NULL user_key_payload When the file /proc/fs/fscache/objects (available with CONFIG_FSCACHE_OBJECT_LIST=y) is opened, we request a user key with description "fscache:objlist", then access its payload. However, a revoked key has a NULL payload, and we failed to check for this. request_key() *does* skip revoked keys, but there is still a window where the key can be revoked before we access its payload. Fix it by checking for a NULL payload, treating it like a key which was already revoked at the time it was requested. Fixes: 4fbf4291aa15 ("FS-Cache: Allow the current state of all objects to be dumped") Reviewed-by: James Morris Cc: [v2.6.32+] Signed-off-by: Eric Biggers Signed-off-by: David Howells fs/fscache/object-list.c | 7 +++++++ 1 file changed, 7 insertions(+) commit be7484acc6fee2878dc8d1593ba81fb1e0b3d581 Merge: 7702f47 a0933a4 Author: Linus Torvalds Date: Thu Oct 12 09:08:56 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - fix for potential out-of-bounds memory access (found by fuzzing, likely requires specially crafted device to trigger) by Jaejoong Kim - two new device IDs for elecom driver from Alex Manoussakis * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-elecom: extend to fix descriptor for HUGE trackball HID: usbhid: fix out-of-bounds bug commit 7702f47623e6c029b4ce59ce0ad39b869d5cc933 Merge: 467251c 99fee50 Author: Linus Torvalds Date: Thu Oct 12 09:01:18 2017 -0700 Merge tag 'sound-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It's been a busy week for defending the attacks from fuzzer people. This contains various USB-audio driver fixes and sequencer core fixes spotted by syzkaller and other fuzzer, as well as one quirk for a Plantronics USB audio device" * tag 'sound-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: caiaq: Fix stray URB at probe error path ALSA: seq: Fix use-after-free at creating a port ALSA: usb-audio: Kill stray URB at exiting ALSA: line6: Fix leftover URB at error-path during probe ALSA: line6: Fix NULL dereference at podhd_disconnect() ALSA: line6: Fix missing initialization before error path ALSA: seq: Fix copy_from_user() call inside lock ALSA: usb-audio: Add sample rate quirk for Plantronics P610 commit 467251c69b1b39df78638d0d0cc60cf4d1d639a8 Merge: ff5abbe 96ca579 Author: Linus Torvalds Date: Thu Oct 12 08:36:47 2017 -0700 Merge branch 'waitid-fix' Merge waitid() fix from Kees Cook. I'd have hoped that the unsafe_{get|put}_user() naming would have avoided these kinds of stupid bugs, but no such luck. * waitid-fix: waitid(): Add missing access_ok() checks commit 616dd5872e52493863b0202632703eebd51243dc Author: Len Brown Date: Wed Oct 11 17:16:04 2017 -0400 x86/apic: Update TSC_DEADLINE quirk with additional SKX stepping SKX stepping-3 fixed the TSC_DEADLINE issue in a different ucode version number than stepping-4. Linux needs to know this stepping-3 specific version number to also enable the TSC_DEADLINE on stepping-3. The steppings and ucode versions are documented in the SKX BIOS update: https://downloadmirror.intel.com/26978/eng/ReleaseNotes_R00.01.0004.txt Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Link: https://lkml.kernel.org/r/60f2bbf7cf617e212b522e663f84225bfebc50e5.1507756305.git.len.brown@intel.com arch/x86/kernel/apic/apic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit cc6afe2240298049585e86b1ade85efc8a7f225d Author: Paolo Bonzini Date: Tue Oct 10 12:12:57 2017 +0200 x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors Commit 594a30fb1242 ("x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature", 2017-08-30) was also about silencing the warning on VirtualBox; however, KVM does expose the TSC deadline timer, and it's virtualized so that it is immune from CPU errata. Therefore, booting 4.13 with "-cpu Haswell" shows this in the logs: [ 0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0xb2 (or later) Even if you had a hypervisor that does _not_ virtualize the TSC deadline and rather exposes the hardware one, it should be the hypervisors task to update microcode and possibly hide the flag from CPUID. So just hide the message when running on _any_ hypervisor, not just those that do not support the TSC deadline timer. The older check still makes sense, so keep it. Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata") Signed-off-by: Paolo Bonzini Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Hans de Goede Cc: kvm@vger.kernel.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1507630377-54471-1-git-send-email-pbonzini@redhat.com arch/x86/kernel/apic/apic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c9811d0fa55929b182f62e0ee49b71b0bea6a936 Author: Wei Yongjun Date: Wed Oct 11 11:36:56 2017 +0000 drm/msm: fix return value check in _msm_gem_kernel_new() In case of error, the function msm_gem_get_vaddr() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 8223286d62e2 ("drm/msm: Add a helper function for in-kernel buffer allocations") Signed-off-by: Wei Yongjun Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f44001e2637138d9d506efe8da67011f8170e860 Author: Rob Clark Date: Mon Oct 2 10:28:37 2017 -0400 drm/msm: use proper memory barriers for updating tail/head Fixes intermittent corruption of cmdstream dump. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_rd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit aa3c2ba1c3a7c25d0440a8ac3ddd266c0f43b7b7 Author: Rob Clark Date: Thu Oct 12 08:37:45 2017 -0400 drm/msm/mdp5: add missing max size for 8x74 v1 This should have same max width as v2. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 ++ 1 file changed, 2 insertions(+) commit 13923d0865ca96312197962522e88bc0aedccd74 Author: Eric Biggers Date: Mon Oct 9 12:37:49 2017 -0700 KEYS: encrypted: fix dereference of NULL user_key_payload A key of type "encrypted" references a "master key" which is used to encrypt and decrypt the encrypted key's payload. However, when we accessed the master key's payload, we failed to handle the case where the master key has been revoked, which sets the payload pointer to NULL. Note that request_key() *does* skip revoked keys, but there is still a window where the key can be revoked before we acquire its semaphore. Fix it by checking for a NULL payload, treating it like a key which was already revoked at the time it was requested. This was an issue for master keys of type "user" only. Master keys can also be of type "trusted", but those cannot be revoked. Fixes: 7e70cb497850 ("keys: add new key-type encrypted") Reviewed-by: James Morris Cc: [v2.6.38+] Cc: Mimi Zohar Cc: David Safford Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/encrypted-keys/encrypted.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4635742d1cef5ee5f217f89310a8782ebb4e25dd Author: Jason A. Donenfeld Date: Sun Oct 8 22:50:53 2017 +0200 crypto: x86/chacha20 - satisfy stack validation 2.0 The new stack validator in objdump doesn't like directly assigning r11 to rsp, warning with something like: warning: objtool: chacha20_4block_xor_ssse3()+0xa: unsupported stack pointer realignment warning: objtool: chacha20_8block_xor_avx2()+0x6: unsupported stack pointer realignment This fixes things up to use code similar to gcc's DRAP register, so that objdump remains happy. Signed-off-by: Jason A. Donenfeld Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0") Signed-off-by: Herbert Xu arch/x86/crypto/chacha20-avx2-x86_64.S | 4 ++-- arch/x86/crypto/chacha20-ssse3-x86_64.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 27b94b4f1386c3a8181f5a0277434a32e24e7dd7 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 2bbbd96357ce76cc45ec722c00f654aa7b189112 Author: Jan Luebbe Date: Mon Aug 28 17:25:16 2017 +0200 bus: mbus: fix window size calculation for 4GB windows At least the Armada XP SoC supports 4GB on a single DRAM window. Because the size register values contain the actual size - 1, the MSB is set in that case. For example, the SDRAM window's control register's value is 0xffffffe1 for 4GB (bits 31 to 24 contain the size). The MBUS driver reads back each window's size from registers and calculates the actual size as (control_reg | ~DDR_SIZE_MASK) + 1, which overflows for 32 bit values, resulting in other miscalculations further on (a bad RAM window for the CESA crypto engine calculated by mvebu_mbus_setup_cpu_target_nooverlap() in my case). This patch changes the type in 'struct mbus_dram_window' from u32 to u64, which allows us to keep using the same register calculation code in most MBUS-using drivers (which calculate ->size - 1 again). Fixes: fddddb52a6c4 ("bus: introduce an Marvell EBU MBus driver") CC: stable@vger.kernel.org Signed-off-by: Jan Luebbe Signed-off-by: Gregory CLEMENT drivers/bus/mvebu-mbus.c | 2 +- include/linux/mbus.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit cd4f2b30e5ef7d4bde61eb515372d96e8aec1690 Author: Anju T Sudhakar Date: Wed Oct 11 18:27:39 2017 +0530 powerpc/perf: Add ___GFP_NOWARN flag to alloc_pages_node() Stack trace output during a stress test: [ 4.310049] Freeing initrd memory: 22592K [ 4.310646] rtas_flash: no firmware flash support [ 4.313341] cpuhp/64: page allocation failure: order:0, mode:0x14480c0(GFP_KERNEL|__GFP_ZERO|__GFP_THISNODE), nodemask=(null) [ 4.313465] cpuhp/64 cpuset=/ mems_allowed=0 [ 4.313521] CPU: 64 PID: 392 Comm: cpuhp/64 Not tainted 4.11.0-39.el7a.ppc64le #1 [ 4.313588] Call Trace: [ 4.313622] [c000000f1fb1b8e0] [c000000000c09388] dump_stack+0xb0/0xf0 (unreliable) [ 4.313694] [c000000f1fb1b920] [c00000000030ef6c] warn_alloc+0x12c/0x1c0 [ 4.313753] [c000000f1fb1b9c0] [c00000000030ff68] __alloc_pages_nodemask+0xea8/0x1000 [ 4.313823] [c000000f1fb1bbb0] [c000000000113a8c] core_imc_mem_init+0xbc/0x1c0 [ 4.313892] [c000000f1fb1bc00] [c000000000113cdc] ppc_core_imc_cpu_online+0x14c/0x170 [ 4.313962] [c000000f1fb1bc90] [c000000000125758] cpuhp_invoke_callback+0x198/0x5d0 [ 4.314031] [c000000f1fb1bd00] [c00000000012782c] cpuhp_thread_fun+0x8c/0x3d0 [ 4.314101] [c000000f1fb1bd60] [c0000000001678d0] smpboot_thread_fn+0x290/0x2a0 [ 4.314169] [c000000f1fb1bdc0] [c00000000015ee78] kthread+0x168/0x1b0 [ 4.314229] [c000000f1fb1be30] [c00000000000b368] ret_from_kernel_thread+0x5c/0x74 [ 4.314313] Mem-Info: [ 4.314356] active_anon:0 inactive_anon:0 isolated_anon:0 core_imc_mem_init() at system boot use alloc_pages_node() to get memory and alloc_pages_node() throws this stack dump when tried to allocate memory from a node which has no memory behind it. Add a ___GFP_NOWARN flag in allocation request as a fix. Signed-off-by: Anju T Sudhakar Reported-by: Michael Ellerman Reported-by: Venkat R.B Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d923820c6db1644c27c2d0a5af8920fc0f8cd81 Author: Anju T Sudhakar Date: Wed Oct 4 12:20:52 2017 +0530 powerpc/perf: Fix for core/nest imc call trace on cpuhotplug Nest/core pmu units are enabled only when it is used. A reference count is maintained for the events which uses the nest/core pmu units. Currently in *_imc_counters_release function a WARN() is used for notification of any underflow of ref count. The case where event ref count hit a negative value is, when perf session is started, followed by offlining of all cpus in a given core. i.e. in cpuhotplug offline path ppc_core_imc_cpu_offline() function set the ref->count to zero, if the current cpu which is about to offline is the last cpu in a given core and make an OPAL call to disable the engine in that core. And on perf session termination, perf->destroy (core_imc_counters_release) will first decrement the ref->count for this core and based on the ref->count value an opal call is made to disable the core-imc engine. Now, since cpuhotplug path already clears the ref->count for core and disabled the engine, perf->destroy() decrementing again at event termination make it negative which in turn fires the WARN_ON. The same happens for nest units. Add a check to see if the reference count is alreday zero, before decrementing the count, so that the ref count will not hit a negative value. Signed-off-by: Anju T Sudhakar Reviewed-by: Santosh Sivaraj Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8a60aea62100c79fb5d151a1e261f11534c3dbff Author: Thomas Huth Date: Mon Oct 9 16:34:01 2017 +0200 MAINTAINERS: Add Paul Mackerras as maintainer for KVM/powerpc Paul is handling almost all of the powerpc related KVM patches nowadays, so he should be mentioned in the MAINTAINERS file accordingly. Signed-off-by: Thomas Huth Signed-off-by: Paolo Bonzini MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8eb3f87d903168bdbd1222776a6b1e281f50513e Author: Haozhong Zhang Date: Tue Oct 10 15:01:22 2017 +0800 KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit When KVM emulates an exit from L2 to L1, it loads L1 CR4 into the guest CR4. Before this CR4 loading, the guest CR4 refers to L2 CR4. Because these two CR4's are in different levels of guest, we should vmx_set_cr4() rather than kvm_set_cr4() here. The latter, which is used to handle guest writes to its CR4, checks the guest change to CR4 and may fail if the change is invalid. The failure may cause trouble. Consider we start a L1 guest with non-zero L1 PCID in use, (i.e. L1 CR4.PCIDE == 1 && L1 CR3.PCID != 0) and a L2 guest with L2 PCID disabled, (i.e. L2 CR4.PCIDE == 0) and following events may happen: 1. If kvm_set_cr4() is used in load_vmcs12_host_state() to load L1 CR4 into guest CR4 (in VMCS01) for L2 to L1 exit, it will fail because of PCID check. As a result, the guest CR4 recorded in L0 KVM (i.e. vcpu->arch.cr4) is left to the value of L2 CR4. 2. Later, if L1 attempts to change its CR4, e.g., clearing VMXE bit, kvm_set_cr4() in L0 KVM will think L1 also wants to enable PCID, because the wrong L2 CR4 is used by L0 KVM as L1 CR4. As L1 CR3.PCID != 0, L0 KVM will inject GP to L1 guest. Fixes: 4704d0befb072 ("KVM: nVMX: Exiting from L2 to L1") Cc: qemu-stable@nongnu.org Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee3eaee6a1dafb7ed7213ec2fad22552b4d58ed1 Author: Nicolas Pitre Date: Fri Oct 6 19:39:57 2017 +0100 ARM: 8704/1: semihosting: use proper instruction on v7m processors The svc instruction doesn't exist on v7m processors. Semihosting ops are invoked with the bkpt instruction instead. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/boot/compressed/debug.S | 4 ++++ arch/arm/kernel/debug.S | 8 ++++++++ 2 files changed, 12 insertions(+) commit 6042b8c7c08cad7a8bdc0456c619ae941962b40a Author: Luc Van Oostenryck II Date: Mon Oct 2 20:33:35 2017 +0100 ARM: 8701/1: fix sparse flags for build on 64bit machines By default sparse uses the characteristics of the build machine to infer things like the wordsize. This is fine when doing native builds but for ARM it's, I suspect, very rarely the case and if the build are done on a 64bit machine we get a bunch of warnings like: 'cast truncates bits from constant value (... becomes ...)' Fix this by adding the -m32 flags for sparse. Reported-by: Stephen Boyd Signed-off-by: Luc Van Oostenryck Signed-off-by: Russell King arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 195320fd6e9946a0aedeb2fd0e1ac47aa5dc81c4 Author: Nicolas Pitre Date: Sun Oct 1 02:06:27 2017 +0100 ARM: 8700/1: nommu: always reserve address 0 away Some nommu systems have RAM at address 0. When vectors are not located there, the very beginning of memory remains available for dynamic allocations. The memblock allocator explicitly skips the first page but the standard page allocator does not, and while it correctly returns a non-null struct page pointer for that page, page_address() gives 0 which gets confused with NULL (out of memory) by callers despite having plenty of free memory left. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/mm/nommu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2d30408ecfd450c8377186615b330d329ded18ea Merge: 47a4b71 7c80f9e Author: Greg Kroah-Hartman Date: Thu Oct 12 11:17:34 2017 +0200 Merge tag 'fixes-for-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v4.14-rc5 A deadlock fix in dummy-hcd; Fixing a use-after-free bug in composite; Renesas got another fix for DMA programming (this time around a fix for receiving ZLP); Tegra PHY got a suspend fix; A memory leak on our configfs ABI got plugged. Other than these, a couple other minor fixes on usbtest. commit c0368e4db4a3e8a3dce40f3f621c06e14c560d79 Author: Florian Fainelli Date: Wed Oct 11 14:59:22 2017 -0700 spi: bcm-qspi: Fix use after free in bcm_qspi_probe() in error path There was an inversion in how the error path in bcm_qspi_probe() is done which would make us trip over a KASAN use-after-free report. Turns out that qspi->dev_ids does not get allocated until later in the probe process. Fix this by introducing a new lable: qspi_resource_err which takes care of cleaning up the SPI master instance. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Florian Fainelli Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-bcm-qspi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9d25e3cc83d731ae4eeb017fd07562fde3f80bef Author: Marek Szyprowski Date: Mon Oct 9 13:40:23 2017 +0200 iommu/exynos: Remove initconst attribute to avoid potential kernel oops Exynos SYSMMU registers standard platform device with sysmmu_of_match table, what means that this table is accessed every time a new platform device is registered in a system. This might happen also after the boot, so the table must not be attributed as initconst to avoid potential kernel oops caused by access to freed memory. Fixes: 6b21a5db3642 ("iommu/exynos: Support for device tree") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e9c0075409d4ec1bc63558ee5a93916a6d7d16f Author: Samuel Mendoza-Jonas Date: Wed Oct 11 16:54:27 2017 +1100 net/ncsi: Don't limit vids based on hot_channel Currently we drop any new VLAN ids if there are more than the current (or last used) channel can support. Most importantly this is a problem if no channel has been selected yet, resulting in a segfault. Secondly this does not necessarily reflect the capabilities of any other channels. Instead only drop a new VLAN id if we are already tracking the maximum allowed by the NCSI specification. Per-channel limits are already handled by ncsi_add_filter(), but add a message to set_one_vid() to make it obvious that the channel can not support any more VLAN ids. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/internal.h | 1 + net/ncsi/ncsi-manage.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) commit 545036a9944e9d6e50fed4ca03117147c880ff71 Merge: 8a5776a f797488 Author: Dave Airlie Date: Thu Oct 12 10:38:09 2017 +1000 Merge tag 'drm-misc-fixes-2017-10-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Core Changes: - sync_file: Fix race in SYNC_IOC_FILE_INFO (John) - atomic_helper: Give up reference taken in suspend helper (Jeffy) Cc: John Einar Reitan Cc: Jeffy Chen * tag 'drm-misc-fixes-2017-10-11' of git://anongit.freedesktop.org/drm/drm-misc: sync_file: Return consistent status in SYNC_IOC_FILE_INFO drm/atomic: Unref duplicated drm_atomic_state in drm_atomic_helper_resume() commit fdbed19697e1aa0f7cb719c11c67f2da26ea7f47 Author: Vineet Gupta Date: Wed Oct 11 17:07:41 2017 -0700 ARC: unbork module link errors with !CONFIG_ARC_HAS_LLSC | SYSMAP System.map | Building modules, stage 2. | MODPOST 18 modules |ERROR: "smp_atomic_ops_lock" [drivers/gpu/drm/drm_kms_helper.ko] undefined! |ERROR: "smp_bitops_lock" [drivers/gpu/drm/drm_kms_helper.ko] undefined! |ERROR: "smp_atomic_ops_lock" [drivers/gpu/drm/drm.ko] undefined! | ERROR: "smp_bitops_lock" [drivers/gpu/drm/drm.ko] undefined! |../scripts/Makefile.modpost:91: recipe for target '__modpost' failed Signed-off-by: Vineet Gupta arch/arc/kernel/smp.c | 5 +++++ 1 file changed, 5 insertions(+) commit bde135a672bfd1cc41d91c2bbbbd36eb25409b74 Author: Daniel Drake Date: Wed Oct 11 12:56:52 2017 +0800 r8169: only enable PCI wakeups when WOL is active rtl_init_one() currently enables PCI wakeups if the ethernet device is found to be WOL-capable. There is no need to do this when rtl8169_set_wol() will correctly enable or disable the same wakeup flag when WOL is activated/deactivated. This works around an ACPI DSDT bug which prevents the Acer laptop models Aspire ES1-533, Aspire ES1-732, PackardBell ENTE69AP and Gateway NE533 from entering S3 suspend - even when no ethernet cable is connected. On these platforms, the DSDT says that GPE08 is a wakeup source for ethernet, but this GPE fires as soon as the system goes into suspend, waking the system up immediately. Having the wakeup normally disabled avoids this issue in the default case. With this change, WOL will continue to be unusable on these platforms (it will instantly wake up if WOL is later enabled by the user) but we do not expect this to be a commonly used feature on these consumer laptops. We have separately determined that WOL works fine without any ACPI GPEs enabled during sleep, so a DSDT fix or override would be possible to make WOL work. Signed-off-by: Daniel Drake Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) commit 5aba2ba5030b66a6f8c93049b718556f9aacd7c6 Author: Sabrina Dubroca Date: Tue Oct 10 17:07:12 2017 +0200 macsec: fix memory leaks when skb_to_sgvec fails Fixes: cda7ea690350 ("macsec: check return value of skb_to_sgvec always") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 2 ++ 1 file changed, 2 insertions(+) commit 51858a2777f025333c5ac3b3484263bba56461b3 Author: Sakari Ailus Date: Wed Oct 11 11:06:13 2017 +0300 ACPI: properties: Fix __acpi_node_get_property_reference() return codes Fix more return codes for device property: Align return codes of __acpi_node_get_property_reference(). In particular, what was missed previously: -EPROTO could be returned in certain cases, now -EINVAL; -EINVAL was returned if the property was not found, now -ENOENT; -EINVAL was returned also if the index was higher than the number of entries in a package, now -ENOENT. Reported-by: Hyungwoo Yang Fixes: 3e3119d3088f (device property: Introduce fwnode_property_get_reference_args) Signed-off-by: Sakari Ailus Tested-by: Hyungwoo Yang Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c343bc2ce2c627b6cef2b09794a4a5b63419a798 Author: Sakari Ailus Date: Tue Sep 26 12:08:27 2017 +0300 ACPI: properties: Align return codes of __acpi_node_get_property_reference() acpi_fwnode_get_reference_args(), the function implementing ACPI support for fwnode_property_get_reference_args(), returns directly error codes from __acpi_node_get_property_reference(). The latter uses different error codes than the OF implementation. In particular, the OF implementation uses -ENOENT to indicate that the property is not found, a reference entry is empty and there are no more references. Document and align the error codes for property for fwnode_property_get_reference_args() so that they match with of_parse_phandle_with_args(). Fixes: 3e3119d3088f (device property: Introduce fwnode_property_get_reference_args) Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 19 +++++++++---------- drivers/base/property.c | 4 ++++ 2 files changed, 13 insertions(+), 10 deletions(-) commit ff5abbe799e29099695cb8b5b2f198dd8b8bdf26 Merge: 9add7e3 b775d15 Author: Linus Torvalds Date: Wed Oct 11 12:01:38 2017 -0700 Merge tag 'rpmsg-v4.14-fixes' of git://github.com/andersson/remoteproc Pull rpmsg fixes from Bjorn Andersson: "This corrects two mistakes in the Qualcomm GLINK SMEM driver" * tag 'rpmsg-v4.14-fixes' of git://github.com/andersson/remoteproc: rpmsg: glink: Fix memory leak in qcom_glink_alloc_intent() rpmsg: glink: Unlock on error in qcom_glink_request_intent() commit 9add7e3e368cbb28aa773a1817c41861ce96c078 Merge: 56ae414 68a39a3 Author: Linus Torvalds Date: Wed Oct 11 11:58:23 2017 -0700 Merge tag 'rproc-v4.14-fixes' of git://github.com/andersson/remoteproc Pull remoteproc fixes from Bjorn Andersson: "This fixes a couple of issues in the imx_rproc driver and corrects the Kconfig dependencies of the Qualcomm remoteproc drivers" * tag 'rproc-v4.14-fixes' of git://github.com/andersson/remoteproc: remoteproc: imx_rproc: fix return value check in imx_rproc_addr_init() remoteproc: qcom: fix RPMSG_QCOM_GLINK_SMEM dependencies remoteproc: imx_rproc: fix a couple off by one bugs commit 8d30371fd7c328e192d7ea3108bd71b903631d6a Author: Johannes Thumshirn Date: Tue Oct 10 17:31:38 2017 +0200 scsi: fc: check for rport presence in fc_block_scsi_eh Coverity-scan recently found a possible NULL pointer dereference in fc_block_scsi_eh() as starget_to_rport() either returns the rport for the startget or NULL. While it is rather unlikely to have fc_block_scsi_eh() called without an rport associated it's a good idea to catch potential misuses of the API gracefully. Signed-off-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 3 +++ 1 file changed, 3 insertions(+) commit a9e170e28636fd577249f39029d59e4e960a42b8 Author: Quinn Tran Date: Tue Oct 10 12:08:22 2017 -0700 scsi: qla2xxx: Fix uninitialized work element Fixes following stack trace kernel: Call Trace: kernel: dump_stack+0x63/0x84 kernel: __warn+0xd1/0xf0 kernel: warn_slowpath_null+0x1d/0x20 kernel: __queue_work+0x37a/0x420 kernel: queue_work_on+0x27/0x40 kernel: queue_work+0x14/0x20 [qla2xxx] kernel: schedule_work+0x13/0x20 [qla2xxx] kernel: qla2x00_post_work+0xab/0xb0 [qla2xxx] kernel: qla2x00_post_aen_work+0x3b/0x50 [qla2xxx] kernel: qla2x00_async_event+0x20d/0x15d0 [qla2xxx] kernel: ? lock_timer_base+0x7d/0xa0 kernel: qla24xx_intr_handler+0x1da/0x310 [qla2xxx] kernel: qla2x00_poll+0x36/0x60 [qla2xxx] kernel: qla2x00_mailbox_command+0x659/0xec0 [qla2xxx] kernel: ? proc_create_data+0x7a/0xd0 kernel: qla25xx_init_rsp_que+0x15b/0x240 [qla2xxx] kernel: ? request_irq+0x14/0x20 [qla2xxx] kernel: qla25xx_create_rsp_que+0x256/0x3c0 [qla2xxx] kernel: qla2xxx_create_qpair+0x2af/0x5b0 [qla2xxx] kernel: qla2x00_probe_one+0x1107/0x1c30 [qla2xxx] Fixes: ec7193e26055 ("qla2xxx: Fix delayed response to command for loop mode/direct connect.") Cc: # 4.13 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68a39a3e9fe1d6f0dfe59e3f4d6bc6765e01c903 Author: Wei Yongjun Date: Wed Oct 11 10:48:44 2017 +0000 remoteproc: imx_rproc: fix return value check in imx_rproc_addr_init() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reviewed-by: Oleksij Rempel Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ea850f64c2722278f150dc11de2141baeb24211c 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 (cherry picked from commit 348e4058ebf53904e817eec7a1b25327143c2ed2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eef9ffdf9cd39b2986367bc8395e2772bc1284ba Author: Johannes Thumshirn Date: Mon Oct 9 13:33:19 2017 +0200 scsi: libiscsi: fix shifting of DID_REQUEUE host byte The SCSI host byte should be shifted left by 16 in order to have scsi_decide_disposition() do the right thing (.i.e. requeue the command). Signed-off-by: Johannes Thumshirn Fixes: 661134ad3765 ("[SCSI] libiscsi, bnx2i: make bound ep check common") Cc: Lee Duncan Cc: Hannes Reinecke Cc: Bart Van Assche Cc: Chris Leech Acked-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93e8befc17f6d6ea92b0aee3741ceac8bca4590f Author: Eric Sandeen Date: Mon Oct 9 21:08:06 2017 -0700 xfs: handle error if xfs_btree_get_bufs fails Jason reported that a corrupted filesystem failed to replay the log with a metadata block out of bounds warning: XFS (dm-2): _xfs_buf_find: Block out of range: block 0x80270fff8, EOFS 0x9c40000 _xfs_buf_find() and xfs_btree_get_bufs() return NULL if that happens, and then when xfs_alloc_fix_freelist() calls xfs_trans_binval() on that NULL bp, we oops with: BUG: unable to handle kernel NULL pointer dereference at 00000000000000f8 We don't handle _xfs_buf_find errors very well, every caller higher up the stack gets to guess at why it failed. But we should at least handle it somehow, so return EFSCORRUPTED here. Reported-by: Jason L Tibbitts III Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f35c5e10c6ed6ba52a8dd8573924a80b6a02f03f Author: Brian Foster Date: Mon Oct 9 11:38:56 2017 -0700 xfs: reinit btree pointer on attr tree inactivation walk xfs_attr3_root_inactive() walks the attr fork tree to invalidate the associated blocks. xfs_attr3_node_inactive() recursively descends from internal blocks to leaf blocks, caching block address values along the way to revisit parent blocks, locate the next entry and descend down that branch of the tree. The code that attempts to reread the parent block is unsafe because it assumes that the local xfs_da_node_entry pointer remains valid after an xfs_trans_brelse() and re-read of the parent buffer. Under heavy memory pressure, it is possible that the buffer has been reclaimed and reallocated by the time the parent block is reread. This means that 'btree' can point to an invalid memory address, lead to a random/garbage value for child_fsb and cause the subsequent read of the attr fork to go off the rails and return a NULL buffer for an attr fork offset that is most likely not allocated. Note that this problem can be manufactured by setting XFS_ATTR_BTREE_REF to 0 to prevent LRU caching of attr buffers, creating a file with a multi-level attr fork and removing it to trigger inactivation. To address this problem, reinit the node/btree pointers to the parent buffer after it has been re-read. This ensures btree points to a valid record and allows the walk to proceed. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_attr_inactive.c | 2 ++ 1 file changed, 2 insertions(+) commit 749f24f33e87c1706d716c283027595b72a034f3 Author: Thomas Meyer Date: Mon Oct 9 11:38:54 2017 -0700 xfs: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 4 ++-- fs/xfs/libxfs/xfs_ialloc.c | 4 ++-- fs/xfs/xfs_file.c | 4 ++-- fs/xfs/xfs_log.c | 2 +- fs/xfs/xfs_mount.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit 67f2ffe31d1a683170c2ba0ecc643e42a5fdd397 Author: Dave Chinner Date: Mon Oct 9 11:37:23 2017 -0700 xfs: don't change inode mode if ACL update fails If we get ENOSPC half way through setting the ACL, the inode mode can still be changed even though the ACL does not exist. Reorder the operation to only change the mode of the inode if the ACL is set correctly. Whilst this does not fix the problem with crash consistency (that requires attribute addition to be a deferred op) it does prevent ENOSPC and other non-fatal errors setting an xattr to be handled sanely. This fixes xfstests generic/449. Signed-Off-By: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_acl.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit bb9c2e5433250f5b477035dc478314f8e6dd5e36 Author: Dave Chinner Date: Mon Oct 9 11:37:22 2017 -0700 xfs: move more RT specific code under CONFIG_XFS_RT Various utility functions and interfaces that iterate internal devices try to reference the realtime device even when RT support is not compiled into the kernel. Make sure this code is excluded from the CONFIG_XFS_RT=n build, and where appropriate stub functions to return fatal errors if they ever get called when RT support is not present. Signed-Off-By: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 2 ++ fs/xfs/xfs_bmap_util.h | 13 +++++++++++++ fs/xfs/xfs_fsmap.c | 12 ++++++++++++ 3 files changed, 27 insertions(+) commit 20413e37d71befd02b5846acdaf5e2564dd1c38e Author: Dave Chinner Date: Mon Oct 9 11:37:22 2017 -0700 xfs: Don't log uninitialised fields in inode structures Prevent kmemcheck from throwing warnings about reading uninitialised memory when formatting inodes into the incore log buffer. There are several issues here - we don't always log all the fields in the inode log format item, and we never log the inode the di_next_unlinked field. In the case of the inode log format item, this is exacerbated by the old xfs_inode_log_format structure padding issue. Hence make the padded, 64 bit aligned version of the structure the one we always use for formatting the log and get rid of the 64 bit variant. This means we'll always log the 64-bit version and so recovery only needs to convert from the unpadded 32 bit version from older 32 bit kernels. Signed-Off-By: Dave Chinner Tested-by: Tetsuo Handa Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_log_format.h | 27 +++++---------- fs/xfs/xfs_inode_item.c | 79 ++++++++++++++++++++++-------------------- fs/xfs/xfs_ondisk.h | 2 +- 3 files changed, 50 insertions(+), 58 deletions(-) commit 753affba96d3608e058cefc4534007661efd8c96 Author: Eugeniy Paltsev Date: Wed Oct 11 20:01:42 2017 +0300 ARC: [plat-hsdk] Increase SDIO CIU frequency to 50000000Hz With current SDIO CIU clock frequency (12500000Hz) DW MMC controller fails to initialize some SD cards (which don't support slow mode). So increase SDIO CIU frequency from 12500000Hz to 50000000Hz by switching from the default divisor value (div-by-8) to the minimum possible value of the divisor (div-by-2) in HSDK platform code. Reported-by: Vineet Gupta Tested-by: Vineet Gupta Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 11 ++++++----- arch/arc/plat-hsdk/platform.c | 10 ++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) commit ead666000a5fe34bdc82d61838e4df2d416ea15e Author: Mauro Carvalho Chehab Date: Tue Sep 12 05:58:26 2017 -0400 media: dvb_frontend: only use kref after initialized As reported by Laurent, when a DVB frontend need to register two drivers (e. g. a tuner and a demod), if the second driver fails to register (for example because it was not compiled), the error handling logic frees the frontend by calling dvb_frontend_detach(). That used to work fine, but changeset 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") added a kref at struct dvb_frontend. So, now, instead of just freeing the data, the error handling do a kref_put(). That works fine only after dvb_register_frontend() succeeds. While it would be possible to add a helper function that would be initializing earlier the kref, that would require changing every single DVB frontend on non-trivial ways, and would make frontends different than other drivers. So, instead of doing that, let's focus on the real issue: only call kref_put() after kref_init(). That's easy to check, as, when the dvb frontend is successfuly registered, it will allocate its own private struct. So, if such struct is allocated, it means that it is safe to use kref_put(). If not, then nobody is using yet the frontend, and it is safe to just deallocate it. Fixes: 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") Reported-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 56ae414e9d2718bcbfda9ba3797c39005e2f90fb Author: Alexander Levin Date: Mon Apr 10 18:46:51 2017 +0000 9p: set page uptodate when required in write_end() Commit 77469c3f570 prevented setting the page as uptodate when we wrote the right amount of data, fix that. Fixes: 77469c3f570 ("9p: saner ->write_end() on failing copy into non-uptodate page") Reviewed-by: Jan Kara Signed-off-by: Alexander Levin Signed-off-by: Linus Torvalds fs/9p/vfs_addr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a0db28909ecfcb9e581f567f688929ed38ef3f56 Merge: cc74613 80ac93c Author: Linus Torvalds Date: Wed Oct 11 09:16:38 2017 -0700 Merge tag 'gpio-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here are some smallish GPIO fixes for v4.14. Like with pin control: some build/Kconfig noise and one serious bug in a specific driver. - Three Kconfig/build warning fixes - A fix for lost edge IRQs in the OMAP driver" * tag 'gpio-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: omap: Fix lost edge interrupts gpio: omap: omap_gpio_show_rev is not __init gpio: acpi: work around false-positive -Wstring-overflow warning gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on commit cc74613b13c95c842b47251c7b8788781a967503 Merge: ce38618 845e405 Author: Linus Torvalds Date: Wed Oct 11 09:09:22 2017 -0700 Merge tag 'pinctrl-v4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two small things and a slightly larger thing in the Intel Cherryview. - Fix two build problems - Fix a regression on the Intel Cherryview interrupt path" * tag 'pinctrl-v4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: cherryview: fix issues caused by dynamic gpio irqs mapping pinctrl/amd: Fix build dependency on pinmux code pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank commit ce3861819a5bcb0762c0b627e43ced1683227807 Merge: a957fd4 1cfd0dd Author: Linus Torvalds Date: Wed Oct 11 09:00:22 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Fairly old DIO bug caught by Andreas (3.10+) and several slightly younger blk_rq_map_user_iov() bugs, both on map and copy codepaths (Vitaly and me)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bio_copy_user_iov(): don't ignore ->iov_offset more bio_map_user_iov() leak fixes fix unbalanced page refcounting in bio_map_user_iov direct-io: Prevent NULL pointer access in submit_page_section commit 67bb8e999e0aeac285d22f0e53c856b9df5282c6 Author: Tom Lendacky Date: Tue Oct 10 14:45:04 2017 -0500 x86/mm: Disable various instrumentations of mm/mem_encrypt.c and mm/tlb.c Some routines in mem_encrypt.c are called very early in the boot process, e.g. sme_enable(). When CONFIG_KCOV=y is defined the resulting code added to sme_enable() (and others) for KCOV instrumentation results in a kernel crash. Disable the KCOV instrumentation for mem_encrypt.c by adding KCOV_INSTRUMENT_mem_encrypt.o := n to arch/x86/mm/Makefile. In order to avoid other possible early boot issues, model mem_encrypt.c after head64.c in regards to tools. In addition to disabling KCOV as stated above and a previous patch that disables branch profiling, also remove the "-pg" CFLAG if CONFIG_FUNCTION_TRACER is enabled and set KASAN_SANITIZE to "n", each of which are done on a file basis. Reported-by: kernel test robot 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/20171010194504.18887.38053.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 99fee508245825765ff60155fed43f970ff83a8f Author: Takashi Iwai Date: Wed Oct 11 16:39:02 2017 +0200 ALSA: caiaq: Fix stray URB at probe error path caiaq driver doesn't kill the URB properly at its error path during the probe, which may lead to a use-after-free error later. This patch addresses it. Reported-by: Johan Hovold Reviewed-by: Johan Hovold Cc: Signed-off-by: Takashi Iwai sound/usb/caiaq/device.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a0933a456ff83a3b5ffa3a1903e0b8de4a56adf5 Author: Alex Manoussakis Date: Thu Oct 5 13:41:20 2017 -0400 HID: hid-elecom: extend to fix descriptor for HUGE trackball In addition to DEFT, Elecom introduced a larger trackball called HUGE, in both wired (M-HT1URBK) and wireless (M-HT1DRBK) versions. It has the same buttons and behavior as the DEFT. This patch adds the two relevant USB IDs to enable operation of the three Fn buttons on the top of the device. Cc: Diego Elio Petteno Signed-off-by: Alex Manoussakis Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-elecom.c | 13 +++++++++---- drivers/hid/hid-ids.h | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) commit f043bfc98c193c284e2cd768fefabe18ac2fed9b Author: Jaejoong Kim Date: Thu Sep 28 19:16:30 2017 +0900 HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incorrect value, this can also cause out-of-bounds while approaching hdesc->desc[n]. So check the size of hid descriptor and bNumDescriptors. BUG: KASAN: slab-out-of-bounds in usbhid_parse+0x9b1/0xa20 Read of size 1 at addr ffff88006c5f8edf by task kworker/1:2/1261 CPU: 1 PID: 1261 Comm: kworker/1:2 Not tainted 4.14.0-rc1-42251-gebb2c2437d80 #169 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+0x22f/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x19/0x20 mm/kasan/report.c:427 usbhid_parse+0x9b1/0xa20 drivers/hid/usbhid/hid-core.c:1004 hid_add_device+0x16b/0xb30 drivers/hid/hid-core.c:2944 usbhid_probe+0xc28/0x1100 drivers/hid/usbhid/hid-core.c:1369 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 Cc: stable@vger.kernel.org Reported-by: Andrey Konovalov Signed-off-by: Jaejoong Kim Tested-by: Andrey Konovalov Acked-by: Alan Stern Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ef8daf8eeb5b8ab6bc356656163d19f20fb827ed Author: Joe Lawrence Date: Mon Oct 2 11:56:48 2017 -0400 livepatch: unpatch all klp_objects if klp_module_coming fails When an incoming module is considered for livepatching by klp_module_coming(), it iterates over multiple patches and multiple kernel objects in this order: list_for_each_entry(patch, &klp_patches, list) { klp_for_each_object(patch, obj) { which means that if one of the kernel objects fails to patch, klp_module_coming()'s error path needs to unpatch and cleanup any kernel objects that were already patched by a previous patch. Reported-by: Miroslav Benes Suggested-by: Petr Mladek Signed-off-by: Joe Lawrence Acked-by: Josh Poimboeuf Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 60 ++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 23 deletions(-) commit 7c80f9e4a588f1925b07134bb2e3689335f6c6d8 Author: Alan Stern Date: Fri Sep 29 10:54:24 2017 -0400 usb: usbtest: fix NULL pointer dereference If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpointAddress). The problem can be solved by adding a missing test. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Felipe Balbi drivers/usb/misc/usbtest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ff74745e6d3d97a865eda8c1f3fd29c13b79f0cc Author: Andrew Gabbasov Date: Sat Sep 30 08:54:52 2017 -0700 usb: gadget: configfs: Fix memory leak of interface directory data Kmemleak checking configuration reports a memory leak in usb_os_desc_prepare_interf_dir function when rndis function instance is freed and then allocated again. For example, this happens with FunctionFS driver with RNDIS function enabled when "ffs-test" test application is run several times in a row. The data for intermediate "os_desc" group for interface directories is allocated as a single VLA chunk and (after a change of default groups handling) is not ever freed and actually not stored anywhere besides inside a list of default groups of a parent group. The fix is to make usb_os_desc_prepare_interf_dir function return a pointer to allocated data (as a pointer to the first VLA item) instead of (an unused) integer and to make the caller component (currently the only one is RNDIS function) responsible for storing the pointer and freeing the memory when appropriate. Fixes: 1ae1602de028 ("configfs: switch ->default groups to a linked list") Cc: stable@vger.kernel.org Signed-off-by: Andrew Gabbasov Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 15 ++++++++------- drivers/usb/gadget/configfs.h | 11 ++++++----- drivers/usb/gadget/function/f_rndis.c | 12 ++++++++++-- drivers/usb/gadget/function/u_rndis.h | 1 + 4 files changed, 25 insertions(+), 14 deletions(-) commit aec17e1e249567e82b26dafbb86de7d07fde8729 Author: Andrew Gabbasov Date: Sat Sep 30 08:55:55 2017 -0700 usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options KASAN enabled configuration reports an error BUG: KASAN: use-after-free in usb_composite_overwrite_options+... [libcomposite] at addr ... Read of size 1 by task ... when some driver is un-bound and then bound again. For example, this happens with FunctionFS driver when "ffs-test" test application is run several times in a row. If the driver has empty manufacturer ID string in initial static data, it is then replaced with generated string. After driver unbinding the generated string is freed, but the driver data still keep that pointer. And if the driver is then bound again, that pointer is re-used for string emptiness check. The fix is to clean up the driver string data upon its unbinding to drop the pointer to freed memory. Fixes: cc2683c318a5 ("usb: gadget: Provide a default implementation of default manufacturer string") Cc: stable@vger.kernel.org Signed-off-by: Andrew Gabbasov Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 5 +++++ 1 file changed, 5 insertions(+) commit cb84f56861eb333af0a5bab475d741b13067c05c Author: Dan Carpenter Date: Sat Sep 30 11:15:29 2017 +0300 usb: misc: usbtest: Fix overflow in usbtest_do_ioctl() There used to be a test against "if (param->sglen > MAX_SGLEN)" but it was removed during a refactor. It leads to an integer overflow and a stack overflow in test_queue() if we try to create a too large urbs[] array on the stack. There is a second integer overflow in test_queue() as well if "param->iterations" is too high. I don't immediately see that it's harmful but I've added a check to prevent it and silence the static checker warning. Fixes: 18fc4ebdc705 ("usb: misc: usbtest: Remove timeval usage") Acked-by: Deepa Dinamani Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi drivers/usb/misc/usbtest.c | 5 +++++ 1 file changed, 5 insertions(+) commit 29c7f3e68eec4ae94d85ad7b5dfdafdb8089f513 Author: Kazuya Mizuguchi Date: Mon Oct 2 14:01:41 2017 +0900 usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet The DREQE bit of the DnFIFOSEL should be set to 1 after the DE bit of USB-DMAC on R-Car SoCs is set to 1 after the USB-DMAC received a zero-length packet. Otherwise, a transfer completion interruption of USB-DMAC doesn't happen. Even if the driver changes the sequence, normal operations (transmit/receive without zero-length packet) will not cause any side-effects. So, this patch fixes the sequence anyway. Signed-off-by: Kazuya Mizuguchi [shimoda: revise the commit log] Fixes: e73a9891b3a1 ("usb: renesas_usbhs: add DMAEngine support") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab219221a5064abfff9f78c323c4a257b16cdb81 Author: Alan Stern Date: Fri Oct 6 10:27:44 2017 -0400 USB: dummy-hcd: Fix deadlock caused by disconnect detection The dummy-hcd driver calls the gadget driver's disconnect callback under the wrong conditions. It should invoke the callback when Vbus power is turned off, but instead it does so when the D+ pullup is turned off. This can cause a deadlock in the composite core when a gadget driver is unregistered: [ 88.361471] ============================================ [ 88.362014] WARNING: possible recursive locking detected [ 88.362580] 4.14.0-rc2+ #9 Not tainted [ 88.363010] -------------------------------------------- [ 88.363561] v4l_id/526 is trying to acquire lock: [ 88.364062] (&(&cdev->lock)->rlock){....}, at: [] composite_disconnect+0x43/0x100 [libcomposite] [ 88.365051] [ 88.365051] but task is already holding lock: [ 88.365826] (&(&cdev->lock)->rlock){....}, at: [] usb_function_deactivate+0x29/0x80 [libcomposite] [ 88.366858] [ 88.366858] other info that might help us debug this: [ 88.368301] Possible unsafe locking scenario: [ 88.368301] [ 88.369304] CPU0 [ 88.369701] ---- [ 88.370101] lock(&(&cdev->lock)->rlock); [ 88.370623] lock(&(&cdev->lock)->rlock); [ 88.371145] [ 88.371145] *** DEADLOCK *** [ 88.371145] [ 88.372211] May be due to missing lock nesting notation [ 88.372211] [ 88.373191] 2 locks held by v4l_id/526: [ 88.373715] #0: (&(&cdev->lock)->rlock){....}, at: [] usb_function_deactivate+0x29/0x80 [libcomposite] [ 88.374814] #1: (&(&dum_hcd->dum->lock)->rlock){....}, at: [] dummy_pullup+0x7d/0xf0 [dummy_hcd] [ 88.376289] [ 88.376289] stack backtrace: [ 88.377726] CPU: 0 PID: 526 Comm: v4l_id Not tainted 4.14.0-rc2+ #9 [ 88.378557] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 88.379504] Call Trace: [ 88.380019] dump_stack+0x86/0xc7 [ 88.380605] __lock_acquire+0x841/0x1120 [ 88.381252] lock_acquire+0xd5/0x1c0 [ 88.381865] ? composite_disconnect+0x43/0x100 [libcomposite] [ 88.382668] _raw_spin_lock_irqsave+0x40/0x54 [ 88.383357] ? composite_disconnect+0x43/0x100 [libcomposite] [ 88.384290] composite_disconnect+0x43/0x100 [libcomposite] [ 88.385490] set_link_state+0x2d4/0x3c0 [dummy_hcd] [ 88.386436] dummy_pullup+0xa7/0xf0 [dummy_hcd] [ 88.387195] usb_gadget_disconnect+0xd8/0x160 [udc_core] [ 88.387990] usb_gadget_deactivate+0xd3/0x160 [udc_core] [ 88.388793] usb_function_deactivate+0x64/0x80 [libcomposite] [ 88.389628] uvc_function_disconnect+0x1e/0x40 [usb_f_uvc] This patch changes the code to test the port-power status bit rather than the port-connect status bit when deciding whether to isue the callback. Signed-off-by: Alan Stern Reported-by: David Tulloh CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 203f44c475a1a8ace6d30c4c14ab41295081a23f Author: Jon Hunter Date: Mon Oct 2 12:22:53 2017 +0100 usb: phy: tegra: Fix phy suspend for UDC Commit dfebb5f43a78 ("usb: chipidea: Add support for Tegra20/30/114/124") added UDC support for Tegra but with UDC support enabled, is was found that Tegra30, Tegra114 and Tegra124 would hang on entry to suspend. The hang occurred during the suspend of the USB PHY when the Tegra PHY driver attempted to disable the PHY clock. The problem is that before the Tegra PHY driver is suspended, the chipidea driver already disabled the PHY clock and when the Tegra PHY driver suspended, it could not read DEVLC register and caused the device to hang. The Tegra USB PHY driver is used by both the Tegra EHCI driver and now the chipidea UDC driver and so simply removing the disabling of the PHY clock from the USB PHY driver would not work for the Tegra EHCI driver. Fortunately, the status of the USB PHY clock can be read from the USB_SUSP_CTRL register and therefore, to workaround this issue, simply poll the register prior to disabling the clock in USB PHY driver to see if clock gating has already been initiated. Please note that it can take a few uS for the clock to disable and so simply reading this status register once on entry is not sufficient. Similarly when turning on the PHY clock, it is possible that the clock is already enabled or in the process of being enabled, and so check for this when enabling the PHY. Please note that no issues are seen with Tegra20 because it has a slightly different PHY to Tegra30/114/124. Fixes: dfebb5f43a78 ("usb: chipidea: Add support for Tegra20/30/114/124") Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Jon Hunter Signed-off-by: Felipe Balbi drivers/usb/phy/phy-tegra-usb.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 11aff4b4c7c4b7257660ef890920f2ac72911ed0 Author: Lucas Stach Date: Mon Sep 18 17:45:07 2017 +0200 gpu: ipu-v3: pre: implement workaround for ERR009624 The PRE has a bug where a software write to the CTRL register can block the setting of the ENABLE bit by the hardware in auto repeat mode. When this happens the PRE will fail to handle new jobs. To work around this software must not write to CTRL register when the PRE store engine is inside the unsafe window, where a hardware update to the ENABLE bit may happen. Signed-off-by: Lucas Stach [p.zabel@pengutronix.de: rebased before PRE tiled prefetch support] Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-pre.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 263c3b8044f9c9356a34fdb2640b52d27e378f9c Author: Lucas Stach Date: Fri Mar 24 18:01:53 2017 +0100 gpu: ipu-v3: prg: wait for double buffers to be filled on channel startup Wait for both double buffer to be filled when first starting a channel. This makes channel startup a lot more reliable, probably because it allows the internal state machine to settle before the requests from the IPU are coming in. Signed-off-by: Lucas Stach [p.zabel@pengutronix.de: rebased before switch to runtime PM] Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-prg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cda77556447c782b3c9c068f81ef58136cb487c3 Author: Philipp Zabel Date: Tue Oct 10 15:13:55 2017 +0200 gpu: ipu-v3: Allow channel burst locking on i.MX6 only The IDMAC_LOCK_EN registers on i.MX51 have a different layout, and on i.MX53 enabling the lock feature causes bursts to get lost. Restrict enabling the burst lock feature to i.MX6. Reported-by: Patrick Brünn Fixes: 790cb4c7c954 ("drm/imx: lock scanout transfers for consecutive bursts") Tested-by: Patrick Brünn Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 10a7ef33679073d13bf1dd05e3f1b7912f999543 Author: David Miller Date: Tue Oct 10 20:59:38 2017 -0700 ipsec: Fix dst leak in xfrm_bundle_create(). If we cannot find a suitable inner_mode value, we will leak the currently allocated 'xdst'. The fix is to make sure it is linked into the chain before erroring out. Signed-off-by: David S. Miller Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 71105998845fb012937332fe2e806d443c09e026 Author: Takashi Iwai Date: Mon Oct 9 11:09:20 2017 +0200 ALSA: seq: Fix use-after-free at creating a port There is a potential race window opened at creating and deleting a port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates a port object and returns its pointer, but it doesn't take the refcount, thus it can be deleted immediately by another thread. Meanwhile, snd_seq_ioctl_create_port() still calls the function snd_seq_system_client_ev_port_start() with the created port object that is being deleted, and this triggers use-after-free like: BUG: KASAN: use-after-free in snd_seq_ioctl_create_port+0x504/0x630 [snd_seq] at addr ffff8801f2241cb1 ============================================================================= BUG kmalloc-512 (Tainted: G B ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in snd_seq_create_port+0x94/0x9b0 [snd_seq] age=1 cpu=3 pid=4511 ___slab_alloc+0x425/0x460 __slab_alloc+0x20/0x40 kmem_cache_alloc_trace+0x150/0x190 snd_seq_create_port+0x94/0x9b0 [snd_seq] snd_seq_ioctl_create_port+0xd1/0x630 [snd_seq] snd_seq_do_ioctl+0x11c/0x190 [snd_seq] snd_seq_ioctl+0x40/0x80 [snd_seq] do_vfs_ioctl+0x54b/0xda0 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x16/0x75 INFO: Freed in port_delete+0x136/0x1a0 [snd_seq] age=1 cpu=2 pid=4717 __slab_free+0x204/0x310 kfree+0x15f/0x180 port_delete+0x136/0x1a0 [snd_seq] snd_seq_delete_port+0x235/0x350 [snd_seq] snd_seq_ioctl_delete_port+0xc8/0x180 [snd_seq] snd_seq_do_ioctl+0x11c/0x190 [snd_seq] snd_seq_ioctl+0x40/0x80 [snd_seq] do_vfs_ioctl+0x54b/0xda0 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x16/0x75 Call Trace: [] dump_stack+0x63/0x82 [] print_trailer+0xfb/0x160 [] object_err+0x34/0x40 [] kasan_report.part.2+0x223/0x520 [] ? snd_seq_ioctl_create_port+0x504/0x630 [snd_seq] [] __asan_report_load1_noabort+0x2e/0x30 [] snd_seq_ioctl_create_port+0x504/0x630 [snd_seq] [] ? snd_seq_ioctl_delete_port+0x180/0x180 [snd_seq] [] ? taskstats_exit+0xbc0/0xbc0 [] snd_seq_do_ioctl+0x11c/0x190 [snd_seq] [] snd_seq_ioctl+0x40/0x80 [snd_seq] [] ? acct_account_cputime+0x63/0x80 [] do_vfs_ioctl+0x54b/0xda0 ..... We may fix this in a few different ways, and in this patch, it's fixed simply by taking the refcount properly at snd_seq_create_port() and letting the caller unref the object after use. Also, there is another potential use-after-free by sprintf() call in snd_seq_create_port(), and this is moved inside the lock. This fix covers CVE-2017-15265. Reported-and-tested-by: Michael23 Yu Suggested-by: Linus Torvalds Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 6 +++++- sound/core/seq/seq_ports.c | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit 1cfd0ddd82232804e03f3023f6a58b50dfef0574 Author: Al Viro Date: Sun Sep 24 10:21:15 2017 -0400 bio_copy_user_iov(): don't ignore ->iov_offset Since "block: support large requests in blk_rq_map_user_iov" we started to call it with partially drained iter; that works fine on the write side, but reads create a copy of iter for completion time. And that needs to take the possibility of ->iov_iter != 0 into account... Cc: stable@vger.kernel.org #v4.5+ Signed-off-by: Al Viro block/bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b04e8f6bbb196cab4b232af0f8d48ff2c7a8058 Author: Al Viro Date: Sat Sep 23 15:51:23 2017 -0400 more bio_map_user_iov() leak fixes we need to take care of failure exit as well - pages already in bio should be dropped by analogue of bio_unmap_pages(), since their refcounts had been bumped only once per reference in bio. Cc: stable@vger.kernel.org Signed-off-by: Al Viro block/bio.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 Author: Vitaly Mayatskikh Date: Fri Sep 22 01:18:39 2017 -0400 fix unbalanced page refcounting in bio_map_user_iov bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Cc: stable@vger.kernel.org Signed-off-by: Vitaly Mayatskikh Signed-off-by: Al Viro block/bio.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c0576e3975084d4699b7bfef578613fb8e1144f6 Author: Eric Dumazet Date: Tue Oct 10 19:12:33 2017 -0700 net: call cgroup_sk_alloc() earlier in sk_clone_lock() If for some reason, the newly allocated child need to be freed, we will call cgroup_put() (via sk_free_unlock_clone()) while the corresponding cgroup_get() was not yet done, and we will free memory too soon. Fixes: d979a39d7242 ("cgroup: duplicate cgroup reference when cloning sockets") Signed-off-by: Eric Dumazet Cc: Johannes Weiner Cc: Tejun Heo Signed-off-by: David S. Miller net/core/sock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 75cb070960ade40fba5de32138390f3c85c90941 Author: Eric Dumazet Date: Tue Oct 10 19:12:32 2017 -0700 Revert "net: defer call to cgroup_sk_alloc()" This reverts commit fbb1fb4ad415cb31ce944f65a5ca700aaf73a227. This was not the proper fix, lets cleanly revert it, so that following patch can be carried to stable versions. sock_cgroup_ptr() callers do not expect a NULL return value. Signed-off-by: Eric Dumazet Cc: Johannes Weiner Cc: Tejun Heo Signed-off-by: David S. Miller kernel/cgroup/cgroup.c | 11 +++++++++++ net/core/sock.c | 3 ++- net/ipv4/inet_connection_sock.c | 5 ----- 3 files changed, 13 insertions(+), 6 deletions(-) commit 899f0429c7d3eed886406cd72182bee3b96aa1f9 Author: Andreas Gruenbacher Date: Mon Oct 9 11:13:18 2017 +0200 direct-io: Prevent NULL pointer access in submit_page_section In the code added to function submit_page_section by commit b1058b981, sdio->bio can currently be NULL when calling dio_bio_submit. This then leads to a NULL pointer access in dio_bio_submit, so check for a NULL bio in submit_page_section before trying to submit it instead. Fixes xfstest generic/250 on gfs2. Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Andreas Gruenbacher Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/direct-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 407dae1e4415acde2d9f48bb76361893c4653756 Author: Thomas Petazzoni Date: Mon Oct 9 09:00:49 2017 +0200 PCI: aardvark: Move to struct pci_host_bridge IRQ mapping functions struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ mapping can be done automatically by PCI core code through the pci_assign_irq() function instead of resorting to arch-specific implementation callbacks to carry out the same task which force PCI host bridge drivers implementation to implement per-arch kludges to carry out a task that is inherently architecture agnostic. Commit 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()") was assuming all PCI host controller drivers had been converted to use ->map_irq(), but that wasn't the case: pci-aardvark had not been converted. Due to this, it broke the support for legacy PCI interrupts when using the pci-aardvark driver (used on Marvell Armada 3720 platforms). In order to fix this, we make sure the ->map_irq and ->swizzle_irq fields of pci_host_bridge are properly filled in. Fixes: 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()") Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.13+ drivers/pci/host/pci-aardvark.c | 2 ++ 1 file changed, 2 insertions(+) commit 8c2b4e3c3725801b57d7b858d216d38f83bdb35d Author: Thierry Reding Date: Mon Oct 9 12:29:35 2017 +0200 Revert "PCI: tegra: Do not allocate MSI target memory" This reverts commit d7bd554f27c942e6b8b54100b4044f9be1038edf. It turns out that Tegra20 has a bug in the implementation of the MSI target address register (which is worked around by the existence of the struct tegra_pcie_soc.msi_base_shift parameter) that restricts the MSI target memory to the lower 32 bits of physical memory on that particular generation. The offending patch causes a regression on TrimSlice, which is a Tegra20-based device and has a PCI network interface card. An initial, simpler fix was to change the MSI target address for Tegra20 only, but it was pointed out that the offending commit also prevents the use of 32-bit only MSI capable devices, even on later chips. Technically this was never guaranteed to work with the prior code in the first place because the allocated page could have resided beyond the 4 GiB boundary, but it is still possible that this could've introduced a regression. The proper fix that was settled on is to select a fixed address within the lowest 32 bits of physical address space that is otherwise unused, but testing of that patch has provided mixed results that are not fully understood yet. Given all of the above and the relative urgency to get this fixed in v4.13, revert the offending commit until a universal fix is found. Fixes: d7bd554f27c9 ("PCI: tegra: Do not allocate MSI target memory") Reported-by: Tomasz Maciej Nowak Reported-by: Erik Faye-Lund Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # 4.13.x drivers/pci/host/pci-tegra.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit befc7a3324b45b7478b29861f2a77f8b2bc17922 Merge: 3668bb8 5f0ca2fb7 Author: David S. Miller Date: Tue Oct 10 13:18:34 2017 -0700 Merge branch 'nfp-fix-ethtool-stats-and-page-allocation' Jakub Kicinski says: ==================== nfp: fix ethtool stats and page allocation Two fixes for net. First one makes sure we handle gather of stats on 32bit machines correctly (ouch). The second fix solves a potential NULL-deref if we fail to allocate a page with XDP running. I used Fixes: tags pointing to where the bug was introduced, but for patch 1 it has been in the driver "for ever" and fix won't backport cleanly beyond commit 325945ede6d4 ("nfp: split software and hardware vNIC statistics") which is in net. ==================== Signed-off-by: David S. Miller commit 5f0ca2fb71e28df146f590eebfe32b41171b737f Author: Jakub Kicinski Date: Tue Oct 10 09:16:23 2017 -0700 nfp: handle page allocation failures page_address() does not handle NULL argument gracefully, make sure we NULL-check the page pointer before passing it to page_address(). Fixes: ecd63a0217d5 ("nfp: add XDP support in the driver") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit c3d64ad4fea66d07e878b248b803ccd12c45e18c Author: Jakub Kicinski Date: Tue Oct 10 09:16:22 2017 -0700 nfp: fix ethtool stats gather retry The while loop fetching 64 bit ethtool statistics may have to retry multiple times, it shouldn't modify the outside state. Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3668bb8da197f90c2e9cb71e89da6fa629ff8450 Merge: 365ff9d 2b9478f Author: David S. Miller Date: Tue Oct 10 13:17:11 2017 -0700 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-10-10 This series contains updates to i40e only. Stefano Brivio fixes the grammar in a function header comment. Alex fixes a memory leak where we were not correctly placing the pages from buffers that had been used to return a filter programming status back on the ring. ==================== Signed-off-by: David S. Miller commit a957fd420ca8774f1a6708c64a867f056e67c46e Merge: f953d248 084f560 Author: Linus Torvalds Date: Tue Oct 10 13:08:59 2017 -0700 Merge tag 'seccomp-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixlet from Kees Cook: "Minor seccomp fix for v4.14-rc5. I debated sending this at all for v4.14, but since it fixes a minor issue in the prior fix, which also went to -stable, it seemed better to just get all of it cleaned up right now. - fix missed "static" to avoid Sparse warning (Colin King)" * tag 'seccomp-v4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: make function __get_seccomp_filter static commit f953d2481e1db0265c5ed69489570377d91d92e6 Merge: 7056964 ec572b9 Author: Linus Torvalds Date: Tue Oct 10 13:01:51 2017 -0700 Merge tag 'nfsd-4.14-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fix from Bruce Fields: "One fix for a 4.14 regression, and one minor fix to the MAINTAINERs file. (I was weirdly flattered by the idea that lots of random people suddenly seemed to think Jeff and I were VFS experts. Turns out it was just a typo)" * tag 'nfsd-4.14-1' of git://linux-nfs.org/~bfields/linux: nfsd4: define nfsd4_secinfo_no_name_release() MAINTAINERS: associate linux/fs.h with VFS instead of file locking commit 365ff9df562889501964ab5ee9fb4ce700d1a8c0 Author: Behan Webster Date: Mon Oct 9 12:41:53 2017 -0700 wimax/i2400m: Remove VLAIS Convert Variable Length Array in Struct (VLAIS) to valid C by converting local struct definition to use a flexible array. The structure is only used to define a cast of a buffer so the size of the struct is not used to allocate storage. Signed-off-by: Behan Webster Signed-off-by: Mark Charebois Suggested-by: Arnd Bergmann Signed-off-by: Matthias Kaehlcke Signed-off-by: David S. Miller drivers/net/wimax/i2400m/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 084f5601c357e4ee59cf0712200d3f5c4710ba40 Author: Colin Ian King Date: Fri Sep 29 14:26:48 2017 +0100 seccomp: make function __get_seccomp_filter static The function __get_seccomp_filter is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol '__get_seccomp_filter' was not declared. Should it be static? Signed-off-by: Colin Ian King Fixes: 66a733ea6b61 ("seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook kernel/seccomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab759b9732fd8a4ae0252bb2087e90d776f74b9f Author: Arnd Bergmann Date: Mon Sep 11 21:54:17 2017 +0200 remoteproc: qcom: fix RPMSG_QCOM_GLINK_SMEM dependencies When RPMSG_QCOM_GLINK_SMEM=m and one driver causes the qcom_common.c file to be compiled as built-in, we get a link error: drivers/remoteproc/qcom_common.o: In function `glink_subdev_remove': qcom_common.c:(.text+0x130): undefined reference to `qcom_glink_smem_unregister' qcom_common.c:(.text+0x130): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_unregister' drivers/remoteproc/qcom_common.o: In function `glink_subdev_probe': qcom_common.c:(.text+0x160): undefined reference to `qcom_glink_smem_register' qcom_common.c:(.text+0x160): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_register' Out of the three PIL driver instances, QCOM_ADSP_PIL already has a Kconfig dependency to prevent this from happening, but the other two do not. This adds the same dependency there. Fixes: eea07023e6d9 ("remoteproc: qcom: adsp: Allow defining GLINK edge") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 68c2d645ebbd4a636cf93ed56f15912bcf9376bc Author: Dan Carpenter Date: Thu Oct 5 15:58:27 2017 +0300 remoteproc: imx_rproc: fix a couple off by one bugs The priv->mem[] array has IMX7D_RPROC_MEM_MAX elements so the > should be >= to avoid writing one element beyond the end of the array. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b775d158530285c9657a1a0628c139b0dfd0d2e5 Author: Dan Carpenter Date: Fri Sep 8 13:34:42 2017 +0300 rpmsg: glink: Fix memory leak in qcom_glink_alloc_intent() We need to free "intent" and "intent->data" on a couple error paths. Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents") Acked-by: Sricharan R Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0a7480bd327afcccd7263be5b485f85943e1e903 Author: Dan Carpenter Date: Fri Sep 8 13:33:45 2017 +0300 rpmsg: glink: Unlock on error in qcom_glink_request_intent() If qcom_glink_tx() fails, then we need to unlock before returning the error code. Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable") Acked-by: Sricharan R Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7056964a85031f42e2360617b14272593729ce1b Merge: da93b8c 638164a Author: Linus Torvalds Date: Tue Oct 10 11:04:00 2017 -0700 Merge tag 'f2fs-for-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fix from Jaegeuk Kim: "This contains one bug fix which causes a kernel panic during fstrim introduced in 4.14-rc1" * tag 'f2fs-for-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: fix potential panic during fstrim commit da93b8c7c692ee2e7641afdae5d79476c0ee86cf Merge: 529a86e ea344f6 Author: Linus Torvalds Date: Tue Oct 10 10:57:46 2017 -0700 Merge tag 'linux-kselftest-4.14-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: - fix for x86: sysret_ss_attrs test build failure preventing the x86 tests from running - fix mqueue: fix regression in silencing test run output * tag 'linux-kselftest-4.14-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: mqueue: fix regression in silencing output from RUN_TESTS selftests: x86: sysret_ss_attrs doesn't build on a PIE build commit aba2d9a6385a5cc4f7a7e8eb5788e1ddbc213fc0 Author: Tom Lendacky Date: Fri Oct 6 16:35:40 2017 -0500 iommu/amd: Do not disable SWIOTLB if SME is active When SME memory encryption is active it will rely on SWIOTLB to handle DMA for devices that cannot support the addressing requirements of having the encryption mask set in the physical address. The IOMMU currently disables SWIOTLB if it is not running in passthrough mode. This is not desired as non-PCI devices attempting DMA may fail. Update the code to check if SME is active and not disable SWIOTLB. Fixes: 2543a786aa25 ("iommu/amd: Allow the AMD IOMMU to work with memory encryption") Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 47a74bdcbfeff543f706dc0e385eebbb5d655ed2 Merge: 629eb70 aa7b4e0 Author: Ingo Molnar Date: Tue Oct 10 19:21:37 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20171010' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Unbreak 'perf record' for arm/arm64 with events with explicit PMU (Mark Rutland) - Add missing separator for "perf script -F ip,brstack" (and brstackoff) (Mark Santaniello) - One line, comment only, sync kernel ABI header with tooling header (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit b61907bb42409adf9b3120f741af7c57dd7e3db2 Author: Herbert Xu Date: Mon Oct 9 23:30:02 2017 +0800 crypto: shash - Fix zero-length shash ahash digest crash The shash ahash digest adaptor function may crash if given a zero-length input together with a null SG list. This is because it tries to read the SG list before looking at the length. This patch fixes it by checking the length first. Cc: Reported-by: Stephan Müller Signed-off-by: Herbert Xu Tested-by: Stephan Müller crypto/shash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ac3d79392f8c2728f7600dd32ed88b3a1bfdc1af Author: Jan Kara Date: Tue Oct 10 14:40:42 2017 +0200 quota: Generate warnings for DQUOT_SPACE_NOFAIL allocations Eryu has reported that since commit 7b9ca4c61bc2 "quota: Reduce contention on dq_data_lock" test generic/233 occasionally fails. This is caused by the fact that since that commit we don't generate warning and set grace time for quota allocations that have DQUOT_SPACE_NOFAIL set (these are for example some metadata allocations in ext4). We need these allocations to behave regularly wrt warning generation and grace time setting so fix the code to return to the original behavior. Reported-and-tested-by: Eryu Guan CC: stable@vger.kernel.org Fixes: 7b9ca4c61bc278b771fb57d6290a31ab1fc7fdac Signed-off-by: Jan Kara fs/quota/dquot.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 2b9478ffc550f17c6cd8c69057234e91150f5972 Author: Alexander Duyck Date: Wed Oct 4 08:44:43 2017 -0700 i40e: Fix memory leak related filter programming status It looks like we weren't correctly placing the pages from buffers that had been used to return a filter programming status back on the ring. As a result they were being overwritten and tracking of the pages was lost. This change works to correct that by incorporating part of i40e_put_rx_buffer into the programming status handler code. As a result we should now be correctly placing the pages for those buffers on the re-allocation list instead of letting them stay in place. Fixes: 0e626ff7ccbf ("i40e: Fix support for flow director programming status") Reported-by: Anders K. Pedersen Signed-off-by: Alexander Duyck Tested-by: Anders K Pedersen Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 63 ++++++++++++++++------------- 1 file changed, 36 insertions(+), 27 deletions(-) commit e836e3211229d7307660239cc957f2ab60e6aa00 Author: Stefano Brivio Date: Wed Sep 6 10:11:38 2017 +0200 i40e: Fix comment about locking for __i40e_read_nvm_word() Caller needs to acquire the lock. Called functions will not. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 692b48258dda7c302e777d7d5f4217244478f1f6 Author: Tejun Heo Date: Mon Oct 9 08:04:13 2017 -0700 workqueue: replace pool->manager_arb mutex with a flag Josef reported a HARDIRQ-safe -> HARDIRQ-unsafe lock order detected by lockdep: [ 1270.472259] WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected [ 1270.472783] 4.14.0-rc1-xfstests-12888-g76833e8 #110 Not tainted [ 1270.473240] ----------------------------------------------------- [ 1270.473710] kworker/u5:2/5157 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 1270.474239] (&(&lock->wait_lock)->rlock){+.+.}, at: [] __mutex_unlock_slowpath+0xa2/0x280 [ 1270.474994] [ 1270.474994] and this task is already holding: [ 1270.475440] (&pool->lock/1){-.-.}, at: [] worker_thread+0x366/0x3c0 [ 1270.476046] which would create a new lock dependency: [ 1270.476436] (&pool->lock/1){-.-.} -> (&(&lock->wait_lock)->rlock){+.+.} [ 1270.476949] [ 1270.476949] but this new dependency connects a HARDIRQ-irq-safe lock: [ 1270.477553] (&pool->lock/1){-.-.} ... [ 1270.488900] to a HARDIRQ-irq-unsafe lock: [ 1270.489327] (&(&lock->wait_lock)->rlock){+.+.} ... [ 1270.494735] Possible interrupt unsafe locking scenario: [ 1270.494735] [ 1270.495250] CPU0 CPU1 [ 1270.495600] ---- ---- [ 1270.495947] lock(&(&lock->wait_lock)->rlock); [ 1270.496295] local_irq_disable(); [ 1270.496753] lock(&pool->lock/1); [ 1270.497205] lock(&(&lock->wait_lock)->rlock); [ 1270.497744] [ 1270.497948] lock(&pool->lock/1); , which will cause a irq inversion deadlock if the above lock scenario happens. The root cause of this safe -> unsafe lock order is the mutex_unlock(pool->manager_arb) in manage_workers() with pool->lock held. Unlocking mutex while holding an irq spinlock was never safe and this problem has been around forever but it never got noticed because the only time the mutex is usually trylocked while holding irqlock making actual failures very unlikely and lockdep annotation missed the condition until the recent b9c16a0e1f73 ("locking/mutex: Fix lockdep_assert_held() fail"). Using mutex for pool->manager_arb has always been a bit of stretch. It primarily is an mechanism to arbitrate managership between workers which can easily be done with a pool flag. The only reason it became a mutex is that pool destruction path wants to exclude parallel managing operations. This patch replaces the mutex with a new pool flag POOL_MANAGER_ACTIVE and make the destruction path wait for the current manager on a wait queue. v2: Drop unnecessary flag clearing before pool destruction as suggested by Boqun. Signed-off-by: Tejun Heo Reported-by: Josef Bacik Reviewed-by: Lai Jiangshan Cc: Peter Zijlstra Cc: Boqun Feng Cc: stable@vger.kernel.org kernel/workqueue.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 829ee279aed43faa5cb1e4d65c0cad52f2426c53 Author: Ladi Prosek Date: Thu Oct 5 11:10:23 2017 +0200 KVM: MMU: always terminate page walks at level 1 is_last_gpte() is not equivalent to the pseudo-code given in commit 6bb69c9b69c31 ("KVM: MMU: simplify last_pte_bitmap") because an incorrect value of last_nonleaf_level may override the result even if level == 1. It is critical for is_last_gpte() to return true on level == 1 to terminate page walks. Otherwise memory corruption may occur as level is used as an index to various data structures throughout the page walking code. Even though the actual bug would be wherever the MMU is initialized (as in the previous patch), be defensive and ensure here that is_last_gpte() returns the correct value. This patch is also enough to fix CVE-2017-12188. Fixes: 6bb69c9b69c315200ddc2bc79aee14c0184cf5b2 Cc: stable@vger.kernel.org Cc: Andy Honig Signed-off-by: Ladi Prosek [Panic if walk_addr_generic gets an incorrect level; this is a serious bug and it's not worth a WARN_ON where the recovery path might hide further exploitable issues; suggested by Andrew Honig. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 14 +++++++------- arch/x86/kvm/paging_tmpl.h | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) commit fd19d3b45164466a4adce7cbff448ba9189e1427 Author: Ladi Prosek Date: Thu Oct 5 11:10:22 2017 +0200 KVM: nVMX: update last_nonleaf_level when initializing nested EPT The function updates context->root_level but didn't call update_last_nonleaf_level so the previous and potentially wrong value was used for page walks. For example, a zero value of last_nonleaf_level would allow a potential out-of-bounds access in arch/x86/mmu/paging_tmpl.h's walk_addr_generic function (CVE-2017-12188). Fixes: 155a97a3d7c78b46cef6f1a973c831bc5a4f82bb Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 1 + 1 file changed, 1 insertion(+) commit eac779aa509d453a55da0ea4302bdb79c4e0854f Author: Zhenzhong Duan Date: Sun Oct 8 19:58:46 2017 -0700 xen/vcpu: Use a unified name about cpu hotplug state for pv and pvhvm As xen_cpuhp_setup is called by PV and PVHVM, the name of "x86/xen/hvm_guest" is confusing. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/enlighten.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 124751d5e63c823092060074bd0abaae61aaa9c4 Author: Takashi Iwai Date: Tue Oct 10 14:10:32 2017 +0200 ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in snd_usb_mixer_interrupt+0x604/0x6f0 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_load8_noabort+0x19/0x20 mm/kasan/report.c:430 snd_usb_mixer_interrupt+0x604/0x6f0 sound/usb/mixer.c:2490 __usb_hcd_giveback_urb+0x2e0/0x650 drivers/usb/core/hcd.c:1779 .... Allocated by task 1484: 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 snd_usb_create_mixer+0x145/0x1010 sound/usb/mixer.c:2540 create_standard_mixer_quirk+0x58/0x80 sound/usb/quirks.c:516 snd_usb_create_quirk+0x92/0x100 sound/usb/quirks.c:560 create_composite_quirk+0x1c4/0x3e0 sound/usb/quirks.c:59 snd_usb_create_quirk+0x92/0x100 sound/usb/quirks.c:560 usb_audio_probe+0x1040/0x2c10 sound/usb/card.c:618 .... Freed by task 1484: 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 snd_usb_mixer_free+0x11a/0x160 sound/usb/mixer.c:2244 snd_usb_mixer_dev_free+0x36/0x50 sound/usb/mixer.c:2250 __snd_device_free+0x1ff/0x380 sound/core/device.c:91 snd_device_free_all+0x8f/0xe0 sound/core/device.c:244 snd_card_do_free sound/core/init.c:461 release_card_device+0x47/0x170 sound/core/init.c:181 device_release+0x13f/0x210 drivers/base/core.c:814 .... Actually such a URB is killed properly at disconnection when the device gets probed successfully, and what we need is to apply it for the error-path, too. In this patch, we apply snd_usb_mixer_disconnect() at releasing. Also introduce a new flag, disconnected, to struct usb_mixer_interface for not performing the disconnection procedure twice. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 12 ++++++++++-- sound/usb/mixer.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) commit ab7ff471aa5db670197070760f022622793da7e5 Author: Marcelo Henrique Cerri Date: Thu Oct 5 10:34:29 2017 -0300 x86/hyperv: Fix hypercalls with extended CPU ranges for TLB flushing Do not consider the fixed size of hv_vp_set when passing the variable header size to hv_do_rep_hypercall(). The Hyper-V hypervisor specification states that for a hypercall with a variable header only the size of the variable portion should be supplied via the input control. For HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX calls that means the fixed portion of hv_vp_set should not be considered. That fixes random failures of some applications that are unexpectedly killed with SIGBUS or SIGSEGV. Signed-off-by: Marcelo Henrique Cerri Cc: Dexuan Cui Cc: Haiyang Zhang Cc: Jork Loeser Cc: Josh Poulson Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Simon Xiao Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Fixes: 628f54cc6451 ("x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls") Link: http://lkml.kernel.org/r/1507210469-29065-1-git-send-email-marcelo.cerri@canonical.com Signed-off-by: Ingo Molnar arch/x86/hyperv/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 60d73a7c96601434dfdb56d5b9167ff3b850d8d7 Author: Vitaly Kuznetsov Date: Thu Oct 5 13:39:24 2017 +0200 x86/hyperv: Don't use percpu areas for pcpu_flush/pcpu_flush_ex structures hv_do_hypercall() does virt_to_phys() translation and with some configs (CONFIG_SLAB) this doesn't work for percpu areas, we pass wrong memory to hypervisor and get #GP. We could use working slow_virt_to_phys() instead but doing so kills the performance. Move pcpu_flush/pcpu_flush_ex structures out of percpu areas and allocate memory on first call. The additional level of indirection gives us a small performance penalty, in future we may consider introducing hypercall functions which avoid virt_to_phys() conversion and cache physical addresses of pcpu_flush/pcpu_flush_ex structures somewhere. Reported-by: Simon Xiao Signed-off-by: Vitaly Kuznetsov Cc: Dexuan Cui Cc: Haiyang Zhang Cc: Jork Loeser Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20171005113924.28021-1-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/hyperv/mmu.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit a3b7424392924e778b608e30ee321f7b10cc94b8 Author: Vitaly Kuznetsov Date: Fri Oct 6 17:48:54 2017 +0200 x86/hyperv: Clear vCPU banks between calls to avoid flushing unneeded vCPUs hv_flush_pcpu_ex structures are not cleared between calls for performance reasons (they're variable size up to PAGE_SIZE each) but we must clear hv_vp_set.bank_contents part of it to avoid flushing unneeded vCPUs. The rest of the structure is formed correctly. To do the clearing in an efficient way stash the maximum possible vCPU number (this may differ from Linux CPU id). Reported-by: Jork Loeser Signed-off-by: Vitaly Kuznetsov Cc: Dexuan Cui Cc: Haiyang Zhang Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20171006154854.18092-1-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/hyperv/hv_init.c | 5 +++++ arch/x86/hyperv/mmu.c | 17 ++++++++++++----- arch/x86/include/asm/mshyperv.h | 1 + 3 files changed, 18 insertions(+), 5 deletions(-) commit 629eb703d3e46aa570c6c91235d38fd09ed8c58b Author: Colin Ian King Date: Mon Oct 9 18:26:55 2017 +0100 perf/x86/intel/uncore: Fix memory leaks on allocation failures Currently if an allocation fails then the error return paths don't free up any currently allocated pmus[].boxes and pmus causing a memory leak. Add an error clean up exit path that frees these objects. Detected by CoverityScan, CID#711632 ("Resource Leak") Signed-off-by: Colin Ian King Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: 087bfbb03269 ("perf/x86: Add generic Intel uncore PMU support") Link: http://lkml.kernel.org/r/20171009172655.6132-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d4a2d031dd42f9594107d317e2a9a0c6d73ad46b Author: Josh Poimboeuf Date: Mon Oct 9 20:20:05 2017 -0500 x86/unwind: Disable unwinder warnings on 32-bit x86-32 doesn't have stack validation, so in most cases it doesn't make sense to warn about bad frame pointers. Reported-by: Tetsuo Handa Signed-off-by: Josh Poimboeuf Cc: Byungchul Park Cc: Fengguang Wu Cc: LKP Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a69658760800bf281e6353248c23e0fa0acf5230.1507597785.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 99bd28a49b150e4b938313a63b5532d95ba77885 Author: Josh Poimboeuf Date: Mon Oct 9 20:20:04 2017 -0500 x86/unwind: Align stack pointer in unwinder dump When printing the unwinder dump, the stack pointer could be unaligned, for one of two reasons: - stack corruption; or - GCC created an unaligned stack. There's no way for the unwinder to tell the difference between the two, so we have to assume one or the other. GCC unaligned stacks are very rare, and have only been spotted before GCC 5. Presumably, if we're doing an unwinder stack dump, stack corruption is more likely than a GCC unaligned stack. So always align the stack before starting the dump. Reported-and-tested-by: Tetsuo Handa Reported-and-tested-by: Fengguang Wu Signed-off-by: Josh Poimboeuf Cc: Byungchul Park Cc: LKP Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2f540c515946ab09ed267e1a1d6421202a0cce08.1507597785.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c99b692cfd62f6915ed7ee7ed3c38d65ba3feab Author: Josh Poimboeuf Date: Mon Oct 9 20:20:03 2017 -0500 x86/unwind: Use MSB for frame pointer encoding on 32-bit On x86-32, Tetsuo Handa and Fengguang Wu reported unwinder warnings like: WARNING: kernel stack regs at f60bb9c8 in swapper:1 has bad 'bp' value 0ba00000 And also there were some stack dumps with a bunch of unreliable '?' symbols after an apic_timer_interrupt symbol, meaning the unwinder got confused when it tried to read the regs. The cause of those issues is that, with GCC 4.8 (and possibly older), there are cases where GCC misaligns the stack pointer in a leaf function for no apparent reason: c124a388 : c124a388: 55 push %ebp c124a389: 89 e5 mov %esp,%ebp c124a38b: 57 push %edi c124a38c: 56 push %esi c124a38d: 89 d6 mov %edx,%esi c124a38f: 53 push %ebx c124a390: 31 db xor %ebx,%ebx c124a392: 83 ec 03 sub $0x3,%esp ... c124a3e3: 83 c4 03 add $0x3,%esp c124a3e6: 5b pop %ebx c124a3e7: 5e pop %esi c124a3e8: 5f pop %edi c124a3e9: 5d pop %ebp c124a3ea: c3 ret If an interrupt occurs in such a function, the regs on the stack will be unaligned, which breaks the frame pointer encoding assumption. So on 32-bit, use the MSB instead of the LSB to encode the regs. This isn't an issue on 64-bit, because interrupts align the stack before writing to it. Reported-and-tested-by: Tetsuo Handa Reported-and-tested-by: Fengguang Wu Signed-off-by: Josh Poimboeuf Cc: Byungchul Park Cc: LKP Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/279a26996a482ca716605c7dbc7f2db9d8d91e81.1507597785.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 4 ++-- arch/x86/kernel/unwind_frame.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 62dd86ac01f9fb6386d7f8c6b389c3ea4582a50a Author: Josh Poimboeuf Date: Mon Oct 9 20:20:02 2017 -0500 x86/unwind: Fix dereference of untrusted pointer Tetsuo Handa and Fengguang Wu reported a panic in the unwinder: BUG: unable to handle kernel NULL pointer dereference at 000001f2 IP: update_stack_state+0xd4/0x340 *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP CPU: 0 PID: 18728 Comm: 01-cpu-hotplug Not tainted 4.13.0-rc4-00170-gb09be67 #592 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 task: bb0b53c0 task.stack: bb3ac000 EIP: update_stack_state+0xd4/0x340 EFLAGS: 00010002 CPU: 0 EAX: 0000a570 EBX: bb3adccb ECX: 0000f401 EDX: 0000a570 ESI: 00000001 EDI: 000001ba EBP: bb3adc6b ESP: bb3adc3f DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 CR0: 80050033 CR2: 000001f2 CR3: 0b3a7000 CR4: 00140690 DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 DR6: fffe0ff0 DR7: 00000400 Call Trace: ? unwind_next_frame+0xea/0x400 ? __unwind_start+0xf5/0x180 ? __save_stack_trace+0x81/0x160 ? save_stack_trace+0x20/0x30 ? __lock_acquire+0xfa5/0x12f0 ? lock_acquire+0x1c2/0x230 ? tick_periodic+0x3a/0xf0 ? _raw_spin_lock+0x42/0x50 ? tick_periodic+0x3a/0xf0 ? tick_periodic+0x3a/0xf0 ? debug_smp_processor_id+0x12/0x20 ? tick_handle_periodic+0x23/0xc0 ? local_apic_timer_interrupt+0x63/0x70 ? smp_trace_apic_timer_interrupt+0x235/0x6a0 ? trace_apic_timer_interrupt+0x37/0x3c ? strrchr+0x23/0x50 Code: 0f 95 c1 89 c7 89 45 e4 0f b6 c1 89 c6 89 45 dc 8b 04 85 98 cb 74 bc 88 4d e3 89 45 f0 83 c0 01 84 c9 89 04 b5 98 cb 74 bc 74 3b <8b> 47 38 8b 57 34 c6 43 1d 01 25 00 00 02 00 83 e2 03 09 d0 83 EIP: update_stack_state+0xd4/0x340 SS:ESP: 0068:bb3adc3f CR2: 00000000000001f2 ---[ end trace 0d147fd4aba8ff50 ]--- Kernel panic - not syncing: Fatal exception in interrupt On x86-32, after decoding a frame pointer to get a regs address, regs_size() dereferences the regs pointer when it checks regs->cs to see if the regs are user mode. This is dangerous because it's possible that what looks like a decoded frame pointer is actually a corrupt value, and we don't want the unwinder to make things worse. Instead of calling regs_size() on an unsafe pointer, just assume they're kernel regs to start with. Later, once it's safe to access the regs, we can do the user mode check and corresponding safety check for the remaining two regs. Reported-and-tested-by: Tetsuo Handa Reported-and-tested-by: Fengguang Wu Signed-off-by: Josh Poimboeuf Cc: Byungchul Park Cc: LKP Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 5ed8d8bb38c5 ("x86/unwind: Move common code into update_stack_state()") Link: http://lkml.kernel.org/r/7f95b9a6993dec7674b3f3ab3dcd3294f7b9644d.1507597785.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 6b2c08f989250c54f31b53dba9ace863a1f3fff6 Author: Thiago Jung Bauermann Date: Wed Oct 4 21:04:30 2017 -0300 powerpc: Don't call lockdep_assert_cpus_held() from arch_update_cpu_topology() It turns out that not all paths calling arch_update_cpu_topology() hold cpu_hotplug_lock, but that's OK because those paths can't race with any concurrent hotplug events. Warnings were reported with the following trace: lockdep_assert_cpus_held arch_update_cpu_topology sched_init_domains sched_init_smp kernel_init_freeable kernel_init ret_from_kernel_thread Which is safe because it's called early in boot when hotplug is not live yet. And also this trace: lockdep_assert_cpus_held arch_update_cpu_topology partition_sched_domains cpuset_update_active_cpus sched_cpu_deactivate cpuhp_invoke_callback cpuhp_down_callbacks cpuhp_thread_fun smpboot_thread_fn kthread ret_from_kernel_thread Which is safe because it's called as part of CPU hotplug, so although we don't hold the CPU hotplug lock, there is another thread driving the CPU hotplug operation which does hold the lock, and there is no race. Thanks to tglx for deciphering it for us. Fixes: 3e401f7a2e51 ("powerpc: Only obtain cpu_hotplug_lock if called by rtasd") Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 1 - 1 file changed, 1 deletion(-) commit b0490a04e736356e427e227902b17f9927a56caf Author: Sandipan Das Date: Tue Oct 10 12:15:30 2017 +0530 powerpc/lib/sstep: Fix count leading zeros instructions According to the GCC documentation, the behaviour of __builtin_clz() and __builtin_clzl() is undefined if the value of the input argument is zero. Without handling this special case, these builtins have been used for emulating the following instructions: * Count Leading Zeros Word (cntlzw[.]) * Count Leading Zeros Doubleword (cntlzd[.]) This fixes the emulated behaviour of these instructions by adding an additional check for this special case. Fixes: 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs") Signed-off-by: Sandipan Das Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5a866ec0014b2baa4ecbb1eaa19c835482829d08 Author: Maxime Chevallier Date: Tue Oct 10 10:43:17 2017 +0200 spi: a3700: Return correct value on timeout detection When waiting for transfer completion, a3700_spi_wait_completion returns a boolean indicating if a timeout occurred. The function was returning 'true' everytime, failing to detect any timeout. This patch makes it return 'false' when a timeout is reached. Signed-off-by: Maxime Chevallier Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-armada-3700.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 024c9d2faebdad3fb43fe49ad68e91a36190f1e2 Author: Peter Zijlstra Date: Mon Oct 9 10:36:53 2017 +0200 sched/core: Ensure load_balance() respects the active_mask While load_balance() masks the source CPUs against active_mask, it had a hole against the destination CPU. Ensure the destination CPU is also part of the 'domain-mask & active-mask' set. Reported-by: Levin, Alexander (Sasha Levin) Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 77d1dfda0e79 ("sched/topology, cpuset: Avoid spurious/wrong domain rebuilds") Signed-off-by: Ingo Molnar kernel/sched/fair.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f2cdd9cc6c97e617b95f430f527a6e3165e1bee8 Author: Peter Zijlstra Date: Fri Oct 6 09:23:24 2017 +0200 sched/core: Address more wake_affine() regressions The trivial wake_affine_idle() implementation is very good for a number of workloads, but it comes apart at the moment there are no idle CPUs left, IOW. the overloaded case. hackbench: NO_WA_WEIGHT WA_WEIGHT hackbench-20 : 7.362717561 seconds 6.450509391 seconds (win) netperf: NO_WA_WEIGHT WA_WEIGHT TCP_SENDFILE-1 : Avg: 54524.6 Avg: 52224.3 TCP_SENDFILE-10 : Avg: 48185.2 Avg: 46504.3 TCP_SENDFILE-20 : Avg: 29031.2 Avg: 28610.3 TCP_SENDFILE-40 : Avg: 9819.72 Avg: 9253.12 TCP_SENDFILE-80 : Avg: 5355.3 Avg: 4687.4 TCP_STREAM-1 : Avg: 41448.3 Avg: 42254 TCP_STREAM-10 : Avg: 24123.2 Avg: 25847.9 TCP_STREAM-20 : Avg: 15834.5 Avg: 18374.4 TCP_STREAM-40 : Avg: 5583.91 Avg: 5599.57 TCP_STREAM-80 : Avg: 2329.66 Avg: 2726.41 TCP_RR-1 : Avg: 80473.5 Avg: 82638.8 TCP_RR-10 : Avg: 72660.5 Avg: 73265.1 TCP_RR-20 : Avg: 52607.1 Avg: 52634.5 TCP_RR-40 : Avg: 57199.2 Avg: 56302.3 TCP_RR-80 : Avg: 25330.3 Avg: 26867.9 UDP_RR-1 : Avg: 108266 Avg: 107844 UDP_RR-10 : Avg: 95480 Avg: 95245.2 UDP_RR-20 : Avg: 68770.8 Avg: 68673.7 UDP_RR-40 : Avg: 76231 Avg: 75419.1 UDP_RR-80 : Avg: 34578.3 Avg: 35639.1 UDP_STREAM-1 : Avg: 64684.3 Avg: 66606 UDP_STREAM-10 : Avg: 52701.2 Avg: 52959.5 UDP_STREAM-20 : Avg: 30376.4 Avg: 29704 UDP_STREAM-40 : Avg: 15685.8 Avg: 15266.5 UDP_STREAM-80 : Avg: 8415.13 Avg: 7388.97 (wins and losses) sysbench: NO_WA_WEIGHT WA_WEIGHT sysbench-mysql-2 : 2135.17 per sec. 2142.51 per sec. sysbench-mysql-5 : 4809.68 per sec. 4800.19 per sec. sysbench-mysql-10 : 9158.59 per sec. 9157.05 per sec. sysbench-mysql-20 : 14570.70 per sec. 14543.55 per sec. sysbench-mysql-40 : 22130.56 per sec. 22184.82 per sec. sysbench-mysql-80 : 20995.56 per sec. 21904.18 per sec. sysbench-psql-2 : 1679.58 per sec. 1705.06 per sec. sysbench-psql-5 : 3797.69 per sec. 3879.93 per sec. sysbench-psql-10 : 7253.22 per sec. 7258.06 per sec. sysbench-psql-20 : 11166.75 per sec. 11220.00 per sec. sysbench-psql-40 : 17277.28 per sec. 17359.78 per sec. sysbench-psql-80 : 17112.44 per sec. 17221.16 per sec. (increase on the top end) tbench: NO_WA_WEIGHT Throughput 685.211 MB/sec 2 clients 2 procs max_latency=0.123 ms Throughput 1596.64 MB/sec 5 clients 5 procs max_latency=0.119 ms Throughput 2985.47 MB/sec 10 clients 10 procs max_latency=0.262 ms Throughput 4521.15 MB/sec 20 clients 20 procs max_latency=0.506 ms Throughput 9438.1 MB/sec 40 clients 40 procs max_latency=2.052 ms Throughput 8210.5 MB/sec 80 clients 80 procs max_latency=8.310 ms WA_WEIGHT Throughput 697.292 MB/sec 2 clients 2 procs max_latency=0.127 ms Throughput 1596.48 MB/sec 5 clients 5 procs max_latency=0.080 ms Throughput 2975.22 MB/sec 10 clients 10 procs max_latency=0.254 ms Throughput 4575.14 MB/sec 20 clients 20 procs max_latency=0.502 ms Throughput 9468.65 MB/sec 40 clients 40 procs max_latency=2.069 ms Throughput 8631.73 MB/sec 80 clients 80 procs max_latency=8.605 ms (increase on the top end) Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Rik van Riel Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 41 +++++++++++++++++++++++++++++++++++++++++ kernel/sched/features.h | 2 ++ 2 files changed, 43 insertions(+) commit d153b153446f7d8832bb2ebd92309c8a6003b3bb Author: Peter Zijlstra Date: Wed Sep 27 11:35:30 2017 +0200 sched/core: Fix wake_affine() performance regression Eric reported a sysbench regression against commit: 3fed382b46ba ("sched/numa: Implement NUMA node level wake_affine()") Similarly, Rik was looking at the NAS-lu.C benchmark, which regressed against his v3.10 enterprise kernel. PRE (current tip/master): ivb-ep sysbench: 2: [30 secs] transactions: 64110 (2136.94 per sec.) 5: [30 secs] transactions: 143644 (4787.99 per sec.) 10: [30 secs] transactions: 274298 (9142.93 per sec.) 20: [30 secs] transactions: 418683 (13955.45 per sec.) 40: [30 secs] transactions: 320731 (10690.15 per sec.) 80: [30 secs] transactions: 355096 (11834.28 per sec.) hsw-ex NAS: OMP_PROC_BIND/lu.C.x_threads_144_run_1.log: Time in seconds = 18.01 OMP_PROC_BIND/lu.C.x_threads_144_run_2.log: Time in seconds = 17.89 OMP_PROC_BIND/lu.C.x_threads_144_run_3.log: Time in seconds = 17.93 lu.C.x_threads_144_run_1.log: Time in seconds = 434.68 lu.C.x_threads_144_run_2.log: Time in seconds = 405.36 lu.C.x_threads_144_run_3.log: Time in seconds = 433.83 POST (+patch): ivb-ep sysbench: 2: [30 secs] transactions: 64494 (2149.75 per sec.) 5: [30 secs] transactions: 145114 (4836.99 per sec.) 10: [30 secs] transactions: 278311 (9276.69 per sec.) 20: [30 secs] transactions: 437169 (14571.60 per sec.) 40: [30 secs] transactions: 669837 (22326.73 per sec.) 80: [30 secs] transactions: 631739 (21055.88 per sec.) hsw-ex NAS: lu.C.x_threads_144_run_1.log: Time in seconds = 23.36 lu.C.x_threads_144_run_2.log: Time in seconds = 22.96 lu.C.x_threads_144_run_3.log: Time in seconds = 22.52 This patch takes out all the shiny wake_affine() stuff and goes back to utter basics. Between the two CPUs involved with the wakeup (the CPU doing the wakeup and the CPU we ran on previously) pick the CPU we can run on _now_. This restores much of the regressions against the older kernels, but leaves some ground in the overloaded case. The default-enabled WA_WEIGHT (which will be introduced in the next patch) is an attempt to address the overloaded situation. Reported-by: Eric Farman Signed-off-by: Peter Zijlstra (Intel) Cc: Christian Borntraeger Cc: Linus Torvalds Cc: Matthew Rosato Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: jinpuwang@gmail.com Cc: vcaputo@pengaru.com Fixes: 3fed382b46ba ("sched/numa: Implement NUMA node level wake_affine()") Signed-off-by: Ingo Molnar include/linux/sched/topology.h | 8 --- kernel/sched/fair.c | 126 +++++------------------------------------ kernel/sched/features.h | 1 + 3 files changed, 16 insertions(+), 119 deletions(-) commit e6a5203399d19871021c1fa0eb2a08fc63b67e91 Author: leilei.lin Date: Fri Sep 29 13:54:44 2017 +0800 perf/core: Fix cgroup time when scheduling descendants Update cgroup time when an event is scheduled in by descendants. Reviewed-and-tested-by: Jiri Olsa Signed-off-by: leilei.lin Signed-off-by: Peter Zijlstra (Intel) Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: brendan.d.gregg@gmail.com Cc: yang_oliver@hotmail.com Link: http://lkml.kernel.org/r/CALPjY3mkHiekRkRECzMi9G-bjUQOvOjVBAqxmWkTzc-g+0LwMg@mail.gmail.com Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df0062b27ebf473b372914a3e3574d93790e2b72 Author: Will Deacon Date: Tue Oct 3 15:20:50 2017 +0100 perf/core: Avoid freeing static PMU contexts when PMU is unregistered Since commit: 1fd7e4169954 ("perf/core: Remove perf_cpu_context::unique_pmu") ... when a PMU is unregistered then its associated ->pmu_cpu_context is unconditionally freed. Whilst this is fine for dynamically allocated context types (i.e. those registered using perf_invalid_context), this causes a problem for sharing of static contexts such as perf_{sw,hw}_context, which are used by multiple built-in PMUs and effectively have a global lifetime. Whilst testing the ARM SPE driver, which must use perf_sw_context to support per-task AUX tracing, unregistering the driver as a result of a module unload resulted in: Unable to handle kernel NULL pointer dereference at virtual address 00000038 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: [last unloaded: arm_spe_pmu] PC is at ctx_resched+0x38/0xe8 LR is at perf_event_exec+0x20c/0x278 [...] ctx_resched+0x38/0xe8 perf_event_exec+0x20c/0x278 setup_new_exec+0x88/0x118 load_elf_binary+0x26c/0x109c search_binary_handler+0x90/0x298 do_execveat_common.isra.14+0x540/0x618 SyS_execve+0x38/0x48 since the software context has been freed and the ctx.pmu->pmu_disable_count field has been set to NULL. This patch fixes the problem by avoiding the freeing of static PMU contexts altogether. Whilst the sharing of dynamic contexts is questionable, this actually requires the caller to share their context pointer explicitly and so the burden is on them to manage the object lifetime. Reported-by: Kim Phillips Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 1fd7e4169954 ("perf/core: Remove perf_cpu_context::unique_pmu") Link: http://lkml.kernel.org/r/1507040450-7730-1-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar kernel/events/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c7e2f69d3ed2e56de1f5eaaf37c0f5f91d7adb0a Author: Peter Zijlstra Date: Wed Oct 4 10:50:25 2017 +0200 locking/selftest: Avoid false BUG report The work-around for the expected failure is providing another failure :/ Only when CONFIG_PROVE_LOCKING=y do we increment unexpected_testcase_failures, so only then do we need to decrement, otherwise we'll end up with a negative number and that will again trigger a BUG (printout, not crash). Reported-by: Fengguang Wu Tested-by: Fengguang Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d82fed752942 ("locking/lockdep/selftests: Fix mixed read-write ABBA tests") Signed-off-by: Ingo Molnar lib/locking-selftest.c | 2 ++ 1 file changed, 2 insertions(+) commit 8b405d5c5d0996d3d16f70c42744a0500f5b6ec3 Author: Peter Zijlstra Date: Wed Oct 4 11:13:37 2017 +0200 locking/lockdep: Fix stacktrace mess There is some complication between check_prevs_add() and check_prev_add() wrt. saving stack traces. The problem is that we want to be frugal with saving stack traces, since it consumes static resources. We'll only know in check_prev_add() if we need the trace, but we can call into it multiple times. So we want to do on-demand and re-use. A further complication is that check_prev_add() can drop graph_lock and mess with our static resources. In any case, the current state; after commit: ce07a9415f26 ("locking/lockdep: Make check_prev_add() able to handle external stack_trace") is that we'll assume the trace contains valid data once check_prev_add() returns '2'. However, as noted by Josh, this is false, check_prev_add() can return '2' before having saved a trace, this then result in the possibility of using uninitialized data. Testing, as reported by Wu, shows a NULL deref. So simplify. Since the graph_lock() thing is a debug path that hasn't really been used in a long while, take it out back and avoid the head-ache. Further initialize the stack_trace to a known 'empty' state; as long as nr_entries == 0, nothing should deref entries. We can then use the 'entries == NULL' test for a valid trace / on-demand saving. Analyzed-by: Josh Poimboeuf Reported-by: Fengguang Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ce07a9415f26 ("locking/lockdep: Make check_prev_add() able to handle external stack_trace") Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 48 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) commit eb701ce16a45ed9880897c48f05ee608d77c72e3 Author: Adrian Hunter Date: Mon Oct 9 10:24:01 2017 +0300 mmc: sdhci-pci: Fix default d3_retune for Intel host controllers The default for d3_retune is true, but that was not being set in all cases, which results in eMMC errors because re-tuning has not been done. Fix by initializing d3_retune to true. Signed-off-by: Adrian Hunter Fixes: c959a6b00ff5 ("mmc: sdhci-pci: Don't re-tune with runtime pm for some Intel devices") Cc: stable@vger.kernel.org # v4.12+ Reported-and-tested-by: ojab Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 2 ++ 1 file changed, 2 insertions(+) commit e36a82ee4c514a2f4f8fa30c780ad059282f5d64 Author: Kamalesh Babulal Date: Wed Sep 20 15:49:51 2017 +0530 powerpc/livepatch: Fix livepatch stack access While running stress test with livepatch module loaded, kernel bug was triggered. cpu 0x5: Vector: 400 (Instruction Access) at [c0000000eb9d3b60] 5:mon> t [c0000000eb9d3de0] c0000000eb9d3e30 (unreliable) [c0000000eb9d3e30] c000000000008ab4 hardware_interrupt_common+0x114/0x120 --- Exception: 501 (Hardware Interrupt) at c000000000053040 livepatch_handler+0x4c/0x74 [c0000000eb9d4120] 0000000057ac6e9d (unreliable) [d0000000089d9f78] 2e0965747962382e SP (965747962342e09) is in userspace When an interrupt occurs during the livepatch_handler execution, it's possible for the livepatch_stack and/or thread_info to be corrupted. eg: Task A Interrupt Handler ========= ================= livepatch_handler: mr r0, r1 ld r1, TI_livepatch_sp(r12) hardware_interrupt_common: do_IRQ+0x8: mflr r0 <- saved stack pointer is overwritten bl _mcount ... std r27,-40(r1) <- overwrite of thread_info() lis r2, STACK_END_MAGIC@h ori r2, r2, STACK_END_MAGIC@l ld r12, -8(r1) Fix the corruption by using r11 register for livepatch stack manipulation, instead of shuffling task stack and livepatch stack into r1 register. Using r11 register also avoids disabling/enabling irq's while setting up the livepatch stack. Signed-off-by: Kamalesh Babulal Reviewed-by: Naveen N. Rao Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 45 +++++++++----------------- 1 file changed, 15 insertions(+), 30 deletions(-) commit fbb1fb4ad415cb31ce944f65a5ca700aaf73a227 Author: Eric Dumazet Date: Sun Oct 8 21:44:52 2017 -0700 net: defer call to cgroup_sk_alloc() sk_clone_lock() might run while TCP/DCCP listener already vanished. In order to prevent use after free, it is better to defer cgroup_sk_alloc() to the point we know both parent and child exist, and from process context. Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets") Signed-off-by: Eric Dumazet Cc: Johannes Weiner Cc: Tejun Heo Signed-off-by: David S. Miller kernel/cgroup/cgroup.c | 11 ----------- net/core/sock.c | 3 +-- net/ipv4/inet_connection_sock.c | 5 +++++ 3 files changed, 6 insertions(+), 13 deletions(-) commit 9f1c2674b328a69ab5a9b5a1c52405795ee4163f Author: Eric Dumazet Date: Sun Oct 8 21:44:51 2017 -0700 net: memcontrol: defer call to mem_cgroup_sk_alloc() Instead of calling mem_cgroup_sk_alloc() from BH context, it is better to call it from inet_csk_accept() in process context. Not only this removes code in mem_cgroup_sk_alloc(), but it also fixes a bug since listener might have been dismantled and css_get() might cause a use-after-free. Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets") Signed-off-by: Eric Dumazet Cc: Johannes Weiner Cc: Tejun Heo Signed-off-by: David S. Miller mm/memcontrol.c | 15 --------------- net/core/sock.c | 5 ++++- net/ipv4/inet_connection_sock.c | 1 + 3 files changed, 5 insertions(+), 16 deletions(-) commit 2b30297d481ad305134252557768c22391e0fed6 Author: Andrew Duggan Date: Mon Oct 9 20:51:05 2017 -0700 Input: synaptics - disable kernel tracking on SMBus devices In certain situations kernel tracking seems to be getting confused and incorrectly reporting the slot of a contact. On example is when the user does a three finger click or tap and then places two fingers on the touchpad in the same area. The kernel tracking code seems to continue to think that there are three contacts on the touchpad and incorrectly alternates the slot of one of the contacts. The result that is the input subsystem reports a stream of button press and release events as the reported slot changes. Kernel tracking was originally enabled to prevent cursor jumps, but it is unclear how much of an issue kernel jumps actually are. This patch simply disabled kernel tracking for now. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1482640 Signed-off-by: Andrew Duggan Tested-by: Kamil Páral Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5ab894aee0f171a682bcd90dd5d1930cb53c55dc Author: Jarkko Nikula Date: Mon Oct 9 16:28:37 2017 +0300 device property: Track owner device of device property Deletion of subdevice will remove device properties associated to parent when they share the same firmware node after commit 478573c93abd (driver core: Don't leak secondary fwnode on device removal). This was observed with a driver adding subdevice that driver wasn't able to read device properties after rmmod/modprobe cycle. Consider the lifecycle of it: parent device registration ACPI_COMPANION_SET() device_add_properties() pset_copy_set() set_secondary_fwnode(dev, &p->fwnode) device_add() parent probe read device properties ACPI_COMPANION_SET(subdevice, ACPI_COMPANION(parent)) device_add(subdevice) parent remove device_del(subdevice) device_remove_properties() set_secondary_fwnode(dev, NULL); pset_free() Parent device will have its primary firmware node pointing to an ACPI node and secondary firmware node point to device properties. ACPI_COMPANION_SET() call in parent probe will set the subdevice's firmware node to point to the same 'struct fwnode_handle' and the associated secondary firmware node, i.e. the device properties as the parent. When subdevice is deleted in parent remove that will remove those device properties and attempt to read device properties in next parent probe call will fail. Fix this by tracking the owner device of device properties and delete them only when owner device is being deleted. Fixes: 478573c93abd (driver core: Don't leak secondary fwnode on device removal) Cc: 4.9+ # 4.9+ Signed-off-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 529a86e063e9ff625c4ff247d8aa17d8072444fb Merge: ff33952 044215d Author: Linus Torvalds Date: Mon Oct 9 19:08:32 2017 -0700 Merge branch 'ppc-bundle' (bundle from Michael Ellerman) Merge powerpc transactional memory fixes from Michael Ellerman: "I figured I'd still send you the commits using a bundle to make sure it works in case I need to do it again in future" This fixes transactional memory state restore for powerpc. * bundle'd patches from Michael Ellerman: powerpc/tm: Fix illegal TM state in signal handler powerpc/64s: Use emergency stack for kernel TM Bad Thing program checks commit 96ca579a1ecc943b75beba58bebb0356f6cc4b51 Author: Kees Cook Date: Mon Oct 9 11:36:52 2017 -0700 waitid(): Add missing access_ok() checks Adds missing access_ok() checks. CVE-2017-5123 Reported-by: Chris Salls Signed-off-by: Kees Cook Acked-by: Al Viro Fixes: 4c48abe91be0 ("waitid(): switch copyout of siginfo to unsafe_put_user()") Cc: stable@kernel.org # 4.13 Signed-off-by: Linus Torvalds kernel/exit.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ff33952e4d235efa98ce8a43416c19ddc16fb4fa Merge: 68ebe3c fdfbad3 Author: Linus Torvalds Date: Mon Oct 9 16:25:00 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix object leak on IPSEC offload failure, from Steffen Klassert. 2) Fix range checks in ipset address range addition operations, from Jozsef Kadlecsik. 3) Fix pernet ops unregistration order in ipset, from Florian Westphal. 4) Add missing netlink attribute policy for nl80211 packet pattern attrs, from Peng Xu. 5) Fix PPP device destruction race, from Guillaume Nault. 6) Write marks get lost when BPF verifier processes R1=R2 register assignments, causing incorrect liveness information and less state pruning. Fix from Alexei Starovoitov. 7) Fix blockhole routes so that they are marked dead and therefore not cached in sockets, otherwise IPSEC stops working. From Steffen Klassert. 8) Fix broadcast handling of UDP socket early demux, from Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (37 commits) cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan net: thunderx: mark expected switch fall-throughs in nicvf_main() udp: fix bcast packet reception netlink: do not set cb_running if dump's start() errs ipv4: Fix traffic triggered IPsec connections. ipv6: Fix traffic triggered IPsec connections. ixgbe: incorrect XDP ring accounting in ethtool tx_frame param net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Revert commit 1a8b6d76dc5b ("net:add one common config...") ixgbe: fix masking of bits read from IXGBE_VXLANCTRL register ixgbe: Return error when getting PHY address if PHY access is not supported netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1' netfilter: SYNPROXY: skip non-tcp packet in {ipv4, ipv6}_synproxy_hook tipc: Unclone message at secondary destination lookup tipc: correct initialization of skb list gso: fix payload length when gso_size is zero mlxsw: spectrum_router: Avoid expensive lookup during route removal bpf: fix liveness marking doc: Fix typo "8023.ad" in bonding documentation ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real ... commit fdfbad3256918fc5736d68384331d2dbf45ccbd6 Author: Aleksander Morgado Date: Mon Oct 9 14:05:12 2017 +0200 cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan The u-blox TOBY-L2 is a LTE Cat 4 module with HSPA+ and 2G fallback. This module allows switching to different USB profiles with the 'AT+UUSBCONF' command, and provides a ECM network interface when the 'AT+UUSBCONF=2' profile is selected. The u-blox SARA-U2 is a HSPA module with 2G fallback. The default USB configuration includes a ECM network interface. Both these modules are controlled via AT commands through one of the TTYs exposed. Connecting these modules may be done just by activating the desired PDP context with 'AT+CGACT=1,' and then running DHCP on the ECM interface. Signed-off-by: Aleksander Morgado Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit aa7b4e02b328f0589b6133e72aafb1289f614a79 Author: Arnaldo Carvalho de Melo Date: Mon Oct 9 15:55:45 2017 -0300 tools include uapi bpf.h: Sync kernel ABI header with tooling header Silences the checker: Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' The 90caccdd8cc0 ("bpf: fix bpf_tail_call() x64 JIT") cset only updated a comment in uapi/bpf.h. Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: David Ahern Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-rwx2cqbf0x1lwa1krsr6e6hd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66ec11919a0f96e936bb731fdbc2851316077d26 Author: Mark Rutland Date: Fri Oct 6 19:38:22 2017 +0100 perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU Currently, perf record is broken on arm/arm64 systems when the PMU is specified explicitly as part of the event, e.g. $ ./perf record -e armv8_cortex_a53/cpu_cycles/u true In such cases, perf record fails to open events unless perf_event_paranoid is set to -1, even if the PMU in question supports mode exclusion. Further, even when perf_event_paranoid is toggled, no samples are recorded. This is an unintended side effect of commit: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring) ... which assumes that if a PMU has an associated cpu_map, it is an uncore PMU, and forces events for such PMUs to be system-wide. This is not true for arm/arm64 systems, which can have heterogeneous CPUs. To account for this, multiple CPU PMUs are exposed, each with a "cpus" field under sysfs, which the perf tool parses into a cpu_map. ARM PMUs do not have a "cpumask" file, and only have a "cpus" file. For the gory details as to why, see commit: 7e3fcffe95544010 ("perf pmu: Support alternative sysfs cpumask") Given all of this, we can instead identify uncore PMUs by explicitly checking for a "cpumask" file, and restore arm/arm64 PMU support back to a working state. This patch does so, adding a new perf_pmu::is_uncore field, and splitting the existing cpumask parsing so that it can be reused. Signed-off-by: Mark Rutland Tested-by Will Deacon Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: 4.12+ Fixes: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring) Link: http://lkml.kernel.org/r/1507315102-5942-1-git-send-email-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 9 ++++--- tools/perf/util/pmu.c | 56 +++++++++++++++++++++++++++++++----------- tools/perf/util/pmu.h | 1 + 3 files changed, 47 insertions(+), 19 deletions(-) commit 639812a1ed9bf49ae2c026086fbf975339cd1eef Author: Josef Bacik Date: Mon Oct 9 13:12:10 2017 -0400 nbd: don't set the device size until we're connected A user reported a regression with using the normal ioctl interface on newer kernels. This happens because I was setting the device size before the device was actually connected, which caused us to error out and close everything down. This didn't happen on netlink because we hold the device lock the whole time we're setting things up, but we don't do that for the ioctl path. This fixes the problem. Cc: stable@vger.kernel.org Fixes: 29eaadc ("nbd: stop using the bdev everywhere") Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a528629dfd3b87f206ac0e5637f7e7f958143ab8 Author: Vineet Gupta Date: Fri Oct 6 16:44:27 2017 -0700 ARC: [plat-hsdk] select CONFIG_RESET_HSDK from Kconfig Signed-off-by: Vineet Gupta arch/arc/configs/hsdk_defconfig | 1 - arch/arc/plat-hsdk/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 68ebe3cbe786a954481d6ded0dc83f7d551640bf Merge: 8a5776a e8fa33a Author: Linus Torvalds Date: Mon Oct 9 10:55:37 2017 -0700 Merge tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Hightlights include: stable fixes: - nfs/filelayout: fix oops when freeing filelayout segment - NFS: Fix uninitialized rpc_wait_queue bugfixes: - NFSv4/pnfs: Fix an infinite layoutget loop - nfs: RPC_MAX_AUTH_SIZE is in bytes" * tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4/pnfs: Fix an infinite layoutget loop nfs/filelayout: fix oops when freeing filelayout segment sunrpc: remove redundant initialization of sock NFS: Fix uninitialized rpc_wait_queue NFS: Cleanup error handling in nfs_idmap_request_key() nfs: RPC_MAX_AUTH_SIZE is in bytes commit 1a2ace56cea2d752b212e198c5e70ff0c0f39b59 Author: Gustavo A. R. Silva Date: Mon Oct 9 11:44:53 2017 -0500 net: thunderx: mark expected switch fall-throughs in nicvf_main() In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Cc: Sunil Goutham Cc: Robert Richter Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 ++ 1 file changed, 2 insertions(+) commit fb60bccc06565ba24ed30a0ad3e9eddd5b74cdba Merge: 5766cd6 98589a0 Author: David S. Miller Date: Mon Oct 9 10:39:52 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) Fix packet drops due to incorrect ECN handling in IPVS, from Vadim Fedorenko. 2) Fix splat with mark restoration in xt_socket with non-full-sock, patch from Subash Abhinov Kasiviswanathan. 3) ipset bogusly bails out when adding IPv4 range containing more than 2^31 addresses, from Jozsef Kadlecsik. 4) Incorrect pernet unregistration order in ipset, from Florian Westphal. 5) Races between dump and swap in ipset results in BUG_ON splats, from Ross Lagerwall. 6) Fix chain renames in nf_tables, from JingPiao Chen. 7) Fix race in pernet codepath with ebtables table registration, from Artem Savkov. 8) Memory leak in error path in set name allocation in nf_tables, patch from Arvind Yadav. 9) Don't dump chain counters if they are not available, this fixes a crash when listing the ruleset. 10) Fix out of bound memory read in strlcpy() in x_tables compat code, from Eric Dumazet. 11) Make sure we only process TCP packets in SYNPROXY hooks, patch from Lin Zhang. 12) Cannot load rules incrementally anymore after xt_bpf with pinned objects, added in revision 1. From Shmulik Ladkani. ==================== Signed-off-by: David S. Miller commit 5766cd68f6790de29c1e624008dc5ff0da111f9a Merge: 996b44f 8e67902 Author: David S. Miller Date: Mon Oct 9 10:36:25 2017 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2017-10-09 This series contains updates to ixgbe and arch/Kconfig. Mark fixes a case where PHY register access is not supported and we were returning a PHY address, when we should have been returning -EOPNOTSUPP. Sabrina Dubroca fixes the use of a logical "and" when it should have been the bitwise "and" operator. Ding Tianhong reverts the commit that added the Kconfig bool option ARCH_WANT_RELAX_ORDER, since there is now a new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING that has been added to indicate that Relaxed Ordering Attributes should not be used for Transaction Layer Packets. Then follows up with making the needed changes to ixgbe to use the new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag. John Fastabend fixes an issue in the ring accounting when the transmit ring parameters are changed via ethtool when an XDP program is attached. ==================== Signed-off-by: David S. Miller commit 7b50f7b24cd6c98541f1af53bddc5b6e861ee8c8 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 (cherry picked from commit e30a154b5262b967b133b06ac40777e651045898) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit b85577b72837ee8d9213e93d2c8b67ef78a47803 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 (cherry picked from commit 8d550824c6f52506754f11cb6be51aa153cc580d) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit de3ded0ae677749b4fc9f59d15b26b9f077340ac 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 (cherry picked from commit 320671f94ada80ff036cc9d5dcd730ba4f3e0f1a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6a55c63e6adcb58957bbdce2d390088970273da 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+ (cherry picked from commit 0c3767b28186c8129f2a2cfec06a93dcd6102391) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_color.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7313f5a93d2017f789909a7a727a6cab48ea6d20 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 (cherry picked from commit c02b8fb4073d1b9aa5af909a91b51056b819d946) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7ba25bd9ef802ff02414e9105f4222d1795f27a 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 (cherry picked from commit cbacf02e7796fea02e5c6e46c90ed7cbe9e6f2c0) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 996b44fcef8f216ea0b6b6e74468c5a77b5e341f Author: Paolo Abeni Date: Mon Oct 9 14:52:10 2017 +0200 udp: fix bcast packet reception The commit bc044e8db796 ("udp: perform source validation for mcast early demux") does not take into account that broadcast packets lands in the same code path and they need different checks for the source address - notably, zero source address are valid for bcast and invalid for mcast. As a result, 2nd and later broadcast packets with 0 source address landing to the same socket are dropped. This breaks dhcp servers. Since we don't have stringent performance requirements for ingress broadcast traffic, fix it by disabling UDP early demux such traffic. Reported-by: Hannes Frederic Sowa Fixes: bc044e8db796 ("udp: perform source validation for mcast early demux") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 41c87425a1ac9b633e0fcc78eb1f19640c8fb5a0 Author: Jason A. Donenfeld Date: Mon Oct 9 14:14:51 2017 +0200 netlink: do not set cb_running if dump's start() errs It turns out that multiple places can call netlink_dump(), which means it's still possible to dereference partially initialized values in dump() that were the result of a faulty returned start(). This fixes the issue by calling start() _before_ setting cb_running to true, so that there's no chance at all of hitting the dump() function through any indirect paths. It also moves the call to start() to be when the mutex is held. This has the nice side effect of serializing invocations to start(), which is likely desirable anyway. It also prevents any possible other races that might come out of this logic. In testing this with several different pieces of tricky code to trigger these issues, this commit fixes all avenues that I'm aware of. Signed-off-by: Jason A. Donenfeld Cc: Johannes Berg Reviewed-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6df4d17c442f39137026bce387b0100eef8a25ba Merge: 93b0319 ad67023 Author: David S. Miller Date: Mon Oct 9 09:52:55 2017 -0700 Merge tag 'mac80211-for-davem-2017-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== pull-request: mac80211 2017-10-09 The QCA folks found another netlink problem - we were missing validation of some attributes. It's not super problematic since one can only read a few bytes beyond the message (and that memory must exist), but here's the fix for it. I thought perhaps we can make nla_parse_nested() require a policy, but given the two-stage validation/parsing in regular netlink that won't work. Please pull and let me know if there's any problem. ==================== Signed-off-by: David S. Miller commit 93b03193c6a579dbe5e19139d1ab47b70dbeeebd Merge: 6c0e728 dd269db Author: David S. Miller Date: Mon Oct 9 09:43:34 2017 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-10-09 1) Fix some error paths of the IPsec offloading API. 2) Fix a NULL pointer dereference when IPsec is used with vti. From Alexey Kodanev. 3) Don't call xfrm_policy_cache_flush under xfrm_state_lock, it triggers several locking warnings. From Artem Savkov. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 6c0e7284d89995877740d8a26c3e99a937312a3c Author: Steffen Klassert Date: Mon Oct 9 08:43:55 2017 +0200 ipv4: Fix traffic triggered IPsec connections. A recent patch removed the dst_free() on the allocated dst_entry in ipv4_blackhole_route(). The dst_free() marked the dst_entry as dead and added it to the gc list. I.e. it was setup for a one time usage. As a result we may now have a blackhole route cached at a socket on some IPsec scenarios. This makes the connection unusable. Fix this by marking the dst_entry directly at allocation time as 'dead', so it is used only once. Fixes: b838d5e1c5b6 ("ipv4: mark DST_NOGC and remove the operation of dst_free()") Reported-by: Tobias Brunner Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62cf27e52b8c9a39066172ca6b6134cb5eaa9450 Author: Steffen Klassert Date: Mon Oct 9 08:39:43 2017 +0200 ipv6: Fix traffic triggered IPsec connections. A recent patch removed the dst_free() on the allocated dst_entry in ipv6_blackhole_route(). The dst_free() marked the dst_entry as dead and added it to the gc list. I.e. it was setup for a one time usage. As a result we may now have a blackhole route cached at a socket on some IPsec scenarios. This makes the connection unusable. Fix this by marking the dst_entry directly at allocation time as 'dead', so it is used only once. Fixes: 587fea741134 ("ipv6: mark DST_NOGC and remove the operation of dst_free()") Reported-by: Tobias Brunner Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7974880cf869ddbd0ba9a8e2ab11dff4a667f96 Author: John Einar Reitan Date: Mon Oct 9 15:49:36 2017 +0200 sync_file: Return consistent status in SYNC_IOC_FILE_INFO sync_file_ioctl_fence_info has a race between filling the status of the underlying fences and the overall status of the sync_file. If fence transitions in the time frame between its sync_fill_fence_info and the later dma_fence_is_signaled for the sync_file, the returned information is inconsistent showing non-signaled underlying fences but an overall signaled state. This patch changes sync_file_ioctl_fence_info to track what has been encoded and using that as the overall sync_file status. Tested-by: Vamsidhar Reddy Gaddam Signed-off-by: John Einar Reitan Cc: Sumit Semwal Cc: Gustavo Padovan Cc: dri-devel@lists.freedesktop.org Reviewed-by: Chris Wilson Signed-off-by: Gustavo Padovan Link: https://patchwork.freedesktop.org/patch/msgid/20171009134936.27219-1-john.reitan@arm.com drivers/dma-buf/sync_file.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 8e679021c5b9465ac5b0d7efd26baab9b10a2dbd Author: John Fastabend Date: Thu Sep 7 10:32:48 2017 -0700 ixgbe: incorrect XDP ring accounting in ethtool tx_frame param Changing the TX ring parameters with an XDP program attached may cause the XDP queues to be cleared and the TX rings to be incorrectly configured. Fix by doing correct ring accounting in setup call. Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action") Signed-off-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5e0fac63a694918870af9d6eaf716af19e7f5652 Author: Ding Tianhong Date: Fri Aug 18 14:21:05 2017 +0800 net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag The ixgbe driver use the compile check to determine if it can send TLPs to Root Port with the Relaxed Ordering Attribute set, this is too inconvenient, now the new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to the kernel and we could check the bit4 in the PCIe Device Control register to determine whether we should use the Relaxed Ordering Attributes or not, so use this new way in the ixgbe driver. Signed-off-by: Ding Tianhong Acked-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 22 ---------------------- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 ------------------- 2 files changed, 41 deletions(-) commit f4986d250ada29ae0c65c209a9d8f97968ea7eae Author: Ding Tianhong Date: Fri Aug 18 14:21:04 2017 +0800 Revert commit 1a8b6d76dc5b ("net:add one common config...") The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to indicate that Relaxed Ordering Attributes (RO) should not be used for Transaction Layer Packets (TLP) targeted toward these affected Root Port, it will clear the bit4 in the PCIe Device Control register, so the PCIe device drivers could query PCIe configuration space to determine if it can send TLPs to Root Port with the Relaxed Ordering Attributes set. With this new flag we don't need the config ARCH_WANT_RELAX_ORDER to control the Relaxed Ordering Attributes for the ixgbe drivers just like the commit 1a8b6d76dc5b ("net:add one common config...") did, so revert this commit. Signed-off-by: Ding Tianhong Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher arch/Kconfig | 3 --- arch/sparc/Kconfig | 1 - drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) commit a39221ce969b316d3c3dcf7fcff8c0d8cf223007 Author: Sabrina Dubroca Date: Mon Jul 3 13:02:55 2017 +0200 ixgbe: fix masking of bits read from IXGBE_VXLANCTRL register In ixgbe_clear_udp_tunnel_port(), we read the IXGBE_VXLANCTRL register and then try to mask some bits out of the value, using the logical instead of bitwise and operator. Fixes: a21d0822ff69 ("ixgbe: add support for geneve Rx offload") Signed-off-by: Sabrina Dubroca 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 e0f06bba9629987fb3ec1d6928bf17ef689702e8 Author: Mark D Rustad Date: Wed Aug 31 10:34:28 2016 -0700 ixgbe: Return error when getting PHY address if PHY access is not supported In cases where PHY register access is not supported, don't mislead a caller into thinking that it is supported by returning a PHY address. Instead, return -EOPNOTSUPP when PHY access is not supported. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit ca8eb05b5f332a9e1ab3e2ece498d49f4d683470 Author: Paul Burton Date: Fri Sep 8 15:12:21 2017 -0700 MIPS: math-emu: Remove pr_err() calls from fpu_emu() The FPU emulator includes 2 calls to pr_err() which are triggered by invalid instruction encodings for MIPSr6 cmp.cond.fmt instructions. These cases are not kernel errors, merely invalid instructions which are already handled by delivering a SIGILL which will provide notification that something failed in cases where that makes sense. In cases where that SIGILL is somewhat expected & being handled, for example when crashme happens to generate one of the affected bad encodings, the message is printed with no useful context about what triggered it & spams the kernel log for no good reason. Remove the pr_err() calls to make crashme run silently & treat the bad encodings the same way we do others, with a SIGILL & no further kernel log output. Signed-off-by: Paul Burton Fixes: f8c3c6717a71 ("MIPS: math-emu: Add support for the CMP.condn.fmt R6 instruction") Cc: linux-mips@linux-mips.org Cc: stable # v4.3+ Patchwork: https://patchwork.linux-mips.org/patch/17253/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 2 -- 1 file changed, 2 deletions(-) commit e1270575fb7ee7ed6058d4ad3714a3b28001a295 Author: Paul Burton Date: Sun Sep 3 10:24:58 2017 -0700 MIPS: Fix generic-board-config.sh for builds using O= When configuring the kernel using one of the generic MIPS defconfig targets, the generic-board-config.sh script is used to check requirements listed in board config fragments against a reference config in order to determine which board config fragments to merge into the final config. When specifying O= to configure in a directory other than the kernel source directory, this generic-board-config.sh script is invoked in the directory that we are configuring in (ie. the directory that O equals), and the path to the reference config is relative to the current directory. The script then changes the current directory to the source tree, which unfortunately breaks later access to the reference file since its path is relative to a directory that is no longer the current working directory. This results in configuration failing with errors such as: $ make ARCH=mips O=tmp 32r2_defconfig make[1]: Entering directory '/home/pburton/src/linux/tmp' Using ../arch/mips/configs/generic_defconfig as base Merging ../arch/mips/configs/generic/32r2.config Merging ../arch/mips/configs/generic/eb.config grep: ./.config.32r2_defconfig: No such file or directory grep: ./.config.32r2_defconfig: No such file or directory The base file '.config' does not exist. Exit. make[1]: *** [arch/mips/Makefile:505: 32r2_defconfig] Error 1 make[1]: Leaving directory '/home/pburton/src/linux-ingenic/tmp' make: *** [Makefile:145: sub-make] Error 2 Fix this by avoiding changing the working directory in generic-board-config.sh, instead using full paths to files under $(srctree)/ where necessary. Signed-off-by: Paul Burton Fixes: 27e0d4b05107 ("MIPS: generic: Allow filtering enabled boards by requirements") Cc: linux-mips@linux-mips.org Cc: kbuild test robot Cc: kbuild-all@01.org Patchwork: https://patchwork.linux-mips.org/patch/17231/ Signed-off-by: Ralf Baechle arch/mips/tools/generic-board-config.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a6127b4440d1f74f26b64006b2f50c9dc6d66efc Merge: c503dd3 44fd09d Author: Kalle Valo Date: Mon Oct 9 17:31:39 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-10-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Second set of iwlwifi fixes for 4.14 * Fix support for 3168 device series; * Fix a potential crash when using FW debugging recording; * Improve channel flags parsing to avoid warnings on too long traces; * Return -ENODATA when the temperature is not available, since the -EIO we were returning was causing fatal errors in userspace; * Avoid printing too many messages in dmesg when using monitor mode, since this can become very noisy and completely flood the logs; commit 133d68e0ed4d822ccfa276ff7d2d1753477de1a8 Author: Paul Burton Date: Fri Sep 1 14:46:50 2017 -0700 MIPS: Fix cmpxchg on 32b signed ints for 64b kernel with !kernel_uses_llsc Commit 8263db4d7768 ("MIPS: cmpxchg: Implement __cmpxchg() as a function") refactored our implementation of __cmpxchg() to be a function rather than a macro, with the aim of making it easier to read & modify. Unfortunately the commit breaks use of cmpxchg() for signed 32 bit values when we have a 64 bit kernel with kernel_uses_llsc == false, because: - In cmpxchg_local() we cast the old value to the type the pointer points to, and then to an unsigned long. If the pointer points to a signed type smaller than 64 bits then the old value will be sign extended to 64 bits. That is, bits beyond the size of the pointed to type will be set to 1 if the old value is negative. In the case of a signed 32 bit integer with a negative value, bits 63:32 will all be set. - In __cmpxchg_asm() we load the value from memory, ie. dereference the pointer, and store the value as an unsigned integer (__ret) whose size matches the pointer. For a 32 bit cmpxchg() this means we store the value in a u32, because the pointer provided to __cmpxchg_asm() by __cmpxchg() is of type volatile u32 *. - __cmpxchg_asm() then checks whether the value in memory (__ret) matches the provided old value, by comparing the two values. This results in the u32 being promoted to a 64 bit unsigned long to match the old argument - however because both types are unsigned the value is zero extended, which does not match the sign extension performed on the old value in cmpxchg_local() earlier. This mismatch means that unfortunate cmpxchg() calls can incorrectly fail for 64 bit kernels with kernel_uses_llsc == false. This is the case on at least non-SMP Cavium Octeon kernels, which hardcode kernel_uses_llsc in their cpu-feature-overrides.h header. Using a v4.13-rc7 kernel configured using cavium_octeon_defconfig with SMP manually disabled, this presents itself as oddity when we reach userland - for example: can't run '/bin/mount': Text file busy can't run '/bin/mkdir': Text file busy can't run '/bin/mkdir': Text file busy can't run '/bin/mount': Text file busy can't run '/bin/hostname': Text file busy can't run '/etc/init.d/rcS': Text file busy can't run '/sbin/getty': Text file busy can't run '/sbin/getty': Text file busy It appears that some part of the init process, which is in this case buildroot's busybox init, is running successfully. It never manages to reach the login prompt though, and complains about /sbin/getty being busy repeatedly and indefinitely. Fix this by casting the old value provided to __cmpxchg_asm() to an appropriately sized unsigned integer, such that we consistently zero-extend avoiding the mismatch. The __cmpxchg_small() case for 8 & 16 bit values is unaffected because __cmpxchg_small() already masks provided values appropriately. Signed-off-by: Paul Burton Fixes: 8263db4d7768 ("MIPS: cmpxchg: Implement __cmpxchg() as a function") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17226/ Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle arch/mips/include/asm/cmpxchg.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 09aa97c78a784df2f781ff03b57b7dd6f1339edc Author: Himanshu Jha Date: Mon Oct 9 03:00:28 2017 +0530 skd: Use kmem_cache_free Use kmem_cache_free instead of kfree for freeing the memory previously allocated with kmem_cache_zalloc/kmem_cache_alloc/kmem_cache_node. Signed-off-by: Himanshu Jha Signed-off-by: Jens Axboe drivers/block/skd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c95072b3d88fac4be295815f2b67df366c0c297f Author: Takashi Iwai Date: Mon Oct 9 14:51:23 2017 +0200 ALSA: line6: Fix leftover URB at error-path during probe While line6_probe() may kick off URB for a control MIDI endpoint, the function doesn't clean up it properly at its error path. This results in a leftover URB action that is eventually triggered later and causes an Oops like: general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 0 Comm: swapper/1 Not tainted RIP: 0010:usb_fill_bulk_urb ./include/linux/usb.h:1619 RIP: 0010:line6_start_listen+0x3fe/0x9e0 sound/usb/line6/driver.c:76 Call Trace: line6_data_received+0x1f7/0x470 sound/usb/line6/driver.c:326 __usb_hcd_giveback_urb+0x2e0/0x650 drivers/usb/core/hcd.c:1779 usb_hcd_giveback_urb+0x337/0x420 drivers/usb/core/hcd.c:1845 dummy_timer+0xba9/0x39f0 drivers/usb/gadget/udc/dummy_hcd.c:1965 call_timer_fn+0x2a2/0x940 kernel/time/timer.c:1281 .... Since the whole clean-up procedure is done in line6_disconnect() callback, we can simply call it in the error path instead of open-coding the whole again. It'll fix such an issue automagically. The bug was spotted by syzkaller. Fixes: eedd0e95d355 ("ALSA: line6: Don't forget to call driver's destructor at error path") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 54a4b2b45817ea2365b40c923c098a26af0c0dbb Author: Takashi Iwai Date: Mon Oct 9 14:26:27 2017 +0200 ALSA: line6: Fix NULL dereference at podhd_disconnect() When podhd_init() failed with the acquiring a ctrl i/f, the line6 helper still calls the disconnect callback that eventually calls again usb_driver_release_interface() with the NULL intf. Put the proper NULL check before calling it for avoiding an Oops. Fixes: fc90172ba283 ("ALSA: line6: Claim pod x3 usb data interface") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb02ffc76a53b5ea751b79b8d4f4d180e5868475 Author: Takashi Iwai Date: Mon Oct 9 14:32:15 2017 +0200 ALSA: line6: Fix missing initialization before error path The error path in podhd_init() tries to clear the pending timer, while the timer object is initialized at the end of init sequence, thus it may hit the uninitialized object, as spotted 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: 1845 Comm: kworker/1: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: __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 del_timer_sync+0x12c/0x280 kernel/time/timer.c:1237 podhd_disconnect+0x8c/0x160 sound/usb/line6/podhd.c:299 line6_probe+0x844/0x1310 sound/usb/line6/driver.c:783 podhd_probe+0x64/0x70 sound/usb/line6/podhd.c:474 .... For addressing it, assure the initializations of timer and work by moving them to the beginning of podhd_init(). Fixes: 790869dacc3d ("ALSA: line6: Add support for POD X3") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 27d90f46f253ccc7c5447f6fa62505acb1c246fe Author: Eugen Hristev Date: Thu Jun 15 16:24:56 2017 +0300 ARM: dts: at91: sama5d2: add ADC hw trigger edge type Added ADTRG edge type property as interrupt edge type value Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Acked-by: Jonathan Cameron Signed-off-by: Nicolas Ferre arch/arm/boot/dts/sama5d2.dtsi | 1 + 1 file changed, 1 insertion(+) commit 84c70b2395c652fa0702f338ca4b7f992531ee00 Author: Eugen Hristev Date: Thu Jun 15 16:24:54 2017 +0300 ARM: dts: at91: sama5d2_xplained: enable ADTRG pin Enable pinctrl for ADTRG pin (PD31) for ADC hardware trigger support. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Acked-by: Jonathan Cameron Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d2_xplained.dts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 98589a0998b8b13c4a8fa1ccb0e62751a019faa5 Author: Shmulik Ladkani Date: Mon Oct 9 15:27:15 2017 +0300 netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1' Commit 2c16d6033264 ("netfilter: xt_bpf: support ebpf") introduced support for attaching an eBPF object by an fd, with the 'bpf_mt_check_v1' ABI expecting the '.fd' to be specified upon each IPT_SO_SET_REPLACE call. However this breaks subsequent iptables calls: # iptables -A INPUT -m bpf --object-pinned /sys/fs/bpf/xxx -j ACCEPT # iptables -A INPUT -s 5.6.7.8 -j ACCEPT iptables: Invalid argument. Run `dmesg' for more information. That's because iptables works by loading existing rules using IPT_SO_GET_ENTRIES to userspace, then issuing IPT_SO_SET_REPLACE with the replacement set. However, the loaded 'xt_bpf_info_v1' has an arbitrary '.fd' number (from the initial "iptables -m bpf" invocation) - so when 2nd invocation occurs, userspace passes a bogus fd number, which leads to 'bpf_mt_check_v1' to fail. One suggested solution [1] was to hack iptables userspace, to perform a "entries fixup" immediatley after IPT_SO_GET_ENTRIES, by opening a new, process-local fd per every 'xt_bpf_info_v1' entry seen. However, in [2] both Pablo Neira Ayuso and Willem de Bruijn suggested to depricate the xt_bpf_info_v1 ABI dealing with pinned ebpf objects. This fix changes the XT_BPF_MODE_FD_PINNED behavior to ignore the given '.fd' and instead perform an in-kernel lookup for the bpf object given the provided '.path'. It also defines an alias for the XT_BPF_MODE_FD_PINNED mode, named XT_BPF_MODE_PATH_PINNED, to better reflect the fact that the user is expected to provide the path of the pinned object. Existing XT_BPF_MODE_FD_ELF behavior (non-pinned fd mode) is preserved. References: [1] https://marc.info/?l=netfilter-devel&m=150564724607440&w=2 [2] https://marc.info/?l=netfilter-devel&m=150575727129880&w=2 Reported-by: Rafael Buchbinder Signed-off-by: Shmulik Ladkani Acked-by: Willem de Bruijn Acked-by: Daniel Borkmann Signed-off-by: Pablo Neira Ayuso include/linux/bpf.h | 5 +++++ include/uapi/linux/netfilter/xt_bpf.h | 1 + kernel/bpf/inode.c | 1 + net/netfilter/xt_bpf.c | 22 ++++++++++++++++++++-- 4 files changed, 27 insertions(+), 2 deletions(-) commit 1b6ad6df8b4fd723d8d98b670b0d7772402e4e34 Author: Kelvin Cheung Date: Fri Oct 6 21:13:18 2017 +0800 MIPS: loongson1: set default number of rx and tx queues for stmmac Set the default number of RX and TX queues due to the recent changes of stmmac driver. Otherwise the ethernet will crash once it starts. Signed-off-by: Kelvin Cheung Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17452/ Signed-off-by: Ralf Baechle arch/mips/loongson32/common/platform.c | 38 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 94c3390ab84a6b449accc7351ffda4a0c17bdb92 Author: Matt Redfearn Date: Wed Sep 27 09:14:58 2017 +0100 MIPS: bpf: Fix uninitialised target compiler error Compiling ebpf_jit.c with gcc 4.9 results in a (likely spurious) compiler warning, as gcc has detected that the variable "target" may be used uninitialised. Since -Werror is active, this is treated as an error and causes a kernel build failure whenever CONFIG_MIPS_EBPF_JIT is enabled. arch/mips/net/ebpf_jit.c: In function 'build_one_insn': arch/mips/net/ebpf_jit.c:1118:80: error: 'target' may be used uninitialized in this function [-Werror=maybe-uninitialized] emit_instr(ctx, j, target); ^ cc1: all warnings being treated as errors Fix this by initialising "target" to 0. If it really is used uninitialised this would result in a jump to 0 and a detectable run time failure. Signed-off-by: Matt Redfearn Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.") Cc: James Hogan Cc: David Daney Cc: David S. Miller Cc: Colin Ian King Cc: Daniel Borkmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: # v4.13+ Patchwork: https://patchwork.linux-mips.org/patch/17375/ Signed-off-by: Ralf Baechle arch/mips/net/ebpf_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78279127253a6c36ed8829eb2b7bc28ef48d9717 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+ (cherry picked from commit 6d281b1f79e194c02125da29ea77316810261ca8) drivers/gpu/drm/drm_atomic_helper.c | 1 + 1 file changed, 1 insertion(+) commit 5803b023881857db32ffefa0d269c90280a67ee0 Author: Takashi Iwai Date: Mon Oct 9 10:02:56 2017 +0200 ALSA: seq: Fix copy_from_user() call inside lock The event handler in the virmidi sequencer code takes a read-lock for the linked list traverse, while it's calling snd_seq_dump_var_event() in the loop. The latter function may expand the user-space data depending on the event type. It eventually invokes copy_from_user(), which might be a potential dead-lock. The sequencer core guarantees that the user-space data is passed only with atomic=0 argument, but snd_virmidi_dev_receive_event() ignores it and always takes read-lock(). For avoiding the problem above, this patch introduces rwsem for non-atomic case, while keeping rwlock for atomic case. Also while we're at it: the superfluous irq flags is dropped in snd_virmidi_input_open(). Reported-by: Jia-Ju Bai Cc: Signed-off-by: Takashi Iwai include/sound/seq_virmidi.h | 1 + sound/core/seq/seq_virmidi.c | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) commit c247487c0dd6fefff6ed0cbcbe66f037721755fb Author: Kai-Heng Feng Date: Fri Oct 6 02:04:06 2017 +0800 ALSA: usb-audio: Add sample rate quirk for Plantronics P610 Like other Plantronics devices, P610 does not support sample rate reading. Apply sample rate quirk to it. BugLink: https://bugs.launchpad.net/bugs/1719853 Signed-off-by: Kai-Heng Feng Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 6b32c126d33d5cb379bca280ab8acedc1ca978ff Author: Mathias Krause Date: Thu Oct 5 20:30:12 2017 +0200 x86/alternatives: Fix alt_max_short macro to really be a max() The alt_max_short() macro in asm/alternative.h does not work as intended, leading to nasty bugs. E.g. alt_max_short("1", "3") evaluates to 3, but alt_max_short("3", "1") evaluates to 1 -- not exactly the maximum of 1 and 3. In fact, I had to learn it the hard way by crashing my kernel in not so funny ways by attempting to make use of the ALTENATIVE_2 macro with alternatives where the first one was larger than the second one. According to [1] and commit dbe4058a6a44 ("x86/alternatives: Fix ALTERNATIVE_2 padding generation properly") the right handed side should read "-(-(a < b))" not "-(-(a - b))". Fix that, to make the macro work as intended. While at it, fix up the comments regarding the additional "-", too. It's not about gas' usage of s32 but brain dead logic of having a "true" value of -1 for the < operator ... *sigh* Btw., the one in asm/alternative-asm.h is correct. And, apparently, all current users of ALTERNATIVE_2() pass same sized alternatives, avoiding to hit the bug. [1] http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax Reviewed-and-tested-by: Borislav Petkov Fixes: dbe4058a6a44 ("x86/alternatives: Fix ALTERNATIVE_2 padding generation properly") Signed-off-by: Mathias Krause Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1507228213-13095-1-git-send-email-minipli@googlemail.com arch/x86/include/asm/alternative-asm.h | 4 +++- arch/x86/include/asm/alternative.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 924c6b900cfdf376b07bccfd80e62b21914f8a5a Author: Andy Lutomirski Date: Sun Oct 8 21:53:05 2017 -0700 x86/mm/64: Fix reboot interaction with CR4.PCIDE Trying to reboot via real mode fails with PCID on: long mode cannot be exited while CR4.PCIDE is set. (No, I have no idea why, but the SDM and actual CPUs are in agreement here.) The result is a GPF and a hang instead of a reboot. I didn't catch this in testing because neither my computer nor my VM reboots this way. I can trigger it with reboot=bios, though. Fixes: 660da7c9228f ("x86/mm: Enable CR4.PCIDE on supported systems") Reported-and-tested-by: Steven Rostedt (VMware) Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Link: https://lkml.kernel.org/r/f1e7d965998018450a7a70c2823873686a8b21c0.1507524746.git.luto@kernel.org arch/x86/kernel/reboot.c | 4 ++++ 1 file changed, 4 insertions(+) commit e43b3b58548051f8809391eb7bec7a27ed3003ea Author: Thomas Gleixner Date: Wed Oct 4 21:07:38 2017 +0200 genirq/cpuhotplug: Enforce affinity setting on startup of managed irqs Managed interrupts can end up in a stale state on CPU hotplug. If the interrupt is not targeting a single CPU, i.e. the affinity mask spawns multiple CPUs then the following can happen: After boot: dstate: 0x01601200 IRQD_ACTIVATED IRQD_IRQ_STARTED IRQD_SINGLE_TARGET IRQD_AFFINITY_SET IRQD_AFFINITY_MANAGED node: 0 affinity: 24-31 effectiv: 24 pending: 0 After offlining CPU 31 - 24 dstate: 0x01a31000 IRQD_IRQ_DISABLED IRQD_IRQ_MASKED IRQD_SINGLE_TARGET IRQD_AFFINITY_SET IRQD_AFFINITY_MANAGED IRQD_MANAGED_SHUTDOWN node: 0 affinity: 24-31 effectiv: 24 pending: 0 Now CPU 25 gets onlined again, so it should get the effective interrupt affinity for this interruopt, but due to the x86 interrupt affinity setter restrictions this ends up after restarting the interrupt with: dstate: 0x01601300 IRQD_ACTIVATED IRQD_IRQ_STARTED IRQD_SINGLE_TARGET IRQD_AFFINITY_SET IRQD_SETAFFINITY_PENDING IRQD_AFFINITY_MANAGED node: 0 affinity: 24-31 effectiv: 24 pending: 24-31 So the interrupt is still affine to CPU 24, which was the last CPU to go offline of that affinity set and the move to an online CPU within 24-31, in this case 25, is pending. This mechanism is x86/ia64 specific as those architectures cannot move interrupts from thread context and do this when an interrupt is actually handled. So the move is set to pending. Whats worse is that offlining CPU 25 again results in: dstate: 0x01601300 IRQD_ACTIVATED IRQD_IRQ_STARTED IRQD_SINGLE_TARGET IRQD_AFFINITY_SET IRQD_SETAFFINITY_PENDING IRQD_AFFINITY_MANAGED node: 0 affinity: 24-31 effectiv: 24 pending: 24-31 This means the interrupt has not been shut down, because the outgoing CPU is not in the effective affinity mask, but of course nothing notices that the effective affinity mask is pointing at an offline CPU. In the case of restarting a managed interrupt the move restriction does not apply, so the affinity setting can be made unconditional. This needs to be done _before_ the interrupt is started up as otherwise the condition for moving it from thread context would not longer be fulfilled. With that change applied onlining CPU 25 after offlining 31-24 results in: dstate: 0x01600200 IRQD_ACTIVATED IRQD_IRQ_STARTED IRQD_SINGLE_TARGET IRQD_AFFINITY_MANAGED node: 0 affinity: 24-31 effectiv: 25 pending: And after offlining CPU 25: dstate: 0x01a30000 IRQD_IRQ_DISABLED IRQD_IRQ_MASKED IRQD_SINGLE_TARGET IRQD_AFFINITY_MANAGED IRQD_MANAGED_SHUTDOWN node: 0 affinity: 24-31 effectiv: 25 pending: which is the correct and expected result. Fixes: 761ea388e8c4 ("genirq: Handle managed irqs gracefully in irq_startup()") Reported-by: YASUAKI ISHIMATSU Signed-off-by: Thomas Gleixner Cc: axboe@kernel.dk Cc: linux-scsi@vger.kernel.org Cc: Sumit Saxena Cc: Marc Zyngier Cc: mpe@ellerman.id.au Cc: Shivasharan Srikanteshwara Cc: Kashyap Desai Cc: keith.busch@intel.com Cc: peterz@infradead.org Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1710042208400.2406@nanos kernel/irq/chip.c | 2 +- kernel/irq/manage.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 60b09c51bb4fb46e2331fdbb39f91520f31d35f7 Author: Thomas Gleixner Date: Mon Oct 9 12:47:24 2017 +0200 genirq/cpuhotplug: Add sanity check for effective affinity mask The effective affinity mask handling has no safety net when the mask is not updated by the interrupt chip or the mask contains offline CPUs. If that happens the CPU unplug code fails to migrate interrupts. Add sanity checks and emit a warning when the mask contains only offline CPUs. Fixes: 415fcf1a2293 ("genirq/cpuhotplug: Use effective affinity mask") Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Christoph Hellwig Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1710042208400.2406@nanos kernel/irq/cpuhotplug.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 19e1d4e947cac3b5e08225d15ad7744e691c7376 Author: Thomas Gleixner Date: Mon Oct 9 12:41:36 2017 +0200 genirq: Warn when effective affinity is not updated Emit a one time warning when the effective affinity mask is enabled in Kconfig, but the interrupt chip does not update the mask in its irq_set_affinity() callback, Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1710042208400.2406@nanos kernel/irq/manage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 47a4b71c0b15be08a0f5e3011e71551a269bbe59 Merge: 8a5776a 299d757 Author: Greg Kroah-Hartman Date: Mon Oct 9 13:20:30 2017 +0200 Merge tag 'usb-serial-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.14-rc5 Here's a fix for a cp210x regression that prevented a class of devices from being successfully probed. Two use-after-free bugs in the console code are also fixed. Included are also some new device ids. All but the last three commits have been in linux-next with no reported issues. commit 49f817d793d1bcc11d721881aac037b996feef5c Author: Lin Zhang Date: Fri Oct 6 00:44:03 2017 +0800 netfilter: SYNPROXY: skip non-tcp packet in {ipv4, ipv6}_synproxy_hook In function {ipv4,ipv6}_synproxy_hook we expect a normal tcp packet, but the real server maybe reply an icmp error packet related to the exist tcp conntrack, so we will access wrong tcp data. Fix it by checking for the protocol field and only process tcp traffic. Signed-off-by: Lin Zhang Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_SYNPROXY.c | 3 ++- net/ipv6/netfilter/ip6t_SYNPROXY.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 299d7572e46f98534033a9e65973f13ad1ce9047 Author: Johan Hovold Date: Wed Oct 4 11:01:13 2017 +0200 USB: serial: console: fix use-after-free after failed setup Make sure to reset the USB-console port pointer when console setup fails in order to avoid having the struct usb_serial be prematurely freed by the console code when the device is later disconnected. Fixes: 73e487fdb75f ("[PATCH] USB console: fix disconnection issues") Cc: stable # 2.6.18 Acked-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/console.c | 1 + 1 file changed, 1 insertion(+) commit bd998c2e0df0469707503023d50d46cf0b10c787 Author: Johan Hovold Date: Wed Oct 4 11:01:12 2017 +0200 USB: serial: console: fix use-after-free on disconnect A clean-up patch removing two redundant NULL-checks from the console disconnect handler inadvertently also removed a third check. This could lead to the struct usb_serial being prematurely freed by the console code when a driver accepts but does not register any ports for an interface which also lacks endpoint descriptors. Fixes: 0e517c93dc02 ("USB: serial: console: clean up sanity checks") Cc: stable # 4.11 Reported-by: Andrey Konovalov Acked-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f61929eb10a0cef383295d28b7933c395f82467 Author: Ludovic Desroches Date: Mon Sep 25 11:42:36 2017 +0200 ARM: dts: at91: at91-sama5d27_som1: fix PHY ID The PHY ID is incorrect. It leads to troubles when resuming from standby or mem power states. Signed-off-by: Ludovic Desroches Fixes: af690fa37e39 ("ARM: dts: at91: at91-sama5d27_som1: add sama5d27 SoM1 support") Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9e2971b8cd3ef469de0112ba15778b5b98ad72e Author: Jon Maloy Date: Sat Oct 7 15:07:20 2017 +0200 tipc: Unclone message at secondary destination lookup When a bundling message is received, the function tipc_link_input() calls function tipc_msg_extract() to unbundle all inner messages of the bundling message before adding them to input queue. The function tipc_msg_extract() just clones all inner skb for all inner messagges from the bundling skb. This means that the skb headroom of an inner message overlaps with the data part of the preceding message in the bundle. If the message in question is a name addressed message, it may be subject to a secondary destination lookup, and eventually be sent out on one of the interfaces again. But, since what is perceived as headroom by the device driver in reality is the last bytes of the preceding message in the bundle, the latter will be overwritten by the MAC addresses of the L2 header. If the preceding message has not yet been consumed by the user, it will evenually be delivered with corrupted contents. This commit fixes this by uncloning all messages passing through the function tipc_msg_lookup_dest(), hence ensuring that the headroom is always valid when the message is passed on. Signed-off-by: Tung Nguyen Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/msg.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3382605fd8db1ed1fb03f3f1529490133fe3ab08 Author: Jon Maloy Date: Sat Oct 7 14:32:49 2017 +0200 tipc: correct initialization of skb list We change the initialization of the skb transmit buffer queues in the functions tipc_bcast_xmit() and tipc_rcast_xmit() to also initialize their spinlocks. This is needed because we may, during error conditions, need to call skb_queue_purge() on those queues further down the stack. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f Author: Linus Torvalds Date: Sun Oct 8 20:53:29 2017 -0700 Linux 4.14-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d0241d57c7b25bb75ac9d7a62753642264fdbce Author: Alexey Kodanev Date: Fri Oct 6 19:02:35 2017 +0300 gso: fix payload length when gso_size is zero When gso_size reset to zero for the tail segment in skb_segment(), later in ipv6_gso_segment(), __skb_udp_tunnel_segment() and gre_gso_segment() we will get incorrect results (payload length, pcsum) for that segment. inet_gso_segment() already has a check for gso_size before calculating payload. The issue was found with LTP vxlan & gre tests over ixgbe NIC. Fixes: 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") Signed-off-by: Alexey Kodanev Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/gre_offload.c | 2 +- net/ipv4/udp_offload.c | 2 +- net/ipv6/ip6_offload.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a69518cf0b4cbf02c6bc1239cdeb8750a9eb8077 Author: Ido Schimmel Date: Sun Oct 8 11:53:26 2017 +0200 mlxsw: spectrum_router: Avoid expensive lookup during route removal In commit fc922bb0dd94 ("mlxsw: spectrum_router: Use one LPM tree for all virtual routers") I increased the scale of supported VRFs by having all of them share the same LPM tree. In order to avoid look-ups for prefix lengths that don't exist, each route removal would trigger an aggregation across all the active virtual routers to see which prefix lengths are in use and which aren't and structure the tree accordingly. With the way the data structures are currently laid out, this is a very expensive operation. When preformed repeatedly - due to the invocation of the abort mechanism - and with enough VRFs, this can result in a hung task. For now, avoid this optimization until it can be properly re-added in net-next. Fixes: fc922bb0dd94 ("mlxsw: spectrum_router: Use one LPM tree for all virtual routers") Signed-off-by: Ido Schimmel Reported-by: David Ahern Tested-by: David Ahern Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 -------------- 1 file changed, 14 deletions(-) commit 5151b4afb41dd7c5e13a130efcc95326a49da8c6 Author: Randy Dunlap Date: Sat Oct 7 16:53:20 2017 -0700 iio: adc: dln2-adc: fix build error The dln2-adc driver uses interface(s) that are controlled by the IIO_TRIGGERED_BUFFER Kconfig symbol, so the driver needs to select that symbol to prevent the build error. drivers/iio/adc/dln2-adc.o: In function `dln2_adc_probe': dln2-adc.c:(.text+0x528): undefined reference to `devm_iio_triggered_buffer_setup' Signed-off-by: Randy Dunlap Reported-by: kbuild test robot Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Cc: Jack Andersen Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 845e405e5e6c9dc9ed10306a4b5bfeaefebc2e84 Author: Grygorii Strashko Date: Tue Oct 3 12:00:49 2017 -0500 pinctrl: cherryview: fix issues caused by dynamic gpio irqs mapping New GPIO IRQs are allocated and mapped dynamically by default when GPIO IRQ infrastructure is used by cherryview-pinctrl driver. This causes issues on some Intel platforms [1][2] with broken BIOS which hardcodes Linux IRQ numbers in their ACPI tables. On such platforms cherryview-pinctrl driver should allocate and map all GPIO IRQs at probe time. Side effect - "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n" can be seen at boot log. NOTE. It still may fail if boot sequence will changed and some interrupt controller will be probed before cherryview-pinctrl which will shift Linux IRQ numbering (expected with CONFIG_SPARCE_IRQ enabled). [1] https://bugzilla.kernel.org/show_bug.cgi?id=194945 [2] https://lkml.org/lkml/2017/9/28/153 Cc: Andy Shevchenko Cc: Chris Gorman Cc: Mika Westerberg Cc: Heikki Krogerus Signed-off-by: Grygorii Strashko Reported-by: Chris Gorman Reported-by: Mika Westerberg Tested-by: Chris Gorman Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 8fe2d6ccd52b086268f2f36e5e2fc0fe3aeffa80 Author: Alexei Starovoitov Date: Thu Oct 5 16:20:56 2017 -0700 bpf: fix liveness marking while processing Rx = Ry instruction the verifier does regs[insn->dst_reg] = regs[insn->src_reg] which often clears write mark (when Ry doesn't have it) that was just set by check_reg_arg(Rx) prior to the assignment. That causes mark_reg_read() to keep marking Rx in this block as REG_LIVE_READ (since the logic incorrectly misses that it's screened by the write) and in many of its parents (until lucky write into the same Rx or beginning of the program). That causes is_state_visited() logic to miss many pruning opportunities. Furthermore mark_reg_read() logic propagates the read mark for BPF_REG_FP as well (though it's readonly) which causes harmless but unnecssary work during is_state_visited(). Note that do_propagate_liveness() skips FP correctly, so do the same in mark_reg_read() as well. It saves 0.2 seconds for the test below program before after bpf_lb-DLB_L3.o 2604 2304 bpf_lb-DLB_L4.o 11159 3723 bpf_lb-DUNKNOWN.o 1116 1110 bpf_lxc-DDROP_ALL.o 34566 28004 bpf_lxc-DUNKNOWN.o 53267 39026 bpf_netdev.o 17843 16943 bpf_overlay.o 8672 7929 time ~11 sec ~4 sec Fixes: dc503a8ad984 ("bpf/verifier: track liveness for pruning") Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit 00a534e5ea5c21b95f58cbb2f7918cc9fa82dd47 Author: Axel Beckert Date: Thu Oct 5 22:00:33 2017 +0200 doc: Fix typo "8023.ad" in bonding documentation Should be "802.3ad" like everywhere else in the document. Signed-off-by: Axel Beckert Signed-off-by: David S. Miller Documentation/networking/bonding.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2d3f3e33853ef52e5f66b41c3e8ee5710aa3305 Author: Matteo Croce Date: Thu Oct 5 19:03:05 2017 +0200 ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real Commit 35e015e1f577 ("ipv6: fix net.ipv6.conf.all interface DAD handlers") was intended to affect accept_dad flag handling in such a way that DAD operation and mode on a given interface would be selected according to the maximum value of conf/{all,interface}/accept_dad. However, addrconf_dad_begin() checks for particular cases in which we need to skip DAD, and this check was modified in the wrong way. Namely, it was modified so that, if the accept_dad flag is 0 for the given interface *or* for all interfaces, DAD would be skipped. We have instead to skip DAD if accept_dad is 0 for the given interface *and* for all interfaces. Fixes: 35e015e1f577 ("ipv6: fix net.ipv6.conf.all interface DAD handlers") Acked-by: Stefano Brivio Signed-off-by: Matteo Croce Reported-by: Erik Kline Signed-off-by: David S. Miller net/ipv6/addrconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85b1bb248071967135d22cc84e62292094f4a3c6 Merge: 67936a4 88e6538 Author: Linus Torvalds Date: Sat Oct 7 12:34:16 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: - a couple of serious fixes: use after free and blacklist for WRITE SAME - one error leg fix: write_pending failure - one user experience problem: do not override max_sectors_kb - one minor unused function removal * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ibmvscsis: Fix write_pending failure path scsi: libiscsi: Remove iscsi_destroy_session scsi: libiscsi: Fix use-after-free race during iscsi_session_teardown scsi: sd: Do not override max_sectors_kb sysfs setting scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP commit 67936a41e597331c991528c5e5bd791cfbb1b1d6 Merge: 031b814 25f2f44 Author: Linus Torvalds Date: Sat Oct 7 10:07:51 2017 -0700 Merge branch 'i2c/for-current-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has three driver fixes for the newly introduced drivers and one ID addition for the i801 driver" * 'i2c/for-current-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i2c-stm32f7: make structure stm32f7_setup static const i2c: ensure termination of *_device_id tables i2c: i801: Add support for Intel Cedar Fork i2c: stm32f7: fix setup structure commit 031b814030dc1bc353ce94da6816579228ba0e8b Merge: 1c86f2e bb16ea1 Author: Linus Torvalds Date: Sat Oct 7 10:03:03 2017 -0700 Merge tag 'mmc-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix driver strength selection when selecting hs400es - Delete bounce buffer handling: This change fixes a problem related to how bounce buffers are being allocated. However, instead of trying to fix that, let's just remove the mmc bounce buffer code altogether, as it has practically no use. MMC host: - meson-gx: A couple of fixes related to clock/phase/tuning - sdhci-xenon: Fix clock resource by adding an optional bus clock" * tag 'mmc-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock mmc: meson-gx: include tx phase in the tuning process mmc: meson-gx: fix rx phase reset mmc: meson-gx: make sure the clock is rounded down mmc: Delete bounce buffer handling mmc: core: add driver strength selection when selecting hs400es commit 80ac93c274411a55ae731f259f75e4ca5e499e8b Author: Grygorii Strashko Date: Tue Oct 3 11:17:05 2017 -0500 gpio: omap: Fix lost edge interrupts Now acking of edge irqs happens the following way: - omap_gpio_irq_handler - "isr" = read irq status - omap_clear_gpio_irqbank(bank, isr_saved & ~level_mask); ^ clear edge status, so irq can be accepted - loop while "isr" generic_handle_irq() - handle_edge_irq() - desc->irq_data.chip->irq_ack(&desc->irq_data); - omap_gpio_ack_irq() it might be that at this moment edge IRQ was triggered again and it will be cleared and IRQ will be lost. Use handle_simple_irq and clear edge interrupts early without disabling them in omap_gpio_irq_handler to avoid loosing interrupts. [1] https://marc.info/?l=linux-omap&m=149004465313534&w=2 Signed-off-by: Grygorii Strashko Signed-off-by: Ladislav Michl Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit bbfe63b60aad29bb0ed65a1968519765bd68368a Author: Randy Dunlap Date: Fri Oct 6 17:17:52 2017 -0700 Makefile: kselftest: fix grammar typo Correct typo in kselftest help text. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cc3ce24a9874451e6751a062cc2ae5040fd8bee Author: Ulf Magnusson Date: Wed Oct 4 01:53:26 2017 +0200 kbuild: Fix optimization level choice default The choice containing the CC_OPTIMIZE_FOR_PERFORMANCE symbol accidentally added a "CONFIG_" prefix when trying to make it the default, selecting an undefined symbol as the default. The mistake is harmless here: Since the default symbol is not visible, the choice falls back on using the visible symbol as the default instead, which is CC_OPTIMIZE_FOR_PERFORMANCE, as intended. A patch that makes Kconfig print a warning in this case has been submitted separately: http://www.spinics.net/lists/linux-kbuild/msg15566.html Signed-off-by: Ulf Magnusson Acked-by: Arnd Bergmann Signed-off-by: Masahiro Yamada init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 990404188581cba45937ebad24a4b1910a4ec568 Author: Cao jin Date: Mon Sep 25 20:25:10 2017 +0800 kbuild: drop unused symverfile in Makefile.modpost Since commit 040fcc819a2e ("kbuild: improved modversioning support for external modules"), symverfile has been replaced with kernelsymfile and modulesymfile. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 1 - 1 file changed, 1 deletion(-) commit 028568d84da3cfca49f5f846eeeef01441d70451 Author: Masahiro Yamada Date: Mon Oct 2 17:07:28 2017 +0900 kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) I thought commit 8e9b46679923 ("kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)") was a safe conversion, but it changed the behavior. $(abspath ...) / $(realpath ...) does not expand shell special characters, such as '~'. Here is a simple Makefile example: ---------------->8---------------- $(info /bin/pwd: $(shell cd ~/; /bin/pwd)) $(info abspath: $(abspath ~/)) $(info realpath: $(realpath ~/)) all: @: ---------------->8---------------- $ make /bin/pwd: /home/masahiro abspath: /home/masahiro/workspace/~ realpath: This can be a real problem if 'make O=~/foo' is invoked from another Makefile or primitive shell like dash. This commit partially reverts 8e9b46679923. Fixes: 8e9b46679923 ("kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)") Reported-by: Julien Grall Signed-off-by: Masahiro Yamada Tested-by: Julien Grall Makefile | 4 ++-- tools/power/cpupower/Makefile | 2 +- tools/scripts/Makefile.include | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 0cabf2af6f5ac3c88cb106c4e06087a5a39b8e1e Author: Herbert Xu Date: Sat Oct 7 11:29:48 2017 +0800 crypto: skcipher - Fix crash on zero-length input The skcipher walk interface doesn't handle zero-length input properly as the old blkcipher walk interface did. This is due to the fact that the length check is done too late. This patch moves the length check forward so that it does the right thing. Fixes: b286d8b1a690 ("crypto: skcipher - Add skcipher walk...") Cc: Reported-by: Stephan Müller Signed-off-by: Herbert Xu crypto/skcipher.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9039f3ef446e9ffa200200c934f049add9e58426 Author: Jia-Ju Bai Date: Tue Oct 3 10:25:22 2017 +0800 crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned The SCTP program may sleep under a spinlock, and the function call path is: sctp_generate_t3_rtx_event (acquire the spinlock) sctp_do_sm sctp_side_effects sctp_cmd_interpreter sctp_make_init_ack sctp_pack_cookie crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) For the same reason, the orinoco driver may sleep in interrupt handler, and the function call path is: orinoco_rx_isr_tasklet orinoco_rx orinoco_mic crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) 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: Herbert Xu crypto/shash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5125e4e867ab888f2d4b443a1ce463adefb370db Author: Christophe Jaillet Date: Tue Sep 26 08:17:44 2017 +0200 crypto: xts - 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: f1c131b45410 ("crypto: xts - Convert to skcipher") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu crypto/xts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 532f419cde077ffe9616c97902af177fbb868b17 Author: Arnd Bergmann Date: Tue Sep 12 11:35:39 2017 +0200 crypto: stm32 - Try to fix hash padding gcc warns that the length for the extra unaligned data in the hash function may be used unaligned. In theory this could happen if we pass a zero-length sg_list, or if sg_is_last() was never true: In file included from drivers/crypto/stm32/stm32-hash.c:23: drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_one_request': include/uapi/linux/kernel.h:12:49: error: 'ncp' may be used uninitialized in this function [-Werror=maybe-uninitialized] #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) Neither of these can happen in practice, so the warning is harmless. However while trying to suppress the warning, I noticed multiple problems with that code: - On big-endian kernels, we byte-swap the data like we do for register accesses, however this is a data stream and almost certainly needs to use a single writesl() instead of series of writel() to give the correct hash. - If the length is not a multiple of four bytes, we skip the last word entirely, since we write the truncated length using stm32_hash_set_nblw(). - If we change the code to round the length up rather than down, the last bytes contain stale data, so it needs some form of padding. This tries to address all four problems, by correctly initializing the length to zero, using endian-safe copy functions, adding zero-padding and passing the padded length. I have done no testing on this patch, so please review carefully and if possible test with an unaligned length and big-endian kernel builds. Fixes: 8a1012d3f2ab ("crypto: stm32 - Support for STM32 HASH module") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1c86f2e4c84faface399d7ba7c740423d6dfbdf9 Merge: dbeb1a8 74007ae Author: Linus Torvalds Date: Fri Oct 6 17:59:32 2017 -0700 Merge tag 'hwmon-for-linus-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Fix up error path in xgene driver" * tag 'hwmon-for-linus-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()' commit dbeb1a8ff547ffc2db69b44b4445a9eadc025abf Merge: ed0f72f 5dcbeca Author: Linus Torvalds Date: Fri Oct 6 16:25:08 2017 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: - build fix to export the clk_bulk_prepare() symbol - suspend fix for Samsung Exynos SoCs where we need to keep clks on across suspend - two critical clk markings for clks that shouldn't ever turn off on Rockchip SoCs - a fix for a copy-paste mistake on Rockchip rk3128 causing some clks to touch the same bit and trample over one another * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: samsung: exynos4: Enable VPLL and EPLL clocks for suspend/resume cycle clk: Export clk_bulk_prepare() clk: rockchip: add sclk_timer5 as critical clock on rk3128 clk: rockchip: fix up rk3128 pvtm and mipi_24m gate regs error clk: rockchip: add pclk_pmu as critical clock on rk3128 commit ed0f72f4eacb49ed8a57e751a09d5b096b433199 Merge: eab26ad ab8eb7d Author: Linus Torvalds Date: Fri Oct 6 15:57:08 2017 -0700 Merge tag 'arc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC udpates from Vineet Gupta: - updates for various platforms - boot log updates for upcoming HS48 family of cores (dual issue) * tag 'arc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-hsdk]: Add reset controller node to manage ethernet reset ARC: [plat-hsdk]: Temporary fix to set CPU frequency to 1GHz ARC: fix allnoconfig build warning ARCv2: boot log: identify HS48 cores (dual issue) ARC: boot log: decontaminate ARCv2 ISA_CONFIG register arc: remove redundant UTS_MACHINE define in arch/arc/Makefile ARC: [plat-eznps] Update platform maintainer as Noam left ARC: [plat-hsdk] use actual clk driver to manage cpu clk ARC: [*defconfig] Reenable soft lock-up detector ARC: [plat-axs10x] sdio: Temporary fix of sdio ciu frequency ARC: [plat-hsdk] sdio: Temporary fix of sdio ciu frequency ARC: [plat-axs103] Add temporary quirk to reset ethernet IP commit eab26ad197311ced6e95c8117a079fb9ae40697b Merge: 17d084c e12199f Author: Linus Torvalds Date: Fri Oct 6 15:53:36 2017 -0700 Merge tag 'xfs-4.14-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - fix a race between overlapping copy on write aio - fix cow fork swapping when we defragment reflinked files * tag 'xfs-4.14-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: handle racy AIO in xfs_reflink_end_cow xfs: always swap the cow forks when swapping extents commit 80a86dbd98497ea7ccf77a82458baf0779de87d6 Merge: 2bd6bf0 f08f58a Author: Florian Fainelli Date: Fri Oct 6 15:11:23 2017 -0700 Merge tag 'bcm2835-dt-fixes-2017-10-06' into devicetree/fixes 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 f08f58a2bf68900a84e782b8c7ad701c0654173c Author: Loic Poulain Date: Fri Oct 6 15:52:52 2017 +0200 ARM: dts: bcm283x: Fix console path on RPi3 Contrary to other RPi devices, RPi3 uses uart0 to communicate with the BCM43438 bluetooth controller. uart1 is then used for the console. Today, the console configuration is inherited from the bcm283x dtsi (bootargs) which is not the correct one for the RPi3. This leads to routing issue and confuses the Bluetooth controller with unexpected data. This patch introduces chosen/stdout path to configure console to uart0 on bcm283x family and overwrite it to uart1 in the RPi3 dts. Create serial0/1 aliases referring to uart0 and uart1 paths. Remove unneeded earlyprintk. Fixes: 4188ea2aeb6d ("ARM: bcm283x: Define UART pinmuxing on board level") Signed-off-by: Loic Poulain Tested-by: Stefan Wahren Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 9 +++------ arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 5 +++++ arch/arm/boot/dts/bcm283x.dtsi | 7 ++++++- 3 files changed, 14 insertions(+), 7 deletions(-) commit 17d084c8d1b73fc07e48c1f5081ef3b8af338e15 Merge: 80cf1f8 d7b544d Author: Linus Torvalds Date: Fri Oct 6 12:13:50 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A collection of fixes for this series. This contains: - NVMe pull request from Christoph, one uuid attribute fix, and one fix for the controller memory buffer address for remapped BARs. - use-after-free fix for bsg, from Benjamin Block. - bcache race/use-after-free fix for a list traversal, fixing a regression in this merge window. From Coly Li. - null_blk change configfs dependency change from a 'depends' to a 'select'. This is a change from this merge window as well. From me. - nbd signal fix from Josef, fixing a regression introduced with the status code changes. - nbd MAINTAINERS mailing list entry update. - blk-throttle stall fix from Joseph Qi. - blk-mq-debugfs fix from Omar, fixing an issue where we don't register the IO scheduler debugfs directory, if the driver is loaded with it. Only shows up if you switch through the sysfs interface" * 'for-linus' of git://git.kernel.dk/linux-block: bsg-lib: fix use-after-free under memory-pressure nvme-pci: Use PCI bus address for data/queues in CMB blk-mq-debugfs: fix device sched directory for default scheduler null_blk: change configfs dependency to select blk-throttle: fix possible io stall when upgrade to max MAINTAINERS: update list for NBD nbd: fix -ERESTARTSYS handling nvme: fix visibility of "uuid" ns attribute bcache: use llist_for_each_entry_safe() in __closure_wake_up() commit 80cf1f8c168d49f0430876950455b3578e27bf82 Merge: 2754906 b1f9e5e Author: Linus Torvalds Date: Fri Oct 6 12:07:09 2017 -0700 Merge tag 'pci-v4.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Fix legacy IDE probe issues exposed by recent PCI core IRQ mapping changes (Bartlomiej Zolnierkiewicz, Lorenzo Pieralisi)" * tag 'pci-v4.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: ide: fix IRQ assignment for PCI bus order probing ide: pci: free PCI BARs on initialization failure ide: free hwif->portdev on hwif_init() failure commit d1b3f51ee1eab3a6db1b09a60e61280c48eb0b01 Author: Satish Kharat Date: Thu Oct 5 16:41:21 2017 -0700 scsi: libfc: fix a deadlock in fc_rport_work In places like fc_rport_recv_plogi_req and fcoe_ctlr_vn_add we always take the lport disc_mutex lock before the rports mutex (rp_mutex) lock. Gaurding list_del_rcu(&rdata->peers) with disc.disc_mutex in fc_rport_work is correct but the rp_mutex lock can and should to be dropped before taking that lock else results in a deadlock. Signed-off-by: Satish Kharat Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_rport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbce4d97fd4333bcffd00a73b9d98412be630332 Author: Hannes Reinecke Date: Wed Oct 4 10:28:56 2017 +0200 scsi: fixup kernel warning during rmmod() Calling rmmod() on a FC driver will results in warnings like WARNING: CPU: 60 PID: 14640 at fs/sysfs/group.c:237 device_del+0x54/0x240() sysfs group ffffffff81eff140 not found for kobject '3:0:0:3' The problem here is that during scsi_remove_target() we will iterate over all devices, but fail to remove any of those as the call to scsi_device_get() fails the check to module_is_live(). Hence the devices will not be removed at this point, but all intermediate structures like fc rport etc. will be. Later on during scsi_forget_host() the devices are removed for real, but the device parent is already removed and causes this warning. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Kyle Fortin Tested-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 275490680c3dede8550f5ee3e59e2a618d2adb19 Merge: 8d47332 ae2e972 Author: Linus Torvalds Date: Fri Oct 6 11:31:46 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Bring initialisation of user space undefined instruction handling early (core_initcall) since late_initcall() happens after modprobe in initramfs is invoked. Similar fix for fpsimd initialisation - Increase the kernel stack when KASAN is enabled - Bring the PCI ACS enabling earlier via the iort_init_platform_devices() - Fix misleading data abort address printing (decimal vs hex) * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Ensure fpsimd support is ready before userspace is active arm64: Ensure the instruction emulation is ready for userspace arm64: Use larger stacks when KASAN is selected ACPI/IORT: Fix PCI ACS enablement arm64: fix misleading data abort decoding commit 8d473320eebf938e9c2e3ce569e524554006362c Merge: d109d83 e42eef4 Author: Linus Torvalds Date: Fri Oct 6 11:28:34 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: - fix PPC XIVE interrupt delivery - fix x86 RCU breakage from asynchronous page faults when built without PREEMPT_COUNT - fix x86 build with -frecord-gcc-switches - fix x86 build without X86_LOCAL_APIC * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: add X86_LOCAL_APIC dependency x86/kvm: Move kvm_fastop_exception to .fixup section kvm/x86: Avoid async PF preempting the kernel incorrectly KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive() commit d109d83fc8c325dd92d0c3c0a2db2048699773be Merge: bf2db0b 789f903 Author: Linus Torvalds Date: Fri Oct 6 11:25:55 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "This is a pretty small pull request. Only 6 patches in total. There are no outstanding -rc patches on the mailing list after this pull request, so only if some new issues are discovered in the remainder of the rc cycles will you hear from me again. Summary: - a fix for iwpm netlink usage - a fix for error unwinding in mlx5 - two fixes to vlan handling in qedr - a couple small i40iw fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: i40iw: Fix port number for query QP i40iw: Add missing memory barriers RDMA/qedr: Parse vlan priority as sl RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero IB/mlx5: Fix label order in error path handling RDMA/iwpm: Properly mark end of NL messages commit 6151b8b37b119e8e3a8401b080d532520c95faf4 Author: Guillaume Nault Date: Fri Oct 6 17:05:49 2017 +0200 ppp: fix race in ppp device destruction ppp_release() tries to ensure that netdevices are unregistered before decrementing the unit refcount and running ppp_destroy_interface(). This is all fine as long as the the device is unregistered by ppp_release(): the unregister_netdevice() call, followed by rtnl_unlock(), guarantee that the unregistration process completes before rtnl_unlock() returns. However, the device may be unregistered by other means (like ppp_nl_dellink()). If this happens right before ppp_release() calling rtnl_lock(), then ppp_release() has to wait for the concurrent unregistration code to release the lock. But rtnl_unlock() releases the lock before completing the device unregistration process. This allows ppp_release() to proceed and eventually call ppp_destroy_interface() before the unregistration process completes. Calling free_netdev() on this partially unregistered device will BUG(): ------------[ cut here ]------------ kernel BUG at net/core/dev.c:8141! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 1557 Comm: pppd Not tainted 4.14.0-rc2+ #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014 Call Trace: ppp_destroy_interface+0xd8/0xe0 [ppp_generic] ppp_disconnect_channel+0xda/0x110 [ppp_generic] ppp_unregister_channel+0x5e/0x110 [ppp_generic] pppox_unbind_sock+0x23/0x30 [pppox] pppoe_connect+0x130/0x440 [pppoe] SYSC_connect+0x98/0x110 ? do_fcntl+0x2c0/0x5d0 SyS_connect+0xe/0x10 entry_SYSCALL_64_fastpath+0x1a/0xa5 RIP: free_netdev+0x107/0x110 RSP: ffffc28a40573d88 ---[ end trace ed294ff0cc40eeff ]--- We could set the ->needs_free_netdev flag on PPP devices and move the ppp_destroy_interface() logic in the ->priv_destructor() callback. But that'd be quite intrusive as we'd first need to unlink from the other channels and units that depend on the device (the ones that used the PPPIOCCONNECT and PPPIOCATTACH ioctls). Instead, we can just let the netdevice hold a reference on its ppp_file. This reference is dropped in ->priv_destructor(), at the very end of the unregistration process, so that neither ppp_release() nor ppp_disconnect_channel() can call ppp_destroy_interface() in the interim. Reported-by: Beniamino Galvani Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bf2db0b9f5808fa5b78141b68d55ec630bf06313 Merge: b77779b 69ad597 Author: Linus Torvalds Date: Fri Oct 6 09:03:08 2017 -0700 Merge branch 'for-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two more fixes for bugs introduced in 4.13. The sector_t problem with 32bit architecture and !LBDAF config seems serious but the number of affected deployments is hopefully low. The clashing status bits could lead to a confusing in-memory state of the whole-filesystem operations if used with the quota override sysfs knob" * 'for-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix overlap of fs_info::flags values btrfs: avoid overflow when sector_t is 32 bit commit b77779b93d7a38d9a7f3462b83f6e6fadb6b9ce5 Merge: 8d4ef4e 38f340c Author: Linus Torvalds Date: Fri Oct 6 09:01:45 2017 -0700 Merge tag 'ceph-for-4.14-rc4' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two fixups for CephFS snapshot-handling patches in -rc1" * tag 'ceph-for-4.14-rc4' of git://github.com/ceph/ceph-client: ceph: fix __choose_mds() for LSSNAP request ceph: properly queue cap snap for newly created snap realm commit ab8eb7db1dcc03e7ae9eb379884fd701af6b1a38 Author: Eugeniy Paltsev Date: Fri Sep 22 19:49:11 2017 +0300 ARC: [plat-hsdk]: Add reset controller node to manage ethernet reset DW ethernet controller on HSDK hangs sometimes after SW reset, so add reset node to make possible to reset DW ethernet controller HW. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 9 +++++++++ arch/arc/configs/hsdk_defconfig | 1 + 2 files changed, 10 insertions(+) commit 8d4ef4e15ec57eec5d24fb109fbc220eea9f0caf Merge: 1249b57 85fdee1 Author: Linus Torvalds Date: Fri Oct 6 08:52:53 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix a regression in 4.14 and one in 4.13. The latter is a case when Docker is doing something it really shouldn't and gets away with it. We now print a warning instead of erroring out. There are also fixes to several error paths" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix regression caused by exclusive upper/work dir protection ovl: fix missing unlock_rename() in ovl_do_copy_up() ovl: fix dentry leak in ovl_indexdir_cleanup() ovl: fix dput() of ERR_PTR in ovl_cleanup_index() ovl: fix error value printed in ovl_lookup_index() ovl: fix may_write_real() for overlayfs directories commit 1249b571ba2a44a929f3053fd0a90b36a8535c55 Merge: 9c0c1ad 53ecde0 Author: Linus Torvalds Date: Fri Oct 6 08:47:21 2017 -0700 Merge tag 'powerpc-4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Nine small fixes, really nothing that stands out. A work-around for a spurious MCE on Power9. A CXL fault handling fix, some fixes to the new XIVE code, and a fix to the new 32-bit STRICT_KERNEL_RWX code. Fixes for old code/stable: an fix to an incorrect TLB flush on boot but not on any current machines, a compile error on 4xx and a fix to memory hotplug when using radix (Power9). Thanks to: Anton Blanchard, Cédric Le Goater, Christian Lamparter, Christophe Leroy, Christophe Lombard, Guenter Roeck, Jeremy Kerr, Michael Neuling, Nicholas Piggin" * tag 'powerpc-4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv: Increase memory block size to 1GB on radix powerpc/mm: Call flush_tlb_kernel_range with interrupts enabled powerpc/xive: Clear XIVE internal structures when a CPU is removed powerpc/xive: Fix IPI reset powerpc/4xx: Fix compile error with 64K pages on 40x, 44x powerpc: Fix action argument for cpufeatures-based TLB flush cxl: Fix memory page not handled powerpc: Fix workaround for spurious MCE on POWER9 powerpc: Handle MCE on POWER9 with only DSISR bit 30 set commit 9c0c1adab6024ab7222333ead95c57ca60f39f6f Merge: 27efed3 baf7c1f Author: Linus Torvalds Date: Fri Oct 6 08:42:06 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Some i915 fixes from the last two weeks (as they were on a strange base and I just waited for rc3), also a single sun4i hdmi fix" * tag 'drm-fixes-for-v4.14-rc4' of git://people.freedesktop.org/~airlied/linux: drm/i915/glk: Fix DMC/DC state idleness calculation drm/i915/cnl: Reprogram DMC firmware after S3/S4 resume drm/i915: Fix DDI PHY init if it was already on drm/sun4i: hdmi: Disable clks in bind function error path and unbind function drm/i915/bios: ignore HDMI on port A drm/i915: remove redundant variable hw_check drm/i915: always update ELD connector type after get modes commit 27efed3e8384e4d87fe3c07e7a046c1f43eb0993 Merge: 7a92616 0b62bf8 Author: Linus Torvalds Date: Fri Oct 6 08:36:41 2017 -0700 Merge branch 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull watchddog clean-up and fixes from Thomas Gleixner: "The watchdog (hard/softlockup detector) code is pretty much broken in its current state. The patch series addresses this by removing all duct tape and refactoring it into a workable state. The reasons why I ask for inclusion that late in the cycle are: 1) The code causes lockdep splats vs. hotplug locking which get reported over and over. Unfortunately there is no easy fix. 2) The risk of breakage is minimal because it's already broken 3) As 4.14 is a long term stable kernel, I prefer to have working watchdog code in that and the lockdep issues resolved. I wouldn't ask you to pull if 4.14 wouldn't be a LTS kernel or if the solution would be easy to backport. 4) The series was around before the merge window opened, but then got delayed due to the UP failure caused by the for_each_cpu() surprise which we discussed recently. Changes vs. V1: - Addressed your review points - Addressed the warning in the powerpc code which was discovered late - Changed two function names which made sense up to a certain point in the series. Now they match what they do in the end. - Fixed a 'unused variable' warning, which got not detected by the intel robot. I triggered it when trying all possible related config combinations manually. Randconfig testing seems not random enough. The changes have been tested by and reviewed by Don Zickus and tested and acked by Micheal Ellerman for powerpc" * 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) watchdog/core: Put softlockup_threads_initialized under ifdef guard watchdog/core: Rename some softlockup_* functions powerpc/watchdog: Make use of watchdog_nmi_probe() watchdog/core, powerpc: Lock cpus across reconfiguration watchdog/core, powerpc: Replace watchdog_nmi_reconfigure() watchdog/hardlockup/perf: Fix spelling mistake: "permanetely" -> "permanently" watchdog/hardlockup/perf: Cure UP damage watchdog/hardlockup: Clean up hotplug locking mess watchdog/hardlockup/perf: Simplify deferred event destroy watchdog/hardlockup/perf: Use new perf CPU enable mechanism watchdog/hardlockup/perf: Implement CPU enable replacement watchdog/hardlockup/perf: Implement init time detection of perf watchdog/hardlockup/perf: Implement init time perf validation watchdog/core: Get rid of the racy update loop watchdog/core, powerpc: Make watchdog_nmi_reconfigure() two stage watchdog/sysctl: Clean up sysctl variable name space watchdog/sysctl: Get rid of the #ifdeffery watchdog/core: Clean up header mess watchdog/core: Further simplify sysctl handling watchdog/core: Get rid of the thread teardown/setup dance ... commit ae2e972dae3cea795e9f8f94eb1601213c2d49f0 Author: Suzuki K Poulose Date: Fri Oct 6 14:16:53 2017 +0100 arm64: Ensure fpsimd support is ready before userspace is active We register the pm/hotplug callbacks for FPSIMD as late_initcall, which happens after the userspace is active (from initramfs via populate_rootfs, a rootfs_initcall). Make sure we are ready even before the userspace could potentially use it, by promoting to a core_initcall. Cc: Will Deacon Cc: Mark Rutland Cc: Dave Martin Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas arch/arm64/kernel/fpsimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0d8832e78cbfd4a64b7112e34920af4b0b0e60e Author: Suzuki K Poulose Date: Fri Oct 6 14:16:52 2017 +0100 arm64: Ensure the instruction emulation is ready for userspace We trap and emulate some instructions (e.g, mrs, deprecated instructions) for the userspace. However the handlers for these are registered as late_initcalls and the userspace could be up and running from the initramfs by that time (with populate_rootfs, which is a rootfs_initcall()). This could cause problems for the early applications ending up in failure like : [ 11.152061] modprobe[93]: undefined instruction: pc=0000ffff8ca48ff4 This patch promotes the specific calls to core_initcalls, which are guaranteed to be completed before we hit userspace. Cc: stable@vger.kernel.org Cc: Dave Martin Cc: Matthias Brugger Cc: James Morse Reported-by: Matwey V. Kornilov Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/cpufeature.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e466af75c074e76107ae1cd5a2823e9c61894ffb Author: Eric Dumazet Date: Thu Oct 5 02:50:07 2017 -0700 netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user syzkaller reports an out of bound read in strlcpy(), triggered by xt_copy_counters_from_user() Fix this by using memcpy(), then forcing a zero byte at the last position of the destination, as Florian did for the non COMPAT code. Fixes: d7591f0c41ce ("netfilter: x_tables: introduce and use xt_copy_counters_from_user") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f9bfe0ef622a7bb9707c22ceb4b6451e1e2cb7b Author: Pablo Neira Ayuso Date: Wed Oct 4 17:18:27 2017 +0200 netfilter: nf_tables: do not dump chain counters if not enabled Chain counters are only enabled on demand since 9f08ea848117, skip them when dumping them via netlink. Fixes: 9f08ea848117 ("netfilter: nf_tables: keep chain counters away from hot path") Reported-by: Johny Mattsson Tested-by: Johny Mattsson Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9516c0813aeb89ebd19ec0ed39fbfcd78b6ef3a Author: Mark Santaniello Date: Fri Oct 6 01:07:22 2017 -0700 perf script: Add missing separator for "-F ip,brstack" (and brstackoff) Prior to commit 55b9b50811ca ("perf script: Support -F brstack,dso and brstacksym,dso"), we were printing a space before the brstack data. It seems that this space was important. Without it, parsing is difficult. Very sorry for the mistake. Notice here how the "ip" and "brstack" run together: $ perf script -F ip,brstack | head -n 1 22e18c40x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 0x22e195d/0x22e1990/P/-/-/0 0x22e18e9/0x22e1943/P/-/-/0 0x22e1a69/0x22e18c0/P/-/-/0 0x22e19f7/0x22e1a20/P/-/-/0 0x22e1910/0x22e19ee/P/-/-/0 0x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 0x22e195d/0x22e1990/P/-/-/0 0x22e18e9/0x22e1943/P/-/-/0 0x22e1a69/0x22e18c0/P/-/-/0 0x22e19f7/0x22e1a20/P/-/-/0 0x22e1910/0x22e19ee/P/-/-/0 0x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 After this diff, sanity is restored: $ perf script -F ip,brstack | head -n 1 22e18c4 0x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 0x22e195d/0x22e1990/P/-/-/0 0x22e18e9/0x22e1943/P/-/-/0 0x22e1a69/0x22e18c0/P/-/-/0 0x22e19f7/0x22e1a20/P/-/-/0 0x22e1910/0x22e19ee/P/-/-/0 0x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 0x22e195d/0x22e1990/P/-/-/0 0x22e18e9/0x22e1943/P/-/-/0 0x22e1a69/0x22e18c0/P/-/-/0 0x22e19f7/0x22e1a20/P/-/-/0 0x22e1910/0x22e19ee/P/-/-/0 0x22e19e2/0x22e190b/P/-/-/0 0x22e19a1/0x22e19d0/P/-/-/0 Signed-off-by: Mark Santaniello Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: 4.13+ Fixes: 55b9b50811ca ("perf script: Support -F brstack,dso and brstacksym,dso") Link: http://lkml.kernel.org/r/20171006080722.3442046-1-marksan@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 044215d145a7a8a60ffa8fdc859d110a795fa6ea Author: Gustavo Romero Date: Tue Aug 22 17:20:09 2017 -0400 powerpc/tm: Fix illegal TM state in signal handler Currently it's possible that on returning from the signal handler through the restore_tm_sigcontexts() code path (e.g. from a signal caught due to a `trap` instruction executed in the middle of an HTM block, or a deliberately constructed sigframe) an illegal TM state (like TS=10 TM=0, i.e. "T0") is set in SRR1 and when `rfid` sets implicitly the MSR register from SRR1 register on return to userspace it causes a TM Bad Thing exception. That illegal state can be set (a) by a malicious user that disables the TM bit by tweaking the bits in uc_mcontext before returning from the signal handler or (b) by a sufficient number of context switches occurring such that the load_tm counter overflows and TM is disabled whilst in the signal handler. This commit fixes the illegal TM state by ensuring that TM bit is always enabled before we return from restore_tm_sigcontexts(). A small comment correction is made as well. Fixes: 5d176f751ee3 ("powerpc: tm: Enable transactional memory (TM) lazily for userspace") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Gustavo Romero Signed-off-by: Breno Leitao Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/signal_64.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 265e60a170d0a0ecfc2d20490134ed2c48dd45ab Author: Cyril Bur Date: Thu Aug 17 20:42:26 2017 +1000 powerpc/64s: Use emergency stack for kernel TM Bad Thing program checks When using transactional memory (TM), the CPU can be in one of six states as far as TM is concerned, encoded in the Machine State Register (MSR). Certain state transitions are illegal and if attempted trigger a "TM Bad Thing" type program check exception. If we ever hit one of these exceptions it's treated as a bug, ie. we oops, and kill the process and/or panic, depending on configuration. One case where we can trigger a TM Bad Thing, is when returning to userspace after a system call or interrupt, using RFID. When this happens the CPU first restores the user register state, in particular r1 (the stack pointer) and then attempts to update the MSR. However the MSR update is not allowed and so we take the program check with the user register state, but the kernel MSR. This tricks the exception entry code into thinking we have a bad kernel stack pointer, because the MSR says we're coming from the kernel, but r1 is pointing to userspace. To avoid this we instead always switch to the emergency stack if we take a TM Bad Thing from the kernel. That way none of the user register values are used, other than for printing in the oops message. This is the fix for CVE-2017-1000255. Fixes: 5d176f751ee3 ("powerpc: tm: Enable transactional memory (TM) lazily for userspace") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Cyril Bur [mpe: Rewrite change log & comments, tweak asm slightly] Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 44fd09dad5d2b78efbabbbbf623774e561e36cca Author: Chaya Rachel Ivgi Date: Mon Sep 4 14:40:06 2017 +0300 iwlwifi: nvm: set the correct offsets to 3168 series The driver currently handles two NVM formats, one for 7000 family and below, and one for 8000 family and above. The 3168 series uses something in between, so currently the driver uses incorrect offsets for it. Fix the incorrect offsets. Fixes: c4836b056d83 ("iwlwifi: Add PCI IDs for the new 3168 series") Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/7000.c | 1 + drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 2 +- .../net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 2 ++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 16 +++++++-- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 39 +++++++++++++--------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 21 ++++++++---- 9 files changed, 59 insertions(+), 28 deletions(-) commit d8c73e455d7b973d1346bb5632b4a41819b090c9 Author: Johannes Berg Date: Thu Sep 21 11:03:50 2017 +0200 iwlwifi: nvm-parse: unify channel flags printing The current channel flags printing is very strange and messy, in LAR we sometimes print the channel number and sometimes the frequency, in both we print a calculated value (whether ad-hoc is supported or not) etc. Unify all this to * print the channel number, not the frequency * remove the band print (2.4/5.2 GHz, it's obvious) * remove the calculated Ad-Hoc print Doing all of this also gets the length of the string to a max of 101 characters, which is below the max of 110 for tracing, and thus avoids the warning that came up on certain channels with certain flag combinations. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 98 +++++++++------------- 1 file changed, 39 insertions(+), 59 deletions(-) commit 1442a9a9f2e441b15393c2d89286303b103a57e8 Author: Luca Coelho Date: Mon Sep 18 14:39:26 2017 +0300 iwlwifi: mvm: return -ENODATA when reading the temperature with the FW down It seems that libsensors treats -EIO as a special non-recoverable failure when it tries to read the temperature while the firmware is not running. To solve that, change the error code to a milder -ENODATA. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=196941 Fixes: c221daf219b1 ("iwlwifi: mvm: add registration to thermal zone") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1efc3843a4ee1331bc20df685a79b47fa0f547d2 Author: Golan Ben Ami Date: Tue Sep 12 12:32:25 2017 +0300 iwlwifi: stop dbgc recording before stopping DMA Today we stop the device and the DMA without stopping the dbgc recording before. This causes host crashes when the DMA rate is high. Stop dbgc recording when clearing the fw debug configuration to fix this. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 7 ++----- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) commit baf41bc35f2bdb953da532645fd82009c2d12acf Author: Shaul Triebitz Date: Wed Sep 13 16:46:14 2017 +0300 iwlwifi: mvm: do not print security error in monitor mode In monitor mode we are not expected to decrypt encrypted packets (not having the keys). Hence we are expected to get an unknown rx security status. Keeping the print in monitor mode causes a print for each captured packet flooding the dmesg. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +++- 4 files changed, 16 insertions(+), 2 deletions(-) commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0 Author: Anton Blanchard Date: Thu Sep 7 15:05:51 2017 +1000 powerpc/powernv: Increase memory block size to 1GB on radix Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in 768MB of memory getting unintentionally unmapped. At this point we are likely to oops. Fix this by increasing our memory block size to 1GB on PowerNV radix hosts. Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1561b3266ebe029c487a95f92d1a58c03ded84a1 Author: Dan Carpenter Date: Thu Oct 5 15:53:47 2017 +0300 selftests/net: rxtimestamp: Fix an off by one The > should be >= so that we don't write one element beyond the end of the array. Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller tools/testing/selftests/networking/timestamping/rxtimestamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baf7c1f7e8f28c83f64a8c229a9357da47c0367a Merge: 00bb09c cb1dab0 Author: Dave Airlie Date: Fri Oct 6 11:09:47 2017 +1000 Merge tag 'drm-misc-fixes-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes One bugfix in sun4i for 4.14 * tag 'drm-misc-fixes-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc: drm/sun4i: hdmi: Disable clks in bind function error path and unbind function commit 00bb09c45cf168c89b93fc3f92c84a1c3236f120 Merge: 1b0e19b 069d40f Author: Dave Airlie Date: Fri Oct 6 11:09:29 2017 +1000 Merge tag 'drm-intel-fixes-2017-10-04' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for 4.14-rc4: All 3 highest GLK bugs fixed by Imre: - GLK drv reload - Fix DDI Phy init if it was already on. - GLK suspend resume - Reprogram DMC firmware after s3/s4. - GLK DC states - Fix idleness calculation. * tag 'drm-intel-fixes-2017-10-04' of git://anongit.freedesktop.org/git/drm-intel: drm/i915/glk: Fix DMC/DC state idleness calculation drm/i915/cnl: Reprogram DMC firmware after S3/S4 resume drm/i915: Fix DDI PHY init if it was already on commit 7a92616c0bac849e790283723b36c399668a1d9f Merge: 076264a ca935f8 Author: Linus Torvalds Date: Thu Oct 5 15:51:37 2017 -0700 Merge tag 'pm-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes a code ordering issue in the main suspend-to-idle loop that causes some "low power S0 idle" conditions to be incorrectly reported as unmet with suspend/resume debug messages enabled" * tag 'pm-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / s2idle: Invoke the ->wake() platform callback earlier commit ca935f8e769c3e36e1b6339cc527a25c49f4d624 Merge: 9e66317 87cbde8 Author: Rafael J. Wysocki Date: Fri Oct 6 00:24:14 2017 +0200 Merge branch 'pm-sleep' * pm-sleep: PM / s2idle: Invoke the ->wake() platform callback earlier commit 076264ada9a307300be7a4581165f9c9deed5d1b Merge: 0f38071 41dcf19 Author: Linus Torvalds Date: Thu Oct 5 15:17:40 2017 -0700 Merge tag 'for-4.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a stable fix for the alignment of the event number reported at the end of the 'DM_LIST_DEVICES' ioctl. - a couple stable fixes for the DM crypt target. - a DM raid health status reporting fix. * tag 'for-4.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm raid: fix incorrect status output at the end of a "recover" process dm crypt: reject sector_size feature if device length is not aligned to it dm crypt: fix memory leak in crypt_ctr_cipher_old() dm ioctl: fix alignment of event number in the device list commit 41dcf197ad5373a7dd0a4b6572aec2e3ec6a0e49 Author: Jonathan Brassow Date: Mon Oct 2 17:17:35 2017 -0500 dm raid: fix incorrect status output at the end of a "recover" process There are three important fields that indicate the overall health and status of an array: dev_health, sync_ratio, and sync_action. They tell us the condition of the devices in the array, and the degree to which the array is synchronized. This commit fixes a condition that is reported incorrectly. When a member of the array is being rebuilt or a new device is added, the "recover" process is used to synchronize it with the rest of the array. When the process is complete, but the sync thread hasn't yet been reaped, it is possible for the state of MD to be: mddev->recovery = [ MD_RECOVERY_RUNNING MD_RECOVERY_RECOVER MD_RECOVERY_DONE ] curr_resync_completed = (but not MaxSector) and all rdevs to be In_sync. This causes the 'array_in_sync' output parameter that is passed to rs_get_progress() to be computed incorrectly and reported as 'false' -- or not in-sync. This in turn causes the dev_health status characters to be reported as all 'a', rather than the proper 'A'. This can cause erroneous output for several seconds at a time when tools will want to be checking the condition due to events that are raised at the end of a sync process. Fix this by properly calculating the 'array_in_sync' return parameter in rs_get_progress(). Also, remove an unnecessary intermediate 'recovery_cp' variable in rs_get_progress(). Signed-off-by: Jonathan Brassow Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 1 + drivers/md/dm-raid.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit ec572b9e81b1df79147c2e6f69458e65cf248598 Author: Eryu Guan Date: Fri Sep 29 15:01:10 2017 +0800 nfsd4: define nfsd4_secinfo_no_name_release() Commit 34b1744c91cc ("nfsd4: define ->op_release for compound ops") defined a couple ->op_release functions and run them if necessary. But there's a problem with that is that it reused nfsd4_secinfo_release() as the op_release of OP_SECINFO_NO_NAME, and caused a leak on struct nfsd4_secinfo_no_name in nfsd4_encode_secinfo_no_name(), because there's no .si_exp field in struct nfsd4_secinfo_no_name. I found this because I was unable to umount an ext4 partition after exporting it via NFS & run fsstress on the nfs mount. A simplified reproducer would be: # mount a local-fs device at /mnt/test, and export it via NFS with # fsid=0 export option (this is required) mount /dev/sda5 /mnt/test echo "/mnt/test *(rw,no_root_squash,fsid=0)" >> /etc/exports service nfs restart # locally mount the nfs export with all default, note that I have # nfsv4.1 configured as the default nfs version, because of the # fsid export option, v4 mount would fail and fall back to v3 mount localhost:/mnt/test /mnt/nfs # try to umount the underlying device, but got EBUSY umount /mnt/nfs service nfs stop umount /mnt/test <=== EBUSY here Fixed it by defining a separate nfsd4_secinfo_no_name_release() function as the op_release method of OP_SECINFO_NO_NAME that releases the correct nfsd4_secinfo_no_name structure. Fixes: 34b1744c91cc ("nfsd4: define ->op_release for compound ops") Signed-off-by: Eryu Guan Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 874d48f2af91efc38c720e7c6450547f6ea8c843 Merge: 77ede3a c1fbc0c Author: Ingo Molnar Date: Thu Oct 5 20:07:08 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20171005' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Two functions from different binaries can have the same start address. Thus, comparing only the start address in match_chain() leads to inconsistent callchains. Fix this by adding a check for DSOs as well (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit e42eef4ba38806b18c4a74f0c276fb2e0b548173 Author: Arnd Bergmann Date: Wed Oct 4 12:28:18 2017 +0200 KVM: add X86_LOCAL_APIC dependency The rework of the posted interrupt handling broke building without support for the local APIC: ERROR: "boot_cpu_physical_apicid" [arch/x86/kvm/kvm-intel.ko] undefined! That configuration is probably not particularly useful anyway, so we can avoid the randconfig failures by adding a Kconfig dependency. Fixes: 8b306e2f3c41 ("KVM: VMX: avoid double list add with VT-d posted interrupts") Signed-off-by: Arnd Bergmann Signed-off-by: Radim Krčmář arch/x86/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0f380715e51f5ff418cfccb4cd0d4fe4c48c3241 Merge: 77ede3a 7682e39 Author: Linus Torvalds Date: Thu Oct 5 10:39:29 2017 -0700 Merge tag 'sound-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes, mostly with stable ones: - X32 ABI fix for PCM; likely not so many people suffer from it, but still better to fix - Two minor kernel warning fixes on USB audio devices spotted by syzkaller - Regression fix of echoaudio due to its inconsistent dimension - Fix for HBR support on Intel DP audio, on some recent chips - USB-audio quirk for yet another Plantronics devices - Fix for potential double-fetch in ASIHPI FIFO queue" * tag 'sound-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usx2y: Suppress kernel warning at page allocation failures Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members" ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor ALSA: pcm: Fix structure definition for X32 ABI ALSA: usb-audio: Add sample rate quirk for Plantronics C310/C520-M ALSA: hda - program ICT bits to support HBR audio ALSA: asihpi: fix a potential double-fetch bug when copying puhm ALSA: compress: Remove unused variable commit ea344f6a507f8ce92bf1e10f044c6cfc67e4d22b Author: Shuah Khan Date: Mon Oct 2 17:02:22 2017 -0600 selftests: mqueue: fix regression in silencing output from RUN_TESTS Fix fix regression in silencing output from RUN_TESTS introduced by commit <8230b905a6780c6> selftests: mqueue: Use full path to run tests from Makefile Signed-off-by: Shuah Khan tools/testing/selftests/mqueue/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3346a6a4e5ba8c040360f753b26938cec31a4bdc Author: Shuah Khan Date: Mon Oct 2 16:16:13 2017 -0600 selftests: x86: sysret_ss_attrs doesn't build on a PIE build sysret_ss_attrs fails to compile leading x86 test run to fail on systems configured to build using PIE by default. Add -no-pie fix it. Relocation might still fail if relocated above 4G. For now this change fixes the build and runs x86 tests. tools/testing/selftests/x86$ make gcc -m64 -o .../tools/testing/selftests/x86/single_step_syscall_64 -O2 -g -std=gnu99 -pthread -Wall single_step_syscall.c -lrt -ldl gcc -m64 -o .../tools/testing/selftests/x86/sysret_ss_attrs_64 -O2 -g -std=gnu99 -pthread -Wall sysret_ss_attrs.c thunks.S -lrt -ldl /usr/bin/ld: /tmp/ccS6pvIh.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:49: recipe for target '.../tools/testing/selftests/x86/sysret_ss_attrs_64' failed make: *** [.../tools/testing/selftests/x86/sysret_ss_attrs_64] Error 1 Suggested-by: Andy Lutomirski Signed-off-by: Shuah Khan tools/testing/selftests/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77ede3a014a32746002f7889211f0cecf4803163 Merge: 9a431ef 66dcdaf Author: Linus Torvalds Date: Thu Oct 5 10:28:12 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID subsystem fixes from Jiri Kosina: - buffer management size fix for i2c-hid driver, from Adrian Salido - tool ID regression fixes for Wacom driver from Jason Gerecke - a few small assorted fixes and a few device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: Revert "HID: multitouch: Support ALPS PTP stick with pid 0x120A" HID: hidraw: fix power sequence when closing device HID: wacom: Always increment hdev refcount within wacom_get_hdev_data HID: wacom: generic: Clear ABS_MISC when tool leaves proximity HID: wacom: generic: Send MSC_SERIAL and ABS_MISC when leaving prox HID: i2c-hid: allocate hid buffers for real worst case HID: rmi: Make sure the HID device is opened on resume HID: multitouch: Support ALPS PTP stick with pid 0x120A HID: multitouch: support buttons and trackpoint on Lenovo X1 Tab Gen2 HID: wacom: Correct coordinate system of touchring and pen twist HID: wacom: Properly report negative values from Intuos Pro 2 Bluetooth HID: multitouch: Fix system-control buttons not working HID: add multi-input quirk for IDC6680 touchscreen HID: wacom: leds: Don't try to control the EKR's read-only LEDs HID: wacom: bits shifted too much for 9th and 10th buttons commit d7b544def408ab5dc724e8887ca696db59cd9216 Merge: eab40cf 8969f1f Author: Jens Axboe Date: Thu Oct 5 10:44:04 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "A trivial one-liner from Martin to fix the visible of the uuid attr, and another one (originally from Abhishek Shah, rewritten by me) to fix the CMB addresses passed back to the controller in case of a system that remaps BAR addresses between host and device." commit 9a431ef9629fa6276aa8bd9ea87fb0728922bd6d Merge: 42b76d0 e769fce Author: Linus Torvalds Date: Thu Oct 5 08:40:09 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Check iwlwifi 9000 reorder buffer out-of-space condition properly, from Sara Sharon. 2) Fix RCU splat in qualcomm rmnet driver, from Subash Abhinov Kasiviswanathan. 3) Fix session and tunnel release races in l2tp, from Guillaume Nault and Sabrina Dubroca. 4) Fix endian bug in sctp_diag_dump(), from Dan Carpenter. 5) Several mlx5 driver fixes from the Mellanox folks (max flow counters cap check, invalid memory access in IPoIB support, etc.) 6) tun_get_user() should bail if skb->len is zero, from Alexander Potapenko. 7) Fix RCU lookups in inetpeer, from Eric Dumazet. 8) Fix locking in packet_do_bund(). 9) Handle cb->start() error properly in netlink dump code, from Jason A. Donenfeld. 10) Handle multicast properly in UDP socket early demux code. From Paolo Abeni. 11) Several erspan bug fixes in ip_gre, from Xin Long. 12) Fix use-after-free in socket filter code, in order to handle the fact that listener lock is no longer taken during the three-way TCP handshake. From Eric Dumazet. 13) Fix infoleak in RTM_GETSTATS, from Nikolay Aleksandrov. 14) Fix tail call generation in x86-64 BPF JIT, from Alexei Starovoitov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits) net: 8021q: skip packets if the vlan is down bpf: fix bpf_tail_call() x64 JIT net: stmmac: dwmac-rk: Add RK3128 GMAC support rndis_host: support Novatel Verizon USB730L net: rtnetlink: fix info leak in RTM_GETSTATS call socket, bpf: fix possible use after free mlxsw: spectrum_router: Track RIF of IPIP next hops mlxsw: spectrum_router: Move VRF refcounting net: hns3: Fix an error handling path in 'hclge_rss_init_hw()' net: mvpp2: Fix clock resource by adding an optional bus clock r8152: add Linksys USB3GIGV1 id l2tp: fix l2tp_eth module loading ip_gre: erspan device should keep dst ip_gre: set tunnel hlen properly in erspan_tunnel_init ip_gre: check packet length and mtu correctly in erspan_xmit ip_gre: get key from session_id correctly in erspan_rcv tipc: use only positive error codes in messages ppp: fix __percpu annotation udp: perform source validation for mcast early demux IPv4: early demux can return an error code ... commit 85fdee1eef1a9e48ad5716916677e0c5fbc781e3 Author: Amir Goldstein Date: Fri Sep 29 10:21:21 2017 +0300 ovl: fix regression caused by exclusive upper/work dir protection Enforcing exclusive ownership on upper/work dirs caused a docker regression: https://github.com/moby/moby/issues/34672. Euan spotted the regression and pointed to the offending commit. Vivek has brought the regression to my attention and provided this reproducer: Terminal 1: mount -t overlay -o workdir=work,lowerdir=lower,upperdir=upper none merged/ Terminal 2: unshare -m Terminal 1: umount merged mount -t overlay -o workdir=work,lowerdir=lower,upperdir=upper none merged/ mount: /root/overlay-testing/merged: none already mounted or mount point busy To fix the regression, I replaced the error with an alarming warning. With index feature enabled, mount does fail, but logs a suggestion to override exclusive dir protection by disabling index. Note that index=off mount does take the inuse locks, so a concurrent index=off will issue the warning and a concurrent index=on mount will fail. Documentation was updated to reflect this change. Fixes: 2cac0c00a6cd ("ovl: get exclusive ownership on upper/work dirs") Cc: # v4.13 Reported-by: Euan Kemp Reported-by: Vivek Goyal Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Documentation/filesystems/overlayfs.txt | 5 ++++- fs/overlayfs/ovl_entry.h | 3 +++ fs/overlayfs/super.c | 27 +++++++++++++++++++-------- 3 files changed, 26 insertions(+), 9 deletions(-) commit 5820dc0888d302ac05f8b91ffdf7e4e53b4fbf53 Author: Amir Goldstein Date: Mon Sep 25 16:39:55 2017 +0300 ovl: fix missing unlock_rename() in ovl_do_copy_up() Use the ovl_lock_rename_workdir() helper which requires unlock_rename() only on lock success. Fixes: ("fd210b7d67ee ovl: move copy up lock out") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 6 ++---- fs/overlayfs/dir.c | 20 -------------------- fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/util.c | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 24 deletions(-) commit dc7ab6773e8171e07f16fd0df0c5eea28c899503 Author: Amir Goldstein Date: Sun Sep 24 22:19:10 2017 +0300 ovl: fix dentry leak in ovl_indexdir_cleanup() index dentry was not released when breaking out of the loop due to index verification error. Fixes: 415543d5c64f ("ovl: cleanup bad and stale index entries on mount") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/readdir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9f4ec904dbd4eb1a2db10d5e7dc16eae386fe64d Author: Amir Goldstein Date: Sun Sep 24 17:36:26 2017 +0300 ovl: fix dput() of ERR_PTR in ovl_cleanup_index() Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e0082a0f04c432cb6d7128ef60d8e425e45ce025 Author: Amir Goldstein Date: Sun Sep 24 13:01:35 2017 +0300 ovl: fix error value printed in ovl_lookup_index() Fixes: 359f392ca53e ("ovl: lookup index entry for copy up origin") Cc: # v4.13 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 1 + 1 file changed, 1 insertion(+) commit 954c736f865d6c0c68ae4263a2f3502ee7c447a3 Author: Amir Goldstein Date: Mon Sep 18 22:53:43 2017 +0300 ovl: fix may_write_real() for overlayfs directories Overlayfs directory file_inode() is the overlay inode whether the real inode is upper or lower. This fixes a regression in xfstest generic/158. Fixes: 7c6893e3c9ab ("ovl: don't allow writing ioctl on lower layer") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/namespace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c1fbc0cf81f1c464f5fda322c1104d4bb1da6711 Author: Ravi Bangoria Date: Thu Oct 5 14:42:34 2017 +0530 perf callchain: Compare dsos (as well) for CCKEY_FUNCTION Two functions from different binaries can have same start address. Thus, comparing only start address in match_chain() leads to inconsistent callchains. Fix this by adding a check for dsos as well. Ex, https://www.spinics.net/lists/linux-perf-users/msg04067.html Reported-by: Alexander Pozdneev Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Krister Johansen Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Cc: zhangmengting@huawei.com Link: http://lkml.kernel.org/r/20171005091234.5874-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f26e60167d8b5b1c67b3efd4cb5672da446bdb0e Author: Josh Poimboeuf Date: Wed Oct 4 10:39:05 2017 -0500 x86/kvm: Move kvm_fastop_exception to .fixup section When compiling the kernel with the '-frecord-gcc-switches' flag, objtool complains: arch/x86/kvm/emulate.o: warning: objtool: .GCC.command.line+0x0: special: can't find new instruction And also the kernel fails to link. The problem is that the 'kvm_fastop_exception' code gets placed into the throwaway '.GCC.command.line' section instead of '.text'. Exception fixup code is conventionally placed in the '.fixup' section, so put it there where it belongs. Reported-and-tested-by: Guenter Roeck Signed-off-by: Josh Poimboeuf Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 25f2f440989c7079fdd8fccd54592cc077b63ae5 Author: Colin Ian King Date: Mon Sep 18 09:15:39 2017 +0100 i2c: i2c-stm32f7: make structure stm32f7_setup static const The structure stm32f7_setup is local to the source and does not need to be in global scope, make it static const. Cleans up sparse warning: symbol 'stm32f7_setup' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a91aee523fb282f8868ba6b918f781679c3ea301 Author: Thomas Meyer Date: Thu Sep 21 08:24:27 2017 +0200 i2c: ensure termination of *_device_id tables 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: Wolfram Sang drivers/i2c/busses/i2c-sprd.c | 1 + 1 file changed, 1 insertion(+) commit cb09d943c70da7c8097006db1dc163b2d99338f6 Author: Jarkko Nikula Date: Thu Sep 21 16:23:16 2017 +0300 i2c: i801: Add support for Intel Cedar Fork Add PCI ID for Intel Cedar Fork PCH. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 1 + drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 4 ++++ 3 files changed, 6 insertions(+) commit 463a9215f3ca7600b5fff6d903913906ae4548a9 Author: Pierre-Yves MORDRET Date: Thu Sep 21 15:30:09 2017 +0200 i2c: stm32f7: fix setup structure I2C drive setup structure is not properly allocated. Make it static instead of pointer to store driver data. Fixes: aeb068c5721485 ("i2c: i2c-stm32f7: add driver") Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f7.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 262e681183ddcdb24d64a2f993e41a226adcec29 Author: Borislav Petkov Date: Mon Oct 2 11:28:36 2017 +0200 x86/mce: Hide mca_cfg Now that lguest is gone, put it in the internal header which should be used only by MCA/RAS code. Add missing header guards while at it. No functional change. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171002092836.22971-3-bp@alien8.de arch/x86/include/asm/mce.h | 1 - arch/x86/kernel/cpu/mcheck/mce-internal.h | 7 +++++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 69a330007091ea8a801dd9fcd897ec52f9529586 Author: Nicolas Iooss Date: Mon Oct 2 11:28:35 2017 +0200 RAS/CEC: Use the right length for "cec_disable" parse_cec_param() compares a string with "cec_disable" using only 7 characters of the 11-character-long string. The proper solution for this would be: #define CEC_DISABLE "cec_disable" strncmp(str, CEC_DISABLE, strlen(CEC_DISABLE)) but when comparing a string against a string constant strncmp() has no advantage over strcmp() because the comparison is guaranteed to be bound by the string constant. So just replace str strncmp() with strcmp(). [ tglx: Made it use strcmp and updated the changelog ] Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Nicolas Iooss Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170903075440.30250-1-nicolas.iooss_linux@m4x.org drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e769fcec6bc4bdd1b0e2cf817680148f9c40b1c4 Author: Vishakha Narvekar Date: Tue Oct 3 16:13:29 2017 -0400 net: 8021q: skip packets if the vlan is down If the vlan is down, free the packet instead of proceeding with other processing, or counting it as received. If vlan interfaces are used as slaves for bonding, with arp monitoring for connectivity, if the rx counter is seen to be incrementing, then the bond device will not observe that the interface is down. CC: David S. Miller Signed-off-by: Vishakha Narvekar Signed-off-by: David S. Miller net/8021q/vlan_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 42b76d0e6b1fe0fcb90e0ff6b4d053d50597b031 Merge: e0a8631 08f8c88 Author: Linus Torvalds Date: Wed Oct 4 17:16:05 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Our first batch of fixes this release cycle, unfortunately a bit noisier than usual. Two major groups stand out: - Some pinctril dts/dtsi changes for stm32 due to a new driver being merged during the merge window, and this aligns the DT contents between the old format and the new. This could arguably be moved to the next merge window but it also seemed relatively harmless to include now. - Amlogic/meson had driver changes merged that required devicetree changes to avoid functional/performance regressions. I've already asked them to be more careful about this going forward, and making sure drivers are compatible with older DTs when they make these kind of changes. The platform is actively being upstreamed so there's a few things in flight, we've seen this happen before and sometimes it's hard to catch in time. Besides that there is the usual mix of minor fixes" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (33 commits) ARM: dts: stm32: use right pinctrl compatible for stm32f469 ARM: dts: stm32: Fix STMPE1600 binding on stm32429i-eval board ARM: defconfig: update Gemini defconfig ARM: defconfig: FRAMEBUFFER_CONSOLE can no longer be =m arm64: dts: rockchip: add the grf clk for dw-mipi-dsi on rk3399 reset: Restrict RESET_HSDK to ARC_SOC_HSDK or COMPILE_TEST ARM: dts: da850-evm: add serial and ethernet aliases ARM: dts: am43xx-epos-evm: Remove extra CPSW EMAC entry ARM: dts: am33xx: Add spi alias to match SOC schematics ARM: OMAP2+: hsmmc: fix logic to call either omap_hsmmc_init or omap_hsmmc_late_init but not both ARM: dts: dra7: Set a default parent to mcasp3_ahclkx_mux ARM: OMAP2+: dra7xx: Set OPT_CLKS_IN_RESET flag for gpio1 ARM: dts: nokia n900: drop unneeded/undocumented parts of the dts arm64: dts: rockchip: Correct MIPI DPHY PLL clock on rk3399 arm64: dt marvell: Fix AP806 system controller size MAINTAINERS: add Macchiatobin maintainers entry ARC: reset: remove the misleading v1 suffix all over ARC: reset: add missing DT binding documentation for HSDKv1 reset driver ARC: reset: Only build on archs that have IOMEM ARM: at91: Replace uses of virt_to_phys with __pa_symbol ... commit e0a86312874e36033cd94fb977dd603a292875c8 Author: James Hogan Date: Wed Oct 4 23:10:59 2017 +0100 Update James Hogan's email address Update my imgtec.com and personal email address to my kernel.org one in a few places as MIPS will soon no longer be part of Imagination Technologies, and add mappings in .mailcap so get_maintainer.pl reports the right address. Signed-off-by: James Hogan Signed-off-by: Linus Torvalds .mailmap | 2 ++ Documentation/ABI/testing/sysfs-power | 2 +- MAINTAINERS | 6 +++--- drivers/i2c/busses/i2c-img-scb.c | 2 +- drivers/media/rc/ir-sharp-decoder.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) commit 069d40f5834ad26a58f269225a7e13af17019062 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 (cherry picked from commit b7208a3f3e52791571df064fb96025ad48edd1bf) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a8408e5372503fe4df9b5bbb49fb3af0c212c67 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 (cherry picked from commit 57522c4c87de20d8f7ad4e142a3a4334066d55ff) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +++ 1 file changed, 3 insertions(+) commit 789f903fd75036f937409a9a1616a5a5e5cc5bae Author: Mustafa Ismail Date: Tue Oct 3 11:11:50 2017 -0500 i40iw: Fix port number for query QP Port number 0 is an invalid port number. Set it to 1 as there is one port per i40iw device. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 43bfc24ec1d69853d706cb3ebfdb9088846b9b50 Author: Mustafa Ismail Date: Tue Oct 3 11:11:49 2017 -0500 i40iw: Add missing memory barriers Remove duplicate set_64bit_val call to offset 24. Replace some instances of set_64bit_val with i40iw_insert_wqe_hdr as valid bit needs a write barrier and should be the last write operation for the WQE. Fixes: 786c6adb3a94 ("i40iw: add puda code") 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_p.h | 2 ++ drivers/infiniband/hw/i40iw/i40iw_puda.c | 11 ++++------- 3 files changed, 7 insertions(+), 8 deletions(-) commit 1736b4c99d1c53abec042d41b702aeabeb65d86a Author: Amrani, Ram Date: Tue Oct 3 14:47:27 2017 +0300 RDMA/qedr: Parse vlan priority as sl Parse the vlan priority from the vlan tag and configure it to the WC's sl field. Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Ram Amrani Signed-off-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr_cm.c | 2 ++ 1 file changed, 2 insertions(+) commit efe63c220e57ce74e240670399912e609ac125d9 Author: Amrani, Ram Date: Tue Oct 3 14:47:26 2017 +0300 RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero Rename vlan_id field name to vlan as it contains more than the vlan_id. Mask out non vlan id fields from vlan tag of the QED LL2 RX GSI vlan output. As it is expected to be vlan id only. Ignore vlan_id with value of zero. Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Ram Amrani Signed-off-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr.h | 2 +- drivers/infiniband/hw/qedr/qedr_cm.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) commit e19cd282ebedb801e572efae5df2f88d573932ce Author: Parav Pandit Date: Sun Oct 1 09:54:35 2017 +0300 IB/mlx5: Fix label order in error path handling When UAR get_page fails, it needs to continue to cleanup debugfs for congestion control parameters. Labels for error path were incorrectly ordered. This patch fixes to do correct cleanup on debugfs init failure and uar get page failure. Fixes: 4a2da0b8c078 ("IB/mlx5: Add debug control parameters for congestion control") Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8fa33a6f6c7688591542db955794b69b8cecc55 Author: Trond Myklebust Date: Wed Oct 4 13:49:12 2017 -0400 NFSv4/pnfs: Fix an infinite layoutget loop Since we can now use a lock stateid or a delegation stateid, that differs from the context stateid, we need to change the test in nfs4_layoutget_handle_exception() to take this into account. This fixes an infinite layoutget loop in the NFS client whereby it keeps retrying the initial layoutget using the same broken stateid. Fixes: 70d2f7b1ea19b ("pNFS: Use the standard I/O stateid when...") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 08f8c8808c924162d8f121a7f669d5dfe67bb51a Merge: eab5c00 2aaae13a Author: Olof Johansson Date: Wed Oct 4 10:31:00 2017 -0700 Merge tag 'stm32-dt-fixes-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into fixes STM32 fixes for v4.14: --------------------- -Fix STMPE1600 bindings for stm32429i-eval board -Use right compatible for stm32f469 pinctrl. It implies to use pinctrl dedicated files for F4 SoCs. * tag 'stm32-dt-fixes-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: use right pinctrl compatible for stm32f469 ARM: dts: stm32: Fix STMPE1600 binding on stm32429i-eval board Signed-off-by: Olof Johansson commit eab5c00201f3acaea0cbb00cdf0bb2f97b67f2c5 Merge: 7ea696a 485a308 Author: Olof Johansson Date: Wed Oct 4 10:30:39 2017 -0700 Merge tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Amlogic 64-bit DT updates for v4.14 (round 3) - updates for new MMC driver features/fixes - support high-speed modes * tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxbb: nanopi-k2: enable sdr104 mode ARM64: dts: meson-gxbb: nanopi-k2: enable sdcard UHS modes ARM64: dts: meson-gxbb: p20x: enable sdcard UHS modes ARM64: dts: meson-gxl: libretech-cc: enable high speed modes ARM64: dts: meson-gxl: libretech-cc: add card regulator settle times ARM64: dts: meson-gxbb: nanopi-k2: add card regulator settle times ARM64: dts: meson: add mmc clk gate pins ARM64: dts: meson: remove cap-sd-highspeed from emmc nodes ARM64: dts: meson-gx: Use correct mmc clock source 0 Signed-off-by: Olof Johansson commit b02faed15d86f846b0f23f47b92e0782baa873ed Author: Mark Rutland Date: Tue Oct 3 18:25:46 2017 +0100 arm64: Use larger stacks when KASAN is selected AddressSanitizer instrumentation can significantly bloat the stack, and with GCC 7 this can result in stack overflows at boot time in some configurations. We can avoid this by doubling our stack size when KASAN is in use, as is already done on x86 (and has been since KASAN was introduced). Regardless of other patches to decrease KASAN's stack utilization, kernels built with KASAN will always require more stack space than those built without, and we should take this into account. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Suzuki K Poulose Signed-off-by: Catalin Marinas arch/arm64/include/asm/memory.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 37f6b42e9c2966b08c7df5cfddc0d73c39cead4a Author: Lorenzo Pieralisi Date: Mon Oct 2 18:28:44 2017 +0100 ACPI/IORT: Fix PCI ACS enablement commit f6810c15cf97 ("iommu/arm-smmu: Clean up early-probing workarounds") removed kernel code that was allowing to initialize and probe the SMMU devices early (ie earlier than PCI devices, through linker script callback entries) in the boot process because it was not needed any longer in that the SMMU devices/drivers now support deferred probing. Since the SMMUs probe routines are also in charge of requesting global PCI ACS kernel enablement, commit f6810c15cf97 ("iommu/arm-smmu: Clean up early-probing workarounds") also postponed PCI ACS enablement to SMMUs devices probe time, which is too late given that PCI devices needs to detect if PCI ACS is enabled to init the respective capability through the following call path: pci_device_add() -> pci_init_capabilities() -> pci_enable_acs() Add code in the ACPI IORT SMMU platform devices initialization path (that is called before ACPI PCI enumeration) to detect if there exists firmware mappings to map root complexes ids to SMMU ids and if so enable ACS for the system. Fixes: f6810c15cf97 ("iommu/arm-smmu: Clean up early-probing workarounds") Reviewed-by: Robin Murphy Tested-by: Nate Watterson Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Zhou Wang Cc: Alex Williamson Signed-off-by: Catalin Marinas drivers/acpi/arm64/iort.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit b7e14164417865e24b6a1b09110b63c01158fc8e Merge: 6c795b3 32e57c2 Author: Linus Torvalds Date: Wed Oct 4 09:30:50 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "A lot of stuff, sorry about that. A week on a beach, then a bunch of time catching up then more time letting it bake in -next. Shan't do that again!" * emailed patches from Andrew Morton : (51 commits) include/linux/fs.h: fix comment about struct address_space checkpatch: fix ignoring cover-letter logic m32r: fix build failure lib/ratelimit.c: use deferred printk() version kernel/params.c: improve STANDARD_PARAM_DEF readability kernel/params.c: fix an overflow in param_attr_show kernel/params.c: fix the maximum length in param_get_string mm/memory_hotplug: define find_{smallest|biggest}_section_pfn as unsigned long mm/memory_hotplug: change pfn_to_section_nr/section_nr_to_pfn macro to inline function kernel/kcmp.c: drop branch leftover typo memremap: add scheduling point to devm_memremap_pages mm, page_alloc: add scheduling point to memmap_init_zone mm, memory_hotplug: add scheduling point to __add_pages lib/idr.c: fix comment for idr_replace() mm: memcontrol: use vmalloc fallback for large kmem memcg arrays kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv() include/linux/bitfield.h: remove 32bit from FIELD_GET comment block lib/lz4: make arrays static const, reduces object code size exec: binfmt_misc: kill the onstack iname[BINPRM_BUF_SIZE] array exec: binfmt_misc: fix race between load_misc_binary() and kill_node() ... commit a2b7861bb33b2538420bb5d8554153484d3f961f Author: Boqun Feng Date: Tue Oct 3 21:36:51 2017 +0800 kvm/x86: Avoid async PF preempting the kernel incorrectly Currently, in PREEMPT_COUNT=n kernel, kvm_async_pf_task_wait() could call schedule() to reschedule in some cases. This could result in accidentally ending the current RCU read-side critical section early, causing random memory corruption in the guest, or otherwise preempting the currently running task inside between preempt_disable and preempt_enable. The difficulty to handle this well is because we don't know whether an async PF delivered in a preemptible section or RCU read-side critical section for PREEMPT_COUNT=n, since preempt_disable()/enable() and rcu_read_lock/unlock() are both no-ops in that case. To cure this, we treat any async PF interrupting a kernel context as one that cannot be preempted, preventing kvm_async_pf_task_wait() from choosing the schedule() path in that case. To do so, a second parameter for kvm_async_pf_task_wait() is introduced, so that we know whether it's called from a context interrupting the kernel, and the parameter is set properly in all the callsites. Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: Wanpeng Li Cc: stable@vger.kernel.org Signed-off-by: Boqun Feng Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_para.h | 4 ++-- arch/x86/kernel/kvm.c | 14 ++++++++++---- arch/x86/kvm/mmu.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 6c795b30f46ff7efec0039095045c2012416670e Merge: 013a8ee 57e7ba0 Author: Linus Torvalds Date: Wed Oct 4 09:21:58 2017 -0700 Merge branch 'fixes-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull smack fix from James Morris: "It fixes a bug in xattr_getsecurity() where security_release_secctx() was being called instead of kfree(), which leads to a memory leak in the capabilities code. smack_inode_getsecurity is also fixed to behave correctly when called from there" * 'fixes-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: lsm: fix smack_inode_removexattr and xattr_getsecurity memleak commit 5dcbeca615ef12047a5f4097b91030cbf995b1d2 Author: Marek Szyprowski Date: Tue Sep 19 12:01:08 2017 +0200 clk: samsung: exynos4: Enable VPLL and EPLL clocks for suspend/resume cycle Commit 6edfa11cb396 ("clk: samsung: Add enable/disable operation for PLL36XX clocks") added enable/disable operations to PLL clocks. Prior that VPLL and EPPL clocks were always enabled because the enable bit was never touched. Those clocks have to be enabled during suspend/resume cycle, because otherwise board fails to enter sleep mode. This patch enables them unconditionally before entering system suspend state. System restore function will set them to the previous state saved in the register cache done before that unconditional enable. Fixes: 6edfa11cb396 ("clk: samsung: Add enable/disable operation for PLL36XX clocks") CC: stable@vger.kernel.org # v4.13 Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos4.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 013a8ee6284280f8032cadfec37bcc3cfbfff81b Merge: d81fa66 f39b536 Author: Linus Torvalds Date: Wed Oct 4 08:34:01 2017 -0700 Merge tag 'trace-v4.14-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixlets from Steven Rostedt: "Two updates: - A memory fix with left over code from spliting out ftrace_ops and function graph tracer, where the function graph tracer could reset the trampoline pointer, leaving the old trampoline not to be freed (memory leak). - The update to Paul's patch that added the unnecessary READ_ONCE(). This removes the unnecessary READ_ONCE() instead of having to rebase the branch to update the patch that added it" * tag 'trace-v4.14-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: rcu: Remove extraneous READ_ONCE()s from rcu_irq_{enter,exit}() ftrace: Fix kmemleak in unregister_ftrace_graph commit 783874b050768d361239e444ba0fa396bb6d463f Author: Milan Broz Date: Wed Sep 13 15:45:56 2017 +0200 dm crypt: reject sector_size feature if device length is not aligned to it If a crypt mapping uses optional sector_size feature, additional restrictions to mapped device segment size must be applied in constructor, otherwise the device activation will fail later. Fixes: 8f0009a225 ("dm crypt: optionally support larger encryption sector size") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69ad59767d094752c23c0fc180a79532fde073d0 Author: Tsutomu Itoh Date: Wed Oct 4 11:05:17 2017 +0900 Btrfs: fix overlap of fs_info::flags values Because the values of BTRFS_FS_EXCL_OP and BTRFS_FS_QUOTA_OVERRIDE overlap, we should change the value. First, BTRFS_FS_EXCL_OP was set to 14. commit 171938e52807 ("btrfs: track exclusive filesystem operation in flags") Next, the value of BTRFS_FS_QUOTA_OVERRIDE was set to 14. commit f29efe292198 ("btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE") As a result, the value 14 overlapped, by accident. This problem is solved by defining the value of BTRFS_FS_EXCL_OP as 16, the flags are internal. Fixes: f29efe292198 ("btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE") CC: stable@vger.kernel.org # 4.13+ Signed-off-by: Tsutomu Itoh Reviewed-by: David Sterba [ minimize the change, update only BTRFS_FS_EXCL_OP ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eab40cf336065e8d765e006b81ff48c5c114b365 Author: Benjamin Block Date: Tue Oct 3 12:48:37 2017 +0200 bsg-lib: fix use-after-free under memory-pressure When under memory-pressure it is possible that the mempool which backs the 'struct request_queue' will make use of up to BLKDEV_MIN_RQ count emergency buffers - in case it can't get a regular allocation. These buffers are preallocated and once they are also used, they are re-supplied with old finished requests from the same request_queue (see mempool_free()). The bug is, when re-supplying the emergency pool, the old requests are not again ran through the callback mempool_t->alloc(), and thus also not through the callback bsg_init_rq(). Thus we skip initialization, and while the sense-buffer still should be good, scsi_request->cmd might have become to be an invalid pointer in the meantime. When the request is initialized in bsg.c, and the user's CDB is larger than BLK_MAX_CDB, bsg will replace it with a custom allocated buffer, which is freed when the user's command is finished, thus it dangles afterwards. When next a command is sent by the user that has a smaller/similar CDB as BLK_MAX_CDB, bsg will assume that scsi_request->cmd is backed by scsi_request->__cmd, will not make a custom allocation, and write into undefined memory. Fix this by splitting bsg_init_rq() into two functions: - bsg_init_rq() is changed to only do the allocation of the sense-buffer, which is used to back the bsg job's reply buffer. This pointer should never change during the lifetime of a scsi_request, so it doesn't need re-initialization. - bsg_initialize_rq() is a new function that makes use of 'struct request_queue's initialize_rq_fn callback (which was introduced in v4.12). This is always called before the request is given out via blk_get_request(). This function does the remaining initialization that was previously done in bsg_init_rq(), and will also do it when the request is taken from the emergency-pool of the backing mempool. Fixes: 50b4d485528d ("bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer") Cc: # 4.11+ Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Benjamin Block Signed-off-by: Jens Axboe block/bsg-lib.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 2d8ce70a08fe033c904115d59276ad86adeaa337 Author: Goffredo Baroncelli Date: Tue Oct 3 19:31:10 2017 +0200 btrfs: avoid overflow when sector_t is 32 bit Jean-Denis Girard noticed commit c821e7f3 "pass bytes to btrfs_bio_alloc" (https://patchwork.kernel.org/patch/9763081/) introduces a regression on 32 bit machines. When CONFIG_LBDAF is _not_ defined (CONFIG_LBDAF == Support for large (2TB+) block devices and files) sector_t is 32 bit on 32bit machines. In the function submit_extent_page, 'sector' (which is sector_t type) is multiplied by 512 to convert it from sectors to bytes, leading to an overflow when the disk is bigger than 4GB (!). I added a cast to u64 to avoid overflow. Fixes: c821e7f3 ("btrfs: pass bytes to btrfs_bio_alloc") CC: stable@vger.kernel.org # 4.13+ Signed-off-by: Goffredo Baroncelli Tested-by: Jean-Denis Girard Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2aaae13a9db7897a007c5d7bb46cacfb37dffacd Author: Alexandre Torgue Date: Wed Oct 4 15:34:48 2017 +0200 ARM: dts: stm32: use right pinctrl compatible for stm32f469 Currently, same stm32f429-pinctrl driver is used for stm32f429 and stm32f469. As pin map is different between those 2 MCUs, a stm32f469-pinctrl driver has been recently added. This patch -allows to use stm32f469-pinctrl driver for stm32f469 boards -reworks stm32 devicetree files to fit with stm32f429 / stm32f469 In the same time it fixes an issue when only MACH_STM32F469 flag is selected in menuconfig. Fixes: d28bcd53fa90 ("ARM: stm32: Introduce MACH_STM32F469 flag") Reported-by: Nicolas Pitre Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32429i-eval.dts | 1 + arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 343 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32f429-disco.dts | 1 + arch/arm/boot/dts/stm32f429-pinctrl.dtsi | 95 +++++++++ arch/arm/boot/dts/stm32f429.dtsi | 297 -------------------------- arch/arm/boot/dts/stm32f469-disco.dts | 1 + arch/arm/boot/dts/stm32f469-pinctrl.dtsi | 96 +++++++++ 7 files changed, 537 insertions(+), 297 deletions(-) commit ad670233c9e1d5feb365d870e30083ef1b889177 Author: Peng Xu Date: Tue Oct 3 23:21:51 2017 +0300 nl80211: Define policy for packet pattern attributes Define a policy for packet pattern attributes in order to fix a potential read over the end of the buffer during nla_get_u32() of the NL80211_PKTPAT_OFFSET attribute. Note that the data there can always be read due to SKB allocation (with alignment and struct skb_shared_info at the end), but the data might be uninitialized. This could be used to leak some data from uninitialized vmalloc() memory, but most drivers don't allow an offset (so you'd just get -EINVAL if the data is non-zero) or just allow it with a fixed value - 100 or 128 bytes, so anything above that would get -EINVAL. With brcmfmac the limit is 1500 so (at least) one byte could be obtained. Cc: stable@kernel.org Signed-off-by: Peng Xu Signed-off-by: Jouni Malinen [rewrite description based on SKB allocation knowledge] Signed-off-by: Johannes Berg net/wireless/nl80211.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7c6a4f3b1641195119ddbb531200f4dc4cecbafa Author: Guenter Roeck Date: Sun Sep 24 10:30:43 2017 -0700 powerpc/mm: Call flush_tlb_kernel_range with interrupts enabled flush_tlb_kernel_range() may call smp_call_function_many() which expects interrupts to be enabled. This results in a traceback. WARNING: CPU: 0 PID: 1 at kernel/smp.c:416 smp_call_function_many+0xcc/0x2fc CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc1-00009-g0666f56 #1 task: cf830000 task.stack: cf82e000 NIP: c00a93c8 LR: c00a9634 CTR: 00000001 REGS: cf82fde0 TRAP: 0700 Not tainted (4.14.0-rc1-00009-g0666f56) MSR: 00021000 CR: 24000082 XER: 00000000 GPR00: c00a9634 cf82fe90 cf830000 c050ad3c c0015a54 00000000 00000001 00000001 GPR08: 00000001 00000000 00000000 cf82e000 24000084 00000000 c0003150 00000000 GPR16: 00000000 00000000 00000000 00000000 00000000 00000001 00000000 c0510000 GPR24: 00000000 c0015a54 00000000 c050ad3c c051823c c050ad3c 00000025 00000000 NIP [c00a93c8] smp_call_function_many+0xcc/0x2fc LR [c00a9634] smp_call_function+0x3c/0x50 Call Trace: [cf82fe90] [00000010] 0x10 (unreliable) [cf82fed0] [c00a9634] smp_call_function+0x3c/0x50 [cf82fee0] [c0015d2c] flush_tlb_kernel_range+0x20/0x38 [cf82fef0] [c001524c] mark_initmem_nx+0x154/0x16c [cf82ff20] [c001484c] free_initmem+0x20/0x4c [cf82ff30] [c000316c] kernel_init+0x1c/0x108 [cf82ff40] [c000f3a8] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 7c0803a6 7d808120 38210040 4e800020 3d20c052 812981a0 2f890000 40beffac 3d20c051 8929ac64 2f890000 40beff9c <0fe00000> 4bffff94 7fc3f378 7f64db78 Fixes: 3184cc4b6f6a ("powerpc/mm: Fix kernel RAM protection after freeing ...") Fixes: e611939fc8ec ("powerpc/mm: Ensure change_page_attr() doesn't ...") Cc: Christophe Leroy Signed-off-by: Guenter Roeck Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc56939802fb4c9548be53563387a0700baeec82 Author: Cédric Le Goater Date: Wed Oct 4 11:15:05 2017 +0200 powerpc/xive: Clear XIVE internal structures when a CPU is removed Commit eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") introduced support for the XIVE exploitation mode of the P9 interrupt controller on the pseries platform. At that time, support for CPU removal was not complete on PowerVM and CPU hot unplug remained untested. It appears that some cleanups of the XIVE internal structures are required before releasing the CPU, without which the kernel crashes in a RTAS call doing the CPU isolation. These changes fix the crash by deconfiguring the IPI interrupt source and clearing the event queues of the CPU when it is removed. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 74f1282114acc7d67e25745efe200f020f823c8a Author: Cédric Le Goater Date: Wed Oct 4 11:15:04 2017 +0200 powerpc/xive: Fix IPI reset When resetting an IPI, hw_ipi should also be set to zero. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/spapr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 986e7b7e4991a5d3abab26f97a671512e09e4417 Author: Chen-Yu Tsai Date: Fri Sep 29 11:25:08 2017 +0800 regulator: axp20x: Fix poly-phase bit offset for AXP803 DCDC5/6 The bit offset used to check if DCDC5 and DCDC6 are tied together in poly-phase output is wrong. It was checking against a reserved bit, which is always false. In reality, neither the reference design layout nor actually produced boards tie these two buck regulators together. But we should still fix it, just in case. Fixes: 1dbe0ccb0631 ("regulator: axp20x-regulator: add support for AXP803") Signed-off-by: Chen-Yu Tsai Tested-by: Maxime Ripard Acked-by: Maxime Ripard Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8969f1f8291762c13147c1ba89d46238af01675b Author: Christoph Hellwig Date: Sun Oct 1 09:37:35 2017 +0200 nvme-pci: Use PCI bus address for data/queues in CMB Currently, NVMe PCI host driver is programming CMB dma address as I/O SQs addresses. This results in failures on systems where 1:1 outbound mapping is not used (example Broadcom iProc SOCs) because CMB BAR will be progammed with PCI bus address but NVMe PCI EP will try to access CMB using dma address. To have CMB working on systems without 1:1 outbound mapping, we program PCI bus address for I/O SQs instead of dma address. This approach will work on systems with/without 1:1 outbound mapping. Based on a report and previous patch from Abhishek Shah. Fixes: 8ffaadf7 ("NVMe: Use CMB for the IO SQes if available") Cc: stable@vger.kernel.org Reported-by: Abhishek Shah Tested-by: Abhishek Shah Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4edd8121e555acbee63578abeaf73026d055bbb4 Author: Alexandre Torgue Date: Wed Oct 4 11:42:00 2017 +0200 ARM: dts: stm32: Fix STMPE1600 binding on stm32429i-eval board To declare gpio interrupt line for STMPE1600, 2 possibilities are offered: -use gpio binding (and then the gpiolib interface inside driver) -use interrupt binding as each gpio-controller are also interrupt controller on stm32f429. In STMPE 1600 node both (gpio and interrupt) bindings are defined. This patch fixes this issue and use only interrupt binding. Fixes: c04b2e72af8d ("ARM: dts: stm32: Enable STMPE1600 gpio expander of STM32F429-EVAL board") Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32429i-eval.dts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0b62bf862dc93a05fea97b6ca6ffca072e2f30c1 Author: Thomas Gleixner Date: Mon Oct 2 20:59:09 2017 +0200 watchdog/core: Put softlockup_threads_initialized under ifdef guard The variable is unused when the softlockup detector is disabled in Kconfig. Signed-off-by: Thomas Gleixner kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 512cf465ee01eb23936a9e6ed0b6414eccb00853 Author: Todd Kjos Date: Fri Sep 29 15:39:49 2017 -0700 binder: fix use-after-free in binder_transaction() User-space normally keeps the node alive when creating a transaction since it has a reference to the target. The local strong ref keeps it alive if the sending process dies before the target process processes the transaction. If the source process is malicious or has a reference counting bug, this can fail. In this case, when we attempt to decrement the node in the failure path, the node has already been freed. This is fixed by taking a tmpref on the node while constructing the transaction. To avoid re-acquiring the node lock and inner proc lock to increment the proc's tmpref, a helper is used that does the ref increments on both the node and proc. Signed-off-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 93 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 27 deletions(-) commit 192b2d78722ffea188e5ec6ae5d55010dce05a4b Author: K. Y. Srinivasan Date: Fri Sep 29 21:09:36 2017 -0700 Drivers: hv: vmbus: Fix bugs in rescind handling This patch addresses the following bugs in the current rescind handling code: 1. Fixes a race condition where we may be invoking hv_process_channel_removal() on an already freed channel. 2. Prevents indefinite wait when rescinding sub-channels by correctly setting the probe_complete state. I would like to thank Dexuan for patiently reviewing earlier versions of this patch and identifying many of the issues fixed here. Greg, please apply this to 4.14-final. Fixes: '54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling")' Signed-off-by: K. Y. Srinivasan Reviewed-by: Dexuan Cui Cc: stable@vger.kernel.org # (4.13 and above) Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 6 +++--- drivers/hv/channel_mgmt.c | 37 ++++++++++++++++++------------------- drivers/hv/vmbus_drv.c | 3 +-- include/linux/hyperv.h | 2 +- 4 files changed, 23 insertions(+), 25 deletions(-) commit 688cb67839e852740d22cf763e5eafb27d5a6e53 Author: Tomas Winkler Date: Sun Sep 24 11:35:34 2017 +0300 mei: me: add gemini lake devices id Add Gemini Lake (GLK) device id. Signed-off-by: Tomas Winkler Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+) commit b42dc0635bf0a6aa59fe4d7c826796ff659908c7 Author: Alexander Usyskin Date: Tue Sep 26 09:18:27 2017 +0300 mei: always use domain runtime pm callbacks. This patch fixes a regression caused by the new changes in the "run wake" handlers. The mei devices that support D0i3 are no longer receiving an interrupt after entering runtime suspend state and will stall. pci_dev_run_wake function now returns "true" for some devices (including mei) for which it used to return "false", arguably incorrectly as "run wake" used to mean that wakeup signals can be generated for a device in the working state of the system, so it could not be enabled or disabled before too. MEI maps runtime suspend/resume to its own defined power gating (PG) states, (D0i3 or other depending on generation), hence we need to go around the native PCI runtime service which eventually brings the device into D3cold/hot state, but the mei devices cannot wake up from D3 unlike from D0i3/PG state, which keeps irq running. To get around PCI device native runtime pm, MEI uses runtime pm domain handlers which take precedence. Cc: #4.13+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/pci-me.c | 21 +++++++++++---------- drivers/misc/mei/pci-txe.c | 30 +++++++++++------------------- 2 files changed, 22 insertions(+), 29 deletions(-) commit 5587185ddb4b9f413299dfec0a022ad0212513e8 Author: Thomas Gleixner Date: Wed Oct 4 10:03:04 2017 +0200 watchdog/core: Rename some softlockup_* functions The function names made sense up to the point where the watchdog (re)configuration was unified to use softlockup_reconfigure_threads() for all configuration purposes. But that includes scenarios which solely configure the nmi watchdog. Rename softlockup_reconfigure_threads() and softlockup_init_threads() so the function names match the functionality. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Don Zickus kernel/watchdog.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 34ddaa3e5c0096fef52485186c7eb6cf56ddc686 Author: Thomas Gleixner Date: Tue Oct 3 16:39:02 2017 +0200 powerpc/watchdog: Make use of watchdog_nmi_probe() The rework of the core hotplug code triggers the WARN_ON in start_wd_cpu() on powerpc because it is called multiple times for the boot CPU. The first call is via: start_wd_on_cpu+0x80/0x2f0 watchdog_nmi_reconfigure+0x124/0x170 softlockup_reconfigure_threads+0x110/0x130 lockup_detector_init+0xbc/0xe0 kernel_init_freeable+0x18c/0x37c kernel_init+0x2c/0x160 ret_from_kernel_thread+0x5c/0xbc And then again via the CPU hotplug registration: start_wd_on_cpu+0x80/0x2f0 cpuhp_invoke_callback+0x194/0x620 cpuhp_thread_fun+0x7c/0x1b0 smpboot_thread_fn+0x290/0x2a0 kthread+0x168/0x1b0 ret_from_kernel_thread+0x5c/0xbc This can be avoided by setting up the cpu hotplug state with nocalls and move the initialization to the watchdog_nmi_probe() function. That initializes the hotplug callbacks without invoking the callback and the following core initialization function then configures the watchdog for the online CPUs (in this case CPU0) via softlockup_reconfigure_threads(). Reported-and-tested-by: Michael Ellerman Signed-off-by: Thomas Gleixner Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org arch/powerpc/kernel/watchdog.c | 17 ++++++++--------- include/linux/nmi.h | 1 + kernel/watchdog.c | 5 ++++- 3 files changed, 13 insertions(+), 10 deletions(-) commit e31d6883f21c1cdfe5bc64e28411f8a92b783fde Author: Thomas Gleixner Date: Tue Oct 3 16:37:53 2017 +0200 watchdog/core, powerpc: Lock cpus across reconfiguration Instead of dropping the cpu hotplug lock after stopping NMI watchdog and threads and reaquiring for restart, the code and the protection rules become more obvious when holding cpu hotplug lock across the full reconfiguration. Suggested-by: Linus Torvalds Signed-off-by: Thomas Gleixner Acked-by: Michael Ellerman Cc: Peter Zijlstra Cc: Don Zickus Cc: Benjamin Herrenschmidt Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1710022105570.2114@nanos arch/powerpc/kernel/watchdog.c | 4 ---- kernel/smpboot.c | 3 +-- kernel/watchdog.c | 10 +++++++++- 3 files changed, 10 insertions(+), 7 deletions(-) commit 6b9dc4806b28214a4a260517e59439e0ac12a15e Author: Thomas Gleixner Date: Mon Oct 2 12:34:50 2017 +0200 watchdog/core, powerpc: Replace watchdog_nmi_reconfigure() The recent cleanup of the watchdog code split watchdog_nmi_reconfigure() into two stages. One to stop the NMI and one to restart it after reconfiguration. That was done by adding a boolean 'run' argument to the code, which is functionally correct but not necessarily a piece of art. Replace it by two explicit functions: watchdog_nmi_stop() and watchdog_nmi_start(). Fixes: 6592ad2fcc8f ("watchdog/core, powerpc: Make watchdog_nmi_reconfigure() two stage") Requested-by: Linus 'Nursing his pet-peeve' Torvalds Signed-off-by: Thomas 'Mopping up garbage' Gleixner Acked-by: Michael Ellerman Cc: Peter Zijlstra Cc: Don Zickus Cc: Benjamin Herrenschmidt Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1710021957480.2114@nanos arch/powerpc/kernel/watchdog.c | 23 ++++++++++++++--------- include/linux/nmi.h | 3 ++- kernel/watchdog.c | 33 ++++++++++++++++++--------------- 3 files changed, 34 insertions(+), 25 deletions(-) commit bb16ea1742c8f35a9349b7508dc45d3a922db5f5 Author: Gregory CLEMENT Date: Mon Oct 2 16:58:52 2017 +0200 mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock On Armada 7K/8K we need to explicitly enable the bus clock. The bus clock is optional because not all the SoCs need them but at least for Armada 7K/8K it is actually mandatory. The binding documentation is updating accordingly. Without this patch the kernel hand during boot if the mvpp2.2 network driver was not present in the kernel. Indeed the clock needed by the xenon controller was set by the network driver. Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality)" CC: Stable Tested-by: Zhoujie Wu Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson .../bindings/mmc/marvell,xenon-sdhci.txt | 12 ++++++----- drivers/mmc/host/sdhci-xenon.c | 24 ++++++++++++++++++---- drivers/mmc/host/sdhci-xenon.h | 1 + 3 files changed, 28 insertions(+), 9 deletions(-) commit 0a44697627d17a66d7dc98f17aeca07ca79c5c20 Author: Jerome Brunet Date: Mon Oct 2 14:27:43 2017 +0200 mmc: meson-gx: include tx phase in the tuning process It has been reported that some platforms (odroid-c2) may require a different tx phase setting to operate at high speed (hs200 and hs400) To improve the situation, this patch includes tx phase in the tuning process. Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function") Reported-by: Heiner Kallweit Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 3e2b0af411d4bf85bc0fbc385756fd5968adb9fd Author: Jerome Brunet Date: Mon Oct 2 14:27:42 2017 +0200 mmc: meson-gx: fix rx phase reset Resetting the phase when POWER_ON is set the set_ios() call means that the phase is reset almost every time the set_ios() is called, while the expected behavior was to reset the phase on a power cycle. This had gone unnoticed until now because in all mode (except hs400) the tuning is done after the last to set_ios(). In such case, the tuning result is used anyway. In HS400, there are a few calls to set_ios() after the tuning is done, overwriting the tuning result. Resetting the phase on POWER_UP instead of POWER_ON solve the problem. Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function") Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ca3dcd3ff5b13a31a09a0119dc484b97ec19c4c8 Author: Jerome Brunet Date: Mon Oct 2 14:27:41 2017 +0200 mmc: meson-gx: make sure the clock is rounded down Using CLK_DIVIDER_ROUND_CLOSEST is unsafe as the mmc clock could be rounded to a rate higher the specified rate. Removing this flag ensure that, if the rate needs to be rounded, it will be rounded down. Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f450f28e70a2378d9d6ded0932fe480055888cfa Author: Dinh Nguyen Date: Fri Sep 22 13:42:47 2017 -0500 reset: socfpga: fix for 64-bit compilation The SoCFPGA Stratix10 reset controller has 32-bit registers. Thus, we cannot use BITS_PER_LONG in computing the register and bit offset. Instead, we should be using the width of the hardware register for the calculation. Signed-off-by: Dinh Nguyen Signed-off-by: Philipp Zabel drivers/reset/reset-socfpga.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit de3ee99b097dd51938276e3af388cd4ad0f2750a Author: Linus Walleij Date: Wed Sep 20 10:56:14 2017 +0200 mmc: Delete bounce buffer handling In may, Steven sent a patch deleting the bounce buffer handling and the CONFIG_MMC_BLOCK_BOUNCE option. I chose the less invasive path of making it a runtime config option, and we merged that successfully for kernel v4.12. The code is however just standing in the way and taking up space for seemingly no gain on any systems in wide use today. Pierre says the code was there to improve speed on TI SDHCI controllers on certain HP laptops and possibly some Ricoh controllers as well. Early SDHCI controllers lacked the scatter-gather feature, which made software bounce buffers a significant speed boost. We are clearly talking about the list of SDHCI PCI-based MMC/SD card readers found in the pci_ids[] list in drivers/mmc/host/sdhci-pci-core.c. The TI SDHCI derivative is not supported by the upstream kernel. This leaves the Ricoh. What we can however notice is that the x86 defconfigs in the kernel did not enable CONFIG_MMC_BLOCK_BOUNCE option, which means that any such laptop would have to have a custom configured kernel to actually take advantage of this bounce buffer speed-up. It simply seems like there was a speed optimization for the Ricoh controllers that noone was using. (I have not checked the distro defconfigs but I am pretty sure the situation is the same there.) Bounce buffers increased performance on the OMAP HSMMC at one point, and was part of the original submission in commit a45c6cb81647 ("[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3") This optimization was removed in commit 0ccd76d4c236 ("omap_hsmmc: Implement scatter-gather emulation") which found that scatter-gather emulation provided even better performance. The same was introduced for SDHCI in commit 2134a922c6e7 ("sdhci: scatter-gather (ADMA) support") I am pretty positively convinced that software scatter-gather emulation will do for any host controller what the bounce buffers were doing. Essentially, the bounce buffer was a reimplementation of software scatter-gather-emulation in the MMC subsystem, and it should be done away with. Cc: Pierre Ossman Cc: Juha Yrjola Cc: Steven J. Hill Cc: Shawn Lin Cc: Adrian Hunter Suggested-by: Steven J. Hill Suggested-by: Shawn Lin Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 -- drivers/mmc/core/queue.c | 125 ++++------------------------------------------ drivers/mmc/core/queue.h | 6 --- drivers/mmc/host/cavium.c | 2 +- drivers/mmc/host/pxamci.c | 6 +-- include/linux/mmc/host.h | 2 +- 6 files changed, 12 insertions(+), 132 deletions(-) commit 57e7ba04d422c3d41c8426380303ec9b7533ded9 Author: Casey Schaufler Date: Tue Sep 19 09:39:08 2017 -0700 lsm: fix smack_inode_removexattr and xattr_getsecurity memleak security_inode_getsecurity() provides the text string value of a security attribute. It does not provide a "secctx". The code in xattr_getsecurity() that calls security_inode_getsecurity() and then calls security_release_secctx() happened to work because SElinux and Smack treat the attribute and the secctx the same way. It fails for cap_inode_getsecurity(), because that module has no secctx that ever needs releasing. It turns out that Smack is the one that's doing things wrong by not allocating memory when instructed to do so by the "alloc" parameter. The fix is simple enough. Change the security_release_secctx() to kfree() because it isn't a secctx being returned by security_inode_getsecurity(). Change Smack to allocate the string when told to do so. Note: this also fixes memory leaks for LSMs which implement inode_getsecurity but not release_secctx, such as capabilities. Signed-off-by: Casey Schaufler Reported-by: Konstantin Khlebnikov Cc: stable@vger.kernel.org Signed-off-by: James Morris fs/xattr.c | 2 +- security/smack/smack_lsm.c | 55 +++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 31 deletions(-) commit 3dd40cb320fee7c23b574ab821ce140ccd1281c9 Author: Josh Poimboeuf Date: Tue Oct 3 20:10:36 2017 -0500 objtool: Upgrade libelf-devel warning to error for CONFIG_ORC_UNWINDER With CONFIG_ORC_UNWINDER, if the user doesn't have libelf-devel installed, and they don't see the make warning, their ORC unwinder will be silently broken. Upgrade the warning to an error. Reported-and-tested-by: Borislav Petkov Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/d9dfc39fb8240998820f9efb233d283a1ee96084.1507079417.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e12199f85d0ad1b04ce6c425ad93cd847fe930bb Author: Christoph Hellwig Date: Tue Oct 3 08:58:33 2017 -0700 xfs: handle racy AIO in xfs_reflink_end_cow If we got two AIO writes into a COW area the second one might not have any COW extents left to convert. Handle that case gracefully instead of triggering an assert or accessing beyond the bounds of the extent list. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 52bfcdd7adbc26639bc7b2356ab9a3f5dad68ad6 Author: Darrick J. Wong Date: Mon Sep 18 09:41:18 2017 -0700 xfs: always swap the cow forks when swapping extents Since the CoW fork exists as a secondary data structure to the data fork, we must always swap cow forks during swapext. We also need to swap the extent counts and reset the cowblocks tags. Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit edb40d74c08edfd049cbba15479dadd9aeb7d307 Author: Eugeniy Paltsev Date: Thu Sep 28 17:33:29 2017 +0300 ARC: [plat-hsdk]: Temporary fix to set CPU frequency to 1GHz Add temporary fix to HSDK platform code to setup CPU frequency to 1GHz on early boot. We can remove this fix when smart hsdk pll driver will be introduced, see discussion: https://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg02689.html Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/plat-hsdk/platform.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 5464d03d92601ac2977ef605b0cbb33276567daf Author: Vineet Gupta Date: Fri Sep 29 14:46:50 2017 -0700 ARC: fix allnoconfig build warning Reported-by: Dmitrii Kolesnichenko Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dea8252059a3210340f255bf69d67225b9af552d Author: Vineet Gupta Date: Thu Sep 21 18:02:44 2017 -0700 ARCv2: boot log: identify HS48 cores (dual issue) Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 3 ++- arch/arc/kernel/setup.c | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) commit 010a8c98884f4ca42a167c9b51470c624daa2932 Author: Vineet Gupta Date: Thu Sep 21 17:46:38 2017 -0700 ARC: boot log: decontaminate ARCv2 ISA_CONFIG register ARCv2 ISA_CONFIG and ARC700_BUILD build config registers are not compatible. cpuinfo_arc had isa info placeholder which was mashup of bits form both. Untangle this by defining it off of ARCv2 ISA info and it is fine even for ARC700 since former is a super set of latter (ARC700 buildonly has 2 bits for atomics and stack check). At runtime, we treat ARCv2 ISA info as a generic placeholder but populate it correctly depending on ARC700 or HS. This paves way for adding more HS specific bits in isa info which was colliding with the extra bits for arc700. Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 8 ++++---- arch/arc/kernel/setup.c | 15 +++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) commit d9bc84a808572451f95fb1dde80cb8d12be05665 Author: Masahiro Yamada Date: Wed Sep 20 20:25:30 2017 +0900 arc: remove redundant UTS_MACHINE define in arch/arc/Makefile The top-level Makefile sets the default of UTS_MACHINE to $(ARCH). If ARCH and UTS_MACHINE match, arch/$(ARCH)/Makefile need not specify UTS_MACHINE explicitly. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta arch/arc/Makefile | 2 -- 1 file changed, 2 deletions(-) commit bd6d3588c834e3087ad0229ff0da651bbccf5e24 Author: Vineet Gupta Date: Mon Sep 11 09:48:46 2017 -0700 ARC: [plat-eznps] Update platform maintainer as Noam left Signed-off-by: Vineet Gupta MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef833eab1ddec06982ea620086b03d67ef4ddf9b Author: Eugeniy Paltsev Date: Mon Sep 4 12:48:43 2017 +0300 ARC: [plat-hsdk] use actual clk driver to manage cpu clk With corresponding clk driver now merged upstream, switch to it. - core_clk now represent the PLL (vs. fixed clk before) - input_clk represent the clk signal src for PLL (basically xtal) Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 11 +++++++++-- arch/arc/plat-hsdk/Kconfig | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) commit 9583833e9e3628177661e815e5ce80dd3955d82f Author: Alexey Brodkin Date: Fri Sep 8 23:12:59 2017 +0300 ARC: [*defconfig] Reenable soft lock-up detector Commit 92e5aae45778 "kernel/watchdog: split up config options" introduced SOFTLOCKUP_DETECTOR which selects LOCKUP_DETECTOR instead of the latter to be selected itself. We need to adjust our defconfigs accordingly. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/configs/axs101_defconfig | 2 +- arch/arc/configs/axs103_defconfig | 2 +- arch/arc/configs/axs103_smp_defconfig | 2 +- arch/arc/configs/haps_hs_smp_defconfig | 2 +- arch/arc/configs/hsdk_defconfig | 2 +- arch/arc/configs/vdk_hs38_defconfig | 2 +- arch/arc/configs/vdk_hs38_smp_defconfig | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 976e78a5226598cb582fe9ef98a72861adbc0e9c Author: Eugeniy Paltsev Date: Tue Sep 12 21:20:45 2017 +0300 ARC: [plat-axs10x] sdio: Temporary fix of sdio ciu frequency DW sdio controller has external ciu clock divider controlled via register in SDIO IP. It divides sdio_ref_clk (which comes from CGU) by 16 for default. So default mmcclk clock (which comes to sdk_in) is 25000000 Hz. So fix wrong current value (50000000 Hz) to actual 25000000 Hz. Note this is a preventive fix, in line with similar change for HSDK where this was actually needed. see: http://lists.infradead.org/pipermail/linux-snps-arc/2017-September/002924.html Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6afa3bcf1f919c374d4606a7ed8078d3f67dfa90 Author: Eugeniy Paltsev Date: Fri Sep 8 21:42:33 2017 +0300 ARC: [plat-hsdk] sdio: Temporary fix of sdio ciu frequency DW sdio controller has external ciu clock divider controlled via register in SDIO IP. Due to its unexpected default value (it should divide by 1 but it divides by 8) SDIO IP uses wrong ciu clock and works unstable So add temporary fix and change clock frequency from 100000000 to 12500000 Hz until we fix dw sdio driver itself. Fixes SNPS STAR 9001204800 Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 043d1e729b0fbaf2b69386fe45290b8a9a18a6a9 Author: Eugeniy Paltsev Date: Wed Sep 6 21:21:08 2017 +0300 ARC: [plat-axs103] Add temporary quirk to reset ethernet IP DW ethernet controller on AXS10x hangs sometimes after SW reset, so add temporary quirk to reset DW ethernet controller IP core. This quirk can be removed after axs10x reset driver (see http://patchwork.ozlabs.org/patch/800273/) or simple reset driver (see https://patchwork.kernel.org/patch/9903375/) will be available in upstream. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/plat-axs10x/axs10x.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7ea696af44c47af742977e86222c47254f152502 Merge: 081069e 4afa616 Author: Olof Johansson Date: Tue Oct 3 18:15:58 2017 -0700 Merge tag 'omap-for-v4.14/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.14-rc cycle Few minor fixes for omaps, mostly just boot time warning fixes: - Drop undocumented camera binding that got merged during the merge window by accident as I applied before Sakari's comments - Fix soft reset warning for dra7 kexec boot for gpio1 as the optional clocks need to be enabled for reset - Fix dra7 kexec boot clock rate for McASP as the rate is no longer the default rate after kexec - Fix omap3 pandora MMC warning during boot - Add am33xx SPI alias like we have on other SoCs - Remove node for non-existing CPSW EMAC Ethernet on am43xx-epos-evm * tag 'omap-for-v4.14/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am43xx-epos-evm: Remove extra CPSW EMAC entry ARM: dts: am33xx: Add spi alias to match SOC schematics ARM: OMAP2+: hsmmc: fix logic to call either omap_hsmmc_init or omap_hsmmc_late_init but not both ARM: dts: dra7: Set a default parent to mcasp3_ahclkx_mux ARM: OMAP2+: dra7xx: Set OPT_CLKS_IN_RESET flag for gpio1 ARM: dts: nokia n900: drop unneeded/undocumented parts of the dts Signed-off-by: Olof Johansson commit 081069efb680a3701113d220a45ab86615d96abf Merge: aab4b41 0bc15d8 Author: Olof Johansson Date: Tue Oct 3 18:13:35 2017 -0700 Merge tag 'v4.14-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Adding the operating points on rk3368 like they were did not end up well for the boards as all of them are missing their cpu supplies, the OPPs actually need to follow the format as the regulator is shared between both clusters and the one rk3368 board I have, somehow also doesn't like the higher opps at all - all of which I only realized after I brought my rk3368 board online again, after its bootloader broke. So we revert that OPP addition for now. And also two fixes for the mipi dsi controller on rk3399, which was referencing a clock to high up in the clock-tree so that an intermediate gate could be disabled inadvertently and also needs a clock for its area in the general register files of the rk3399 soc. * tag 'v4.14-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add the grf clk for dw-mipi-dsi on rk3399 arm64: dts: rockchip: Correct MIPI DPHY PLL clock on rk3399 Revert "arm64: dts: rockchip: Add basic cpu frequencies for RK3368" Signed-off-by: Olof Johansson commit aab4b4177eb51f5a0a162600f25e75f9dd487d71 Merge: 180eb4f 9e7460f Author: Olof Johansson Date: Tue Oct 3 18:10:40 2017 -0700 Merge tag 'mvebu-fixes-4.14-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.14 (part 1) Update MAINTAINERS for the Macchiatobin board (Armada 8K based) Fix AP806 system controller size on Armada 7K/8K * tag 'mvebu-fixes-4.14-1' of git://git.infradead.org/linux-mvebu: arm64: dt marvell: Fix AP806 system controller size MAINTAINERS: add Macchiatobin maintainers entry Signed-off-by: Olof Johansson commit 180eb4f17eab106982ef100787a485974bef4749 Merge: 5f3daa2 544e3bf Author: Olof Johansson Date: Tue Oct 3 18:10:12 2017 -0700 Merge tag 'reset-fixes-for-4.14' of git://git.pengutronix.de/git/pza/linux into fixes Reset controller fixes for v4.14 - Remove misleading HSDK v1 suffix, as there is no v2 planned - Add missing DT binding documentation for HSDK reset driver - Fix HSDK reset driver dependencies * tag 'reset-fixes-for-4.14' of git://git.pengutronix.de/git/pza/linux: reset: Restrict RESET_HSDK to ARC_SOC_HSDK or COMPILE_TEST ARC: reset: remove the misleading v1 suffix all over ARC: reset: add missing DT binding documentation for HSDKv1 reset driver ARC: reset: Only build on archs that have IOMEM Signed-off-by: Olof Johansson commit 5f3daa2393889cf1bbcbc8209b292fb2db4a8806 Merge: 24f5a73 ce21574 Author: Olof Johansson Date: Tue Oct 3 18:09:08 2017 -0700 Merge tag 'davinci-fixes-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes A fix for random ethernet mac address problem on DA850 EVM. * tag 'davinci-fixes-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-evm: add serial and ethernet aliases Signed-off-by: Olof Johansson commit 24f5a731e51eedd183e4e972d676cd9d3f1b20d3 Merge: 0694b2e 093d79f Author: Olof Johansson Date: Tue Oct 3 18:08:27 2017 -0700 Merge tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes Fixes for 4.14: - three DT fixes for the newly introduced sama5d27_som1_ek board - one treewide modification that didn't touch this new PM code: we synchronize now to be coherent with the other ARM platforms * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: at91: Replace uses of virt_to_phys with __pa_symbol ARM: dts: at91: sama5d27_som1_ek: fix USB host vbus ARM: dts: at91: sama5d27_som1_ek: fix typos ARM: dts: at91: sama5d27_som1_ek: update pinmux/pinconf for LEDs and USB Signed-off-by: Olof Johansson commit 0694b2ee87ee1a6d83acf1a66b92c8e64ceb38f2 Author: Linus Walleij Date: Sun Sep 17 16:26:18 2017 +0200 ARM: defconfig: update Gemini defconfig This updates the Gemini defconfig with drivers merged for v4.13 or v4.14: - ATA driver is merged - DMA driver is merged - RTC driver gets selected from default Kconfig Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/gemini_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4c77f8b9b213c6315faba109c03b0db873db200 Author: Arnd Bergmann Date: Mon Sep 18 17:47:50 2017 +0200 ARM: defconfig: FRAMEBUFFER_CONSOLE can no longer be =m It is no longer possible to load this at runtime, so let's change the few remaining users to have it built-in all the time. arch/arm/configs/zeus_defconfig:115:warning: symbol value 'm' invalid for FRAMEBUFFER_CONSOLE arch/arm/configs/viper_defconfig:116:warning: symbol value 'm' invalid for FRAMEBUFFER_CONSOLE arch/arm/configs/pxa_defconfig:474:warning: symbol value 'm' invalid for FRAMEBUFFER_CONSOLE Reported-by: kernelci.org bot Fixes: 6104c37094e7 ("fbcon: Make fbcon a built-time depency for fbdev") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/viper_defconfig | 2 +- arch/arm/configs/zeus_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 32e57c29e3c038ac802b7cc214a8795a4234055f Author: Mike Rapoport Date: Tue Oct 3 16:16:54 2017 -0700 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. Link: http://lkml.kernel.org/r/1507009987-8746-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a08ffbef4ab799351d0610bbdbeaa1ee746b9065 Author: Stafford Horne Date: Tue Oct 3 16:16:51 2017 -0700 checkpatch: fix ignoring cover-letter logic Currently running checkpatch on a directory with a cover-letter.patch file reports the following error: ----------------------------------------- patches/smp-v2/v2-0000-cover-letter.patch ----------------------------------------- ERROR: Does not appear to be a unified-diff format patch The logic to suppress the unified-diff check for cover letters is there but is checking $file instead of $filename. Fix the variable to use the correct one. Link: http://lkml.kernel.org/r/20170909090406.31523-1-shorne@gmail.com Signed-off-by: Stafford Horne 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 d22e3d69ee1a3f83ff7cc943af63de48b6156dcf Author: Sudip Mukherjee Date: Tue Oct 3 16:16:49 2017 -0700 m32r: fix build failure The allmodconfig build of m32r is failing with the error: lib/mpi/mpih-div.o: In function 'mpihelp_divrem': mpih-div.c:(.text+0x40): undefined reference to 'abort' mpih-div.c:(.text+0x40): relocation truncated to fit: R_M32R_26_PCREL_RELA against undefined symbol 'abort' The function 'abort' was never defined for the m32r architecture. Create 'abort' as is done in other arch like 'arm' and 'unicore32'. Link: http://lkml.kernel.org/r/1506727220-6108-1-git-send-email-sudip.mukherjee@codethink.co.uk Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/kernel/traps.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 656d61ce9666209c4c4a13c71902d3ee70d1ff6f Author: Sergey Senozhatsky Date: Tue Oct 3 16:16:45 2017 -0700 lib/ratelimit.c: use deferred printk() version printk_ratelimit() invokes ___ratelimit() which may invoke a normal printk() (pr_warn() in this particular case) to warn about suppressed output. Given that printk_ratelimit() may be called from anywhere, that pr_warn() is dangerous - it may end up deadlocking the system. Fix ___ratelimit() by using deferred printk(). Sasha reported the following lockdep error: : Unregister pv shared memory for cpu 8 : select_fallback_rq: 3 callbacks suppressed : process 8583 (trinity-c78) no longer affine to cpu8 : : ====================================================== : WARNING: possible circular locking dependency detected : 4.14.0-rc2-next-20170927+ #252 Not tainted : ------------------------------------------------------ : migration/8/62 is trying to acquire lock: : (&port_lock_key){-.-.}, at: serial8250_console_write() : : but task is already holding lock: : (&rq->lock){-.-.}, at: sched_cpu_dying() : : which lock already depends on the new lock. : : : the existing dependency chain (in reverse order) is: : : -> #3 (&rq->lock){-.-.}: : __lock_acquire() : lock_acquire() : _raw_spin_lock() : task_fork_fair() : sched_fork() : copy_process.part.31() : _do_fork() : kernel_thread() : rest_init() : start_kernel() : x86_64_start_reservations() : x86_64_start_kernel() : verify_cpu() : : -> #2 (&p->pi_lock){-.-.}: : __lock_acquire() : lock_acquire() : _raw_spin_lock_irqsave() : try_to_wake_up() : default_wake_function() : woken_wake_function() : __wake_up_common() : __wake_up_common_lock() : __wake_up() : tty_wakeup() : tty_port_default_wakeup() : tty_port_tty_wakeup() : uart_write_wakeup() : serial8250_tx_chars() : serial8250_handle_irq.part.25() : serial8250_default_handle_irq() : serial8250_interrupt() : __handle_irq_event_percpu() : handle_irq_event_percpu() : handle_irq_event() : handle_level_irq() : handle_irq() : do_IRQ() : ret_from_intr() : native_safe_halt() : default_idle() : arch_cpu_idle() : default_idle_call() : do_idle() : cpu_startup_entry() : rest_init() : start_kernel() : x86_64_start_reservations() : x86_64_start_kernel() : verify_cpu() : : -> #1 (&tty->write_wait){-.-.}: : __lock_acquire() : lock_acquire() : _raw_spin_lock_irqsave() : __wake_up_common_lock() : __wake_up() : tty_wakeup() : tty_port_default_wakeup() : tty_port_tty_wakeup() : uart_write_wakeup() : serial8250_tx_chars() : serial8250_handle_irq.part.25() : serial8250_default_handle_irq() : serial8250_interrupt() : __handle_irq_event_percpu() : handle_irq_event_percpu() : handle_irq_event() : handle_level_irq() : handle_irq() : do_IRQ() : ret_from_intr() : native_safe_halt() : default_idle() : arch_cpu_idle() : default_idle_call() : do_idle() : cpu_startup_entry() : rest_init() : start_kernel() : x86_64_start_reservations() : x86_64_start_kernel() : verify_cpu() : : -> #0 (&port_lock_key){-.-.}: : check_prev_add() : __lock_acquire() : lock_acquire() : _raw_spin_lock_irqsave() : serial8250_console_write() : univ8250_console_write() : console_unlock() : vprintk_emit() : vprintk_default() : vprintk_func() : printk() : ___ratelimit() : __printk_ratelimit() : select_fallback_rq() : sched_cpu_dying() : cpuhp_invoke_callback() : take_cpu_down() : multi_cpu_stop() : cpu_stopper_thread() : smpboot_thread_fn() : kthread() : ret_from_fork() : : other info that might help us debug this: : : Chain exists of: : &port_lock_key --> &p->pi_lock --> &rq->lock : : Possible unsafe locking scenario: : : CPU0 CPU1 : ---- ---- : lock(&rq->lock); : lock(&p->pi_lock); : lock(&rq->lock); : lock(&port_lock_key); : : *** DEADLOCK *** : : 4 locks held by migration/8/62: : #0: (&p->pi_lock){-.-.}, at: sched_cpu_dying() : #1: (&rq->lock){-.-.}, at: sched_cpu_dying() : #2: (printk_ratelimit_state.lock){....}, at: ___ratelimit() : #3: (console_lock){+.+.}, at: vprintk_emit() : : stack backtrace: : CPU: 8 PID: 62 Comm: migration/8 Not tainted 4.14.0-rc2-next-20170927+ #252 : Call Trace: : dump_stack() : print_circular_bug() : check_prev_add() : ? add_lock_to_list.isra.26() : ? check_usage() : ? kvm_clock_read() : ? kvm_sched_clock_read() : ? sched_clock() : ? check_preemption_disabled() : __lock_acquire() : ? __lock_acquire() : ? add_lock_to_list.isra.26() : ? debug_check_no_locks_freed() : ? memcpy() : lock_acquire() : ? serial8250_console_write() : _raw_spin_lock_irqsave() : ? serial8250_console_write() : serial8250_console_write() : ? serial8250_start_tx() : ? lock_acquire() : ? memcpy() : univ8250_console_write() : console_unlock() : ? __down_trylock_console_sem() : vprintk_emit() : vprintk_default() : vprintk_func() : printk() : ? show_regs_print_info() : ? lock_acquire() : ___ratelimit() : __printk_ratelimit() : select_fallback_rq() : sched_cpu_dying() : ? sched_cpu_starting() : ? rcutree_dying_cpu() : ? sched_cpu_starting() : cpuhp_invoke_callback() : ? cpu_disable_common() : take_cpu_down() : ? trace_hardirqs_off_caller() : ? cpuhp_invoke_callback() : multi_cpu_stop() : ? __this_cpu_preempt_check() : ? cpu_stop_queue_work() : cpu_stopper_thread() : ? cpu_stop_create() : smpboot_thread_fn() : ? sort_range() : ? schedule() : ? __kthread_parkme() : kthread() : ? sort_range() : ? kthread_create_on_node() : ret_from_fork() : process 9121 (trinity-c78) no longer affine to cpu8 : smpboot: CPU 8 is now offline Link: http://lkml.kernel.org/r/20170928120405.18273-1-sergey.senozhatsky@gmail.com Fixes: 6b1d174b0c27b ("ratelimit: extend to print suppressed messages on release") Signed-off-by: Sergey Senozhatsky Reported-by: Sasha Levin Reviewed-by: Petr Mladek Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Steven Rostedt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/ratelimit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e0596c80f442d1e1221c17dbb71b2aed43909221 Author: Jean Delvare Date: Tue Oct 3 16:16:41 2017 -0700 kernel/params.c: improve STANDARD_PARAM_DEF readability Align the parameters passed to STANDARD_PARAM_DEF for clarity. Link: http://lkml.kernel.org/r/20170928162728.756143cc@endymion Signed-off-by: Jean Delvare Suggested-by: Ingo Molnar Acked-by: Ingo Molnar Cc: Baoquan He Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/params.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 96802e6b1dbf29d3012b39503c5dd6d9d8e82955 Author: Jean Delvare Date: Tue Oct 3 16:16:38 2017 -0700 kernel/params.c: fix an overflow in param_attr_show Function param_attr_show could overflow the buffer it is operating on. The buffer size is PAGE_SIZE, and the string returned by attribute->param->ops->get is generated by scnprintf(buffer, PAGE_SIZE, ...) so it could be PAGE_SIZE - 1 long, with the terminating '\0' at the very end of the buffer. Calling strcat(..., "\n") on this isn't safe, as the '\0' will be replaced by '\n' (OK) and then another '\0' will be added past the end of the buffer (not OK.) Simply add the trailing '\n' when writing the attribute contents to the buffer originally. This is safe, and also faster. Credits to Teradata for discovering this issue. Link: http://lkml.kernel.org/r/20170928162602.60c379c7@endymion Signed-off-by: Jean Delvare Acked-by: Ingo Molnar Cc: Baoquan He Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/params.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 90ceb2a3ad868f800eb1c9f4ede650daddd94b77 Author: Jean Delvare Date: Tue Oct 3 16:16:35 2017 -0700 kernel/params.c: fix the maximum length in param_get_string The length parameter of strlcpy() is supposed to reflect the size of the target buffer, not of the source string. Harmless in this case as the buffer is PAGE_SIZE long and the source string is always much shorter than this, but conceptually wrong, so let's fix it. Link: http://lkml.kernel.org/r/20170928162515.24846b4f@endymion Signed-off-by: Jean Delvare Acked-by: Ingo Molnar Cc: Baoquan He Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d09b0137d204bebeaafed672bc5a244e9ac92edb Author: YASUAKI ISHIMATSU Date: Tue Oct 3 16:16:32 2017 -0700 mm/memory_hotplug: define find_{smallest|biggest}_section_pfn as unsigned long find_{smallest|biggest}_section_pfn()s find the smallest/biggest section and return the pfn of the section. But the functions are defined as int. So the functions always return 0x00000000 - 0xffffffff. It means if memory address is over 16TB, the functions does not work correctly. To handle 64 bit value, the patch defines find_{smallest|biggest}_section_pfn() as unsigned long. Fixes: 815121d2b5cd ("memory_hotplug: clear zone when removing the memory") Link: http://lkml.kernel.org/r/d9d5593a-d0a4-c4be-ab08-493df59a85c6@gmail.com Signed-off-by: Yasuaki Ishimatsu Acked-by: Michal Hocko Cc: Xishi Qiu Cc: Reza Arbab Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1dd2bfc86818ddbc95f98e312e7704350223fd7d Author: YASUAKI ISHIMATSU Date: Tue Oct 3 16:16:29 2017 -0700 mm/memory_hotplug: change pfn_to_section_nr/section_nr_to_pfn macro to inline function pfn_to_section_nr() and section_nr_to_pfn() are defined as macro. pfn_to_section_nr() has no issue even if it is defined as macro. But section_nr_to_pfn() has overflow issue if sec is defined as int. section_nr_to_pfn() just shifts sec by PFN_SECTION_SHIFT. If sec is defined as unsigned long, section_nr_to_pfn() returns pfn as 64 bit value. But if sec is defined as int, section_nr_to_pfn() returns pfn as 32 bit value. __remove_section() calculates start_pfn using section_nr_to_pfn() and scn_nr defined as int. So if hot-removed memory address is over 16TB, overflow issue occurs and section_nr_to_pfn() does not calculate correct pfn. To make callers use proper arg, the patch changes the macros to inline functions. Fixes: 815121d2b5cd ("memory_hotplug: clear zone when removing the memory") Link: http://lkml.kernel.org/r/e643a387-e573-6bbf-d418-c60c8ee3d15e@gmail.com Signed-off-by: Yasuaki Ishimatsu Acked-by: Michal Hocko Cc: Xishi Qiu Cc: Reza Arbab Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 10 ++++++++-- mm/memory_hotplug.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) commit c9653850c90d6050197bc76ba672e00a7771aea5 Author: Cyrill Gorcunov Date: Tue Oct 3 16:16:26 2017 -0700 kernel/kcmp.c: drop branch leftover typo The else branch been left over and escaped the source code refresh. Not a problem but better clean it up. Fixes: 0791e3644e5e ("kcmp: add KCMP_EPOLL_TFD mode to compare epoll target files") Link: http://lkml.kernel.org/r/20170917165838.GA1887@uranus.lan Reported-by: Eugene Syromiatnikov Signed-off-by: Cyrill Gorcunov Acked-by: Andrei Vagin Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fdcce6e16c54facc4f0688630d3b9ecfcaa411f Author: Michal Hocko Date: Tue Oct 3 16:16:23 2017 -0700 memremap: add scheduling point to devm_memremap_pages devm_memremap_pages is initializing struct pages in for_each_device_pfn and that can take quite some time. We have even seen a soft lockup triggering on a non preemptive kernel NMI watchdog: BUG: soft lockup - CPU#61 stuck for 22s! [kworker/u641:11:1808] [...] RIP: 0010:[] [] devm_memremap_pages+0x327/0x430 [...] Call Trace: pmem_attach_disk+0x2fd/0x3f0 [nd_pmem] nvdimm_bus_probe+0x64/0x110 [libnvdimm] driver_probe_device+0x1f7/0x420 bus_for_each_drv+0x52/0x80 __device_attach+0xb0/0x130 bus_probe_device+0x87/0xa0 device_add+0x3fc/0x5f0 nd_async_device_register+0xe/0x40 [libnvdimm] async_run_entry_fn+0x43/0x150 process_one_work+0x14e/0x410 worker_thread+0x116/0x490 kthread+0xc7/0xe0 ret_from_fork+0x3f/0x70 fix this by adding cond_resched every 1024 pages. Link: http://lkml.kernel.org/r/20170918121410.24466-4-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9b6e63cbf85b89b2dbffa4955dbf2df8250e5375 Author: Michal Hocko Date: Tue Oct 3 16:16:19 2017 -0700 mm, page_alloc: add scheduling point to memmap_init_zone memmap_init_zone gets a pfn range to initialize and it can be really large resulting in a soft lockup on non-preemptible kernels NMI watchdog: BUG: soft lockup - CPU#31 stuck for 23s! [kworker/u642:5:1720] [...] task: ffff88ecd7e902c0 ti: ffff88eca4e50000 task.ti: ffff88eca4e50000 RIP: move_pfn_range_to_zone+0x185/0x1d0 [...] Call Trace: devm_memremap_pages+0x2c7/0x430 pmem_attach_disk+0x2fd/0x3f0 [nd_pmem] nvdimm_bus_probe+0x64/0x110 [libnvdimm] driver_probe_device+0x1f7/0x420 bus_for_each_drv+0x52/0x80 __device_attach+0xb0/0x130 bus_probe_device+0x87/0xa0 device_add+0x3fc/0x5f0 nd_async_device_register+0xe/0x40 [libnvdimm] async_run_entry_fn+0x43/0x150 process_one_work+0x14e/0x410 worker_thread+0x116/0x490 kthread+0xc7/0xe0 ret_from_fork+0x3f/0x70 Fix this by adding a scheduling point once per page block. Link: http://lkml.kernel.org/r/20170918121410.24466-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+) commit f64ac5e6e30668216cf489d73ba8a96e372d78c6 Author: Michal Hocko Date: Tue Oct 3 16:16:16 2017 -0700 mm, memory_hotplug: add scheduling point to __add_pages Patch series "mm, memory_hotplug: fix few soft lockups in memory hotadd". Johannes has noticed few soft lockups when adding a large nvdimm device. All of them were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. The fix is quite straightforward. Just make sure that cond_resched gets called from time to time. This patch (of 3): __add_pages gets a pfn range to add and there is no upper bound for a single call. This is usually a memory block aligned size for the regular memory hotplug - smaller sizes are usual for memory balloning drivers, or the whole NUMA node for physical memory online. There is no explicit scheduling point in that code path though. This can lead to long latencies while __add_pages is executed and we have even seen a soft lockup report during nvdimm initialization with !PREEMPT kernel NMI watchdog: BUG: soft lockup - CPU#11 stuck for 23s! [kworker/u641:3:832] [...] Workqueue: events_unbound async_run_entry_fn task: ffff881809270f40 ti: ffff881809274000 task.ti: ffff881809274000 RIP: _raw_spin_unlock_irqrestore+0x11/0x20 RSP: 0018:ffff881809277b10 EFLAGS: 00000286 [...] Call Trace: sparse_add_one_section+0x13d/0x18e __add_pages+0x10a/0x1d0 arch_add_memory+0x4a/0xc0 devm_memremap_pages+0x29d/0x430 pmem_attach_disk+0x2fd/0x3f0 [nd_pmem] nvdimm_bus_probe+0x64/0x110 [libnvdimm] driver_probe_device+0x1f7/0x420 bus_for_each_drv+0x52/0x80 __device_attach+0xb0/0x130 bus_probe_device+0x87/0xa0 device_add+0x3fc/0x5f0 nd_async_device_register+0xe/0x40 [libnvdimm] async_run_entry_fn+0x43/0x150 process_one_work+0x14e/0x410 worker_thread+0x116/0x490 kthread+0xc7/0xe0 ret_from_fork+0x3f/0x70 DWARF2 unwinder stuck at ret_from_fork+0x3f/0x70 Fix this by adding cond_resched once per each memory section in the given pfn range. Each section is constant amount of work which itself is not too expensive but many of them will just add up. Link: http://lkml.kernel.org/r/20170918121410.24466-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 1 + 1 file changed, 1 insertion(+) commit a70e43a59de9316e6fbad3b65557d0a24c099aca Author: Eric Biggers Date: Tue Oct 3 16:16:13 2017 -0700 lib/idr.c: fix comment for idr_replace() idr_replace() returns the old value on success, not 0. Link: http://lkml.kernel.org/r/20170918162642.37511-1-ebiggers3@gmail.com Signed-off-by: Eric Biggers Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/idr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f80c7dab95a1f0f968acbafe4426ee9525b6f6ab Author: Johannes Weiner Date: Tue Oct 3 16:16:10 2017 -0700 mm: memcontrol: use vmalloc fallback for large kmem memcg arrays For quick per-memcg indexing, slab caches and list_lru structures maintain linear arrays of descriptors. As the number of concurrent memory cgroups in the system goes up, this requires large contiguous allocations (8k cgroups = order-5, 16k cgroups = order-6 etc.) for every existing slab cache and list_lru, which can easily fail on loaded systems. E.g.: mkdir: page allocation failure: order:5, mode:0x14040c0(GFP_KERNEL|__GFP_COMP), nodemask=(null) CPU: 1 PID: 6399 Comm: mkdir Not tainted 4.13.0-mm1-00065-g720bbe532b7c-dirty #481 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 Call Trace: ? __alloc_pages_direct_compact+0x4c/0x110 __alloc_pages_nodemask+0xf50/0x1430 alloc_pages_current+0x60/0xc0 kmalloc_order_trace+0x29/0x1b0 __kmalloc+0x1f4/0x320 memcg_update_all_list_lrus+0xca/0x2e0 mem_cgroup_css_alloc+0x612/0x670 cgroup_apply_control_enable+0x19e/0x360 cgroup_mkdir+0x322/0x490 kernfs_iop_mkdir+0x55/0x80 vfs_mkdir+0xd0/0x120 SyS_mkdirat+0x6c/0xe0 SyS_mkdir+0x14/0x20 entry_SYSCALL_64_fastpath+0x18/0xad Mem-Info: active_anon:2965 inactive_anon:19 isolated_anon:0 active_file:100270 inactive_file:98846 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:7328 slab_unreclaimable:16402 mapped:771 shmem:52 pagetables:278 bounce:0 free:13718 free_pcp:0 free_cma:0 This output is from an artificial reproducer, but we have repeatedly observed order-7 failures in production in the Facebook fleet. These systems become useless as they cannot run more jobs, even though there is plenty of memory to allocate 128 individual pages. Use kvmalloc and kvzalloc to fall back to vmalloc space if these arrays prove too large for allocating them physically contiguous. Link: http://lkml.kernel.org/r/20170918184919.20644-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Josef Bacik Acked-by: Michal Hocko Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/list_lru.c | 12 ++++++------ mm/slab_common.c | 22 +++++++++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) commit 3181c38e4df257852a0c0a53552fd5c869402886 Author: Luis R. Rodriguez Date: Tue Oct 3 16:16:07 2017 -0700 kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv() do_proc_douintvec_conv() has two UINT_MAX checks, we can remove one. This has no functional changes other than fixing a compiler warning: kernel/sysctl.c:2190]: (warning) Identical condition '*lvalp>UINT_MAX', second condition is always false Fixes: 4f2fec00afa60 ("sysctl: simplify unsigned int support") Link: http://lkml.kernel.org/r/20170919072918.12066-1-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Reported-by: David Binderman Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 2 -- 1 file changed, 2 deletions(-) commit 7240767450d6d8380fb153e2998a1bb4ede7b029 Author: Masahiro Yamada Date: Tue Oct 3 16:16:04 2017 -0700 include/linux/bitfield.h: remove 32bit from FIELD_GET comment block I do not see anything that restricts this macro to 32 bit width. Link: http://lkml.kernel.org/r/1505921975-23379-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Jakub Kicinski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitfield.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cb5d7482810b7eb1bb05bf4f71bc93ce35e5896 Author: Colin Ian King Date: Tue Oct 3 16:16:01 2017 -0700 lib/lz4: make arrays static const, reduces object code size Don't populate the read-only arrays dec32table and dec64table on the stack, instead make them both static const. Makes the object code smaller by over 10K bytes: Before: text data bss dec hex filename 31500 0 0 31500 7b0c lib/lz4/lz4_decompress.o After: text data bss dec hex filename 20237 176 0 20413 4fbd lib/lz4/lz4_decompress.o (gcc version 7.2.0 x86_64) Link: http://lkml.kernel.org/r/20170921221939.20820-1-colin.king@canonical.com Signed-off-by: Colin Ian King Cc: Christophe JAILLET Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Arnd Bergmann Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/lz4/lz4_decompress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50097f74934e3ec8fb1e6f3087568b958972817d Author: Oleg Nesterov Date: Tue Oct 3 16:15:58 2017 -0700 exec: binfmt_misc: kill the onstack iname[BINPRM_BUF_SIZE] array After the previous change "fmt" can't go away, we can kill iname/iname_addr and use fmt->interpreter. Link: http://lkml.kernel.org/r/20170922143653.GA17232@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Al Viro Cc: Ben Woodard Cc: James Bottomley Cc: Jim Foraker Cc: Cc: Travis Gummels Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 43a4f2619038002f48c78698c42c05692d4b4eb2 Author: Oleg Nesterov Date: Tue Oct 3 16:15:55 2017 -0700 exec: binfmt_misc: fix race between load_misc_binary() and kill_node() load_misc_binary() makes a local copy of fmt->interpreter under entries_lock to avoid the race with kill_node() but this is not enough; the whole Node can be freed after we drop entries_lock, not only the ->interpreter string. Add dget/dput(fmt->dentry) to ensure bm_evict_inode() can't destroy/free this Node. Link: http://lkml.kernel.org/r/20170922143650.GA17227@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Al Viro Cc: Ben Woodard Cc: James Bottomley Cc: Jim Foraker Cc: Travis Gummels Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit eb23aa0317eb1f08e8d9d36b8753d42f03b32764 Author: Oleg Nesterov Date: Tue Oct 3 16:15:51 2017 -0700 exec: binfmt_misc: remove the confusing e->interp_file != NULL checks If MISC_FMT_OPEN_FILE flag is set e->interp_file must be valid or we have a bug which should not be silently ignored. Link: http://lkml.kernel.org/r/20170922143647.GA17222@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Al Viro Cc: Ben Woodard Cc: James Bottomley Cc: Jim Foraker Cc: Cc: Travis Gummels Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83f918274e4b841d6fb817861ea0c896fba0c179 Author: Oleg Nesterov Date: Tue Oct 3 16:15:48 2017 -0700 exec: binfmt_misc: shift filp_close(interp_file) from kill_node() to bm_evict_inode() To ensure that load_misc_binary() can't use the partially destroyed Node, see also the next patch. The current logic looks wrong in any case, once we close interp_file it doesn't make any sense to delay kfree(inode->i_private), this Node is no longer valid. Even if the MISC_FMT_OPEN_FILE/interp_file checks were not racy (they are), load_misc_binary() should not try to reopen ->interpreter if MISC_FMT_OPEN_FILE is set but ->interp_file is NULL. And I can't understand why do we use filp_close(), not fput(). Link: http://lkml.kernel.org/r/20170922143644.GA17216@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Al Viro Cc: Ben Woodard Cc: James Bottomley Cc: Jim Foraker Cc: Cc: Travis Gummels Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit baba1b29731c79d605100087b8f02f9e1cf5a344 Author: Oleg Nesterov Date: Tue Oct 3 16:15:45 2017 -0700 exec: binfmt_misc: don't nullify Node->dentry in kill_node() kill_node() nullifies/checks Node->dentry to avoid double free. This complicates the next changes and this is very confusing: - we do not need to check dentry != NULL under entries_lock, kill_node() is always called under inode_lock(d_inode(root)) and we rely on this inode_lock() anyway, without this lock the MISC_FMT_OPEN_FILE cleanup could race with itself. - if kill_inode() was already called and ->dentry == NULL we should not even try to close e->interp_file. We can change bm_entry_write() to simply check !list_empty(list) before kill_node. Again, we rely on inode_lock(), in particular it saves us from the race with bm_status_write(), another caller of kill_node(). Link: http://lkml.kernel.org/r/20170922143641.GA17210@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Al Viro Cc: Ben Woodard Cc: James Bottomley Cc: Jim Foraker Cc: Cc: Travis Gummels Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_misc.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit c2315c187fa0d3ab363fdebe22718170b40473e3 Author: Oleg Nesterov Date: Tue Oct 3 16:15:42 2017 -0700 exec: load_script: kill the onstack interp[BINPRM_BUF_SIZE] array Patch series "exec: binfmt_misc: fix use-after-free, kill iname[BINPRM_BUF_SIZE]". It looks like this code was always wrong, then commit 948b701a607f ("binfmt_misc: add persistent opened binary handler for containers") added more problems. This patch (of 6): load_script() can simply use i_name instead, it points into bprm->buf[] and nobody can change this memory until we call prepare_binprm(). The only complication is that we need to also change the signature of bprm_change_interp() but this change looks good too. While at it, do whitespace/style cleanups. NOTE: the real motivation for this change is that people want to increase BINPRM_BUF_SIZE, we need to change load_misc_binary() too but this looks more complicated because afaics it is very buggy. Link: http://lkml.kernel.org/r/20170918163446.GA26793@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Cc: Travis Gummels Cc: Ben Woodard Cc: Jim Foraker Cc: Cc: Al Viro Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_script.c | 17 +++++++++-------- fs/exec.c | 2 +- include/linux/binfmts.h | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) commit 384632e67e0829deb8015ee6ad916b180049d252 Author: Andrea Arcangeli Date: Tue Oct 3 16:15:38 2017 -0700 userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the userfault read context and fork_event head is still alive. We've to put the event allocated in the fork kernel stack, back from fork_event list-head to the event_wqh head, before returning from userfaultfd_ctx_read, because the fork_event head lifetime is limited to the userfaultfd_ctx_read stack lifetime. Forgetting to move the event back to its event_wqh place then results in __remove_wait_queue(&ctx->event_wqh, &ewq->wq); in userfaultfd_event_wait_completion to remove it from a head that has been already freed from the reader stack. This could only happen if resolve_userfault_fork failed (for example if there are no file descriptors available to allocate the fork uffd). If it succeeded it was put back correctly. Furthermore, after find_userfault_evt receives a fork event, the forked userfault context in fork_nctx and uwq->msg.arg.reserved.reserved1 can be released by the fork thread as soon as the event_wqh.lock is released. Taking a reference on the fork_nctx before dropping the lock prevents an use after free in resolve_userfault_fork(). If the fork side aborted and it already released everything, we still try to succeed resolve_userfault_fork(), if possible. Fixes: 893e26e61d04eac9 ("userfaultfd: non-cooperative: Add fork() event") Link: http://lkml.kernel.org/r/20170920180413.26713-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Mark Rutland Tested-by: Mark Rutland Cc: Pavel Emelyanov Cc: Mike Rapoport Cc: "Dr. David Alan Gilbert" Cc: Mike Kravetz Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 10 deletions(-) commit 7d790d2da386a52cfebcf0c898ba927bece9d4ab Author: Reza Arbab Date: Tue Oct 3 16:15:35 2017 -0700 mm/device-public-memory: fix edge case in _vm_normal_page() With device public pages at the end of my memory space, I'm getting output from _vm_normal_page(): BUG: Bad page map in process migrate_pages pte:c0800001ffff0d06 pmd:f95d3000 addr:00007fff89330000 vm_flags:00100073 anon_vma:c0000000fa899320 mapping: (null) index:7fff8933 file: (null) fault: (null) mmap: (null) readpage: (null) CPU: 0 PID: 13963 Comm: migrate_pages Tainted: P B OE 4.14.0-rc1-wip #155 Call Trace: dump_stack+0xb0/0xf4 (unreliable) print_bad_pte+0x28c/0x340 _vm_normal_page+0xc0/0x140 zap_pte_range+0x664/0xc10 unmap_page_range+0x318/0x670 unmap_vmas+0x74/0xe0 exit_mmap+0xe8/0x1f0 mmput+0xac/0x1f0 do_exit+0x348/0xcd0 do_group_exit+0x5c/0xf0 SyS_exit_group+0x1c/0x20 system_call+0x58/0x6c The pfn causing this is the very last one. Correct the bounds check accordingly. Fixes: df6ad69838fc ("mm/device-public-memory: device memory cache coherent with CPU") Link: http://lkml.kernel.org/r/1506092178-20351-1-git-send-email-arbab@linux.vnet.ibm.com Signed-off-by: Reza Arbab Reviewed-by: Jérôme Glisse Reviewed-by: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9625456cc76391b7f3f2809579126542a8ed4d39 Author: Shaohua Li Date: Tue Oct 3 16:15:32 2017 -0700 mm: fix data corruption caused by lazyfree page MADV_FREE clears pte dirty bit and then marks the page lazyfree (clear SwapBacked). There is no lock to prevent the page is added to swap cache between these two steps by page reclaim. If page reclaim finds such page, it will simply add the page to swap cache without pageout the page to swap because the page is marked as clean. Next time, page fault will read data from the swap slot which doesn't have the original data, so we have a data corruption. To fix issue, we mark the page dirty and pageout the page. However, we shouldn't dirty all pages which is clean and in swap cache. swapin page is swap cache and clean too. So we only dirty page which is added into swap cache in page reclaim, which shouldn't be swapin page. As Minchan suggested, simply dirty the page in add_to_swap can do the job. Fixes: 802a3a92ad7a ("mm: reclaim MADV_FREE pages") Link: http://lkml.kernel.org/r/08c84256b007bf3f63c91d94383bd9eb6fee2daa.1506446061.git.shli@fb.com Signed-off-by: Shaohua Li Reported-by: Artem Savkov Acked-by: Michal Hocko Acked-by: Minchan Kim Cc: Johannes Weiner Cc: Hillf Danton Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 24c92eb7dce0a299b8e1a8c5fa585844a53bf7f0 Author: Shaohua Li Date: Tue Oct 3 16:15:29 2017 -0700 mm: avoid marking swap cached page as lazyfree MADV_FREE clears pte dirty bit and then marks the page lazyfree (clear SwapBacked). There is no lock to prevent the page is added to swap cache between these two steps by page reclaim. Page reclaim could add the page to swap cache and unmap the page. After page reclaim, the page is added back to lru. At that time, we probably start draining per-cpu pagevec and mark the page lazyfree. So the page could be in a state with SwapBacked cleared and PG_swapcache set. Next time there is a refault in the virtual address, do_swap_page can find the page from swap cache but the page has PageSwapCache false because SwapBacked isn't set, so do_swap_page will bail out and do nothing. The task will keep running into fault handler. Fixes: 802a3a92ad7a ("mm: reclaim MADV_FREE pages") Link: http://lkml.kernel.org/r/6537ef3814398c0073630b03f176263bc81f0902.1506446061.git.shli@fb.com Signed-off-by: Shaohua Li Reported-by: Artem Savkov Tested-by: Artem Savkov Reviewed-by: Rik van Riel Acked-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Minchan Kim Cc: Hillf Danton Cc: Hugh Dickins Cc: Mel Gorman Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4e222c56c83b2aed7cc2b329fca7435508eefa1 Author: Jeff Layton Date: Tue Oct 3 16:15:25 2017 -0700 mm: have filemap_check_and_advance_wb_err clear AS_EIO/AS_ENOSPC Eryu noticed that he could sometimes get a leftover error reported when it shouldn't be on fsync with ext2 and non-journalled ext4. The problem is that writeback_single_inode still uses filemap_fdatawait. That picks up a previously set AS_EIO flag, which would ordinarily have been cleared before. Since we're mostly using this function as a replacement for filemap_check_errors, have filemap_check_and_advance_wb_err clear AS_EIO and AS_ENOSPC when reporting an error. That should allow the new function to better emulate the behavior of the old with respect to these flags. Link: http://lkml.kernel.org/r/20170922133331.28812-1-jlayton@kernel.org Signed-off-by: Jeff Layton Reported-by: Eryu Guan Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5bdfca6435b8294490ffb5b7c8b7d8eac3814b06 Author: Sudip Mukherjee Date: Tue Oct 3 16:15:23 2017 -0700 m32r: define CPU_BIG_ENDIAN The build of m32r allmodconfig is giving lots of build warnings about: 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 Define CPU_BIG_ENDIAN like the way CPU_LITTLE_ENDIAN is defined. Link: http://lkml.kernel.org/r/1505678083-10320-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit ae94264ed4b0cf7cd887947650db4c69acb62072 Author: Minchan Kim Date: Tue Oct 3 16:15:19 2017 -0700 zram: fix null dereference of handle In testing I found handle passed to zs_map_object in __zram_bvec_read is NULL so eh kernel goes oops in pin_object(). The reason is there is no routine to check the slot's freeing after getting the slot's lock. This patch fixes it. [minchan@kernel.org: v2] Link: http://lkml.kernel.org/r/1505887347-10881-1-git-send-email-minchan@kernel.org Link: http://lkml.kernel.org/r/1505788488-26723-1-git-send-email-minchan@kernel.org Fixes: 1f7319c74275 ("zram: partial IO refactoring") Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit a872eb2131e91ce7c89a8888974a5e22a272b12f Author: Christophe Leroy Date: Tue Oct 3 16:15:16 2017 -0700 mm: fix RODATA_TEST failure "rodata_test: test data was not read only" On powerpc, RODATA_TEST fails with message the following messages: Freeing unused kernel memory: 528K rodata_test: test data was not read only This is because GCC allocates it to .data section: c0695034 g O .data 00000004 rodata_test_data Since commit 056b9d8a7692 ("mm: remove rodata_test_data export, add pr_fmt"), rodata_test_data is used only inside rodata_test.c By declaring it static, it gets properly allocated into .rodata section instead of .data: c04df710 l O .rodata 00000004 rodata_test_data Fixes: 056b9d8a7692 ("mm: remove rodata_test_data export, add pr_fmt") Link: http://lkml.kernel.org/r/20170921093729.1080368AC1@po15668-vm-win7.idsi0.si.c-s.fr Signed-off-by: Christophe Leroy Cc: Kees Cook Cc: Jinbum Park Cc: Segher Boessenkool Cc: David Laight Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rodata_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31d1e130f4a0f8f629a460167569577cac9b17c1 Author: Ioan Nicu Date: Tue Oct 3 16:15:13 2017 -0700 rapidio: remove global irq spinlocks from the subsystem Locking of config and doorbell operations should be done only if the underlying hardware requires it. This patch removes the global spinlocks from the rapidio subsystem and moves them to the mport drivers (fsl_rio and tsi721), only to the necessary places. For example, local config space read and write operations (lcread/lcwrite) are atomic in all existing drivers, so there should be no need for locking, while the cread/cwrite operations which generate maintenance transactions need to be synchronized with a lock. Later, each driver could chose to use a per-port lock instead of a global one, or even more granular locking. Link: http://lkml.kernel.org/r/20170824113023.GD50104@nokia.com Signed-off-by: Ioan Nicu Signed-off-by: Frank Kunz Acked-by: Alexandre Bounine Cc: Matt Porter Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/sysdev/fsl_rio.c | 17 +++++++++++++++-- arch/powerpc/sysdev/fsl_rmu.c | 8 ++++++++ drivers/rapidio/devices/tsi721.c | 7 +++++++ drivers/rapidio/rio-access.c | 40 +++++----------------------------------- 4 files changed, 35 insertions(+), 37 deletions(-) commit 57148a64e823bb1f49112fa52a92a7f372cda892 Author: Arnd Bergmann Date: Tue Oct 3 16:15:10 2017 -0700 mm: meminit: mark init_reserved_page as __meminit The function is called from __meminit context and calls other __meminit functions but isn't it self mark as such today: WARNING: vmlinux.o(.text.unlikely+0x4516): Section mismatch in reference from the function init_reserved_page() to the function .meminit.text:early_pfn_to_nid() The function init_reserved_page() references the function __meminit early_pfn_to_nid(). This is often because init_reserved_page lacks a __meminit annotation or the annotation of early_pfn_to_nid is wrong. On most compilers, we don't notice this because the function gets inlined all the time. Adding __meminit here fixes the harmless warning for the old versions and is generally the correct annotation. Link: http://lkml.kernel.org/r/20170915193149.901180-1-arnd@arndb.de Fixes: 7e18adb4f80b ("mm: meminit: initialise remaining struct pages in parallel with kswapd") Signed-off-by: Arnd Bergmann Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3552935742e0d5f0dafd823736f45bdaa7ba672c Author: Vitaly Wool Date: Tue Oct 3 16:15:06 2017 -0700 z3fold: fix stale list handling Fix the situation when clear_bit() is called for page->private before the page pointer is actually assigned. While at it, remove work_busy() check because it is costly and does not give 100% guarantee anyway. Signed-off-by: Vitaly Wool Cc: Dan Streetman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6818600ff094ca255a7fe31838ad50c29656c3c5 Author: Davidlohr Bueso Date: Tue Oct 3 16:15:03 2017 -0700 mm,compaction: serialize waitqueue_active() checks (for real) Andrea brought to my attention that the L->{L,S} guarantees are completely bogus for this case. I was looking at the diagram, from the offending commit, when that _is_ the race, we had the load reordered already. What we need is at least S->L semantics, thus simply use wq_has_sleeper() to serialize the call for good. Link: http://lkml.kernel.org/r/20170914175313.GB811@linux-80c1.suse Fixes: 46acef048a6 (mm,compaction: serialize waitqueue_active() checks) Signed-off-by: Davidlohr Bueso Reported-by: Andrea Parri Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit a1b2289cef92ef0e9a92afcd2e1ea71d5bcaaf64 Author: Sherry Yang Date: Tue Oct 3 16:15:00 2017 -0700 android: binder: drop lru lock in isolate callback Drop the global lru lock in isolate callback before calling zap_page_range which calls cond_resched, and re-acquire the global lru lock before returning. Also change return code to LRU_REMOVED_RETRY. Use mmput_async when fail to acquire mmap sem in an atomic context. Fix "BUG: sleeping function called from invalid context" errors when CONFIG_DEBUG_ATOMIC_SLEEP is enabled. Also restore mmput_async, which was initially introduced in commit ec8d7c14ea14 ("mm, oom_reaper: do not mmput synchronously from the oom reaper context"), and was removed in commit 212925802454 ("mm: oom: let oom_reap_task and exit_mmap run concurrently"). Link: http://lkml.kernel.org/r/20170914182231.90908-1-sherryy@android.com Fixes: f2517eb76f1f2 ("android: binder: Add global lru shrinker to binder") Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman Reported-by: Kyle Yan Acked-by: Arve Hjønnevåg Acked-by: Michal Hocko Cc: Martijn Coenen Cc: Todd Kjos Cc: Riley Andrews Cc: Ingo Molnar Cc: Vlastimil Babka Cc: Hillf Danton Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Thomas Gleixner Cc: Andy Lutomirski Cc: Oleg Nesterov Cc: Hoeun Ryu Cc: Christopher Lameter Cc: Vegard Nossum Cc: Frederic Weisbecker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/android/binder_alloc.c | 18 ++++++++++++------ include/linux/sched/mm.h | 6 ++++++ kernel/fork.c | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) commit 3f2eb0287ebd62ec8d6d544f830285302279e6bf Author: Jérôme Glisse Date: Tue Oct 3 16:14:57 2017 -0700 mm/memcg: avoid page count check for zone device Fix for 4.14, zone device page always have an elevated refcount of one and thus page count sanity check in uncharge_page() is inappropriate for them. [mhocko@suse.com: nano-optimize VM_BUG_ON in uncharge_page] Link: http://lkml.kernel.org/r/20170914190011.5217-1-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Michal Hocko Reported-by: Evgeny Baskakov Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 72f0184c8a00c70179cfed6266e2e06b4d400065 Author: Michal Hocko Date: Tue Oct 3 16:14:53 2017 -0700 mm, memcg: remove hotplug locking from try_charge The following lockdep splat has been noticed during LTP testing ====================================================== WARNING: possible circular locking dependency detected 4.13.0-rc3-next-20170807 #12 Not tainted ------------------------------------------------------ a.out/4771 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++++}, at: [] drain_all_stock.part.35+0x18/0x140 but task is already holding lock: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x175/0x530 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&mm->mmap_sem){++++++}: lock_acquire+0xc9/0x230 __might_fault+0x70/0xa0 _copy_to_user+0x23/0x70 filldir+0xa7/0x110 xfs_dir2_sf_getdents.isra.10+0x20c/0x2c0 [xfs] xfs_readdir+0x1fa/0x2c0 [xfs] xfs_file_readdir+0x30/0x40 [xfs] iterate_dir+0x17a/0x1a0 SyS_getdents+0xb0/0x160 entry_SYSCALL_64_fastpath+0x1f/0xbe -> #2 (&type->i_mutex_dir_key#3){++++++}: lock_acquire+0xc9/0x230 down_read+0x51/0xb0 lookup_slow+0xde/0x210 walk_component+0x160/0x250 link_path_walk+0x1a6/0x610 path_openat+0xe4/0xd50 do_filp_open+0x91/0x100 file_open_name+0xf5/0x130 filp_open+0x33/0x50 kernel_read_file_from_path+0x39/0x80 _request_firmware+0x39f/0x880 request_firmware_direct+0x37/0x50 request_microcode_fw+0x64/0xe0 reload_store+0xf7/0x180 dev_attr_store+0x18/0x30 sysfs_kf_write+0x44/0x60 kernfs_fop_write+0x113/0x1a0 __vfs_write+0x37/0x170 vfs_write+0xc7/0x1c0 SyS_write+0x58/0xc0 do_syscall_64+0x6c/0x1f0 return_from_SYSCALL_64+0x0/0x7a -> #1 (microcode_mutex){+.+.+.}: lock_acquire+0xc9/0x230 __mutex_lock+0x88/0x960 mutex_lock_nested+0x1b/0x20 microcode_init+0xbb/0x208 do_one_initcall+0x51/0x1a9 kernel_init_freeable+0x208/0x2a7 kernel_init+0xe/0x104 ret_from_fork+0x2a/0x40 -> #0 (cpu_hotplug_lock.rw_sem){++++++}: __lock_acquire+0x153c/0x1550 lock_acquire+0xc9/0x230 cpus_read_lock+0x4b/0x90 drain_all_stock.part.35+0x18/0x140 try_charge+0x3ab/0x6e0 mem_cgroup_try_charge+0x7f/0x2c0 shmem_getpage_gfp+0x25f/0x1050 shmem_fault+0x96/0x200 __do_fault+0x1e/0xa0 __handle_mm_fault+0x9c3/0xe00 handle_mm_fault+0x16e/0x380 __do_page_fault+0x24a/0x530 do_page_fault+0x30/0x80 page_fault+0x28/0x30 other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> &type->i_mutex_dir_key#3 --> &mm->mmap_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&type->i_mutex_dir_key#3); lock(&mm->mmap_sem); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 2 locks held by a.out/4771: #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x175/0x530 #1: (percpu_charge_mutex){+.+...}, at: [] try_charge+0x397/0x6e0 The problem is very similar to the one fixed by commit a459eeb7b852 ("mm, page_alloc: do not depend on cpu hotplug locks inside the allocator"). We are taking hotplug locks while we can be sitting on top of basically arbitrary locks. This just calls for problems. We can get rid of {get,put}_online_cpus, fortunately. We do not have to be worried about races with memory hotplug because drain_local_stock, which is called from both the WQ draining and the memory hotplug contexts, is always operating on the local cpu stock with IRQs disabled. The only thing to be careful about is that the target memcg doesn't vanish while we are still in drain_all_stock so take a reference on it. Link: http://lkml.kernel.org/r/20170913090023.28322-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Artem Savkov Tested-by: Artem Savkov Cc: Johannes Weiner Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 4d4bbd8526a8fbeb2c090ea360211fceff952383 Author: Michal Hocko Date: Tue Oct 3 16:14:50 2017 -0700 mm, oom_reaper: skip mm structs with mmu notifiers Andrea has noticed that the oom_reaper doesn't invalidate the range via mmu notifiers (mmu_notifier_invalidate_range_start/end) and that can corrupt the memory of the kvm guest for example. tlb_flush_mmu_tlbonly already invokes mmu notifiers but that is not sufficient as per Andrea: "mmu_notifier_invalidate_range cannot be used in replacement of mmu_notifier_invalidate_range_start/end. For KVM mmu_notifier_invalidate_range is a noop and rightfully so. A MMU notifier implementation has to implement either ->invalidate_range method or the invalidate_range_start/end methods, not both. And if you implement invalidate_range_start/end like KVM is forced to do, calling mmu_notifier_invalidate_range in common code is a noop for KVM. For those MMU notifiers that can get away only implementing ->invalidate_range, the ->invalidate_range is implicitly called by mmu_notifier_invalidate_range_end(). And only those secondary MMUs that share the same pagetable with the primary MMU (like AMD iommuv2) can get away only implementing ->invalidate_range" As the callback is allowed to sleep and the implementation is out of hand of the MM it is safer to simply bail out if there is an mmu notifier registered. In order to not fail too early make the mm_has_notifiers check under the oom_lock and have a little nap before failing to give the current oom victim some more time to exit. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170913113427.2291-1-mhocko@kernel.org Fixes: aac453635549 ("mm, oom: introduce oom reaper") Signed-off-by: Michal Hocko Reported-by: Andrea Arcangeli Reviewed-by: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmu_notifier.h | 5 +++++ mm/oom_kill.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) commit d5567c9df1ef001b2a7e6684b3b3498371ee4cae Author: Vitaly Wool Date: Tue Oct 3 16:14:47 2017 -0700 z3fold: fix potential race in z3fold_reclaim_page It is possible that on a (partially) unsuccessful page reclaim, kref_put() called in z3fold_reclaim_page() does not yield page release, but the page is released shortly afterwards by another thread. Then z3fold_reclaim_page() would try to list_add() that (released) page again which is obviously a bug. To avoid that, spin_lock() has to be taken earlier, before the kref_put() call mentioned earlier. Link: http://lkml.kernel.org/r/20170913162937.bfff21c7d12b12a5f47639fd@gmail.com Signed-off-by: Vitaly Wool Cc: Dan Streetman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d9d73e81fe82fdf4ee65a48c26531edc04108349 Author: Geert Uytterhoeven Date: Tue Oct 3 16:14:44 2017 -0700 sh: sh7269: remove nonexistent GPIO_PH[0-7] to fix pinctrl registration Pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. If enum values are defined, but never used, pinmux_pins[] contains (zero-filled) holes. Such entries are treated as pin zero, which was registered before, thus leading to pinctrl registration failures, as seen on sh7722: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 Remove GPIO_PH[0-7] from the enum to fix this. Link: http://lkml.kernel.org/r/1505205657-18012-5-git-send-email-geert+renesas@glider.be Fixes: ef0fa5331a73e479 ("sh: Add pinmux for sh7269") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Cc: Yoshinori Sato Cc: Rich Felker Cc: Magnus Damm Cc: Yoshihiro Shimoda Cc: Jacopo Mondi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/cpu-sh2a/cpu/sh7269.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eae3df7e82318d798f45dedf111e241805ec7a4a Author: Geert Uytterhoeven Date: Tue Oct 3 16:14:41 2017 -0700 sh: sh7264: remove nonexistent GPIO_PH[0-7] to fix pinctrl registration Pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. If enum values are defined, but never used, pinmux_pins[] contains (zero-filled) holes. Such entries are treated as pin zero, which was registered before, thus leading to pinctrl registration failures, as seen on sh7722: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 Remove GPIO_PH[0-7] from the enum to fix this. Link: http://lkml.kernel.org/r/1505205657-18012-4-git-send-email-geert+renesas@glider.be Fixes: 41797f75486d8ca3 ("sh: Add pinmux for sh7264") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Cc: Jacopo Mondi Cc: Magnus Damm Cc: Rich Felker Cc: Yoshihiro Shimoda Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/cpu-sh2a/cpu/sh7264.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d8ce38f69843a56da044e56b6c16aecfbc3c6e39 Author: Geert Uytterhoeven Date: Tue Oct 3 16:14:37 2017 -0700 sh: sh7757: remove nonexistent GPIO_PT[JLNQ]7_RESV to fix pinctrl registration Commit 3810e96056ff ("sh: modify pinmux for SH7757 2nd cut") renamed GPIO_PT[JLNQ]7 to GPIO_PT[JLNQ]7_RESV, and removed the existing users from the pinmux_pins[] array. However, pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. Hence entries were not really removed, but replaced by (zero-filled) holes. Such entries are treated as pin zero, which was registered before, thus leading to pinctrl registration failures, as seen on sh7722: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 Remove GPIO_PT[JLNQ]7_RESV from the enum to fix this. Link: http://lkml.kernel.org/r/1505205657-18012-3-git-send-email-geert+renesas@glider.be Fixes: 3810e96056ffddf6 ("sh: modify pinmux for SH7757 2nd cut") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Cc: Jacopo Mondi Cc: Magnus Damm Cc: Rich Felker Cc: Yoshihiro Shimoda Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/cpu-sh4/cpu/sh7757.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b78412b8300a8453b78d2c1b0b925b66493bb011 Author: Geert Uytterhoeven Date: Tue Oct 3 16:14:34 2017 -0700 sh: sh7722: remove nonexistent GPIO_PTQ7 to fix pinctrl registration Patch series "sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration", v2. Magnus Damm reported that on sh7722/Migo-R, pinctrl registration fails with: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. Apparently GPIO_PTQ7 was defined in the enum, but never used. If enum values are defined, but never used, pinmux_pins[] contains (zero-filled) holes. Hence such entries are treated as pin zero, which was registered before, and pinctrl registration fails. I can't see how this ever worked, as at the time of commit f5e25ae52fef ("sh-pfc: Add sh7722 pinmux support"), pinmux_gpios[] in drivers/pinctrl/sh-pfc/pfc-sh7722.c already had the hole, and drivers/pinctrl/core.c already had the check. Some scripting revealed a few more broken drivers: - sh7757 has four holes, due to nonexistent GPIO_PT[JLNQ]7_RESV. - sh7264 and sh7269 define GPIO_PH[0-7], but don't use it with PINMUX_GPIO(). Patch 1 fixes the issue on sh7722, and was tested. Patches 3-4 should fix the issue on the other 3 SoCs, but was untested due to lack of hardware. This patch (of 4): On sh7722/Migo-R, pinctrl registration fails with: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. As GPIO_PTQ7 is defined in the enum, but never used, pinmux_pins[] contains a (zero-filled) hole. Hence this entry is treated as pin zero, which was registered before, and pinctrl registration fails. According to the datasheet, port PTQ7 does not exist. Hence remove GPIO_PTQ7 from the enum to fix this. Link: http://lkml.kernel.org/r/1505205657-18012-2-git-send-email-geert+renesas@glider.be Fixes: 8d7b5b0af7e070b9 ("sh: Add sh7722 pinmux code") Signed-off-by: Geert Uytterhoeven Reported-by: Magnus Damm Reviewed-by: Laurent Pinchart Tested-by: Jacopo Mondi Cc: Rich Felker Cc: Yoshihiro Shimoda Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/cpu-sh4/cpu/sh7722.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19bfbe22f59a207417b2679e7e83c180419c9ec5 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Tue Oct 3 16:14:31 2017 -0700 mm, hugetlb, soft_offline: save compound page order before page migration This fixes a bug in madvise() where if you'd try to soft offline a hugepage via madvise(), while walking the address range you'd end up, using the wrong page offset due to attempting to get the compound order of a former but presently not compound page, due to dissolving the huge page (since commit c3114a84f7f9: "mm: hugetlb: soft-offline: dissolve source hugepage after successful migration"). As a result I ended up with all my free pages except one being offlined. Link: http://lkml.kernel.org/r/20170912204306.GA12053@gmail.com Fixes: c3114a84f7f9 ("mm: hugetlb: soft-offline: dissolve source hugepage after successful migration") Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Cc: Anshuman Khandual Cc: Michal Hocko Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Hillf Danton Cc: Shaohua Li Cc: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: David Rientjes Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4b22927f0cbd58303aac689e378d20bf56267a39 Author: Kirill Tkhai Date: Tue Oct 3 16:14:27 2017 -0700 ksm: fix unlocked iteration over vmas in cmp_and_merge_page() In this place mm is unlocked, so vmas or list may change. Down read mmap_sem to protect them from modifications. Link: http://lkml.kernel.org/r/150512788393.10691.8868381099691121308.stgit@localhost.localdomain Fixes: e86c59b1b12d ("mm/ksm: improve deduplication of zero pages with colouring") Signed-off-by: Kirill Tkhai Acked-by: Michal Hocko Reviewed-by: Andrea Arcangeli Cc: Minchan Kim Cc: zhong jiang Cc: Ingo Molnar Cc: Claudio Imbrenda Cc: "Kirill A. Shutemov" Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fa87b91c94a8fd2c8502b6761be2d08a8e9bcf55 Author: Kirill A. Shutemov Date: Tue Oct 3 16:14:24 2017 -0700 include/linux/mm.h: fix typo in VM_MPX definition There's a typo in recent change of VM_MPX definition. We want it to be VM_HIGH_ARCH_4, not VM_HIGH_ARCH_BIT_4. This bug does cause visible regressions. In arch_vma_name the vmflags are tested against VM_MPX. With the incorrect value of VM_MPX, a number of vmas (such as the stack) test positive and end up being marked as "[mpx]" in /proc/N/maps instead of their correct names. This confuses tools like rr which expect to be able to find familiar vmas. Fixes: df3735c5b40f ("x86,mpx: make mpx depend on x86-64 to free up VMA flag") Link: http://lkml.kernel.org/r/20170918140253.36856-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Rik van Riel Cc: Dave Hansen Cc: Kyle Huey Cc: [4.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e00e5a26e3d37b47ce8ca59611db1e6135790ef8 Author: Colin Ian King Date: Tue Oct 3 16:14:21 2017 -0700 scripts/spelling.txt: add more spelling mistakes to spelling.txt Here are some of the more spelling mistakes and typos that I've found while fixing up spelling mistakes in kernel error message text over the past eight weeks. [akpm@linux-foundation.org: s/|/||/, per Joe] Link: http://lkml.kernel.org/r/20170919090818.5989-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Kees Cook Cc: Masahiro Yamada Cc: Stephen Boyd Cc: Joe Perches Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 630cc2b30a42c70628368a412beb4a5e5dd71abe Author: Jean Delvare Date: Tue Oct 3 16:14:18 2017 -0700 kernel/params.c: align add_sysfs_param documentation with code This parameter is named kp, so the documentation should use that. Fixes: 9b473de87209 ("param: Fix duplicate module prefixes") Link: http://lkml.kernel.org/r/20170919142656.64aea59e@endymion Signed-off-by: Jean Delvare Acked-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ee912dab95f1483156b6e994004bfcc3158d798 Author: Sudip Mukherjee Date: Tue Oct 3 16:14:15 2017 -0700 alpha: fix build failures The build of alpha allmodconfig is giving error: arch/alpha/include/asm/mmu_context.h: In function 'ev5_switch_mm': arch/alpha/include/asm/mmu_context.h:160:2: error: implicit declaration of function 'task_thread_info'; did you mean 'init_thread_info'? [-Werror=implicit-function-declaration] The file 'mmu_context.h' needed an extra header file. Link: http://lkml.kernel.org/r/1505668810-7497-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/mmu_context.h | 1 + 1 file changed, 1 insertion(+) commit 90caccdd8cc0215705f18b92771b449b01e2474a Author: Alexei Starovoitov Date: Tue Oct 3 15:37:20 2017 -0700 bpf: fix bpf_tail_call() x64 JIT - bpf prog_array just like all other types of bpf array accepts 32-bit index. Clarify that in the comment. - fix x64 JIT of bpf_tail_call which was incorrectly loading 8 instead of 4 bytes - tighten corresponding check in the interpreter to stay consistent The JIT bug can be triggered after introduction of BPF_F_NUMA_NODE flag in commit 96eabe7a40aa in 4.14. Before that the map_flags would stay zero and though JIT code is wrong it will check bounds correctly. Hence two fixes tags. All other JITs don't have this problem. Signed-off-by: Alexei Starovoitov Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation") Fixes: b52f00e6a715 ("x86: bpf_jit: implement bpf_tail_call() helper") Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller arch/x86/net/bpf_jit_comp.c | 4 ++-- include/uapi/linux/bpf.h | 2 +- kernel/bpf/core.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 05946876f0c16f6fe1db692d575aba42b25f0811 Author: David Wu Date: Sat Sep 30 17:47:23 2017 +0800 net: stmmac: dwmac-rk: Add RK3128 GMAC support Add constants and callback functions for the dwmac on rk3128 soc. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu Signed-off-by: David S. Miller .../devicetree/bindings/net/rockchip-dwmac.txt | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 112 +++++++++++++++++++++ 2 files changed, 113 insertions(+) commit 70e62f4bacdf31ea8a59f241c9229120cd06d9d1 Author: Omar Sandoval Date: Tue Oct 3 14:57:16 2017 -0700 blk-mq-debugfs: fix device sched directory for default scheduler In blk_mq_debugfs_register(), I remembered to set up the per-hctx sched directories if a default scheduler was already configured by blk_mq_sched_init() from blk_mq_init_allocated_queue(), but I didn't do the same for the device-wide sched directory. Fix it. Fixes: d332ce091813 ("blk-mq-debugfs: allow schedulers to register debugfs attributes") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6cd1a6fef7058de15405b13d6587538853279c7b Author: Jens Axboe Date: Tue Oct 3 15:58:15 2017 -0600 null_blk: change configfs dependency to select A recent commit made null_blk depend on configfs, which is kind of annoying since you now have to find this dependency and enable that as well. Discovered this since I no longer had null_blk available on a box I needed to debug, since it got killed when the config updated after the configfs change was merged. Fixes: 3bf2bd20734e ("nullb: add configfs interface") Reviewed-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f02fb7617ba12ac15d261c654b9759ea8f1f1ef Author: Joseph Qi Date: Sat Sep 30 14:38:49 2017 +0800 blk-throttle: fix possible io stall when upgrade to max There is a case which will lead to io stall. The case is described as follows. /test1 |-subtest1 /test2 |-subtest2 And subtest1 and subtest2 each has 32 queued bios already. Now upgrade to max. In throtl_upgrade_state, it will try to dispatch bios as follows: 1) tg=subtest1, do nothing; 2) tg=test1, transfer 32 queued bios from subtest1 to test1; no pending left, no need to schedule next dispatch; 3) tg=subtest2, do nothing; 4) tg=test2, transfer 32 queued bios from subtest2 to test2; no pending left, no need to schedule next dispatch; 5) tg=/, transfer 8 queued bios from test1 to /, 8 queued bios from test2 to /, 8 queued bios from test1 to /, and 8 queued bios from test2 to /; note that test1 and test2 each still has 16 queued bios left; 6) tg=/, try to schedule next dispatch, but since disptime is now (update in tg_update_disptime, wait=0), pending timer is not scheduled in fact; 7) In throtl_upgrade_state it totally dispatches 32 queued bios and with 32 left. test1 and test2 each has 16 queued bios; 8) throtl_pending_timer_fn sees the left over bios, but could do nothing, because throtl_select_dispatch returns 0, and test1/test2 has no pending tg. The blktrace shows the following: 8,32 0 0 2.539007641 0 m N throtl upgrade to max 8,32 0 0 2.539072267 0 m N throtl /test2 dispatch nr_queued=16 read=0 write=16 8,32 7 0 2.539077142 0 m N throtl /test1 dispatch nr_queued=16 read=0 write=16 So force schedule dispatch if there are pending children. Reviewed-by: Shaohua Li Signed-off-by: Joseph Qi Signed-off-by: Jens Axboe block/blk-throttle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63ba395cd7a52431cbb61658dad3beb5b24e9300 Author: Aleksander Morgado Date: Wed Sep 27 23:31:03 2017 +0200 rndis_host: support Novatel Verizon USB730L Treat the ef/04/01 interface class/subclass/protocol combination used by the Novatel Verizon USB730L (1410:9030) as a possible RNDIS interface. T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 17 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 3 P: Vendor=1410 ProdID=9030 Rev=03.10 S: Manufacturer=Novatel Wireless S: Product=MiFi USB730L S: SerialNumber=0123456789ABCDEF C: #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host I: If#= 2 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid Once the network interface is brought up, the user just needs to run a DHCP client to get IP address and routing setup. As a side note, other Novatel Verizon USB730L models with the same vid:pid end up exposing a standard ECM interface which doesn't require any other kernel update to make it work. Signed-off-by: Aleksander Morgado Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 11 ++++++++++- drivers/net/usb/rndis_host.c | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 71300132975f364a0d3ebf68671a2ce4923191db 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 (cherry picked from commit e19c1eb885ac4186e64c7e484424124f3145318e) Signed-off-by: Rodrigo Vivi 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 b1f9e5e355e909000fcccfd2bc31f7c1ded358ab Author: Lorenzo Pieralisi Date: Mon Oct 2 11:52:47 2017 +0100 ide: fix IRQ assignment for PCI bus order probing We used to assign IRQs for all devices at boot-time, before any drivers claimed devices. The following commits: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") changed this so we now call pci_assign_irq() from pci_device_probe() when we call a driver's probe method. The ide_scan_pcibus() path (enabled by CONFIG_IDEPCI_PCIBUS_ORDER) bypasses pci_device_probe() so it can guarantee devices are claimed in order of PCI bus address. It calls the driver's probe method directly, so it misses the pci_assign_irq() call (and other PCI initialization functions), which causes failures like this: ide0: disabled, no IRQ ide0: failed to initialize IDE interface ide0: disabling port cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07) CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io 0x8050-0x8057] cmd64x 0000:00:02.0: can't reserve resources CMD64x_IDE: probe of 0000:00:02.0 failed with error -16 ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x94/0xd0 sysfs: cannot create duplicate filename '/class/ide_port/ide0' ... Trace: [] sysfs_warn_dup+0x94/0xd0 [] warn_slowpath_fmt+0x58/0x70 [] sysfs_warn_dup+0x94/0xd0 [] kernfs_path_from_node+0x30/0x60 [] kernfs_put+0x16c/0x2c0 [] kernfs_put+0x16c/0x2c0 [] sysfs_do_create_link_sd.isra.2+0x100/0x120 [] device_add+0x2a4/0x7c0 [] device_create_groups_vargs+0x14c/0x170 [] device_create_groups_vargs+0x98/0x170 [] device_create+0x50/0x70 [] ide_host_register+0x48c/0xa00 [] ide_host_register+0x450/0xa00 [] device_register+0x20/0x50 [] ide_host_register+0x450/0xa00 [] ide_host_add+0x64/0xe0 [] kobject_uevent_env+0x16c/0x710 [] do_one_initcall+0x68/0x260 [] kernel_init+0x1c/0x1a0 ... ---[ end trace 24a70433c3e4d374 ]--- ide0: disabling port Fix the IRQ allocation issue by calling pci_assign_irq() from ide_scan_pcidev() before probing the IDE PCI drivers, so that IRQs for a given PCI device are allocated for the IDE PCI drivers to use them for device configuration. Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.net Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Lorenzo Pieralisi [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: David S. Miller Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner drivers/ide/ide-scan-pci.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit a06876a766c27dcedf17a0f60be89609ee23d861 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 3 14:17:13 2017 +0200 ide: pci: free PCI BARs on initialization failure Recent pci_assign_irq() changes uncovered a problem with missing freeing of PCI BARs on PCI IDE host initialization failure: ide0: disabled, no IRQ ide0: failed to initialize IDE interface ide0: disabling port cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07) CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io 0x8050-0x8057] cmd64x 0000:00:02.0: can't reserve resources CMD64x_IDE: probe of 0000:00:02.0 failed with error -16 Fix the problem by adding missing freeing of PCI BARs to ide_setup_pci_controller() and ide_pci_init_two(). Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.net Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Bartlomiej Zolnierkiewicz [bhelgaas: add Fixes:] Signed-off-by: Bjorn Helgaas Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner drivers/ide/setup-pci.c | 63 +++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 23 deletions(-) commit d410a6417e5e4deb4a9c34164addcebebc9099c9 Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 3 13:18:47 2017 +0200 ide: free hwif->portdev on hwif_init() failure Recent pci_assign_irq() changes uncovered a problem with missing freeing of ide_port class instance on hwif_init() failure in ide_host_register(): ide0: disabled, no IRQ ide0: failed to initialize IDE interface ide0: disabling port cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07) CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io 0x8050-0x8057] cmd64x 0000:00:02.0: can't reserve resources CMD64x_IDE: probe of 0000:00:02.0 failed with error -16 ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x94/0xd0 sysfs: cannot create duplicate filename '/class/ide_port/ide0' ... Trace: [] __warn+0x160/0x190 [] sysfs_warn_dup+0x94/0xd0 [] warn_slowpath_fmt+0x58/0x70 [] sysfs_warn_dup+0x94/0xd0 [] kernfs_path_from_node+0x30/0x60 [] kernfs_put+0x16c/0x2c0 [] kernfs_put+0x16c/0x2c0 [] sysfs_do_create_link_sd.isra.2+0x100/0x120 [] device_add+0x2a4/0x7c0 [] device_create_groups_vargs+0x14c/0x170 [] device_create_groups_vargs+0x98/0x170 [] device_create+0x50/0x70 [] ide_host_register+0x48c/0xa00 [] ide_host_register+0x450/0xa00 [] device_register+0x20/0x50 [] ide_host_register+0x450/0xa00 [] ide_host_add+0x64/0xe0 [] kobject_uevent_env+0x16c/0x710 [] do_one_initcall+0x68/0x260 [] kernel_init+0x1c/0x1a0 [] kernel_init+0x0/0x1a0 [] ret_from_kernel_thread+0x18/0x20 [] kernel_init+0x0/0x1a0 ---[ end trace 24a70433c3e4d374 ]--- ide0: disabling port Fix the problem by adding missing code to ide_host_register(). Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.net Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Bartlomiej Zolnierkiewicz [bhelgaas: add Fixes:] Signed-off-by: Bjorn Helgaas Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner drivers/ide/ide-probe.c | 1 + 1 file changed, 1 insertion(+) commit 38b249bc0ca26d57dac65f5f659b39d88899d23d Author: Wouter Verhelst Date: Fri Sep 22 12:09:54 2017 +0200 MAINTAINERS: update list for NBD nbd-general@sourceforge.net becomes nbd@other.debian.org, because sourceforge is just a spamtrap these days. Signed-off-by: Wouter Verhelst Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d81fa669e3de7eb8a631d7d95dac5fbcb2bf9d4e Merge: 847d9fb 47684e1 Author: Linus Torvalds Date: Tue Oct 3 10:44:03 2017 -0700 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixlet from Tejun Heo: "Minor documentation update" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: Documentation: core-api: minor workqueue.rst cleanups commit 847d9fb477c3a16cc177751e24fcc1aafcd699d6 Merge: ff93026 c4fa6c4 Author: Linus Torvalds Date: Tue Oct 3 10:40:36 2017 -0700 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "The recent migration code updates assumed that migrations always execute from the top to the bottom once and didn't clean up internal states after each migration round; however, cgroup_transfer_tasks() repeats the inner steps multiple times and the garbage internal states from the previous iteration led to OOPS. Waiman fixed the bug by reinitializing the relevant states at the end of each migration round" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Reinit cgroup_taskset structure before cgroup_migrate_execute() returns commit ce024f42c2e28b6bce4ecc1e891b42f57f753892 Author: Nikolay Aleksandrov Date: Tue Oct 3 13:20:48 2017 +0300 net: rtnetlink: fix info leak in RTM_GETSTATS call When RTM_GETSTATS was added the fields of its header struct were not all initialized when returning the result thus leaking 4 bytes of information to user-space per rtnl_fill_statsinfo call, so initialize them now. Thanks to Alexander Potapenko for the detailed report and bisection. Reported-by: Alexander Potapenko Fixes: 10c9ead9f3c6 ("rtnetlink: add new RTM_GETSTATS message to dump link stats") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 +++ 1 file changed, 3 insertions(+) commit b664d57f39d01e775204d4f1a7e2f8bda77bc549 Author: Masami Hiramatsu Date: Tue Oct 3 16:18:02 2017 +0900 kprobes/x86: Remove IRQ disabling from jprobe handlers Jprobes actually don't need to disable IRQs while calling handlers, because of how we specify the kernel interface in Documentation/kprobes.txt: ----- 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 jprobes too. 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/150701508194.32266.14458959863314097305.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 2 -- 1 file changed, 2 deletions(-) commit ee213fc72fd67d0988525af501534f4cb924d1e9 Author: Josh Poimboeuf Date: Tue Oct 3 08:51:43 2017 -0500 kprobes/x86: Set up frame pointer in kprobe trampoline Richard Weinberger saw an unwinder warning when running bcc's opensnoop: WARNING: kernel stack frame pointer at ffff99ef4076bea0 in opensnoop:2008 has bad value 0000000000000008 unwind stack type:0 next_sp: (null) mask:0x2 graph_idx:0 ... ffff99ef4076be88: ffff99ef4076bea0 (0xffff99ef4076bea0) ffff99ef4076be90: ffffffffac442721 (optimized_callback +0x81/0x90) ... A lockdep stack trace was initiated from inside a kprobe handler, when the unwinder noticed a bad frame pointer on the stack. The bad frame pointer is related to the fact that the kprobe optprobe trampoline doesn't save the frame pointer before calling into optimized_callback(). Reported-and-tested-by: Richard Weinberger Signed-off-by: Josh Poimboeuf Acked-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/7aef2f8ecd75c2f505ef9b80490412262cf4a44c.1507038547.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/common.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ff93026d51935b671b4ac131886f0914f8b6189a Merge: c1de159 1fa4df3 Author: Linus Torvalds Date: Tue Oct 3 10:05:12 2017 -0700 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu fixes from Tejun Heo: "Rather important fixes this time. - The new percpu area allocator had a subtle bug in how it iterates the memory regions and could skip viable areas, which led to allocation failures for module static percpu variables. Dennis fixed the bug and another non-critical one in stat calculation. - Mark noticed that the generic implementations of percpu local atomic reads aren't properly protected against irqs and there's a (slim) chance for split reads on some 32bit systems. Generic implementations are updated to disable irq when read size is larger than ulong size. This may have made some 32bit archs which can do atomic local 64bit accesses generate sub-optimal code. We need to find them out and implement arch-specific overrides" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix iteration to prevent skipping over block percpu: fix starting offset for chunk statistics traversal percpu: make this_cpu_generic_read() atomic w.r.t. interrupts commit c1de1591d927bc1e55095d642b3c3cc2e54fc1cd Merge: 887c8ba d312fef Author: Linus Torvalds Date: Tue Oct 3 09:30:00 2017 -0700 Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Nothing too interesting. Arnd's gcc-7 warning fixes that slipped through the cracks for two release cycles (my bad), and two minor low level driver updates" * 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: don't ignore result code of ahci_reset_controller() ata_piix: Add Fujitsu-Siemens Lifebook S6120 to short cable IDs ata: avoid gcc-7 warning in ata_timing_quantize commit 887c8ba753fbe809ba93fa3cfd0cc46db18d37d4 Merge: 27b3b16 80c82ff Author: Linus Torvalds Date: Tue Oct 3 09:25:40 2017 -0700 Merge tag 'usb-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of USB fixes for 4.14-rc4 to resolved reported issues. There's a bunch of stuff in here based on the great work Andrey Konovalov is doing in fuzzing the USB stack. Lots of bug fixes when dealing with corrupted USB descriptors that we've never seen in "normal" operation, but is now ensuring the stack is much more hardened overall. There's also the usual XHCI and gadget driver fixes as well, and a build error fix, and a few other minor things, full details in the shortlog. All of these have been in linux-next with no reported issues" * tag 'usb-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (38 commits) usb: dwc3: of-simple: Add compatible for Spreadtrum SC9860 platform usb: gadget: udc: atmel: set vbus irqflags explicitly usb: gadget: ffs: handle I/O completion in-order usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe() usb: gadget: udc: renesas_usb3: fix Pn_RAMMAP.Pn_MPKT value usb: gadget: udc: renesas_usb3: fix for no-data control transfer USB: dummy-hcd: Fix erroneous synchronization change USB: dummy-hcd: fix infinite-loop resubmission bug USB: dummy-hcd: fix connection failures (wrong speed) USB: cdc-wdm: ignore -EPIPE from GetEncapsulatedResponse USB: devio: Don't corrupt user memory USB: devio: Prevent integer overflow in proc_do_submiturb() USB: g_mass_storage: Fix deadlock when driver is unbound USB: gadgetfs: Fix crash caused by inadequate synchronization USB: gadgetfs: fix copy_to_user while holding spinlock USB: uas: fix bug in handling of alternate settings usb-storage: unusual_devs entry to fix write-access regression for Seagate external drives usb-storage: fix bogus hardware error messages for ATA pass-thru devices ... commit 27b3b1601c798264f73a27c6cdc3313195d1916e Merge: 08bbc4f c912614 Author: Linus Torvalds Date: Tue Oct 3 09:23:49 2017 -0700 Merge tag 'tty-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are a small number (5) of patches for some reported TTY and serial issues. Nothing major, a documentation update, timing fix, error handling fix, name reporting fix, and a timeout issue resolved. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: sccnxp: Fix error handling in sccnxp_probe() tty: serial: lpuart: avoid report NULL interrupt serial: bcm63xx: fix timing issue. mxser: fix timeout calculation for low rates serial: sh-sci: document R8A77970 bindings commit 08bbc4fcf7c4d6e879b10733a1f59ca3c2d22f4b Merge: c4142ed b2e3120 Author: Linus Torvalds Date: Tue Oct 3 09:22:11 2017 -0700 Merge tag 'staging-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are some small staging/IIO driver fixes for 4.14-rc4 Most of these have been in my tree for a while due to travels, sorry for the delay. They resolve a number of small issues reported by people, mostly for the iio drivers. Nothing major in here, full details are in the shortlog. All have been linux-next for a few weeks with no reported issues" * tag 'staging-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits) staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack. iio: core: Return error for failed read_reg iio: ad7793: Fix the serial interface reset iio: ad_sigma_delta: Implement a dedicated reset function IIO: BME280: Updates to Humidity readings need ctrl_reg write! iio: adc: mcp320x: Fix readout of negative voltages iio: adc: mcp320x: Fix oops on module unload iio: adc: stm32: fix bad error check on max_channels iio: trigger: stm32-timer: fix a corner case to write preset iio: trigger: stm32-timer: preset shouldn't be buffered iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()' iio: adc: twl4030: Disable the vusb3v1 rugulator in the error handling path of 'twl4030_madc_probe()' iio: adc: twl4030: Fix an error handling path in 'twl4030_madc_probe()' staging: rtl8723bs: avoid null pointer dereference on pmlmepriv staging: rtl8723bs: add missing range check on id staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist staging: speakup: fix speakup-r empty line lockup staging: pi433: Move limit check to switch default to kill warning staging: r8822be: fix null pointer dereferences with a null driver_adapter staging: mt29f_spinand: Enable the read ECC before program the page ... commit 2fb1e946450a4fef74bb72f360555f7760d816f0 Author: Sam Bobroff Date: Tue Sep 26 16:47:04 2017 +1000 KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive() In KVM's XICS-on-XIVE emulation, kvmppc_xive_get_xive() returns the value of state->guest_server as "server". However, this value is not set by it's counterpart kvmppc_xive_set_xive(). When the guest uses this interface to migrate interrupts away from a CPU that is going offline, it sees all interrupts as belonging to CPU 0, so they are left assigned to (now) offline CPUs. This patch removes the guest_server field from the state, and returns act_server in it's place (that is, the CPU actually handling the interrupt, which may differ from the one requested). Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Cc: stable@vger.kernel.org Signed-off-by: Sam Bobroff Acked-by: Benjamin Herrenschmidt Signed-off-by: Radim Krčmář arch/powerpc/kvm/book3s_xive.c | 5 ++--- arch/powerpc/kvm/book3s_xive.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) commit c4142ed6029f06ab3a13bec1b07eaa01221772fc Merge: 3a98be0 850fdec Author: Linus Torvalds Date: Tue Oct 3 08:57:07 2017 -0700 Merge tag 'driver-core-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are a few small fixes for 4.14-rc4. The removal of DRIVER_ATTR() was almost completed by 4.14-rc1, but one straggler made it in through some other tree (odds are, one of mine...) So there's a simple removal of the last user, and then finally the macro is removed from the tree. There's a fix for old crazy udev instances that insist on reloading a module when it is removed from the kernel due to the new uevents for bind/unbind. This fixes the reported regression, hopefully some year in the future we can drop the workaround, once users update to the latest version, but I'm not holding my breath. And then there's a build fix for a linker warning, and a buffer overflow fix to match the PCI fixes you took through the PCI tree in the same area. All of these have been in linux-next for a few weeks while I've been traveling, sorry for the delay" * tag 'driver-core-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: remove DRIVER_ATTR fpga: altera-cvp: remove DRIVER_ATTR() usage driver core: platform: Don't read past the end of "driver_override" buffer base: arch_topology: fix section mismatch build warnings driver core: suppress sending MODALIAS in UNBIND uevents commit 3a98be090601398395e2bf04b949394a0fa03244 Merge: 9e66317 549e658 Author: Linus Torvalds Date: Tue Oct 3 08:27:50 2017 -0700 Merge tag 'char-misc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are a handful of char/misc driver fixes for 4.14-rc4. Nothing major, some binder fixups, hyperv fixes, and other tiny things. All of these have been sitting in my tree for way too long, sorry for the delay in getting them to you. All have been in linux-next for a few weeks, and despite some people's feeling about if linux-next actually tests things, I think it's a good "soak test" for patches" * tag 'char-misc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Drivers: hv: fcopy: restore correct transfer length vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() intel_th: pci: Add Lewisburg PCH support intel_th: pci: Add Cedar Fork PCH support stm class: Fix a use-after-free nvmem: add missing of_node_put() in of_nvmem_cell_get() nvmem: core: return EFBIG on out-of-range write auxdisplay: charlcd: properly restore atomic counter on error path binder: fix memory corruption in binder_transaction binder binder: fix an ret value override android: binder: fix type mismatch warning commit 638164a2718f337ea224b747cf5977ef143166a4 Author: Chao Yu Date: Mon Oct 2 02:50:16 2017 +0800 f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which calls 'fstrim -v /' during boot. On arm64 Android, this was caused during GC looping with 1ms gc_min_sleep_time & gc_max_sleep_time." Root cause of this issue is that f2fs_wait_discard_bios can only be used by f2fs_put_super, because during put_super there must be no other referrers, so it can ignore discard entry's reference count when removing the entry, otherwise in other caller we will hit bug_on in __remove_discard_cmd as there may be other issuer added reference count in discard entry. Thread A Thread B - issue_discard_thread - f2fs_ioc_fitrim - f2fs_trim_fs - f2fs_wait_discard_bios - __issue_discard_cmd - __submit_discard_cmd - __wait_discard_cmd - dc->ref++ - __wait_one_discard_bio - __wait_discard_cmd - __remove_discard_cmd - f2fs_bug_on(sbi, dc->ref) Fixes: 969d1b180d987c2be02de890d0fff0f66a0e80de Reported-by: Ju Hyung Park Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c | 6 +++--- fs/f2fs/super.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit f39b536ce9248e9799ff900358d6f073ab2e6c55 Author: Paul E. McKenney Date: Mon Sep 25 20:19:02 2017 -0700 rcu: Remove extraneous READ_ONCE()s from rcu_irq_{enter,exit}() The read of ->dynticks_nmi_nesting in rcu_irq_enter() and rcu_irq_exit() is currently protected with READ_ONCE(). However, this protection is unnecessary because (1) ->dynticks_nmi_nesting is updated only by the current CPU, (2) Although NMI handlers can update this field, they reset it back to its old value before return, and (3) Interrupts are disabled, so nothing else can modify it. The value of ->dynticks_nmi_nesting is thus effectively constant, and so no protection is required. This commit therefore removes the READ_ONCE() protection from these two accesses. Link: http://lkml.kernel.org/r/20170926031902.GA2074@linux.vnet.ibm.com Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b0b8499ae75df91455bbeb7491d45affc384fb0 Author: Shu Wang Date: Tue Sep 12 10:14:54 2017 +0800 ftrace: Fix kmemleak in unregister_ftrace_graph The trampoline allocated by function tracer was overwriten by function_graph tracer, and caused a memory leak. The save_global_trampoline should have saved the previous trampoline in register_ftrace_graph() and restored it in unregister_ftrace_graph(). But as it is implemented, save_global_trampoline was only used in unregister_ftrace_graph as default value 0, and it overwrote the previous trampoline's value. Causing the previous allocated trampoline to be lost. kmmeleak backtrace: kmemleak_vmalloc+0x77/0xc0 __vmalloc_node_range+0x1b5/0x2c0 module_alloc+0x7c/0xd0 arch_ftrace_update_trampoline+0xb5/0x290 ftrace_startup+0x78/0x210 register_ftrace_function+0x8b/0xd0 function_trace_init+0x4f/0x80 tracing_set_tracer+0xe6/0x170 tracing_set_trace_write+0x90/0xd0 __vfs_write+0x37/0x170 vfs_write+0xb2/0x1b0 SyS_write+0x55/0xc0 do_syscall_64+0x67/0x180 return_from_SYSCALL_64+0x0/0x6a [ Looking further into this, I found that this was left over from when the function and function graph tracers shared the same ftrace_ops. But in commit 5f151b2401 ("ftrace: Fix function_profiler and function tracer together"), the two were separated, and the save_global_trampoline no longer was necessary (and it may have been broken back then too). -- Steven Rostedt ] Link: http://lkml.kernel.org/r/20170912021454.5976-1-shuwang@redhat.com Cc: stable@vger.kernel.org Fixes: 5f151b2401 ("ftrace: Fix function_profiler and function tracer together") Signed-off-by: Shu Wang Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 14 -------------- 1 file changed, 14 deletions(-) commit f5d9644c5fca7d8e8972268598bb516a7eae17f9 Author: Shrirang Bagul Date: Fri Sep 29 12:39:51 2017 +0800 USB: serial: qcserial: add Dell DW5818, DW5819 Dell Wireless 5819/5818 devices are re-branded Sierra Wireless MC74 series which will by default boot with vid 0x413c and pid's 0x81cf, 0x81d0, 0x81d1, 0x81d2. Signed-off-by: Shrirang Bagul Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 4 ++++ 1 file changed, 4 insertions(+) commit e63aaaa6be54c956b9603590ea436b003407bb3e Author: Arvind Yadav Date: Wed Sep 20 12:31:28 2017 +0530 netfilter: nf_tables: Release memory obtained by kasprintf Free memory region, if nf_tables_set_alloc_name is not successful. Fixes: 387454901bd6 ("netfilter: nf_tables: Allow set names of up to 255 chars") Signed-off-by: Arvind Yadav Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 070e004912fed099263408bf2ff1bbc6926abe2e Author: Christian Lamparter Date: Sun Oct 1 16:33:03 2017 +0200 powerpc/4xx: Fix compile error with 64K pages on 40x, 44x The mmu context on the 40x, 44x does not define pte_frag entry. This causes gcc abort the compilation due to: setup-common.c: In function ‘setup_arch’: setup-common.c:908: error: ‘mm_context_t’ has no ‘pte_frag’ This patch fixes the issue by removing the pte_frag initialization in setup-common.c. This is possible, because the compiler will do the initialization, since the mm_context is a sub struct of init_mm. init_mm is declared in mm_types.h as external linkage. According to C99 6.2.4.3: An object whose identifier is declared with external linkage [...] has static storage duration. C99 defines in 6.7.8.10 that: If an object that has static storage duration is not initialized explicitly, then: - if it has pointer type, it is initialized to a null pointer Fixes: b1923caa6e64 ("powerpc: Merge 32-bit and 64-bit setup_arch()") Signed-off-by: Christian Lamparter Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 3 --- 1 file changed, 3 deletions(-) commit 2fb850092fd95198a0a4746f07b80077d5a3aa37 Author: Douglas Anderson Date: Fri Sep 29 16:58:46 2017 -0700 phy: rockchip-typec: Check for errors from tcphy_phy_init() The function tcphy_phy_init() could return an error but the callers weren't checking the return value. They should. In at least one case while testing I saw the message "wait pma ready timeout" which indicates that tcphy_phy_init() really could return an error and we should account for it. Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 227f66d2f9954f68375736af62ebcd73c6754d69 Author: Ben Skeggs Date: Tue Oct 3 16:24:28 2017 +1000 drm/nouveau/kms/nv50: fix oops during DP IRQ handling on non-MST boards Reported-by: Woody Suwalski Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nv50_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 194d68dd051c2dd5ac2b522ae16100e774e8d869 Author: Ilia Mirkin Date: Sun Oct 1 13:52:43 2017 -0400 drm/nouveau/bsp/g92: disable by default G92's seem to require some additional bit of initialization before the BSP engine can work. It feels like clocks are not set up for the underlying VLD engine, which means that all commands submitted to the xtensa chip end up hanging. VP seems to work fine though. This still allows people to force-enable the bsp engine if they want to play around with it, but makes it harder for the card to hang by default. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77913bbcb43ac9a07a6fe849c2fd3bf85fc8bdd8 Author: Ben Skeggs Date: Mon Sep 25 15:05:38 2017 +1000 drm/nouveau/mmu: flush tlbs before deleting page tables Even though we've zeroed the PDE, the GPU may have cached the PD, so we need to flush when deleting them. Noticed while working on replacement MMU code, but a backport might be a good idea, so let's fix it in the current code too. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 ++ 1 file changed, 2 insertions(+) commit 3b7af5c0fd9631762d1c4d7b4cee76f571dd3c2c Author: Jeremy Kerr Date: Wed Sep 27 12:55:51 2017 +0800 powerpc: Fix action argument for cpufeatures-based TLB flush Commit 41d0c2ecde19 ("powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9") introduced calls to __flush_tlb_power[89] from the cpufeatures code, specifying the number of sets to flush. However, these functions take an action argument, not a number of sets. This means we hit the BUG() in __flush_tlb_{206,300} when using cpufeatures-style configuration. This change passes TLB_INVAL_SCOPE_GLOBAL instead. Fixes: 41d0c2ecde19 ("powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Jeremy Kerr Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88e65389fce1f68ba6d13ae2fc0f8d7e5c338c52 Author: Bryant G. Ly Date: Mon Oct 2 12:59:38 2017 -0500 scsi: ibmvscsis: Fix write_pending failure path For write_pending if the queue is down or client failed then return -EIO so that LIO can properly process the completed command. Prior we returned 0 since LIO could not handle it properly. Now with commit fa7e25cf13a6 ("target: Fix unknown fabric callback queue-full errors") that patch addresses LIO's ability to handle things right. Signed-off-by: Bryant G. Ly Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c048a250aae1aaab0ba9dbec908f0c6cdb8614f Author: Khazhismel Kumykov Date: Thu Jul 13 09:11:22 2017 -0700 scsi: libiscsi: Remove iscsi_destroy_session iscsi_session_teardown was the only user of this function. Function currently is just short for iscsi_remove_session + iscsi_free_session. Signed-off-by: Khazhismel Kumykov Acked-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 16 ---------------- include/scsi/scsi_transport_iscsi.h | 1 - 2 files changed, 17 deletions(-) commit 9e10b5121ad991ea6e84ca40b15a04cdc551bfe9 Author: Khazhismel Kumykov Date: Thu Jul 13 09:11:21 2017 -0700 scsi: libiscsi: Fix use-after-free race during iscsi_session_teardown Session attributes exposed through sysfs were freed before the device was destroyed, resulting in a potential use-after-free. Free these attributes after removing the device. Signed-off-by: Khazhismel Kumykov Acked-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 77082ca503bed061f7fbda7cfd7c93beda967a41 Author: Martin K. Petersen Date: Wed Sep 27 21:38:59 2017 -0400 scsi: sd: Do not override max_sectors_kb sysfs setting A user may lower the max_sectors_kb setting in sysfs to accommodate certain workloads. Previously we would always set the max I/O size to either the block layer default or the optional preferred I/O size reported by the device. Keep the current heuristics for the initial setting of max_sectors_kb. For subsequent invocations, only update the current queue limit if it exceeds the capabilities of the hardware. Cc: Reported-by: Don Brace Reviewed-by: Martin Wilck Tested-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 28a0bc4120d38a394499382ba21d6965a67a3703 Author: Martin K. Petersen Date: Wed Sep 27 21:35:12 2017 -0400 scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP SBC-4 states: "A MAXIMUM UNMAP LBA COUNT field set to a non-zero value indicates the maximum number of LBAs that may be unmapped by an UNMAP command" "A MAXIMUM WRITE SAME LENGTH field set to a non-zero value indicates the maximum number of contiguous logical blocks that the device server allows to be unmapped or written in a single WRITE SAME command." Despite the spec being clear on the topic, some devices incorrectly expect WRITE SAME commands with the UNMAP bit set to be limited to the value reported in MAXIMUM UNMAP LBA COUNT in the Block Limits VPD. Implement a blacklist option that can be used to accommodate devices with this behavior. Cc: Reported-by: Bill Kuzeja Reported-by: Ewan D. Milne Reviewed-by: Ewan D. Milne Tested-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 3 +++ drivers/scsi/sd.c | 16 ++++++++++++---- include/scsi/scsi_device.h | 1 + include/scsi/scsi_devinfo.h | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) commit 1b0e19bb0c6f6b209c6b711f47dfc81812706827 Merge: 9e66317 2ba7d7e Author: Dave Airlie Date: Tue Oct 3 09:34:06 2017 +1000 Merge tag 'drm-intel-fixes-2017-09-27' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for 4.14-rc3 Couple fixes for stable: - Fix ELD connector types and consequently audio on DP (Jani). - Ignore HDMI on Port A and consequently fix an ops on i915 probe when VBT advertises HDMI on Port A (Jani). And a small fix: - That removes a reduntant hw_check on modeset. (Colin) * tag 'drm-intel-fixes-2017-09-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915/bios: ignore HDMI on port A drm/i915: remove redundant variable hw_check drm/i915: always update ELD connector type after get modes commit eefca20eb20c66b06cf5ed09b49b1a7caaa27b7b Author: Eric Dumazet Date: Mon Oct 2 12:20:51 2017 -0700 socket, bpf: fix possible use after free Starting from linux-4.4, 3WHS no longer takes the listener lock. Since this time, we might hit a use-after-free in sk_filter_charge(), if the filter we got in the memcpy() of the listener content just happened to be replaced by a thread changing listener BPF filter. To fix this, we need to make sure the filter refcount is not already zero before incrementing it again. Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets") Signed-off-by: Eric Dumazet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 12 ++++++++---- net/core/sock.c | 5 ++++- 2 files changed, 12 insertions(+), 5 deletions(-) commit 6e60a3bbb45bd8b307269d6a821ee2c72d815846 Author: Josef Bacik Date: Mon Oct 2 16:22:08 2017 -0400 nbd: fix -ERESTARTSYS handling Christoph made it so that if we return'ed BLK_STS_RESOURCE whenever we got ERESTARTSYS from sending our packets we'd return BLK_STS_OK, which means we'd never requeue and just hang. We really need to return the right value from the upper layer. Fixes: fc17b6534eb8 ("blk-mq: switch ->queue_rq return value to blk_status_t") Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cb1dab0e01969d63717c7464cb5d75c77a39bf02 Author: Chen-Yu Tsai Date: Fri Sep 29 16:22:57 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/20170929082306.16193-6-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit d312fefea8387503375f728855c9a62de20c9665 Author: Ard Biesheuvel Date: Mon Oct 2 19:31:24 2017 +0100 ahci: don't ignore result code of ahci_reset_controller() ahci_pci_reset_controller() calls ahci_reset_controller(), which may fail, but ignores the result code and always returns success. This may result in failures like below ahci 0000:02:00.0: version 3.0 ahci 0000:02:00.0: enabling device (0000 -> 0003) ahci 0000:02:00.0: SSS flag set, parallel bus scan disabled ahci 0000:02:00.0: controller reset failed (0xffffffff) ahci 0000:02:00.0: failed to stop engine (-5) ... repeated many times ... ahci 0000:02:00.0: failed to stop engine (-5) Unable to handle kernel paging request at virtual address ffff0000093f9018 ... PC is at ahci_stop_engine+0x5c/0xd8 [libahci] LR is at ahci_deinit_port.constprop.12+0x1c/0xc0 [libahci] ... [] ahci_stop_engine+0x5c/0xd8 [libahci] [] ahci_deinit_port.constprop.12+0x1c/0xc0 [libahci] [] ahci_init_controller+0x80/0x168 [libahci] [] ahci_pci_init_controller+0x60/0x68 [ahci] [] ahci_init_one+0x75c/0xd88 [ahci] [] local_pci_probe+0x3c/0xb8 [] pci_device_probe+0x138/0x170 [] driver_probe_device+0x2dc/0x458 [] __driver_attach+0x114/0x118 [] bus_for_each_dev+0x60/0xa0 [] driver_attach+0x20/0x28 [] bus_add_driver+0x1f0/0x2a8 [] driver_register+0x60/0xf8 [] __pci_register_driver+0x3c/0x48 [] ahci_pci_driver_init+0x1c/0x1000 [ahci] [] do_one_initcall+0x38/0x120 where an obvious hardware level failure results in an unnecessary 15 second delay and a subsequent crash. So record the result code of ahci_reset_controller() and relay it, rather than ignoring it. Signed-off-by: Ard Biesheuvel Signed-off-by: Tejun Heo drivers/ata/ahci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4ee4553e861a2a7c4f5b045d9453729d837d4a7d Merge: 8135961 de0f43c Author: David S. Miller Date: Mon Oct 2 11:18:57 2017 -0700 Merge branch 'mlxsw-gre-fixes' Jiri Pirko says: ==================== mlxsw: Fixes in GRE offloading Petr says: This patchset fixes a couple unrelated problems in offloading IP-in-IP tunnels in mlxsw driver. - The first patch fixes a potential reference-counting problem that might lead to a kernel crash. - The second patch associates IPIP next hops with their loopback RIFs. Besides being the right thing to do, it also fixes a problem where offloaded IPv6 routes that forward to IP-in-IP netdevices were not flagged as such. ==================== Signed-off-by: David S. Miller commit de0f43c01a4b5d408a5c087c8a92ac1739938f8b Author: Petr Machata Date: Mon Oct 2 12:14:57 2017 +0200 mlxsw: spectrum_router: Track RIF of IPIP next hops When considering whether to set RTNH_F_OFFLOAD flag on an IPv6 route, mlxsw_sp_fib6_entry_offload_set() looks up the mlxsw_sp_nexthop corresponding to a given route, and decides based on whether the next hop's offloaded flag was set. When looking for the matching next hop, it also takes into account the device of the route, which must match next hop's RIF. IPIP next hops however hitherto didn't set the RIF. As a result, IPv6 routes forwarding traffic to IP-in-IP netdevices are never marked as offloaded, even when they actually are. Thus track RIF of IPIP next hops the same way as that of ETHERNET next hops. Fixes: 8f28a3097645 ("mlxsw: spectrum_router: Support IPv6 overlay encap") 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 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 28a04c7b7bbecaab642fcb6a2d7354eb70ea7fbe Author: Petr Machata Date: Mon Oct 2 12:14:56 2017 +0200 mlxsw: spectrum_router: Move VRF refcounting When creating a new RIF, bumping RIF count of the containing VR is the last thing to be done. Symmetrically, when destroying a RIF, RIF count is first dropped and only then the rest of the cleanup proceeds. That's a problem for loopback RIFs. Those hold two VR references: one for overlay and one for underlay. mlxsw_sp_rif_destroy() releases the overlay one, and the deconfigure() callback the underlay one. But if both overlay and underlay are the same, and if there are no other artifacts holding the VR alive, this put actually destroys the VR. Later on, when mlxsw_sp_rif_destroy() calls mlxsw_sp_vr_put() for the same VR, the VR will already have been released and the kernel crashes with NULL pointer dereference. The underlying problem is that the RIF under destruction ends up referencing the overlay VR much longer than it claims: all the way until the call to mlxsw_sp_vr_put(). So line up the reference counting properly to reflect this. Make corresponding changes in mlxsw_sp_rif_create() as well for symmetry. Fixes: 6ddb7426a7d4 ("mlxsw: spectrum_router: Introduce loopback RIFs") 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7682e399485fe19622b6fd82510b1f4551e48a25 Author: Takashi Iwai Date: Mon Oct 2 14:06:43 2017 +0200 ALSA: usx2y: Suppress kernel warning at page allocation failures The usx2y driver allocates the stream read/write buffers in continuous pages depending on the stream setup, and this may spew the kernel warning messages with a stack trace like: WARNING: CPU: 1 PID: 1846 at mm/page_alloc.c:3883 __alloc_pages_slowpath+0x1ef2/0x2d70 Modules linked in: CPU: 1 PID: 1846 Comm: kworker/1:2 Not tainted .... It may confuse user as if it were any serious error, although this is no fatal error and the driver handles the error case gracefully. Since the driver has already some sanity check of the given size (128 and 256 pages), it can't pass any crazy value. So it's merely page fragmentation. This patch adds __GFP_NOWARN to each caller for suppressing such kernel warnings. The original issue was spotted by syzkaller. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/usx2y/usb_stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fbffee74986c899524de5707dab9cf321d02dab8 Author: Kalyan Kinthada Date: Fri Sep 29 10:36:04 2017 +1300 ARM: dts: Fix I2C repeated start issue on Armada-38x All the Armada 38x(380, 385, 388) have a silicon issue in the I2C controller which violates the I2C repeated start timing (errata FE-8471889). i2c-mv64xxx driver handles this errata based on the compatible string "marvell,mv78230-a0-i2c". This patch activates the "marvell,mv78230-a0-i2c" compatible string for the I2C controller on armada-38x SoC based devices. Signed-off-by: Kalyan Kinthada Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38f340ccdf9ed5f1350505b46c5689d015967057 Author: Yan, Zheng Date: Fri Sep 22 11:41:06 2017 +0800 ceph: fix __choose_mds() for LSSNAP request previous commit 5d37ca14 "ceph: send LSSNAP request to auth mds of directory inode" is buggy. It makes __choose_mds() choose mds base on hash of '.snap' dentry. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9f4057fc937f200f000dbc378c5c3e37d45e31dc Author: Yan, Zheng Date: Fri Sep 22 09:26:57 2017 +0800 ceph: properly queue cap snap for newly created snap realm commit 3ae0bebc "ceph: queue cap snap only when snap realm's context changes" introduced a regression: we may not call queue_realm_cap_snaps() for newly created snap realm. This regression allows unflushed snapshot data to be overwritten. Link: http://tracker.ceph.com/issues/21483 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/snap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0a6de8b8668a2cfc0912a1d7df21107e1a075a3a Author: Mark Rutland Date: Mon Oct 2 12:42:00 2017 +0100 arm64: fix misleading data abort decoding Currently data_abort_decode() dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print as hexadecimal, as was intended. Fixes: 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults") Reviewed-by: Dave Martin Reviewed-by: Julien Thierry Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98f7d577c882be5a4e7403b3fdd1741d1baab6b5 Author: Thomas Petazzoni Date: Thu Sep 28 16:06:33 2017 +0200 arm64: dts: marvell: fix interrupt-map property for Armada CP110 PCIe controller The interrupt-map property used in the description of the Marvell Armada 7K/8K PCIe controllers has a bogus extraneous 0 that causes the interrupt conversion to not be done properly. This causes the PCIe PME and AER root port service drivers to fail their initialization: [ 5.019900] genirq: Setting trigger mode 7 for irq 114 failed (irq_chip_set_type_parent+0x0/0x30) [ 5.028821] pcie_pme: probe of 0001:00:00.0:pcie001 failed with error -22 [ 5.035687] genirq: Setting trigger mode 7 for irq 114 failed (irq_chip_set_type_parent+0x0/0x30) [ 5.044614] aer: probe of 0001:00:00.0:pcie002 failed with error -22 This problem was introduced when the interrupt description was switched from using the GIC directly to using the ICU interrupt controller. Indeed, the GIC has address-cells = <1>, which requires a parent unit address, while the ICU has address-cells = <0>. Fixes: 6ef84a827c37 ("arm64: dts: marvell: enable GICP and ICU on Armada 7K/8K") Signed-off-by: Thomas Petazzoni Reviewed-by: Yehuda Yitschak Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 6 +++--- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit c503dd38f850be28867ef7a42d9abe5ade81a9bd Author: Arnd Bergmann Date: Fri Sep 22 23:29:12 2017 +0200 brcmsmac: make some local variables 'static const' to reduce stack size With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1: warning: the frame size of 3264 bytes is larger than 2048 bytes [-Wframe-larger-than=] broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy': broadcom/brcm80211/brcmsmac/phy/phy_n.c:17138:1: warning: the frame size of 2864 bytes is larger than 2048 bytes [-Wframe-larger-than=] Here, I'm reducing the stack size by marking as many local variables as 'static const' as I can without changing the actual code. This is the first of three patches to improve the stack usage in this driver. It would be good to have this backported to stabl kernels to get all drivers in 'allmodconfig' below the 2048 byte limit so we can turn on the frame warning again globally, but I realize that the patch is larger than the normal limit for stable backports. The other two patches do not need to be backported. Cc: Acked-by: Arend van Spriel Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmsmac/phy/phy_n.c | 197 ++++++++++----------- 1 file changed, 97 insertions(+), 100 deletions(-) commit dd2349121bb1b8ff688c3ca6a2a0bea9d8c142ca Author: Kevin Cernekee Date: Sat Sep 16 21:08:24 2017 -0700 brcmfmac: Add check for short event packets The length of the data in the received skb is currently passed into brcmf_fweh_process_event() as packet_len, but this value is not checked. event_packet should be followed by DATALEN bytes of additional event data. Ensure that the received packet actually contains at least DATALEN bytes of additional data, to avoid copying uninitialized memory into event->data. Cc: # v3.8 Suggested-by: Mattias Nissler Signed-off-by: Kevin Cernekee Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b8b8b16352cd90c6083033fd4487f04fae935c18 Author: Larry Finger Date: Wed Sep 20 16:15:05 2017 -0500 rtlwifi: rtl8821ae: Fix connection lost problem In commit 40b368af4b75 ("rtlwifi: Fix alignment issues"), the read of REG_DBI_READ was changed from 16 to 8 bits. For unknown reasonsi this change results in reduced stability for the wireless connection. This regression was located using bisection. Fixes: 40b368af4b75 ("rtlwifi: Fix alignment issues") Reported-and-tested-by: James Cameron Signed-off-by: Larry Finger Cc: Stable # 4.11+ Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51db452df07bb4c5754b73789253ba21681d9dc2 Author: Takashi Sakamoto Date: Tue Sep 26 09:11:49 2017 +0900 Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members" This reverts commit 275353bb684e to fix a regression which can abort 'alsactl' program in alsa-utils due to assertion in alsa-lib. alsactl: control.c:2513: snd_ctl_elem_value_get_integer: Assertion `idx < sizeof(obj->value.integer.value) / sizeof(obj->value.integer.value[0])' failed. alsactl: control.c:2976: snd_ctl_elem_value_get_integer: Assertion `idx < ARRAY_SIZE(obj->value.integer.value)' failed. This commit is a band-aid. In a point of usage of ALSA control interface, the drivers still bring an issue that they prevent userspace applications to have a consistent way to parse each levels of the dimension information via ALSA control interface. Let me investigate this issue. Current implementation of the drivers have three control element sets with dimension information: * 'Monitor Mixer Volume' (type: integer) * 'VMixer Volume' (type: integer) * 'VU-meters' (type: boolean) Although the number of elements named as 'Monitor Mixer Volume' differs depending on drivers in this group, it can be calculated by macros defined by each driver (= (BX_NUM - BX_ANALOG_IN) * BX_ANALOG_IN). Each of the elements has one member for value and has dimension information with 2 levels (= BX_ANALOG_IN * (BX_NUM - BX_ANALOG_IN)). For these elements, userspace applications are expected to handle the dimension information so that all of the elements construct a matrix where the number of rows and columns are represented by the dimension information. The same way is applied to elements named as 'VMixer Volume'. The number of these elements can also be calculated by macros defined by each drivers (= PX_ANALOG_IN * BX_ANALOG_IN). Each of the element has one member for value and has dimension information with 2 levels (= BX_ANALOG_IN * PX_ANALOG_IN). All of the elements construct a matrix with the dimension information. An element named as 'VU-meters' gets a different way in a point of dimension information. The element includes 96 members for value. The element has dimension information with 3 levels (= 3 or 2 * 16 * 2). For this element, userspace applications are expected to handle the dimension information so that all of the members for value construct a matrix where the number of rows and columns are represented by the dimension information. This is different from the way for the former. As a summary, the drivers were not designed to produce a consistent way to parse the dimension information. This makes it hard for general userspace applications such as amixer to parse the information by a consistent way, and actually no userspace applications except for 'echomixer' utilize the dimension information. Additionally, no drivers excluding this group use the information. The reverted commit was written based on the latter way. A commit 860c1994a70a ('ALSA: control: add dimension validator for userspace elements') is written based on the latter way, too. The patch should be reconsider too in the same time to re-define a consistent way to parse the dimension information. Reported-by: Mark Hills Reported-by: S. Christian Collins Fixes: 275353bb684e ('ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members') Cc: # v4.8+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/pci/echoaudio/echoaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66dcdafe8e251a3edc5d84cf725835567bd3dd35 Author: Kai-Heng Feng Date: Mon Oct 2 15:50:34 2017 +0800 Revert "HID: multitouch: Support ALPS PTP stick with pid 0x120A" This reverts commit fcaa4a07d2a4b541e91da7a55d8b3331f96d1865. As noted by Masaki [1], 0x120A + trackpoint will not be used in mass production machines, so remove the ID accordingly. [1] http://www.spinics.net/lists/linux-input/msg53222.html Signed-off-by: Kai-Heng Feng Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 - drivers/hid/hid-multitouch.c | 4 ---- 2 files changed, 5 deletions(-) commit 814b6d17487fd970f293ee674c90ba267f82415d Author: Dmitry Torokhov Date: Tue Sep 19 18:37:46 2017 -0700 HID: hidraw: fix power sequence when closing device We should not try to bring HID device out of full power state before calling hid_hw_close(), so that transport driver operates on powered up device (making this inverse of the opening sequence). Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Reviewed-by: Benson Leung Signed-off-by: Jiri Kosina drivers/hid/hidraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a5e597c6bb1b873e473e5f57147e9e5d2755430 Author: Jason Gerecke Date: Mon Sep 18 09:27:42 2017 -0700 HID: wacom: Always increment hdev refcount within wacom_get_hdev_data The wacom_get_hdev_data function is used to find and return a reference to the "other half" of a Wacom device (i.e., the touch device associated with a pen, or vice-versa). To ensure these references are properly accounted for, the function is supposed to automatically increment the refcount before returning. This was not done, however, for devices which have pen & touch on different interfaces of the same USB device. This can lead to a WARNING ("refcount_t: underflow; use-after-free") when removing the module or device as we call kref_put() more times than kref_get(). Triggering an "actual" use- after-free would be difficult since both devices will disappear nearly- simultaneously. To silence this warning and prevent the potential error, we need to increment the refcount for all cases within wacom_get_hdev_data. Fixes: 41372d5d40 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC") Cc: # v4.9+ Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fb458864d9a78cc433fec7979acbe4078c82d7a8 Author: Chanho Min Date: Tue Sep 26 09:03:40 2017 +0900 mmc: core: add driver strength selection when selecting hs400es The driver strength selection is missed and required when selecting hs400es. So, It is added here. Fixes: 81ac2af65793ecf ("mmc: core: implement enhanced strobe support") Cc: stable@vger.kernel.org Signed-off-by: Hankyung Yu Signed-off-by: Chanho Min Reviewed-by: Adrian Hunter Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 81359617f1b783a01e6e22b46cbb046e9513b9c6 Author: Christophe JAILLET Date: Sat Sep 30 07:34:34 2017 +0200 net: hns3: Fix an error handling path in 'hclge_rss_init_hw()' If this sanity check fails, we must free 'rss_indir'. Otherwise there is a memory leak. 'goto err' as done in the other error handling paths to fix it. Fixes: 46a3df9f9718 ("net: hns3: Fix for setting rss_size incorrectly") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4792ea04bcd03b8ccfd1ae336c5deba52dd9edc9 Author: Gregory CLEMENT Date: Fri Sep 29 14:27:39 2017 +0200 net: mvpp2: Fix clock resource by adding an optional bus clock On Armada 7K/8K we need to explicitly enable the bus clock. The bus clock is optional because not all the SoCs need them but at least for Armada 7K/8K it is actually mandatory. The binding documentation is updating accordingly. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-pp2.txt | 10 ++++++---- drivers/net/ethernet/marvell/mvpp2.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) commit 90841047a01b452cc8c3f9b990698b264143334a Author: Grant Grundler Date: Thu Sep 28 11:35:00 2017 -0700 r8152: add Linksys USB3GIGV1 id This linksys dongle by default comes up in cdc_ether mode. This patch allows r8152 to claim the device: Bus 002 Device 002: ID 13b1:0041 Linksys Signed-off-by: Grant Grundler Reviewed-by: Douglas Anderson Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 10 ++++++++++ drivers/net/usb/r8152.c | 2 ++ 2 files changed, 12 insertions(+) commit 9f775ead5e570e7e19015b9e4e2f3dd6e71a5935 Author: Guillaume Nault Date: Thu Sep 28 15:44:38 2017 +0200 l2tp: fix l2tp_eth module loading The l2tp_eth module crashes if its netlink callbacks are run when the pernet data aren't initialised. We should normally register_pernet_device() before the genl callbacks. However, the pernet data only maintain a list of l2tpeth interfaces, and this list is never used. So let's just drop pernet handling instead. Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 51 ++------------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) commit c79c314bb422482b88fa9881d783d2d5752f6ac6 Merge: aad0621 c84bed4 Author: David S. Miller Date: Sun Oct 1 22:30:33 2017 -0700 Merge branch 'erspan-fixes' Xin Long says: ==================== ip_gre: a bunch of fixes for erspan This patchset is to fix some issues that could cause 0 or low performance, and even unexpected truncated packets on erspan. ==================== Signed-off-by: David S. Miller commit c84bed440e4e11a973e8c0254d0dfaccfca41fb0 Author: Xin Long Date: Sun Oct 1 22:00:56 2017 +0800 ip_gre: erspan device should keep dst The patch 'ip_gre: ipgre_tap device should keep dst' fixed the issue ipgre_tap dev mtu couldn't be updated in tx path. The same fix is needed for erspan as well. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 1 + 1 file changed, 1 insertion(+) commit c122fda271717f4fc618e0a31e833941fd5f1efd Author: Xin Long Date: Sun Oct 1 22:00:55 2017 +0800 ip_gre: set tunnel hlen properly in erspan_tunnel_init According to __gre_tunnel_init, tunnel->hlen should be set as the headers' length between inner packet and outer iphdr. It would be used especially to calculate a proper mtu when updating mtu in tnl_update_pmtu. Now without setting it, a bigger mtu value than expected would be updated, which hurts performance a lot. This patch is to fix it by setting tunnel->hlen with: tunnel->tun_hlen + tunnel->encap_hlen + sizeof(struct erspanhdr) Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5513d08d29511c263c00933c00dd7a82fffda3c9 Author: Xin Long Date: Sun Oct 1 22:00:54 2017 +0800 ip_gre: check packet length and mtu correctly in erspan_xmit As a ARPHRD_ETHER device, skb->len in erspan_xmit is the length of the whole ether packet. So before checking if a packet size exceeds the mtu, skb->len should subtract dev->hard_header_len. Otherwise, all packets with max size according to mtu would be trimmed to be truncated packet. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 935a9749a36828af0e8be224a5cd4bc758112c34 Author: Xin Long Date: Sun Oct 1 22:00:53 2017 +0800 ip_gre: get key from session_id correctly in erspan_rcv erspan only uses the first 10 bits of session_id as the key to look up the tunnel. But in erspan_rcv, it missed 'session_id & ID_MASK' when getting the key from session_id. If any other flag is also set in session_id in a packet, it would fail to find the tunnel due to incorrect key in erspan_rcv. This patch is to add 'session_id & ID_MASK' there and also remove the unnecessary variable session_id. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0a47df11bfc31e1ceae7f91cea84d3bff500475d Author: Scott Mayhew Date: Fri Sep 29 09:36:43 2017 -0400 nfs/filelayout: fix oops when freeing filelayout segment Check for a NULL dsaddr in filelayout_free_lseg() before calling nfs4_fl_put_deviceid(). This fixes the following oops: [ 1967.645207] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [ 1967.646010] IP: [] nfs4_put_deviceid_node+0xa/0x90 [nfsv4] [ 1967.646010] PGD c08bc067 PUD 915d3067 PMD 0 [ 1967.753036] Oops: 0000 [#1] SMP [ 1967.753036] Modules linked in: nfs_layout_nfsv41_files ext4 mbcache jbd2 loop rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache amd64_edac_mod ipmi_ssif edac_mce_amd edac_core kvm_amd sg kvm ipmi_si ipmi_devintf irqbypass pcspkr k8temp ipmi_msghandler i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common amdkfd amd_iommu_v2 radeon i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops mptsas ttm scsi_transport_sas mptscsih drm mptbase serio_raw i2c_core bnx2 dm_mirror dm_region_hash dm_log dm_mod [ 1967.790031] CPU: 2 PID: 1370 Comm: ls Not tainted 3.10.0-709.el7.test.bz1463784.x86_64 #1 [ 1967.790031] Hardware name: IBM BladeCenter LS21 -[7971AC1]-/Server Blade, BIOS -[BAE155AUS-1.10]- 06/03/2009 [ 1967.790031] task: ffff8800c42a3f40 ti: ffff8800c4064000 task.ti: ffff8800c4064000 [ 1967.790031] RIP: 0010:[] [] nfs4_put_deviceid_node+0xa/0x90 [nfsv4] [ 1967.790031] RSP: 0000:ffff8800c4067978 EFLAGS: 00010246 [ 1967.790031] RAX: ffffffffc062f000 RBX: ffff8801d468a540 RCX: dead000000000200 [ 1967.790031] RDX: ffff8800c40679f8 RSI: ffff8800c4067a0c RDI: 0000000000000000 [ 1967.790031] RBP: ffff8800c4067980 R08: ffff8801d468a540 R09: 0000000000000000 [ 1967.790031] R10: 0000000000000000 R11: ffffffffffffffff R12: ffff8801d468a540 [ 1967.790031] R13: ffff8800c40679f8 R14: ffff8801d5645300 R15: ffff880126f15ff0 [ 1967.790031] FS: 00007f11053c9800(0000) GS:ffff88012bd00000(0000) knlGS:0000000000000000 [ 1967.790031] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 1967.790031] CR2: 0000000000000030 CR3: 0000000094b55000 CR4: 00000000000007e0 [ 1967.790031] Stack: [ 1967.790031] ffff8801d468a540 ffff8800c4067990 ffffffffc062d2fe ffff8800c40679b0 [ 1967.790031] ffffffffc062b5b4 ffff8800c40679f8 ffff8801d468a540 ffff8800c40679d8 [ 1967.790031] ffffffffc06d39af ffff8800c40679f8 ffff880126f16078 0000000000000001 [ 1967.790031] Call Trace: [ 1967.790031] [] nfs4_fl_put_deviceid+0xe/0x10 [nfs_layout_nfsv41_files] [ 1967.790031] [] filelayout_free_lseg+0x24/0x90 [nfs_layout_nfsv41_files] [ 1967.790031] [] pnfs_free_lseg_list+0x5f/0x80 [nfsv4] [ 1967.790031] [] _pnfs_return_layout+0x157/0x270 [nfsv4] [ 1967.790031] [] nfs4_evict_inode+0x4d/0x70 [nfsv4] [ 1967.790031] [] evict+0xa9/0x180 [ 1967.790031] [] iput+0xf9/0x190 [ 1967.790031] [] nfs_dentry_iput+0x3a/0x50 [nfs] [ 1967.790031] [] shrink_dentry_list+0x20f/0x490 [ 1967.790031] [] d_invalidate+0xd8/0x150 [ 1967.790031] [] nfs_readdir_page_filler+0x40b/0x600 [nfs] [ 1967.790031] [] nfs_readdir_xdr_to_array+0x20d/0x3b0 [nfs] [ 1967.790031] [] ? __mem_cgroup_commit_charge+0xe2/0x2f0 [ 1967.790031] [] ? __add_to_page_cache_locked+0x48/0x170 [ 1967.790031] [] ? nfs_readdir_xdr_to_array+0x3b0/0x3b0 [nfs] [ 1967.790031] [] nfs_readdir_filler+0x22/0x90 [nfs] [ 1967.790031] [] do_read_cache_page+0x7f/0x190 [ 1967.790031] [] ? fillonedir+0xe0/0xe0 [ 1967.790031] [] read_cache_page+0x1c/0x30 [ 1967.790031] [] nfs_readdir+0x1ab/0x6b0 [nfs] [ 1967.790031] [] ? nfs4_xdr_dec_layoutget+0x270/0x270 [nfsv4] [ 1967.790031] [] ? fillonedir+0xe0/0xe0 [ 1967.790031] [] vfs_readdir+0xb0/0xe0 [ 1967.790031] [] SyS_getdents+0x95/0x120 [ 1967.790031] [] system_call_fastpath+0x16/0x1b [ 1967.790031] Code: 90 31 d2 48 89 d0 5d c3 85 f6 74 f5 8d 4e 01 89 f0 f0 0f b1 0f 39 f0 74 e2 89 c6 eb eb 0f 1f 40 00 66 66 66 66 90 55 48 89 e5 53 <48> 8b 47 30 48 89 fb a8 04 74 3b 8b 57 60 83 fa 02 74 19 8d 4a [ 1967.790031] RIP [] nfs4_put_deviceid_node+0xa/0x90 [nfsv4] [ 1967.790031] RSP [ 1967.790031] CR2: 0000000000000030 Signed-off-by: Scott Mayhew Fixes: 1ebf98012792 ("NFS/filelayout: Fix racy setting of fl->dsaddr...") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d099b8af46f5e1e37182eff988f9373dcc2b0128 Author: Colin Ian King Date: Mon Sep 18 12:21:14 2017 +0100 sunrpc: remove redundant initialization of sock sock is being initialized and then being almost immediately updated hence the initialized value is not being used and is redundant. Remove the initialization. Cleans up clang warning: warning: Value stored to 'sock' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Trond Myklebust net/sunrpc/xprtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68ebf8fe3bce8c167cf83fbd681c1eb1ed419c6c Author: Benjamin Coddington Date: Fri Sep 22 07:57:10 2017 -0400 NFS: Fix uninitialized rpc_wait_queue Michael Sterrett reports a NULL pointer dereference on NFSv3 mounts when CONFIG_NFS_V4 is not set because the NFS UOC rpc_wait_queue has not been initialized. Move the initialization of the queue out of the CONFIG_NFS_V4 conditional setion. Fixes: 7d6ddf88c4db ("NFS: Add an iocounter wait function for async RPC tasks") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb2e53fd6dc715c5b45d0967fcb6dc574cb28f8 Author: Dan Carpenter Date: Thu Sep 21 00:53:46 2017 +0300 NFS: Cleanup error handling in nfs_idmap_request_key() nfs_idmap_get_desc() can't actually return zero. But if it did then we would return ERR_PTR(0) which is NULL and the caller, nfs_idmap_get_key(), doesn't expect that so it leads to a NULL pointer dereference. I've cleaned this up by changing the "<=" to "<" so it's more clear that we don't return ERR_PTR(0). Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust fs/nfs/nfs4idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35c036ef4a722e953e17884f4f4325f78eeab475 Author: J. Bruce Fields Date: Wed Sep 20 12:42:13 2017 -0400 nfs: RPC_MAX_AUTH_SIZE is in bytes The units of RPC_MAX_AUTH_SIZE is bytes, not 4-byte words. This causes the client to request a larger-than-necessary session replay slot size. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e66317d3c92ddaab330c125dfe9d06eee268aff Author: Linus Torvalds Date: Sun Oct 1 14:54:54 2017 -0700 Linux 4.14-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 368f89984bb971b9f8b69eeb85ab19a89f985809 Merge: c42ed9f 196bd48 Author: Linus Torvalds Date: Sun Oct 1 13:55:32 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "This contains the following fixes and improvements: - Avoid dereferencing an unprotected VMA pointer in the fault signal generation code - Fix inline asm call constraints for GCC 4.4 - Use existing register variable to retrieve the stack pointer instead of forcing the compiler to create another indirect access which results in excessive extra 'mov %rsp, %' instructions - Disable branch profiling for the memory encryption code to prevent an early boot crash - Fix a sparse warning caused by casting the __user annotation in __get_user_asm_u64() away - Fix an off by one error in the loop termination of the error patch in the x86 sysfs init code - Add missing CPU IDs to various Intel specific drivers to enable the functionality on recent hardware - More (init) constification in the numachip code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Use register variable to get stack pointer value x86/mm: Disable branch profiling in mem_encrypt.c x86/asm: Fix inline asm call constraints for GCC 4.4 perf/x86/intel/uncore: Correct num_boxes for IIO and IRP perf/x86/intel/rapl: Add missing CPU IDs perf/x86/msr: Add missing CPU IDs perf/x86/intel/cstate: Add missing CPU IDs x86: Don't cast away the __user in __get_user_asm_u64() x86/sysfs: Fix off-by-one error in loop termination x86/mm: Fix fault error path using unsafe vma pointer x86/numachip: Add const and __initconst to numachip2_clockevent commit c42ed9f91fa1868db0e7748ec6d816a484b11890 Merge: 8251354 69b73e9 Author: Linus Torvalds Date: Sun Oct 1 13:03:16 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "This adds a new timer wheel function which is required for the conversion of the timer callback function from the 'unsigned long data' argument to 'struct timer_list *timer'. This conversion has two benefits: 1) It makes struct timer_list smaller 2) Many callers hand in a pointer to the timer or to the structure containing the timer, which happens via type casting both at setup and in the callback. This change gets rid of the typecasts. Once the conversion is complete, which is planned for 4.15, the old setup function and the intermediate typecast in the new setup function go away along with the data field in struct timer_list. Merging this now into mainline allows a smooth queueing of the actual conversion in the affected maintainer trees without creating dependencies" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: um/time: Fixup namespace collision timer: Prepare to change timer callback argument type commit 82513545134453a9150a2177e7a5704dcd604f8e Merge: 7e103ac 1db4948 Author: Linus Torvalds Date: Sun Oct 1 12:34:42 2017 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp/hotplug fixes from Thomas Gleixner: "This addresses the fallout of the new lockdep mechanism which covers completions in the CPU hotplug code. The lockdep splats are false positives, but there is no way to annotate that reliably. The solution is to split the completions for CPU up and down, which requires some reshuffling of the failure rollback handling as well" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/hotplug: Hotplug state fail injection smp/hotplug: Differentiate the AP completion between up and down smp/hotplug: Differentiate the AP-work lockdep class between up and down smp/hotplug: Callback vs state-machine consistency smp/hotplug: Rewrite AP state machine core smp/hotplug: Allow external multi-instance rollback smp/hotplug: Add state diagram commit 7e103ace9cea68b756b4f16cc669d9bd177daafb Merge: 1c6f705 5ccba44 Author: Linus Torvalds Date: Sun Oct 1 12:10:02 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "The scheduler pull request comes with the following updates: - Prevent a divide by zero issue by validating the input value of sysctl_sched_time_avg - Make task state printing consistent all over the place and have explicit state characters for IDLE and PARKED so they wont be displayed as 'D' state which confuses tools" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/sysctl: Check user input value of sysctl_sched_time_avg sched/debug: Add explicit TASK_PARKED printing sched/debug: Ignore TASK_IDLE for SysRq-W sched/debug: Add explicit TASK_IDLE printing sched/tracing: Use common task-state helpers sched/tracing: Fix trace_sched_switch task-state printing sched/debug: Remove unused variable sched/debug: Convert TASK_state to hex sched/debug: Implement consistent task-state printing commit 1c6f705ba236678278e47a4c4542c799ad0e5add Merge: 1de47f3 1addcd5 Author: Linus Torvalds Date: Sun Oct 1 12:06:31 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: - Prevent a division by zero in the perf aux buffer handling - Sync kernel headers with perf tool headers - Fix a build failure in the syscalltbl code - Make the debug messages of perf report --call-graph work correctly - Make sure that all required perf files are in the MANIFEST for container builds - Fix the atrr.exclude kernel handling so it respects the perf_event_paranoid and the user permissions - Make perf test on s390x work correctly * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/aux: Only update ->aux_wakeup in non-overwrite mode perf test: Fix vmlinux failure on s390x part 2 perf test: Fix vmlinux failure on s390x perf tools: Fix syscalltbl build failure perf report: Fix debug messages with --call-graph option perf evsel: Fix attr.exclude_kernel setting for default cycles:p tools include: Sync kernel ABI headers with tooling headers perf tools: Get all of tools/{arch,include}/ in the MANIFEST commit 1de47f3cb705e8c19fdd432eb704f5a588ccec48 Merge: 3d9d62b 9c29c318 Author: Linus Torvalds Date: Sun Oct 1 12:02:47 2017 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two fixes for locking: - Plug a hole the pi_stat->owner serialization which was changed recently and failed to fixup two usage sites. - Prevent reordering of the rwsem_has_spinner() check vs the decrement of rwsem count in up_write() which causes a missed wakeup" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem-xadd: Fix missed wakeup due to reordering of load futex: Fix pi_state->owner serialization commit 3d9d62b99befa8b4d490e13e605d2c3540b4b82b Merge: 156069f 72364d3 Author: Linus Torvalds Date: Sun Oct 1 12:00:56 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: - Add a missing NULL pointer check in free_irq() - Fix a memory leak/memory corruption in the generic irq chip - Add missing rcu annotations for radix tree access - Use ffs instead of fls when extracting data from a chip register in the MIPS GIC irq driver - Fix the unmasking of IPI interrupts in the MIPS GIC driver so they end up at the target CPU and not at CPU0 * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irq/generic-chip: Don't replace domain's name irqdomain: Add __rcu annotations to radix tree accessors irqchip/mips-gic: Use effective affinity to unmask irqchip/mips-gic: Fix shifts to extract register fields genirq: Check __free_irq() return value for NULL commit 156069f8f09cb3f04862f9909c5268ed64681f0c Merge: a8c964e 607a402 Author: Linus Torvalds Date: Sun Oct 1 11:12:29 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Thomas Gleixner: "Two small fixes for objtool: - Support frame pointer setup via 'lea (%rsp), %rbp' which was not yet supported and caused build warnings - Disable unreacahble warnings for GCC4.4 and older to avoid false positives caused by the compiler itself" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Support unoptimized frame pointer setup objtool: Skip unreachable warnings for GCC 4.4 and older commit 74007ae6316ebe40260e44f8ab558f9b1ccc04e5 Author: Christophe Jaillet Date: Sat Sep 23 08:44:15 2017 +0200 hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()' Commit 2ca492e22cb7 has moved the call to 'kfifo_alloc()' from after the main 'if' statement to before it. But it has not updated the error handling paths accordingly. Fix all that: - if 'kfifo_alloc()' fails we can return directly - direct returns after 'kfifo_alloc()' must now go to 'out_mbox_free' - 'goto out_mbox_free' must be replaced by 'goto out', otherwise the '[pcc_]mbox_free_channel()' call will be missed. Fixes: 2ca492e22cb7 ("hwmon: (xgene) Fix crash when alarm occurs before driver probe") Signed-off-by: Christophe JAILLET Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit be94a6f6d488b4767662e8949dc62361bd1d6311 Author: Lars-Peter Clausen Date: Fri Sep 29 15:24:05 2017 +0200 iio: dummy: events: Add missing break Add missing break in iio_simple_dummy_write_event_config() for the voltage threshold event enable attribute. Without this writing to the in_voltage0_thresh_rising_en always returns -EINVAL even though the change was correctly applied. Fixes: 3e34e650db197 ("iio: dummy: Demonstrate the usage of new channel types") Signed-off-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/dummy/iio_simple_dummy_events.c | 1 + 1 file changed, 1 insertion(+) commit 007a61ae2f35c7fcf767313285c4924e81f11983 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 Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aad06212d36cf34859428a0a279e5c14ee5c9e26 Author: Parthasarathy Bhuvaragan Date: Fri Sep 29 10:02:54 2017 +0200 tipc: use only positive error codes in messages In commit e3a77561e7d32 ("tipc: split up function tipc_msg_eval()"), we have updated the function tipc_msg_lookup_dest() to set the error codes to negative values at destination lookup failures. Thus when the function sets the error code to -TIPC_ERR_NO_NAME, its inserted into the 4 bit error field of the message header as 0xf instead of TIPC_ERR_NO_NAME (1). The value 0xf is an unknown error code. In this commit, we set only positive error code. Fixes: e3a77561e7d32 ("tipc: split up function tipc_msg_eval()") Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a59a3a0ef0e546626a762d49dc06feaa204bab3 Author: Guillaume Nault Date: Thu Sep 28 17:57:58 2017 +0200 ppp: fix __percpu annotation Move sparse annotation right after pointer type. Fixes sparse warning: drivers/net/ppp/ppp_generic.c:1422:13: warning: incorrect type in initializer (different address spaces) drivers/net/ppp/ppp_generic.c:1422:13: expected void const [noderef] *__vpp_verify drivers/net/ppp/ppp_generic.c:1422:13: got int * ... Fixes: e5dadc65f9e0 ("ppp: Fix false xmit recursion detect with two ppp devices") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 230583c1952b40c35d67722b8e3eb13708a85dd1 Merge: d41bb33 bc044e8 Author: David S. Miller Date: Sun Oct 1 03:55:47 2017 +0100 Merge branch 'udp-fix-early-demux-for-mcast-packets' Paolo Abeni says: ==================== udp: fix early demux for mcast packets Currently the early demux callbacks do not perform source address validation. This is not an issue for TCP or UDP unicast, where the early demux is only allowed for connected sockets and the source address is validated for the first packet and never change. The UDP protocol currently allows early demux also for unconnected multicast sockets, and we are not currently doing any validation for them, after that the first packet lands on the socket: beyond ignoring the rp_filter - if enabled - any kind of martian sources are also allowed. This series addresses the issue allowing the early demux callback to return an error code, and performing the proper checks for unconnected UDP multicast sockets before leveraging the rx dst cache. Alternatively we could disable the early demux for unconnected mcast sockets, but that would cause relevant performance regression - around 50% - while with this series, with full rp_filter in place, we keep the regression to a more moderate level. ==================== Signed-off-by: David S. Miller commit bc044e8db7962e727a75b591b9851ff2ac5cf846 Author: Paolo Abeni Date: Thu Sep 28 15:51:37 2017 +0200 udp: perform source validation for mcast early demux The UDP early demux can leverate the rx dst cache even for multicast unconnected sockets. In such scenario the ipv4 source address is validated only on the first packet in the given flow. After that, when we fetch the dst entry from the socket rx cache, we stop enforcing the rp_filter and we even start accepting any kind of martian addresses. Disabling the dst cache for unconnected multicast socket will cause large performace regression, nearly reducing by half the max ingress tput. Instead we factor out a route helper to completely validate an skb source address for multicast packets and we call it from the UDP early demux for mcast packets landing on unconnected sockets, after successful fetching the related cached dst entry. This still gives a measurable, but limited performance regression: rp_filter = 0 rp_filter = 1 edmux disabled: 1182 Kpps 1127 Kpps edmux before: 2238 Kpps 2238 Kpps edmux after: 2037 Kpps 2019 Kpps The above figures are on top of current net tree. Applying the net-next commit 6e617de84e87 ("net: avoid a full fib lookup when rp_filter is disabled.") the delta with rp_filter == 0 will decrease even more. Fixes: 421b3885bf6d ("udp: ipv4: Add udp early demux") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/route.h | 4 +++- net/ipv4/route.c | 46 ++++++++++++++++++++++++++-------------------- net/ipv4/udp.c | 13 ++++++++++++- 3 files changed, 41 insertions(+), 22 deletions(-) commit 7487449c86c65202b3b725c4524cb48dd65e4e6f Author: Paolo Abeni Date: Thu Sep 28 15:51:36 2017 +0200 IPv4: early demux can return an error code Currently no error is emitted, but this infrastructure will used by the next patch to allow source address validation for mcast sockets. Since early demux can do a route lookup and an ipv4 route lookup can return an error code this is consistent with the current ipv4 route infrastructure. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/protocol.h | 4 ++-- include/net/tcp.h | 2 +- include/net/udp.h | 2 +- net/ipv4/ip_input.c | 25 +++++++++++++++---------- net/ipv4/tcp_ipv4.c | 9 +++++---- net/ipv4/udp.c | 11 ++++++----- 6 files changed, 30 insertions(+), 23 deletions(-) commit d41bb33ba33b8f8debe54ed36be6925eb496e354 Author: Xin Long Date: Thu Sep 28 13:24:07 2017 +0800 ip6_tunnel: update mtu properly for ARPHRD_ETHER tunnel device in tx path Now when updating mtu in tx path, it doesn't consider ARPHRD_ETHER tunnel device, like ip6gre_tap tunnel, for which it should also subtract ether header to get the correct mtu. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2d40557cc702ed8e5edd9bd422233f86652d932e Author: Xin Long Date: Thu Sep 28 13:23:50 2017 +0800 ip6_gre: ip6gre_tap device should keep dst The patch 'ip_gre: ipgre_tap device should keep dst' fixed a issue that ipgre_tap mtu couldn't be updated in tx path. The same fix is needed for ip6gre_tap as well. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 1 + 1 file changed, 1 insertion(+) commit d51711c0557d6dbd26c63144aef32c7b3ec264b9 Author: Xin Long Date: Thu Sep 28 13:23:31 2017 +0800 ip_gre: ipgre_tap device should keep dst Without keeping dst, the tunnel will not update any mtu/pmtu info, since it does not have a dst on the skb. Reproducer: client(ipgre_tap1 - eth1) <-----> (eth1 - ipgre_tap1)server After reducing eth1's mtu on client, then perforamnce became 0. This patch is to netif_keep_dst in gre_tap_init, as ipgre does. 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 13ffe9a26df4e156363579b25c904dd0b1e31bfb Author: Colin Ian King Date: Wed Sep 13 18:02:02 2017 +0100 staging: iio: ade7759: fix signed extension bug on shift of a u8 The current shift of st->rx[2] left shifts a u8 24 bits left, promotes the integer to a an int and then to a unsigned u64. If the top bit of st->rx[2] is set then we end up with all the upper bits being set to 1. Fix this by casting st->rx[2] to a u64 before the 24 bit left shift. Detected by CoverityScan CID#144940 ("Unintended sign extension") Fixes: 2919fa54ef64 ("staging: iio: meter: new driver for ADE7759 devices") Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7759.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8c964eacb21288b2dbfa9d80cee5968a3b8fb21 Merge: 0b33ce7 36de807 Author: Linus Torvalds Date: Sat Sep 30 12:52:32 2017 -0700 Merge tag 'mtd/fixes-for-4.14-rc3' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: - Fix partition alignment check in mtdcore.c - Fix a buffer overflow in the Atmel NAND driver * tag 'mtd/fixes-for-4.14-rc3' of git://git.infradead.org/linux-mtd: mtd: nand: atmel: fix buffer overflow in atmel_pmecc_user mtd: Fix partition alignment check on multi-erasesize devices commit 0b33ce72ea8834e41174c728845eee1c526d6f88 Merge: 74d83ec d0b7a90 Author: Linus Torvalds Date: Sat Sep 30 12:50:56 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eight mostly minor fixes for recently discovered issues in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ILLEGAL REQUEST + ASC==27 => target failure scsi: aacraid: Add a small delay after IOP reset scsi: scsi_transport_fc: Also check for NOTPRESENT in fc_remote_port_add() scsi: scsi_transport_fc: set scsi_target_id upon rescan scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly scsi: aacraid: error: testing array offset 'bus' after use scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function scsi: aacraid: Fix 2T+ drives on SmartIOC-2000 commit fef0035c0f31322d417d1954bba5ab959bf91183 Author: Jason A. Donenfeld Date: Thu Sep 28 00:41:44 2017 +0200 netlink: do not proceed if dump's start() errs Drivers that use the start method for netlink dumping rely on dumpit not being called if start fails. For example, ila_xlat.c allocates memory and assigns it to cb->args[0] in its start() function. It might fail to do that and return -ENOMEM instead. However, even when returning an error, dumpit will be called, which, in the example above, quickly dereferences the memory in cb->args[0], which will OOPS the kernel. This is but one example of how this goes wrong. Since start() has always been a function with an int return type, it therefore makes sense to use it properly, rather than ignoring it. This patch thus returns early and does not call dumpit() when start() fails. Signed-off-by: Jason A. Donenfeld Cc: Johannes Berg Reviewed-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 74d83ec2b73457449918c315e40622c03a3659a6 Merge: 95dcc4d ce7c47d Author: Linus Torvalds Date: Fri Sep 29 19:35:41 2017 -0700 Merge tag 'platform-drivers-x86-v4.14-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform drivers fix from Darren Hart: "Newly discovered species of fujitsu laptops break some assumptions about ACPI device pairings. fujitsu-laptop: Don't oops when FUJ02E3 is not present" * tag 'platform-drivers-x86-v4.14-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt commit 95dcc4dc38e407bb2af9c7c45c9bc4c995eefeeb Merge: 99637e4 f3a0c7b Author: Linus Torvalds Date: Fri Sep 29 19:33:32 2017 -0700 Merge tag 'led_fixes-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fixes from Jacek Anaszewski: "Four fixes for the as3645a LED flash controller and one update to MAINTAINERS" * tag 'led_fixes-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: MAINTAINERS: Add entry for MediaTek PMIC LED driver as3645a: Unregister indicator LED on device unbind as3645a: Use integer numbers for parsing LEDs dt: bindings: as3645a: Use LED number to refer to LEDs as3645a: Use ams,input-max-microamp as documented in DT bindings commit 79765e9a3d9966dc35a35a1a9c50afcd6a2dc354 Merge: 9792bf5 00e6751 Author: Stephen Boyd Date: Fri Sep 29 14:17:51 2017 -0700 Merge tag 'v4.14-rockchip-clkfixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-fixes Pull Rockchip clk driver fixes from Heiko Stuebner: Some smallish fixes for the rk3128 clock support including some register errors and some clocks that should be critical for safe usage. * tag 'v4.14-rockchip-clkfixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: add sclk_timer5 as critical clock on rk3128 clk: rockchip: fix up rk3128 pvtm and mipi_24m gate regs error clk: rockchip: add pclk_pmu as critical clock on rk3128 commit 9792bf5ad5e30b207274ccbb459a89eab6033b46 Author: Bjorn Andersson Date: Fri Sep 22 22:00:29 2017 -0700 clk: Export clk_bulk_prepare() Allow clk_bulk_prepare() to be referenced by kernel modules by adding the missing EXPORT_SYMBOL_GPL(). Fixes: 266e4e9d9150 ("clk: add clk_bulk_get accessories") Reported-by: Ulf Hansson Signed-off-by: Bjorn Andersson Reviewed-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/clk-bulk.c | 1 + 1 file changed, 1 insertion(+) commit 99637e4268ea27f6fa52c4b3717d3c0675e5c20c Merge: 5ba88cd 6c85501 Author: Linus Torvalds Date: Fri Sep 29 12:59:59 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull waitid fix from Al Viro: "Fix infoleak in waitid()" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix infoleak in waitid(2) commit 5ba88cd6e9a658be0cdcaf4fc0438b7d63d32bf6 Merge: 7b5ef82 8c6c592 Author: Linus Torvalds Date: Fri Sep 29 12:57:35 2017 -0700 Merge branch 'for-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We've collected a bunch of isolated fixes, for crashes, user-visible behaviour or missing bits from other subsystem cleanups from the past. The overall number is not small but I was not able to make it significantly smaller. Most of the patches are supposed to go to stable" * 'for-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: log csums for all modified extents Btrfs: fix unexpected result when dio reading corrupted blocks btrfs: Report error on removing qgroup if del_qgroup_item fails Btrfs: skip checksum when reading compressed data if some IO have failed Btrfs: fix kernel oops while reading compressed data Btrfs: use btrfs_op instead of bio_op in __btrfs_map_block Btrfs: do not backup tree roots when fsync btrfs: remove BTRFS_FS_QUOTA_DISABLING flag btrfs: propagate error to btrfs_cmp_data_prepare caller btrfs: prevent to set invalid default subvolid Btrfs: send: fix error number for unknown inode types btrfs: fix NULL pointer dereference from free_reloc_roots() btrfs: finish ordered extent cleaning if no progress is found btrfs: clear ordered flag on cleaning up ordered extents Btrfs: fix incorrect {node,sector}size endianness from BTRFS_IOC_FS_INFO Btrfs: do not reset bio->bi_ops while writing bio Btrfs: use the new helper wbc_to_write_flags commit 7b5ef82336e7a4f5569ab6c858df5aa2146b066d Merge: 93b5533 7d5d7b5 Author: Linus Torvalds Date: Fri Sep 29 12:55:33 2017 -0700 Merge tag 'md/4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "A few fixes for MD. Mainly fix a problem introduced in 4.13, which we retry bio for some code paths but not all in some situations" * tag 'md/4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid5: cap worker count dm-raid: fix a race condition in request handling md: fix a race condition for flush request handling md: separate request handling commit 93b5533ab58d635968ebb0939fe90f3b022601af Merge: a358320 9561475 Author: Linus Torvalds Date: Fri Sep 29 12:46:13 2017 -0700 Merge tag 'pci-v4.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix CONFIG_PCI=n build error (introduced in v4.14-rc1) (Geert Uytterhoeven) - fix a race in sysfs driver_override store/show (Nicolai Stange) * tag 'pci-v4.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Fix race condition with driver_override PCI: Add dummy pci_acs_enabled() for CONFIG_PCI=n build commit a3583202e8292540fae38ed44bd49d77e35286c2 Merge: 35dbba3 2b702e7 Author: Linus Torvalds Date: Fri Sep 29 12:43:36 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Regular fixes pull, some amdkfd, amdgpu, etnaviv, sun4i, qxl, tegra fixes. I've got an outstanding pull for i915 but it wasn't on an rc2 base so I wanted to ship these out first, I might get to it before rc3 or I might not" * tag 'drm-fixes-for-v4.14-rc3' of git://people.freedesktop.org/~airlied/linux: drm/tegra: trace: Fix path to include qxl: fix framebuffer unpinning drm/sun4i: cec: Enable back CEC-pin framework drm/amdkfd: Print event limit messages only once per process drm/amdkfd: Fix kernel-queue wrapping bugs drm/amdkfd: Fix incorrect destroy_mqd parameter drm/radeon: disable hard reset in hibernate for APUs drm/amdgpu: revert tile table update for oland etnaviv: fix gem object list corruption etnaviv: fix submit error path qxl: fix primary surface handling drm/amdkfd: check for null dev to avoid a null pointer dereference commit 35dbba31be52c59a89bd96d49f170999d57c9234 Merge: 0648260 50ce631 Author: Linus Torvalds Date: Fri Sep 29 12:37:07 2017 -0700 Merge tag 'iommu-fixes-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - A comment fix for 'struct iommu_ops' - Format string fixes for AMD IOMMU, unfortunatly I missed that during review. - Limit mediatek physical addresses to 32 bit for v7s to fix a warning triggered in io-page-table code. - Fix dma-sync in io-pgtable-arm-v7s code * tag 'iommu-fixes-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Fix comment for iommu_ops.map_sg iommu/amd: pr_err() strings should end with newlines iommu/mediatek: Limit the physical address in 32bit for v7s iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA commit 06482600419b51cbda5162baa27686fca7df2254 Merge: 9f2a512 760bfb4 Author: Linus Torvalds Date: Fri Sep 29 12:31:35 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - SPsel register initialisation on reset as the architecture defines its state as unknown - Use READ_ONCE when dereferencing pmd_t pointers to avoid race conditions in page_vma_mapped_walk() (or fast GUP) with concurrent modifications of the page table - Avoid invoking the mm fault handling code for kernel addresses (check against TASK_SIZE) which would otherwise result in calling might_sleep() in atomic context * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: fault: Route pte translation faults via do_translation_fault arm64: mm: Use READ_ONCE when dereferencing pointer to pte table arm64: Make sure SPsel is always set commit 9f2a5128b94beb6bb63d8fc03d67f47203b04b3a Merge: 42057e1 0d805ee Author: Linus Torvalds Date: Fri Sep 29 12:24:28 2017 -0700 Merge tag 'for-linus-4.14c-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - avoid a warning when compiling with clang - consider read-only bits in xen-pciback when writing to a BAR - fix a boot crash of pv-domains * tag 'for-linus-4.14c-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/mmu: Call xen_cleanhighmap() with 4MB aligned for page tables mapping xen-pciback: relax BAR sizing write value check x86/xen: clean up clang build warning commit 42057e1825cc581d46a46495e9ddc3f243f31539 Merge: 95d3652 b862789 Author: Linus Torvalds Date: Fri Sep 29 12:18:55 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Mixed bugfixes. Perhaps the most interesting one is a latent bug that was finally triggered by PCID support" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm/x86: Handle async PF in RCU read-side critical sections KVM: nVMX: Fix nested #PF intends to break L1's vmlauch/vmresume KVM: VMX: use cmpxchg64 KVM: VMX: simplify and fix vmx_vcpu_pi_load KVM: VMX: avoid double list add with VT-d posted interrupts KVM: VMX: extract __pi_post_block KVM: PPC: Book3S HV: Check for updated HDSISR on P9 HDSI exception KVM: nVMX: fix HOST_CR3/HOST_CR4 cache commit 6c85501f2fabcfc4fc6ed976543d252c4eaf4be9 Author: Al Viro Date: Fri Sep 29 13:43:15 2017 -0400 fix infoleak in waitid(2) kernel_waitid() can return a PID, an error or 0. rusage is filled in the first case and waitid(2) rusage should've been copied out exactly in that case, *not* whenever kernel_waitid() has not returned an error. Compat variant shares that braino; none of kernel_wait4() callers do, so the below ought to fix it. Reported-and-tested-by: Alexander Potapenko Fixes: ce72a16fa705 ("wait4(2)/waitid(2): separate copying rusage to userland") Cc: stable@vger.kernel.org # v4.13 Signed-off-by: Al Viro kernel/exit.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 196bd485ee4f03ce4c690bfcf38138abfcd0a4bc Author: Andrey Ryabinin Date: Fri Sep 29 17:15:36 2017 +0300 x86/asm: Use register variable to get stack pointer value Currently we use current_stack_pointer() function to get the value of the stack pointer register. Since commit: f5caf621ee35 ("x86/asm: Fix inline asm call constraints for Clang") ... we have a stack register variable declared. It can be used instead of current_stack_pointer() function which allows to optimize away some excessive "mov %rsp, %" instructions: -mov %rsp,%rdx -sub %rdx,%rax -cmp $0x3fff,%rax -ja ffffffff810722fd +sub %rsp,%rax +cmp $0x3fff,%rax +ja ffffffff810722fa Remove current_stack_pointer(), rename __asm_call_sp to current_stack_pointer and use it instead of the removed function. Signed-off-by: Andrey Ryabinin Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170929141537.29167-1-aryabinin@virtuozzo.com Signed-off-by: Ingo Molnar arch/x86/include/asm/asm.h | 4 ++-- arch/x86/include/asm/thread_info.h | 11 ----------- arch/x86/kernel/irq_32.c | 6 +++--- arch/x86/kernel/traps.c | 2 +- arch/x86/mm/tlb.c | 2 +- 5 files changed, 7 insertions(+), 18 deletions(-) commit bc829ee36e0ec92383c9d9b88fe08f00d4d592f8 Author: Tom Lendacky Date: Fri Sep 29 11:24:19 2017 -0500 x86/mm: Disable branch profiling in mem_encrypt.c Some routines in mem_encrypt.c are called very early in the boot process, e.g. sme_encrypt_kernel(). When CONFIG_TRACE_BRANCH_PROFILING=y is defined the resulting branch profiling associated with the check to see if SME is active results in a kernel crash. Disable branch profiling for mem_encrypt.c by defining DISABLE_BRANCH_PROFILING before including any header files. Reported-by: kernel test robot Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170929162419.6016.53390.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 2 ++ 1 file changed, 2 insertions(+) commit 1addcd55bc54d669000221b41e379458ff3e6747 Merge: 441430e 5357413 Author: Ingo Molnar Date: Fri Sep 29 19:31:46 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20170928' 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 syscalltbl build failure (Akemi Yagi) - Fix attr.exclude_kernel setting for default cycles:p, this time for !root with kernel.perf_event_paranoid = -1 (Arnaldo Carvalho de Melo) - Sync kernel ABI headers with tooling headers (Ingo Molnar) - Remove misleading debug messages with --call-graph option (Mengting Zhang) - Revert vmlinux symbol resolution patches for s390x (Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 95d3652eec4103977ac96a86f46fa589f7abe012 Merge: 770b782 2569e7e Author: Linus Torvalds Date: Fri Sep 29 10:26:35 2017 -0700 Merge branch 'fixes-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull keys fixes from James Morris: "Notable here is a rewrite of big_key crypto by Jason Donenfeld to address some issues in the original code. From Jason's commit log: "This started out as just replacing the use of crypto/rng with get_random_bytes_wait, so that we wouldn't use bad randomness at boot time. But, upon looking further, it appears that there were even deeper underlying cryptographic problems, and that this seems to have been committed with very little crypto review. So, I rewrote the whole thing, trying to keep to the conventions introduced by the previous author, to fix these cryptographic flaws." There has been positive review of the new code by Eric Biggers and Herbert Xu, and it passes basic testing via the keyutils test suite. Eric also manually tested it. Generally speaking, we likely need to improve the amount of crypto review for kernel crypto users including keys (I'll post a note separately to ksummit-discuss)" * 'fixes-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security/keys: rewrite all of big_key crypto security/keys: properly zero out sensitive key material in big_key KEYS: use kmemdup() in request_key_auth_new() KEYS: restrict /proc/keys by credentials at open time KEYS: reset parent each time before searching key_user_tree KEYS: prevent KEYCTL_READ on negative key KEYS: prevent creating a different user's keyrings KEYS: fix writing past end of user-supplied buffer in keyring_read() KEYS: fix key refcount leak in keyctl_read_key() KEYS: fix key refcount leak in keyctl_assume_authority() KEYS: don't revoke uninstantiated key in request_key_auth_new() KEYS: fix cred refcount leak in request_key_auth_new() commit 760bfb47c36a07741a089bf6a28e854ffbee7dc9 Author: Will Deacon Date: Fri Sep 29 12:27:41 2017 +0100 arm64: fault: Route pte translation faults via do_translation_fault We currently route pte translation faults via do_page_fault, which elides the address check against TASK_SIZE before invoking the mm fault handling code. However, this can cause issues with the path walking code in conjunction with our word-at-a-time implementation because load_unaligned_zeropad can end up faulting in kernel space if it reads across a page boundary and runs into a page fault (e.g. by attempting to read from a guard region). In the case of such a fault, load_unaligned_zeropad has registered a fixup to shift the valid data and pad with zeroes, however the abort is reported as a level 3 translation fault and we dispatch it straight to do_page_fault, despite it being a kernel address. This results in calling a sleeping function from atomic context: BUG: sleeping function called from invalid context at arch/arm64/mm/fault.c:313 in_atomic(): 0, irqs_disabled(): 0, pid: 10290 Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [...] [] ___might_sleep+0x134/0x144 [] __might_sleep+0x7c/0x8c [] do_page_fault+0x140/0x330 [] do_mem_abort+0x54/0xb0 Exception stack(0xfffffffb20247a70 to 0xfffffffb20247ba0) [...] [] el1_da+0x18/0x78 [] path_parentat+0x44/0x88 [] filename_parentat+0x5c/0xd8 [] filename_create+0x4c/0x128 [] SyS_mkdirat+0x50/0xc8 [] el0_svc_naked+0x24/0x28 Code: 36380080 d5384100 f9400800 9402566d (d4210000) ---[ end trace 2d01889f2bca9b9f ]--- Fix this by dispatching all translation faults to do_translation_faults, which avoids invoking the page fault logic for faults on kernel addresses. Cc: Reported-by: Ankit Jain Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f069faba688701c4d56b6c3452a130f97bf02e95 Author: Will Deacon Date: Fri Sep 29 11:29:55 2017 +0100 arm64: mm: Use READ_ONCE when dereferencing pointer to pte table On kernels built with support for transparent huge pages, different CPUs can access the PMD concurrently due to e.g. fast GUP or page_vma_mapped_walk and they must take care to use READ_ONCE to avoid value tearing or caching of stale values by the compiler. Unfortunately, these functions call into our pgtable macros, which don't use READ_ONCE, and compiler caching has been observed to cause the following crash during ext4 writeback: PC is at check_pte+0x20/0x170 LR is at page_vma_mapped_walk+0x2e0/0x540 [...] Process doio (pid: 2463, stack limit = 0xffff00000f2e8000) Call trace: [] check_pte+0x20/0x170 [] page_vma_mapped_walk+0x2e0/0x540 [] page_mkclean_one+0xac/0x278 [] rmap_walk_file+0xf0/0x238 [] rmap_walk+0x64/0xa0 [] page_mkclean+0x90/0xa8 [] clear_page_dirty_for_io+0x84/0x2a8 [] mpage_submit_page+0x34/0x98 [] mpage_process_page_bufs+0x164/0x170 [] mpage_prepare_extent_to_map+0x134/0x2b8 [] ext4_writepages+0x484/0xe30 [] do_writepages+0x44/0xe8 [] __filemap_fdatawrite_range+0xbc/0x110 [] file_write_and_wait_range+0x48/0xd8 [] ext4_sync_file+0x80/0x4b8 [] vfs_fsync_range+0x64/0xc0 [] SyS_msync+0x194/0x1e8 This is because page_vma_mapped_walk loads the PMD twice before calling pte_offset_map: the first time without READ_ONCE (where it gets all zeroes due to a concurrent pmdp_invalidate) and the second time with READ_ONCE (where it sees a valid table pointer due to a concurrent pmd_populate). However, the compiler inlines everything and caches the first value in a register, which is subsequently used in pte_offset_phys which returns a junk pointer that is later dereferenced when attempting to access the relevant pte. This patch fixes the issue by using READ_ONCE in pte_offset_phys to ensure that a stale value is not used. Whilst this is a point fix for a known failure (and simple to backport), a full fix moving all of our page table accessors over to {READ,WRITE}_ONCE and consistently using READ_ONCE in page_vma_mapped_walk is in the works for a future kernel release. Cc: Jon Masters Cc: Timur Tabi Cc: Fixes: f27176cfc363 ("mm: convert page_mkclean_one() to use page_vma_mapped_walk()") Tested-by: Richard Ruigrok Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04eae427406ef6af9b05bd631e235f4a509666b1 Author: Shiraz Saleem Date: Fri Sep 29 08:25:01 2017 -0500 RDMA/iwpm: Properly mark end of NL messages Commit 1a1c116f3dcf removes nlmsg_len calculation in ibnl_put_attr causing netlink messages to be rejected due to incorrect length. Add nlmsg_end after all attributes are appended to calculate the nlmsg_len. Fixes: 1a1c116f3dcf ("RDMA/netlink: Simplify the put_msg and put_attr") Signed-off-by: Shiraz Saleem Signed-off-by: Tatyana Nikolova Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/iwpm_msg.c | 8 ++++++++ drivers/infiniband/core/iwpm_util.c | 5 +++++ 2 files changed, 13 insertions(+) commit b862789aa5186d5ea3a024b7cfe0f80c3a38b980 Author: Boqun Feng Date: Fri Sep 29 19:01:45 2017 +0800 kvm/x86: Handle async PF in RCU read-side critical sections Sasha Levin reported a WARNING: | WARNING: CPU: 0 PID: 6974 at kernel/rcu/tree_plugin.h:329 | rcu_preempt_note_context_switch kernel/rcu/tree_plugin.h:329 [inline] | WARNING: CPU: 0 PID: 6974 at kernel/rcu/tree_plugin.h:329 | rcu_note_context_switch+0x16c/0x2210 kernel/rcu/tree.c:458 ... | CPU: 0 PID: 6974 Comm: syz-fuzzer Not tainted 4.13.0-next-20170908+ #246 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS | 1.10.1-1ubuntu1 04/01/2014 | Call Trace: ... | RIP: 0010:rcu_preempt_note_context_switch kernel/rcu/tree_plugin.h:329 [inline] | RIP: 0010:rcu_note_context_switch+0x16c/0x2210 kernel/rcu/tree.c:458 | RSP: 0018:ffff88003b2debc8 EFLAGS: 00010002 | RAX: 0000000000000001 RBX: 1ffff1000765bd85 RCX: 0000000000000000 | RDX: 1ffff100075d7882 RSI: ffffffffb5c7da20 RDI: ffff88003aebc410 | RBP: ffff88003b2def30 R08: dffffc0000000000 R09: 0000000000000001 | R10: 0000000000000000 R11: 0000000000000000 R12: ffff88003b2def08 | R13: 0000000000000000 R14: ffff88003aebc040 R15: ffff88003aebc040 | __schedule+0x201/0x2240 kernel/sched/core.c:3292 | schedule+0x113/0x460 kernel/sched/core.c:3421 | kvm_async_pf_task_wait+0x43f/0x940 arch/x86/kernel/kvm.c:158 | do_async_page_fault+0x72/0x90 arch/x86/kernel/kvm.c:271 | async_page_fault+0x22/0x30 arch/x86/entry/entry_64.S:1069 | RIP: 0010:format_decode+0x240/0x830 lib/vsprintf.c:1996 | RSP: 0018:ffff88003b2df520 EFLAGS: 00010283 | RAX: 000000000000003f RBX: ffffffffb5d1e141 RCX: ffff88003b2df670 | RDX: 0000000000000001 RSI: dffffc0000000000 RDI: ffffffffb5d1e140 | RBP: ffff88003b2df560 R08: dffffc0000000000 R09: 0000000000000000 | R10: ffff88003b2df718 R11: 0000000000000000 R12: ffff88003b2df5d8 | R13: 0000000000000064 R14: ffffffffb5d1e140 R15: 0000000000000000 | vsnprintf+0x173/0x1700 lib/vsprintf.c:2136 | sprintf+0xbe/0xf0 lib/vsprintf.c:2386 | proc_self_get_link+0xfb/0x1c0 fs/proc/self.c:23 | get_link fs/namei.c:1047 [inline] | link_path_walk+0x1041/0x1490 fs/namei.c:2127 ... This happened when the host hit a page fault, and delivered it as in an async page fault, while the guest was in an RCU read-side critical section. The guest then tries to reschedule in kvm_async_pf_task_wait(), but rcu_preempt_note_context_switch() would treat the reschedule as a sleep in RCU read-side critical section, which is not allowed (even in preemptible RCU). Thus the WARN. To cure this, make kvm_async_pf_task_wait() go to the halt path if the PF happens in a RCU read-side critical section. Reported-by: Sasha Levin Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: stable@vger.kernel.org Signed-off-by: Boqun Feng Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 305d0ab4764d36a02c8e7cddb67099aca65351ce Author: Wanpeng Li Date: Thu Sep 28 18:16:44 2017 -0700 KVM: nVMX: Fix nested #PF intends to break L1's vmlauch/vmresume ------------[ cut here ]------------ WARNING: CPU: 4 PID: 5280 at /home/kernel/linux/arch/x86/kvm//vmx.c:11394 nested_vmx_vmexit+0xc2b/0xd70 [kvm_intel] CPU: 4 PID: 5280 Comm: qemu-system-x86 Tainted: G W OE 4.13.0+ #17 RIP: 0010:nested_vmx_vmexit+0xc2b/0xd70 [kvm_intel] Call Trace: ? emulator_read_emulated+0x15/0x20 [kvm] ? segmented_read+0xae/0xf0 [kvm] vmx_inject_page_fault_nested+0x60/0x70 [kvm_intel] ? vmx_inject_page_fault_nested+0x60/0x70 [kvm_intel] x86_emulate_instruction+0x733/0x810 [kvm] vmx_handle_exit+0x2f4/0xda0 [kvm_intel] ? kvm_arch_vcpu_ioctl_run+0xd2f/0x1c60 [kvm] kvm_arch_vcpu_ioctl_run+0xdab/0x1c60 [kvm] ? kvm_arch_vcpu_load+0x62/0x230 [kvm] kvm_vcpu_ioctl+0x340/0x700 [kvm] ? kvm_vcpu_ioctl+0x340/0x700 [kvm] ? __fget+0xfc/0x210 do_vfs_ioctl+0xa4/0x6a0 ? __fget+0x11d/0x210 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x23/0xc2 A nested #PF is triggered during L0 emulating instruction for L2. However, it doesn't consider we should not break L1's vmlauch/vmresme. This patch fixes it by queuing the #PF exception instead ,requesting an immediate VM exit from L2 and keeping the exception for L1 pending for a subsequent nested VM exit. This should actually work all the time, making vmx_inject_page_fault_nested totally unnecessary. However, that's not working yet, so this patch can work around the issue in the meanwhile. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6b72ee88a56bcfe63f72e9c30766484c45bec72 Author: Artem Savkov Date: Tue Sep 26 18:35:45 2017 +0200 netfilter: ebtables: fix race condition in frame_filter_net_init() It is possible for ebt_in_hook to be triggered before ebt_table is assigned resulting in a NULL-pointer dereference. Make sure hooks are registered as the last step. Fixes: aee12a0a3727 ("ebtables: remove nf_hook_register usage") Signed-off-by: Artem Savkov Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_bridge/ebtables.h | 7 ++++--- net/bridge/netfilter/ebtable_broute.c | 4 ++-- net/bridge/netfilter/ebtable_filter.c | 4 ++-- net/bridge/netfilter/ebtable_nat.c | 4 ++-- net/bridge/netfilter/ebtables.c | 17 +++++++++-------- 5 files changed, 19 insertions(+), 17 deletions(-) commit 0d18779be13766b33c69cbc26df38383598da373 Author: JingPiao Chen Date: Sat Sep 23 17:10:44 2017 +0800 netfilter: nf_tables: fix update chain error # nft add table filter # nft add chain filter c1 # nft rename chain filter c1 c2 Error: Could not process rule: No such file or directory rename chain filter c1 c2 ^^^^^^^^^^^^^^^^^^^^^^^^^^ # nft add chain filter c2 # nft rename chain filter c1 c2 # nft list table filter table ip filter { chain c2 { } chain c2 { } } Fixes: 664b0f8cd8 ("netfilter: nf_tables: add generation mask to chains") Signed-off-by: JingPiao Chen Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ccba44ba118a5000cccc50076b0344632459779 Author: Ethan Zhao Date: Mon Sep 4 13:59:34 2017 +0800 sched/sysctl: Check user input value of sysctl_sched_time_avg System will hang if user set sysctl_sched_time_avg to 0: [root@XXX ~]# sysctl kernel.sched_time_avg_ms=0 Stack traceback for pid 0 0xffff883f6406c600 0 0 1 3 R 0xffff883f6406cf50 *swapper/3 ffff883f7ccc3ae8 0000000000000018 ffffffff810c4dd0 0000000000000000 0000000000017800 ffff883f7ccc3d78 0000000000000003 ffff883f7ccc3bf8 ffffffff810c4fc9 ffff883f7ccc3c08 00000000810c5043 ffff883f7ccc3c08 Call Trace: [] ? update_group_capacity+0x110/0x200 [] ? update_sd_lb_stats+0x109/0x600 [] ? find_busiest_group+0x47/0x530 [] ? load_balance+0x194/0x900 [] ? update_rq_clock.part.83+0x1a/0xe0 [] ? rebalance_domains+0x152/0x290 [] ? run_rebalance_domains+0xdc/0x1d0 [] ? __do_softirq+0xfb/0x320 [] ? irq_exit+0x125/0x130 [] ? scheduler_ipi+0x97/0x160 [] ? smp_reschedule_interrupt+0x29/0x30 [] ? reschedule_interrupt+0x6e/0x80 [] ? cpuidle_enter_state+0xcc/0x230 [] ? cpuidle_enter_state+0x9c/0x230 [] ? cpuidle_enter+0x17/0x20 [] ? cpu_startup_entry+0x38c/0x420 [] ? start_secondary+0x173/0x1e0 Because divide-by-zero error happens in function: update_group_capacity() update_cpu_capacity() scale_rt_capacity() { ... total = sched_avg_period() + delta; used = div_u64(avg, total); ... } To fix this issue, check user input value of sysctl_sched_time_avg, keep it unchanged when hitting invalid input, and set the minimum limit of sysctl_sched_time_avg to 1 ms. Reported-by: James Puthukattukaran Signed-off-by: Ethan Zhao Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: efault@gmx.de Cc: ethan.kernel@gmail.com Cc: keescook@chromium.org Cc: mcgrof@kernel.org Cc: Link: http://lkml.kernel.org/r/1504504774-18253-1-git-send-email-ethan.zhao@oracle.com Signed-off-by: Ingo Molnar kernel/sysctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 520a13c530aeb5f63e011d668c42db1af19ed349 Author: Josh Poimboeuf Date: Thu Sep 28 16:58:26 2017 -0500 x86/asm: Fix inline asm call constraints for GCC 4.4 The kernel test bot (run by Xiaolong Ye) reported that the following commit: f5caf621ee35 ("x86/asm: Fix inline asm call constraints for Clang") is causing double faults in a kernel compiled with GCC 4.4. Linus subsequently diagnosed the crash pattern and the buggy commit and found that the issue is with this code: register unsigned int __asm_call_sp asm("esp"); #define ASM_CALL_CONSTRAINT "+r" (__asm_call_sp) Even on a 64-bit kernel, it's using ESP instead of RSP. That causes GCC to produce the following bogus code: ffffffff8147461d: 89 e0 mov %esp,%eax ffffffff8147461f: 4c 89 f7 mov %r14,%rdi ffffffff81474622: 4c 89 fe mov %r15,%rsi ffffffff81474625: ba 20 00 00 00 mov $0x20,%edx ffffffff8147462a: 89 c4 mov %eax,%esp ffffffff8147462c: e8 bf 52 05 00 callq ffffffff814c98f0 Despite the absurdity of it backing up and restoring the stack pointer for no reason, the bug is actually the fact that it's only backing up and restoring the lower 32 bits of the stack pointer. The upper 32 bits are getting cleared out, corrupting the stack pointer. So change the '__asm_call_sp' register variable to be associated with the actual full-size stack pointer. This also requires changing the __ASM_SEL() macro to be based on the actual compiled arch size, rather than the CONFIG value, because CONFIG_X86_64 compiles some files with '-m32' (e.g., realmode and vdso). Otherwise Clang fails to build the kernel because it complains about the use of a 64-bit register (RSP) in a 32-bit file. Reported-and-Bisected-and-Tested-by: kernel test robot Diagnosed-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dmitriy Vyukov Cc: LKP Cc: Linus Torvalds Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: f5caf621ee35 ("x86/asm: Fix inline asm call constraints for Clang") Link: http://lkml.kernel.org/r/20170928215826.6sdpmwtkiydiytim@treble Signed-off-by: Ingo Molnar arch/x86/include/asm/asm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5173418ac597cebe9f7a39adf10be470000b518 Author: Ross Lagerwall Date: Wed Sep 27 10:06:27 2017 +0100 netfilter: ipset: Fix race between dump and swap Fix a race between ip_set_dump_start() and ip_set_swap(). The race is as follows: * Without holding the ref lock, ip_set_swap() checks ref_netlink of the set and it is 0. * ip_set_dump_start() takes a reference on the set. * ip_set_swap() does the swap (even though it now has a non-zero reference count). * ip_set_dump_start() gets the set from ip_set_list again which is now a different set since it has been swapped. * ip_set_dump_start() calls __ip_set_put_netlink() and hits a BUG_ON due to the reference count being 0. Fix this race by extending the critical region in which the ref lock is held to include checking the ref counts. The race can be reproduced with the following script: while :; do ipset destroy hash_ip1 ipset destroy hash_ip2 ipset create hash_ip1 hash:ip family inet hashsize 1024 \ maxelem 500000 ipset create hash_ip2 hash:ip family inet hashsize 300000 \ maxelem 500000 ipset create hash_ip3 hash:ip family inet hashsize 1024 \ maxelem 500000 ipset save & ipset swap hash_ip3 hash_ip2 ipset destroy hash_ip3 wait done Signed-off-by: Ross Lagerwall Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8ef9925b02c23e3838d5e593c5cf37984141150f Author: Peter Zijlstra Date: Fri Sep 22 18:37:28 2017 +0200 sched/debug: Add explicit TASK_PARKED printing Currently TASK_PARKED is masqueraded as TASK_INTERRUPTIBLE, give it its own print state because it will not in fact get woken by regular wakeups and is a long-term state. This requires moving TASK_PARKED into the TASK_REPORT mask, and since that latter needs to be a contiguous bitmask, we need to shuffle the bits around a bit. 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 fs/proc/array.c | 3 ++- include/linux/sched.h | 16 +++++++--------- include/trace/events/sched.h | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) commit 5d68cc95fb24b2f58060cc5340dd7402a11f054e Author: Peter Zijlstra Date: Fri Sep 22 18:32:41 2017 +0200 sched/debug: Ignore TASK_IDLE for SysRq-W Markus reported that tasks in TASK_IDLE state are reported by SysRq-W, which results in undesirable clutter. Reported-by: Markus Trippelsdorf 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/core.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 06eb61844d841d0032a9950ce7f8e783ee49c0d0 Author: Peter Zijlstra Date: Fri Sep 22 18:30:40 2017 +0200 sched/debug: Add explicit TASK_IDLE printing Markus reported that kthreads that idle using TASK_IDLE instead of TASK_INTERRUPTIBLE are reported in as TASK_UNINTERRUPTIBLE and things like htop mark those red. This is undesirable, so add an explicit state for TASK_IDLE. Reported-by: Markus Trippelsdorf 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 fs/proc/array.c | 21 +++++++++++++-------- include/linux/sched.h | 12 ++++++++++-- include/trace/events/sched.h | 7 ++++--- 3 files changed, 27 insertions(+), 13 deletions(-) commit 5f6ad26ea353fdf3dad2328052cbee49e0b9c5b4 Author: Peter Zijlstra Date: Fri Sep 22 18:23:31 2017 +0200 sched/tracing: Use common task-state helpers Remove yet another task-state char instance. 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 | 2 -- kernel/trace/trace_output.c | 21 ++++++--------------- kernel/trace/trace_sched_wakeup.c | 8 ++++---- 3 files changed, 10 insertions(+), 21 deletions(-) commit 80c82ffebd2ec3f91a2daa24b561392de7fda895 Merge: 8fec935 c3cdce4 Author: Greg Kroah-Hartman Date: Fri Sep 29 10:25:46 2017 +0200 Merge tag 'fixes-for-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.14-rc3 Alan Stern fixed 3 old bugs on dummy_hcd which were reported recently. Yoshihiro Shimoda continues his work on the renensas_usb3 driver by fixing several bugs all over the place. The most important of which is a fix for 2-stage control transfers, previously renesas_usb3 would, anyway, try to move a 0-length data stage, which is wrong. Apart from these, there are two minor bug fixes (atmel udc and ffs) and a new device ID for dwc3-of-simple.c commit 9c29c31830a4eca724e137a9339137204bbb31be Author: Prateek Sood Date: Thu Sep 7 20:00:58 2017 +0530 locking/rwsem-xadd: Fix missed wakeup due to reordering of load If a spinner is present, there is a chance that the load of rwsem_has_spinner() in rwsem_wake() can be reordered with respect to decrement of rwsem count in __up_write() leading to wakeup being missed: spinning writer up_write caller --------------- ----------------------- [S] osq_unlock() [L] osq spin_lock(wait_lock) sem->count=0xFFFFFFFF00000001 +0xFFFFFFFF00000000 count=sem->count MB sem->count=0xFFFFFFFE00000001 -0xFFFFFFFF00000001 spin_trylock(wait_lock) return rwsem_try_write_lock(count) spin_unlock(wait_lock) schedule() Reordering of atomic_long_sub_return_release() in __up_write() and rwsem_has_spinner() in rwsem_wake() can cause missing of wakeup in up_write() context. In spinning writer, sem->count and local variable count is 0XFFFFFFFE00000001. It would result in rwsem_try_write_lock() failing to acquire rwsem and spinning writer going to sleep in rwsem_down_write_failed(). The smp_rmb() will make sure that the spinner state is consulted after sem->count is updated in up_write context. Signed-off-by: Prateek Sood Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: longman@redhat.com Cc: parri.andrea@gmail.com Cc: sramana@codeaurora.org Link: http://lkml.kernel.org/r/1504794658-15397-1-git-send-email-prsood@codeaurora.org Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit efb40f588b4370ffaeffafbd50f6ff213d954254 Author: Peter Zijlstra Date: Fri Sep 22 18:19:53 2017 +0200 sched/tracing: Fix trace_sched_switch task-state printing Convert trace_sched_switch to use the common task-state helpers and fix the "X" and "Z" order, possibly they ended up in the wrong order because TASK_REPORT has them in the wrong order too. 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 | 2 +- include/trace/events/sched.h | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 65d5dc47fe8530e17e318722fb4df676536c2bfc Author: Peter Zijlstra Date: Fri Sep 22 18:14:08 2017 +0200 sched/debug: Remove unused variable 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 -- 1 file changed, 2 deletions(-) commit 92c4bc9f9cd92a8581e36bc5105f03b569f37e36 Author: Peter Zijlstra Date: Fri Sep 22 18:13:36 2017 +0200 sched/debug: Convert TASK_state to hex Bit patterns are easier in hex. 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 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 1593baab910da72480d651ea7bf2ce6e3a25a484 Author: Peter Zijlstra Date: Fri Sep 22 18:09:26 2017 +0200 sched/debug: Implement consistent task-state printing Currently get_task_state() and task_state_to_char() report different states, create a number of common helpers and unify the reported state space. 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 fs/proc/array.c | 15 ++------------- include/linux/sched.h | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 20 deletions(-) commit 69b73e95982649a1f2dc63b8f08f2113d28f7fed Author: Thomas Gleixner Date: Fri Sep 29 10:07:44 2017 +0200 um/time: Fixup namespace collision The new timer_setup() function for struct timer_list collides with a private um function. Rename it. Fixes: 686fef928bba ("timer: Prepare to change timer callback argument type") Signed-off-by: Thomas Gleixner Cc: Richard Weinberger Cc: Jeff Dike Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Kees Cook arch/um/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 441430eb54a00586f95f1aefc48e0801bbd6a923 Author: Alexander Shishkin Date: Wed Sep 6 19:08:11 2017 +0300 perf/aux: Only update ->aux_wakeup in non-overwrite mode The following commit: d9a50b0256 ("perf/aux: Ensure aux_wakeup represents most recent wakeup index") changed the AUX wakeup position calculation to rounddown(), which causes a division-by-zero in AUX overwrite mode (aka "snapshot mode"). The zero denominator results from the fact that perf record doesn't set aux_watermark to anything, in which case the kernel will set it to half the AUX buffer size, but only for non-overwrite mode. In the overwrite mode aux_watermark stays zero. The good news is that, AUX overwrite mode, wakeups don't happen and related bookkeeping is not relevant, so we can simply forego the whole wakeup updates. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/20170906160811.16510-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 2b702e72e33bbdec0764cfb6e1dd00fe1142ae55 Merge: 2726e15 a98c75f Author: Dave Airlie Date: Fri Sep 29 17:11:04 2017 +1000 Merge tag 'drm-misc-fixes-2017-09-28-1' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Driver Changes: - qxl: fix primary surface and fb unpinning (Gerd) - sun41: fix CEC_PIN config gate now that media has been merged (Hans) - tegra: fix TRACE_INCLUDE_PATH (Thierry) Cc: Thierry Reding Cc: Hans Verkuil Cc: Gerd Hoffmann * tag 'drm-misc-fixes-2017-09-28-1' of git://anongit.freedesktop.org/git/drm-misc: drm/tegra: trace: Fix path to include qxl: fix framebuffer unpinning drm/sun4i: cec: Enable back CEC-pin framework qxl: fix primary surface handling commit 3e7e07288e1ab8e0770f4fdbf2905e6ecf917381 Merge: 9d538fa 353f59f Author: David S. Miller Date: Fri Sep 29 06:43:43 2017 +0100 Merge tag 'mlx5-fixes-2017-09-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2017-09-28 Misc. fixes for mlx5 drivers. ==================== Signed-off-by: David S. Miller commit 4fc0870d7e462fe3b86e0f938ae75ce884728c7d Author: Christophe Lombard Date: Tue Sep 26 10:15:21 2017 +0200 cxl: Fix memory page not handled The in-kernel 'library' API can be called by drivers to help interaction with an IBM XSL on a POWER9 system. The cxllib_handle_fault() API is used to handle memory fault. All memory pages of the specified buffer have to be handled but under certain conditions,the last page may not be touched, and the address the adapter is trying to access is never sent to the kernel for resolution. This patch reworks start address of the loop with an address aligned on the page size. In this context, the last page is not missed. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Fixes: 3ced8d730063 ("cxl: Export library to support IBM XSL"); Signed-off-by: Michael Ellerman drivers/misc/cxl/cxllib.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit bca73f595a566f0262967535bb5b2ea9c4271d9a Author: Michael Neuling Date: Thu Sep 28 22:37:35 2017 -0500 powerpc: Fix workaround for spurious MCE on POWER9 In the recent commit d8bd9f3f0925 ("powerpc: Handle MCE on POWER9 with only DSISR bit 30 set") I screwed up the bit number. It should be bit 25 (IBM bit 38). Fixes: d8bd9f3f0925 ("powerpc: Handle MCE on POWER9 with only DSISR bit 30 set") Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87cbde8d9081b91df86a21d0d743cd700e04890a Author: Rafael J. Wysocki Date: Thu Sep 28 01:45:10 2017 +0200 PM / s2idle: Invoke the ->wake() platform callback earlier The role of the ->wake() platform callback for suspend-to-idle is to deal with possible spurious wakeups, among other things. The ACPI implementation of it, acpi_s2idle_wake(), additionally checks the conditions for entering the Low Power S0 Idle state by the platform and reports the ones that have not been met. However, the ->wake() platform callback is invoked after calling dpm_noirq_resume_devices(), which means that the power states of some devices may have changed since s2idle_enter() returned, so some unmet Low Power S0 Idle conditions may be reported incorrectly as a result of that. To avoid these false positives, reorder the invocations of the dpm_noirq_resume_devices() routine and the ->wake() platform callback in s2idle_loop(). Fixes: 726fb6b4f2a8 (ACPI / PM: Check low power idle constraints for debug only) Tested-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki kernel/power/suspend.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 770b782f555d663d133fcd4dc1632023f79357b9 Merge: 74de818 333d177 Author: Linus Torvalds Date: Thu Sep 28 14:38:30 2017 -0700 Merge tag 'acpi-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes an APEI problem that may cause a reported error to be missed due to a race condition" * tag 'acpi-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / APEI: clear error status before acknowledging the error commit 74de8187ff46bfc24fcb1533791515e46b256116 Merge: 02a2b05 abeb19a Author: Linus Torvalds Date: Thu Sep 28 14:35:51 2017 -0700 Merge tag 'pm-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a deadlock in the operating performance points (OPP) framework introduced during the 4.11 cycle, more issues with duplicate device objects for cpufreq-dt and cpufreq documentation. Specifics: - Fix a deadlock in the operating performance points (OPP) framework caused by a notifier callback taking a lock that's already held by its caller (Viresh Kumar). - Prevent the ti-cpufreq and cpufreq-dt-platdev drivers from attempting to register conflicting device objects which triggers a warning from sysfs (Suniel Mahesh). - Drop a stale reference to a piece of intel_pstate documentation that's not in the tree any more (Rafael Wysocki)" * tag 'pm-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: docs: Drop intel-pstate.txt from index.txt cpufreq: dt: Fix sysfs duplicate filename creation for platform-device PM / OPP: Call notifier without holding opp_table->lock commit 02a2b05395dde2f49e7777b67b51a5fbc6606943 Merge: e49aa15 5e5c943 Author: Linus Torvalds Date: Thu Sep 28 13:27:23 2017 -0700 Merge tag 'xfs-4.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - fix various problems with the copy-on-write extent maps getting freed at the wrong time - fix printk format specifier problems - report zeroing operation outcomes instead of dropping them on the floor - fix some crashes when dio operations partially fail - fix a race condition between unwritten extent conversion & dio read - fix some incorrect tests in the inode log item processing - correct the delayed allocation space reservations on rmap filesystems - fix some problems checking for dax support * tag 'xfs-4.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: revert "xfs: factor rmap btree size into the indlen calculations" xfs: Capture state of the right inode in xfs_iflush_done xfs: perag initialization should only touch m_ag_max_usable for AG 0 xfs: update i_size after unwritten conversion in dio completion iomap_dio_rw: Allocate AIO completion queue before submitting dio xfs: validate bdev support for DAX inode flag xfs: remove redundant re-initialization of total_nr_pages xfs: Output warning message when discard option was enabled even though the device does not support discard xfs: report zeroed or not correctly in xfs_zero_range() xfs: kill meaningless variable 'zero' fs/xfs: Use %pS printk format for direct addresses xfs: evict CoW fork extents when performing finsert/fcollapse xfs: don't unconditionally clear the reflink flag on zero-block files commit e49aa15ef6c179f69e5578a271801f31a09e9a3f Author: Linus Torvalds Date: Thu Sep 28 13:20:32 2017 -0700 Revert "Bluetooth: Add option for disabling legacy ioctl interfaces" This reverts commit dbbccdc4ced015cdd4051299bd87fbe0254ad351. It turns out that the "legacy" users aren't so legacy at all, and that turning off the legacy ioctl will break the current Qt bluetooth stack for bluetooth LE devices that were released just a couple of months ago. So it's simply not true that this was a legacy interface that hasn't been needed and is only limited to old legacy BT devices. Because I actually read Kconfig help messages, and actively try to turn off features that I don't need, I turned the option off. Then I spent _way_ too much time debugging BLE issues until I realized that it wasn't the Qt and subsurface development that had broken one of my dive computer BLE downloads, but simply my broken kernel config. Maybe in a decade it will be true that this is a legacy interface. And maybe with a better help-text and correct dependencies, this kind of legacy removal might be acceptable. But as things are right now both the commit message and the Kconfig help text were misleading, and the Kconfig option had the wrong dependenencies. There's no reason to keep that broken Kconfig option in the tree. Cc: Marcel Holtmann Cc: Johan Hedberg Signed-off-by: Linus Torvalds net/bluetooth/Kconfig | 10 ---------- net/bluetooth/hci_sock.c | 6 ------ 2 files changed, 16 deletions(-) commit 333d1774224de9d1d9cedf11218e297d5421044b Merge: e19b205 aaf2c2f Author: Rafael J. Wysocki Date: Thu Sep 28 22:18:15 2017 +0200 Merge branch 'acpi-apei' * acpi-apei: ACPI / APEI: clear error status before acknowledging the error commit 91735832261a00e9d965ddf5ed3902ddfb03ea45 Merge: 26e811c 828bcbd Author: Linus Torvalds Date: Thu Sep 28 12:12:51 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Second -rc update for 4.14. Both Mellanox and Intel had a series of -rc fixes that landed this week. The Mellanox bunch is spread throughout the stack and not just in their driver, where as the Intel bunch was mostly in the hfi1 driver. And, several of the fixes in the hfi1 driver were more than just simple 5 line fixes. As a result, the hfi1 driver fixes has a sizable LOC count. Everything else is as one would expect in an RC cycle in terms of LOC count. One item that might jump out and make you think "That's not an rc item" is the fix that corrects a typo. But, that change fixes a typo in a user visible API that was just added in this merge window, so if we fix it now, we can fix it. If we don't, the typo is in the API forever. Another that might not appear to be a fix at first glance is the Simplify mlx5_ib_cont_pages patch, but the simplification allows them to fix a bug in the existing function whenever the length of an SGE exceeded page size. We also had to revert one patch from the merge window that was wrong. Summary: - a few core fixes - a few ipoib fixes - a few mlx5 fixes - a 7-patch hfi1 related series" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/hfi1: Unsuccessful PCIe caps tuning should not fail driver load IB/hfi1: On error, fix use after free during user context setup Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" IB/hfi1: Return correct value in general interrupt handler IB/hfi1: Check eeprom config partition validity IB/hfi1: Only reset QSFP after link up and turn off AOC TX IB/hfi1: Turn off AOC TX after offline substates IB/mlx5: Fix NULL deference on mlx5_ib_update_xlt failure IB/mlx5: Simplify mlx5_ib_cont_pages IB/ipoib: Fix inconsistency with free_netdev and free_rdma_netdev IB/ipoib: Fix sysfs Pkey create<->remove possible deadlock IB: Correct MR length field to be 64-bit IB/core: Fix qp_sec use after free access IB/core: Fix typo in the name of the tag-matching cap struct commit abeb19a219dce5c021c759d01434f82924354df7 Merge: e4d8ae0 8aba233 Author: Rafael J. Wysocki Date: Thu Sep 28 21:08:07 2017 +0200 Merge branches 'pm-opp' and 'pm-cpufreq' * pm-opp: PM / OPP: Call notifier without holding opp_table->lock * pm-cpufreq: cpufreq: docs: Drop intel-pstate.txt from index.txt cpufreq: dt: Fix sysfs duplicate filename creation for platform-device commit 26e811cdb9f10357ee4f5885aab972111486b044 Merge: 9cd6681 66a733e Author: Linus Torvalds Date: Thu Sep 28 11:20:52 2017 -0700 Merge tag 'seccomp-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fix from Kees Cook: "Fix refcounting bug in CRIU interface, noticed by Chris Salls (Oleg & Tycho)" * tag 'seccomp-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter() commit 9d538fa60bad4f7b23193c89e843797a1cf71ef3 Author: Christoph Paasch Date: Tue Sep 26 17:38:50 2017 -0700 net: Set sk_prot_creator when cloning sockets to the right proto sk->sk_prot and sk->sk_prot_creator can differ when the app uses IPV6_ADDRFORM (transforming an IPv6-socket to an IPv4-one). Which is why sk_prot_creator is there to make sure that sk_prot_free() does the kmem_cache_free() on the right kmem_cache slab. Now, if such a socket gets transformed back to a listening socket (using connect() with AF_UNSPEC) we will allocate an IPv4 tcp_sock through sk_clone_lock() when a new connection comes in. But sk_prot_creator will still point to the IPv6 kmem_cache (as everything got copied in sk_clone_lock()). When freeing, we will thus put this memory back into the IPv6 kmem_cache although it was allocated in the IPv4 cache. I have seen memory corruption happening because of this. With slub-debugging and MEMCG_KMEM enabled this gives the warning "cache_from_obj: Wrong slab cache. TCPv6 but object is from TCP" A C-program to trigger this: void main(void) { int fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP); int new_fd, newest_fd, client_fd; struct sockaddr_in6 bind_addr; struct sockaddr_in bind_addr4, client_addr1, client_addr2; struct sockaddr unsp; int val; memset(&bind_addr, 0, sizeof(bind_addr)); bind_addr.sin6_family = AF_INET6; bind_addr.sin6_port = ntohs(42424); memset(&client_addr1, 0, sizeof(client_addr1)); client_addr1.sin_family = AF_INET; client_addr1.sin_port = ntohs(42424); client_addr1.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(&client_addr2, 0, sizeof(client_addr2)); client_addr2.sin_family = AF_INET; client_addr2.sin_port = ntohs(42421); client_addr2.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(&unsp, 0, sizeof(unsp)); unsp.sa_family = AF_UNSPEC; bind(fd, (struct sockaddr *)&bind_addr, sizeof(bind_addr)); listen(fd, 5); client_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); connect(client_fd, (struct sockaddr *)&client_addr1, sizeof(client_addr1)); new_fd = accept(fd, NULL, NULL); close(fd); val = AF_INET; setsockopt(new_fd, SOL_IPV6, IPV6_ADDRFORM, &val, sizeof(val)); connect(new_fd, &unsp, sizeof(unsp)); memset(&bind_addr4, 0, sizeof(bind_addr4)); bind_addr4.sin_family = AF_INET; bind_addr4.sin_port = ntohs(42421); bind(new_fd, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); listen(new_fd, 5); client_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); connect(client_fd, (struct sockaddr *)&client_addr2, sizeof(client_addr2)); newest_fd = accept(new_fd, NULL, NULL); close(new_fd); close(client_fd); close(new_fd); } As far as I can see, this bug has been there since the beginning of the git-days. Signed-off-by: Christoph Paasch Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock.c | 2 ++ 1 file changed, 2 insertions(+) commit b32ca44a88def4bf92626d8777494c6f14638c42 Author: Vivien Didelot Date: Tue Sep 26 14:57:21 2017 -0400 net: dsa: mv88e6xxx: lock mutex when freeing IRQs mv88e6xxx_g2_irq_free locks the registers mutex, but not mv88e6xxx_g1_irq_free, which results in a stack trace from assert_reg_lock when unloading the mv88e6xxx module. Fix this. Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt") Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit da7c9561015e93d10fe6aab73e9288e0d09d65a6 Author: Willem de Bruijn Date: Tue Sep 26 12:20:17 2017 -0400 packet: only test po->has_vnet_hdr once in packet_snd Packet socket option po->has_vnet_hdr can be updated concurrently with other operations if no ring is attached. Do not test the option twice in packet_snd, as the value may change in between calls. A race on setsockopt disable may cause a packet > mtu to be sent without having GSO options set. Fixes: bfd5f4a3d605 ("packet: Add GSO/csum offload support.") Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4971613c1639d8e5f102c4e797c3bf8f83a5a69e Author: Willem de Bruijn Date: Tue Sep 26 12:19:37 2017 -0400 packet: in packet_do_bind, test fanout with bind_lock held Once a socket has po->fanout set, it remains a member of the group until it is destroyed. The prot_hook must be constant and identical across sockets in the group. If fanout_add races with packet_do_bind between the test of po->fanout and taking the lock, the bind call may make type or dev inconsistent with that of the fanout group. Hold po->bind_lock when testing po->fanout to avoid this race. I had to introduce artificial delay (local_bh_enable) to actually observe the race. Fixes: dc99f600698d ("packet: Add fanout support.") Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1579f678fb4397f9e439d2e373d4ade036c673b4 Author: Ed Blake Date: Tue Sep 26 11:44:53 2017 +0100 net: stmmac: dwmac4: Re-enable MAC Rx before powering down Re-enable the MAC receiver by setting CONFIG_RE before powering down, as instructed in section 6.3.5.1 of [1]. Without this the MAC fails to receive WoL packets and never wakes up. [1] DWC Ethernet QoS Databook 4.10a October 2014 Signed-off-by: Ed Blake Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 06d7a1b932c26afe2c0a1f4520ddd417d8eeda79 Author: Ed Blake Date: Tue Sep 26 11:43:46 2017 +0100 net: stmmac: dwc-qos: Add suspend / resume support Add hook to stmmac_pltfr_pm_ops for suspend / resume handling. Signed-off-by: Ed Blake Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 1 + 1 file changed, 1 insertion(+) commit e804441cfe0b60f6c430901946a69c01eac09df1 Author: Florian Fainelli Date: Mon Sep 25 15:55:53 2017 -0700 net: dsa: Fix network device registration order We cannot be registering the network device first, then setting its carrier off and finally connecting it to a PHY, doing that leaves a window during which the carrier is at best inconsistent, and at worse the device is not usable without a down/up sequence since the network device is visible to user space with possibly no PHY device attached. Re-order steps so that they make logical sense. This fixes some devices where the port was not usable after e.g: an unbind then bind of the driver. Fixes: 0071f56e46da ("dsa: Register netdev before phy") Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit db06ae41945b14feb7f696dcafe8048cc37e8a20 Author: Andrew Lunn Date: Mon Sep 25 23:32:20 2017 +0200 net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans Ports with the same VLAN must all be in the same bridge. However the CPU and DSA ports need to be in multiple VLANs spread over multiple bridges. So exclude them when performing this test. Fixes: b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members") 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, 4 insertions(+) commit 35f493b87ec072c5a2497ffbee243095ef725827 Author: Eric Dumazet Date: Mon Sep 25 08:40:02 2017 -0700 inetpeer: fix RCU lookup() again My prior fix was not complete, as we were dereferencing a pointer three times per node, not twice as I initially thought. Fixes: 4cc5b44b29a9 ("inetpeer: fix RCU lookup()") Fixes: b145425f269a ("inetpeer: remove AVL implementation in favor of RB tree") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inetpeer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d3924c2181a4000aa4c118fc3685b5e93a45bd6 Merge: 2580c4c c7dfc8c Author: David S. Miller Date: Thu Sep 28 09:33:51 2017 -0700 Merge branch 'mvpp2-various-fixes' Antoine Tenart says: ==================== net: mvpp2: various fixes This series contains 3 fixes for the Marvell PPv2 driver. Since v1: - Removed one patch about dma masks as it would need a better fix. - Added one fix about the MAC Tx clock source selection. ==================== Signed-off-by: David S. Miller commit c7dfc8c848a48f176096f66a14879fb3333a460f Author: Antoine Tenart Date: Mon Sep 25 14:59:48 2017 +0200 net: mvpp2: do not select the internal source clock This patch stops the internal MAC Tx clock from being enabled as the internal clock isn't used. The definition used for the bit controlling this behaviour is renamed as well as it was wrongly named (bit 4 of GMAC_CTRL_2_REG). Fixes: 3919357fb0bb ("net: mvpp2: initialize the GMAC when using a port") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6bf69a1d6334bed776875c5ca852594ab4e5b209 Author: Yan Markman Date: Mon Sep 25 14:59:47 2017 +0200 net: mvpp2: fix port list indexing The private port_list array has a list of pointers to mvpp2_port instances. This list is allocated given the number of ports enabled in the device tree, but the pointers are set using the port-id property. If on a single port is enabled, the port_list array will be of size 1, but when registering the port, if its id is not 0 the driver will crash. Other crashes were encountered in various situations. This fixes the issue by using an index not equal to the value of the port-id property. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart Signed-off-by: Yan Markman Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit aff3da39211105a42b2108b8af79bf8e16f670fd Author: Stefan Chulski Date: Mon Sep 25 14:59:46 2017 +0200 net: mvpp2: fix parsing fragmentation detection Parsing fragmentation detection failed due to wrong configured parser TCAM entry's. Some traffic was marked as fragmented in RX descriptor, even it wasn't IP fragmented. The hardware also failed to calculate checksums which lead to use software checksum and caused performance degradation. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart Signed-off-by: Stefan Chulski Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc Author: Jeffy Chen Date: Wed Sep 27 20:28:57 2017 +0800 dm crypt: fix memory leak in crypt_ctr_cipher_old() Fix memory leak of cipher_api. Fixes: 33d2f09fcb35 (dm crypt: introduce new format of cipher with "capi:" prefix) Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Jeffy Chen Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 1 + 1 file changed, 1 insertion(+) commit 5357413f5c067f60933e4b8d79d483fbe62b2bb5 Author: Thomas Richter Date: Fri Sep 15 09:14:04 2017 +0200 perf test: Fix vmlinux failure on s390x part 2 On s390x perf test 1 failed. It turned out that commit cf6383f73cf2 ("perf report: Fix kernel symbol adjustment for s390x") was incorrect. The previous implementation in dso__load_sym() is also suitable for s390x. Therefore this patch undoes commit cf6383f73cf2 Signed-off-by: Thomas-Mich Richter Cc: Zvonko Kosic Cc: Hendrik Brueckner Fixes: cf6383f73cf2 ("perf report: Fix kernel symbol adjustment for s390x") LPU-Reference: 20170915071404.58398-2-tmricht@linux.vnet.ibm.com Link: http://lkml.kernel.org/n/tip-v101o8k25vuja2ogosgf15yy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/Build | 1 - tools/perf/arch/s390/util/sym-handling.c | 21 --------------------- 2 files changed, 22 deletions(-) commit b28503a3fe6400757817e4460090f96bc1b9d6e7 Author: Thomas Richter Date: Fri Sep 15 09:14:03 2017 +0200 perf test: Fix vmlinux failure on s390x On s390x perf test 1 failed. It turned out that commit 4a084ecfc821 ("perf report: Fix module symbol adjustment for s390x") was incorrect. The previous implementation in dso__load_sym() is also suitable for s390x. Therefore this patch undoes commit 4a084ecfc821. Signed-off-by: Thomas-Mich Richter Cc: Hendrik Brueckner Cc: Zvonko Kosic Fixes: 4a084ecfc821 ("perf report: Fix module symbol adjustment for s390x") LPU-Reference: 20170915071404.58398-1-tmricht@linux.vnet.ibm.com Link: http://lkml.kernel.org/n/tip-5ani7ly57zji7s0hmzkx416l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/sym-handling.c | 8 -------- tools/perf/util/symbol-elf.c | 8 +------- tools/perf/util/symbol.h | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) commit c0a1666bcb2a33e84187a15eabdcd54056be9a97 Author: Paolo Bonzini Date: Thu Sep 28 17:58:41 2017 +0200 KVM: VMX: use cmpxchg64 This fixes a compilation failure on 32-bit systems. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2580c4c17aee3ad58e9751012bad278dd074ccae Author: Alexander Potapenko Date: Thu Sep 28 11:32:37 2017 +0200 tun: bail out from tun_get_user() if the skb is empty KMSAN (https://github.com/google/kmsan) reported accessing uninitialized skb->data[0] in the case the skb is empty (i.e. skb->len is 0): ================================================ BUG: KMSAN: use of uninitialized memory in tun_get_user+0x19ba/0x3770 CPU: 0 PID: 3051 Comm: probe Not tainted 4.13.0+ #3140 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: ... __msan_warning_32+0x66/0xb0 mm/kmsan/kmsan_instr.c:477 tun_get_user+0x19ba/0x3770 drivers/net/tun.c:1301 tun_chr_write_iter+0x19f/0x300 drivers/net/tun.c:1365 call_write_iter ./include/linux/fs.h:1743 new_sync_write fs/read_write.c:457 __vfs_write+0x6c3/0x7f0 fs/read_write.c:470 vfs_write+0x3e4/0x770 fs/read_write.c:518 SYSC_write+0x12f/0x2b0 fs/read_write.c:565 SyS_write+0x55/0x80 fs/read_write.c:557 do_syscall_64+0x242/0x330 arch/x86/entry/common.c:284 entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.S:245 ... origin: ... kmsan_poison_shadow+0x6e/0xc0 mm/kmsan/kmsan.c:211 slab_alloc_node mm/slub.c:2732 __kmalloc_node_track_caller+0x351/0x370 mm/slub.c:4351 __kmalloc_reserve net/core/skbuff.c:138 __alloc_skb+0x26a/0x810 net/core/skbuff.c:231 alloc_skb ./include/linux/skbuff.h:903 alloc_skb_with_frags+0x1d7/0xc80 net/core/skbuff.c:4756 sock_alloc_send_pskb+0xabf/0xfe0 net/core/sock.c:2037 tun_alloc_skb drivers/net/tun.c:1144 tun_get_user+0x9a8/0x3770 drivers/net/tun.c:1274 tun_chr_write_iter+0x19f/0x300 drivers/net/tun.c:1365 call_write_iter ./include/linux/fs.h:1743 new_sync_write fs/read_write.c:457 __vfs_write+0x6c3/0x7f0 fs/read_write.c:470 vfs_write+0x3e4/0x770 fs/read_write.c:518 SYSC_write+0x12f/0x2b0 fs/read_write.c:565 SyS_write+0x55/0x80 fs/read_write.c:557 do_syscall_64+0x242/0x330 arch/x86/entry/common.c:284 return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:245 ================================================ Make sure tun_get_user() doesn't touch skb->data[0] unless there is actual data. C reproducer below: ========================== // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include int main() { int sock = socket(PF_INET, SOCK_STREAM, IPPROTO_IP); int tun_fd = open("/dev/net/tun", O_RDWR); struct ifreq req; memset(&req, 0, sizeof(struct ifreq)); strcpy((char*)&req.ifr_name, "gre0"); req.ifr_flags = IFF_UP | IFF_MULTICAST; ioctl(tun_fd, TUNSETIFF, &req); ioctl(sock, SIOCSIFFLAGS, "gre0"); write(tun_fd, "hi", 0); return 0; } ========================== Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller drivers/net/tun.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1fa4df3e688902d033dfda796eb83ae6ad8d0488 Author: Dennis Zhou Date: Wed Sep 27 16:35:00 2017 -0500 percpu: fix iteration to prevent skipping over block The iterator functions pcpu_next_md_free_region and pcpu_next_fit_region use the block offset to determine if they have checked the area in the prior iteration. However, this causes an issue when the block offset is greater than subsequent block contig hints. If within the iterator it moves to check subsequent blocks, it may fail in the second predicate due to the block offset not being cleared. Thus, this causes the allocator to skip over blocks leading to false failures when allocating from the reserved chunk. While this happens in the general case as well, it will only fail if it cannot allocate a new chunk. This patch resets the block offset to 0 to pass the second predicate when checking subseqent blocks within the iterator function. Signed-off-by: Dennis Zhou Reported-and-tested-by: Luis Henriques Signed-off-by: Tejun Heo mm/percpu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 686fef928bba6be13cabe639f154af7d72b63120 Author: Kees Cook Date: Thu Sep 28 06:38:17 2017 -0700 timer: Prepare to change timer callback argument type Modern kernel callback systems pass the structure associated with a given callback to the callback function. The timer callback remains one of the legacy cases where an arbitrary unsigned long argument continues to be passed as the callback argument. This has several problems: - This bloats the timer_list structure with a normally redundant .data field. - No type checking is being performed, forcing callbacks to do explicit type casts of the unsigned long argument into the object that was passed, rather than using container_of(), as done in most of the other callback infrastructure. - Neighboring buffer overflows can overwrite both the .function and the .data field, providing attackers with a way to elevate from a buffer overflow into a simplistic ROP-like mechanism that allows calling arbitrary functions with a controlled first argument. - For future Control Flow Integrity work, this creates a unique function prototype for timer callbacks, instead of allowing them to continue to be clustered with other void functions that take a single unsigned long argument. This adds a new timer initialization API, which will ultimately replace the existing setup_timer(), setup_{deferrable,pinned,etc}_timer() family, named timer_setup() (to mirror hrtimer_setup(), making instances of its use much easier to grep for). In order to support the migration of existing timers into the new callback arguments, timer_setup() casts its arguments to the existing legacy types, and explicitly passes the timer pointer as the legacy data argument. Once all setup_*timer() callers have been replaced with timer_setup(), the casts can be removed, and the data argument can be dropped with the timer expiration code changed to just pass the timer to the callback directly. Since the regular pattern of using container_of() during local variable declaration repeats the need for the variable type declaration to be included, this adds a helper modeled after other from_*() helpers that wrap container_of(), named from_timer(). This helper uses typeof(*variable), removing the type redundancy and minimizing the need for line wraps in forthcoming conversions from "unsigned data long" to "struct timer_list *" in the timer callbacks: -void callback(unsigned long data) +void callback(struct timer_list *t) { - struct some_data_structure *local = (struct some_data_structure *)data; + struct some_data_structure *local = from_timer(local, t, timer); Finally, in order to support the handful of timer users that perform open-coded assignments of the .function (and .data) fields, provide cast macros (TIMER_FUNC_TYPE and TIMER_DATA_TYPE) that can be used temporarily. Once conversion has been completed, these can be globally trivially removed. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20170928133817.GA113410@beast include/linux/timer.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0d805ee70a69eabd38160dc199e183ac2f13fe4b Author: Zhenzhong Duan Date: Wed Sep 27 02:41:25 2017 -0700 xen/mmu: Call xen_cleanhighmap() with 4MB aligned for page tables mapping When bootup a PVM guest with large memory(Ex.240GB), XEN provided initial mapping overlaps with kernel module virtual space. When mapping in this space is cleared by xen_cleanhighmap(), in certain case there could be an 2MB mapping left. This is due to XEN initialize 4MB aligned mapping but xen_cleanhighmap() finish at 2MB boundary. When module loading is just on top of the 2MB space, got below warning: WARNING: at mm/vmalloc.c:106 vmap_pte_range+0x14e/0x190() Call Trace: [] warn_alloc_failed+0xf3/0x160 [] __vmalloc_area_node+0x182/0x1c0 [] ? module_alloc_update_bounds+0x1e/0x80 [] __vmalloc_node_range+0xa7/0x110 [] ? module_alloc_update_bounds+0x1e/0x80 [] module_alloc+0x64/0x70 [] ? module_alloc_update_bounds+0x1e/0x80 [] module_alloc_update_bounds+0x1e/0x80 [] move_module+0x27/0x150 [] layout_and_allocate+0x120/0x1b0 [] load_module+0x78/0x640 [] ? security_file_permission+0x8b/0x90 [] sys_init_module+0x62/0x1e0 [] system_call_fastpath+0x16/0x1b Then the mapping of 2MB is cleared, finally oops when the page in that space is accessed. BUG: unable to handle kernel paging request at ffff880022600000 IP: [] clear_page_c_e+0x7/0x10 PGD 1788067 PUD 178c067 PMD 22434067 PTE 0 Oops: 0002 [#1] SMP Call Trace: [] ? prep_new_page+0x127/0x1c0 [] get_page_from_freelist+0x1e2/0x550 [] ? ii_iovec_copy_to_user+0x90/0x140 [] __alloc_pages_nodemask+0x12d/0x230 [] alloc_pages_vma+0xc6/0x1a0 [] ? pte_mfn_to_pfn+0x7d/0x100 [] do_anonymous_page+0x16b/0x350 [] handle_pte_fault+0x1e4/0x200 [] ? xen_pmd_val+0xe/0x10 [] ? __raw_callee_save_xen_pmd_val+0x11/0x1e [] handle_mm_fault+0x15b/0x270 [] do_page_fault+0x140/0x470 [] page_fault+0x25/0x30 Call xen_cleanhighmap() with 4MB aligned for page tables mapping to fix it. The unnecessory call of xen_cleanhighmap() in DEBUG mode is also removed. -v2: add comment about XEN alignment from Juergen. References: https://lists.xen.org/archives/html/xen-devel/2012-07/msg01562.html Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross [boris: added 'xen/mmu' tag to commit subject] Signed-off-by: Boris Ostrovsky arch/x86/xen/mmu_pv.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 8c28ef3f1c1c57b6f468343d5959e5125b30334d Author: Jan Beulich Date: Mon Sep 25 02:01:01 2017 -0600 xen-pciback: relax BAR sizing write value check Just like done in d2bd05d88d ("xen-pciback: return proper values during BAR sizing") for the ROM BAR, ordinary ones also shouldn't compare the written value directly against ~0, but consider the r/o bits at the bottom (if any). Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xen-pciback/conf_space_header.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 77c01d11bbb2b5c005347061bf543ab94878314c Author: Colin Ian King Date: Tue Sep 26 10:36:03 2017 +0100 watchdog/hardlockup/perf: Fix spelling mistake: "permanetely" -> "permanently" Trivial fix to spelling mistake in pr_info message Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Acked-by: Don Zickus Cc: Andrew Morton Cc: Babu Moger Link: https://lkml.kernel.org/r/20170926093603.7756-1-colin.king@canonical.com kernel/watchdog_hld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72364d320644c12948786962673772f271039a4a Author: Jeffy Chen Date: Thu Sep 28 12:37:31 2017 +0800 irq/generic-chip: Don't replace domain's name When generic irq chips are allocated for an irq domain the domain name is set to the irq chip name. That was done to have named domains before the recent changes which enforce domain naming were done. Since then the overwrite causes a memory leak when the domain name is dynamically allocated and even worse it would cause the domain free code to free the wrong name pointer, which might point to a constant. Remove the name assignment to prevent this. Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only") Signed-off-by: Jeffy Chen Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20170928043731.4764-1-jeffy.chen@rock-chips.com kernel/irq/generic-chip.c | 1 - 1 file changed, 1 deletion(-) commit c3cdce45f8d3dfa5c3467894aa89798314920328 Author: Baolin Wang Date: Wed Aug 30 19:03:52 2017 +0800 usb: dwc3: of-simple: Add compatible for Spreadtrum SC9860 platform Add compatible string to use this generic glue layer to support Spreadtrum SC9860 platform's dwc3 controller. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 1 + 1 file changed, 1 insertion(+) commit 6baeda120d90aa637b08f7604de104ab00ce9126 Author: Nicolas Ferre Date: Thu Aug 31 14:51:40 2017 +0200 usb: gadget: udc: atmel: set vbus irqflags explicitly The driver triggers actions on both edges of the vbus signal. The former PIO controller was triggering IRQs on both falling and rising edges by default. Newer PIO controller don't, so it's better to set it explicitly to IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING. Without this patch we may trigger the connection with host but only on some bouncing signal conditions and thus lose connecting events. Acked-by: Ludovic Desroches Signed-off-by: Nicolas Ferre Cc: stable # v4.4+ Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit addfc5823dbf3e6ed400e98e49c7e64b10e191d6 Author: John Keeping Date: Tue Sep 12 10:24:40 2017 +0100 usb: gadget: ffs: handle I/O completion in-order By submitting completed transfers to the system workqueue there is no guarantee that completion events will be queued up in the correct order, as in multi-processor systems there is a thread running for each processor and the work items are not bound to a particular core. This means that several completions are in the queue at the same time, they may be processed in parallel and complete out of order, resulting in data appearing corrupt when read by userspace. Create a single-threaded workqueue for FunctionFS so that data completed requests is passed to userspace in the order in which they complete. Acked-by: Michal Nazarewicz Signed-off-by: John Keeping Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 17 +++++++++++++---- drivers/usb/gadget/function/u_fs.h | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) commit 0a2ce62b61f2c76d0213edf4e37aaf54a8ddf295 Author: Yoshihiro Shimoda Date: Wed Sep 27 18:47:13 2017 +0900 usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction This patch fixes an issue that the usbhsf_fifo_clear() is possible to cause 10 msec delay if the pipe is RX direction and empty because the FRDY bit will never be set to 1 in such case. Fixes: e8d548d54968 ("usb: renesas_usbhs: fifo became independent from pipe.") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 6124607acc88fffeaadf3aacfeb3cc1304c87387 Author: Yoshihiro Shimoda Date: Wed Sep 27 18:47:12 2017 +0900 usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe This patch fixes an issue that the driver sets the BCLR bit of {C,Dn}FIFOCTR register to 1 even when it's non-DCP pipe and the FRDY bit of {C,Dn}FIFOCTR register is set to 1. Fixes: e8d548d54968 ("usb: renesas_usbhs: fifo became independent from pipe.") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 447b8a01b84f048d93d43bfe1fcaa4fcc56595cc Author: Yoshihiro Shimoda Date: Mon Sep 25 17:01:25 2017 +0900 usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe() This patch fixes an issue that this driver cannot go status stage in control read when the req.zero is set to 1 and the len in usb3_write_pipe() is set to 0. Otherwise, if we use g_ncm driver, usb enumeration takes long time (5 seconds or more). 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 73f2f5745f18b4ccfe9484deac4e84a1378d19fd Author: Yoshihiro Shimoda Date: Mon Sep 25 17:01:24 2017 +0900 usb: gadget: udc: renesas_usb3: fix Pn_RAMMAP.Pn_MPKT value According to the datasheet of R-Car Gen3, the Pn_RAMMAP.Pn_MPKT should be set to one of 8, 16, 32, 64, 512 and 1024. Otherwise, when a gadget driver uses an interrupt endpoint, unexpected behavior happens. So, 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4dcf4bab4a409e81284b8202137e4a85b96b34de Author: Yoshihiro Shimoda Date: Mon Sep 25 17:01:23 2017 +0900 usb: gadget: udc: renesas_usb3: fix for no-data control transfer When bRequestType & USB_DIR_IN is false and req.length is 0 in control transfer, since it means non-data, this driver should not set the mode as control write. So, 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7dbd8f4cabd96db5a50513de9d83a8105a5ffc81 Author: Alan Stern Date: Tue Sep 26 15:15:49 2017 -0400 USB: dummy-hcd: Fix erroneous synchronization change A recent change to the synchronization in dummy-hcd was incorrect. The issue was that dummy_udc_stop() contained no locking and therefore could race with various gadget driver callbacks, and the fix was to add locking and issue the callbacks with the private spinlock held. UDC drivers aren't supposed to do this. Gadget driver callback routines are allowed to invoke functions in the UDC driver, and these functions will generally try to acquire the private spinlock. This would deadlock the driver. The correct solution is to drop the spinlock before issuing callbacks, and avoid races by emulating the synchronize_irq() call that all real UDC drivers must perform in their ->udc_stop() routines after disabling interrupts. This involves adding a flag to dummy-hcd's private structure to keep track of whether interrupts are supposed to be enabled, and adding a counter to keep track of ongoing callbacks so that dummy_udc_stop() can wait for them all to finish. A real UDC driver won't receive disconnect, reset, suspend, resume, or setup events once it has disabled interrupts. dummy-hcd will receive them but won't try to issue any gadget driver callbacks, which should be just as good. Signed-off-by: Alan Stern Fixes: f16443a034c7 ("USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks") CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 0173a68bfb0ad1c72a6ee39cc485aa2c97540b98 Author: Alan Stern Date: Tue Sep 26 15:15:40 2017 -0400 USB: dummy-hcd: fix infinite-loop resubmission bug The dummy-hcd HCD/UDC emulator tries not to do too much work during each timer interrupt. But it doesn't try very hard; currently all it does is limit the total amount of bulk data transferred. Other transfer types aren't limited, and URBs that transfer no data (because of an error, perhaps) don't count toward the limit, even though on a real USB bus they would consume at least a minimum overhead. This means it's possible to get the driver stuck in an infinite loop, for example, if the host class driver resubmits an URB every time it completes (which is common for interrupt URBs). Each time the URB is resubmitted it gets added to the end of the pending-URBs list, and dummy-hcd doesn't stop until that list is empty. Andrey Konovalov was able to trigger this failure mode using the syzkaller fuzzer. This patch fixes the infinite-loop problem by restricting the URBs handled during each timer interrupt to those that were already on the pending list when the interrupt routine started. Newly added URBs won't be processed until the next timer interrupt. The problem of properly accounting for non-bulk bandwidth (as well as packet and transaction overhead) is not addressed here. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fe659bcc9b173bcfdd958ce2aec75e47651e74e1 Author: Alan Stern Date: Tue Sep 26 15:15:22 2017 -0400 USB: dummy-hcd: fix connection failures (wrong speed) The dummy-hcd UDC driver is not careful about the way it handles connection speeds. It ignores the module parameter that is supposed to govern the maximum connection speed and it doesn't set the HCD flags properly for the case where it ends up running at full speed. The result is that in many cases, gadget enumeration over dummy-hcd fails because the bMaxPacketSize byte in the device descriptor is set incorrectly. For example, the default settings call for a high-speed connection, but the maxpacket value for ep0 ends up being set for a Super-Speed connection. This patch fixes the problem by initializing the gadget's max_speed and the HCD flags correctly. Signed-off-by: Alan Stern CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit edf10919e5fc8dfd10e57ed72f651204559bc6ba Author: Sylvain Lesne Date: Mon Sep 18 13:08:01 2017 +0200 dmaengine: altera: fix spinlock usage Since this lock is acquired in both process and IRQ context, failing to to disable IRQs when trying to acquire the lock in process context can lead to deadlocks. Signed-off-by: Sylvain Lesne Reviewed-by: Stefan Roese Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit d9ec46416de5ef83220f1c7010ee0f5d1be1d753 Author: Sylvain Lesne Date: Mon Sep 18 13:08:00 2017 +0200 dmaengine: altera: fix response FIFO emptying Commit 6084fc2ec478 ("dmaengine: altera: Use macros instead of structs to describe the registers") introduced a minus sign before a register offset. This leads to soft-locks of the DMA controller, since reading the last status byte is required to pop the response from the FIFO. Failing to do so will lead to a full FIFO, which means that the DMA controller will stop processing descriptors. Signed-off-by: Sylvain Lesne Reviewed-by: Stefan Roese Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd269db84908d4d3f7c0efed85bf9d8939fb0b9b Author: Artem Savkov Date: Wed Sep 27 14:25:37 2017 +0200 xfrm: don't call xfrm_policy_cache_flush under xfrm_state_lock I might be wrong but it doesn't look like xfrm_state_lock is required for xfrm_policy_cache_flush and calling it under this lock triggers both "sleeping function called from invalid context" and "possible circular locking dependency detected" warnings on flush. Fixes: ec30d78c14a8 xfrm: add xdst pcpu cache Signed-off-by: Artem Savkov Acked-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66a733ea6b611aecf0119514d2dddab5f9d6c01e Author: Oleg Nesterov Date: Wed Sep 27 09:25:30 2017 -0600 seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter() As Chris explains, get_seccomp_filter() and put_seccomp_filter() can end up using different filters. Once we drop ->siglock it is possible for task->seccomp.filter to have been replaced by SECCOMP_FILTER_FLAG_TSYNC. Fixes: f8e529ed941b ("seccomp, ptrace: add support for dumping seccomp filters") Reported-by: Chris Salls Cc: stable@vger.kernel.org # needs s/refcount_/atomic_/ for v4.12 and earlier Signed-off-by: Oleg Nesterov [tycho: add __get_seccomp_filter vs. open coding refcount_inc()] Signed-off-by: Tycho Andersen [kees: tweak commit log] Signed-off-by: Kees Cook kernel/seccomp.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 607a4029d439cdfa258aff5da32bb9cd6ed1a66d Author: Josh Poimboeuf Date: Wed Sep 27 10:36:38 2017 -0500 objtool: Support unoptimized frame pointer setup Arnd Bergmann reported a bunch of warnings like: crypto/jitterentropy.o: warning: objtool: jent_fold_time()+0x3b: call without frame pointer save/setup crypto/jitterentropy.o: warning: objtool: jent_stuck()+0x1d: call without frame pointer save/setup crypto/jitterentropy.o: warning: objtool: jent_unbiased_bit()+0x15: call without frame pointer save/setup crypto/jitterentropy.o: warning: objtool: jent_read_entropy()+0x32: call without frame pointer save/setup crypto/jitterentropy.o: warning: objtool: jent_entropy_collector_free()+0x19: call without frame pointer save/setup and arch/x86/events/core.o: warning: objtool: collect_events uses BP as a scratch register arch/x86/events/core.o: warning: objtool: events_ht_sysfs_show()+0x22: call without frame pointer save/setup With certain rare configurations, GCC sometimes sets up the frame pointer with: lea (%rsp),%rbp instead of: mov %rsp,%rbp The instructions are equivalent, so treat the former like the latter. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a468af8b28a69b83fffc6d7668be9b6fcc873699.1506526584.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit da541b20021c781f8b65492eeaee824e729599eb Author: Josh Poimboeuf Date: Wed Sep 27 17:34:23 2017 -0500 objtool: Skip unreachable warnings for GCC 4.4 and older The kbuild bot occasionally reports warnings like: drivers/scsi/pcmcia/aha152x_core.o: warning: objtool: seldo_run()+0x130: unreachable instruction These warnings are always with GCC 4.4. That version of GCC sometimes places unreachable instructions after calls to noreturn functions. The unreachable warnings aren't very important anyway. Just ignore them for old versions of GCC. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/bc89b807d965b98ec18a0bb94f96a594bd58f2f2.1506551639.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar scripts/Makefile.build | 2 ++ 1 file changed, 2 insertions(+) commit 353f59f4d41e9c5798a15c5c52958f25b579a3d5 Author: Or Gerlitz Date: Sun Sep 24 09:54:00 2017 +0200 net/mlx5: Fix wrong indentation in enable SRIOV code Smatch is screaming: drivers/net/ethernet/mellanox/mlx5/core/sriov.c:112 mlx5_device_enable_sriov() warn: inconsistent indenting fix that. Fixes: 7ecf6d8ff154 ('IB/mlx5: Restore IB guid/policy for virtual functions') Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 480df991b869eff02a004e8fe7707900437cfcd4 Author: Matan Barak Date: Thu Aug 31 18:52:14 2017 +0300 net/mlx5: Fix static checker warning on steering tracepoints code Fix this sparse complaint: drivers/net/ethernet/mellanox/mlx5/core/./diag/fs_tracepoint.h:172:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) Fixes: d9fea79171ee ('net/mlx5: Add tracepoints') Signed-off-by: Matan Barak Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 603e1f5bd3ca76f16688e10040545594d2e91ba4 Author: Gal Pressman Date: Wed Sep 13 15:37:50 2017 +0300 net/mlx5e: Fix calculated checksum offloads counters Instead of calculating the offloads counters, count them explicitly. The calculations done for these counters would result in bugs in some cases, for example: When running TCP traffic over a VXLAN tunnel with TSO enabled the following counters would increase: tx_csum_partial: 1,333,284 tx_csum_partial_inner: 29,286 tx4_csum_partial_inner: 384 tx7_csum_partial_inner: 8 tx9_csum_partial_inner: 34 tx10_csum_partial_inner: 26,807 tx11_csum_partial_inner: 287 tx12_csum_partial_inner: 27 tx16_csum_partial_inner: 6 tx25_csum_partial_inner: 1,733 Seems like tx_csum_partial increased out of nowhere. The issue is in the following calculation in mlx5e_update_sw_counters: s->tx_csum_partial = s->tx_packets - tx_offload_none - s->tx_csum_partial_inner; While tx_packets increases by the number of GSO segments for each SKB, tx_csum_partial_inner will only increase by one, resulting in wrong tx_csum_partial counter. Fixes: bfe6d8d1d433 ("net/mlx5e: Reorganize ethtool statistics") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 +++------ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) commit 1456f69ff5fbba48ed5bc86e858e945e693ba0b7 Author: Gal Pressman Date: Sun Sep 10 10:36:06 2017 +0300 net/mlx5e: Don't add/remove 802.1ad rules when changing 802.1Q VLAN filter Toggling of C-tag VLAN filter should not affect the "any S-tag" steering rule. Fixes: 8a271746a264 ("net/mlx5e: Receive s-tagged packets in promiscuous mode") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b20eab15a1d5091e45022401e75b49948e8be33f Author: Gal Pressman Date: Tue Sep 12 17:51:12 2017 +0300 net/mlx5e: Print netdev features correctly in error message Use the correct formatting for netdev features. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b281208911a549e391d92ee6cb680dcd3d71783b Author: Vlad Buslov Date: Tue Aug 8 11:45:28 2017 +0300 net/mlx5e: Check encap entry state when offloading tunneled flows Encap entries cached by the driver could be invalidated due to tunnel destination neighbour state changes. When attempting to offload a flow that uses a cached encap entry, we must check the entry validity and defer the offloading if the entry exists but not valid. When EAGAIN is returned, the flow offloading to hardware takes place by the neigh update code when the tunnel destination neighbour becomes connected. Fixes: 232c001398ae ("net/mlx5e: Add support to neighbour update flow") Signed-off-by: Vlad Buslov Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +++ 1 file changed, 3 insertions(+) commit bdd66ac0aeed971d1cb42b3aa0d11b0ea3842e09 Author: Or Gerlitz Date: Sun Jun 11 21:13:25 2017 +0300 net/mlx5e: Disallow TC offloading of unsupported match/action combinations When offloading header re-write, the HW may need to adjust checksums along the packet. For IP traffic, and a case where we are asked to modify fields in the IP header, current HW supports that only for TCP and UDP. Enforce it, in this case fail the offloading attempt for non TCP/UDP packets. Fixes: d7e75a325cb2 ('net/mlx5e: Add offloading of E-Switch TC pedit (header re-write) actions') Fixes: 2f4fe4cab073 ('net/mlx5e: Add offloading of NIC TC pedit (header re-write) actions') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 70 +++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit ace743214ea205c7d433562c5fa24e33bdfda7ab Author: Paul Blakey Date: Tue Sep 5 15:05:51 2017 +0300 net/mlx5e: Fix erroneous freeing of encap header buffer In case the neighbour for the tunnel destination isn't valid, we send a neighbour update request but we free the encap header buffer. This is wrong, because we still need it for allocating a HW encap entry once the neighbour is available. Fix that by skipping freeing it if we wait for neighbour. Fixes: 232c001398ae ('net/mlx5e: Add support to neighbour update flow') Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 16f1c5bb3ed75b3cf3ced537db40f7e1a244debe Author: Raed Salem Date: Sun Jul 30 11:02:51 2017 +0300 net/mlx5: Check device capability for maximum flow counters Added check for the maximal number of flow counters attached to rule (FTE). Fixes: bd5251dbf156b ('net/mlx5_core: Introduce flow steering destination of type counter') Signed-off-by: Raed Salem Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 8 ++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 11 +++++++++++ include/linux/mlx5/mlx5_ifc.h | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) commit 99d3cd27f755d63fd6cf85169eaa873d90769aa5 Author: Inbar Karmy Date: Thu Aug 24 17:21:44 2017 +0300 net/mlx5: Fix FPGA capability location Currently, FPGA capability is located in (mdev)->caps.hca_cur, change the location to be (mdev)->caps.fpga, since hca_cur is reserved for HCA device capabilities. Fixes: e29341fb3a5b ("net/mlx5: FPGA, Add basic support for Innova") Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 3 +-- include/linux/mlx5/device.h | 5 ++--- include/linux/mlx5/driver.h | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) commit 38e8a5c040d3ec99a8351c688dcdf0f549611565 Author: Roi Dayan Date: Mon Aug 21 12:04:50 2017 +0300 net/mlx5e: IPoIB, Fix access to invalid memory address When cleaning rdma netdevice we need to save the mdev pointer because priv is released when we release netdev. This bug was found using the kernel address sanitizer (KASAN). use-after-free in mlx5_rdma_netdev_free+0xe3/0x100 [mlx5_core] Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton") Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d5d7b5058fbd638914e42504677141a69f43011 Author: Shaohua Li Date: Thu Sep 21 11:03:52 2017 -0700 md/raid5: cap worker count static checker reports a potential integer overflow. Cap the worker count to avoid the overflow. Reported:-by: Dan Carpenter Signed-off-by: Shaohua Li drivers/md/raid5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c4d6a1b8e8ea79c439a4871cba540443c9eb13b9 Author: Shaohua Li Date: Thu Sep 21 10:29:22 2017 -0700 dm-raid: fix a race condition in request handling raid_map calls pers->make_request, which missed the suspend check. Fix it with the new md_handle_request API. Fix: cc27b0c78c79(md: fix deadlock between mddev_suspend() and md_write_start()) Cc: Heinz Mauelshagen Cc: Mike Snitzer Cc: stable@vger.kernel.org Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79bf31a3b2a7ca467cfec8ff97d359a77065d01f Author: Shaohua Li Date: Thu Sep 21 09:55:28 2017 -0700 md: fix a race condition for flush request handling md_submit_flush_data calls pers->make_request, which missed the suspend check. Fix it with the new md_handle_request API. Reported-by: Nate Dailey Tested-by: Nate Dailey Fix: cc27b0c78c79(md: fix deadlock between mddev_suspend() and md_write_start()) Cc: stable@vger.kernel.org Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 393debc23c7820211d1c8253dd6a8408a7628fe7 Author: Shaohua Li Date: Thu Sep 21 10:23:35 2017 -0700 md: separate request handling With commit cc27b0c78c79, pers->make_request could bail out without handling the bio. If that happens, we should retry. The commit fixes md_make_request but not other call sites. Separate the request handling part, so other call sites can use it. Reported-by: Nate Dailey Fix: cc27b0c78c79(md: fix deadlock between mddev_suspend() and md_write_start()) Cc: stable@vger.kernel.org Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 58 ++++++++++++++++++++++++++++++++------------------------- drivers/md/md.h | 1 + 2 files changed, 34 insertions(+), 25 deletions(-) commit d0b7a9095c0730b92a0a2eecaba2e6b77ed87339 Author: Martin Wilck Date: Wed Sep 27 14:44:19 2017 +0200 scsi: ILLEGAL REQUEST + ASC==27 => target failure ASC 0x27 is "WRITE PROTECTED". This error code is returned e.g. by Fujitsu ETERNUS systems under certain conditions for WRITE SAME 16 commands with UNMAP bit set. It should not be treated as a path error. In general, it makes sense to assume that being write protected is a target rather than a path property. Signed-off-by: Martin Wilck Acked-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d1b490939d8c117a06dfc562c41d933f71d30289 Author: Guilherme G. Piccoli Date: Tue Sep 19 12:11:55 2017 -0300 scsi: aacraid: Add a small delay after IOP reset Commit 0e9973ed3382 ("scsi: aacraid: Add periodic checks to see IOP reset status") changed the way driver checks if a reset succeeded. Now, after an IOP reset, aacraid immediately start polling a register to verify the reset is complete. This behavior cause regressions on the reset path in PowerPC (at least). Since the delay after the IOP reset was removed by the aforementioned patch, the fact driver just starts to read a register instantly after the reset was issued (by writing in another register) "corrupts" the reset procedure, which ends up failing all the time. The issue highly impacted kdump on PowerPC, since on kdump path we proactively issue a reset in adapter (through the reset_devices kernel parameter). This patch (re-)adds a delay right after IOP reset is issued. Empirically we measured that 3 seconds is enough, but for safety reasons we delay for 5s (and since it was 30s before, 5s is still a small amount). For reference, without this patch we observe the following messages on kdump kernel boot process: [ 76.294] aacraid 0003:01:00.0: IOP reset failed [ 76.294] aacraid 0003:01:00.0: ARC Reset attempt failed [ 86.524] aacraid 0003:01:00.0: adapter kernel panic'd ff. [ 86.524] aacraid 0003:01:00.0: Controller reset type is 3 [ 86.524] aacraid 0003:01:00.0: Issuing IOP reset [146.534] aacraid 0003:01:00.0: IOP reset failed [146.534] aacraid 0003:01:00.0: ARC Reset attempt failed Fixes: 0e9973ed3382 ("scsi: aacraid: Add periodic checks to see IOP reset status") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Guilherme G. Piccoli Acked-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 2 ++ 1 file changed, 2 insertions(+) commit 8aba2333904f9b1c1ea038df261bf7ae8fefb98e Author: Rafael J. Wysocki Date: Thu Sep 28 02:08:43 2017 +0200 cpufreq: docs: Drop intel-pstate.txt from index.txt Commit 33fc30b47098 (cpufreq: intel_pstate: Document the current behavior and user interface) dropped the intel-pstate.txt file from Documentation/cpu-freq/, but it did not update the index.txt file in there accordingly, so do that now. Fixes: 33fc30b47098 (cpufreq: intel_pstate: Document the current behavior and user interface) Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/index.txt | 2 -- 1 file changed, 2 deletions(-) commit 2569e7e1d684e418ba7ffc9d0ad9a5f5247df0a0 Merge: 9cd6681 428490e Author: James Morris Date: Thu Sep 28 09:11:28 2017 +1000 Merge commit 'keys-fixes-20170927' into fixes-v4.14-rc3 From David Howells: "There are two sets of patches here: (1) A bunch of core keyrings bug fixes from Eric Biggers. (2) Fixing big_key to use safe crypto from Jason A. Donenfeld." commit 2e08d20d777e997bf37806b22b471f98fbe6b693 Author: Dennis Zhou Date: Wed Sep 27 16:34:59 2017 -0500 percpu: fix starting offset for chunk statistics traversal This patch fixes the starting offset used when scanning chunks to compute the chunk statistics. The value start_offset (and end_offset) are managed in bytes while the traversal occurs over bits. Thus for the reserved and dynamic chunk, it may incorrectly skip over the initial allocations. Signed-off-by: Dennis Zhou Signed-off-by: Tejun Heo mm/percpu-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaf2c2fb0f51f91c699039440862b6ae9c25c10e Author: Tyler Baicar Date: Mon Aug 28 10:53:41 2017 -0600 ACPI / APEI: clear error status before acknowledging the error Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error acknowledgment and the error status clearing which would cause the second error's status to be cleared without being handled. So, clear the error status before acknowledging the errors. Also, make sure to acknowledge the error if the error status read fails. Signed-off-by: Tyler Baicar Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a5f3d8a5eaaf917878f07998e6f1ea46024e6bab Author: Coly Li Date: Tue Sep 26 17:54:12 2017 +0800 bcache: use llist_for_each_entry_safe() in __closure_wake_up() Commit 09b3efec ("bcache: Don't reinvent the wheel but use existing llist API") replaces the following while loop by llist_for_each_entry(), - - while (reverse) { - cl = container_of(reverse, struct closure, list); - reverse = llist_next(reverse); - + llist_for_each_entry(cl, reverse, list) { closure_set_waiting(cl, 0); closure_sub(cl, CLOSURE_WAITING + 1); } This modification introduces a potential race by iterating a corrupted list. Here is how it happens. In the above modification, closure_sub() may wake up a process which is waiting on reverse list. If this process decides to wait again by calling closure_wait(), its cl->list will be added to another wait list. Then when llist_for_each_entry() continues to iterate next node, it will travel on another new wait list which is added in closure_wait(), not the original reverse list in __closure_wake_up(). It is more probably to happen on UP machine because the waked up process may preempt the process which wakes up it. Use llist_for_each_entry_safe() will fix the issue, the safe version fetch next node before waking up a process. Then the copy of next node will make sure list iteration stays on original reverse list. Fixes: 09b3efec81de ("bcache: Don't reinvent the wheel but use existing llist API") Signed-off-by: Coly Li Reported-by: Michael Lyle Reviewed-by: Byungchul Park Signed-off-by: Jens Axboe drivers/md/bcache/closure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2726e15e54da3d50925bdaae932152a900a24f95 Merge: ffa34d8 8206085 Author: Dave Airlie Date: Thu Sep 28 05:49:38 2017 +1000 Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few fixes for 4.14. Nothing too major. * 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: disable hard reset in hibernate for APUs drm/amdgpu: revert tile table update for oland commit ffa34d854740cbab35e76187fab8980cf19cce08 Merge: f2e2953 5184175 Author: Dave Airlie Date: Thu Sep 28 05:48:53 2017 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes Just two small etnaviv fixes, one fixing a list corruption, the other fixing a NULL ptr deref in an error path. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: etnaviv: fix gem object list corruption etnaviv: fix submit error path commit f2e295342ead4bca18b8b576c414d54176268541 Merge: e19b205 c986169 Author: Dave Airlie Date: Thu Sep 28 05:47:39 2017 +1000 Merge tag 'drm-amdkfd-fixes-2017-09-24' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes It contains the following fixes: - correct checking of return value - send correct parameter to function (According to the parameter type) - avoid spamming of dmesg log - fix queue wrapping calculations * tag 'drm-amdkfd-fixes-2017-09-24' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Print event limit messages only once per process drm/amdkfd: Fix kernel-queue wrapping bugs drm/amdkfd: Fix incorrect destroy_mqd parameter drm/amdkfd: check for null dev to avoid a null pointer dereference commit 9cd6681cb1169e815c41af0265165dd1b872f228 Merge: 225d3b6 4c6bb69 Author: Linus Torvalds Date: Wed Sep 27 12:22:12 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota and isofs fixes from Jan Kara: "Two quota fixes (fallout of the quota locking changes) and an isofs build fix" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Fix quota corruption with generic/232 test isofs: fix build regression quota: add missing lock into __dquot_transfer() commit 225d3b67482930ff5a9f49ad307deffd97ce04c1 Merge: 7031b64 eefd95e Author: Linus Torvalds Date: Wed Sep 27 10:51:08 2017 -0700 Merge tag 'linux-kselftest-4.14-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "This update consists of: - fixes to several existing tests - a test for regression introduced by b9470c27607b ("inet: kill smallest_size and smallest_port") - seccomp support for glibc 2.26 siginfo_t.h - fixes to kselftest framework and tests to run make O=dir use-case - fixes to silence unnecessary test output to de-clutter test results" * tag 'linux-kselftest-4.14-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits) selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms selftests: timers: set-timer-lat: fix hang when std out/err are redirected selftests/memfd: correct run_tests.sh permission selftests/seccomp: Support glibc 2.26 siginfo_t.h selftests: futex: Makefile: fix for loops in targets to run silently selftests: Makefile: fix for loops in targets to run silently selftests: mqueue: Use full path to run tests from Makefile selftests: futex: copy sub-dir test scripts for make O=dir run selftests: lib.mk: copy test scripts and test files for make O=dir run selftests: sync: kselftest and kselftest-clean fail for make O=dir case selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test run/install selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean selftests: lib.mk: fix test executable status check to use full path selftests: Makefile: clear LDFLAGS for make O=dir use-case selftests: lib.mk: kselftest and kselftest-clean fail for make O=dir case Makefile: kselftest and kselftest-clean fail for make O=dir case selftests/net: msg_zerocopy enable build with older kernel headers selftests: actually run the various net selftests selftest: add a reuseaddr test ... commit 36de80740008e6a4a55115b4a92e2059e47c1cba Author: Richard Genoud Date: Wed Sep 27 14:49:17 2017 +0200 mtd: nand: atmel: fix buffer overflow in atmel_pmecc_user When calculating the size needed by struct atmel_pmecc_user *user, the dmu and delta buffer sizes were forgotten. This lead to a memory corruption (especially with a large ecc_strength). Link: http://lkml.kernel.org/r/1506503157.3016.5.camel@gmail.com Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: stable@vger.kernel.org Reported-by: Richard Genoud Pointed-at-by: Boris Brezillon Signed-off-by: Richard Genoud Reviewed-by: Nicolas Ferre Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/pmecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7031b6412586e0f8543039257f457e183aeb463c Merge: dc972a6 8474c53 Author: Linus Torvalds Date: Wed Sep 27 08:33:26 2017 -0700 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu fixes and cleanups from Ingo Molnar: "This is _way_ more cleanups than fixes, but the bugs were subtle and hard to hit, and the primary reason for them existing was the unnecessary historical complexity of some of the x86/fpu interfaces. The first bunch of commits clean up and simplify the xstate user copy handling functions, in reaction to the collective head-scratching about the xstate user-copy handling code that leads up to the fix for this SkyLake xstate handling bug: 0852b374173b: x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs The cleanups don't change any functionality, they just (hopefully) make it all clearer, more consistent, more debuggable and more robust. Note that most of the linecount increase comes from these commits, where we better split the user/kernel copy logic by having more variants, instead repeated fragile patterns of: if (kbuf) { memcpy(kbuf + pos, data, copy); } else { if (__copy_to_user(ubuf + pos, data, copy)) return -EFAULT; } The next bunch of commits simplify the FPU state-machine to get rid of old lazy-FPU idiosyncrasies - a defensive simplification to make all the code easier to review and fix. No change in functionality. Then there's a couple of additional debugging tweaks: static checker warning fix and move an FPU related warning to under WARN_ON_FPU(), followed by another bunch of commits that represent a finegrained split-up of the fixes from Eric Biggers to handle weird xstate bits properly. I did this finegrained split-up because some of these fixes also impact the ABI for weird xstate handling, for which we'd like to have good bisection results, should they cause any problems. (We also had one regression with the more monolithic fixes, so splitting it all up sounded prudent for robustness reasons as well.) About the whole series: the commits up to 03eaec81ac09 have been in -next for months - but I've recently rebased them to remove a state machine clean-up commit that was objected to, and to make it more bisectable - so technically it's a new, rebased tree. Robustness history: this series had some regressions along the way, and all reported regressions have been fixed. All but one of the regressions manifested itself as easy to report warnings. The previous version of this latest series was also in linux-next, with one (warning-only) regression reported which is fixed in the latest version. Barring last minute brown paper bag bugs (and the commits are now older by a day which I'd hope helps paperbag reduction), I'm reasonably confident about its general robustness. Famous last words ..." * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) x86/fpu: Use using_compacted_format() instead of open coded X86_FEATURE_XSAVES x86/fpu: Use validate_xstate_header() to validate the xstate_header in copy_user_to_xstate() x86/fpu: Eliminate the 'xfeatures' local variable in copy_user_to_xstate() x86/fpu: Copy the full header in copy_user_to_xstate() x86/fpu: Use validate_xstate_header() to validate the xstate_header in copy_kernel_to_xstate() x86/fpu: Eliminate the 'xfeatures' local variable in copy_kernel_to_xstate() x86/fpu: Copy the full state_header in copy_kernel_to_xstate() x86/fpu: Use validate_xstate_header() to validate the xstate_header in __fpu__restore_sig() x86/fpu: Use validate_xstate_header() to validate the xstate_header in xstateregs_set() x86/fpu: Introduce validate_xstate_header() x86/fpu: Rename fpu__activate_fpstate_read/write() to fpu__prepare_[read|write]() x86/fpu: Rename fpu__activate_curr() to fpu__initialize() x86/fpu: Simplify and speed up fpu__copy() x86/fpu: Fix stale comments about lazy FPU logic x86/fpu: Rename fpu::fpstate_active to fpu::initialized x86/fpu: Remove fpu__current_fpstate_write_begin/end() x86/fpu: Fix fpu__activate_fpstate_read() and update comments x86/fpu: Reinitialize FPU registers if restoring FPU state fails x86/fpu: Don't let userspace set bogus xcomp_bv x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU() ... commit 828bcbdc975fbcfb27946c33d4b1d1bfab70789b Author: Harish Chegondi Date: Tue Sep 26 06:06:34 2017 -0700 IB/hfi1: Unsuccessful PCIe caps tuning should not fail driver load Failure to tune PCIe capabilities should not fail driver load. This can cause the driver load to fail on systems with any of the following: 1. HFI's parent is not root. Example: HFI card is behind a PCIe bridge. 2. HFI's parent is not PCI Express capable. In these situations, failure to tune PCIe capabilities should be logged in the system message logs but not cause the driver load to fail. This patch also ensures pcie capability word DevCtl is written only after a successful read and the capability tuning process continues even if read/write of the pcie capability word DevCtl fails. Fixes: c53df62c7a9a ("IB/hfi1: Check return values from PCI config API calls") Fixes: bf70a7757736 ("staging/rdma/hfi1: Enable WFR PCIe extended tags from the driver") Reviewed-by: Michael J. Ruhl Reviewed-by: Mike Marciniszyn Reviewed-by: Jakub Byczkowski Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pcie.c | 50 ++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 29 deletions(-) commit b8f42738acaddf67731c34935c0994e09a588ca7 Author: Michael J. Ruhl Date: Tue Sep 26 06:06:28 2017 -0700 IB/hfi1: On error, fix use after free during user context setup During base context setup, if setup_base_ctxt() fails, the context is deallocated. This is incorrect because the context is referenced on return, to notify any waiting subcontext. If there are no subcontexts the pointer will be invalid. Reorganize the error path so that deallocate_ctxt() is called after all the possible subcontexts have been notified. 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 | 41 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit 612601d0013f03de9dc134809f242ba6da9ca252 Author: Alex Estrin Date: Tue Sep 26 06:06:22 2017 -0700 Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" commit 9a9b8112699d will cause core to fail UD QP from being destroyed on ipoib unload, therefore cause resources leakage. On pkey change event above patch modifies mgid before calling underlying driver to detach it from QP. Drivers' detach_mcast() will fail to find modified mgid it was never given to attach in a first place. Core qp->usecnt will never go down, so ib_destroy_qp() will fail. IPoIB driver actually does take care of new broadcast mgid based on new pkey by destroying an old mcast object in ipoib_mcast_dev_flush()) .... if (priv->broadcast) { rb_erase(&priv->broadcast->rb_node, &priv->multicast_tree); list_add_tail(&priv->broadcast->list, &remove_list); priv->broadcast = NULL; } ... then in restarted ipoib_macst_join_task() creating a new broadcast mcast object, sending join request and on completion tells the driver to attach to reinitialized QP: ... if (!priv->broadcast) { ... broadcast = ipoib_mcast_alloc(dev, 0); ... memcpy(broadcast->mcmember.mgid.raw, priv->dev->broadcast + 4, sizeof (union ib_gid)); priv->broadcast = broadcast; ... Fixes: 9a9b8112699d ("IB/ipoib: Update broadcast object if PKey value was changed in index 0") Cc: stable@vger.kernel.org Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Reviewed-by: Feras Daoud Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 ------------- 1 file changed, 13 deletions(-) commit 09592af5fdd722615ebe435fb34308de26c74bcf Author: Kamenee Arumugam Date: Tue Sep 26 06:06:15 2017 -0700 IB/hfi1: Return correct value in general interrupt handler The general interrupt handler returns IRQ_HANDLED whether an IRQ was handled or not. Determine if an IRQ was handled and return the correct value. Reviewed-by: Dennis Dalessandro 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 753b19afb19dd97d0767df5e8afb13faff605315 Author: Jan Sokolowski Date: Tue Sep 26 06:06:09 2017 -0700 IB/hfi1: Check eeprom config partition validity Relying on a trailing magic value is incorrect. There are instances where this is not present as trailing magic value has a specific purpose which is not partition validation. Instead use the header magic value which is present in all variants of the platform configuration and is intended for validation. This is also used in other locations in the driver. Fixes: bc5214ee2922 (IB/hfi1: Handle missing magic values in config file) Reviewed-by: Jakub Byczkowski Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/eprom.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 30e10527bcce376114e627abb7fabfbe9bfee91e Author: Sebastian Sanchez Date: Tue Sep 26 06:06:03 2017 -0700 IB/hfi1: Only reset QSFP after link up and turn off AOC TX QSFP reset enables AOC transmitters by default. They should be off before moving to high power mode to complete the setup. There is no need to reset the QSFP during LNI failure as it was reset at link down. Reviewed-by: Mike Marciniszyn Reviewed-by: Jakub Byczkowski Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 12 +++++++++++- drivers/infiniband/hw/hfi1/chip.h | 2 +- drivers/infiniband/hw/hfi1/platform.c | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) commit df5efdd97029f2cff7e5c91ea1c9f2b94d009b0f Author: Sebastian Sanchez Date: Tue Sep 26 06:05:57 2017 -0700 IB/hfi1: Turn off AOC TX after offline substates Offline.quietDuration was added in the 8051 firmware, and the driver only turns off the AOC transmitters when offline.quiet is reached. However, the AOC transmitters need to be turned off at the new state. Therefore, turn off the AOC transmitters at any offline substates including offline.quiet and offline.quietDuration, then recheck we reached offline.quiet to support backwards compatibility. Reviewed-by: Jakub Byczkowski 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 | 85 +++++++++++++++++++++++++++++---------- drivers/infiniband/hw/hfi1/chip.h | 1 + 2 files changed, 65 insertions(+), 21 deletions(-) commit 50ce6312f293e129eedf2affc7bd791c71d8287e Author: Jean-Philippe Brucker Date: Tue Sep 26 19:32:52 2017 +0100 iommu: Fix comment for iommu_ops.map_sg The definition of map_sg was split during a recent addition to iommu_ops. Put it back together. Fixes: add02cfdc9bc ("iommu: Introduce Interface for IOMMU TLB Flushing") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Joerg Roedel include/linux/iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c6bae62136ba5b24f0b113e68121b783457ca4b Author: Arvind Yadav Date: Tue Sep 26 13:07:46 2017 +0530 iommu/amd: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. So replace '/n' with '\n'. Signed-off-by: Arvind Yadav Fixes: 45a01c42933b ('iommu/amd: Add function copy_dev_tables()') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1ff9b17cedb39bc78f9e3f82485765f9b467177d Author: Yong Wu Date: Mon Sep 25 18:15:26 2017 +0800 iommu/mediatek: Limit the physical address in 32bit for v7s The ARM short descriptor has already limited the physical address to 32bit after the commit <76557391433c> ("iommu/io-pgtable: Sanitise map/unmap addresses"). But in MediaTek 4GB mode, the physical address is from 0x1_0000_0000 to 0x1_ffff_ffff. this will cause: WARNING: CPU: 4 PID: 3900 at xxx/drivers/iommu/io-pgtable-arm-v7s.c:482 arm_v7s_map+0x40/0xf8 Modules linked in: CPU: 4 PID: 3900 Comm: weston Tainted: G S W 4.9.44 #1 Hardware name: MediaTek MT2712m1v1 board (DT) task: ffffffc0eaa5b280 task.stack: ffffffc0e9858000 PC is at arm_v7s_map+0x40/0xf8 LR is at mtk_iommu_map+0x64/0x90 pc : [] lr : [] pstate: 000001c5 sp : ffffffc0e985b920 x29: ffffffc0e985b920 x28: 0000000127d00000 x27: 0000000000100000 x26: ffffff8008f9e000 x25: 0000000000000003 x24: 0000000000100000 x23: 0000000127d00000 x22: 00000000ff800000 x21: ffffffc0f7ec8ce0 x20: 0000000000000003 x19: 0000000000000003 x18: 0000000000000002 x17: 0000007f7e5d72c0 x16: ffffff80082b0f08 x15: 0000000000000001 x14: 000000000000003f x13: 0000000000000000 x12: 0000000000000028 x11: 0088000000000000 x10: 0000000000000000 x9 : ffffff80092fa000 x8 : ffffffc0e9858000 x7 : ffffff80085b29d8 x6 : 0000000000000000 x5 : ffffff80085b09a8 x4 : 0000000000000003 x3 : 0000000000100000 x2 : 0000000127d00000 x1 : 00000000ff800000 x0 : 0000000000000001 ... Call trace: [] arm_v7s_map+0x40/0xf8 [] mtk_iommu_map+0x64/0x90 [] iommu_map+0x100/0x3a0 [] default_iommu_map_sg+0x104/0x168 [] iommu_dma_alloc+0x238/0x3f8 [] __iommu_alloc_attrs+0xa8/0x260 [] mtk_drm_gem_create+0xac/0x180 [] mtk_drm_gem_dumb_create+0x54/0xc8 [] drm_mode_create_dumb_ioctl+0xa4/0xd8 [] drm_ioctl+0x1c0/0x490 In order to satify this, Limit the physical address to 32bit. Signed-off-by: Yong Wu Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c62c1c67903621cfa715d6f690548ee53301620 Author: Yong Wu Date: Mon Sep 25 17:28:47 2017 +0800 iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA Fix the commit 81b3c2521844 ("iommu/io-pgtable: Introduce explicit coherency"). If there is no IO_PGTABLE_QUIRK_NO_DMA, we should call dma_sync_single_for_device for cache synchronization. Signed-off-by: Yong Wu Fixes: 81b3c2521844 ('iommu/io-pgtable: Introduce explicit coherency') Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm-v7s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83b31c2a5fdd4fb3a4ec84c59a962e816d0bc9de Author: Petr Mladek Date: Tue Sep 26 15:51:28 2017 +0200 pinctrl/amd: Fix build dependency on pinmux code The commit 79d2c8bede2c93f943 ("pinctrl/amd: save pin registers over suspend/resume") caused the following compilation errors: drivers/pinctrl/pinctrl-amd.c: In function ‘amd_gpio_should_save’: drivers/pinctrl/pinctrl-amd.c:741:8: error: ‘const struct pin_desc’ has no member named ‘mux_owner’ if (pd->mux_owner || pd->gpio_owner || ^ drivers/pinctrl/pinctrl-amd.c:741:25: error: ‘const struct pin_desc’ has no member named ‘gpio_owner’ if (pd->mux_owner || pd->gpio_owner || We need to enable CONFIG_PINMUX for this driver as well. Cc: stable@vger.kernel.org Fixes: 79d2c8bede2c93f943 ("pinctrl/amd: save pin registers over suspend/resume") Signed-off-by: Petr Mladek Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7e439681af82984045efc215437ebb2ca8d33a4c Author: Boris Brezillon Date: Mon Sep 25 10:19:57 2017 +0200 mtd: Fix partition alignment check on multi-erasesize devices Commit 1eeef2d7483a ("mtd: handle partitioning on devices with 0 erasesize") introduced a regression on heterogeneous erase region devices. Alignment of the partition was tested against the master eraseblock size which can be bigger than the slave one, thus leading to some partitions being marked as read-only. Update wr_alignment to match this slave erasesize after this erasesize has been determined by picking the biggest erasesize of all the regions embedded in the MTD partition. Reported-by: Mathias Thore Fixes: 1eeef2d7483a ("mtd: handle partitioning on devices with 0 erasesize") Cc: Signed-off-by: Boris Brezillon Tested-by: Mathias Thore Reviewed-by: Mathias Thore drivers/mtd/mtdpart.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 31afb2ea2b10a7d17ce3db4cdb0a12b63b2fe08a Author: Paolo Bonzini Date: Tue Jun 6 12:57:06 2017 +0200 KVM: VMX: simplify and fix vmx_vcpu_pi_load The simplify part: do not touch pi_desc.nv, we can set it when the VCPU is first created. Likewise, pi_desc.sn is only handled by vmx_vcpu_pi_load, do not touch it in __pi_post_block. The fix part: do not check kvm_arch_has_assigned_device, instead check the SN bit to figure out whether vmx_vcpu_pi_put ran before. This matches what the previous patch did in pi_post_block. Cc: Huangweidong Cc: Gonglei Cc: wangxin Cc: Radim Krčmář Tested-by: Longpeng (Mike) Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 68 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) commit 8b306e2f3c41939ea528e6174c88cfbfff893ce1 Author: Paolo Bonzini Date: Tue Jun 6 12:57:05 2017 +0200 KVM: VMX: avoid double list add with VT-d posted interrupts In some cases, for example involving hot-unplug of assigned devices, pi_post_block can forget to remove the vCPU from the blocked_vcpu_list. When this happens, the next call to pi_pre_block corrupts the list. Fix this in two ways. First, check vcpu->pre_pcpu in pi_pre_block and WARN instead of adding the element twice in the list. Second, always do the list removal in pi_post_block if vcpu->pre_pcpu is set (not -1). The new code keeps interrupts disabled for the whole duration of pi_pre_block/pi_post_block. This is not strictly necessary, but easier to follow. For the same reason, PI.ON is checked only after the cmpxchg, and to handle it we just call the post-block code. This removes duplication of the list removal code. Cc: Huangweidong Cc: Gonglei Cc: wangxin Cc: Radim Krčmář Tested-by: Longpeng (Mike) Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 62 ++++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 37 deletions(-) commit cd39e1176d320157831ce030b4c869bd2d5eb142 Author: Paolo Bonzini Date: Tue Jun 6 12:57:04 2017 +0200 KVM: VMX: extract __pi_post_block Simple code movement patch, preparing for the next one. Cc: Huangweidong Cc: Gonglei Cc: wangxin Cc: Radim Krčmář Tested-by: Longpeng (Mike) Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 71 +++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) commit 5371513fb338fb9989c569dc071326d369d6ade8 Author: Marc Zyngier Date: Tue Sep 26 15:57:16 2017 +0100 arm64: Make sure SPsel is always set When the kernel is entered at EL2 on an ARMv8.0 system, we construct the EL1 pstate and make sure this uses the the EL1 stack pointer (we perform an exception return to EL1h). But if the kernel is either entered at EL1 or stays at EL2 (because we're on a VHE-capable system), we fail to set SPsel, and use whatever stack selection the higher exception level has choosen for us. Let's not take any chance, and make sure that SPsel is set to one before we decide the mode we're going to run in. Cc: Acked-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 1 + 1 file changed, 1 insertion(+) commit 4c6bb69663b3a3f2db8f488356e96acb5460f25f Author: Jan Kara Date: Tue Sep 26 10:36:05 2017 +0200 quota: Fix quota corruption with generic/232 test Eric has reported that since commit d2faa415166b "quota: Do not acquire dqio_sem for dquot overwrites in v2 format" test generic/232 occasionally fails due to quota information being incorrect. Indeed that commit was too eager to remove dqio_sem completely from the path that just overwrites quota structure with updated information. Although that is innocent on its own, another process that inserts new quota structure to the same block can perform read-modify-write cycle of that block thus effectively discarding quota information update if they race in a wrong way. Fix the problem by acquiring dqio_sem for reading for overwrites of quota structure. Note that it *is* possible to completely avoid taking dqio_sem in the overwrite path however that will require modifying path inserting / deleting quota structures to avoid RMW cycles of the full block and for now it is not clear whether it is worth the hassle. Fixes: d2faa415166b2883428efa92f451774ef44373ac Reported-and-tested-by: Eric Whitney Signed-off-by: Jan Kara fs/quota/quota_v2.c | 4 ++++ 1 file changed, 4 insertions(+) commit ce7c47d60bda6c7f09ccf16e978d971c8fa16ff0 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 c2cc187e53011c1c4931055984657da9085c763b Author: Dan Carpenter Date: Mon Sep 25 13:19:26 2017 +0300 sctp: Fix a big endian bug in sctp_diag_dump() The sctp_for_each_transport() function takes an pointer to int. The cb->args[] array holds longs so it's only using the high 32 bits. It works on little endian system but will break on big endian 64 bit machines. Fixes: d25adbeb0cdb ("sctp: fix an use-after-free issue in sctp_sock_dump") Signed-off-by: Dan Carpenter Acked-by: Neil Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/sctp_diag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 20c62c797e85b589152970089eaf22a7d88d989a Merge: 2760f5a 3e747fa Author: David S. Miller Date: Tue Sep 26 20:21:46 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-09-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.14 Quite a lot of fixes this time. Most notable is the brcmfmac fix for a CVE issue. iwlwifi * a couple of bugzilla bugs related to multicast handling * two fixes for WoWLAN bugs that were causing queue hangs and re-initialization problems * two fixes for potential uninitialized variable use reported by Dan Carpenter in relation to a recently introduced patch * a fix for buffer reordering in the newly supported 9000 device family * fix a race when starting aggregation * small fix for a recent patch to wake mac80211 queues * send non-bufferable management frames in the generic queue so they are not sent on queues that are under power-save ath10k * fix a PCI PM related gcc warning brcmfmac * CVE-2017-0786: add length check scan results from firmware * respect passive scan requests from user space qtnfmac * fix race in tx path when using multiple interfaces * cancel ongoing scan when removing the wireless interface ==================== Signed-off-by: David S. Miller commit dc972a67cc54585bd83ad811c4e9b6ab3dcd427e Merge: fc46820 6ae0336 Author: Linus Torvalds Date: Tue Sep 26 16:54:22 2017 -0700 Merge tag 'mmc-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - sdhci-pci: Fix voltage switch for some Intel host controllers - tmio: remove broken and noisy debug macro * tag 'mmc-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci: Fix voltage switch for some Intel host controllers mmc: tmio: remove broken and noisy debug macro commit fc46820b27a2d9a46f7e90c9ceb4a64a1bc5fab8 Author: Andreas Gruenbacher Date: Mon Sep 25 12:23:03 2017 +0200 vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets In generic_file_llseek_size, return -ENXIO for negative offsets as well as offsets beyond EOF. This affects filesystems which don't implement SEEK_HOLE / SEEK_DATA internally, possibly because they don't support holes. Fixes xfstest generic/448. Signed-off-by: Andreas Gruenbacher Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/read_write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2760f5a34421bba937dafa29a9decdbad11d2718 Merge: 62b982e c754568 Author: David S. Miller Date: Tue Sep 26 13:44:32 2017 -0700 Merge branch 'aquantia-fixes' Igor Russkikh says: ==================== aquantia: Atlantic driver bugfixes und improvements This series contains bugfixes for aQuantia Atlantic driver. Changes in v2: Review comments applied: - min_mtu set removed - extra mtu range check is removed - err codes handling improved ==================== Signed-off-by: David S. Miller commit c7545689244b50c562b1fbbc71905fba224c8a05 Author: Pavel Belous Date: Mon Sep 25 10:48:50 2017 +0300 atlantic: fix iommu errors Call skb_frag_dma_map multiple times if tx length is greater than device max and avoid processing tx ring until entire packet has been sent. Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 43 ++++++++++++++---------- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 27 ++++++++++----- drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 6 ++-- 3 files changed, 49 insertions(+), 27 deletions(-) commit a7bb1bea3a296549ebfc28afa76276ef392f9afa Author: Igor Russkikh Date: Mon Sep 25 10:48:49 2017 +0300 aquantia: Fix transient invalid link down/up indications Due to a bug in aquantia atlantic card firmware, it sometimes reports invalid link speed bits. That caused driver to report link down events, although link itself is totally fine. This patch ignores such out of blue readings. 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_utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3aec6412e007b294d4c135f5c7ed5e5ecf37dd2e Author: Igor Russkikh Date: Mon Sep 25 10:48:48 2017 +0300 aquantia: Fix Tx queue hangups Driver did a poor job in managing its Tx queues: Sometimes it could stop tx queues due to link down condition in aq_nic_xmit - but never waked up them. That led to Tx path total suspend. This patch fixes this and improves generic queue management: - introduces queue restart counter - uses generic netif_ interface to disable and enable tx path - refactors link up/down condition and introduces dmesg log event when link changes. - introduces new constant for minimum descriptors count required for queue wakeup Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 4 ++ drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 91 +++++++++++------------- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 - drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 26 +++++++ drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 4 ++ drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 8 +-- 6 files changed, 76 insertions(+), 59 deletions(-) commit d85fc17beeb06f9979d63fe4d9fbffbb1a00bba4 Author: Igor Russkikh Date: Mon Sep 25 10:48:47 2017 +0300 aquantia: Setup max_mtu in ndev to enable jumbo frames Although hardware is capable for almost 16K MTU, without max_mtu field correctly set it only allows standard MTU to be used. This patch enables max MTU, calculating it from hardware maximum frame size of 16352 octets (including FCS). Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu") Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 11 ++--------- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) commit e23ed762db7ed1950a6408c3be80bc56909ab3d4 Author: Florian Westphal Date: Tue Sep 26 11:57:54 2017 +0200 netfilter: ipset: pernet ops must be unregistered last Removing the ipset module leaves a small window where one cpu performs module removal while another runs a command like 'ipset flush'. ipset uses net_generic(), unregistering the pernet ops frees this storage area. Fix it by first removing the user-visible api handlers and the pernet ops last. Fixes: 1785e8f473082 ("netfiler: ipset: Add net namespace for ipset") Reported-by: Li Shuang Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_core.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc Author: Jozsef Kadlecsik Date: Sat Sep 23 23:37:40 2017 +0200 netfilter: ipset: Fix adding an IPv4 range containing more than 2^31 addresses Wrong comparison prevented the hash types to add a range with more than 2^31 addresses but reported as a success. Fixes Netfilter's bugzilla id #1005, reported by Oleg Serditov and Oliver Ford. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_ip.c | 22 ++++++++++++---------- net/netfilter/ipset/ip_set_hash_ipmark.c | 2 +- net/netfilter/ipset/ip_set_hash_ipport.c | 2 +- net/netfilter/ipset/ip_set_hash_ipportip.c | 2 +- net/netfilter/ipset/ip_set_hash_ipportnet.c | 4 ++-- net/netfilter/ipset/ip_set_hash_net.c | 2 +- net/netfilter/ipset/ip_set_hash_netiface.c | 2 +- net/netfilter/ipset/ip_set_hash_netnet.c | 4 ++-- net/netfilter/ipset/ip_set_hash_netport.c | 2 +- net/netfilter/ipset/ip_set_hash_netportnet.c | 4 ++-- 10 files changed, 24 insertions(+), 22 deletions(-) commit 89fcbb564f4a64c439d597c2702f990eed49c8a1 Author: Subash Abhinov Kasiviswanathan Date: Thu Sep 21 19:01:36 2017 -0600 netfilter: xt_socket: Restore mark from full sockets only An out of bounds error was detected on an ARM64 target with Android based kernel 4.9. This occurs while trying to restore mark on a skb from an inet request socket. BUG: KASAN: slab-out-of-bounds in socket_match.isra.2+0xc8/0x1f0 net/netfilter/xt_socket.c:248 Read of size 4 at addr ffffffc06a8d824c by task syz-fuzzer/1532 CPU: 7 PID: 1532 Comm: syz-fuzzer Tainted: G W O 4.9.41+ #1 Call trace: [] dump_backtrace+0x0/0x440 arch/arm64/kernel/traps.c:76 [] show_stack+0x28/0x38 arch/arm64/kernel/traps.c:226 [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xe4/0x134 lib/dump_stack.c:51 [] print_address_description+0x68/0x258 mm/kasan/report.c:248 [] kasan_report_error mm/kasan/report.c:347 [inline] [] kasan_report.part.2+0x228/0x2f0 mm/kasan/report.c:371 [] kasan_report+0x5c/0x70 mm/kasan/report.c:372 [] check_memory_region_inline mm/kasan/kasan.c:308 [inline] [] __asan_load4+0x88/0xa0 mm/kasan/kasan.c:740 [] socket_match.isra.2+0xc8/0x1f0 net/netfilter/xt_socket.c:248 [] socket_mt4_v1_v2_v3+0x3c/0x48 net/netfilter/xt_socket.c:272 [] ipt_do_table+0x54c/0xad8 net/ipv4/netfilter/ip_tables.c:311 [] iptable_mangle_hook+0x6c/0x220 net/ipv4/netfilter/iptable_mangle.c:90 ... Allocated by task 1532: save_stack_trace_tsk+0x0/0x2a0 arch/arm64/kernel/stacktrace.c:131 save_stack_trace+0x28/0x38 arch/arm64/kernel/stacktrace.c:215 save_stack mm/kasan/kasan.c:495 [inline] set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xd8/0x188 mm/kasan/kasan.c:599 kasan_slab_alloc+0x14/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2728 [inline] slab_alloc mm/slub.c:2736 [inline] kmem_cache_alloc+0x14c/0x2e8 mm/slub.c:2741 reqsk_alloc include/net/request_sock.h:87 [inline] inet_reqsk_alloc+0x4c/0x238 net/ipv4/tcp_input.c:6236 tcp_conn_request+0x2b0/0xea8 net/ipv4/tcp_input.c:6341 tcp_v4_conn_request+0xe0/0x100 net/ipv4/tcp_ipv4.c:1256 tcp_rcv_state_process+0x384/0x18a8 net/ipv4/tcp_input.c:5926 tcp_v4_do_rcv+0x2f0/0x3e0 net/ipv4/tcp_ipv4.c:1430 tcp_v4_rcv+0x1278/0x1350 net/ipv4/tcp_ipv4.c:1709 ip_local_deliver_finish+0x174/0x3e0 net/ipv4/ip_input.c:216 v1->v2: Change socket_mt6_v1_v2_v3() as well as mentioned by Eric v2->v3: Put the correct fixes tag Fixes: 01555e74bde5 ("netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e5c943c1f257c2b3424fc3f8a7b18570152dab3 Author: Darrick J. Wong Date: Mon Sep 18 09:41:17 2017 -0700 xfs: revert "xfs: factor rmap btree size into the indlen calculations" In commit fd26a88093ba we added a worst case estimate for rmapbt blocks needed to satisfy the block mapping request. Since then, we added the ability to reserve enough space in each AG such that we should never run out of blocks to grow the rmapbt, which makes this calculation unnecessary. Revert the commit because it makes the extra delalloc indlen accounting unnecessary and incorrect. Reported-by: Eryu Guan Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 842f6e9f786226c58fcbd5ef80eadca72fdfe652 Author: Carlos Maiolino Date: Fri Sep 22 11:47:46 2017 -0700 xfs: Capture state of the right inode in xfs_iflush_done My previous patch: d3a304b6292168b83b45d624784f973fdc1ca674 check for XFS_LI_FAILED flag xfs_iflush done, so the failed item can be properly resubmitted. In the loop scanning other inodes being completed, it should check the current item for the XFS_LI_FAILED, and not the initial one. The state of the initial inode is checked after the loop ends Kudos to Eric for catching this. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode_item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9789dd9e1d939232e8ff4c50ef8e75aa6781b3fb Author: Darrick J. Wong Date: Mon Sep 18 09:42:09 2017 -0700 xfs: perag initialization should only touch m_ag_max_usable for AG 0 We call __xfs_ag_resv_init to make a per-AG reservation for each AG. This makes the reservation per-AG, not per-filesystem. Therefore, it is incorrect to adjust m_ag_max_usable for each AG. Adjust it only when we're reserving AG 0's blocks so that we only do it once per fs. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_ag_resv.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ee70daaba82d70766d0723b743d9fdeb3b06102a Author: Eryu Guan Date: Thu Sep 21 11:26:18 2017 -0700 xfs: update i_size after unwritten conversion in dio completion Since commit d531d91d6990 ("xfs: always use unwritten extents for direct I/O writes"), we start allocating unwritten extents for all direct writes to allow appending aio in XFS. But for dio writes that could extend file size we update the in-core inode size first, then convert the unwritten extents to real allocations at dio completion time in xfs_dio_write_end_io(). Thus a racing direct read could see the new i_size and find the unwritten extents first and read zeros instead of actual data, if the direct writer also takes a shared iolock. Fix it by updating the in-core inode size after the unwritten extent conversion. To do this, introduce a new boolean argument to xfs_iomap_write_unwritten() to tell if we want to update in-core i_size or not. Suggested-by: Brian Foster Reviewed-by: Brian Foster Signed-off-by: Eryu Guan Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 3 ++- fs/xfs/xfs_file.c | 33 +++++++++++++++++++-------------- fs/xfs/xfs_iomap.c | 7 +++++-- fs/xfs/xfs_iomap.h | 2 +- fs/xfs/xfs_pnfs.c | 2 +- 5 files changed, 28 insertions(+), 19 deletions(-) commit 546e7be8244dc050effef0555df5b8d94d10dafc Author: Chandan Rajendra Date: Fri Sep 22 11:47:33 2017 -0700 iomap_dio_rw: Allocate AIO completion queue before submitting dio Executing xfs/104 test in a loop on Linux-v4.13 kernel on a ppc64 machine can cause the following NULL pointer dereference, .queue_work_on+0x4c/0x80 .iomap_dio_bio_end_io+0xbc/0x1f0 .bio_endio+0x118/0x1f0 .blk_update_request+0xd0/0x470 .blk_mq_end_request+0x24/0xc0 .lo_complete_rq+0x40/0xe0 .__blk_mq_complete_request_remote+0x28/0x40 .flush_smp_call_function_queue+0xc4/0x1e0 .smp_ipi_demux_relaxed+0x8c/0x100 .icp_hv_ipi_action+0x54/0xa0 .__handle_irq_event_percpu+0x84/0x2c0 .handle_irq_event_percpu+0x28/0x80 .handle_percpu_irq+0x78/0xc0 .generic_handle_irq+0x40/0x70 .__do_irq+0x88/0x200 .call_do_irq+0x14/0x24 .do_IRQ+0x84/0x130 This occurs due to the following sequence of events, 1. Allocate dio for Direct I/O write. 2. Invoke iomap_apply() until iov_iter_count() bytes have been submitted. - Assume that we have submitted atleast one bio. Hence iomap_dio->ref value will be >= 2. - If during the second iteration, iomap_apply() ends up returning -ENOSPC, we would break out of the loop and since the 'ret' value is a negative number we end up not allocating memory for super_block->s_dio_done_wq. 3. Meanwhile, iomap_dio_bio_end_io() is invoked for bios that have been submitted and here the code ends up dereferencing the NULL pointer stored at super_block->s_dio_done_wq. This commit fixes the bug by allocating memory for super_block->s_dio_done_wq before iomap_apply() is invoked. Reported-by: Eryu Guan Reviewed-by: Christoph Hellwig Tested-by: Eryu Guan Signed-off-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6851a3db7e224bbb85e23b3c64a506c9e0904382 Author: Ross Zwisler Date: Mon Sep 18 14:46:03 2017 -0700 xfs: validate bdev support for DAX inode flag Currently only the blocksize is checked, but we should really be calling bdev_dax_supported() which also tests to make sure we can get a struct dax_device and that the dax_direct_access() path is working. This is the same check that we do for the "-o dax" mount option in xfs_fs_fill_super(). This does not fix the race issues that caused the XFS DAX inode option to be disabled, so that option will still be disabled. If/when we re-enable it, though, I think we will want this issue to have been fixed. I also do think that we want to fix this in stable kernels. Signed-off-by: Ross Zwisler CC: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62b982eeb4589b2e6d7c01a90590e3a4c2b2ca19 Author: Sabrina Dubroca Date: Tue Sep 26 16:16:43 2017 +0200 l2tp: fix race condition in l2tp_tunnel_delete If we try to delete the same tunnel twice, the first delete operation does a lookup (l2tp_tunnel_get), finds the tunnel, calls l2tp_tunnel_delete, which queues it for deletion by l2tp_tunnel_del_work. The second delete operation also finds the tunnel and calls l2tp_tunnel_delete. If the workqueue has already fired and started running l2tp_tunnel_del_work, then l2tp_tunnel_delete will queue the same tunnel a second time, and try to free the socket again. Add a dead flag to prevent firing the workqueue twice. Then we can remove the check of queue_work's result that was meant to prevent that race but doesn't. Reproducer: ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 local 192.168.0.2 remote 192.168.0.1 encap udp udp_sport 5000 udp_dport 6000 ip l2tp add session name l2tp1 tunnel_id 3000 session_id 1000 peer_session_id 2000 ip link set l2tp1 up ip l2tp del tunnel tunnel_id 3000 ip l2tp del tunnel tunnel_id 3000 Fixes: f8ccac0e4493 ("l2tp: put tunnel socket release on a workqueue") Reported-by: Jianlin Shi Signed-off-by: Sabrina Dubroca Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 10 ++++------ net/l2tp/l2tp_core.h | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 36f6ee22d2d66046e369757ec6bbe1c482957ba6 Author: Alexey Kodanev Date: Tue Sep 26 15:14:29 2017 +0300 vti: fix use after free in vti_tunnel_xmit/vti6_tnl_xmit When running LTP IPsec tests, KASan might report: BUG: KASAN: use-after-free in vti_tunnel_xmit+0xeee/0xff0 [ip_vti] Read of size 4 at addr ffff880dc6ad1980 by task swapper/0/0 ... Call Trace: dump_stack+0x63/0x89 print_address_description+0x7c/0x290 kasan_report+0x28d/0x370 ? vti_tunnel_xmit+0xeee/0xff0 [ip_vti] __asan_report_load4_noabort+0x19/0x20 vti_tunnel_xmit+0xeee/0xff0 [ip_vti] ? vti_init_net+0x190/0x190 [ip_vti] ? save_stack_trace+0x1b/0x20 ? save_stack+0x46/0xd0 dev_hard_start_xmit+0x147/0x510 ? icmp_echo.part.24+0x1f0/0x210 __dev_queue_xmit+0x1394/0x1c60 ... Freed by task 0: save_stack_trace+0x1b/0x20 save_stack+0x46/0xd0 kasan_slab_free+0x70/0xc0 kmem_cache_free+0x81/0x1e0 kfree_skbmem+0xb1/0xe0 kfree_skb+0x75/0x170 kfree_skb_list+0x3e/0x60 __dev_queue_xmit+0x1298/0x1c60 dev_queue_xmit+0x10/0x20 neigh_resolve_output+0x3a8/0x740 ip_finish_output2+0x5c0/0xe70 ip_finish_output+0x4ba/0x680 ip_output+0x1c1/0x3a0 xfrm_output_resume+0xc65/0x13d0 xfrm_output+0x1e4/0x380 xfrm4_output_finish+0x5c/0x70 Can be fixed if we get skb->len before dst_output(). Fixes: b9959fd3b0fa ("vti: switch to new ip tunnel code") Fixes: 22e1b23dafa8 ("vti6: Support inter address family tunneling.") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv4/ip_vti.c | 3 ++- net/ipv6/ip6_vti.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 2ba7d7e0437127314864238f8bfcb8369d81075c 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 (cherry picked from commit d27ffc1d00327c29b3aa97f941b42f0949f9e99f) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_bios.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bf5d10dcae3549b779490672c705c6ac79cf68a3 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 (cherry picked from commit 4babc5e27cfda59e2e257d28628b8d853aea5206) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 2 -- 1 file changed, 2 deletions(-) commit 2d8f63297b9f0b430c96329893667c0bfdcbd47e 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 (cherry picked from commit d81fb7fd9436e81fda67e5bc8ed0713aa28d3db2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_audio.c | 5 ----- drivers/gpu/drm/i915/intel_modes.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) commit e88d62cd4b2f0b1ae55e9008e79c2794b1fc914d Author: Mark Rutland Date: Tue Sep 26 12:41:52 2017 +0100 percpu: make this_cpu_generic_read() atomic w.r.t. interrupts As raw_cpu_generic_read() is a plain read from a raw_cpu_ptr() address, it's possible (albeit unlikely) that the compiler will split the access across multiple instructions. In this_cpu_generic_read() we disable preemption but not interrupts before calling raw_cpu_generic_read(). Thus, an interrupt could be taken in the middle of the split load instructions. If a this_cpu_write() or RMW this_cpu_*() op is made to the same variable in the interrupt handling path, this_cpu_read() will return a torn value. For native word types, we can avoid tearing using READ_ONCE(), but this won't work in all cases (e.g. 64-bit types on most 32-bit platforms). This patch reworks this_cpu_generic_read() to use READ_ONCE() where possible, otherwise falling back to disabling interrupts. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Christoph Lameter Cc: Peter Zijlstra Cc: Pranith Kumar Cc: Tejun Heo Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo include/asm-generic/percpu.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 0bc15d85d97d44e8979ff91d0c1fbafe6fd4172c Author: Nickey Yang Date: Tue Sep 26 15:55:22 2017 +0800 arm64: dts: rockchip: add the grf clk for dw-mipi-dsi on rk3399 The clk of grf must be enabled before writing grf register for rk3399. Signed-off-by: Nickey Yang [the grf clock is already part of the binding since march 2017] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c6c592831a09a28428448e68fb08c6bbb8b9b8b Author: Josef Bacik Date: Tue Aug 29 10:11:39 2017 -0400 btrfs: log csums for all modified extents Amir reported a bug discovered by his cleaned up version of my dm-log-writes xfstests where we were missing csums at certain replay points. This is because fsx was doing an msync(), which essentially fsync()'s a specific range of a file. We will log all modified extents, but only search for the checksums in the range we are being asked to sync. We cannot simply log the extents in the range we're being asked because we are logging the inode item as it is currently, which if it has had a i_size update before the msync means we will miss extents when replaying. We could possibly get around this by marking the inode with the transaction that extended the i_size to see if we have this case, but this would be racy and we'd have to lock the whole range of the inode to make sure we didn't have an ordered extent outside of our range that was in the middle of completing. Fix this simply by keeping track of the modified extents range and logging the csums for the entire range of extents that we are logging. This makes the xfstest pass. Reported-by: Amir Goldstein Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/tree-log.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 99c4e3b96c797f047be4e6b7c03cfca01959f146 Author: Liu Bo Date: Fri Sep 15 15:06:51 2017 -0600 Btrfs: fix unexpected result when dio reading corrupted blocks commit 4246a0b63bd8 ("block: add a bi_error field to struct bio") changed the logic of how dio read endio reports errors. For single stripe dio read, %bio->bi_status reflects the error before verifying checksum, and now we're updating it when data block matches with its checksum, while in the mismatching case, %bio->bi_status is not updated to relfect that. When some blocks in a file have been corrupted on disk, reading such a file ends up with 1) checksum errors are reported in kernel log 2) read(2) returns successfully with some content being 0x01. In order to fix it, we need to report its checksum mismatch error to the upper layer (dio layer in this case) as well. Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio") Signed-off-by: Liu Bo Reported-by: Goffredo Baroncelli Tested-by: Goffredo Baroncelli Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 36b96fdc6b2dc6f4a0fedc563fa7508c91b90a10 Author: Sargun Dhillon Date: Sun Sep 17 09:02:29 2017 +0000 btrfs: Report error on removing qgroup if del_qgroup_item fails Previously, we were calling del_qgroup_item, and ignoring the return code resulting in a potential to have divergent in-memory state without an error. Perhaps, it makes sense to handle this error code, and put the filesystem into a read only, or similar state. This patch only adds reporting of the error if the error is fatal, (any error other than qgroup not found). Signed-off-by: Sargun Dhillon Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 2 ++ 1 file changed, 2 insertions(+) commit e6311f240c946788131ba2b97e14f37312688072 Author: Liu Bo Date: Wed Sep 20 17:50:19 2017 -0600 Btrfs: skip checksum when reading compressed data if some IO have failed Currently even if the underlying disk reports failure on IO, compressed read endio still gets to verify checksum and reports it as a checksum error. In fact, if some IO have failed during reading a compressed data extent , there's no way the checksum could match, therefore, we can skip that in order to return error quickly to the upper layer. Please note that we need to do this after recording the failed mirror index so that read-repair in the upper layer's endio can work properly. Signed-off-by: Liu Bo Tested-by: Paul Jones Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cf1167d5c1abf3bc42b2a1562bfa7937c05337e2 Author: Liu Bo Date: Wed Sep 20 17:50:18 2017 -0600 Btrfs: fix kernel oops while reading compressed data The kernel oops happens at kernel BUG at fs/btrfs/extent_io.c:2104! ... RIP: clean_io_failure+0x263/0x2a0 [btrfs] It's showing that read-repair code is using an improper mirror index. This is due to the fact that compression read's endio hasn't recorded the failed mirror index in %cb->orig_bio. With this, btrfs's read-repair can work properly on reading compressed data. Signed-off-by: Liu Bo Reported-by: Paul Jones Tested-by: Paul Jones Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bd7d63c2ceaf737eeb21630a2b62fc5fe34dba29 Author: Liu Bo Date: Tue Sep 19 17:50:09 2017 -0600 Btrfs: use btrfs_op instead of bio_op in __btrfs_map_block This seems to be a leftover of commit cf8cddd38bab ("btrfs: don't abuse REQ_OP_* flags for btrfs_map_block"). It should use btrfs_op() helper to provide one of 'enum btrfs_map_op' types. Fixes: cf8cddd38bab ("btrfs: don't abuse REQ_OP_* flags for btrfs_map_block") Signed-off-by: Liu Bo Reviewed-by: Satoru Takeuchi Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fed3b381145e2e7c66b0b3f640851e1633ebd07f Author: Liu Bo Date: Wed Sep 13 12:25:21 2017 -0600 Btrfs: do not backup tree roots when fsync It doesn't make sense to backup tree roots when doing fsync, since during fsync those tree roots have not been consistent on disk. Signed-off-by: Liu Bo Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c2faff790ccd11ea5be8e3ca99713f116fcd6030 Author: Misono, Tomohiro Date: Wed Aug 30 16:33:16 2017 +0900 btrfs: remove BTRFS_FS_QUOTA_DISABLING flag Currently, "btrfs quota enable" would fail after "btrfs quota disable" on the first time with syslog output "qgroup_rescan_init failed with -22", but it would succeed on the second time. When "quota disable" is called, BTRFS_FS_QUOTA_DISABLING flag bit will be set in fs_info->flags in btrfs_quota_disable(), but it will not be droppd in btrfs_run_qgroups() (which is called in btrfs_commit_transaction()) because quota_root has already been freed. If "quota enable" is called after that, both BTRFS_FS_QUOTA_DISABLING and BTRFS_FS_QUOTA_ENABLED flag would be dropped in the btrfs_run_qgroups() since quota_root is not NULL. This leads to the failure of "quota enable" on the first time. BTRFS_FS_QUOTA_DISABLING flag is not used outside of "quota disable" context and is equivalent to whether quota_root is NULL or not. btrfs_run_qgroups() checks whether quota_root is NULL or not in the first place. So, let's remove BTRFS_FS_QUOTA_DISABLING flag. Signed-off-by: Tomohiro Misono Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/qgroup.c | 4 ---- 2 files changed, 5 deletions(-) commit 78ad4ce014d025f41b8dde3a81876832ead643cf Author: Naohiro Aota Date: Fri Sep 8 17:48:55 2017 +0900 btrfs: propagate error to btrfs_cmp_data_prepare caller btrfs_cmp_data_prepare() (almost) always returns 0 i.e. ignoring errors from gather_extent_pages(). While the pages are freed by btrfs_cmp_data_free(), cmp->num_pages still has > 0. Then, btrfs_extent_same() try to access the already freed pages causing faults (or violates PageLocked assertion). This patch just return the error as is so that the caller stop the process. Signed-off-by: Naohiro Aota Fixes: f441460202cb ("btrfs: fix deadlock with extent-same and readpage") Cc: # 4.2 Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d6d282932d1a609e60dc4467677e0e863682f57 Author: satoru takeuchi Date: Tue Sep 12 22:42:52 2017 +0900 btrfs: prevent to set invalid default subvolid `btrfs sub set-default` succeeds to set an ID which isn't corresponding to any fs/file tree. If such the bad ID is set to a filesystem, we can't mount this filesystem without specifying `subvol` or `subvolid` mount options. Fixes: 6ef5ed0d386b ("Btrfs: add ioctl and incompat flag to set the default mount subvol") Cc: Signed-off-by: Satoru Takeuchi Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit ca6842bf01dc1ad41195eac1e343b4f08c496ba8 Author: Tsutomu Itoh Date: Fri Jan 22 09:13:25 2016 +0900 Btrfs: send: fix error number for unknown inode types ENOTSUPP should not be returned to the user program. (cf. include/linux/errno.h) Therefore, EOPNOTSUPP is used instead of ENOTSUPP. Signed-off-by: Tsutomu Itoh Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb166d7207432d3c7d10c45dc052f12ba3a2121d Author: Naohiro Aota Date: Fri Aug 25 14:15:14 2017 +0900 btrfs: fix NULL pointer dereference from free_reloc_roots() __del_reloc_root should be called before freeing up reloc_root->node. If not, calling __del_reloc_root() dereference reloc_root->node, causing the system BUG. Fixes: 6bdf131fac23 ("Btrfs: don't leak reloc root nodes on error") Cc: # 4.9 Signed-off-by: Naohiro Aota Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67c003f90fd68062d92a7ffade36f9b2a9098bd8 Author: Naohiro Aota Date: Fri Sep 1 17:59:07 2017 +0900 btrfs: finish ordered extent cleaning if no progress is found __endio_write_update_ordered() repeats the search until it reaches the end of the specified range. This works well with direct IO path, because before the function is called, it's ensured that there are ordered extents filling whole the range. It's not the case, however, when it's called from run_delalloc_range(): it is possible to have error in the midle of the loop in e.g. run_delalloc_nocow(), so that there exisits the range not covered by any ordered extents. By cleaning such "uncomplete" range, __endio_write_update_ordered() stucks at offset where there're no ordered extents. Since the ordered extents are created from head to tail, we can stop the search if there are no offset progress. Fixes: 524272607e88 ("btrfs: Handle delalloc error correctly to avoid ordered extent hang") Cc: # 4.12 Signed-off-by: Naohiro Aota Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 63d71450c8d817649a79e37d685523f988b9cc98 Author: Naohiro Aota Date: Fri Sep 1 17:58:47 2017 +0900 btrfs: clear ordered flag on cleaning up ordered extents Commit 524272607e88 ("btrfs: Handle delalloc error correctly to avoid ordered extent hang") introduced btrfs_cleanup_ordered_extents() to cleanup submitted ordered extents. However, it does not clear the ordered bit (Private2) of corresponding pages. Thus, the following BUG occurs from free_pages_check_bad() (on btrfs/125 with nospace_cache). BUG: Bad page state in process btrfs pfn:3fa787 page:ffffdf2acfe9e1c0 count:0 mapcount:0 mapping: (null) index:0xd flags: 0x8000000000002008(uptodate|private_2) raw: 8000000000002008 0000000000000000 000000000000000d 00000000ffffffff raw: ffffdf2acf5c1b20 ffffb443802238b0 0000000000000000 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set bad because of flags: 0x2000(private_2) This patch clears the flag same as other places calling btrfs_dec_test_ordered_pending() for every page in the specified range. Fixes: 524272607e88 ("btrfs: Handle delalloc error correctly to avoid ordered extent hang") Cc: # 4.12 Signed-off-by: Naohiro Aota Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bea7eafdbda3ba1d4b2ccb9cca829eefb7989bb9 Author: Omar Sandoval Date: Tue Aug 22 23:46:00 2017 -0700 Btrfs: fix incorrect {node,sector}size endianness from BTRFS_IOC_FS_INFO fs_info->super_copy->{node,sector}size are little-endian, but the ioctl should return the values in native endianness. Use the cached values in btrfs_fs_info instead. Found with sparse. Fixes: 80a773fbfc2d ("btrfs: retrieve more info from FS_INFO ioctl") Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5f14efd3d437205143dcffcf776e0122eae1755a Author: Liu Bo Date: Wed Aug 23 12:15:09 2017 -0600 Btrfs: do not reset bio->bi_ops while writing bio flush_epd_write_bio() sets bio->bi_opf by itself to honor REQ_SYNC, but it's not needed at all since bio->bi_opf has set up properly in both __extent_writepage() and write_one_eb(), and in the case of write_one_eb(), it also sets REQ_META, which we will lose in flush_epd_write_bio(). This remove this unnecessary bio->bi_opf setting. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 --- 1 file changed, 3 deletions(-) commit ff40adf7fbdff96860b1153332c0b1c7bab6e0c1 Author: Liu Bo Date: Thu Aug 24 18:19:48 2017 -0600 Btrfs: use the new helper wbc_to_write_flags This updates btrfs to use the helper wbc_to_write_flags which has been applied in ext4/xfs/f2fs/block. Please note that, with this, btrfs's dirty pages written by a writeback job will carry the flag REQ_BACKGROUND, which is currently used by writeback-throttle to determine whether it should go to get a request or wait. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b621129f4f08c8d42ac4de2e77a07c5cf0c4b740 Author: Vadim Fedorenko Date: Wed Feb 15 16:33:56 2017 +0300 netfilter: ipvs: full-functionality option for ECN encapsulation in tunnel IPVS tunnel mode works as simple tunnel (see RFC 3168) copying ECN field to outer header. That's result in packet drops on egress tunnels in case the egress tunnel operates as ECN-capable with Full-functionality option (like ip_tunnel and ip6_tunnel kernel modules), according to RFC 3168 section 9.1.1 recommendation. This patch implements ECN full-functionality option into ipvs xmit code. Cc: netdev@vger.kernel.org Cc: lvs-devel@vger.kernel.org Signed-off-by: Vadim Fedorenko Reviewed-by: Konstantin Khlebnikov Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_xmit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 26e03d803c8191e906360a0320c05b12d45a37ae Author: Douglas Anderson Date: Fri Sep 22 09:44:04 2017 -0700 phy: rockchip-typec: Don't set the aux voltage swing to 400 mV On rk3399-gru-kevin there are some cases where we're seeing AUX CH failures when trying to do DisplayPort over type C. Problems are intermittent and don't reproduce all the time. Problems are often bursty and failures persist for several seconds before going away. The failure case I focused on is: * A particular type C to HDMI adapter. * One orientation (flip mode) of that adapter. * Easier to see failures when something is plugged into the _other type C port at the same time. * Problems reproduce on both type C ports (left and right side). Ironically problems also stop reproducing when I solder wires onto the AUX CH signals on a port (even if no scope is connected to the signals). In this case, problems only stop reproducing on the port with the wires connected. From the above it appears that something about the signaling on the aux channel is marginal and any slight differences can bring us over the edge to failure. It turns out that we can fix our problems by just increasing the voltage swing of the AUX CH, giving us a bunch of extra margin. In DP up to version 1.2 the voltage swing on the aux channel was specced as .29 V to 1.38 V. In DP version 1.3 the aux channel voltage was tightened to be between .29 V and .40 V, but it clarifies that it really only needs the lower voltage when operating at the highest speed (HBR3 mode). So right now we are trying to use a voltage that technically should be valid for all versions of the spec (including version 1.3 when transmitting at HBR3). That would be great to do if it worked reliably. ...but it doesn't seem to. It turns out that if you continue to read through the DP part of the rk3399 TRM and other parts of the type C PHY spec you'll find out that while the rk3399 does support DP 1.3, it doesn't support HBR3. The docs specifically say "RBR, HBR and HBR2 data rates only". Thus there is actually no requirement to support an AUX CH swing of .4 V. Even if there is no actual requirement to support the tighter voltage swing, one could possibly argue that we should support it anyway. The DP spec clarifies that the lower voltage on the AUX CH will reduce cross talk in some cases and that seems like it could be beneficial even at the lower bit rates. At the moment, though, we are seeing problems with the AUX CH and not on the other lines. Also, checking another known working and similar laptop shows that the other laptop runs the AUX channel at a higher voltage. Other notes: * Looking at measurements done on the AUX CH we weren't actually compliant with the DP 1.3 spec anyway. AUX CH peek-to-peek voltage was measured on rk3399-gru-kevin as .466 V which is > .4 V. * With this new patch the AUX channel isn't actually 1.0 V, but it has been confirmed that the signal is better and has more margin. Eye diagram passes. * If someone were truly an expert in the Type C PHY and in DisplayPort signaling they might be able to make things work and keep the voltage at < .4 V. The Type C PHY seems to have a plethora of tuning knobs that could almost certainly improve the signal integrity. Some of these things (like enabling tx_fcm_full_margin) even seem to fix my problems. However, lacking expertise I can't say whether this is a better or worse solution. Tightening signals to give cleaner waveforms can often have adverse affects, like increasing EMI or adding noise to other signals. I'd rather not tune things like this without a healthy application of expertise that I don't have. Signed-off-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f98b74387551f6d266c044d90e87e4919b25b970 Author: Douglas Anderson Date: Fri Sep 22 09:44:03 2017 -0700 phy: rockchip-typec: Set the AUX channel flip state earlier On some DP monitors we found that setting the wrong flip state on the AUX channel could cause the monitor to stop asserting HotPlug Detect (HPD). Setting the right flip state caused these monitors to start asserting HotPlug Detect again. Here's what we believe was happening: * We'd plug in the monitor and we'd see HPD assert * We'd quickly see HPD deassert * The kernel would try to init the type C PHY but would init it in USB mode (because there was a peripheral there but no HPD) * Because the kernel never set the flip mode properly we'd never see the HPD come back. With this change, we'll still see HPD disappear (we don't think there's anything we can do about that), but then it will come back. Overall we can say that it's sane to set the AUX channel flip state even when HPD is not asserted. NOTE: to make this change possible, I needed to do a bit of cleanup to the tcphy_dp_aux_calibration() function so that it doesn't ever clobber the FLIP state. This made it very obvious that a line of code documented as "setting bit 12" also did a bunch of other magic, undocumented stuff. For now I'll just break out the bits and add a comment that this is black magic and we'll try to document tcphy_dp_aux_calibration() better in a future CL. ALSO NOTE: the old function used to write a bunch of hardcoded values in _some_ cases instead of doing a read-modify-write. One could possibly assert that these could have had (beneficial) side effects and thus with this new code (which always does read-modify-write) we could have a bug. We shouldn't need to worry, though, since in the old code tcphy_dp_aux_calibration() was always called following the de-assertion of "reset" the the type C PHY. ...so the type C PHY was always in default state. TX_ANA_CTRL_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 62 +++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 20 deletions(-) commit c1c7acac0998ffcc9cd81e016a7d1b58b1afbb51 Author: Dan Carpenter Date: Fri Sep 8 13:31:37 2017 +0300 phy: mvebu-cp110: checking for NULL instead of IS_ERR() devm_ioremap_resource() never returns NULL, it only returns error pointers so this test needs to be changed. Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver") Signed-off-by: Dan Carpenter Signed-off-by: Kishon Vijay Abraham I drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17fb745d4acfe52f9ebb1ba2b10f2fcd796fb5ce Author: Antoine Tenart Date: Mon Sep 18 10:04:22 2017 +0200 phy: mvebu-cp110-comphy: explicitly set the pipe selector The pipe selector is used to select some modes (such as USB or PCIe). Otherwise it must be set to 0 (or "unconnected"). This patch does this to ensure it is not set to an incompatible value when using the supported modes (SGMII, 10GKR). Signed-off-by: Antoine Tenart Signed-off-by: Kishon Vijay Abraham I drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit caef3e0b657d091a540232e07e5e5b4648110a52 Author: Antoine Tenart Date: Mon Sep 18 10:04:20 2017 +0200 phy: mvebu-cp110-comphy: fix mux error check The mux value is retrieved from the mvebu_comphy_get_mux() function which returns an int. In mvebu_comphy_power_on() this int is stored to a u32 and a check is made to ensure it's not negative. Which is wrong. This fixes it. Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver") Signed-off-by: Antoine Tenart Signed-off-by: Kishon Vijay Abraham I drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 554a56fc83f679c73b4f851a330045d0ec7ec1a5 Author: Chunfeng Yun Date: Thu Sep 21 18:31:48 2017 +0800 phy: phy-mtk-tphy: fix NULL point of chip bank Chip bank of version-1 is initialized as NULL, but it's used by pcie_phy_instance_power_on/off(), so assign it a right address. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/mediatek/phy-mtk-tphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1df79cb3bae754e4a42240f9851ed82549a44f1a Author: Arvind Yadav Date: Wed Sep 20 12:35:57 2017 +0530 phy: tegra: Handle return value of kasprintf kasprintf() can fail and it's return value must be checked. Signed-off-by: Arvind Yadav Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb.c | 2 ++ 1 file changed, 2 insertions(+) commit d8bd9f3f0925d22726de159531bfe3774b5cacc6 Author: Michael Neuling Date: Fri Sep 22 13:32:21 2017 +1000 powerpc: Handle MCE on POWER9 with only DSISR bit 30 set On POWER9 DD2.1 and below, it's possible for a paste instruction to cause a Machine Check Exception (MCE) where only DSISR bit 30 (IBM 33) is set. This will result in the MCE handler seeing an unknown event, which triggers linux to crash. We change this by detecting unknown events caused by load/stores in the MCE handler and marking them as handled so that we no longer crash. An MCE that occurs like this is spurious, so we don't need to do anything in terms of servicing it. If there is something that needs to be serviced, the CPU will raise the MCE again with the correct DSISR so that it can be serviced properly. Signed-off-by: Michael Neuling Reviewed-by: Nicholas Piggin [mpe: Expand comment with details from change log, use normal bit #s] Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a98c75fcd0ec02623f4f56d824d76e659410a52b Author: Thierry Reding Date: Wed Aug 23 19:13:26 2017 +0200 drm/tegra: trace: Fix path to include The TRACE_INCLUDE_FILE macro needs to specify the path relative to the define_trace.h header rather than relative to the file defining it. Reported-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170823171326.23620-1-thierry.reding@gmail.com drivers/gpu/drm/tegra/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8474c532b558fb6754c0ddff42a39ed6636671c9 Merge: e365806 738f48c Author: Ingo Molnar Date: Tue Sep 26 10:17:43 2017 +0200 Merge branch 'WIP.x86/fpu' into x86/fpu, because it's ready Signed-off-by: Ingo Molnar commit 738f48cb5fdd5878d11934f1898aa2bcf1578289 Author: Eric Biggers Date: Sun Sep 24 12:59:13 2017 +0200 x86/fpu: Use using_compacted_format() instead of open coded X86_FEATURE_XSAVES This is the canonical method to use. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-11-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/regset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98c0fad9d60e8b2cd47e15b7bee7df343648f5bb Author: Eric Biggers Date: Sun Sep 24 12:59:12 2017 +0200 x86/fpu: Use validate_xstate_header() to validate the xstate_header in copy_user_to_xstate() Tighten the checks in copy_user_to_xstate(). Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-10-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 3d703477bcfe8bb57079d97198cf1e342fe1fef9 Author: Eric Biggers Date: Sun Sep 24 12:59:11 2017 +0200 x86/fpu: Eliminate the 'xfeatures' local variable in copy_user_to_xstate() We now have this field in hdr.xfeatures. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-9-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit af2c4322d986a08a6e793b74b83a62b325019c20 Author: Eric Biggers Date: Sun Sep 24 12:59:10 2017 +0200 x86/fpu: Copy the full header in copy_user_to_xstate() This is in preparation to verify the full xstate header as supplied by user-space. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-8-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit af95774b3ca080b0e1e651c0fc7680f3444ddda7 Author: Eric Biggers Date: Sun Sep 24 12:59:09 2017 +0200 x86/fpu: Use validate_xstate_header() to validate the xstate_header in copy_kernel_to_xstate() Tighten the checks in copy_kernel_to_xstate(). Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-7-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit b89eda482d7849a1c146b6d0a42f4e76369bb08e Author: Eric Biggers Date: Sun Sep 24 12:59:08 2017 +0200 x86/fpu: Eliminate the 'xfeatures' local variable in copy_kernel_to_xstate() We have this information in the xstate_header. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-6-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 80d8ae86b36791a545ca28ddc95133ea59bba6e0 Author: Eric Biggers Date: Sun Sep 24 12:59:07 2017 +0200 x86/fpu: Copy the full state_header in copy_kernel_to_xstate() This is in preparation to verify the full xstate header as supplied by user-space. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-5-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b11e2e18a7fc8eaa3d592c260d50c7129e094ded Author: Eric Biggers Date: Sun Sep 24 12:59:06 2017 +0200 x86/fpu: Use validate_xstate_header() to validate the xstate_header in __fpu__restore_sig() Tighten the checks in __fpu__restore_sig() and update comments. Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-4-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/signal.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit cf9df81b139b6ebaec188d73758f02ca3b2110e4 Author: Eric Biggers Date: Sun Sep 24 12:59:05 2017 +0200 x86/fpu: Use validate_xstate_header() to validate the xstate_header in xstateregs_set() Tighten the checks in xstateregs_set(). Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-3-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/regset.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit e63e5d5c15c6b1dba26f7cbd1b1089a1d6155db5 Author: Eric Biggers Date: Sun Sep 24 12:59:04 2017 +0200 x86/fpu: Introduce validate_xstate_header() Move validation of user-supplied xstate_header into a helper function, in preparation of calling it from both the ptrace and sigreturn syscall paths. The new function also considers it to be an error if *any* reserved bits are set, whereas before we were just clearing most of them silently. This should reduce the chance of bugs that fail to correctly validate user-supplied XSAVE areas. It also will expose any broken userspace programs that set the other reserved bits; this is desirable because such programs will lose compatibility with future CPUs and kernels if those bits are ever used for anything. (There shouldn't be any such programs, and in fact in the case where the compacted format is in use we were already validating xfeatures. But you never know...) Signed-off-by: Eric Biggers Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kees Cook Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170924105913.9157-2-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 ++++ arch/x86/kernel/fpu/xstate.c | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 369a036de206710ff27a66f9bffe78ef657648c3 Author: Ingo Molnar Date: Sat Sep 23 13:37:45 2017 +0200 x86/fpu: Rename fpu__activate_fpstate_read/write() to fpu__prepare_[read|write]() As per the new nomenclature we don't 'activate' the FPU state anymore, we initialize it. So drop the _activate_fpstate name from these functions, which were a bit of a mouthful anyway, and name them: fpu__prepare_read() fpu__prepare_write() Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 4 ++-- arch/x86/kernel/fpu/core.c | 4 ++-- arch/x86/kernel/fpu/regset.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit 2ce03d850b9a2f17d55596ecfa86e72b5687a627 Author: Ingo Molnar Date: Sat Sep 23 15:00:15 2017 +0200 x86/fpu: Rename fpu__activate_curr() to fpu__initialize() Rename this function to better express that it's all about initializing the FPU state of a task which goes hand in hand with the fpu::initialized field. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-33-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 2 +- arch/x86/kernel/fpu/core.c | 8 ++++---- arch/x86/kernel/fpu/signal.c | 2 +- arch/x86/kvm/x86.c | 2 +- arch/x86/math-emu/fpu_entry.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit e10078eba69859359ce8644dd423b4132a6a8913 Author: Ingo Molnar Date: Sat Sep 23 15:00:14 2017 +0200 x86/fpu: Simplify and speed up fpu__copy() fpu__copy() has a preempt_disable()/enable() pair, which it had to do to be able to atomically unlazy the current task when doing an FNSAVE. But we don't unlazy tasks anymore, we always do direct saves/restores of FPU context. So remove both the unnecessary critical section, and update the comments. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-32-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 7f1487c59b7c6dcb20155f4302985da2659a2997 Author: Ingo Molnar Date: Sat Sep 23 15:00:13 2017 +0200 x86/fpu: Fix stale comments about lazy FPU logic We don't do any lazy restore anymore, what we have are two pieces of optimization: - no-FPU tasks that don't save/restore the FPU context (kernel threads are such) - cached FPU registers maintained via the fpu->last_cpu field. This means that if an FPU task context switches to a non-FPU task then we can maintain the FPU registers as an in-FPU copies (cache), and skip the restoration of them once we switch back to the original FPU-using task. Update all the comments that still referred to old 'lazy' and 'unlazy' concepts. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-31-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e4a81bfcaae1ebbdc6efe74e8ea563144d90e9a9 Author: Ingo Molnar Date: Tue Sep 26 09:43:36 2017 +0200 x86/fpu: Rename fpu::fpstate_active to fpu::initialized The x86 FPU code used to have a complex state machine where both the FPU registers and the FPU state context could be 'active' (or inactive) independently of each other - which enabled features like lazy FPU restore. Much of this complexity is gone in the current code: now we basically can have FPU-less tasks (kernel threads) that don't use (and save/restore) FPU state at all, plus full FPU users that save/restore directly with no laziness whatsoever. But the fpu::fpstate_active still carries bits of the old complexity - meanwhile this flag has become a simple flag that shows whether the FPU context saving area in the thread struct is initialized and used, or not. Rename it to fpu::initialized to express this simplicity in the name as well. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-30-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/ia32/ia32_signal.c | 2 +- arch/x86/include/asm/fpu/internal.h | 4 ++-- arch/x86/include/asm/fpu/types.h | 6 +++--- arch/x86/include/asm/trace/fpu.h | 8 ++++---- arch/x86/kernel/fpu/core.c | 24 ++++++++++++------------ arch/x86/kernel/fpu/init.c | 2 +- arch/x86/kernel/fpu/regset.c | 6 +++--- arch/x86/kernel/fpu/signal.c | 8 ++++---- arch/x86/kernel/fpu/xstate.c | 2 +- arch/x86/kernel/signal.c | 6 +++--- arch/x86/mm/pkeys.c | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) commit 685c930d6e58e31e251ec354f9dca3958a4c5040 Author: Ingo Molnar Date: Sat Sep 23 15:00:11 2017 +0200 x86/fpu: Remove fpu__current_fpstate_write_begin/end() These functions are not used anymore, so remove them. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Bobby Powers Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-29-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 2 -- arch/x86/kernel/fpu/core.c | 63 ------------------------------------- 2 files changed, 65 deletions(-) commit 4618e90965f272fe522f2af2523a60d0d4bc78f3 Author: Ingo Molnar Date: Sat Sep 23 15:00:10 2017 +0200 x86/fpu: Fix fpu__activate_fpstate_read() and update comments fpu__activate_fpstate_read() can be called for the current task when coredumping - or for stopped tasks when ptrace-ing. Implement this properly in the code and update the comments. This also fixes an incorrect (but harmless) warning introduced by one of the earlier patches. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-28-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit b4391db42308c9940944b5d7be5ca4b78fb88dd0 Author: Arnd Bergmann Date: Fri Sep 22 23:29:19 2017 +0200 netlink: fix nla_put_{u8,u16,u32} for KASAN When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN=y"). The kernelci.org build bot however has the warning enabled and that led me to investigate it a little further, as every build produces these warnings: net/wireless/nl80211.c:4389:1: warning: the frame size of 2240 bytes is larger than 2048 bytes [-Wframe-larger-than=] net/wireless/nl80211.c:1895:1: warning: the frame size of 3776 bytes is larger than 2048 bytes [-Wframe-larger-than=] net/wireless/nl80211.c:1410:1: warning: the frame size of 2208 bytes is larger than 2048 bytes [-Wframe-larger-than=] net/bridge/br_netlink.c:1282:1: warning: the frame size of 2544 bytes is larger than 2048 bytes [-Wframe-larger-than=] Most of this problem is now solved in gcc-8, which can consolidate the stack slots for the inline function arguments. On older compilers we can add a workaround by declaring a local variable in each function to pass the inline function argument. Cc: stable@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller include/net/netlink.h | 73 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 18 deletions(-) commit 6098d7ddd62f532f80ee2a4b01aca500a8e4e9e4 Author: Arnd Bergmann Date: Fri Sep 22 23:29:18 2017 +0200 rocker: fix rocker_tlv_put_* functions for KASAN Inlining these functions creates lots of stack variables that each take 64 bytes when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1: error: the frame size of 2752 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] gcc-8 can now consolidate the stack slots itself, but on older versions we get the same behavior by using a temporary variable that holds a copy of the inline function argument. Cc: stable@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_tlv.h | 48 ++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 18 deletions(-) commit f091fb8c344ce13cbf058d304c6cbb042be97058 Author: Hannes Reinecke Date: Mon Sep 25 13:47:23 2017 +0200 scsi: scsi_transport_fc: Also check for NOTPRESENT in fc_remote_port_add() During failover there is a small race window between fc_remote_port_add() and fc_timeout_deleted_rport(); the latter drops the lock after setting the port to NOTPRESENT, so if fc_remote_port_add() is called right at that time it will fail to detect the existing rport and happily adding a new structure, causing rports to get registered twice. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e365806ac289457263a133bd32df8df49897f612 Merge: 19240e6 b776e4b Author: Linus Torvalds Date: Mon Sep 25 18:24:14 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat fix from Al Viro: "I really wish gcc warned about conversions from pointer to function into void *..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix a typo in put_compat_shm_info() commit 60915f83cd1e021a66fc1503a446aef5c772553a Author: Colin Ian King Date: Mon Sep 18 13:38:46 2017 -0700 xfs: remove redundant re-initialization of total_nr_pages Variable total_nr_pages is being initialized and then updated with the same value, this latter assignment is redundant and can be removed. Cleans up clang build warning: Value stored to 'total_nr_pages' during its initialization is never read Signed-off-by: Colin Ian King Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 2 -- 1 file changed, 2 deletions(-) commit 1e6fa688bffc0ff419a4c3e78dbaf7aabfb55183 Author: Kenjiro Nakayama Date: Mon Sep 18 12:03:56 2017 -0700 xfs: Output warning message when discard option was enabled even though the device does not support discard In order to using discard function, it is necessary that not only xfs is mounted with discard option, but also the discard function is supported by the device. Current code doesn't output any message when users mount with discard option on unsupported device, so it is difficult to notice that it was not enabled actually. This patch adds the warning message to notice that discard option is not enabled due to unsupported device when the filesystem is mounted. Changes in v2 (Suggested by Brian Foster): - Move the unsupported device check into xfs_fs_fill_super(). - Clear the discard flag when device is unsupported. Signed-off-by: Kenjiro Nakayama Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_super.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d20a5e3851969fa685f118a80e4df670255a4e8d Author: Eryu Guan Date: Mon Sep 18 11:39:23 2017 -0700 xfs: report zeroed or not correctly in xfs_zero_range() The 'did_zero' param of xfs_zero_range() was not passed to iomap_zero_range() correctly. This was introduced by commit 7bb41db3ea16 ("xfs: handle 64-bit length in xfs_iozero"), and found by code inspection. Signed-off-by: Eryu Guan Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64671bafbdd984535aa382bccadd91fbe7be0e80 Author: Eryu Guan Date: Mon Sep 18 11:38:58 2017 -0700 xfs: kill meaningless variable 'zero' In xfs_file_aio_write_checks(), variable 'zero' is there only to satisfy xfs_zero_eof(), the result of it is ignored. Now, with iomap_zero_range() based xfs_zero_eof(), we can safely pass NULL as the last param of it and kill 'zero'. Signed-off-by: Eryu Guan Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e150dcd459e1b441eaf08f341a986f04e61bf3b8 Author: Helge Deller Date: Mon Sep 18 11:34:16 2017 -0700 fs/xfs: 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 Reviewed-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 3af423b03435c81036fa710623d3ae92fbe346a3 Author: Darrick J. Wong Date: Mon Sep 18 09:41:17 2017 -0700 xfs: evict CoW fork extents when performing finsert/fcollapse When we perform an finsert/fcollapse operation, cancel all the CoW extents for the affected file offset range so that they don't end up pointing to the wrong blocks. Reported-by: Amir Goldstein Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit cc6f77710a6de6210f9feda7cd53e2f5ee7a7e69 Author: Darrick J. Wong Date: Mon Sep 18 09:41:16 2017 -0700 xfs: don't unconditionally clear the reflink flag on zero-block files If we have speculative cow preallocations hanging around in the cow fork, don't let a truncate operation clear the reflink flag because if we do then there's a chance we'll forget to free those extents when we destroy the incore inode. Reported-by: Amir Goldstein Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b776e4b1a990045a7c70798f1f353c3160c26594 Author: Al Viro Date: Mon Sep 25 20:38:45 2017 -0400 fix a typo in put_compat_shm_info() "uip" misspelled as "up"; unfortunately, the latter happens to be a function and gcc is happy to convert it to void *... Signed-off-by: Al Viro ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9561475db680f7144d2223a409dd3d7e322aca03 Author: Nicolai Stange Date: Mon Sep 11 09:45:40 2017 +0200 PCI: Fix race condition with driver_override The driver_override implementation is susceptible to a race condition when different threads are reading vs. storing a different driver override. Add locking to avoid the race condition. This is in close analogy to commit 6265539776a0 ("driver core: platform: fix race condition with driver_override") from Adrian Salido. Fixes: 782a985d7af2 ("PCI: Introduce new device binding path using pci_dev.driver_override") Signed-off-by: Nicolai Stange Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v3.16+ drivers/pci/pci-sysfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a93ad944f4ff9a797abff17c73fc4b1e4a1d9141 Author: Timur Tabi Date: Fri Sep 22 15:32:44 2017 -0500 net: qcom/emac: specify the correct size when mapping a DMA buffer When mapping the RX DMA buffers, the driver was accidentally specifying zero for the buffer length. Under normal circumstances, SWIOTLB does not need to allocate a bounce buffer, so the address is just mapped without checking the size field. This is why the error was not detected earlier. Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver") Cc: stable@vger.kernel.org Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d477bf3af1e88fe27c893f84136647fe11963198 Author: Suniel Mahesh Date: Thu Sep 21 19:09:03 2017 +0530 cpufreq: dt: Fix sysfs duplicate filename creation for platform-device ti-cpufreq and cpufreq-dt-platdev drivers are registering platform-device with same name "cpufreq-dt" using platform_device_register_*() routines. This is leading to build warnings appended below. Providing hardware information to OPP framework along with the platform- device creation should be done by ti-cpufreq driver before cpufreq-dt driver comes into place. This patch add's TI am33xx, am43 and dra7 platforms (which use opp-v2 property) to the blacklist of devices in cpufreq-dt-platform driver to avoid creating platform-device twice and remove build warnings. [ 2.370167] ------------[ cut here ]------------ [ 2.375087] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x58/0x78 [ 2.383112] sysfs: cannot create duplicate filename '/devices/platform/cpufreq-dt' [ 2.391219] Modules linked in: [ 2.394506] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-next-20170912 #1 [ 2.402006] Hardware name: Generic AM33XX (Flattened Device Tree) [ 2.408437] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.416568] [] (show_stack) from [] (dump_stack+0xac/0xe0) [ 2.424165] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 2.431488] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) [ 2.439351] [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x58/0x78) [ 2.447938] [] (sysfs_warn_dup) from [] (sysfs_create_dir_ns+0x80/0x98) [ 2.456719] [] (sysfs_create_dir_ns) from [] (kobject_add_internal+0x9c/0x2d4) [ 2.466124] [] (kobject_add_internal) from [] (kobject_add+0x4c/0x9c) [ 2.474712] [] (kobject_add) from [] (device_add+0xcc/0x57c) [ 2.482489] [] (device_add) from [] (platform_device_add+0x100/0x220) [ 2.491085] [] (platform_device_add) from [] (platform_device_register_full+0xf4/0x118) [ 2.501305] [] (platform_device_register_full) from [] (ti_cpufreq_init+0x150/0x22c) [ 2.511253] [] (ti_cpufreq_init) from [] (do_one_initcall+0x3c/0x170) [ 2.519838] [] (do_one_initcall) from [] (kernel_init_freeable+0x1fc/0x2c4) [ 2.528974] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x110) [ 2.537565] [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) [ 2.545981] ---[ end trace 2fc00e213c13ab20 ]--- [ 2.551051] ------------[ cut here ]------------ [ 2.555931] WARNING: CPU: 0 PID: 1 at lib/kobject.c:240 kobject_add_internal+0x254/0x2d4 [ 2.564578] kobject_add_internal failed for cpufreq-dt with -EEXIST, don't try to register things with the same name in the same directory. [ 2.577977] Modules linked in: [ 2.581261] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.13.0-next-20170912 #1 [ 2.590013] Hardware name: Generic AM33XX (Flattened Device Tree) [ 2.596437] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.604573] [] (show_stack) from [] (dump_stack+0xac/0xe0) [ 2.612172] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 2.619494] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) [ 2.627362] [] (warn_slowpath_fmt) from [] (kobject_add_internal+0x254/0x2d4) [ 2.636666] [] (kobject_add_internal) from [] (kobject_add+0x4c/0x9c) [ 2.645255] [] (kobject_add) from [] (device_add+0xcc/0x57c) [ 2.653027] [] (device_add) from [] (platform_device_add+0x100/0x220) [ 2.661615] [] (platform_device_add) from [] (platform_device_register_full+0xf4/0x118) [ 2.671833] [] (platform_device_register_full) from [] (ti_cpufreq_init+0x150/0x22c) [ 2.681779] [] (ti_cpufreq_init) from [] (do_one_initcall+0x3c/0x170) [ 2.690377] [] (do_one_initcall) from [] (kernel_init_freeable+0x1fc/0x2c4) [ 2.699510] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x110) [ 2.708106] [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) [ 2.716217] ---[ end trace 2fc00e213c13ab21 ]--- Fixes: edeec420de24 (cpufreq: dt-cpufreq: platdev Automatically create device with OPP v2) Signed-off-by: Suniel Mahesh Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 675195d0be27391d48d8d23c7c62991505168528 Author: Hannes Reinecke Date: Wed Sep 20 08:58:53 2017 +0200 scsi: scsi_transport_fc: set scsi_target_id upon rescan When an rport is found in the bindings array there is no guarantee that it had been a target port, so we need to call fc_remote_port_rolechg() here to ensure the scsi_target_id is set correctly. Otherwise the port will never be scanned. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 19240e6b2a6c456d1c2975400a04b6b01f957cf0 Merge: 1776364 fddc992 Author: Linus Torvalds Date: Mon Sep 25 15:46:04 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Two sets of NVMe pull requests from Christoph: - Fixes for the Fibre Channel host/target to fix spec compliance - Allow a zero keep alive timeout - Make the debug printk for broken SGLs work better - Fix queue zeroing during initialization - Set of RDMA and FC fixes - Target div-by-zero fix - bsg double-free fix. - ndb unknown ioctl fix from Josef. - Buffered vs O_DIRECT page cache inconsistency fix. Has been floating around for a long time, well reviewed. From Lukas. - brd overflow fix from Mikulas. - Fix for a loop regression in this merge window, where using a union for two members of the loop_cmd turned out to be a really bad idea. From Omar. - Fix for an iostat regression fix in this series, using the wrong API to get at the block queue. From Shaohua. - Fix for a potential blktrace delection deadlock. From Waiman. * 'for-linus' of git://git.kernel.dk/linux-block: (30 commits) nvme-fcloop: fix port deletes and callbacks nvmet-fc: sync header templates with comments nvmet-fc: ensure target queue id within range. nvmet-fc: on port remove call put outside lock nvme-rdma: don't fully stop the controller in error recovery nvme-rdma: give up reconnect if state change fails nvme-core: Use nvme_wq to queue async events and fw activation nvme: fix sqhd reference when admin queue connect fails block: fix a crash caused by wrong API fs: Fix page cache inconsistency when mixing buffered and AIO DIO nvmet: implement valid sqhd values in completions nvme-fabrics: Allow 0 as KATO value nvme: allow timed-out ios to retry nvme: stop aer posting if controller state not live nvme-pci: Print invalid SGL only once nvme-pci: initialize queue memory before interrupts nvmet-fc: fix failing max io queue connections nvme-fc: use transport-specific sgl format nvme: add transport SGL definitions nvme.h: remove FC transport-specific error values ... commit e4d8ae00169f7686e1da5a62e5cf797d12bf8822 Author: Viresh Kumar Date: Thu Sep 21 10:44:36 2017 -0700 PM / OPP: Call notifier without holding opp_table->lock The notifier callbacks may want to call some OPP helper routines which may try to take the same opp_table->lock again and cause a deadlock. One such usecase was reported by Chanwoo Choi, where calling dev_pm_opp_disable() leads us to the devfreq's OPP notifier handler, which further calls dev_pm_opp_find_freq_floor() and it deadlocks. We don't really need the opp_table->lock to be held across the notifier call though, all we want to make sure is that the 'opp' doesn't get freed while being used from within the notifier chain. We can do it with help of dev_pm_opp_get/put() as well. Let's do it. Cc: 4.11+ # 4.11+ Fixes: 5b650b388844 "PM / OPP: Take kref from _find_opp_table()" Reported-by: Chanwoo Choi Tested-by: Chanwoo Choi Reviewed-by: Stephen Boyd Reviewed-by: Chanwoo Choi Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 17763641ff8a189bc6fb1fcd5c2a9844ee0dd89c Merge: cf03461 1020165 Author: Linus Torvalds Date: Mon Sep 25 15:41:56 2017 -0700 Merge tag 'gfs2-for-linus-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Bob Peterson: "GFS2: Fix an old regression in GFS2's debugfs interface This fixes a regression introduced by commit 88ffbf3e037e ("GFS2: Use resizable hash table for glocks"). The regression caused the glock dump in debugfs to not report all the glocks, which makes debugging extremely difficult" * tag 'gfs2-for-linus-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix debugfs glocks dump commit cf0346161ccd3642defedeb4850a6c33406e56d6 Merge: ac0a364 428dbf1 Author: Linus Torvalds Date: Mon Sep 25 15:37:19 2017 -0700 Merge tag 'microblaze-4.14-rc3' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze fixes from Michal Simek: - Kbuild fix - use vma_pages - setup default little endians * tag 'microblaze-4.14-rc3' of git://git.monstr.eu/linux-2.6-microblaze: arch: change default endian for microblaze microblaze: Cocci spatch "vma_pages" microblaze: Add missing kvm_para.h to Kbuild commit 428490e38b2e352812e0b765d8bceafab0ec441d Author: Jason A. Donenfeld Date: Wed Sep 20 16:58:39 2017 +0200 security/keys: rewrite all of big_key crypto This started out as just replacing the use of crypto/rng with get_random_bytes_wait, so that we wouldn't use bad randomness at boot time. But, upon looking further, it appears that there were even deeper underlying cryptographic problems, and that this seems to have been committed with very little crypto review. So, I rewrote the whole thing, trying to keep to the conventions introduced by the previous author, to fix these cryptographic flaws. It makes no sense to seed crypto/rng at boot time and then keep using it like this, when in fact there's already get_random_bytes_wait, which can ensure there's enough entropy and be a much more standard way of generating keys. Since this sensitive material is being stored untrusted, using ECB and no authentication is simply not okay at all. I find it surprising and a bit horrifying that this code even made it past basic crypto review, which perhaps points to some larger issues. This patch moves from using AES-ECB to using AES-GCM. Since keys are uniquely generated each time, we can set the nonce to zero. There was also a race condition in which the same key would be reused at the same time in different threads. A mutex fixes this issue now. So, to summarize, this commit fixes the following vulnerabilities: * Low entropy key generation, allowing an attacker to potentially guess or predict keys. * Unauthenticated encryption, allowing an attacker to modify the cipher text in particular ways in order to manipulate the plaintext, which is is even more frightening considering the next point. * Use of ECB mode, allowing an attacker to trivially swap blocks or compare identical plaintext blocks. * Key re-use. * Faulty memory zeroing. Signed-off-by: Jason A. Donenfeld Reviewed-by: Eric Biggers Signed-off-by: David Howells Cc: Herbert Xu Cc: Kirill Marinushkin Cc: security@kernel.org Cc: stable@vger.kernel.org security/keys/Kconfig | 4 +- security/keys/big_key.c | 127 ++++++++++++++++++++++-------------------------- 2 files changed, 60 insertions(+), 71 deletions(-) commit 910801809b2e40a4baedd080ef5d80b4a180e70e Author: Jason A. Donenfeld Date: Wed Sep 20 16:58:38 2017 +0200 security/keys: properly zero out sensitive key material in big_key Error paths forgot to zero out sensitive material, so this patch changes some kfrees into a kzfrees. Signed-off-by: Jason A. Donenfeld Signed-off-by: David Howells Reviewed-by: Eric Biggers Cc: Herbert Xu Cc: Kirill Marinushkin Cc: security@kernel.org Cc: stable@vger.kernel.org security/keys/big_key.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ac0a36461f5316ad98e8d7dd7d1cdaf000256a9b Merge: e19b205 15516c8 Author: Linus Torvalds Date: Mon Sep 25 15:22:31 2017 -0700 Merge tag 'trace-v4.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Stack tracing and RCU has been having issues with each other and lockdep has been pointing out constant problems. The changes have been going into the stack tracer, but it has been discovered that the problem isn't with the stack tracer itself, but it is with calling save_stack_trace() from within the internals of RCU. The stack tracer is the one that can trigger the issue the easiest, but examining the problem further, it could also happen from a WARN() in the wrong place, or even if an NMI happened in this area and it did an rcu_read_lock(). The critical area is where RCU is not watching. Which can happen while going to and from idle, or bringing up or taking down a CPU. The final fix was to put the protection in kernel_text_address() as it is the one that requires RCU to be watching while doing the stack trace. To make this work properly, Paul had to allow rcu_irq_enter() happen after rcu_nmi_enter(). This should have been done anyway, since an NMI can page fault (reading vmalloc area), and a page fault triggers rcu_irq_enter(). One patch is just a consolidation of code so that the fix only needed to be done in one location" * tag 'trace-v4.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Remove RCU work arounds from stack tracer extable: Enable RCU if it is not watching in kernel_text_address() extable: Consolidate *kernel_text_address() functions rcu: Allow for page faults in NMI handlers commit 016576d531c1923f604a0f8410312c39e25b26a1 Merge: 5c34652 b228a94 Author: David S. Miller Date: Mon Sep 25 14:44:41 2017 -0700 Merge branch 'l2tp-fix-some-races-in-session-deletion' Guillaume Nault says: ==================== l2tp: fix some races in session deletion L2TP provides several interfaces for deleting sessions. Using two of them concurrently can lead to use-after-free bugs. Patch #2 uses a flag to prevent double removal of L2TP sessions. Patch #1 fixes a bug found in the way. Fixing this bug is also necessary for patch #2 to handle all cases. This issue is similar to the tunnel deletion bug being worked on by Sabrina: https://patchwork.ozlabs.org/patch/814173/ ==================== Signed-off-by: David S. Miller commit b228a94066406b6c456321d69643b0d7ce11cfa6 Author: Guillaume Nault Date: Fri Sep 22 15:39:24 2017 +0200 l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall() There are several ways to remove L2TP sessions: * deleting a session explicitly using the netlink interface (with L2TP_CMD_SESSION_DELETE), * deleting the session's parent tunnel (either by closing the tunnel's file descriptor or using the netlink interface), * closing the PPPOL2TP file descriptor of a PPP pseudo-wire. In some cases, when these methods are used concurrently on the same session, the session can be removed twice, leading to use-after-free bugs. This patch adds a 'dead' flag, used by l2tp_session_delete() and l2tp_tunnel_closeall() to prevent them from stepping on each other's toes. The session deletion path used when closing a PPPOL2TP file descriptor doesn't need to be adapted. It already has to ensure that a session remains valid for the lifetime of its PPPOL2TP file descriptor. So it takes an extra reference on the session in the ->session_close() callback (pppol2tp_session_close()), which is eventually dropped in the ->sk_destruct() callback of the PPPOL2TP socket (pppol2tp_session_destruct()). Still, __l2tp_session_unhash() and l2tp_session_queue_purge() can be called twice and even concurrently for a given session, but thanks to proper locking and re-initialisation of list fields, this is not an issue. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 6 ++++++ net/l2tp/l2tp_core.h | 1 + 2 files changed, 7 insertions(+) commit cdd10c9627496ad25c87ce6394e29752253c69d3 Author: Guillaume Nault Date: Fri Sep 22 15:39:23 2017 +0200 l2tp: ensure sessions are freed after their PPPOL2TP socket If l2tp_tunnel_delete() or l2tp_tunnel_closeall() deletes a session right after pppol2tp_release() orphaned its socket, then the 'sock' variable of the pppol2tp_session_close() callback is NULL. Yet the session is still used by pppol2tp_release(). Therefore we need to take an extra reference in any case, to prevent l2tp_tunnel_delete() or l2tp_tunnel_closeall() from freeing the session. Since the pppol2tp_session_close() callback is only set if the session is associated to a PPPOL2TP socket and that both l2tp_tunnel_delete() and l2tp_tunnel_closeall() hold the PPPOL2TP socket before calling pppol2tp_session_close(), we're sure that pppol2tp_session_close() and pppol2tp_session_destruct() are paired and called in the right order. So the reference taken by the former will be released by the later. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f61dfff2f5b9fcb087bf5c444bc44b444709588f Author: Geert Uytterhoeven Date: Wed Jul 5 10:14:59 2017 +0200 iio: pressure: zpa2326: Remove always-true check which confuses gcc With gcc 4.1.2: drivers/iio/pressure/zpa2326.c: In function ‘zpa2326_wait_oneshot_completion’: drivers/iio/pressure/zpa2326.c:868: warning: ‘ret’ may be used uninitialized in this function When testing for "timeout < 0", timeout is already guaranteed to be strict negative, so the branch is always taken, and ret is thus always initialized. But (some version of) gcc is not smart enough to notice. Remove the check to fix this. As there is no other code in between assigning the error codes and returning them, the error codes can be returned immediately, and the intermediate variable can be dropped. Drop the "else" to please checkpatch. Fixes: e7215fe4d51e69c9 ("iio: pressure: zpa2326: report interrupted case as failure") Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron drivers/iio/pressure/zpa2326.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 1db49484f21ed0fcdadd0635a3669f5f386546fa Author: Peter Zijlstra Date: Wed Sep 20 19:00:21 2017 +0200 smp/hotplug: Hotplug state fail injection Add a sysfs file to one-time fail a specific state. This can be used to test the state rollback code paths. Something like this (hotplug-up.sh): #!/bin/bash echo 0 > /debug/sched_debug echo 1 > /debug/tracing/events/cpuhp/enable ALL_STATES=`cat /sys/devices/system/cpu/hotplug/states | cut -d':' -f1` STATES=${1:-$ALL_STATES} for state in $STATES do echo 0 > /sys/devices/system/cpu/cpu1/online echo 0 > /debug/tracing/trace echo Fail state: $state echo $state > /sys/devices/system/cpu/cpu1/hotplug/fail cat /sys/devices/system/cpu/cpu1/hotplug/fail echo 1 > /sys/devices/system/cpu/cpu1/online cat /debug/tracing/trace > hotfail-${state}.trace sleep 1 done Can be used to test for all possible rollback (barring multi-instance) scenarios on CPU-up, CPU-down is a trivial modification of the above. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Cc: max.byungchul.park@gmail.com Link: https://lkml.kernel.org/r/20170920170546.972581715@infradead.org include/linux/cpuhotplug.h | 3 ++- kernel/cpu.c | 60 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) commit 5ebe7742fff8be5f1359bc50f5d43fb6ff7bd060 Author: Peter Zijlstra Date: Wed Sep 20 19:00:19 2017 +0200 smp/hotplug: Differentiate the AP completion between up and down With lockdep-crossrelease we get deadlock reports that span cpu-up and cpu-down chains. Such deadlocks cannot possibly happen because cpu-up and cpu-down are globally serialized. takedown_cpu() irq_lock_sparse() wait_for_completion(&st->done) cpuhp_thread_fun cpuhp_up_callback cpuhp_invoke_callback irq_affinity_online_cpu irq_local_spare() irq_unlock_sparse() complete(&st->done) Now that we have consistent AP state, we can trivially separate the AP completion between up and down using st->bringup. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: max.byungchul.park@gmail.com Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Link: https://lkml.kernel.org/r/20170920170546.872472799@infradead.org kernel/cpu.c | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 5f4b55e10645b7371322c800a5ec745cab487a6c Author: Peter Zijlstra Date: Wed Sep 20 19:00:20 2017 +0200 smp/hotplug: Differentiate the AP-work lockdep class between up and down With lockdep-crossrelease we get deadlock reports that span cpu-up and cpu-down chains. Such deadlocks cannot possibly happen because cpu-up and cpu-down are globally serialized. CPU0 CPU1 CPU2 cpuhp_up_callbacks: takedown_cpu: cpuhp_thread_fun: cpuhp_state irq_lock_sparse() irq_lock_sparse() wait_for_completion() cpuhp_state complete() Now that we have consistent AP state, we can trivially separate the AP-work class between up and down using st->bringup. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: max.byungchul.park@gmail.com Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Link: https://lkml.kernel.org/r/20170920170546.922524234@infradead.org kernel/cpu.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 724a86881d03ee5794148e65142e24ed3621be66 Author: Peter Zijlstra Date: Wed Sep 20 19:00:18 2017 +0200 smp/hotplug: Callback vs state-machine consistency While the generic callback functions have an 'int' return and thus appear to be allowed to return error, this is not true for all states. Specifically, what used to be STARTING/DYING are ran with IRQs disabled from critical parts of CPU bringup/teardown and are not allowed to fail. Add WARNs to enforce this rule. But since some callbacks are indeed allowed to fail, we have the situation where a state-machine rollback encounters a failure, in this case we're stuck, we can't go forward and we can't go back. Also add a WARN for that case. AFAICT this is a fundamental 'problem' with no real obvious solution. We want the 'prepare' callbacks to allow failure on either up or down. Typically on prepare-up this would be things like -ENOMEM from resource allocations, and the typical usage in prepare-down would be something like -EBUSY to avoid CPUs being taken away. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Cc: max.byungchul.park@gmail.com Link: https://lkml.kernel.org/r/20170920170546.819539119@infradead.org kernel/cpu.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 4dddfb5faa6118564b0c54a163353d13882299d8 Author: Peter Zijlstra Date: Wed Sep 20 19:00:17 2017 +0200 smp/hotplug: Rewrite AP state machine core There is currently no explicit state change on rollback. That is, st->bringup, st->rollback and st->target are not consistent when doing the rollback. Rework the AP state handling to be more coherent. This does mean we have to do a second AP kick-and-wait for rollback, but since rollback is the slow path of a slowpath, this really should not matter. Take this opportunity to simplify the AP thread function to only run a single callback per invocation. This unifies the three single/up/down modes is supports. The looping it used to do for up/down are achieved by retaining should_run and relying on the main smpboot_thread_fn() loop. (I have most of a patch that does the same for the BP state handling, but that's not critical and gets a little complicated because CPUHP_BRINGUP_CPU does the AP handoff from a callback, which gets recursive @st usage, I still have de-fugly that.) [ tglx: Move cpuhp_down_callbacks() et al. into the HOTPLUG_CPU section to avoid gcc complaining about unused functions. Make the HOTPLUG_CPU one piece instead of having two consecutive ifdef sections of the same type. ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Cc: max.byungchul.park@gmail.com Link: https://lkml.kernel.org/r/20170920170546.769658088@infradead.org kernel/cpu.c | 321 ++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 206 insertions(+), 115 deletions(-) commit 96abb968549cdefd0964d1f7af0a79f4e6e7f897 Author: Peter Zijlstra Date: Wed Sep 20 19:00:16 2017 +0200 smp/hotplug: Allow external multi-instance rollback Currently the rollback of multi-instance states is handled inside cpuhp_invoke_callback(). The problem is that when we want to allow an explicit state change for rollback, we need to return from the function without doing the rollback. Change cpuhp_invoke_callback() to optionally return the multi-instance state, such that rollback can be done from a subsequent call. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Cc: max.byungchul.park@gmail.com Link: https://lkml.kernel.org/r/20170920170546.720361181@infradead.org kernel/cpu.c | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) commit fac1c2040203363eab6c6e86ce883cb71390418f Author: Peter Zijlstra Date: Wed Sep 20 19:00:15 2017 +0200 smp/hotplug: Add state diagram Add a state diagram to clarify when which states are ran where. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: bigeasy@linutronix.de Cc: efault@gmx.de Cc: rostedt@goodmis.org Cc: max.byungchul.park@gmail.com Link: https://lkml.kernel.org/r/20170920170546.661598270@infradead.org include/linux/cpuhotplug.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f3a0c7b3fa7cdf6783827c245c62772687f8b3ac Author: Sean Wang Date: Sat Sep 9 20:37:03 2017 +0800 MAINTAINERS: Add entry for MediaTek PMIC LED driver Add myself as a maintainer to support existing SoCs and push forward following MediaTek PMICs with LEDs to reuse the driver. Signed-off-by: Sean Wang Signed-off-by: Jacek Anaszewski MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit c88f0e6b06f4092995688211a631bb436125d77b Author: Xin Long Date: Sun Aug 27 20:25:26 2017 +0800 scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly ChunYu found a kernel crash by syzkaller: [ 651.617875] kasan: CONFIG_KASAN_INLINE enabled [ 651.618217] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 651.618731] general protection fault: 0000 [#1] SMP KASAN [ 651.621543] CPU: 1 PID: 9539 Comm: scsi Not tainted 4.11.0.cov #32 [ 651.621938] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 651.622309] task: ffff880117780000 task.stack: ffff8800a3188000 [ 651.622762] RIP: 0010:skb_release_data+0x26c/0x590 [...] [ 651.627260] Call Trace: [ 651.629156] skb_release_all+0x4f/0x60 [ 651.629450] consume_skb+0x1a5/0x600 [ 651.630705] netlink_unicast+0x505/0x720 [ 651.632345] netlink_sendmsg+0xab2/0xe70 [ 651.633704] sock_sendmsg+0xcf/0x110 [ 651.633942] ___sys_sendmsg+0x833/0x980 [ 651.637117] __sys_sendmsg+0xf3/0x240 [ 651.638820] SyS_sendmsg+0x32/0x50 [ 651.639048] entry_SYSCALL_64_fastpath+0x1f/0xc2 It's caused by skb_shared_info at the end of sk_buff was overwritten by ISCSI_KEVENT_IF_ERROR when parsing nlmsg info from skb in iscsi_if_rx. During the loop if skb->len == nlh->nlmsg_len and both are sizeof(*nlh), ev = nlmsg_data(nlh) will acutally get skb_shinfo(SKB) instead and set a new value to skb_shinfo(SKB)->nr_frags by ev->type. This patch is to fix it by checking nlh->nlmsg_len properly there to avoid over accessing sk_buff. Reported-by: ChunYu Wang Signed-off-by: Xin Long Acked-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7755d83e48397e822aac751b1545f8bcf71d133e Author: Masahiro Yamada Date: Fri Sep 22 21:20:41 2017 +0900 irqdomain: Add __rcu annotations to radix tree accessors Fix various 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: Thomas Gleixner Cc: Marc Zyngier Cc: Jason Cooper Link: https://lkml.kernel.org/r/1506082841-11530-1-git-send-email-yamada.masahiro@socionext.com kernel/irq/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9f82930a5b41f28fadb1e4838b877ae528456d3 Author: Paul Burton Date: Thu Sep 21 23:24:40 2017 -0700 irqchip/mips-gic: Use effective affinity to unmask Commit 7778c4b27cbe ("irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK*") adjusted the way we handle masking interrupts to set & clear the interrupt's bit in each pcpu_mask. This allows us to avoid needing to read the GIC mask registers and perform a bitwise and of their values with the pending & pcpu_masks. Unfortunately this didn't quite work for IPIs, which were mapped to a particular CPU/VP during initialisation but never set the affinity or effective_affinity fields of their struct irq_desc. This led to them losing their affinity when gic_unmask_irq() was called for them, and they'd all become affine to cpu0. Fix this by: 1) Setting the effective affinity of interrupts in gic_shared_irq_domain_map(), which is where we actually map an interrupt to a CPU/VP. This ensures that the effective affinity mask is always valid, not just after explicitly setting affinity. 2) Using an interrupt's effective affinity when unmasking it, which prevents gic_unmask_irq() from unintentionally changing which pcpu_mask includes an interrupt. Fixes: 7778c4b27cbe ("irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK*") Signed-off-by: Paul Burton Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jason Cooper Link: https://lkml.kernel.org/r/20170922062440.23701-3-paul.burton@imgtec.com drivers/irqchip/irq-mips-gic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a08588ea486a5590b50c36f437dc86350271b250 Author: Paul Burton Date: Thu Sep 21 23:24:39 2017 -0700 irqchip/mips-gic: Fix shifts to extract register fields The MIPS GIC driver is incorrectly using __fls to shift registers, intending to shift to the least significant bit of a value based upon its mask but instead shifting off all but the value's top bit. It should actually be using __ffs to shift to the first, not last, bit of the value. Apparently the system I used when testing commit 3680746abd87 ("irqchip: mips-gic: Convert remaining shared reg access to new accessors") and commit b2b2e584ceab ("irqchip: mips-gic: Clean up mti, reserved-cpu-vectors handling") managed to work correctly despite this issue, but not all systems do... Fixes: 3680746abd87 ("irqchip: mips-gic: Convert remaining shared reg access to new accessors") Fixes: b2b2e584ceab ("irqchip: mips-gic: Clean up mti, reserved-cpu-vectors handling") Signed-off-by: Paul Burton Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jason Cooper Link: https://lkml.kernel.org/r/20170922062440.23701-2-paul.burton@imgtec.com drivers/irqchip/irq-mips-gic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb35279dd7c7834d6320edf24e1b9786d31e4899 Author: Matt Ranostay Date: Wed May 24 22:52:29 2017 -0700 iio: proximity: as3935: noise detection + threshold changes Most applications are too noisy to allow the default noise and watchdog settings, and thus need to be configurable via DT properties. Also default settings to POR defaults on a reset, and register distuber interrupts as noise since it prevents proper usage. Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-proximity-as3935 | 8 ++++ .../devicetree/bindings/iio/proximity/as3935.txt | 5 +++ drivers/iio/proximity/as3935.c | 43 ++++++++++++++++++++-- 3 files changed, 53 insertions(+), 3 deletions(-) commit fddc9923c6d41de9fe7b1f323a3cece53e046c88 Author: James Smart Date: Tue Sep 19 14:01:50 2017 -0700 nvme-fcloop: fix port deletes and callbacks Now that there are potentially long delays between when a remoteport or targetport delete calls is made and when the callback occurs (dev_loss_tmo timeout), no longer block in the delete routines and move the final nport puts to the callbacks. Moved the fcloop_nport_get/put/free routines to avoid forward declarations. Ensure port_info structs used in registrations are nulled in case fields are not set (ex: devloss_tmo values). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fcloop.c | 102 ++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 64 deletions(-) commit 6b71f9e1e849f82abb4a8d54ce7f4b1c71f19ac4 Author: James Smart Date: Wed Sep 20 11:07:26 2017 -0700 nvmet-fc: sync header templates with comments Comments were incorrect: - defer_rcv was in host port template. moved to target port template - Added Mandatory statements for target port template items Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/nvme-fc-driver.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 0c319d3a144d4b8f1ea2047fd614d2149b68f889 Author: James Smart Date: Tue Sep 19 16:33:56 2017 -0700 nvmet-fc: ensure target queue id within range. When searching for queue id's ensure they are within the expected range. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 3 +++ 1 file changed, 3 insertions(+) commit 3688feb582a1bc4e58ad50f5eccfdb90615de27b Author: James Smart Date: Tue Sep 19 15:13:11 2017 -0700 nvmet-fc: on port remove call put outside lock Avoid calling the put routine, as it may traverse to free routines while holding the target lock. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e4d753d7e51c0648b9ee33efeed55d45f362fc3d Author: Sagi Grimberg Date: Thu Sep 21 17:01:38 2017 +0300 nvme-rdma: don't fully stop the controller in error recovery By calling nvme_stop_ctrl on a already failed controller will wait for the scan work to complete (only by identify timeout expiration which is 60 seconds). This is unnecessary when we already know that the controller has failed. Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a960afd60d02808c7f7f36d4aa8a2e07045e1e9 Author: Sagi Grimberg Date: Thu Sep 21 17:01:37 2017 +0300 nvme-rdma: give up reconnect if state change fails If we failed to transition to state LIVE after a successful reconnect, then controller deletion already started. In this case there is no point moving forward with reconnect. Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1a40d97288c6ffea9b355139e88fa62f0e5439f7 Author: Sagi Grimberg Date: Thu Sep 21 17:01:36 2017 +0300 nvme-core: Use nvme_wq to queue async events and fw activation async_event_work might race as it is executed from two different workqueues at the moment. Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cbd96a6285e8eb65232b5afd3e8d9418453a61c Author: James Smart Date: Thu Sep 21 08:13:49 2017 -0700 nvme: fix sqhd reference when admin queue connect fails Fix bug in sqhd patch. It wasn't the sq that was at risk. In the case where the admin queue connect command fails, the sq->size field is not set. Therefore, this becomes a divide by zero error. Add a quick check to bypass under this failure condition. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 115ef3b7e61ac64e32827611a127002672ed3725 Author: Thomas Gleixner Date: Mon Sep 25 20:21:54 2017 +0200 watchdog/hardlockup/perf: Cure UP damage for_each_cpu() unintuitively reports CPU0 as set independend of the actual cpumask content on UP kernels. That leads to a NULL pointer dereference when the cleanup function is invoked and there is no event to clean up. Reported-by: Fengguang Wu Signed-off-by: Thomas Gleixner kernel/watchdog_hld.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 10201655b085df8e000822e496e5d4016a167a36 Author: Andreas Gruenbacher Date: Tue Sep 19 07:15:35 2017 -0500 gfs2: Fix debugfs glocks dump The switch to rhashtables (commit 88ffbf3e03) broke the debugfs glock dump (/sys/kernel/debug/gfs2//glocks) for dumps bigger than a single buffer: the right function for restarting an rhashtable iteration from the beginning of the hash table is rhashtable_walk_enter; rhashtable_walk_stop + rhashtable_walk_start will just resume from the current position. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Cc: stable@vger.kernel.org # v4.3+ fs/gfs2/glock.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit eefd95e1f3d47b90dc768e9ebc77d390c4f34809 Author: Shuah Khan Date: Thu Sep 21 13:05:18 2017 -0600 selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms When timer_create() fails on a bootime or realtime clock, setup_timer() returns 0 as if timer has been set. Callers wait forever for the timer to expire. This hang is seen on a system that doesn't have support for: CLOCK_REALTIME_ALARM ABSTIME missing CAP_WAKE_ALARM? : [UNSUPPORTED] Test hangs waiting for a timer that hasn't been set to expire. Fix setup_timer() to return 1, add handling in callers to detect the unsupported case and return 0 without waiting to not fail the test. Signed-off-by: Shuah Khan tools/testing/selftests/timers/set-timer-lat.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 01db7fbf5487505b887fbd6a03c51f2adc952196 Author: Shuah Khan Date: Thu Sep 21 13:46:01 2017 -0600 selftests: timers: set-timer-lat: fix hang when std out/err are redirected do_timer_oneshot() uses select() as a timer with FD_SETSIZE and readfs is cleared with FD_ZERO without FD_SET. When stdout and stderr are redirected, the test hangs in select forever. Fix the problem calling select() with readfds empty and nfds zero. This is sufficient for using select() for timer. With this fix "./set-timer-lat > /dev/null 2>&1" no longer hangs. Signed-off-by: Shuah Khan Acked-by: Greg Hackmann Signed-off-by: Shuah Khan tools/testing/selftests/timers/set-timer-lat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 21aadfa2426d5d199ceb474d0159d079c7f17bfa Author: Li Zhijian Date: Thu Sep 21 17:13:27 2017 +0800 selftests/memfd: correct run_tests.sh permission to fix the following issue: ------------------ TAP version 13 selftests: run_tests.sh ======================================== selftests: Warning: file run_tests.sh is not executable, correct this. not ok 1..1 selftests: run_tests.sh [FAIL] ------------------ Signed-off-by: Li Zhijian Signed-off-by: Shuah Khan tools/testing/selftests/memfd/run_tests.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 10859f3855db4c6f10dc7974ff4b3a292f3de8e0 Author: Kees Cook Date: Thu Sep 7 16:32:46 2017 -0700 selftests/seccomp: Support glibc 2.26 siginfo_t.h The 2.26 release of glibc changed how siginfo_t is defined, and the earlier work-around to using the kernel definition are no longer needed. The old way needs to stay around for a while, though. Reported-by: Seth Forshee Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Tested-by: Seth Forshee Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/seccomp_bpf.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 659dbfd8c47adeb03f401d1a1f17091bb63cc5a2 Author: Shuah Khan Date: Mon Sep 18 18:46:23 2017 -0600 selftests: futex: Makefile: fix for loops in targets to run silently Fix for loops in targets to run silently to avoid cluttering the test results. Suppresses the following from targets: for DIR in functional; do \ BUILD_TARGET=./tools/testing/selftests/futex/$DIR; \ mkdir $BUILD_TARGET -p; \ make OUTPUT=$BUILD_TARGET -C $DIR all;\ done ./tools/testing/selftests/futex/run.sh Signed-off-by: Shuah Khan Reviewed-by: Darren Hart (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a16cc6326d58b32f12f2e60d0b0ec2c8771469a5 Author: oder_chiou@realtek.com Date: Mon Sep 25 11:11:05 2017 +0800 ASoC: rt5663: Change the dev getting function in rt5663_irq In the irq handler "rt5663_irq", while the codec is not initialized, rt5663->codec will be null, and it will cause the kernel panic in the debug print enabled. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ede053632f6380d7e1dba4d781e5eb78621aa3a Author: Shuah Khan Date: Mon Sep 18 17:30:50 2017 -0600 selftests: Makefile: fix for loops in targets to run silently Fix for loops in targets to run silently to avoid cluttering the test results. Suppresses the following from targets: e.g run from breakpoints for TARGET in breakpoints; do \ BUILD_TARGET=$BUILD/$TARGET; \ mkdir $BUILD_TARGET -p; \ make OUTPUT=$BUILD_TARGET -C $TARGET;\ done; Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8230b905a6780c60372bf5df7bf5f23041ca3196 Author: Shuah Khan Date: Tue Sep 12 08:52:13 2017 -0600 selftests: mqueue: Use full path to run tests from Makefile Use full path including $(OUTPUT) to run tests from Makefile for normal case when objects reside in the source tree as well as when objects are relocated with make O=dir. In both cases $(OUTPUT) will be set correctly by lib.mk. Signed-off-by: Shuah Khan tools/testing/selftests/mqueue/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c3340ea7f5dabf88ca096a917cb0ab1f208ef2a Author: Shuah Khan Date: Mon Sep 11 19:11:07 2017 -0600 selftests: futex: copy sub-dir test scripts for make O=dir run For make O=dir run_tests to work, test scripts from sub-directories need to be copied over to the object directory. Running tests from the object directory is necessary to avoid making the source tree dirty. Signed-off-by: Shuah Khan Reviewed-by: Darren Hart (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fe59493240169a2cc3f445ae5f2a2308fda06b63 Author: Geert Uytterhoeven Date: Mon Sep 11 14:29:15 2017 +0200 PCI: Add dummy pci_acs_enabled() for CONFIG_PCI=n build If CONFIG_PCI=n and gcc (e.g. 4.1.2) decides not to inline get_pci_function_alias_group(), the build fails with: drivers/iommu/iommu.o: In function `get_pci_function_alias_group': iommu.c:(.text+0xfdc): undefined reference to `pci_acs_enabled' Due to the various dummies for PCI calls in the CONFIG_PCI=n case, pci_acs_enabled() never called, but not all versions of gcc are smart enough to realize that. While explicitly marking get_pci_function_alias_group() inline would fix the build, this would inflate the code for the CONFIG_PCI=y case, as get_pci_function_alias_group() is a not-so-small function called from two places. Hence fix the issue by introducing a dummy for pci_acs_enabled() instead. Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) commit fbcd49838d9094ca45772356e7b33afe4b7c93e7 Author: Ilya Lesokhin Date: Sun Sep 24 21:46:35 2017 +0300 IB/mlx5: Fix NULL deference on mlx5_ib_update_xlt failure mlx5_ib_reg_user_mr called mlx5_ib_dereg_mr in case of MR population failure. This resulted in a NULL dereference as ibmr->device wasn't initialized yet. We address this by adding an internal dereg_mr function that can handle partially initialized MRs, and fixing clean_mr to work on partially initialized MRs. Fixes: ff740aefecb9 ("IB/mlx5: Decouple MR allocation and population flows") Signed-off-by: Ilya Lesokhin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit d67bc5d4e3e100d762c0f57ea67f28bc219698a6 Author: Ilya Lesokhin Date: Sun Sep 24 21:46:34 2017 +0300 IB/mlx5: Simplify mlx5_ib_cont_pages The patch simplifies mlx5_ib_cont_pages and fixes the following issues in the original implementation: First issues is related to alignment of the PFNs. After the check base + p != PFN, the alignment of the PFN wasn't checked. So the PFN sequence 0, 1, 1, 2 would result in a page_shift of 13 even though the 3rd PFN is not 8KB aligned. This wasn't actually a bug because it was supported by all the existing mlx5 compatible device, but we don't want to require this support in all future devices. Another issue is because the inner loop didn't advance PFN so the test "if (base + p != pfn)" always failed for SGE with len > (1< Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mem.c | 47 +++++++++++++++------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) commit 7c9d9662103ae1c11acc7bfc47d988466cff23cf Author: Alex Vesker Date: Sun Sep 24 21:46:33 2017 +0300 IB/ipoib: Fix inconsistency with free_netdev and free_rdma_netdev Call free_rdma_netdev instead of free_netdev each time we want to release a netdevice. This call is also relevant for future freeing of offloaded child interfaces. This patch also adds a missing call for free netdevice when releasing a parent interface that has child interfaces using ipoib_remove_one. Fixes: cd565b4b51e5 ('IB/IPoIB: Support acceleration options callbacks') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++---- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 10 ++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) commit 9c6f42e9254150d2772242d9f8bd8d0b7b7431ff Author: Shalom Lagziel Date: Sun Sep 24 21:46:32 2017 +0300 IB/ipoib: Fix sysfs Pkey create<->remove possible deadlock A possible ABBA lock can happen with RTNL and vlan_rwsem. For example: Flow A: Device Flush __ipoib_ib_dev_flush down_read(vlan_rwsem) // Lock A ipoib_flush_ah flush_workqueue(priv->wq) // Wait for completion A work on shared WQ (Mcast carrier) ipoib_mcast_carrier_on_task while (!rtnl_trylock()) // Wait for lock B Flow B: Sysfs PKEY delete ipoib_vlan_delete lock(RTNL) // Lock B down_write(vlan_rwsem) // Wait for lock A This can happen with PKEY creates as well. The solution is to release the RTNL lock in sysfs functions in case it is not possible to lock VLAN RW semaphore and reset the SYS call. Fixes: 69956d83267e ("IB/ipoib: Sync between remove_one to sysfs calls that use rtnl_lock") Signed-off-by: Shalom Lagziel Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit edd31551148c09608feee6b8756ad148d550ee3b Author: Parav Pandit Date: Sun Sep 24 21:46:31 2017 +0300 IB: Correct MR length field to be 64-bit The ib_mr->length represents the length of the MR in bytes as per the IBTA spec 1.3 section 11.2.10.3 (REGISTER PHYSICAL MEMORY REGION). Currently ib_mr->length field is defined as only 32-bits field. This might result into truncation and failed WRs of consumers who registers more than 4GB bytes memory regions and whose WRs accessing such MRs. This patch makes the length 64-bit to avoid such truncation. Cc: Sagi Grimberg Cc: Chuck Lever Cc: Faisal Latif Fixes: 4c67e2bfc8b7 ("IB/core: Introduce new fast registration API") Signed-off-by: Ilya Lesokhin Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_verbs.c | 4 ++-- drivers/infiniband/ulp/iser/iser_memory.c | 2 +- include/rdma/ib_verbs.h | 2 +- net/sunrpc/xprtrdma/frwr_ops.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 73827a605bbd7cebef4cfd1261e497246a82a0e7 Author: Parav Pandit Date: Sun Sep 24 21:46:30 2017 +0300 IB/core: Fix qp_sec use after free access When security_ib_alloc_security fails, qp->qp_sec memory is freed. However ib_destroy_qp still tries to access this memory which result in kernel crash. So its initialized to NULL to avoid such access. Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/security.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 78b1beb0998437107ed144b341fbe1252188916b Author: Leon Romanovsky Date: Sun Sep 24 21:46:29 2017 +0300 IB/core: Fix typo in the name of the tag-matching cap struct The tag matching functionality is implemented by mlx5 driver by extending XRQ, however this internal kernel information was exposed to user space applications with *xrq* name instead of *tm*. This patch renames *xrq* to *tm* to handle that. Fixes: 8d50505ada72 ("IB/uverbs: Expose XRQ capabilities") Signed-off-by: Leon Romanovsky Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 14 +++++++------- drivers/infiniband/hw/mlx5/main.c | 10 +++++----- include/rdma/ib_verbs.h | 4 ++-- include/uapi/rdma/ib_user_verbs.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) commit 090657c9fb7094e4c1b05c1713d6c2a12ef43dea Author: Akemi Yagi Date: Fri Sep 22 22:11:53 2017 +0000 perf tools: Fix syscalltbl build failure The build of kernel v4.14-rc1 for i686 fails on RHEL 6 with the error in tools/perf: util/syscalltbl.c:157: error: expected ';', ',' or ')' before '__maybe_unused' mv: cannot stat `util/.syscalltbl.o.tmp': No such file or directory Fix it by placing/moving: #include outside of #ifdef HAVE_SYSCALL_TABLE block. Signed-off-by: Akemi Yagi Cc: Alan Bartlett Link: http://lkml.kernel.org/r/oq41r8$1v9$1@blaine.gmane.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/syscalltbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9789e7e93f2b892098d7684ac8131092aa617814 Author: Mengting Zhang Date: Sat Sep 23 16:18:14 2017 +0800 perf report: Fix debug messages with --call-graph option With --call-graph option, perf report can display call chains using type, min percent threshold, optional print limit and order. And the default call-graph parameter is 'graph,0.5,caller,function,percent'. Before this patch, 'perf report --call-graph' shows incorrect debug messages as below: # perf report --call-graph Invalid callchain mode: 0.5 Invalid callchain order: 0.5 Invalid callchain sort key: 0.5 Invalid callchain config key: 0.5 Invalid callchain mode: caller Invalid callchain mode: function Invalid callchain order: function Invalid callchain mode: percent Invalid callchain order: percent Invalid callchain sort key: percent That is because in function __parse_callchain_report_opt(),each field of the call-graph parameter is passed to parse_callchain_{mode,order, sort_key,value} in turn until it meets the matching value. For example, the order field "caller" is passed to parse_callchain_mode() firstly and obviously it doesn't match any mode field. Therefore parse_callchain_mode() will shows the debug message "Invalid callchain mode: caller", which could confuse users. The patch fixes this issue by moving the warning out of the function parse_callchain_{mode,order,sort_key,value}. Signed-off-by: Mengting Zhang Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Krister Johansen Cc: Li Bin Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: Yao Jin Link: http://lkml.kernel.org/r/1506154694-39691-1-git-send-email-zhangmengting@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 62e082430ea4bb5b28909ca4375bb683931e22aa Author: Mikulas Patocka Date: Wed Sep 20 07:29:49 2017 -0400 dm ioctl: fix alignment of event number in the device list The size of struct dm_name_list is different on 32-bit and 64-bit kernels (so "(nl + 1)" differs between 32-bit and 64-bit kernels). This mismatch caused some harmless difference in padding when using 32-bit or 64-bit kernel. Commit 23d70c5e52dd ("dm ioctl: report event number in DM_LIST_DEVICES") added reporting event number in the output of DM_LIST_DEVICES_CMD. This difference in padding makes it impossible for userspace to determine the location of the event number (the location would be different when running on 32-bit and 64-bit kernels). Fix the padding by using offsetof(struct dm_name_list, name) instead of sizeof(struct dm_name_list) to determine the location of entries. Also, the ioctl version number is incremented to 37 so that userspace can use the version number to determine that the event number is present and correctly located. In addition, a global event is now raised when a DM device is created, removed, renamed or when table is swapped, so that the user can monitor for device changes. Reported-by: Eugene Syromiatnikov Fixes: 23d70c5e52dd ("dm ioctl: report event number in DM_LIST_DEVICES") Cc: stable@vger.kernel.org # 4.13 Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 1 + drivers/md/dm-ioctl.c | 37 ++++++++++++++++++++++++------------- drivers/md/dm.c | 10 ++++++++-- include/uapi/linux/dm-ioctl.h | 4 ++-- 4 files changed, 35 insertions(+), 17 deletions(-) commit f5c156c4c29a3d87176dd6e5c099388e187ec29b Author: Shaohua Li Date: Thu Sep 21 12:17:16 2017 -0700 block: fix a crash caused by wrong API part_stat_show takes a part device not a disk, so we should use part_to_disk. Fixes: d62e26b3ffd2("block: pass in queue to inflight accounting") Cc: Bart Van Assche Cc: Omar Sandoval Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/partition-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 332391a9935da939319e473b4680e173df75afcf Author: Lukas Czerner Date: Thu Sep 21 08:16:29 2017 -0600 fs: Fix page cache inconsistency when mixing buffered and AIO DIO Currently when mixing buffered reads and asynchronous direct writes it is possible to end up with the situation where we have stale data in the page cache while the new data is already written to disk. This is permanent until the affected pages are flushed away. Despite the fact that mixing buffered and direct IO is ill-advised it does pose a thread for a data integrity, is unexpected and should be fixed. Fix this by deferring completion of asynchronous direct writes to a process context in the case that there are mapped pages to be found in the inode. Later before the completion in dio_complete() invalidate the pages in question. This ensures that after the completion the pages in the written area are either unmapped, or populated with up-to-date data. Also do the same for the iomap case which uses iomap_dio_complete() instead. This has a side effect of deferring the completion to a process context for every AIO DIO that happens on inode that has pages mapped. However since the consensus is that this is ill-advised practice the performance implication should not be a problem. This was based on proposal from Jeff Moyer, thanks! Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Reviewed-by: Jeff Moyer Signed-off-by: Lukas Czerner Signed-off-by: Jens Axboe fs/direct-io.c | 49 +++++++++++++++++++++++++++++++++++++++++++------ fs/iomap.c | 29 ++++++++++++++++------------- mm/filemap.c | 10 ++++++++-- 3 files changed, 67 insertions(+), 21 deletions(-) commit bb1cc74790eb51f52d23c6e5fd9a3bb16030c3d8 Author: James Smart Date: Mon Sep 18 09:08:29 2017 -0700 nvmet: implement valid sqhd values in completions To support sqhd, for initiators that are following the spec and paying attention to sqhd vs their sqtail values: - add sqhd to struct nvmet_sq - initialize sqhd to 0 in nvmet_sq_setup - rather than propagate the 0's-based qsize value from the connect message which requires a +1 in every sqhd update, and as nothing else references it, convert to 1's-based value in nvmt_sq/cq_setup() calls. - validate connect message sqsize being non-zero per spec. - updated assign sqhd for every completion that goes back. Also remove handling the NULL sq case in __nvmet_req_complete, as it can't happen with the current code. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 8 ++++---- drivers/nvme/target/fabrics-cmd.c | 9 +++++++-- drivers/nvme/target/nvmet.h | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) commit 8edd11c9ad3a6205eea6de9d02eaf64c681a0658 Author: Guilherme G. Piccoli Date: Thu Sep 14 13:59:28 2017 -0300 nvme-fabrics: Allow 0 as KATO value Currently, driver code allows user to set 0 as KATO (Keep Alive TimeOut), but this is not being respected. This patch enforces the expected behavior. Signed-off-by: Guilherme G. Piccoli Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0951338d9677f546e230685d68631dfd3f81cca5 Author: James Smart Date: Thu Sep 7 13:18:04 2017 -0700 nvme: allow timed-out ios to retry Currently the nvme_req_needs_retry() applies several checks to see if a retry is allowed. On of those is whether the current time has exceeded the start time of the io plus the timeout length. This check, if an io times out, means there is never a retry allowed for the io. Which means applications see the io failure. Remove this check and allow the io to timeout, like it does on other protocols, and retries to be made. On the FC transport, a frame can be lost for an individual io, and there may be no other errors that escalate for the connection/association. The io will timeout, which causes the transport to escalate into creating a new association, but the io that timed out, due to this retry logic, has already failed back to the application and things are hosed. Signed-off-by: James Smart Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 -- 1 file changed, 2 deletions(-) commit cd48282cc736377d5abf7c04de8c6ba864ba3794 Author: James Smart Date: Thu Sep 14 11:03:09 2017 -0700 nvme: stop aer posting if controller state not live If an nvme async_event command completes, in most cases, a new async event is posted. However, if the controller enters a resetting or reconnecting state, there is nothing to block the scheduled work element from posting the async event again. Nor are there calls from the transport to stop async events when an association dies. In the case of FC, where the association is torn down, the aer must be aborted on the FC link and completes through the normal job completion path. Thus the terminated async event ends up being rescheduled even though the controller isn't in a valid state for the aer, and the reposting gets the transport into a partially torn down data structure. It's possible to hit the scenario on rdma, although much less likely due to an aer completing right as the association is terminated and as the association teardown reclaims the blk requests via nvme_cancel_request() so its immediate, not a link-related action like on FC. Fix by putting controller state checks in both the async event completion routine where it schedules the async event and in the async event work routine before it calls into the transport. It's effectively a "stop_async_events()" behavior. The transport, when it creates a new association with the subsystem will transition the state back to live and is already restarting the async event posting. Signed-off-by: James Smart [hch: remove taking a lock over reading the controller state] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d08774738446e77734777adcf5d1045237b4475a Author: Keith Busch Date: Fri Sep 15 13:05:38 2017 -0400 nvme-pci: Print invalid SGL only once The WARN_ONCE macro returns true if the condition is true, not if the warn was raised, so we're printing the scatter list every time it's invalid. This is excessive and makes debugging harder, so this patch prints it just once. Signed-off-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 161b8be2bd6abad250d4b3f674bdd5480f15beeb Author: Keith Busch Date: Thu Sep 14 13:54:39 2017 -0400 nvme-pci: initialize queue memory before interrupts A spurious interrupt before the nvme driver has initialized the completion queue may inadvertently cause the driver to believe it has a completion to process. This may result in a NULL dereference since the nvmeq's tags are not set at this point. The patch initializes the host's CQ memory so that a spurious interrupt isn't mistaken for a real completion. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deb61742e060d4447712598bc11bb50f8b2e51dd Author: James Smart Date: Mon Sep 11 16:16:53 2017 -0700 nvmet-fc: fix failing max io queue connections fc transport is treating NVMET_NR_QUEUES as maximum queue count, e.g. admin queue plus NVMET_NR_QUEUES-1 io queues. But NVMET_NR_QUEUES is the number of io queues, so maximum queue count is really NVMET_NR_QUEUES+1. Fix the handling in the target fc transport Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d9d34c0b2327e85da0ad1476575264fe957fc6ef Author: James Smart Date: Thu Sep 7 13:20:24 2017 -0700 nvme-fc: use transport-specific sgl format Sync with NVM Express spec change and FC-NVME 1.18. FC transport sets SGL type to Transport SGL Data Block Descriptor and subtype to transport-specific value 0x0A. Removed the warn-on's on the PRP fields. They are unneeded. They were to check for values from the upper layer that weren't set right, and for the most part were fine. But, with Async events, which reuse the same structure and 2nd time issued the SGL overlay converted them to the Transport SGL values - the warn-on's were errantly firing. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d85cf207499e6740ab9c490ff4f360af5c432d23 Author: James Smart Date: Thu Sep 7 13:20:23 2017 -0700 nvme: add transport SGL definitions Add transport SGL defintions from NVMe TP 4008, required for the final NVMe-FC standard. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/nvme.h | 6 ++++++ 1 file changed, 6 insertions(+) commit c98cb3bd882119e7e1a7c8df2f1eacfcc701450b Author: James Smart Date: Thu Sep 7 16:27:25 2017 -0700 nvme.h: remove FC transport-specific error values The NVM express group recinded the reserved range for the transport. Remove the FC-centric values that had been defined. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/nvme.h | 13 ------------- 1 file changed, 13 deletions(-) commit 39a550d2d9eaee8b618084e6011441eac6a2a3b7 Author: James Smart Date: Thu Sep 14 11:30:15 2017 -0700 qla2xxx: remove use of FC-specific error codes The qla2xxx driver uses the FC-specific error when it needed to return an error to the FC-NVME transport. Convert to use a generic value instead. Signed-off-by: James Smart Acked-by: Himanshu Madhani Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e009ce84683fa124b23ff5cb7fd87c48b331b88 Author: James Smart Date: Thu Sep 7 16:27:29 2017 -0700 lpfc: remove use of FC-specific error codes The lpfc driver uses the FC-specific error when it needed to return an error to the FC-NVME transport. Convert to use a generic value instead. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc9608e8b4dc3c2545fa0bc5d3eef158ca56ccf8 Author: James Smart Date: Thu Sep 7 16:27:28 2017 -0700 nvmet-fcloop: remove use of FC-specific error codes The FC-NVME transport loopback test module used the FC-specific error codes in cases where it emulated a transport abort case. Instead of using the FC-specific values, now use a generic value (NVME_SC_INTERNAL). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fcloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29b3d26ecc8046838de88205b7c4b182ac27ff65 Author: James Smart Date: Thu Sep 7 16:27:27 2017 -0700 nvmet-fc: remove use of FC-specific error codes The FC-NVME target transport used the FC-specific error codes in return codes when the transport or lldd failed. Instead of using the FC-specific values, now use a generic value (NVME_SC_INTERNAL). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 56b7103a06083b8ce1160f8289460ba2f584e182 Author: James Smart Date: Thu Sep 7 16:27:26 2017 -0700 nvme-fc: remove use of FC-specific error codes The FC-NVME transport used the FC-specific error codes in cases where it had to fabricate an error to go back up stack. Instead of using the FC-specific values, now use a generic value (NVME_SC_INTERNAL). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5313c141b49c1b1af43d1ca81398185d66ad1a6 Author: Omar Sandoval Date: Wed Sep 20 14:24:34 2017 -0700 loop: remove union of use_aio and ref in struct loop_cmd When the request is completed, lo_complete_rq() checks cmd->use_aio. However, if this is in fact an aio request, cmd->use_aio will have already been reused as cmd->ref by lo_rw_aio*. Fix it by not using a union. On x86_64, there's a hole after the union anyways, so this doesn't make struct loop_cmd any bigger. Fixes: 92d773324b7e ("block/loop: fix use after free") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5acb3cc2c2e9d3020a4fee43763c6463767f1572 Author: Waiman Long Date: Wed Sep 20 13:12:20 2017 -0600 blktrace: Fix potential deadlock between delete & sysfs ops The lockdep code had reported the following unsafe locking scenario: CPU0 CPU1 ---- ---- lock(s_active#228); lock(&bdev->bd_mutex/1); lock(s_active#228); lock(&bdev->bd_mutex); *** DEADLOCK *** The deadlock may happen when one task (CPU1) is trying to delete a partition in a block device and another task (CPU0) is accessing tracing sysfs file (e.g. /sys/block/dm-1/trace/act_mask) in that partition. The s_active isn't an actual lock. It is a reference count (kn->count) on the sysfs (kernfs) file. Removal of a sysfs file, however, require a wait until all the references are gone. The reference count is treated like a rwsem using lockdep instrumentation code. The fact that a thread is in the sysfs callback method or in the ioctl call means there is a reference to the opended sysfs or device file. That should prevent the underlying block structure from being removed. Instead of using bd_mutex in the block_device structure, a new blk_trace_mutex is now added to the request_queue structure to protect access to the blk_trace structure. Suggested-by: Christoph Hellwig Signed-off-by: Waiman Long Acked-by: Steven Rostedt (VMware) Fix typo in patch subject line, and prune a comment detailing how the code used to work. Signed-off-by: Jens Axboe block/blk-core.c | 3 +++ include/linux/blkdev.h | 1 + kernel/trace/blktrace.c | 18 ++++++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) commit 1dae69bedeeca0b57e441eae491fbd38049c0b47 Author: Josef Bacik Date: Fri May 5 22:25:18 2017 -0400 nbd: ignore non-nbd ioctl's In testing we noticed that nbd would spew if you ran a fio job against the raw device itself. This is because fio calls a block device specific ioctl, however the block layer will first pass this back to the driver ioctl handler in case the driver wants to do something special. Since the device was setup using netlink this caused us to spew every time fio called this ioctl. Since we don't have special handling, just error out for any non-nbd specific ioctl's that come in. This fixes the spew. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f507b54dccfd8000c517d740bc45f20c74532d18 Author: Christoph Hellwig Date: Thu Sep 7 13:54:35 2017 +0200 bsg-lib: don't free job in bsg_prepare_job The job structure is allocated as part of the request, so we should not free it in the error path of bsg_prepare_job. Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/bsg-lib.c | 1 - 1 file changed, 1 deletion(-) commit 02a4843618fb35f847cf8c31cd3893873aa0edde Author: Mikulas Patocka Date: Wed Sep 13 09:17:57 2017 -0400 brd: fix overflow in __brd_direct_access The code in __brd_direct_access multiplies the pgoff variable by page size and divides it by 512. It can cause overflow on 32-bit architectures. The overflow happens if we create ramdisk larger than 4G and use it as a sparse device. This patch replaces multiplication and division with multiplication by the number of sectors per page. Reviewed-by: Dan Williams Signed-off-by: Mikulas Patocka Fixes: 1647b9b959c7 ("brd: add dax_operations support") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Jens Axboe drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2827a418ca1b23e432e62c9b3d0e7cf3255dfe88 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Tue Sep 19 22:04:12 2017 +0200 genirq: Check __free_irq() return value for NULL __free_irq() can return a NULL irqaction for example when trying to free already-free IRQ, but the callsite unconditionally dereferences the returned pointer. Fix this by adding a check and return NULL. Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20170919200412.GA29985@gmail.com kernel/irq/manage.c | 4 ++++ 1 file changed, 4 insertions(+) commit c74aef2d06a9f59cece89093eecc552933cba72a Author: Peter Zijlstra Date: Fri Sep 22 17:48:06 2017 +0200 futex: Fix pi_state->owner serialization There was a reported suspicion about a race between exit_pi_state_list() and put_pi_state(). The same report mentioned the comment with put_pi_state() said it should be called with hb->lock held, and it no longer is in all places. As it turns out, the pi_state->owner serialization is indeed broken. As per the new rules: 734009e96d19 ("futex: Change locking rules") pi_state->owner should be serialized by pi_state->pi_mutex.wait_lock. For the sites setting pi_state->owner we already hold wait_lock (where required) but exit_pi_state_list() and put_pi_state() were not and raced on clearing it. Fixes: 734009e96d19 ("futex: Change locking rules") Reported-by: Gratian Crisan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: dvhart@infradead.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20170922154806.jd3ffltfk24m4o4y@hirez.programming.kicks-ass.net kernel/futex.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit e007ce9c59bddd1e67b94bc29036d920f5c5428a Author: Eric Biggers Date: Thu Sep 21 13:57:42 2017 -0700 KEYS: use kmemdup() in request_key_auth_new() kmemdup() is preferred to kmalloc() followed by memcpy(). Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/request_key_auth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4aa68e07d845562561f5e73c04aa521376e95252 Author: Eric Biggers Date: Mon Sep 18 11:38:29 2017 -0700 KEYS: restrict /proc/keys by credentials at open time When checking for permission to view keys whilst reading from /proc/keys, we should use the credentials with which the /proc/keys file was opened. This is because, in a classic type of exploit, it can be possible to bypass checks for the *current* credentials by passing the file descriptor to a suid program. Following commit 34dbbcdbf633 ("Make file credentials available to the seqfile interfaces") we can finally fix it. So let's do it. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/proc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8f674565d405a8c0b36ee531849df87f43e72ed5 Author: Eric Biggers Date: Mon Sep 18 11:37:39 2017 -0700 KEYS: reset parent each time before searching key_user_tree In key_user_lookup(), if there is no key_user for the given uid, we drop key_user_lock, allocate a new key_user, and search the tree again. But we failed to set 'parent' to NULL at the beginning of the second search. If the tree were to be empty for the second search, the insertion would be done with an invalid 'parent', scribbling over freed memory. Fortunately this can't actually happen currently because the tree always contains at least the root_key_user. But it still should be fixed to make the code more robust. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37863c43b2c6464f252862bf2e9768264e961678 Author: Eric Biggers Date: Mon Sep 18 11:37:23 2017 -0700 KEYS: prevent KEYCTL_READ on negative key Because keyctl_read_key() looks up the key with no permissions requested, it may find a negatively instantiated key. If the key is also possessed, we went ahead and called ->read() on the key. But the key payload will actually contain the ->reject_error rather than the normal payload. Thus, the kernel oopses trying to read the user_key_payload from memory address (int)-ENOKEY = 0x00000000ffffff82. Fortunately the payload data is stored inline, so it shouldn't be possible to abuse this as an arbitrary memory read primitive... Reproducer: keyctl new_session keyctl request2 user desc '' @s keyctl read $(keyctl show | awk '/user: desc/ {print $1}') It causes a crash like the following: BUG: unable to handle kernel paging request at 00000000ffffff92 IP: user_read+0x33/0xa0 PGD 36a54067 P4D 36a54067 PUD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 211 Comm: keyctl Not tainted 4.14.0-rc1 #337 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 task: ffff90aa3b74c3c0 task.stack: ffff9878c0478000 RIP: 0010:user_read+0x33/0xa0 RSP: 0018:ffff9878c047bee8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff90aa3d7da340 RCX: 0000000000000017 RDX: 0000000000000000 RSI: 00000000ffffff82 RDI: ffff90aa3d7da340 RBP: ffff9878c047bf00 R08: 00000024f95da94f R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f58ece69740(0000) GS:ffff90aa3e200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000ffffff92 CR3: 0000000036adc001 CR4: 00000000003606f0 Call Trace: keyctl_read_key+0xac/0xe0 SyS_keyctl+0x99/0x120 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x7f58ec787bb9 RSP: 002b:00007ffc8d401678 EFLAGS: 00000206 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffda RBX: 00007ffc8d402800 RCX: 00007f58ec787bb9 RDX: 0000000000000000 RSI: 00000000174a63ac RDI: 000000000000000b RBP: 0000000000000004 R08: 00007ffc8d402809 R09: 0000000000000020 R10: 0000000000000000 R11: 0000000000000206 R12: 00007ffc8d402800 R13: 00007ffc8d4016e0 R14: 0000000000000000 R15: 0000000000000000 Code: e5 41 55 49 89 f5 41 54 49 89 d4 53 48 89 fb e8 a4 b4 ad ff 85 c0 74 09 80 3d b9 4c 96 00 00 74 43 48 8b b3 20 01 00 00 4d 85 ed <0f> b7 5e 10 74 29 4d 85 e4 74 24 4c 39 e3 4c 89 e2 4c 89 ef 48 RIP: user_read+0x33/0xa0 RSP: ffff9878c047bee8 CR2: 00000000ffffff92 Fixes: 61ea0c0ba904 ("KEYS: Skip key state checks when checking for possession") Cc: [v3.13+] Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyctl.c | 5 +++++ 1 file changed, 5 insertions(+) commit 237bbd29f7a049d310d907f4b2716a7feef9abf3 Author: Eric Biggers Date: Mon Sep 18 11:37:03 2017 -0700 KEYS: prevent creating a different user's keyrings It was possible for an unprivileged user to create the user and user session keyrings for another user. For example: sudo -u '#3000' sh -c 'keyctl add keyring _uid.4000 "" @u keyctl add keyring _uid_ses.4000 "" @u sleep 15' & sleep 1 sudo -u '#4000' keyctl describe @u sudo -u '#4000' keyctl describe @us This is problematic because these "fake" keyrings won't have the right permissions. In particular, the user who created them first will own them and will have full access to them via the possessor permissions, which can be used to compromise the security of a user's keys: -4: alswrv-----v------------ 3000 0 keyring: _uid.4000 -5: alswrv-----v------------ 3000 0 keyring: _uid_ses.4000 Fix it by marking user and user session keyrings with a flag KEY_FLAG_UID_KEYRING. Then, when searching for a user or user session keyring by name, skip all keyrings that don't have the flag set. Fixes: 69664cf16af4 ("keys: don't generate user and user session keyrings unless they're accessed") Cc: [v2.6.26+] Signed-off-by: Eric Biggers Signed-off-by: David Howells include/linux/key.h | 2 ++ security/keys/internal.h | 2 +- security/keys/key.c | 2 ++ security/keys/keyring.c | 23 ++++++++++++++--------- security/keys/process_keys.c | 6 ++++-- 5 files changed, 23 insertions(+), 12 deletions(-) commit e645016abc803dafc75e4b8f6e4118f088900ffb Author: Eric Biggers Date: Mon Sep 18 11:36:45 2017 -0700 KEYS: fix writing past end of user-supplied buffer in keyring_read() Userspace can call keyctl_read() on a keyring to get the list of IDs of keys in the keyring. But if the user-supplied buffer is too small, the kernel would write the full list anyway --- which will corrupt whatever userspace memory happened to be past the end of the buffer. Fix it by only filling the space that is available. Fixes: b2a4df200d57 ("KEYS: Expand the capacity of a keyring") Cc: [v3.13+] Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyring.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7fc0786d956d9e59b68d282be9b156179846ea3d Author: Eric Biggers Date: Mon Sep 18 11:36:31 2017 -0700 KEYS: fix key refcount leak in keyctl_read_key() In keyctl_read_key(), if key_permission() were to return an error code other than EACCES, we would leak a the reference to the key. This can't actually happen currently because key_permission() can only return an error code other than EACCES if security_key_permission() does, only SELinux and Smack implement that hook, and neither can return an error code other than EACCES. But it should still be fixed, as it is a bug waiting to happen. Fixes: 29db91906340 ("[PATCH] Keys: Add LSM hooks for key management [try #3]") Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 884bee0215fcc239b30c062c37ca29077005e064 Author: Eric Biggers Date: Mon Sep 18 11:36:12 2017 -0700 KEYS: fix key refcount leak in keyctl_assume_authority() In keyctl_assume_authority(), if keyctl_change_reqkey_auth() were to fail, we would leak the reference to the 'authkey'. Currently this can only happen if prepare_creds() fails to allocate memory. But it still should be fixed, as it is a more severe bug waiting to happen. This patch also moves the read of 'authkey->serial' to before the reference to the authkey is dropped. Doing the read after dropping the reference is very fragile because it assumes we still hold another reference to the key. (Which we do, in current->cred->request_key_auth, but there's no reason not to write it in the "obviously correct" way.) Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f7b48cf08fa63a68b59c2894806ee478216d7f91 Author: Eric Biggers Date: Thu Sep 21 13:57:41 2017 -0700 KEYS: don't revoke uninstantiated key in request_key_auth_new() If key_instantiate_and_link() were to fail (which fortunately isn't possible currently), the call to key_revoke(authkey) would crash with a NULL pointer dereference in request_key_auth_revoke() because the key has not yet been instantiated. Fix this by removing the call to key_revoke(). key_put() is sufficient, as it's not possible for an uninstantiated authkey to have been used for anything yet. Fixes: b5f545c880a2 ("[PATCH] keys: Permit running process to instantiate keys") Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/request_key_auth.c | 1 - 1 file changed, 1 deletion(-) commit 44d8143340a99b167c74365e844516b73523c087 Author: Eric Biggers Date: Thu Sep 21 13:57:40 2017 -0700 KEYS: fix cred refcount leak in request_key_auth_new() In request_key_auth_new(), if key_alloc() or key_instantiate_and_link() were to fail, we would leak a reference to the 'struct cred'. Currently this can only happen if key_alloc() fails to allocate memory. But it still should be fixed, as it is a more severe bug waiting to happen. Fix it by cleaning things up to use a helper function which frees a 'struct request_key_auth' correctly. Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/request_key_auth.c | 68 ++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 37 deletions(-) commit f1e52f14a69386ac460a8d700df0647a631cf595 Author: Arnaldo Carvalho de Melo Date: Fri Sep 22 15:41:44 2017 -0300 perf evsel: Fix attr.exclude_kernel setting for default cycles:p Yet another fix for probing the max attr.precise_ip setting: it is not enough settting attr.exclude_kernel for !root users, as they _can_ profile the kernel if the kernel.perf_event_paranoid sysctl is set to -1, so check that as well. Testing it: As non root: $ sysctl kernel.perf_event_paranoid kernel.perf_event_paranoid = 2 $ perf record sleep 1 $ perf evlist -v cycles:uppp: ..., exclude_kernel: 1, ... precise_ip: 3, ... Now as non-root, but with kernel.perf_event_paranoid set set to the most permissive value, -1: $ sysctl kernel.perf_event_paranoid kernel.perf_event_paranoid = -1 $ perf record sleep 1 $ perf evlist -v cycles:ppp: ..., exclude_kernel: 0, ... precise_ip: 3, ... $ I.e. non-root, default kernel.perf_event_paranoid: :uppp modifier = not allowed to sample the kernel, non-root, most permissible kernel.perf_event_paranoid: :ppp = allowed to sample the kernel. In both cases, use the highest available precision: attr.precise_ip = 3. Reported-and-Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: d37a36979077 ("perf evsel: Fix attr.exclude_kernel setting for default cycles:p") Link: http://lkml.kernel.org/n/tip-nj2qkf75xsd6pw6hhjzfqqdx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 549a3976523c69a0245c0a310210c824a0b26e35 Author: Ingo Molnar Date: Wed Sep 13 09:38:23 2017 +0200 tools include: Sync kernel ABI headers with tooling headers Time for a sync with ABI/uapi headers with the upcoming v4.14 kernel. None of the ABI changes require any source code level changes to our existing in-kernel tooling code: - tools/arch/s390/include/uapi/asm/kvm.h: New KVM_S390_VM_TOD_EXT ABI, not used by in-kernel tooling. - tools/arch/x86/include/asm/cpufeatures.h: tools/arch/x86/include/asm/disabled-features.h: New PCID, SME and VGIF x86 CPU feature bits defined. - tools/include/asm-generic/hugetlb_encode.h: tools/include/uapi/asm-generic/mman-common.h: tools/include/uapi/linux/mman.h: Two new madvise() flags, plus a hugetlb system call mmap flags restructuring/extension changes. - tools/include/uapi/drm/drm.h: tools/include/uapi/drm/i915_drm.h: New drm_syncobj_create flags definitions, new drm_syncobj_wait and drm_syncobj_array ABIs. DRM_I915_PERF_* calls and a new I915_PARAM_HAS_EXEC_FENCE_ARRAY ABI for the Intel driver. - tools/include/uapi/linux/bpf.h: New bpf_sock fields (::mark and ::priority), new XDP_REDIRECT action, new kvm_ppc_smmu_info fields (::data_keys, instr_keys) Signed-off-by: Ingo Molnar Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Cc: Wang Nan Cc: Yao Jin Link: http://lkml.kernel.org/r/20170913073823.lxmi4c7ejqlfabjx@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/arch/s390/include/uapi/asm/kvm.h | 6 +++ tools/arch/x86/include/asm/cpufeatures.h | 2 + tools/arch/x86/include/asm/disabled-features.h | 4 +- tools/include/asm-generic/hugetlb_encode.h | 34 +++++++++++++++++ tools/include/uapi/asm-generic/mman-common.h | 14 ++----- tools/include/uapi/drm/drm.h | 22 +++++++++++ tools/include/uapi/drm/i915_drm.h | 51 +++++++++++++++++++++++++- tools/include/uapi/linux/bpf.h | 32 ++++++++++------ tools/include/uapi/linux/kvm.h | 3 +- tools/include/uapi/linux/mman.h | 24 +++++++++++- 10 files changed, 164 insertions(+), 28 deletions(-) commit 89975bd335f37b96ffd3cc24b9effb1fa25e7788 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 428dbf156cc5a8f9994d1f1a5c79373d15476f3c Author: Babu Moger Date: Mon Sep 18 10:53:29 2017 -0600 arch: change default endian for microblaze Fix the default for microblaze. Michal Simek mentioned default for microblaze should be CPU_LITTLE_ENDIAN. Fixes : commit 206d3642d8ee ("arch/microblaze: add choice for endianness and update Makefile") Signed-off-by: Babu Moger Cc: Michal Simek Signed-off-by: Michal Simek arch/microblaze/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c99853baca40e2f06038c4a926009edd14c7c3 Author: Thomas Meyer Date: Thu Sep 21 00:29:36 2017 +0200 microblaze: 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: Michal Simek arch/microblaze/kernel/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0add53713b1c07a1c71e27a20e21eb7c180b4e7b Author: Michal Simek Date: Tue Sep 19 16:40:21 2017 +0200 microblaze: Add missing kvm_para.h to Kbuild Running make allmodconfig;make is throwing compilation error: CC kernel/watchdog.o In file included from ./include/linux/kvm_para.h:4:0, from kernel/watchdog.c:29: ./include/uapi/linux/kvm_para.h:32:26: fatal error: asm/kvm_para.h: No such file or directory #include ^ compilation terminated. make[1]: *** [kernel/watchdog.o] Error 1 make: *** [kernel/watchdog.o] Error 2 Reported-by: Michal Hocko Suggested-by: Geert Uytterhoeven Signed-off-by: Michal Simek Fixes: 83f0124ad81e87b ("microblaze: remove asm-generic wrapper headers") Reviewed-by: Tobias Klauser Tested-by: Michal Hocko arch/microblaze/include/uapi/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 29b46dfb136cdbeece542b3f01115237e43f2855 Author: Kan Liang Date: Mon Sep 11 10:10:15 2017 -0700 perf/x86/intel/uncore: Correct num_boxes for IIO and IRP There are 6 IIO/IRP boxes for CBDMA, PCIe0-2, MCP 0 and MCP 1 separately. Correct the num_boxes. Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: eranian@google.com Cc: acme@kernel.org Link: http://lkml.kernel.org/r/1505149816-12580-1-git-send-email-kan.liang@intel.com arch/x86/events/intel/uncore_snbep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2e312061c5e9f533c44487862dc405094bf250a Merge: ec14121 f790923 Author: Greg Kroah-Hartman Date: Mon Sep 25 10:58:22 2017 +0200 Merge tag 'iio-fixes-for-4.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First round of IIO fixes for the 4.14 cycle Note this includes fixes from recent merge window. As such the tree is based on top of a prior staging/staging-next tree. * iio core - return and error for a failed read_reg debugfs call rather than eating the error. * ad7192 - Use the dedicated reset function in the ad_sigma_delta library instead of an spi transfer with the data on the stack which could cause problems with DMA. * ad7793 - Implement a dedicate reset function in the ad_sigma_delta library and use it to correctly reset this part. * bme280 - ctrl_reg write must occur after any register writes for updates to take effect. * mcp320x - negative voltage readout was broken. - Fix an oops on module unload due to spi_set_drvdata not being called in probe. * st_magn - Fix the data ready line configuration for the lis3mdl. It is not configurable so the st_magn core was assuming it didn't exist and so wasn't consuming interrupts resulting in an unhandled interrupt. * stm32-adc - off by one error on max channels checking. * stm32-timer - preset should not be buffered - reorganising register writes avoids this. - fix a corner case in which write preset goes wrong when a timer is used first as a trigger then as a counter with preset. Odd case but you never know. * ti-ads1015 - Fix setting of comparator polarity by fixing bitfield definition. * twl4030 - Error path handling fix to cleanup in event of regulator registration failure. - Disable the vusb3v1 regulator correctly in error handling - Don't paper over a regulator enable failure. commit 8fec9355a968ad240f3a2e9ad55b823cf1cc52ff Author: Bjørn Mork Date: Fri Sep 22 22:18:18 2017 +0200 USB: cdc-wdm: ignore -EPIPE from GetEncapsulatedResponse The driver will forward errors to userspace after turning most of them into -EIO. But all status codes are not equal. The -EPIPE (stall) in particular can be seen more as a result of normal USB signaling than an actual error. The state is automatically cleared by the USB core without intervention from either driver or userspace. And most devices and firmwares will never trigger a stall as a result of GetEncapsulatedResponse. This is in fact a requirement for CDC WDM devices. Quoting from section 7.1 of the CDC WMC spec revision 1.1: The function shall not return STALL in response to GetEncapsulatedResponse. But this driver is also handling GetEncapsulatedResponse on behalf of the qmi_wwan and cdc_mbim drivers. Unfortunately the relevant specs are not as clear wrt stall. So some QMI and MBIM devices *will* occasionally stall, causing the GetEncapsulatedResponse to return an -EPIPE status. Translating this into -EIO for userspace has proven to be harmful. Treating it as an empty read is safer, making the driver behave as if the device was conforming to the CDC WDM spec. There have been numerous reports of issues related to -EPIPE errors from some newer CDC MBIM devices in particular, like for example the Fibocom L831-EAU. Testing on this device has shown that the issues go away if we simply ignore the -EPIPE status. Similar handling of -EPIPE is already known from e.g. usb_get_string() The -EPIPE log message is still kept to let us track devices with this unexpected behaviour, hoping that it attracts attention from firmware developers. Cc: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100938 Reported-and-tested-by: Christian Ehrig Reported-and-tested-by: Patrick Chilton Reported-and-tested-by: Andreas Böhler Signed-off-by: Bjørn Mork Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fa1ed74eb1c233be6131ec92df21ab46499a15b6 Author: Dan Carpenter Date: Fri Sep 22 23:43:46 2017 +0300 USB: devio: Don't corrupt user memory The user buffer has "uurb->buffer_length" bytes. If the kernel has more information than that, we should truncate it instead of writing past the end of the user's buffer. I added a WARN_ONCE() to help the user debug the issue. Reported-by: Alan Stern Cc: stable Signed-off-by: Dan Carpenter Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 57999d1107c1e60c2ca7088f2ac0f819e2f554b3 Author: Dan Carpenter Date: Fri Sep 22 23:43:25 2017 +0300 USB: devio: Prevent integer overflow in proc_do_submiturb() There used to be an integer overflow check in proc_do_submiturb() but we removed it. It turns out that it's still required. The uurb->buffer_length variable is a signed integer and it's controlled by the user. It can lead to an integer overflow when we do: num_sgs = DIV_ROUND_UP(uurb->buffer_length, USB_SG_SIZE); If we strip away the macro then that line looks like this: num_sgs = (uurb->buffer_length + USB_SG_SIZE - 1) / USB_SG_SIZE; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It's the first addition which can overflow. Fixes: 1129d270cbfb ("USB: Increase usbfs transfer limit") Cc: stable Signed-off-by: Dan Carpenter Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 5 +++++ 1 file changed, 5 insertions(+) commit 450a97893559354b927c935f39ee11126f01f520 Author: Kan Liang Date: Fri Sep 8 17:34:49 2017 -0400 perf/x86/intel/rapl: Add missing CPU IDs DENVERTON and GEMINI_LAKE support same RAPL counters as Apollo Lake. Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: piotr.luc@intel.com Cc: harry.pan@intel.com Cc: srinivas.pandruvada@linux.intel.com Link: http://lkml.kernel.org/r/20170908213449.6224-3-kan.liang@intel.com arch/x86/events/intel/rapl.c | 3 +++ 1 file changed, 3 insertions(+) commit 1aaccc40a1864053da26605b0297be16dd52641e Author: Kan Liang Date: Fri Sep 8 17:34:48 2017 -0400 perf/x86/msr: Add missing CPU IDs Goldmont, Glodmont plus and Xeon Phi have MSR_SMI_COUNT as well. Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: piotr.luc@intel.com Cc: harry.pan@intel.com Cc: srinivas.pandruvada@linux.intel.com Link: http://lkml.kernel.org/r/20170908213449.6224-2-kan.liang@intel.com arch/x86/events/msr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b09c146f8f63c0e03adba74df76bf9c2be466fec Author: Kan Liang Date: Fri Sep 8 17:34:47 2017 -0400 perf/x86/intel/cstate: Add missing CPU IDs Skylake server uses the same C-state residency events as Sandy Bridge. Denverton and Gemini lake use the same C-state residency events as Apollo Lake. Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: piotr.luc@intel.com Cc: harry.pan@intel.com Cc: srinivas.pandruvada@linux.intel.com Link: http://lkml.kernel.org/r/20170908213449.6224-1-kan.liang@intel.com arch/x86/events/intel/cstate.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5ac751d9e6b187c4a0000879d6598eb2292db949 Author: Ville Syrjälä Date: Tue Sep 12 19:40:00 2017 +0300 x86: Don't cast away the __user in __get_user_asm_u64() Don't cast away the __user in __get_user_asm_u64() on x86-32. Prevents sparse getting upset. Signed-off-by: Ville Syrjälä Signed-off-by: Thomas Gleixner Cc: Benjamin LaHaise Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170912164000.13745-1-ville.syrjala@linux.intel.com arch/x86/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d7099433d9eaaa5a989a55f1fa354c16a3ad297 Author: Sean Fu Date: Mon Sep 11 08:33:21 2017 +0800 x86/sysfs: Fix off-by-one error in loop termination An off-by-one error in loop terminantion conditions in create_setup_data_nodes() will lead to memory leak when create_setup_data_node() failed. Signed-off-by: Sean Fu Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/1505090001-1157-1-git-send-email-fxinrong@gmail.com arch/x86/kernel/ksysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3c4fb7c9c2ebfd50b8c60f6c069932bb319bc37 Author: Laurent Dufour Date: Mon Sep 4 10:32:15 2017 +0200 x86/mm: Fix fault error path using unsafe vma pointer commit 7b2d0dbac489 ("x86/mm/pkeys: Pass VMA down in to fault signal generation code") passes down a vma pointer to the error path, but that is done once the mmap_sem is released when calling mm_fault_error() from __do_page_fault(). This is dangerous as the vma structure is no more safe to be used once the mmap_sem has been released. As only the protection key value is required in the error processing, we could just pass down this value. Fix it by passing a pointer to a protection key value down to the fault signal generation code. The use of a pointer allows to keep the check generating a warning message in fill_sig_info_pkey() when the vma was not known. If the pointer is valid, the protection value can be accessed by deferencing the pointer. [ tglx: Made *pkey u32 as that's the type which is passed in siginfo ] Fixes: 7b2d0dbac489 ("x86/mm/pkeys: Pass VMA down in to fault signal generation code") Signed-off-by: Laurent Dufour Signed-off-by: Thomas Gleixner Cc: linux-mm@kvack.org Cc: Dave Hansen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1504513935-12742-1-git-send-email-ldufour@linux.vnet.ibm.com arch/x86/mm/fault.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit 10430364ebb562311ba6a6efa74e0c2298007912 Author: Bhumika Goyal Date: Tue Aug 29 23:47:11 2017 +0530 x86/numachip: Add const and __initconst to numachip2_clockevent Make this const as it is only used during a copy operation and add __initconst as this usage is during the initialization phase. Signed-off-by: Bhumika Goyal Signed-off-by: Thomas Gleixner Cc: julia.lawall@lip6.fr Cc: daniel.lezcano@linaro.org Link: http://lkml.kernel.org/r/1504030631-10812-1-git-send-email-bhumirks@gmail.com drivers/clocksource/numachip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5c8028b4788f62b31fb79a331b3ad3e041fa366 Author: Eric Biggers Date: Sat Sep 23 15:00:09 2017 +0200 x86/fpu: Reinitialize FPU registers if restoring FPU state fails Userspace can change the FPU state of a task using the ptrace() or rt_sigreturn() system calls. Because reserved bits in the FPU state can cause the XRSTOR instruction to fail, the kernel has to carefully validate that no reserved bits or other invalid values are being set. Unfortunately, there have been bugs in this validation code. For example, we were not checking that the 'xcomp_bv' field in the xstate_header was 0. As-is, such bugs are exploitable to read the FPU registers of other processes on the system. To do so, an attacker can create a task, assign to it an invalid FPU state, then spin in a loop and monitor the values of the FPU registers. Because the task's FPU registers are not being restored, sometimes the FPU registers will have the values from another process. This is likely to continue to be a problem in the future because the validation done by the CPU instructions like XRSTOR is not immediately visible to kernel developers. Nor will invalid FPU states ever be encountered during ordinary use --- they will only be seen during fuzzing or exploits. There can even be reserved bits outside the xstate_header which are easy to forget about. For example, the MXCSR register contains reserved bits, which were not validated by the KVM_SET_XSAVE ioctl until commit a575813bfe4b ("KVM: x86: Fix load damaged SSEx MXCSR register"). Therefore, mitigate this class of vulnerability by restoring the FPU registers from init_fpstate if restoring from the task's state fails. We actually used to do this, but it was (perhaps unwisely) removed by commit 9ccc27a5d297 ("x86/fpu: Remove error return values from copy_kernel_to_*regs() functions"). This new patch is also a bit different. First, it only clears the registers, not also the bad in-memory state; this is simpler and makes it easier to make the mitigation cover all callers of __copy_kernel_to_fpregs(). Second, it does the register clearing in an exception handler so that no extra instructions are added to context switches. In fact, we *remove* instructions, since previously we were always zeroing the register containing 'err' even if CONFIG_X86_DEBUG_FPU was disabled. Signed-off-by: Eric Biggers Reviewed-by: Rik van Riel Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20170922174156.16780-4-ebiggers3@gmail.com Link: http://lkml.kernel.org/r/20170923130016.21448-27-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 51 +++++++++++-------------------------- arch/x86/mm/extable.c | 24 +++++++++++++++++ 2 files changed, 39 insertions(+), 36 deletions(-) commit 814fb7bb7db5433757d76f4c4502c96fc53b0b5e Author: Eric Biggers Date: Sat Sep 23 15:00:07 2017 +0200 x86/fpu: Don't let userspace set bogus xcomp_bv On x86, userspace can use the ptrace() or rt_sigreturn() system calls to set a task's extended state (xstate) or "FPU" registers. ptrace() can set them for another task using the PTRACE_SETREGSET request with NT_X86_XSTATE, while rt_sigreturn() can set them for the current task. In either case, registers can be set to any value, but the kernel assumes that the XSAVE area itself remains valid in the sense that the CPU can restore it. However, in the case where the kernel is using the uncompacted xstate format (which it does whenever the XSAVES instruction is unavailable), it was possible for userspace to set the xcomp_bv field in the xstate_header to an arbitrary value. However, all bits in that field are reserved in the uncompacted case, so when switching to a task with nonzero xcomp_bv, the XRSTOR instruction failed with a #GP fault. This caused the WARN_ON_FPU(err) in copy_kernel_to_xregs() to be hit. In addition, since the error is otherwise ignored, the FPU registers from the task previously executing on the CPU were leaked. Fix the bug by checking that the user-supplied value of xcomp_bv is 0 in the uncompacted case, and returning an error otherwise. The reason for validating xcomp_bv rather than simply overwriting it with 0 is that we want userspace to see an error if it (incorrectly) provides an XSAVE area in compacted format rather than in uncompacted format. Note that as before, in case of error we clear the task's FPU state. This is perhaps non-ideal, especially for PTRACE_SETREGSET; it might be better to return an error before changing anything. But it seems the "clear on error" behavior is fine for now, and it's a little tricky to do otherwise because it would mean we couldn't simply copy the full userspace state into kernel memory in one __copy_from_user(). This bug was found by syzkaller, which hit the above-mentioned WARN_ON_FPU(): WARNING: CPU: 1 PID: 0 at ./arch/x86/include/asm/fpu/internal.h:373 __switch_to+0x5b5/0x5d0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.13.0 #453 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff9ba2bc8e42c0 task.stack: ffffa78cc036c000 RIP: 0010:__switch_to+0x5b5/0x5d0 RSP: 0000:ffffa78cc08bbb88 EFLAGS: 00010082 RAX: 00000000fffffffe RBX: ffff9ba2b8bf2180 RCX: 00000000c0000100 RDX: 00000000ffffffff RSI: 000000005cb10700 RDI: ffff9ba2b8bf36c0 RBP: ffffa78cc08bbbd0 R08: 00000000929fdf46 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff9ba2bc8e42c0 R13: 0000000000000000 R14: ffff9ba2b8bf3680 R15: ffff9ba2bf5d7b40 FS: 00007f7e5cb10700(0000) GS:ffff9ba2bf400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004005cc CR3: 0000000079fd5000 CR4: 00000000001406e0 Call Trace: Code: 84 00 00 00 00 00 e9 11 fd ff ff 0f ff 66 0f 1f 84 00 00 00 00 00 e9 e7 fa ff ff 0f ff 66 0f 1f 84 00 00 00 00 00 e9 c2 fa ff ff <0f> ff 66 0f 1f 84 00 00 00 00 00 e9 d4 fc ff ff 66 66 2e 0f 1f Here is a C reproducer. The expected behavior is that the program spin forever with no output. However, on a buggy kernel running on a processor with the "xsave" feature but without the "xsaves" feature (e.g. Sandy Bridge through Broadwell for Intel), within a second or two the program reports that the xmm registers were corrupted, i.e. were not restored correctly. With CONFIG_X86_DEBUG_FPU=y it also hits the above kernel warning. #define _GNU_SOURCE #include #include #include #include #include #include #include #include int main(void) { int pid = fork(); uint64_t xstate[512]; struct iovec iov = { .iov_base = xstate, .iov_len = sizeof(xstate) }; if (pid == 0) { bool tracee = true; for (int i = 0; i < sysconf(_SC_NPROCESSORS_ONLN) && tracee; i++) tracee = (fork() != 0); uint32_t xmm0[4] = { [0 ... 3] = tracee ? 0x00000000 : 0xDEADBEEF }; asm volatile(" movdqu %0, %%xmm0\n" " mov %0, %%rbx\n" "1: movdqu %%xmm0, %0\n" " mov %0, %%rax\n" " cmp %%rax, %%rbx\n" " je 1b\n" : "+m" (xmm0) : : "rax", "rbx", "xmm0"); printf("BUG: xmm registers corrupted! tracee=%d, xmm0=%08X%08X%08X%08X\n", tracee, xmm0[0], xmm0[1], xmm0[2], xmm0[3]); } else { usleep(100000); ptrace(PTRACE_ATTACH, pid, 0, 0); wait(NULL); ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov); xstate[65] = -1; ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov); ptrace(PTRACE_CONT, pid, 0, 0); wait(NULL); } return 1; } Note: the program only tests for the bug using the ptrace() system call. The bug can also be reproduced using the rt_sigreturn() system call, but only when called from a 32-bit program, since for 64-bit programs the kernel restores the FPU state from the signal frame by doing XRSTOR directly from userspace memory (with proper error checking). Reported-by: Dmitry Vyukov Signed-off-by: Eric Biggers Reviewed-by: Kees Cook Reviewed-by: Rik van Riel Acked-by: Dave Hansen Cc: [v3.17+] Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers Cc: Fenghua Yu Cc: Kevin Hao Cc: Linus Torvalds Cc: Michael Halcrow Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yu-cheng Yu Cc: kernel-hardening@lists.openwall.com Fixes: 0b29643a5843 ("x86/xsaves: Change compacted format xsave area header") Link: http://lkml.kernel.org/r/20170922174156.16780-2-ebiggers3@gmail.com Link: http://lkml.kernel.org/r/20170923130016.21448-25-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/regset.c | 4 ++++ arch/x86/kernel/fpu/signal.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 3e747fa18202896b5be66b88478352d5880fb8eb Merge: a715b3a 6af1de2 Author: Kalle Valo Date: Mon Sep 25 10:06:12 2017 +0300 Merge ath-current from ath.git ath.git fixes for 4.14. Major changes: ath10k * fix a PCI PM related gcc warning commit 5f3d862a736398e7068fa67142133f1713fdee8c Author: Gerd Hoffmann Date: Mon Sep 18 09:41:45 2017 +0200 qxl: fix framebuffer unpinning qxl_plane_cleanup_fb() unpins the just activated framebuffer instead of the old one. Oops. Fix it. Cc: Gabriel Krisman Bertazi Fixes: 1277eed5fecb8830c8cc414ad70c1ef640464bc0 Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170918074145.2257-1-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_display.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e19b205be43d11bff638cad4487008c48d21c103 Author: Linus Torvalds Date: Sun Sep 24 16:38:56 2017 -0700 Linux 4.14-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e7f253801a2c7e6274b702e5cbda78b89122470 Merge: a141fd5 127b8e2 Author: Linus Torvalds Date: Sun Sep 24 16:04:12 2017 -0700 Merge tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - fix build for !OF providing empty of_find_device_by_node - fix Abracon vendor prefix - sync dtx_diff include paths (again) - a stm32h7 clock binding doc fix * tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: clk: stm32h7: fix clock-cell size scripts/dtc: dtx_diff - 2nd update of include dts paths to match build dt-bindings: fix vendor prefix for Abracon of: provide inline helper for of_find_device_by_node commit a141fd55f26231b5a17f74e504c56d44c3e62e5d Merge: 16528a3 f5caf62 Author: Linus Torvalds Date: Sun Sep 24 12:33:58 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Another round of CR3/PCID related fixes (I think this addresses all but one of the known problems with PCID support), an objtool fix plus a Clang fix that (finally) solves all Clang quirks to build a bootable x86 kernel as-is" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Fix inline asm call constraints for Clang objtool: Handle another GCC stack pointer adjustment bug x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs x86/mm/32: Move setup_clear_cpu_cap(X86_FEATURE_PCID) earlier x86/mm/64: Stop using CR3.PCID == 0 in ASID-aware code x86/mm: Factor out CR3-building code commit 16528a3fed5de9228de0dd7a9a4de3f3eb4c982a Merge: 43d368a 8fce3dc Author: Linus Torvalds Date: Sun Sep 24 12:28:55 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "A clocksource driver section mismatch fix" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/integrator: Fix section mismatch warning commit 43d368a18f046587bc6ac44239fbef183242989b Merge: a430643 cf00ab8 Author: Linus Torvalds Date: Sun Sep 24 11:57:07 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Three irqchip driver fixes, and an affinity mask helper function bug fix affecting x86" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "genirq: Restrict effective affinity to interrupts actually using it" irqchip.mips-gic: Fix shared interrupt mask writes irqchip/gic-v4: Fix building with ancient gcc irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu() commit a4306434b79ffc859e5dc6ab0f305a3d8204ef46 Merge: a302824 a2048e3 Author: Linus Torvalds Date: Sun Sep 24 11:53:13 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull address-limit checking fixes from Ingo Molnar: "This fixes a number of bugs in the address-limit (USER_DS) checks that got introduced in the merge window, (mostly) affecting the ARM and ARM64 platforms" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64/syscalls: Move address limit check in loop arm/syscalls: Optimize address limit check Revert "arm/syscalls: Check address limit on user-mode return" syscalls: Use CHECK_DATA_CORRUPTION for addr_limit_user_check commit a30282478271ea8e06d424f96c1537094b309c7c Merge: 1436ab0 ab5348c Author: Linus Torvalds Date: Sun Sep 24 11:40:41 2017 -0700 Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull misc security layer update from James Morris: "This is the remaining 'general' change in the security tree for v4.14, following the direct merging of SELinux (+ TOMOYO), AppArmor, and seccomp. That's everything now for the security tree except IMA, which will follow shortly (I've been traveling for the past week with patchy internet)" * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: fix description of values returned by cap_inode_need_killpriv commit 1436ab068d6b0309a73849dc239399399621decd Merge: cd4175b1 fb154e0 Author: Linus Torvalds Date: Sun Sep 24 11:34:28 2017 -0700 Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull TPM updates from James Morris: "Here are the TPM updates from Jarkko for v4.14, which I've placed in their own branch (next-tpm). I ended up cherry-picking them as other changes had been made in Jarkko's branch after he sent me his original pull request. I plan on maintaining a separate branch for TPM (and other security subsystems) from now on. From Jarkko: 'Not much this time except a few fixes'" * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: 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 commit f790923f146140a261ad211e5baf75d169f16fb2 Author: Stefan Popa Date: Thu Sep 14 16:50:28 2017 +0300 staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack. Depends on: 691c4b95d1 ("iio: ad_sigma_delta: Implement a dedicated reset function") SPI host drivers can use DMA to transfer data, so the buffer should be properly allocated. Keeping it on the stack could cause an undefined behavior. The dedicated reset function solves this issue. Signed-off-by: Stefan Popa Acked-by: Lars-Peter Clausen Acked-by: Michael Hennerich Cc: Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7192.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3d62c78a6eb9a7d67bace9622b66ad51e81c5f9b Author: Matt Fornero Date: Tue Sep 5 16:34:10 2017 +0200 iio: core: Return error for failed read_reg If an IIO device returns an error code for a read access via debugfs, it is currently ignored by the IIO core (other than emitting an error message). Instead, return this error code to user space, so upper layers can detect it correctly. Signed-off-by: Matt Fornero Signed-off-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7ee3b7ebcb74714df6d94c8f500f307e1ee5dda5 Author: Dragos Bogdan Date: Tue Sep 5 15:16:13 2017 +0300 iio: ad7793: Fix the serial interface reset The serial interface can be reset by writing 32 consecutive 1s to the device. 'ret' was initialized correctly but its value was overwritten when ad7793_check_platform_data() was called. Since a dedicated reset function is present now, it should be used instead. Fixes: 2edb769d246e ("iio:ad7793: Add support for the ad7798 and ad7799") Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7793.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fc10de8d49a748c476532c9d8e8fe19e548dd67 Author: Dragos Bogdan Date: Tue Sep 5 15:14:45 2017 +0300 iio: ad_sigma_delta: Implement a dedicated reset function Since most of the SD ADCs have the option of reseting the serial interface by sending a number of SCLKs with CS = 0 and DIN = 1, a dedicated function that can do this is usefull. Needed for the patch: iio: ad7793: Fix the serial interface reset Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad_sigma_delta.c | 28 ++++++++++++++++++++++++++++ include/linux/iio/adc/ad_sigma_delta.h | 3 +++ 2 files changed, 31 insertions(+) commit 4b1f0c31f96c45e8521dd84aae50f2aa4aecfb7b Author: Colin Parker Date: Mon Aug 28 16:21:39 2017 -0700 IIO: BME280: Updates to Humidity readings need ctrl_reg write! The ctrl_reg register needs to be written after any write to the humidity registers. The value written to the ctrl_reg register does not necessarily need to change, but a write operation must occur. The regmap_update_bits functions will not write to a register if the register value matches the value to be written. This saves unnecessary bus operations. The change in this patch forces a bus write during the chip_config operation by switching to regmap_write_bits. This will fix issues where the Humidity Sensor Oversampling bits are not updated after initialization. Signed-off-by: Colin Parker Acked-by: Andreas Klinger Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/bmp280-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6f4794371ee7cce1339e7ca9542f1e703c5f84a Author: Lukas Wunner Date: Tue Aug 22 15:33:00 2017 +0200 iio: adc: mcp320x: Fix readout of negative voltages Commit f686a36b4b79 ("iio: adc: mcp320x: Add support for mcp3301") returns a signed voltage from mcp320x_adc_conversion() but neglects that the caller interprets a negative return value as failure. Only mcp3301 (and the upcoming mcp3550/1/3) is affected as the other chips are incapable of measuring negative voltages. Fix and while at it, add mcp3301 to the list of supported chips at the top of the file. Fixes: f686a36b4b79 ("iio: adc: mcp320x: Add support for mcp3301") Cc: Andrea Galbusera Signed-off-by: Lukas Wunner Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp320x.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 0964e40947a630a2a6f724e968246992f97bcf1c Author: Lukas Wunner Date: Tue Aug 22 15:33:00 2017 +0200 iio: adc: mcp320x: Fix oops on module unload The driver calls spi_get_drvdata() in its ->remove hook even though it has never called spi_set_drvdata(). Stack trace for posterity: Unable to handle kernel NULL pointer dereference at virtual address 00000220 Internal error: Oops: 5 [#1] SMP ARM [<8072f564>] (mutex_lock) from [<7f1400d0>] (iio_device_unregister+0x24/0x7c [industrialio]) [<7f1400d0>] (iio_device_unregister [industrialio]) from [<7f15e020>] (mcp320x_remove+0x20/0x30 [mcp320x]) [<7f15e020>] (mcp320x_remove [mcp320x]) from [<8055a8cc>] (spi_drv_remove+0x2c/0x44) [<8055a8cc>] (spi_drv_remove) from [<805087bc>] (__device_release_driver+0x98/0x134) [<805087bc>] (__device_release_driver) from [<80509180>] (driver_detach+0xdc/0xe0) [<80509180>] (driver_detach) from [<8050823c>] (bus_remove_driver+0x5c/0xb0) [<8050823c>] (bus_remove_driver) from [<80509ab0>] (driver_unregister+0x38/0x58) [<80509ab0>] (driver_unregister) from [<7f15e69c>] (mcp320x_driver_exit+0x14/0x1c [mcp320x]) [<7f15e69c>] (mcp320x_driver_exit [mcp320x]) from [<801a78d0>] (SyS_delete_module+0x184/0x1d0) [<801a78d0>] (SyS_delete_module) from [<80108100>] (ret_fast_syscall+0x0/0x1c) Fixes: f5ce4a7a9291 ("iio: adc: add driver for MCP3204/08 12-bit ADC") Cc: Oskar Andero Signed-off-by: Lukas Wunner Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp320x.c | 1 + 1 file changed, 1 insertion(+) commit 4fb840c95f82652cece7352be9080884cafb92a0 Author: Fabrice Gasnier Date: Mon Sep 18 18:24:15 2017 +0200 iio: adc: stm32: fix bad error check on max_channels Fix a bad error check when counting 'st,adc-channels' array elements. This is seen when all channels are in use simultaneously. Fixes: 64ad7f643 ("iio: adc: stm32: introduce compatible data cfg") Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7a9776c1f9443326632486fcbd82dca82f8511e Author: Fabrice Gasnier Date: Mon Sep 18 12:05:31 2017 +0200 iio: trigger: stm32-timer: fix a corner case to write preset Balance timer start routine that sets ARPE: clear it in stop routine. This fixes a corner case, when timer is used successively as trigger (with sampling_frequency start/stop routines), then as a counter (with preset). Fixes: 93fbe91b5521 ("iio: Add STM32 timer trigger driver") Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 1 + 1 file changed, 1 insertion(+) commit 0a56eabc4e3f730782e4a9f3af4f60aa03a8a849 Author: Fabrice Gasnier Date: Mon Sep 18 12:05:30 2017 +0200 iio: trigger: stm32-timer: preset shouldn't be buffered Currently, setting preset value (ARR) will update directly 'Auto reload value' only on 1st write access. But then, ARPE is set. This makes ARR a shadow register. Preset value should be updated upon each write request: ensure ARPE is 0. This fixes successive writes to preset attribute. Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device") Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 53063846affd27def6f96e13a9fb80b9a3c2d126 Author: Christophe JAILLET Date: Sat Sep 23 08:06:20 2017 +0200 iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()' If we can not enable the regulator, go through the error handling path instead of silently continuing. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") Signed-off-by: Christophe JAILLET Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7f70be6e4025db0551e6863e7eb9cca07122695c Author: Christophe JAILLET Date: Sat Sep 23 08:06:19 2017 +0200 iio: adc: twl4030: Disable the vusb3v1 rugulator in the error handling path of 'twl4030_madc_probe()' Commit 7cc97d77ee8a has introduced a call to 'regulator_disable()' in the .remove function. So we should also have such a call in the .probe function in case of error after a successful 'regulator_enable()' call. Add a new label for that and use it. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") Signed-off-by: Christophe JAILLET Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 245a396a9b1a67ac5c3228737c261b3e48708a2a Author: Christophe JAILLET Date: Sat Sep 23 08:06:18 2017 +0200 iio: adc: twl4030: Fix an error handling path in 'twl4030_madc_probe()' If 'devm_regulator_get()' fails, we should go through the existing error handling path instead of returning directly, as done is all the other error handling paths in this function. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") Signed-off-by: Christophe JAILLET Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/twl4030-madc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 03eaec81ac09814817e9f0307d572ffe8365f980 Author: Andi Kleen Date: Sat Sep 23 15:00:06 2017 +0200 x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU() copy_xregs_to_kernel checks if the alternatives have been already patched. This WARN_ON() is always executed in every context switch. All the other checks in fpu internal.h are WARN_ON_FPU(), but this one is plain WARN_ON(). I assume it was forgotten to switch it. So switch it to WARN_ON_FPU() too to avoid some unnecessary code in the context switch, and a potentially expensive cache line miss for the global variable. Signed-off-by: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170329062605.4970-1-andi@firstfloor.org Link: http://lkml.kernel.org/r/20170923130016.21448-24-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8cef59bad29344aca0e2e6b0ad18dadd078fd0 Author: kbuild test robot Date: Sat Sep 23 15:00:05 2017 +0200 x86/fpu: Fix boolreturn.cocci warnings arch/x86/kernel/fpu/xstate.c:931:9-10: WARNING: return of 0/1 in function 'xfeatures_mxcsr_quirk' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Yu-cheng Yu Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Link: http://lkml.kernel.org/r/20170306004553.GA25764@lkp-wsm-ep1 Link: http://lkml.kernel.org/r/20170923130016.21448-23-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0852b374173bb57f870d78e6c6839c77b339be5f Author: Rik van Riel Date: Sat Sep 23 15:00:04 2017 +0200 x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs On Skylake CPUs I noticed that XRSTOR is unable to deal with states created by copyout_from_xsaves() if the xstate has only SSE/YMM state, and no FP state. That is, xfeatures had XFEATURE_MASK_SSE set, but not XFEATURE_MASK_FP. The reason is that part of the SSE/YMM state lives in the MXCSR and MXCSR_FLAGS fields of the FP state. Ensure that whenever we copy SSE or YMM state around, the MXCSR and MXCSR_FLAGS fields are also copied around. Signed-off-by: Rik van Riel Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170210085445.0f1cc708@annuminas.surriel.com Link: http://lkml.kernel.org/r/20170923130016.21448-22-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/types.h | 3 +++ arch/x86/kernel/fpu/xstate.c | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 99dc26bda233ee722bbd370bddf20beece3ffb93 Author: Ingo Molnar Date: Sat Sep 23 15:00:03 2017 +0200 x86/fpu: Remove struct fpu::fpregs_active The previous changes paved the way for the removal of the fpu::fpregs_active state flag - we now only have the fpu::fpstate_active and fpu::last_cpu fields left. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-21-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 5 ----- arch/x86/include/asm/fpu/types.h | 23 ----------------------- arch/x86/include/asm/trace/fpu.h | 5 +---- arch/x86/kernel/fpu/core.c | 9 --------- arch/x86/kernel/fpu/signal.c | 2 -- 5 files changed, 1 insertion(+), 43 deletions(-) commit 6cf4edbe0526db311a28734609da888fdfcb3604 Author: Ingo Molnar Date: Sat Sep 23 15:00:02 2017 +0200 x86/fpu: Decouple fpregs_activate()/fpregs_deactivate() from fpu->fpregs_active The fpregs_activate()/fpregs_deactivate() are currently called in such a pattern: if (!fpu->fpregs_active) fpregs_activate(fpu); ... if (fpu->fpregs_active) fpregs_deactivate(fpu); But note that it's actually safe to call them without checking the flag first. This further decouples the fpu->fpregs_active flag from actual FPU logic. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-20-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 7 +------ arch/x86/kernel/fpu/core.c | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) commit f1c8cd0176078c7bcafdc89cac447cab672a0b5e Author: Ingo Molnar Date: Sat Sep 23 15:00:01 2017 +0200 x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active We want to simplify the FPU state machine by eliminating fpu->fpregs_active, and we can do that because the two state flags (::fpregs_active and ::fpstate_active) are set essentially together. The old lazy FPU switching code used to make a distinction - but there's no lazy switching code anymore, we always switch in an 'eager' fashion. Do this by first changing all substantial uses of fpu->fpregs_active to fpu->fpstate_active and adding a few debug checks to double check our assumption is correct. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-19-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 4 +++- arch/x86/kernel/fpu/core.c | 16 ++++++++++------ arch/x86/kernel/fpu/signal.c | 4 +++- arch/x86/mm/pkeys.c | 3 +-- 4 files changed, 17 insertions(+), 10 deletions(-) commit b6aa85558d7e7b18fc3470d2bc1731d2205dd275 Author: Ingo Molnar Date: Sat Sep 23 15:00:00 2017 +0200 x86/fpu: Split the state handling in fpu__drop() Prepare fpu__drop() to use fpu->fpregs_active. There are two distinct usecases for fpu__drop() in this context: exit_thread() when called for 'current' in exit(), and when called for another task in fork(). This patch does not change behavior, it only adds a couple of debug checks and structures the code to make the ->fpregs_active change more obviously correct. All the complications will be removed later on. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-18-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit a10b6a16cdad88170f546d008c77453cddf918e6 Author: Ingo Molnar Date: Sat Sep 23 14:59:59 2017 +0200 x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic Do this temporarily only, to make it easier to change the FPU state machine, in particular this change couples the fpu->fpregs_active and fpu->fpstate_active states: they are only set/cleared together (as far as the scheduler sees them). This will be removed by later patches. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-17-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 2 ++ 1 file changed, 2 insertions(+) commit b3a163081c28d1a4d1ad76259a9d93b34a82f1da Author: Ingo Molnar Date: Sat Sep 23 14:59:58 2017 +0200 x86/fpu: Simplify fpu->fpregs_active use The fpregs_active() inline function is pretty pointless - in almost all the callsites it can be replaced with a direct fpu->fpregs_active access. Do so and eliminate the extra layer of obfuscation. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-16-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 17 +---------------- arch/x86/kernel/fpu/core.c | 2 +- arch/x86/kernel/fpu/signal.c | 9 +++++---- arch/x86/mm/pkeys.c | 2 +- 4 files changed, 8 insertions(+), 22 deletions(-) commit 6d7f7da5533a3f841eeb1d9657257c9367924274 Author: Ingo Molnar Date: Sat Sep 23 14:59:57 2017 +0200 x86/fpu: Flip the parameter order in copy_*_to_xstate() Make it more consistent with regular memcpy() semantics, where the destination argument comes first. No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-15-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 ++-- arch/x86/kernel/fpu/regset.c | 4 ++-- arch/x86/kernel/fpu/signal.c | 2 +- arch/x86/kernel/fpu/xstate.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 7b9094c688f807c110a2dab6f6edc5876bfa7b0b Author: Ingo Molnar Date: Sat Sep 23 14:59:56 2017 +0200 x86/fpu: Remove 'kbuf' parameter from the copy_user_to_xstate() API No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-14-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 2 +- arch/x86/kernel/fpu/regset.c | 2 +- arch/x86/kernel/fpu/signal.c | 11 ++++------- arch/x86/kernel/fpu/xstate.c | 19 +++++-------------- 4 files changed, 11 insertions(+), 23 deletions(-) commit 59dffa4edba1f15b2bfdbe608aca1efe664c674c Author: Ingo Molnar Date: Sat Sep 23 14:59:55 2017 +0200 x86/fpu: Remove 'ubuf' parameter from the copy_kernel_to_xstate() API No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-13-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 2 +- arch/x86/kernel/fpu/regset.c | 2 +- arch/x86/kernel/fpu/xstate.c | 17 +++-------------- 3 files changed, 5 insertions(+), 16 deletions(-) commit 79fecc2b7506f29fb91becc65e8788e5ae7eba9f Author: Ingo Molnar Date: Sat Sep 23 14:59:54 2017 +0200 x86/fpu: Split copy_user_to_xstate() into copy_kernel_to_xstate() & copy_user_to_xstate() Similar to: x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-12-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 +-- arch/x86/kernel/fpu/regset.c | 10 ++++-- arch/x86/kernel/fpu/xstate.c | 66 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 6 deletions(-) commit 8c0817f4a3188ac5485ce14f96f12a175800b881 Author: Ingo Molnar Date: Sat Sep 23 14:59:53 2017 +0200 x86/fpu: Simplify __copy_xstate_to_kernel() return values __copy_xstate_to_kernel() can only return 0 (because kernel copies cannot fail), simplify the code throughout. No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-11-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 6ff15f8db7eaf29ef5ead6afbec9b25485fe8703 Author: Ingo Molnar Date: Sat Sep 23 14:59:52 2017 +0200 x86/fpu: Change 'size_total' parameter to unsigned and standardize the size checks in copy_xstate_to_*() 'size_total' is derived from an unsigned input parameter - and then converted to 'int' and checked for negative ranges: if (size_total < 0 || offset < size_total) { This conversion and the checks are unnecessary obfuscation, reject overly large requested copy sizes outright and simplify the underlying code. Reported-by: Rik van Riel Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-10-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 56583c9a1400fe1935edd55b24b4fbbc779b59cb Author: Ingo Molnar Date: Sat Sep 23 14:59:51 2017 +0200 x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods Right now there's a confusing mixture of 'offset' and 'size' parameters: - __copy_xstate_to_*() input parameter 'end_pos' not not really an offset, but the full size of the copy to be performed. - input parameter 'count' to copy_xstate_to_*() shadows that of __copy_xstate_to_*()'s 'count' parameter name - but the roles are different: the first one is the total number of bytes to be copied, while the second one is a partial copy size. To unconfuse all this, use a consistent set of parameter names: - 'size' is the partial copy size within a single xstate component - 'size_total' is the total copy requested - 'offset_start' is the requested starting offset. - 'offset' is the offset within an xstate component. No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-9-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 ++-- arch/x86/kernel/fpu/xstate.c | 44 +++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 24 deletions(-) commit 8a5b731889cbf004b406d988dc591c8a7aac773e Author: Ingo Molnar Date: Sat Sep 23 14:59:50 2017 +0200 x86/fpu: Remove the 'start_pos' parameter from the __copy_xstate_to_*() functions 'start_pos' is always 0, so remove it and remove the pointless check of 'pos < 0' which can not ever be true as 'pos' is unsigned ... No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-8-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit becb2bb72ff906cc0d2bac3ee9574f694364823b Author: Ingo Molnar Date: Sat Sep 23 14:59:49 2017 +0200 x86/fpu: Clean up the parameter definitions of copy_xstate_to_*() Remove pointless 'const' of non-pointer input parameter. Remove unnecessary parenthesis that shows uncertainty about arithmetic operator precedence. Clarify copy_xstate_to_user() description. No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-7-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d7eda6c99cc75f1c41d67abf988f37a10045a370 Author: Ingo Molnar Date: Sat Sep 23 14:59:48 2017 +0200 x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs Parameter ordering is weird: int copy_xstate_to_kernel(unsigned int pos, unsigned int count, void *kbuf, struct xregs_state *xsave); int copy_xstate_to_user(unsigned int pos, unsigned int count, void __user *ubuf, struct xregs_state *xsave); 'pos' and 'count', which are attributes of the destination buffer, are listed before the destination buffer itself ... List them after the primary arguments instead. This makes the code more similar to regular memcpy() variant APIs. No change in functionality. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-6-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 ++-- arch/x86/kernel/fpu/regset.c | 4 ++-- arch/x86/kernel/fpu/xstate.c | 25 ++++++++++++------------- 3 files changed, 16 insertions(+), 17 deletions(-) commit a69c158fb3e7a91220f55029bf222a4e678d16e9 Author: Ingo Molnar Date: Sat Sep 23 14:59:47 2017 +0200 x86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs The 'kbuf' parameter is unused in the _user() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-5-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 2 +- arch/x86/kernel/fpu/regset.c | 2 +- arch/x86/kernel/fpu/xstate.c | 25 +++++++------------------ 3 files changed, 9 insertions(+), 20 deletions(-) commit 4d981cf2d96f29cdfa7d4972c8b377fe7baa9c4c Author: Ingo Molnar Date: Sat Sep 23 14:59:46 2017 +0200 x86/fpu: Remove 'ubuf' parameter from the copy_xstate_to_kernel() APIs The 'ubuf' parameter is unused in the _kernel() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-4-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 2 +- arch/x86/kernel/fpu/regset.c | 2 +- arch/x86/kernel/fpu/xstate.c | 21 ++++++--------------- 3 files changed, 8 insertions(+), 17 deletions(-) commit f0d4f30a7fd299587840a028655285a87f334904 Author: Ingo Molnar Date: Sat Sep 23 14:59:45 2017 +0200 x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() copy_xstate_to_user() is a weird API - in part due to a bad API inherited from the regset APIs. But don't propagate that bad API choice into the FPU code - so as a first step split the API into kernel and user buffer handling routines. (Also split the xstate_copyout() internal helper.) The split API is a dumb duplication that should be obviously correct, the real splitting will be done in the next patch. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-3-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 +- arch/x86/kernel/fpu/regset.c | 5 +- arch/x86/kernel/fpu/xstate.c | 110 +++++++++++++++++++++++++++++++++++--- 3 files changed, 109 insertions(+), 10 deletions(-) commit 656f083116a4799d8c0194976b8a2d66bf306538 Author: Ingo Molnar Date: Sat Sep 23 14:59:44 2017 +0200 x86/fpu: Rename copyin_to_xsaves()/copyout_from_xsaves() to copy_user_to_xstate()/copy_xstate_to_user() The 'copyin/copyout' nomenclature needlessly departs from what the modern FPU code uses, which is: copy_fpregs_to_fpstate() copy_fpstate_to_sigframe() copy_fregs_to_user() copy_fxregs_to_kernel() copy_fxregs_to_user() copy_kernel_to_fpregs() copy_kernel_to_fregs() copy_kernel_to_fxregs() copy_kernel_to_xregs() copy_user_to_fregs() copy_user_to_fxregs() copy_user_to_xregs() copy_xregs_to_kernel() copy_xregs_to_user() I.e. according to this pattern, the following rename should be done: copyin_to_xsaves() -> copy_user_to_xstate() copyout_from_xsaves() -> copy_xstate_to_user() or, if we want to be pedantic, denote that that the user-space format is ptrace: copyin_to_xsaves() -> copy_user_ptrace_to_xstate() copyout_from_xsaves() -> copy_xstate_to_user_ptrace() But I'd suggest the shorter, non-pedantic name. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-2-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 4 ++-- arch/x86/kernel/fpu/regset.c | 4 ++-- arch/x86/kernel/fpu/signal.c | 2 +- arch/x86/kernel/fpu/xstate.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit fb154e0e0a95249459df054241a9e8f4cca56062 Author: Michal Suchanek Date: Fri Feb 24 20:35:16 2017 +0100 tpm: ibmvtpm: simplify crq initialization and document crq format The crq is passed in registers and is the same on BE and LE hosts. However, current implementation allocates a structure on-stack to represent the crq, initializes the members swapping them to BE, and loads the structure swapping it from BE. This is pointless and causes GCC warnings about ununitialized members. Get rid of the structure and the warnings. Signed-off-by: Michal Suchanek Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm_ibmvtpm.c | 96 ++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 36 deletions(-) commit 9f3fc7bcddcb51234e23494531f93ab60475e1c3 Author: Hamza Attak Date: Mon Aug 14 19:09:16 2017 +0100 tpm: replace msleep() with usleep_range() in TPM 1.2/2.0 generic drivers The patch simply replaces all msleep function calls with usleep_range calls in the generic drivers. Tested with an Infineon TPM 1.2, using the generic tpm-tis module, for a thousand PCR extends, we see results going from 1m57s unpatched to 40s with the new patch. We obtain similar results when using the original and patched tpm_infineon driver, which is also part of the patch. Similarly with a STM TPM 2.0, using the CRB driver, it takes about 20ms per extend unpatched and around 7ms with the new patch. Note that the PCR consistency is untouched with this patch, each TPM has been tested with 10 million extends and the aggregated PCR value is continuously verified to be correct. As an extension of this work, this could potentially and easily be applied to other vendor's drivers. Still, these changes are not included in the proposed patch as they are untested. Signed-off-by: Hamza Attak Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-interface.c | 10 +++++----- drivers/char/tpm/tpm.h | 9 ++++++++- drivers/char/tpm/tpm2-cmd.c | 2 +- drivers/char/tpm/tpm_infineon.c | 6 +++--- drivers/char/tpm/tpm_tis_core.c | 8 ++++---- 5 files changed, 21 insertions(+), 14 deletions(-) commit 5d0e4d78149b9745ea34848e950e734f7db3b95f Author: Enric Balletbo i Serra Date: Tue Jun 27 12:27:23 2017 +0200 Documentation: tpm: add powered-while-suspended binding documentation Add a new powered-while-suspended property to control the behavior of the TPM suspend/resume. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Sonny Rao Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Acked-by: Rob Herring Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit e1ec650f9ae7d1e66f77bf14c86e4e9dc629a4d5 Author: Arvind Yadav Date: Thu Jul 6 23:18:39 2017 +0530 tpm: tpm_crb: constify acpi_device_id. acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 4198 608 0 4806 12c6 drivers/char/tpm/tpm_crb.o File size After adding 'const': text data bss dec hex filename 4262 520 0 4782 12ae drivers/char/tpm/tpm_crb.o Signed-off-by: Arvind Yadav Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm_crb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2a9c4bf034ab7415ec272c4c86f1c0b796f80e6 Author: Arvind Yadav Date: Thu Aug 17 23:04:21 2017 +0530 tpm: vtpm: 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 Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm_ibmvtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab5348c9c23cd253f5902980d2d8fe067dc24c82 Author: Stefan Berger Date: Wed Jul 26 22:27:05 2017 -0400 security: fix description of values returned by cap_inode_need_killpriv cap_inode_need_killpriv returns 1 if security.capability exists and has a value and inode_killpriv() is required, 0 otherwise. Fix the description of the return value to reflect this. Signed-off-by: Stefan Berger Reviewed-by: Serge Hallyn Signed-off-by: James Morris security/commoncap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c346525d3591cb032eca86d0f904cc01f1069ff Author: Subash Abhinov Kasiviswanathan Date: Thu Sep 21 18:00:36 2017 -0600 net: qualcomm: rmnet: Fix rcu splat in rmnet_is_real_dev_registered Xiaolong reported a suspicious rcu_dereference_check in the device unregister notifier callback. Since we do not dereference the rx_handler_data, it's ok to just check for the value of the pointer. Note that this section is already protected by rtnl_lock. [ 101.364846] WARNING: suspicious RCU usage [ 101.365654] 4.13.0-rc6-01701-gceed73a #1 Not tainted [ 101.370873] ----------------------------- [ 101.372472] drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:57 suspicious rcu_dereference_check() usage! [ 101.374427] [ 101.374427] other info that might help us debug this: [ 101.374427] [ 101.387491] [ 101.387491] rcu_scheduler_active = 2, debug_locks = 1 [ 101.389368] 1 lock held by trinity-main/2809: [ 101.390736] #0: (rtnl_mutex){+.+.+.}, at: [<8146085b>] rtnl_lock+0xf/0x11 [ 101.395482] [ 101.395482] stack backtrace: [ 101.396948] CPU: 0 PID: 2809 Comm: trinity-main Not tainted 4.13.0-rc6-01701-gceed73a #1 [ 101.398857] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 101.401079] Call Trace: [ 101.401656] dump_stack+0xa1/0xeb [ 101.402871] lockdep_rcu_suspicious+0xc7/0xd0 [ 101.403665] rmnet_is_real_dev_registered+0x40/0x4e [ 101.405199] rmnet_config_notify_cb+0x2c/0x142 [ 101.406344] ? wireless_nlevent_flush+0x47/0x71 [ 101.407385] notifier_call_chain+0x2d/0x47 [ 101.408645] raw_notifier_call_chain+0xc/0xe [ 101.409882] call_netdevice_notifiers_info+0x41/0x49 [ 101.411402] call_netdevice_notifiers+0xc/0xe [ 101.412713] rollback_registered_many+0x268/0x36e [ 101.413702] rollback_registered+0x39/0x56 [ 101.414965] unregister_netdevice_queue+0x79/0x88 [ 101.415908] unregister_netdev+0x16/0x1d Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Reported-by: kernel test robot Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 05cf97e7a619fc7ede81ee6bb8ebfa7531b633f5 Author: Christophe JAILLET Date: Fri Sep 22 01:01:11 2017 +0200 cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' All the error handling paths 'goto error', except this one. We should also go to error in this case, or some resources will be leaking. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/cnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15516c89acce948debc4c598e03c3fee53045797 Author: Steven Rostedt (VMware) Date: Thu Sep 21 13:00:21 2017 -0400 tracing: Remove RCU work arounds from stack tracer Currently the stack tracer calls rcu_irq_enter() to make sure RCU is watching when it records a stack trace. But if the stack tracer is triggered while tracing inside of a rcu_irq_enter(), calling rcu_irq_enter() unconditionally can be problematic. The reason for having rcu_irq_enter() in the first place has been fixed from within the saving of the stack trace code, and there's no reason for doing it in the stack tracer itself. Just remove it. Cc: stable@vger.kernel.org Fixes: 0be964be0 ("module: Sanitize RCU usage and locking") Acked-by: Paul E. McKenney Suggested-by: "Paul E. McKenney" Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_stack.c | 15 --------------- 1 file changed, 15 deletions(-) commit e8cac8b1d10589be45671a5ade0926a639b543b7 Author: Steven Rostedt (VMware) Date: Fri Sep 22 17:36:32 2017 -0400 extable: Enable RCU if it is not watching in kernel_text_address() If kernel_text_address() is called when RCU is not watching, it can cause an RCU bug because is_module_text_address(), the is_kprobe_*insn_slot() and is_bpf_text_address() functions require the use of RCU. Only enable RCU if it is not currently watching before it calls is_module_text_address(). The use of rcu_nmi_enter() is used to enable RCU because kernel_text_address() can happen pretty much anywhere (like an NMI), and even from within an NMI. It is called via save_stack_trace() that can be called by any WARN() or tracing function, which can happen while RCU is not watching (for example, going to or coming from idle, or during CPU take down or bring up). Cc: stable@vger.kernel.org Fixes: 0be964be0 ("module: Sanitize RCU usage and locking") Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/extable.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) commit 9aadde91b3c035413c806619beb3e3ef6e697953 Author: Steven Rostedt (VMware) Date: Fri Sep 22 17:22:19 2017 -0400 extable: Consolidate *kernel_text_address() functions The functionality between kernel_text_address() and _kernel_text_address() is the same except that _kernel_text_address() does a little more (that function needs a rename, but that can be done another time). Instead of having duplicate code in both, simply have _kernel_text_address() calls kernel_text_address() instead. This is marked for stable because there's an RCU bug that can happen if one of these functions gets called while RCU is not watching. That fix depends on this fix to keep from having to write the fix twice. Cc: stable@vger.kernel.org Fixes: 0be964be0 ("module: Sanitize RCU usage and locking") Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/extable.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 28585a832602747cbfa88ad8934013177a3aae38 Author: Paul E. McKenney Date: Fri Sep 22 14:10:22 2017 -0700 rcu: Allow for page faults in NMI handlers A number of architecture invoke rcu_irq_enter() on exception entry in order to allow RCU read-side critical sections in the exception handler when the exception is from an idle or nohz_full CPU. This works, at least unless the exception happens in an NMI handler. In that case, rcu_nmi_enter() would already have exited the extended quiescent state, which would mean that rcu_irq_enter() would (incorrectly) cause RCU to think that it is again in an extended quiescent state. This will in turn result in lockdep splats in response to later RCU read-side critical sections. This commit therefore causes rcu_irq_enter() and rcu_irq_exit() to take no action if there is an rcu_nmi_enter() in effect, thus avoiding the unscheduled return to RCU quiescent state. This in turn should make the kernel safe for on-demand RCU voyeurism. Link: http://lkml.kernel.org/r/20170922211022.GA18084@linux.vnet.ibm.com Cc: stable@vger.kernel.org Fixes: 0be964be0 ("module: Sanitize RCU usage and locking") Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/rcu/tree.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 12c4b878e71fa8b65bc479b2460765c7d1d81a26 Author: Sakari Ailus Date: Fri Sep 22 12:32:38 2017 +0300 as3645a: Unregister indicator LED on device unbind The indicator LED was registered in probe but was not removed in driver remove callback. Fix this. Signed-off-by: Sakari Ailus Signed-off-by: Jacek Anaszewski drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) commit e626c325277531db15314b80610d1f5a1c2637b2 Author: Sakari Ailus Date: Fri Sep 22 12:32:37 2017 +0300 as3645a: Use integer numbers for parsing LEDs Use integer numbers for LEDs, 0 is the flash and 1 is the indicator. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski arch/arm/boot/dts/omap3-n950-n9.dtsi | 8 ++++++-- drivers/leds/leds-as3645a.c | 26 ++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) commit 75f9f7279e874ff95d1abe4613abc0826c9a8dcc Author: Sakari Ailus Date: Fri Sep 22 12:32:36 2017 +0300 dt: bindings: as3645a: Use LED number to refer to LEDs Use integers (reg property) to tell the number of the LED to the driver instead of the node name. While both of these approaches are currently used by the LED bindings, using integers will require less driver changes for ACPI support. Additionally, it will make possible LED naming using chip and LED node names, effectively making the label property most useful for human-readable names only. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/ams,as3645a.txt | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) commit af2e658fc08a397b10352265e50b83f27e25d73e Author: Sakari Ailus Date: Fri Sep 22 12:32:35 2017 +0300 as3645a: Use ams,input-max-microamp as documented in DT bindings DT bindings document the property "ams,input-max-microamp" that limits the chip's maximum input current. The driver and the DTS however used "peak-current-limit" property. Fix this by using the property documented in DT binding documentation. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski arch/arm/boot/dts/omap3-n950-n9.dtsi | 2 +- drivers/leds/leds-as3645a.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit db6321a1af8432df983048d2dd8529525589f71d Author: Geert Uytterhoeven Date: Mon Sep 11 08:35:36 2017 -0400 media: platform: VIDEO_QCOM_CAMSS should depend on HAS_DMA If NO_DMA=y: warning: (TOUCHSCREEN_SUR40 && VIDEO_TW68 && VIDEO_CX23885 && VIDEO_CX25821 && VIDEO_CX88 && VIDEO_SAA7134 && VIDEO_COBALT && VIDEO_QCOM_CAMSS) selects VIDEOBUF2_DMA_SG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA) and ERROR: "bad_dma_ops" [drivers/media/v4l2-core/videobuf2-dma-sg.ko] undefined! ERROR: "bad_dma_ops" [drivers/media/platform/qcom/camss-8x16/qcom-camss.ko] undefined! VIDEO_QCOM_CAMSS selects VIDEOBUF2_DMA_SG, which bypasses its dependency on HAS_DMA. Make VIDEO_QCOM_CAMSS depend on HAS_DMA to fix this. Fixes: f5c074947f56533c ("media: camss: Enable building") Signed-off-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd4175b11685b11c40e31a03e05084cc212b0649 Merge: ded8503 8c031ba Author: Linus Torvalds Date: Sat Sep 23 06:14:06 2017 -1000 Merge branch 'parisc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Unbreak parisc bootloader by avoiding a gcc-7 optimization to convert multiple byte-accesses into one word-access. - Add missing HWPOISON page fault handler code. I completely missed that when I added HWPOISON support during this merge window and it only showed up now with the madvise07 LTP test case. - Fix backtrace unwinding to stop when stack start has been reached. - Issue warning if initrd has been loaded into memory regions with broken RAM modules. - Fix HPMC handler (parisc hardware fault handler) to comply with architecture specification. - Avoid compiler warnings about too large frame sizes. - Minor init-section fixes. * 'parisc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Unbreak bootloader due to gcc-7 optimizations parisc: Reintroduce option to gzip-compress the kernel parisc: Add HWPOISON page fault handler code parisc: Move init_per_cpu() into init section parisc: Check if initrd was loaded into broken RAM parisc: Add PDCE_CHECK instruction to HPMC handler parisc: Add wrapper for pdc_instr() firmware function parisc: Move start_parisc() into init section parisc: Stop unwinding at start of stack parisc: Fix too large frame size warnings commit ded85032006d2d294cb32ed010c8fd3a13ef18cb Merge: 71aa60f 89aaca5 Author: Linus Torvalds Date: Sat Sep 23 05:47:04 2017 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: - Smattering of miscellanous fixes - A five patch series for i40iw that had a patch (5/5) that was larger than I would like, but I took it because it's needed for large scale users - An 8 patch series for bnxt_re that landed right as I was leaving on PTO and so had to wait until now...they are all appropriate fixes for -rc IMO * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (22 commits) bnxt_re: Don't issue cmd to delete GID for QP1 GID entry before the QP is destroyed bnxt_re: Fix memory leak in FRMR path bnxt_re: Remove RTNL lock dependency in bnxt_re_query_port bnxt_re: Fix race between the netdev register and unregister events bnxt_re: Free up devices in module_exit path bnxt_re: Fix compare and swap atomic operands bnxt_re: Stop issuing further cmds to FW once a cmd times out bnxt_re: Fix update of qplib_qp.mtu when modified i40iw: Add support for port reuse on active side connections i40iw: Add missing VLAN priority i40iw: Call i40iw_cm_disconn on modify QP to disconnect i40iw: Prevent multiple netdev event notifier registrations i40iw: Fail open if there are no available MSI-X vectors RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion IB/bnxt_re: Fix frame stack compilation warning IB/mlx5: fix debugfs cleanup IB/ocrdma: fix incorrect fall-through on switch statement IB/ipoib: Suppress the retry related completion errors iw_cxgb4: remove the stid on listen create failure iw_cxgb4: drop listen destroy replies if no ep found ... commit 71aa60f67f032dffe58999bd8ae4b2f38a9ea05e Merge: 79444df 4e683f4 Author: Linus Torvalds Date: Sat Sep 23 05:41:27 2017 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix NAPI poll list corruption in enic driver, from Christian Lamparter. 2) Fix route use after free, from Eric Dumazet. 3) Fix regression in reuseaddr handling, from Josef Bacik. 4) Assert the size of control messages in compat handling since we copy it in from userspace twice. From Meng Xu. 5) SMC layer bug fixes (missing RCU locking, bad refcounting, etc.) from Ursula Braun. 6) Fix races in AF_PACKET fanout handling, from Willem de Bruijn. 7) Don't use ARRAY_SIZE on spinlock array which might have zero entries, from Geert Uytterhoeven. 8) Fix miscomputation of checksum in ipv6 udp code, from Subash Abhinov Kasiviswanathan. 9) Push the ipv6 header properly in ipv6 GRE tunnel driver, from Xin Long. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits) 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 net: prevent dst uses after free net: phy: Fix truncation of large IRQ numbers in phy_attached_print() net/smc: no close wait in case of process shut down net/smc: introduce a delay net/smc: terminate link group if out-of-sync is received net/smc: longer delay for client link group removal net/smc: adapt send request completion notification net/smc: adjust net_device refcount net/smc: take RCU read lock for routing cache lookup net/smc: add receive timeout check net/smc: add missing dev_put net: stmmac: Cocci spatch "of_table" lan78xx: Use default values loaded from EEPROM/OTP after reset lan78xx: Allow EEPROM write for less than MAX_EEPROM_SIZE lan78xx: Fix for eeprom read/write when device auto suspend ... commit 79444df4e7f03843be78e4b9188d095931648842 Merge: c65da8e bf81100 Author: Linus Torvalds Date: Sat Sep 23 05:33:29 2017 -1000 Merge tag 'apparmor-pr-2017-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "This is the apparmor pull request, similar to SELinux and seccomp. It's the same series that I was sent to James' security tree + one regression fix that was found after the series was sent to James and would have been sent for v4.14-rc2. Features: - in preparation for secid mapping add support for absolute root view based labels - add base infastructure for socket mediation - add mount mediation - add signal mediation minor cleanups and changes: - be defensive, ensure unconfined profiles have dfas initialized - add more debug asserts to apparmorfs - enable policy unpacking to audit different reasons for failure - cleanup conditional check for label in label_print - Redundant condition: prev_ns. in [label.c:1498] Bug Fixes: - fix regression in apparmorfs DAC access permissions - fix build failure on sparc caused by undeclared signals - fix sparse report of incorrect type assignment when freeing label proxies - fix race condition in null profile creation - Fix an error code in aafs_create() - Fix logical error in verify_header() - Fix shadowed local variable in unpack_trans_table()" * tag 'apparmor-pr-2017-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix apparmorfs DAC access permissions apparmor: fix build failure on sparc caused by undeclared signals apparmor: fix incorrect type assignment when freeing proxies apparmor: ensure unconfined profiles have dfas initialized apparmor: fix race condition in null profile creation apparmor: move new_null_profile to after profile lookup fns() apparmor: add base infastructure for socket mediation apparmor: add more debug asserts to apparmorfs apparmor: make policy_unpack able to audit different info messages apparmor: add support for absolute root view based labels apparmor: cleanup conditional check for label in label_print apparmor: add mount mediation apparmor: add the ability to mediate signals apparmor: Redundant condition: prev_ns. in [label.c:1498] apparmor: Fix an error code in aafs_create() apparmor: Fix logical error in verify_header() apparmor: Fix shadowed local variable in unpack_trans_table() commit f5caf621ee357279e759c0911daf6d55c7d36f03 Author: Josh Poimboeuf Date: Wed Sep 20 16:24:33 2017 -0500 x86/asm: Fix inline asm call constraints for Clang For inline asm statements which have a CALL instruction, we list the stack pointer as a constraint to convince GCC to ensure the frame pointer is set up first: static inline void foo() { register void *__sp asm(_ASM_SP); asm("call bar" : "+r" (__sp)) } Unfortunately, that pattern causes Clang to corrupt the stack pointer. The fix is easy: convert the stack pointer register variable to a global variable. It should be noted that the end result is different based on the GCC version. With GCC 6.4, this patch has exactly the same result as before: defconfig defconfig-nofp distro distro-nofp before 9820389 9491555 8816046 8516940 after 9820389 9491555 8816046 8516940 With GCC 7.2, however, GCC's behavior has changed. It now changes its behavior based on the conversion of the register variable to a global. That somehow convinces it to *always* set up the frame pointer before inserting *any* inline asm. (Therefore, listing the variable as an output constraint is a no-op and is no longer necessary.) It's a bit overkill, but the performance impact should be negligible. And in fact, there's a nice improvement with frame pointers disabled: defconfig defconfig-nofp distro distro-nofp before 9796316 9468236 9076191 8790305 after 9796957 9464267 9076381 8785949 So in summary, while listing the stack pointer as an output constraint is no longer necessary for newer versions of GCC, it's still needed for older versions. Suggested-by: Andrey Ryabinin Reported-by: Matthias Kaehlcke Signed-off-by: Josh Poimboeuf Cc: Alexander Potapenko Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dmitriy Vyukov Cc: Linus Torvalds Cc: Miguel Bernal Marin Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3db862e970c432ae823cf515c52b54fec8270e0e.1505942196.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/alternative.h | 3 +-- arch/x86/include/asm/asm.h | 11 +++++++++++ arch/x86/include/asm/mshyperv.h | 10 ++++------ arch/x86/include/asm/paravirt_types.h | 14 +++++++------- arch/x86/include/asm/preempt.h | 15 +++++---------- arch/x86/include/asm/processor.h | 6 ++---- arch/x86/include/asm/rwsem.h | 4 ++-- arch/x86/include/asm/uaccess.h | 4 ++-- arch/x86/include/asm/xen/hypercall.h | 5 ++--- arch/x86/kvm/emulate.c | 3 +-- arch/x86/kvm/vmx.c | 3 +-- arch/x86/mm/fault.c | 3 +-- tools/objtool/Documentation/stack-validation.txt | 6 +++--- 13 files changed, 42 insertions(+), 45 deletions(-) commit 0d0970eef3b03ef08b19da5bc3044410731cf38f Author: Josh Poimboeuf Date: Wed Sep 20 16:24:32 2017 -0500 objtool: Handle another GCC stack pointer adjustment bug The kbuild bot reported the following warning with GCC 4.4 and a randconfig: net/socket.o: warning: objtool: compat_sock_ioctl()+0x1083: stack state mismatch: cfa1=7+160 cfa2=-1+0 This is caused by another GCC non-optimization, where it backs up and restores the stack pointer for no apparent reason: 2f91: 48 89 e0 mov %rsp,%rax 2f94: 4c 89 e7 mov %r12,%rdi 2f97: 4c 89 f6 mov %r14,%rsi 2f9a: ba 20 00 00 00 mov $0x20,%edx 2f9f: 48 89 c4 mov %rax,%rsp This issue would have been happily ignored before the following commit: dd88a0a0c861 ("objtool: Handle GCC stack pointer adjustment bug") But now that objtool is paying attention to such stack pointer writes to/from a register, it needs to understand them properly. In this case that means recognizing that the "mov %rsp, %rax" instruction is potentially a backup of the stack pointer. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dmitriy Vyukov Cc: Linus Torvalds Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: dd88a0a0c861 ("objtool: Handle GCC stack pointer adjustment bug") Link: http://lkml.kernel.org/r/8c7aa8e9a36fbbb6655d9d8e7cea58958c912da8.1505942196.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 6 +++--- tools/objtool/check.c | 43 +++++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 17 deletions(-) commit 845d6524d69b40bd6abd61dc1264a8657159aa55 Author: Jose Abreu Date: Thu Sep 14 11:23:38 2017 -0400 media: cec: Respond to unregistered initiators, when applicable Running CEC 1.4 compliance test we get the following error on test 11.1.6.2: "ERROR: The DUT did not broadcast a message to the unregistered device." Fix this by letting GIVE_PHYSICAL_ADDR message respond to unregistered device. Also, GIVE_DEVICE_VENDOR_ID and GIVE_FEATURES fall in the same category so, respond also to these messages. With this fix we pass CEC 1.4 official compliance. Signed-off-by: Jose Abreu Cc: Joao Pinto Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit e949f61461ab83b094cad564c89a8d2b078b4508 Author: Hans Verkuil Date: Thu Aug 31 12:56:10 2017 -0400 media: s5p-cec: add NACK detection support The s5p-cec driver returned CEC_TX_STATUS_ERROR for the NACK condition. Some digging into the datasheet uncovered the S5P_CEC_TX_STAT1 register where bit 0 indicates if the transmit was nacked or not. Use this to return the correct CEC_TX_STATUS_NACK status to userspace. This was the only driver that couldn't tell a NACK from another error, and that was very unusual. And a potential problem for applications as well. Tested with my Odroid-U3. Signed-off-by: Hans Verkuil Acked-by: Sylwester Nawrocki Cc: # for v4.12 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c | 3 ++- drivers/media/platform/s5p-cec/s5p_cec.c | 11 ++++++++++- drivers/media/platform/s5p-cec/s5p_cec.h | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 81b79c71e546fc15e95e804de2497a448cc51a47 Author: Laurent Pinchart Date: Wed Aug 30 13:14:36 2017 -0400 media: staging/imx: Fix uninitialized variable warning The ret variable can be returned uninitialized in the imx_media_create_pad_vdev_lists() function is imxmd->num_vdevs is zero. Fix it. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b62ccdbc797ae42342bd6ca15719362d2543d24 Author: Colin Ian King Date: Tue Aug 29 06:21:10 2017 -0400 media: qcom: camss: Make function vfe_set_selection static The function vfe_set_selection is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: warning: symbol 'vfe_set_selection' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbd770aee018c8f46d8f43263928440d5ac04b36 Author: Stanimir Varbanov Date: Tue Aug 29 04:19:43 2017 -0400 media: venus: init registered list on streamoff Add missing init_list_head for the registered buffer list. Absence of the init could lead to a unhandled kernel paging request as below, when streamon/streamoff are called in row. [338046.571321] Unable to handle kernel paging request at virtual address fffffffffffffe00 [338046.574849] pgd = ffff800034820000 [338046.582381] [fffffffffffffe00] *pgd=00000000b60f5003[338046.582545] , *pud=00000000b1f31003 , *pmd=0000000000000000[338046.592082] [338046.597754] Internal error: Oops: 96000004 [#1] PREEMPT SMP [338046.601671] Modules linked in: venus_enc venus_dec venus_core usb_f_ecm g_ether usb_f_rndis u_ether libcomposite ipt_MASQUERADE nf_nat_masquerade_ipv4 arc4 wcn36xx mac80211 btqcomsmd btqca iptable_nat nf_co] [338046.662408] CPU: 0 PID: 5433 Comm: irq/160-venus Tainted: G W 4.9.39+ #232 [338046.668024] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [338046.675268] task: ffff80003541cb00 task.stack: ffff800026e20000 [338046.682097] PC is at venus_helper_release_buf_ref+0x28/0x88 [venus_core] [338046.688282] LR is at vdec_event_notify+0xe8/0x150 [venus_dec] [338046.695029] pc : [] lr : [] pstate: a0000145 [338046.701256] sp : ffff800026e23bc0 [338046.708494] x29: ffff800026e23bc0 x28: 0000000000000000 [338046.718853] x27: ffff000000afd4f8 x26: ffff800031faa700 [338046.729253] x25: ffff000000afd790 x24: ffff800031faa618 [338046.739664] x23: ffff800003e18138 x22: ffff800002fc9810 [338046.750109] x21: ffff800026e23c28 x20: 0000000000000001 [338046.760592] x19: ffff80002a13b800 x18: 0000000000000010 [338046.771099] x17: 0000ffffa3d01600 x16: ffff000008100428 [338046.781654] x15: 0000000000000006 x14: ffff000089045ba7 [338046.792250] x13: ffff000009045bb6 x12: 00000000004f37c8 [338046.802894] x11: 0000000000267211 x10: 0000000000000000 [338046.813574] x9 : 0000000000032000 x8 : 00000000dc400000 [338046.824274] x7 : 0000000000000000 x6 : ffff800031faa728 [338046.835005] x5 : ffff80002a13b850 x4 : 0000000000000000 [338046.845793] x3 : fffffffffffffdf8 x2 : 0000000000000000 [338046.856602] x1 : 0000000000000003 x0 : ffff80002a13b800 Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 1 + 1 file changed, 1 insertion(+) commit b4756707152700c96acdfe149cb1ca4cec306c7a Author: Sean Young Date: Sat Sep 2 07:42:42 2017 -0400 media: dvb: i2c transfers over usb cannot be done from stack Since commit 29d2fef8be11 ("usb: catch attempts to submit urbs with a vmalloc'd transfer buffer"), the AverMedia AverTV DVB-T USB 2.0 (a800) fails to probe. Cc: stable@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib3000mc.c | 50 ++++++++++++++++++++++------ drivers/media/dvb-frontends/dvb-pll.c | 22 +++++++++--- drivers/media/tuners/mt2060.c | 59 ++++++++++++++++++++++++++------- 3 files changed, 103 insertions(+), 28 deletions(-) commit c65da8e22b1d1d8869af69d287fd699c31d2dd58 Merge: 6876eb3 672d0e4 Author: Linus Torvalds Date: Fri Sep 22 17:40:11 2017 -1000 Merge tag 'acpi-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix the initialization of resources in the ACPI WDAT watchdog driver, a recent regression in the ACPI device properties handling, a recent change in behavior causing the ACPI_HANDLE() macro to only work for GPL code and create a MAINTAINERS entry for ACPI PMIC drivers in order to specify the official reviewers for that code. Specifics: - Fix the initialization of resources in the ACPI WDAT watchdog driver that uses unititialized memory which causes compiler warnings to be triggered (Arnd Bergmann). - Fix a recent regression in the ACPI device properties handling that causes some device properties data to be skipped during enumeration (Sakari Ailus). - Fix a recent change in behavior that caused the ACPI_HANDLE() macro to stop working for non-GPL code which is a problem for the NVidia binary graphics driver, for example (John Hubbard). - Add a MAINTAINERS entry for the ACPI PMIC drivers to specify the official reviewers for that code (Rafael Wysocki)" * tag 'acpi-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: properties: Return _DSD hierarchical extension (data) sub-nodes correctly ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again ACPI / watchdog: properly initialize resources ACPI / PMIC: Add code reviewers to MAINTAINERS commit 4e683f499a15cd777d3cb51aaebe48d72334c852 Merge: 581fe0e fbed24b Author: David S. Miller Date: Fri Sep 22 20:33:18 2017 -0700 Merge branch 'net-fix-reuseaddr-regression' Josef Bacik says: ==================== net: fix reuseaddr regression I introduced a regression when reworking the fastreuse port stuff that allows bind conflicts to occur once a reuseaddr successfully opens on an existing tb. The root cause is I reversed an if statement which caused us to set the tb as if there were no owners on the socket if there were, which obviously is not correct. Dave could you please queue these changes up for -stable, I've run them through the net tests and added another test to check for this problem specifically. ==================== Signed-off-by: David S. Miller commit fbed24bcc69d3e48c5402c371f19f5c7688871e5 Author: Josef Bacik Date: Fri Sep 22 20:20:08 2017 -0400 inet: fix improper empty comparison When doing my reuseport rework I screwed up and changed a if (hlist_empty(&tb->owners)) to if (!hlist_empty(&tb->owners)) This is obviously bad as all of the reuseport/reuse logic was reversed, which caused weird problems like allowing an ipv4 bind conflict if we opened an ipv4 only socket on a port followed by an ipv6 only socket on the same port. Fixes: b9470c27607b ("inet: kill smallest_size and smallest_port") Reported-by: Cole Robinson Signed-off-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a56673b58f2414679e926bba80309a037a4fd35 Author: Josef Bacik Date: Fri Sep 22 20:20:07 2017 -0400 net: use inet6_rcv_saddr to compare sockets In ipv6_rcv_saddr_equal() we need to use inet6_rcv_saddr(sk) for the ipv6 compare with the fast socket information to make sure we're doing the proper comparisons. Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robinson Signed-off-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbb2fb5c72f48d3029c144be0f0e61da1c7bccf7 Author: Josef Bacik Date: Fri Sep 22 20:20:06 2017 -0400 net: set tb->fast_sk_family We need to set the tb->fast_sk_family properly so we can use the proper comparison function for all subsequent reuseport bind requests. Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robinson Signed-off-by: Josef Bacik Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 2 ++ 1 file changed, 2 insertions(+) commit 581fe0ea61584d88072527ae9fb9dcb9d1f2783e Author: Willem de Bruijn Date: Fri Sep 22 19:42:37 2017 -0400 net: orphan frags on stand-alone ptype in dev_queue_xmit_nit Zerocopy skbs frags are copied when the skb is looped to a local sock. Commit 1080e512d44d ("net: orphan frags on receive") introduced calls to skb_orphan_frags to deliver_skb and __netif_receive_skb for this. With msg_zerocopy, these skbs can also exist in the tx path and thus loop from dev_queue_xmit_nit. This already calls deliver_skb in its loop. But it does not orphan before a separate pt_prev->func(). Add the missing skb_orphan_frags_rx. Changes v1->v2: handle skb_orphan_frags_rx failure Fixes: 1f8b977ab32d ("sock: enable MSG_ZEROCOPY") Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6876eb3720813560c4c6728d6347da6558c53df7 Merge: d32e5f4 d84c97f Author: Linus Torvalds Date: Fri Sep 22 17:28:59 2017 -1000 Merge tag 'pm-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a cpufreq regression introduced by recent changes related to the generic DT driver, an initialization time memory leak in cpuidle on ARM, a PM core bug that may cause system suspend/resume to fail on some systems, a request type validation issue in the PM QoS framework and two documentation-related issues. Specifics: - Fix a regression in cpufreq on systems using DT as the source of CPU configuration information where two different code paths attempt to create the cpufreq-dt device object (there can be only one) and fix up the "compatible" matching for some TI platforms on top of that (Viresh Kumar, Dave Gerlach). - Fix an initialization time memory leak in cpuidle on ARM which occurs if the cpuidle driver initialization fails (Stefan Wahren). - Fix a PM core function that checks whether or not there are any system suspend/resume callbacks for a device, but forgets to check legacy callbacks which then may be skipped incorrectly and the system may crash and/or the device may become unusable after a suspend-resume cycle (Rafael Wysocki). - Fix request type validation for latency tolerance PM QoS requests which may lead to unexpected behavior (Jan Schönherr). - Fix a broken link to PM documentation from a header file and a typo in a PM document (Geert Uytterhoeven, Rafael Wysocki)" * tag 'pm-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: ti-cpufreq: Support additional am43xx platforms ARM: cpuidle: Avoid memleak if init fail cpufreq: dt-platdev: Add some missing platforms to the blacklist PM: core: Fix device_pm_check_callbacks() PM: docs: Drop an excess character from devices.rst PM / QoS: Use the correct variable to check the QoS request type driver core: Fix link to device power management documentation commit d32e5f44a5aeb9c1febaf16db45bf888a3f66725 Merge: c0a3a64 05f5c38 Author: Linus Torvalds Date: Fri Sep 22 17:23:41 2017 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - fixes for two long standing issues (lock up and a crash) in force feedback handling in uinput driver - tweak to firmware update timing in Elan I2C touchpad driver. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - extend Flash-Write delay Input: uinput - avoid crash when sending FF request to device going away Input: uinput - avoid FF flush when destroying device commit c0a3a64e723324ae6dda53214061a71de63808c3 Merge: 69c902f5 6849243 Author: Linus Torvalds Date: Fri Sep 22 16:16:41 2017 -1000 Merge tag 'seccomp-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: "Major additions: - sysctl and seccomp operation to discover available actions (tyhicks) - new per-filter configurable logging infrastructure and sysctl (tyhicks) - SECCOMP_RET_LOG to log allowed syscalls (tyhicks) - SECCOMP_RET_KILL_PROCESS as the new strictest possible action - self-tests for new behaviors" [ This is the seccomp part of the security pull request during the merge window that was nixed due to unrelated problems - Linus ] * tag 'seccomp-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: samples: Unrename SECCOMP_RET_KILL selftests/seccomp: Test thread vs process killing seccomp: Implement SECCOMP_RET_KILL_PROCESS action seccomp: Introduce SECCOMP_RET_KILL_PROCESS seccomp: Rename SECCOMP_RET_KILL to SECCOMP_RET_KILL_THREAD seccomp: Action to log before allowing seccomp: Filter flag to log all actions except SECCOMP_RET_ALLOW seccomp: Selftest for detection of filter flag support seccomp: Sysctl to configure actions that are allowed to be logged seccomp: Operation for checking if an action is available seccomp: Sysctl to display available actions seccomp: Provide matching filter for introspection selftests/seccomp: Refactor RET_ERRNO tests selftests/seccomp: Add simple seccomp overhead benchmark selftests/seccomp: Add tests for basic ptrace actions commit 69c902f597c4bec92013a526268620fb6255c24a Merge: b03fcfa 1013e76 Author: Linus Torvalds Date: Fri Sep 22 16:11:48 2017 -1000 Merge tag '4.14-smb3-fixes-from-recent-test-events-for-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various SMB3 fixes for stable and security improvements from the recently completed SMB3/Samba test events * tag '4.14-smb3-fixes-from-recent-test-events-for-stable' of git://git.samba.org/sfrench/cifs-2.6: SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags SMB3: handle new statx fields SMB: Validate negotiate (to protect against downgrade) even if signing off cifs: release auth_key.response for reconnect. cifs: release cifs root_cred after exit_cifs CIFS: make arrays static const, reduces object code size [SMB3] Update session and share information displayed for debugging SMB2/SMB3 cifs: show 'soft' in the mount options for hard mounts SMB3: Warn user if trying to sign connection that authenticated as guest SMB3: Fix endian warning Fix SMB3.1.1 guest authentication to Samba commit b03fcfaef3538390cfb5e8d268fcdc5c828af1c7 Merge: e2577d2 717e6f2 Author: Linus Torvalds Date: Fri Sep 22 16:09:31 2017 -1000 Merge tag 'ceph-for-4.14-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two small but important fixes: RADOS semantic change in upcoming v12.2.1 release and a rare NULL dereference in create_session_open_msg()" * tag 'ceph-for-4.14-rc2' of git://github.com/ceph/ceph-client: ceph: avoid panic in create_session_open_msg() if utsname() returns NULL libceph: don't allow bidirectional swap of pg-upmap-items commit b9b95da92de9d498ece7e6a82e2d6dcfc76fd9d8 Author: Stefan Schmidt Date: Fri Sep 22 14:28:46 2017 +0200 MAINTAINERS: update git tree locations for ieee802154 subsystem Patches for ieee802154 will go through my new trees towards netdev from now on. The 6LoWPAN subsystem will stay as is (shared between ieee802154 and bluetooth) and go through the bluetooth tree as usual. Signed-off-by: Stefan Schmidt Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1013e760d10e614dc10b5624ce9fc41563ba2e65 Author: Steve French Date: Fri Sep 22 01:40:27 2017 -0500 SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky fs/cifs/file.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e2577d229374efc49f6479f42a54c3bd44a6008d Merge: 9ae0b37 749aaf3 Author: Linus Torvalds Date: Fri Sep 22 13:09:11 2017 -1000 Merge tag 'pci-v4.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix endpoint "end of test" interrupt issue (introduced in v4.14-rc1) (John Keeping) - fix MIPS use-after-free map_irq() issue (introduced in v4.14-rc1) (Lorenzo Pieralisi) * tag 'pci-v4.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: endpoint: Use correct "end of test" interrupt MIPS: PCI: Move map_irq() hooks out of initdata commit 9ae0b37e69ca7143cb338f183ce326442c8dd8be Merge: d21b8ea c0d05cd Author: Linus Torvalds Date: Fri Sep 22 13:06:05 2017 -1000 Merge tag 'iommu-fixes-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - two Kconfig fixes to fix dependencies that cause compile failures when they are not fulfilled. - a section mismatch fix for Intel VT-d - a fix for PCI topology detection in ARM device-tree code * tag 'iommu-fixes-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/of: Remove PCI host bridge node check iommu/qcom: Depend on HAS_DMA to fix compile error iommu/vt-d: Fix harmless section mismatch warning iommu: Add missing dependencies commit d21b8ea7d765166bf17da1ad8ab75e81b6087229 Merge: 4d9af76 637f23a Author: Linus Torvalds Date: Fri Sep 22 13:02:54 2017 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile fixes from Chris Metcalf: "These are a code cleanup and config cleanup, respectively" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tile: array underflow in setup_maxnodemem() tile: defconfig: Cleanup from old Kconfig options commit 4d9af767418bf085e067bae905ce8675fc0f36eb Merge: c17c020 a88dc7b Author: Linus Torvalds Date: Fri Sep 22 13:01:16 2017 -1000 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - #ifdef CONFIG_EFI around __efi_fpsimd_begin/end - Assembly code alignment reduced to 4 bytes from 16 - Ensure the kernel is compiled for LP64 (there are some arm64 compilers around defaulting to ILP32) - Fix arm_pmu_acpi memory leak on the error path * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf arm64: ensure the kernel is compiled for LP64 arm64: relax assembly code alignment from 16 byte to 4 byte arm64: efi: Don't include EFI fpsimd save/restore code in non-EFI kernels commit 6e70e26dc52be62c1f39f81b5f71fa5e643677aa Author: Steve French Date: Thu Sep 21 21:32:29 2017 -0500 SMB3: handle new statx fields We weren't returning the creation time or the two easily supported attributes (ENCRYPTED or COMPRESSED) for the getattr call to allow statx to return these fields. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg \ Acked-by: Jeff Layton CC: Stable Reviewed-by: Pavel Shilovsky fs/cifs/inode.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c17c02040bf0d186cebd3e66ff349f955575bf38 Author: Tobias Klauser Date: Fri Sep 22 09:42:42 2017 +0200 arch: remove unused *_segments() macros/functions Some architectures define the no-op macros/functions copy_segments, release_segments and forget_segments. These are used nowhere in the tree, so removed them. Signed-off-by: Tobias Klauser Acked-by: Vineet Gupta [for arch/arc] Signed-off-by: Linus Torvalds arch/arc/include/asm/processor.h | 3 --- arch/c6x/include/asm/processor.h | 3 --- arch/frv/include/asm/processor.h | 4 ---- arch/m32r/include/asm/processor.h | 8 -------- arch/metag/include/asm/processor.h | 3 --- arch/mn10300/kernel/process.c | 12 ------------ arch/sh/include/asm/processor_32.h | 4 ---- arch/sh/include/asm/processor_64.h | 4 ---- arch/um/include/asm/processor-generic.h | 5 ----- arch/xtensa/include/asm/processor.h | 5 ----- 10 files changed, 51 deletions(-) commit 672d0e4502a22364b298f9307f651c1b8313514b Merge: 096a2c6 9e987b7 6ce14f6 0c0bceb Author: Rafael J. Wysocki Date: Fri Sep 22 23:38:45 2017 +0200 Merge branches 'acpi-pmic', 'acpi-bus', 'acpi-wdat' and 'acpi-properties' * acpi-pmic: ACPI / PMIC: Add code reviewers to MAINTAINERS * acpi-bus: ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again * acpi-wdat: ACPI / watchdog: properly initialize resources * acpi-properties: ACPI: properties: Return _DSD hierarchical extension (data) sub-nodes correctly commit d84c97f8f77bc4124256e76864f125f45ad53744 Merge: 1419d03 039cc1c ed40fad Author: Rafael J. Wysocki Date: Fri Sep 22 22:45:54 2017 +0200 Merge branches 'pm-cpufreq' and 'pm-cpuidle' * pm-cpufreq: cpufreq: ti-cpufreq: Support additional am43xx platforms cpufreq: dt-platdev: Add some missing platforms to the blacklist * pm-cpuidle: ARM: cpuidle: Avoid memleak if init fail commit 1419d033170e4c21e0722306b1c9fdc6794f309c Merge: 157c460 41ba8bd b247c21 Author: Rafael J. Wysocki Date: Fri Sep 22 22:45:28 2017 +0200 Merge branches 'pm-core', 'pm-qos' and 'pm-docs' * pm-core: PM: core: Fix device_pm_check_callbacks() * pm-qos: PM / QoS: Use the correct variable to check the QoS request type * pm-docs: PM: docs: Drop an excess character from devices.rst driver core: Fix link to device power management documentation commit 8c031ba63f8f2a9efc471cb45b2ff18271556544 Author: Helge Deller Date: Fri Sep 22 21:57:11 2017 +0200 parisc: Unbreak bootloader due to gcc-7 optimizations gcc-7 optimizes the byte-wise accesses of get_unaligned_le32() into word-wise accesses if the 32-bit integer output_len is declared as external. This panics then the bootloader since we don't have the unaligned access fault trap handler installed during boot time. Avoid this optimization by declaring output_len as byte-aligned and thus unbreak the bootloader code. Additionally, compile the boot code optimized for size. Signed-off-by: Helge Deller arch/parisc/boot/compressed/Makefile | 2 +- arch/parisc/boot/compressed/misc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit af21b01d1166248f282fc02d0f459c94de06615e Author: Helge Deller Date: Fri Sep 22 22:24:02 2017 +0200 parisc: Reintroduce option to gzip-compress the kernel By adding the feature to build the kernel as self-extracting executeable, the possibility to simply compress the kernel with gzip was lost. This patch now reintroduces this possibilty again and leaves it up to the user to decide how the kernel should be built. The palo bootloader is able to natively load both formats. Signed-off-by: Helge Deller arch/parisc/Kconfig | 12 ++++++++++++ arch/parisc/Makefile | 5 +++++ 2 files changed, 17 insertions(+) commit bf81100f63db7ea243d17b9d5008ba3af2fdf6b2 Author: John Johansen Date: Thu Aug 31 09:54:43 2017 -0700 apparmor: fix apparmorfs DAC access permissions The DAC access permissions for several apparmorfs files are wrong. .access - needs to be writable by all tasks to perform queries the others in the set only provide a read fn so should be read only. With policy namespace virtualization all apparmor needs to control the permission and visibility checks directly which means DAC access has to be allowed for all user, group, and other. BugLink: http://bugs.launchpad.net/bugs/1713103 Fixes: c97204baf840b ("apparmor: rename apparmor file fns and data to indicate use") Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b1545dba092ba543eab1f7b5ed757a4988e267c8 Author: John Johansen Date: Wed Aug 23 12:10:39 2017 -0700 apparmor: fix build failure on sparc caused by undeclared signals In file included from security/apparmor/ipc.c:23:0: security/apparmor/include/sig_names.h:26:3: error: 'SIGSTKFLT' undeclared here (not in a function) [SIGSTKFLT] = 16, /* -, 16, - */ ^ security/apparmor/include/sig_names.h:26:3: error: array index in initializer not of integer type security/apparmor/include/sig_names.h:26:3: note: (near initialization for 'sig_map') security/apparmor/include/sig_names.h:51:3: error: 'SIGUNUSED' undeclared here (not in a function) [SIGUNUSED] = 34, /* -, 31, - */ ^ security/apparmor/include/sig_names.h:51:3: error: array index in initializer not of integer type security/apparmor/include/sig_names.h:51:3: note: (near initialization for 'sig_map') Reported-by: Stephen Rothwell Fixes: c6bf1adaecaa ("apparmor: add the ability to mediate signals") Signed-off-by: John Johansen security/apparmor/include/sig_names.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bc4d82fb946e7b471eab2a80e384227c4eb15652 Author: John Johansen Date: Wed Aug 16 09:33:48 2017 -0700 apparmor: fix incorrect type assignment when freeing proxies sparse reports poisoning the proxy->label before freeing the struct is resulting in a sparse build warning. ../security/apparmor/label.c:52:30: warning: incorrect type in assignment (different address spaces) ../security/apparmor/label.c:52:30: expected struct aa_label [noderef] *label ../security/apparmor/label.c:52:30: got struct aa_label * fix with RCU_INIT_POINTER as this is one of those cases where rcu_assign_pointer() is not needed. Signed-off-by: John Johansen security/apparmor/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15372b97aa7593c6f5bc1afe69f42fd403c40685 Author: John Johansen Date: Wed Aug 16 05:48:06 2017 -0700 apparmor: ensure unconfined profiles have dfas initialized Generally unconfined has early bailout tests and does not need the dfas initialized, however if an early bailout test is ever missed it will result in an oops. Be defensive and initialize the unconfined profile to have null dfas (no permission) so if an early bailout test is missed we fail closed (no perms granted) instead of oopsing. Signed-off-by: John Johansen security/apparmor/policy_ns.c | 2 ++ 1 file changed, 2 insertions(+) commit 290638a52a808d658bd04b746b3ca46886c157e0 Author: John Johansen Date: Wed Aug 16 05:40:49 2017 -0700 apparmor: fix race condition in null profile creation There is a race when null- profile is being created between the initial lookup/creation of the profile and lock/addition of the profile. This could result in multiple version of a profile being added to the list which need to be removed/replaced. Since these are learning profile their is no affect on mediation. Signed-off-by: John Johansen security/apparmor/policy.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit d07881d2edb0ab783846730629ac2faeaafdf4f1 Author: John Johansen Date: Wed Aug 16 08:59:57 2017 -0700 apparmor: move new_null_profile to after profile lookup fns() new_null_profile will need to use some of the profile lookup fns() so move instead of doing forward fn declarations. Signed-off-by: John Johansen security/apparmor/policy.c | 158 ++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit 651e28c5537abb39076d3949fb7618536f1d242e Author: John Johansen Date: Tue Jul 18 23:18:33 2017 -0700 apparmor: add base infastructure for socket mediation Provide a basic mediation of sockets. This is not a full net mediation but just whether a spcific family of socket can be used by an application, along with setting up some basic infrastructure for network mediation to follow. the user space rule hav the basic form of NETWORK RULE = [ QUALIFIERS ] 'network' [ DOMAIN ] [ TYPE | PROTOCOL ] DOMAIN = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' | 'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' | 'netbeui' | 'security' | 'key' | 'packet' | 'ash' | 'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' | 'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' | 'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' | 'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' | 'vsock' | 'mpls' | 'ib' | 'kcm' ) ',' TYPE = ( 'stream' | 'dgram' | 'seqpacket' | 'rdm' | 'raw' | 'packet' ) PROTOCOL = ( 'tcp' | 'udp' | 'icmp' ) eg. network, network inet, Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/.gitignore | 1 + security/apparmor/Makefile | 43 ++++- security/apparmor/apparmorfs.c | 1 + security/apparmor/file.c | 30 +++ security/apparmor/include/audit.h | 26 ++- security/apparmor/include/net.h | 114 +++++++++++ security/apparmor/include/perms.h | 5 +- security/apparmor/include/policy.h | 13 ++ security/apparmor/lib.c | 5 +- security/apparmor/lsm.c | 387 +++++++++++++++++++++++++++++++++++++ security/apparmor/net.c | 184 ++++++++++++++++++ security/apparmor/policy_unpack.c | 47 ++++- 12 files changed, 840 insertions(+), 16 deletions(-) commit cbf2d0e1a9e4876046a628e0e036a7545a3a4c40 Author: John Johansen Date: Tue Jul 18 23:41:13 2017 -0700 apparmor: add more debug asserts to apparmorfs Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/apparmorfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2410aa96d6b4930ed25fd02c3d173f14b962e0f4 Author: John Johansen Date: Tue Jul 18 23:37:18 2017 -0700 apparmor: make policy_unpack able to audit different info messages Switch unpack auditing to using the generic name field in the audit struct and make it so we can start adding new info messages about why an unpack failed. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/include/audit.h | 4 +-- security/apparmor/policy_unpack.c | 52 ++++++++++++++++++++++++++++----------- 2 files changed, 40 insertions(+), 16 deletions(-) commit 26b7899510ae243e392960704ebdba52d05fbb13 Author: John Johansen Date: Sun Aug 6 05:39:08 2017 -0700 apparmor: add support for absolute root view based labels With apparmor policy virtualization based on policy namespace View's we don't generally want/need absolute root based views, however there are cases like debugging and some secid based conversions where using a root based view is important. Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/include/label.h | 1 + security/apparmor/label.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit f872af75d325cc449b6621a0d30a4f2ba77dd092 Author: John Johansen Date: Sun Aug 6 05:36:40 2017 -0700 apparmor: cleanup conditional check for label in label_print Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/label.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 2ea3ffb7782a84da33a8382f13ebd016da50079b Author: John Johansen Date: Tue Jul 18 23:04:47 2017 -0700 apparmor: add mount mediation Add basic mount mediation. That allows controlling based on basic mount parameters. It does not include special mount parameters for apparmor, super block labeling, or any triggers for apparmor namespace parameter modifications on pivot root. default userspace policy rules have the form of MOUNT RULE = ( MOUNT | REMOUNT | UMOUNT ) MOUNT = [ QUALIFIERS ] 'mount' [ MOUNT CONDITIONS ] [ SOURCE FILEGLOB ] [ '->' MOUNTPOINT FILEGLOB ] REMOUNT = [ QUALIFIERS ] 'remount' [ MOUNT CONDITIONS ] MOUNTPOINT FILEGLOB UMOUNT = [ QUALIFIERS ] 'umount' [ MOUNT CONDITIONS ] MOUNTPOINT FILEGLOB MOUNT CONDITIONS = [ ( 'fstype' | 'vfstype' ) ( '=' | 'in' ) MOUNT FSTYPE EXPRESSION ] [ 'options' ( '=' | 'in' ) MOUNT FLAGS EXPRESSION ] MOUNT FSTYPE EXPRESSION = ( MOUNT FSTYPE LIST | MOUNT EXPRESSION ) MOUNT FSTYPE LIST = Comma separated list of valid filesystem and virtual filesystem types (eg ext4, debugfs, etc) MOUNT FLAGS EXPRESSION = ( MOUNT FLAGS LIST | MOUNT EXPRESSION ) MOUNT FLAGS LIST = Comma separated list of MOUNT FLAGS. MOUNT FLAGS = ( 'ro' | 'rw' | 'nosuid' | 'suid' | 'nodev' | 'dev' | 'noexec' | 'exec' | 'sync' | 'async' | 'remount' | 'mand' | 'nomand' | 'dirsync' | 'noatime' | 'atime' | 'nodiratime' | 'diratime' | 'bind' | 'rbind' | 'move' | 'verbose' | 'silent' | 'loud' | 'acl' | 'noacl' | 'unbindable' | 'runbindable' | 'private' | 'rprivate' | 'slave' | 'rslave' | 'shared' | 'rshared' | 'relatime' | 'norelatime' | 'iversion' | 'noiversion' | 'strictatime' | 'nouser' | 'user' ) MOUNT EXPRESSION = ( ALPHANUMERIC | AARE ) ... PIVOT ROOT RULE = [ QUALIFIERS ] pivot_root [ oldroot=OLD PUT FILEGLOB ] [ NEW ROOT FILEGLOB ] SOURCE FILEGLOB = FILEGLOB MOUNTPOINT FILEGLOB = FILEGLOB eg. mount, mount /dev/foo, mount options=ro /dev/foo -> /mnt/, mount options in (ro,atime) /dev/foo -> /mnt/, mount options=ro options=atime, Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/Makefile | 2 +- security/apparmor/apparmorfs.c | 8 +- security/apparmor/domain.c | 4 +- security/apparmor/include/apparmor.h | 1 + security/apparmor/include/audit.h | 11 + security/apparmor/include/domain.h | 5 + security/apparmor/include/mount.h | 54 +++ security/apparmor/lsm.c | 64 ++++ security/apparmor/mount.c | 696 +++++++++++++++++++++++++++++++++++ 9 files changed, 841 insertions(+), 4 deletions(-) commit cd1dbf76b23d5ab2cba5e657fe20b1e236a408cc Author: John Johansen Date: Tue Jul 18 22:56:22 2017 -0700 apparmor: add the ability to mediate signals Add signal mediation where the signal can be mediated based on the signal, direction, or the label or the peer/target. The signal perms are verified on a cross check to ensure policy consistency in the case of incremental policy load/replacement. The optimization of skipping the cross check when policy is guaranteed to be consistent (single compile unit) remains to be done. policy rules have the form of SIGNAL_RULE = [ QUALIFIERS ] 'signal' [ SIGNAL ACCESS PERMISSIONS ] [ SIGNAL SET ] [ SIGNAL PEER ] SIGNAL ACCESS PERMISSIONS = SIGNAL ACCESS | SIGNAL ACCESS LIST SIGNAL ACCESS LIST = '(' Comma or space separated list of SIGNAL ACCESS ')' SIGNAL ACCESS = ( 'r' | 'w' | 'rw' | 'read' | 'write' | 'send' | 'receive' ) SIGNAL SET = 'set' '=' '(' SIGNAL LIST ')' SIGNAL LIST = Comma or space separated list of SIGNALS SIGNALS = ( 'hup' | 'int' | 'quit' | 'ill' | 'trap' | 'abrt' | 'bus' | 'fpe' | 'kill' | 'usr1' | 'segv' | 'usr2' | 'pipe' | 'alrm' | 'term' | 'stkflt' | 'chld' | 'cont' | 'stop' | 'stp' | 'ttin' | 'ttou' | 'urg' | 'xcpu' | 'xfsz' | 'vtalrm' | 'prof' | 'winch' | 'io' | 'pwr' | 'sys' | 'emt' | 'exists' | 'rtmin+0' ... 'rtmin+32' ) SIGNAL PEER = 'peer' '=' AARE eg. signal, # allow all signals signal send set=(hup, kill) peer=foo, Signed-off-by: John Johansen Acked-by: Seth Arnold security/apparmor/apparmorfs.c | 7 +++ security/apparmor/include/apparmor.h | 1 + security/apparmor/include/audit.h | 2 + security/apparmor/include/ipc.h | 6 +++ security/apparmor/include/sig_names.h | 95 +++++++++++++++++++++++++++++++++ security/apparmor/ipc.c | 99 +++++++++++++++++++++++++++++++++++ security/apparmor/lsm.c | 21 ++++++++ 7 files changed, 231 insertions(+) commit c5561700c9cb951ec3a33a0914c840423b09d7c9 Author: John Johansen Date: Mon Jul 31 23:44:37 2017 -0700 apparmor: Redundant condition: prev_ns. in [label.c:1498] Reported-by: David Binderman Signed-off-by: John Johansen security/apparmor/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d314a81eca29b01939930c1c596dfa44937e970 Author: Dan Carpenter Date: Thu Jul 13 10:39:20 2017 +0300 apparmor: Fix an error code in aafs_create() We accidentally forgot to set the error code on this path. It means we return NULL instead of an error pointer. I looked through a bunch of callers and I don't think it really causes a big issue, but the documentation says we're supposed to return error pointers here. Signed-off-by: Dan Carpenter Acked-by: Serge Hallyn Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 86aea56f14929ff1c05eca1776e9068e907429d5 Author: Christos Gkekas Date: Sat Jul 8 20:50:21 2017 +0100 apparmor: Fix logical error in verify_header() verify_header() is currently checking whether interface version is less than 5 *and* greater than 7, which always evaluates to false. Instead it should check whether it is less than 5 *or* greater than 7. Signed-off-by: Christos Gkekas Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19fe43a54fb67b6cc8857e65c78e1dc8aa2e97a3 Author: Geert Uytterhoeven Date: Thu Jul 6 10:56:21 2017 +0200 apparmor: Fix shadowed local variable in unpack_trans_table() with W=2: security/apparmor/policy_unpack.c: In function ‘unpack_trans_table’: security/apparmor/policy_unpack.c:469: warning: declaration of ‘pos’ shadows a previous local security/apparmor/policy_unpack.c:451: warning: shadowed declaration is here Rename the old "pos" to "saved_pos" to fix this. Fixes: 5379a3312024a8be ("apparmor: support v7 transition format compatible with label_parse") Signed-off-by: Geert Uytterhoeven Reviewed-by: Serge Hallyn Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89aaca54ba60e91f02c1c168fbef5d71f71a6d43 Author: Somnath Kotur Date: Thu Aug 31 09:27:35 2017 +0530 bnxt_re: Don't issue cmd to delete GID for QP1 GID entry before the QP is destroyed FW needs the 0th GID Entry in the Table to be preserved before it's corresponding QP1 is deleted, else it will fail the cmd. Check for the same and return to prevent error msg being logged for cmd failure. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 1993519be8bc86342687c61d8d11c3ade62b3b84 Author: Selvin Xavier Date: Thu Aug 31 09:27:34 2017 +0530 bnxt_re: Fix memory leak in FRMR path This patch fixes a memory leak issue when alloc_mr is used. mr->pages and mr->npages are used only in alloc_mr path. mr->pages is allocated when alloc_mr is called or in the case of FRMR, while creating the MR. mr->npages is updated only when the MR created is used i.e. after invoking map_mr_sg verb, before data transfer. In the dereg_mr path, if mr->npages is 0, driver ends up not freeing the memory created. Removing the npages check from the dereg_mr path for kernel consumers. Signed-off-by: Selvin Xavier Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74828b128115033ff25d4140d732a05a36eaeaf0 Author: Somnath Kotur Date: Thu Aug 31 09:27:33 2017 +0530 bnxt_re: Remove RTNL lock dependency in bnxt_re_query_port When there is a NETDEV_UNREGISTER event, bnxt_re driver calls ib_unregister_device() (RTNL lock held). ib_unregister_device attempts to flush a worker queue scheduled by ib_core and that queue might have a pending ib_query_port(). ib_query_port in turn calls bnxt_re_query_port(), which while querying the link speed using ib_get_eth_speed(), tries to acquire the rtnl_lock() which was already held by NETDEV_UNREGISTER. Fixing the issue by removing the link speed query from bnxt_re_query_port() Now the speed is queried post a successful ib_register_device or whenever there is a NETDEV_CHANGE event. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 ++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 11 +++-------- drivers/infiniband/hw/bnxt_re/main.c | 4 ++++ 3 files changed, 9 insertions(+), 8 deletions(-) commit d5917307bb1caa9cb0a915951c57f4cdbacca443 Author: Somnath Kotur Date: Thu Aug 31 09:27:32 2017 +0530 bnxt_re: Fix race between the netdev register and unregister events Upon receipt of the NETDEV_REGISTER event from the netdev notifier chain, the IB stack registration is spawned off to a workqueue since that also requires an rtnl lock. There could be 2 kinds of races between the NETDEV_REGISTER and the NETDEV_UNREGISTER event handling. a)The NETDEV_UNREGISTER event is received in rapid succession after the NETDEV_REGISTER event even before the work queue got a chance to run. b)The NETDEV_UNREGISTER event is received while the workqueue that handles registration with the IB stack is still in progress. Handle both the races with a bit flag that is set just before the work item is queued and cleared in the workqueue after the event is handled just before the workqueue item is freed. While adding the new flag, it was noted that the flags are all used in *_bit() operations which expect a bit number and not a literal constant with a bit set. So change the numbers to be bit numbers. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 12 +++++++----- drivers/infiniband/hw/bnxt_re/main.c | 8 ++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) commit 027c892924eac22f5ca8db4100bccde423be797d Author: Somnath Kotur Date: Thu Aug 31 09:27:31 2017 +0530 bnxt_re: Free up devices in module_exit path Clean up all devices added to the bnxt_re_dev_list in the module_exit entry point. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 55311d055175cada8249d39436371afe790df699 Author: Devesh Sharma Date: Thu Aug 31 09:27:30 2017 +0530 bnxt_re: Fix compare and swap atomic operands Driver must assign the user supplied compare/swap values in the wqe to successfully complete the atomic compare and swap operation. Signed-off-by: Devesh Sharma Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + 1 file changed, 1 insertion(+) commit 2b6376305dcb2cb79d0599cf3b9ce98aa860cb4f Author: Somnath Kotur Date: Thu Aug 31 09:27:29 2017 +0530 bnxt_re: Stop issuing further cmds to FW once a cmd times out Once a cmd to FW times out(after 20s) it is reasonable to assume the FW or atleast the control path is dead. No point issuing further cmds to the FW as each subsequent cmd with another 20s timeout will cascade resulting in unnecessary traces and/or NMI Lockups. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++++ drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit f9b941baa4b78dafcbc4790c0ed2fbbe2aafed06 Author: Devesh Sharma Date: Thu Aug 31 09:27:28 2017 +0530 bnxt_re: Fix update of qplib_qp.mtu when modified The MTU value in the qplib_qp.mtu should be consistent with whatever mtu was set during INIT to RTR.The Next PSN and number of packets are calculated based on this member in the qplib_qp structure. Signed-off-by: Narender Reddy Signed-off-by: Devesh Sharma Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 3 +++ 1 file changed, 3 insertions(+) commit 606f95e4255845155f62504a9e1f12665b1853c8 Author: Helge Deller Date: Thu Sep 21 21:52:08 2017 +0200 parisc: Add HWPOISON page fault handler code Commit 24587380f61d ("parisc: Add MADV_HWPOISON and MADV_SOFT_OFFLINE") added the necessary constants to handle hardware-poisoning. Those were needed to support the page deallocation feature from firmware. But I completely missed to add the relevant fault handler code. This now showed up when I ran the madvise07 testcase from the Linux Test Project, which failed with a kernel BUG at arch/parisc/mm/fault.c:320. With this patch the parisc kernel now behaves like other platforms and gives the same kernel syslog warnings when poisoning pages. Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit a7e6601f70a53957b1d01c321319f0237bba5202 Author: Helge Deller Date: Thu Sep 21 21:22:27 2017 +0200 parisc: Move init_per_cpu() into init section Signed-off-by: Helge Deller arch/parisc/include/asm/smp.h | 1 + arch/parisc/kernel/processor.c | 2 +- arch/parisc/kernel/setup.c | 2 +- arch/parisc/kernel/smp.c | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) commit ea6976483fb0ced259fbaa9e4f68a2cdcee7e312 Author: Helge Deller Date: Mon Sep 18 17:55:24 2017 +0200 parisc: Check if initrd was loaded into broken RAM While scanning the PDT for reported broken memory modules, warn if the initrd was coincidentally loaded into bad memory. Signed-off-by: Helge Deller arch/parisc/kernel/pdt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8d771b143fe2e3941fc8a32926d21410004578c0 Author: Helge Deller Date: Sun Sep 17 21:28:11 2017 +0200 parisc: Add PDCE_CHECK instruction to HPMC handler According to the programming note at page 1-31 of the PA 1.1 Firmware Architecture document, one should use the PDC_INSTR firmware function to get the instruction that invokes a PDCE_CHECK in the HPMC handler. This patch follows this note and sets the instruction which has been a nop up until now. Testing on a C3000 and C8000 showed that this firmware call isn't implemented on those machines, so maybe it's only needed on older ones. Signed-off-by: Helge Deller arch/parisc/kernel/traps.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 77089c5274fe2f72db5a2cd956d0d308aed08e68 Author: Helge Deller Date: Sun Sep 17 21:15:09 2017 +0200 parisc: Add wrapper for pdc_instr() firmware function Signed-off-by: Helge Deller arch/parisc/include/asm/pdc.h | 1 + arch/parisc/kernel/firmware.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) commit 08b8a99b2c5ea8da4d3dd55056881d12baea1e04 Author: Helge Deller Date: Sun Sep 17 21:17:10 2017 +0200 parisc: Move start_parisc() into init section Signed-off-by: Helge Deller arch/parisc/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e77900abfd8be4e207412d8b7752dbb9838e2571 Author: Helge Deller Date: Sun Sep 17 21:05:02 2017 +0200 parisc: Stop unwinding at start of stack Check stack pointer if we are reaching the stack end and stop unwinding if we do. This fixes early backtraces and avoids showing unrealistic call stacks. Signed-off-by: Helge Deller arch/parisc/kernel/unwind.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 432654df90f2a7d8ac8438905208074604ed3e00 Author: Helge Deller Date: Mon Sep 11 21:41:43 2017 +0200 parisc: Fix too large frame size warnings The parisc architecture has larger stack frames than most other architectures on 32-bit kernels. Increase the maximum allowed stack frame to 1280 bytes for parisc to avoid warnings in the do_sys_poll() and pat_memconfig() functions. Signed-off-by: Helge Deller lib/Kconfig.debug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f16dc0aa5ea20a2cf173e82ade5f05bfecaa850a Author: Shiraz Saleem Date: Tue Sep 19 09:19:13 2017 -0500 i40iw: Add support for port reuse on active side connections During OpenMPI scale up testing, we observe rdma_connect failures if ports are reused on multiple connections. This is because the Control Queue-Pair (CQP) command to add the reused port to Accelerated Port Bit VectorTable (APBVT) fails as there already exists an entry. Check for duplicate port before invoking the CQP command to add APBVT entry and delete the entry only if the port is not in use. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 151 ++++++++++++++++----------------- drivers/infiniband/hw/i40iw/i40iw_cm.h | 3 + 2 files changed, 78 insertions(+), 76 deletions(-) commit dfc612b3407e88913a58db00b3bca93685d4f4f9 Author: Mustafa Ismail Date: Tue Sep 19 09:19:12 2017 -0500 i40iw: Add missing VLAN priority Set the VLAN priority which is in the upper 3 bits of the VLAN tag field in the QP context. Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 3 ++- drivers/infiniband/hw/i40iw/i40iw_cm.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 471b370d52a4a461bf855ff542b544f3e4a5cb3a Author: Shiraz Saleem Date: Tue Sep 19 09:19:11 2017 -0500 i40iw: Call i40iw_cm_disconn on modify QP to disconnect If QP modify to closing/terminate/error fails, connection is not torn down as there is no corresponding asynchronous event that will initiate the teardown. Add explicit call to i40iw_cm_disconn if not waiting in modify QP, otherwise schedule it in CM timer. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 47fb3c1610b28dd435b892762280eebf04fe9adf Author: Shiraz Saleem Date: Tue Sep 19 09:19:10 2017 -0500 i40iw: Prevent multiple netdev event notifier registrations Netdev event notifier registration/de-registration is not synchronized with a lock and there is a possibility of a duplicate registration of notifier before the unregister completes. Register netdev event notifiers during module init and de-register them at module exit. This avoids the need to tie the registration to first netdev client interface open and de-registration to last client interface close and the synchronization to achieve it. This also fixes a crash due to duplicate registration. BUG: unable to handle kernel paging request at ffffffffa0d60388 IP: [] notifier_call_chain+0x3d/0x70 PGD 190d067 PUD 190e063 PMD 76c840067 PTE 0 Oops: 0000 [#1] SMP Modules linked in: i40e(OF-) fuse btrfs zlib_deflate raid6_pq xor vfat msdos [..] e1000e vxlan ip_tunnel ptp pps_core i2c_core video [last unloaded: i40iw] CPU: 1 PID: 27101 Comm: modprobe Tainted: GF W O-------------- 3.10.0-229.el7.x86_64 #1 Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Q87M-D2H, BIOS F7 01/17/2014 task: ffff88076e8a96c0 ti: ffff8806959c8000 task.ti: ffff8806959c8000 RIP: 0010:[] [] notifier_call_chain+0x3d/0x70 RSP: 0018:ffff8806959cbb38 EFLAGS: 00010282 RAX: ffffffffa0d60380 RBX: 00000000fffffffd RCX: 0000000000000000 0708] RDX: 0000000000000000 RSI: ffff88081227a000 RDI: 0000000000000002 RBP: ffff8806959cbb60 R08: 0000000000000246 R09: 000000000000700c R10: ffff88080e16ea40 R11: 00000000000ae8df R12: ffffffffa0d60380 R13: 0000000000000002 R14: ffff88076e738800 R15: 0000000000000000 FS: 00007f604ef4a740(0000) GS:ffff88083e240000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa0d60388 CR3: 0000000753cd2000 CR4: 00000000001407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: ffffffff819e73a0 0000000000000000 0000000000000002 ffff88076e738800 00000000ffffffff ffff8806959cbba0 ffffffff8109d61d 0000000000000000 0000000000000000 ffff88076e738800 0000000000000000 ffff88076e738800 Call Trace: [] __blocking_notifier_call_chain+0x4d/0x70 [] blocking_notifier_call_chain+0x16/0x20 [] __inet_del_ifa+0x154/0x2b0 [] inetdev_event+0x182/0x530 [] notifier_call_chain+0x4c/0x70 [] raw_notifier_call_chain+0x16/0x20 [] call_netdevice_notifiers+0x2d/0x60 [] rollback_registered_many+0x105/0x220 [] rollback_registered+0x40/0x70 [] unregister_netdevice_queue+0x48/0x80 [] unregister_netdev+0x1c/0x30 [] i40e_vsi_release+0x2a9/0x2b0 [i40e] [] i40e_remove+0x128/0x2b0 [i40e] [] pci_device_remove+0x3b/0xb0 [] __device_release_driver+0x7f/0xf0 [] driver_detach+0xb8/0xc0 [] bus_remove_driver+0x9b/0x120 [] driver_unregister+0x2c/0x50 [] pci_unregister_driver+0x2c/0x90 [] i40e_exit_module+0x10/0x23 [i40e] [] SyS_delete_module+0x16b/0x2d0 [] ? do_notify_resume+0x9c/0xb0 [] system_call_fastpath+0x16/0x1b Code: e5 41 57 4d 89 c7 41 56 49 89 d6 41 55 49 89 f5 41 54 53 89 cb 75 14 eb 3d 0f 1f 44 00 00 83 eb 01 74 25 4d 85 e4 74 20 4c 89 e0 <4c> 8b 60 08 4c 89 f2 4c 89 ee 48 89 c7 ff 10 4d 85 ff 74 04 41 RIP [] notifier_call_chain+0x3d/0x70 Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 - drivers/infiniband/hw/i40iw/i40iw_main.c | 32 ++++++++++++++++--------------- drivers/infiniband/hw/i40iw/i40iw_utils.c | 6 +++--- 3 files changed, 20 insertions(+), 19 deletions(-) commit cd9100ca9e78eb03bf5a0ee2ba98ebdc8cc5880e Author: Shiraz Saleem Date: Tue Sep 19 09:19:09 2017 -0500 i40iw: Fail open if there are no available MSI-X vectors Check number of available MSI-X vectors for i40iw. If there are no available vectors, fail the open. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 01df7f5a77b926c2d790cf66d942d2a68d4ad5de Author: Adit Ranadive Date: Thu Sep 21 15:56:21 2017 -0700 RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion Since the IB_WC_BIND_MW opcode has been dropped, set the correct IB WC opcode explicitly. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Adit Ranadive Signed-off-by: Bryan Tan Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit e13547bc181ae6c279adf0df054717787f24ee89 Author: Leon Romanovsky Date: Tue Sep 19 13:22:13 2017 +0300 IB/bnxt_re: Fix frame stack compilation warning Reduce stack size by dynamically allocating memory instead of declaring large struct on the stack: drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function ‘bnxt_re_query_qp’: drivers/infiniband/hw/bnxt_re/ib_verbs.c:1600:1: warning: the frame size of 1216 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ Cc: Selvin Xavier Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Leon Romanovsky Acked-by: Selvin Xavier Reviewed-by: Jonathan Toppins Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 67 +++++++++++++++++--------------- 1 file changed, 36 insertions(+), 31 deletions(-) commit cbafad87e1507044c7d442087d41d5e3d432cc4e Author: Sudip Mukherjee Date: Mon Sep 18 12:28:48 2017 +0100 IB/mlx5: fix debugfs cleanup If delay_drop_debugfs_init() fails in any of the operations to create debugfs, it is calling delay_drop_debugfs_cleanup() as part of its cleanup. But delay_drop_debugfs_cleanup() checks for 'dbg' and since we have not yet pointed 'dbg' to the debugfs we need to cleanup, the cleanup fails and we are left with stray debugfs elements and also a memory leak. Fixes: 4a5fd5d2965c ("IB/mlx5: Add necessary delay drop assignment") Signed-off-by: Sudip Mukherjee Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 06564f60859bdf7e73d70ae35d7e285e96ae9c46 Author: Colin Ian King Date: Mon Sep 11 17:03:13 2017 +0100 IB/ocrdma: fix incorrect fall-through on switch statement In the case where mbox_status is OCRDMA_MBX_STATUS_FAILED and add_status is OCRDMA_MBX_STATUS_FAILED err_num is assigned -EAGAIN however the case OCRDMA_MBX_STATUS_FAILED is missing a break and falls through to the default case which then re-assigns err_num to -EFAULT. Fix this so that err_num is assigned to -EAGAIN for the add_status OCRDMA_MBX_STATUS_FAILED case and -EFAULT otherwise. Detected by CoverityScan CID#703125 ("Missing break in switch") Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter") Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +++ 1 file changed, 3 insertions(+) commit af3c79beff48fb2bd1c79d02688004cf57215acf Author: Santosh Shilimkar Date: Thu Sep 7 13:38:18 2017 +0300 IB/ipoib: Suppress the retry related completion errors IPoIB doesn't support transport/rnr retry schemes as per RFC so those errors are expected. No need to flood the log files with them. Tested-by: Michael Nowak Tested-by: Rafael Alejandro Peralez Tested-by: Liwen Huang Tested-by: Hong Liu Reviewed-by: Mukesh Kacker Reported-by: Rajiv Raja Signed-off-by: Santosh Shilimkar Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 05f5c38576475439f3124a3e6d62db68de83f7be Author: KT Liao Date: Fri Sep 22 10:00:57 2017 -0700 Input: elan_i2c - extend Flash-Write delay The original 20ms delay is only marginally enough delay after a block write operation during firmware update. Let's increase the delay to ensure that the controller finishes up storing the page to avoid failures in the firmware updates. Signed-off-by: KT Liao Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1bbf36b7452c4acb20e91948eaa5e225ea6978 Author: Steve Wise Date: Tue Sep 5 11:52:34 2017 -0700 iw_cxgb4: remove the stid on listen create failure If a listen create fails, then the server tid (stid) is incorrectly left in the stid idr table, which can cause a touch-after-free if the stid is looked up and the already freed endpoint is touched. So make sure and remove it in the error path. Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c8415cc7aff467faba25841fb859660ac14a04e Author: Steve Wise Date: Tue Sep 5 11:52:33 2017 -0700 iw_cxgb4: drop listen destroy replies if no ep found If the thread waiting for a CLOSE_LISTSRV_RPL times out and bails, then we need to handle a subsequent CPL if it arrives and the stid has been released. In this case silently drop it. Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3d318605f5e32ff44fb290d9b67573b34213c4c8 Author: Steve Wise Date: Wed Sep 13 09:52:32 2017 -0700 iw_cxgb4: put ep reference in pass_accept_req() The listening endpoint should always be dereferenced at the end of pass_accept_req(). Fixes: f86fac79afec ("RDMA/iw_cxgb4: atomic find and reference for listening endpoints") Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a8abd97dcda50e5d2c893a51733416534e95706 Merge: d6396a7 0555ac4 Author: Linus Torvalds Date: Fri Sep 22 06:40:47 2017 -1000 Merge tag 'for-linus-4.14b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "A fix for a missing __init annotation and two cleanup patches" * tag 'for-linus-4.14b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen, arm64: drop dummy lookup_address() xen: don't compile pv-specific parts if XEN_PV isn't configured xen: x86: mark xen_find_pt_base as __init commit d6396a7331dbbe69c7e3fac2ab07b281ffe71fc8 Merge: 7e6d8f8 b537ca6 Author: Linus Torvalds Date: Fri Sep 22 06:39:09 2017 -1000 Merge tag 'powerpc-4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "It turns out our single-fix pull from last week was too good to be true. I missed a few fixes in that pull that had already come in because I was on leave, but also we hadn't found the bugs yet. So this week it's a bit bigger, though not ridiculous. Hopefully things will settle down from here on. Four fixes for the new instruction emulation code. A fix for CPU offline on bare metal machines when certain idle states are not supported, and a fix for a device_node refcounting oops during CPU hotplug, caused by recent changes. Going to stable are a fix for an oops during core dump on machines that have TM (Transactional Memory) disabled. Reordering some EEH initialisation to avoid trashing memory, and another device_node refcounting fix. And a few other minor things. Thanks to: Anton Blanchard, Benjamin Herrenschmidt, Cyril Bur, Gautham R. Shenoy, Gustavo Romero, Kamalesh Babulal, Matthew Weber, Matt Weber, Naveen N. Rao, Nicholas Piggin, Pavithra Prakash, Ravi Bangoria, Ronak Desai, Scott Wood, Tyrel Datwyler" * tag 'powerpc-4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Fix parent_dn reference leak in add_dt_node() powerpc/pseries: Fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR powerpc/eeh: Create PHB PEs after EEH is initialized powerpc/kprobes: Update optprobes to use emulate_update_regs() powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline powerpc/sstep: mullw should calculate a 64 bit signed result powerpc/sstep: Fix issues with mcrf powerpc/sstep: Fix issues with set_cr0() powerpc/tm: Flush TM only if CPU has TM feature powerpc/sysrq: Fix oops whem ppmu is not registered powerpc/configs: Update for CONFIG_SND changes powerpc/e6500: Update machine check for L1D cache err commit 7e6d8f83585b64603419c8b846f4961f9dbfa279 Merge: c8107ed 8eba365 Author: Linus Torvalds Date: Fri Sep 22 06:37:50 2017 -1000 Merge branch '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: - Fix a build error on MSP71xx which used to rely on somehow magically being pulled in which no longer happens. - Fix the __write_64bit_c0_split inline assembler where there was the theoretical possibility of GCC interpret the constraints such that bad code could result. - A __init was causing section mismatch errors on Alchemy. Just to be on the safe side, Manuel's patch does away with all of them. - Fix perf event init. * '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: PCI: fix pcibios_map_irq section mismatch MIPS: Fix input modify in __write_64bit_c0_split() MIPS: MSP71xx: Include asm/setup.h MIPS: Fix perf event init commit c8107ed99ad02d519d4fc1c3017ac7cede47e788 Merge: 7a6d007 51dce38 Author: Linus Torvalds Date: Fri Sep 22 06:32:07 2017 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - A couple of bug fixes: memory management, perf, cio, dasd and scm_blk. - A larger change in regard to the CPU topology to improve performance for systems running under z/VM or KVM. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/topology: enable / disable topology dynamically s390/topology: alternative topology for topology-less machines s390/mm: fix write access check in gup_huge_pmd() s390/mm: make pmdp_invalidate() do invalidation only s390/cio: recover from bad paths s390/scm_blk: consistently use blk_status_t as error type s390/dasd: fix race during dasd initialization s390/perf: fix bug when creating per-thread event commit 1fbbb78f25d1291274f320462bf6908906f538db Author: Alan Stern Date: Thu Sep 21 13:22:00 2017 -0400 USB: g_mass_storage: Fix deadlock when driver is unbound As a holdover from the old g_file_storage gadget, the g_mass_storage legacy gadget driver attempts to unregister itself when its main operating thread terminates (if it hasn't been unregistered already). This is not strictly necessary; it was never more than an attempt to have the gadget fail cleanly if something went wrong and the main thread was killed. However, now that the UDC core manages gadget drivers independently of UDC drivers, this scheme doesn't work any more. A simple test: modprobe dummy-hcd modprobe g-mass-storage file=... rmmod dummy-hcd ends up in a deadlock with the following backtrace: sysrq: SysRq : Show Blocked State task PC stack pid father file-storage D 0 1130 2 0x00000000 Call Trace: __schedule+0x53e/0x58c schedule+0x6e/0x77 schedule_preempt_disabled+0xd/0xf __mutex_lock.isra.1+0x129/0x224 ? _raw_spin_unlock_irqrestore+0x12/0x14 __mutex_lock_slowpath+0x12/0x14 mutex_lock+0x28/0x2b usb_gadget_unregister_driver+0x29/0x9b [udc_core] usb_composite_unregister+0x10/0x12 [libcomposite] msg_cleanup+0x1d/0x20 [g_mass_storage] msg_thread_exits+0xd/0xdd7 [g_mass_storage] fsg_main_thread+0x1395/0x13d6 [usb_f_mass_storage] ? __schedule+0x573/0x58c kthread+0xd9/0xdb ? do_set_interface+0x25c/0x25c [usb_f_mass_storage] ? init_completion+0x1e/0x1e ret_from_fork+0x19/0x24 rmmod D 0 1155 683 0x00000000 Call Trace: __schedule+0x53e/0x58c schedule+0x6e/0x77 schedule_timeout+0x26/0xbc ? __schedule+0x573/0x58c do_wait_for_common+0xb3/0x128 ? usleep_range+0x81/0x81 ? wake_up_q+0x3f/0x3f wait_for_common+0x2e/0x45 wait_for_completion+0x17/0x19 fsg_common_put+0x34/0x81 [usb_f_mass_storage] fsg_free_inst+0x13/0x1e [usb_f_mass_storage] usb_put_function_instance+0x1a/0x25 [libcomposite] msg_unbind+0x2a/0x42 [g_mass_storage] __composite_unbind+0x4a/0x6f [libcomposite] composite_unbind+0x12/0x14 [libcomposite] usb_gadget_remove_driver+0x4f/0x77 [udc_core] usb_del_gadget_udc+0x52/0xcc [udc_core] dummy_udc_remove+0x27/0x2c [dummy_hcd] platform_drv_remove+0x1d/0x31 device_release_driver_internal+0xe9/0x16d device_release_driver+0x11/0x13 bus_remove_device+0xd2/0xe2 device_del+0x19f/0x221 ? selinux_capable+0x22/0x27 platform_device_del+0x21/0x63 platform_device_unregister+0x10/0x1a cleanup+0x20/0x817 [dummy_hcd] SyS_delete_module+0x10c/0x197 ? ____fput+0xd/0xf ? task_work_run+0x55/0x62 ? prepare_exit_to_usermode+0x65/0x75 do_fast_syscall_32+0x86/0xc3 entry_SYSENTER_32+0x4e/0x7c What happens is that removing the dummy-hcd driver causes the UDC core to unbind the gadget driver, which it does while holding the udc_lock mutex. The unbind routine in g_mass_storage tells the main thread to exit and waits for it to terminate. But as mentioned above, when the main thread exits it tries to unregister the mass-storage function driver. Via the composite framework this ends up calling usb_gadget_unregister_driver(), which tries to acquire the udc_lock mutex. The result is deadlock. The simplest way to fix the problem is not to be so clever: The main thread doesn't have to unregister the function driver. The side effects won't be so terrible; if the gadget is still attached to a USB host when the main thread is killed, it will appear to the host as though the gadget's firmware has crashed -- a reasonably accurate interpretation, and an all-too-common occurrence for USB mass-storage devices. In fact, the code to unregister the driver when the main thread exits is specific to g-mass-storage; it is not used when f-mass-storage is included as a function in a larger composite device. Therefore the entire mechanism responsible for this (the fsg_operations structure with its ->thread_exits method, the fsg_common_set_ops() routine, and the msg_thread_exits() callback routine) can all be eliminated. Even the msg_registered bitflag can be removed, because now the driver is unregistered in only one place rather than in two places. Signed-off-by: Alan Stern CC: Acked-by: Felipe Balbi Acked-by: Michal Nazarewicz Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_mass_storage.c | 27 +++++++-------------------- drivers/usb/gadget/function/f_mass_storage.h | 14 -------------- drivers/usb/gadget/legacy/mass_storage.c | 26 +++----------------------- 3 files changed, 10 insertions(+), 57 deletions(-) commit 520b72fc64debf8a86c3853b8e486aa5982188f0 Author: Alan Stern Date: Thu Sep 21 13:23:58 2017 -0400 USB: gadgetfs: Fix crash caused by inadequate synchronization The gadgetfs driver (drivers/usb/gadget/legacy/inode.c) was written before the UDC and composite frameworks were adopted; it is a legacy driver. As such, it expects that once bound to a UDC controller, it will not be unbound until it unregisters itself. However, the UDC framework does unbind function drivers while they are still registered. When this happens, it can cause the gadgetfs driver to misbehave or crash. For example, userspace can cause a crash by opening the device file and doing an ioctl call before setting up a configuration (found by Andrey Konovalov using the syzkaller fuzzer). This patch adds checks and synchronization to prevent these bad behaviors. It adds a udc_usage counter that the driver increments at times when it is using a gadget interface without holding the private spinlock. The unbind routine waits for this counter to go to 0 before returning, thereby ensuring that the UDC is no longer in use. The patch also adds a check in the dev_ioctl() routine to make sure the driver is bound to a UDC before dereferencing the gadget pointer, and it makes destroy_ep_files() synchronize with the endpoint I/O routines, to prevent the user from accessing an endpoint data structure after it has been removed. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov CC: Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 41 ++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) commit 6e76c01e71551cb221c1f3deacb9dcd9a7346784 Author: Alan Stern Date: Thu Sep 21 16:12:01 2017 -0400 USB: gadgetfs: fix copy_to_user while holding spinlock The gadgetfs driver as a long-outstanding FIXME, regarding a call of copy_to_user() made while holding a spinlock. This patch fixes the issue by dropping the spinlock and using the dev->udc_usage mechanism introduced by another recent patch to guard against status changes while the lock isn't held. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov CC: Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 786de92b3cb26012d3d0f00ee37adf14527f35c4 Author: Alan Stern Date: Fri Sep 22 11:56:49 2017 -0400 USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->altsetting array, which it isn't. Normally this doesn't cause any problems because the various alternate settings have bAlternateSetting values 0, 1, 2, ..., so the value is equal to the index in the array. But this is not guaranteed, and Andrey Konovalov used the syzkaller fuzzer with KASAN to get a slab-out-of-bounds error by violating this assumption. This patch fixes the bug by making uas_find_uas_alt_setting() return a pointer to the altsetting entry rather than either the value or the index. Pointers are less subject to misinterpretation. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov CC: Oliver Neukum CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas-detect.h | 15 ++++++++------- drivers/usb/storage/uas.c | 10 +++++----- 2 files changed, 13 insertions(+), 12 deletions(-) commit 7a6d0071d821965349ff853041f1c1aab496f2d9 Merge: 6e80ecd e117765 Author: Linus Torvalds Date: Fri Sep 22 06:15:27 2017 -1000 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - Fix compiler warnings in inside-secure - Fix LS1021A support in caam - Avoid using RBP in x86 crypto code - Fix bug in talitos that prevents hashing with algif - Fix bugs talitos hashing code that cause incorrect hash result - Fix memory freeing path bug in drbg - Fix af_alg crash when two SG lists are chained * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: af_alg - update correct dst SGL entry crypto: caam - fix LS1021A support on ARMv7 multiplatform kernel crypto: inside-secure - fix gcc-4.9 warnings crypto: talitos - Don't provide setkey for non hmac hashing algs crypto: talitos - fix hashing crypto: talitos - fix sha224 crypto: x86/twofish - Fix RBP usage crypto: sha512-avx2 - Fix RBP usage crypto: x86/sha256-ssse3 - Fix RBP usage crypto: x86/sha256-avx2 - Fix RBP usage crypto: x86/sha256-avx - Fix RBP usage crypto: x86/sha1-ssse3 - Fix RBP usage crypto: x86/sha1-avx2 - Fix RBP usage crypto: x86/des3_ede - Fix RBP usage crypto: x86/cast6 - Fix RBP usage crypto: x86/cast5 - Fix RBP usage crypto: x86/camellia - Fix RBP usage crypto: x86/blowfish - Fix RBP usage crypto: drbg - fix freeing of resources commit e6f9bc34d3779cb7b6a337afed5de8be3f0fab77 Author: Alex Estrin Date: Thu Aug 31 09:30:34 2017 -0700 IB/core: Fix for core panic Build with the latest patches resulted in panic: 11384.486289] BUG: unable to handle kernel NULL pointer dereference at (null) [11384.486293] IP: (null) [11384.486295] PGD 0 [11384.486295] P4D 0 [11384.486296] [11384.486299] Oops: 0010 [#1] SMP ......... snip ...... [11384.486401] CPU: 0 PID: 968 Comm: kworker/0:1H Tainted: G W O 4.13.0-a-stream-20170825 #1 [11384.486402] Hardware name: Intel Corporation S2600WT2R/S2600WT2R, BIOS SE5C610.86B.01.01.0014.121820151719 12/18/2015 [11384.486418] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] [11384.486419] task: ffff880850579680 task.stack: ffffc90007fec000 [11384.486420] RIP: 0010: (null) [11384.486420] RSP: 0018:ffffc90007fef970 EFLAGS: 00010206 [11384.486421] RAX: ffff88084cfe8000 RBX: ffff88084dce4000 RCX: ffffc90007fef978 [11384.486422] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff88084cfe8000 [11384.486422] RBP: ffffc90007fefab0 R08: 0000000000000000 R09: ffff88084dce4080 [11384.486423] R10: ffffffffa02d7f60 R11: 0000000000000000 R12: ffff88105af65a00 [11384.486423] R13: ffff88084dce4000 R14: 000000000000c000 R15: 000000000000c000 [11384.486424] FS: 0000000000000000(0000) GS:ffff88085f400000(0000) knlGS:0000000000000000 [11384.486425] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [11384.486425] CR2: 0000000000000000 CR3: 0000000001c09000 CR4: 00000000001406f0 [11384.486426] Call Trace: [11384.486431] ? is_valid_mcast_lid.isra.21+0xfb/0x110 [ib_core] [11384.486436] ib_attach_mcast+0x6f/0xa0 [ib_core] [11384.486441] ipoib_mcast_attach+0x81/0x190 [ib_ipoib] [11384.486443] ipoib_mcast_join_complete+0x354/0xb40 [ib_ipoib] [11384.486448] mcast_work_handler+0x330/0x6c0 [ib_core] [11384.486452] join_handler+0x101/0x220 [ib_core] [11384.486455] ib_sa_mcmember_rec_callback+0x54/0x80 [ib_core] [11384.486459] recv_handler+0x3a/0x60 [ib_core] [11384.486462] ib_mad_recv_done+0x423/0x9b0 [ib_core] [11384.486466] __ib_process_cq+0x5d/0xb0 [ib_core] [11384.486469] ib_cq_poll_work+0x20/0x60 [ib_core] [11384.486472] process_one_work+0x149/0x360 [11384.486474] worker_thread+0x4d/0x3c0 [11384.486487] kthread+0x109/0x140 [11384.486488] ? rescuer_thread+0x380/0x380 [11384.486489] ? kthread_park+0x60/0x60 [11384.486490] ? kthread_park+0x60/0x60 [11384.486493] ret_from_fork+0x25/0x30 [11384.486493] Code: Bad RIP value. [11384.486493] Code: Bad RIP value. [11384.486496] RIP: (null) RSP: ffffc90007fef970 [11384.486497] CR2: 0000000000000000 [11384.486531] ---[ end trace b1acec6fb4ff6e75 ]--- [11384.532133] Kernel panic - not syncing: Fatal exception [11384.536541] Kernel Offset: disabled [11384.969491] ---[ end Kernel panic - not syncing: Fatal exception [11384.976875] sched: Unexpected reschedule of offline CPU#1! [11384.983646] ------------[ cut here ]------------ Rdma device driver may not have implemented (*get_link_layer)() so it can not be called directly. Should use appropriate helper function. Reviewed-by: Yuval Shaia Fixes: 523633359224 ("IB/core: Fix the validations of a multicast LID in attach or detach operations") Cc: stable@kernel.org # 4.13 Reviewed-by: Dennis Dalessandro Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4fa6c43ce4b427350cfbb659436bfe3d9e09a1d Author: Waiman Long Date: Thu Sep 21 09:54:13 2017 -0400 cgroup: Reinit cgroup_taskset structure before cgroup_migrate_execute() returns The cgroup_taskset structure within the larger cgroup_mgctx structure is supposed to be used once and then discarded. That is not really the case in the hotplug code path: cpuset_hotplug_workfn() - cgroup_transfer_tasks() - cgroup_migrate() - cgroup_migrate_add_task() - cgroup_migrate_execute() In this case, the cgroup_migrate() function is called multiple time with the same cgroup_mgctx structure to transfer the tasks from one cgroup to another one-by-one. The second time cgroup_migrate() is called, the cgroup_taskset will be in an incorrect state and so may cause the system to panic. For example, [ 150.888410] Faulting instruction address: 0xc0000000001db648 [ 150.888414] Oops: Kernel access of bad area, sig: 11 [#1] [ 150.888417] SMP NR_CPUS=2048 [ 150.888417] NUMA [ 150.888419] pSeries : [ 150.888545] NIP [c0000000001db648] cpuset_can_attach+0x58/0x1b0 [ 150.888548] LR [c0000000001db638] cpuset_can_attach+0x48/0x1b0 [ 150.888551] Call Trace: [ 150.888554] [c0000005f65cb940] [c0000000001db638] cpuset_can_attach+0x48/0x1b 0 (unreliable) [ 150.888559] [c0000005f65cb9a0] [c0000000001cff04] cgroup_migrate_execute+0xc4/0x4b0 [ 150.888563] [c0000005f65cba20] [c0000000001d7d14] cgroup_transfer_tasks+0x1d4/0x370 [ 150.888568] [c0000005f65cbb70] [c0000000001ddcb0] cpuset_hotplug_workfn+0x710/0x8f0 [ 150.888572] [c0000005f65cbc80] [c00000000012032c] process_one_work+0x1ac/0x4d0 [ 150.888576] [c0000005f65cbd20] [c0000000001206f8] worker_thread+0xa8/0x5b0 [ 150.888580] [c0000005f65cbdc0] [c0000000001293f8] kthread+0x168/0x1b0 [ 150.888584] [c0000005f65cbe30] [c00000000000b368] ret_from_kernel_thread+0x5c/0x74 To allow reuse of the cgroup_mgctx structure, some fields in that structure are now re-initialized at the end of cgroup_migrate_execute() function call so that the structure can be reused again in a later iteration without causing problem. This bug was introduced in the commit e595cd706982 ("group: track migration context in cgroup_mgctx") in 4.11. This commit moves the cgroup_taskset initialization out of cgroup_migrate(). The commit 10467270fb3 ("cgroup: don't call migration methods if there are no tasks to migrate") helped, but did not completely resolve the problem. Fixes: e595cd706982bff0211e6fafe5a108421e747fbc ("group: track migration context in cgroup_mgctx") Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v4.11+ kernel/cgroup/cgroup.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bfc81a8bc18e3c4ba0cbaa7666ff76be2f998991 Author: Takashi Iwai Date: Fri Sep 22 16:18:53 2017 +0200 ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor When a USB-audio device receives a maliciously adjusted or corrupted buffer descriptor, the USB-audio driver may access an out-of-bounce value at its parser. This was detected by syzkaller, something like: BUG: KASAN: slab-out-of-bounds in usb_audio_probe+0x27b2/0x2ab0 Read of size 1 at addr ffff88006b83a9e8 by task kworker/0:1/24 CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 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 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+0x22f/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x19/0x20 mm/kasan/report.c:427 snd_usb_create_streams sound/usb/card.c:248 usb_audio_probe+0x27b2/0x2ab0 sound/usb/card.c:605 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 This patch adds the checks of out-of-bounce accesses at appropriate places and bails out when it goes out of the given buffer. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/card.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1 Author: Arvind Yadav Date: Wed Sep 20 12:26:38 2017 +0530 drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Free memory region, if arm_pmu_acpi_probe is not successful. Acked-by: Will Deacon Signed-off-by: Arvind Yadav Signed-off-by: Catalin Marinas drivers/perf/arm_pmu_acpi.c | 1 + 1 file changed, 1 insertion(+) commit c0d05cde2a685cd6486390c62be684ce456d84d6 Author: Robin Murphy Date: Thu Sep 21 11:20:58 2017 +0100 iommu/of: Remove PCI host bridge node check of_pci_iommu_init() tries to be clever and stop its alias walk at the device represented by master_np, in case of weird PCI topologies where the bridge to the IOMMU and the rest of the system is not at the root. It turns out this is a bit short-sighted, since there are plenty of other callers of pci_for_each_dma_alias() which would also need the same behaviour in that situation, and the only platform so far with such a topology (Cavium ThunderX2) already solves it more generally via a PCI quirk. As this check is effectively redundant, and returning a boolean value as an int is a bit broken anyway, let's just get rid of it. Reported-by: Jean-Philippe Brucker Fixes: d87beb749281 ("iommu/of: Handle PCI aliases properly") Signed-off-by: Robin Murphy Tested-by: Jean-Philippe Brucker Signed-off-by: Joerg Roedel drivers/iommu/of_iommu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 40784d72aeeb4d95cf74ea2243223a85193f0e84 Author: Arnd Bergmann Date: Fri Aug 25 00:19:54 2017 +0200 crypto: axis - hide an unused variable Without CONFIG_DEBUG_FS, we get a harmless warning: drivers/crypto/axis/artpec6_crypto.c:352:23: error: 'dbgfs_root' defined but not used [-Werror=unused-variable] This moves it into the #ifdef that hides the only user. Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver") Signed-off-by: Arnd Bergmann Acked-by: Lars Persson Signed-off-by: Herbert Xu drivers/crypto/axis/artpec6_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9adcdbc653b52e4be834f535eefec833f9ca6b1 Author: Baolin Wang Date: Thu Sep 21 14:03:29 2017 +0800 ALSA: pcm: Fix structure definition for X32 ABI X32 ABI uses the 64bit timespec in addition to 64bit alignment of 64bit values. We have added compat ABI for these ioctls, but this patch adds one missing padding into 'struct snd_pcm_mmap_status_x32' to fix incompatibilities. Signed-off-by: Baolin Wang Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 1 + 1 file changed, 1 insertion(+) commit 6ae033689d7b1a419def78e8e990b0eab8bb6419 Author: Adrian Hunter Date: Mon Sep 18 15:16:08 2017 +0300 mmc: sdhci-pci: Fix voltage switch for some Intel host controllers Some Intel host controllers (e.g. CNP) 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 Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ec14121931a24f8d3678b8a9c408adee3b21d465 Author: Colin Ian King Date: Wed Sep 20 18:34:18 2017 +0100 staging: rtl8723bs: avoid null pointer dereference on pmlmepriv There is a check to see if pmlmepriv is null before vfree'ing pmlmepriv->free_bss_buf hence implying pmlmepriv could potenially be null. However, a previous call to rtw_free_mlme_priv_ie_data can also dereference pmlmepriv, so move this call so that it is only called if pmlmepriv non-null. Detected by CoverityScan, CID#1077739 ("Dereference before null check") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c51b46dd5b9950436b6b1f8189e93e1ad380cee1 Author: Colin Ian King Date: Wed Sep 20 22:19:57 2017 +0100 staging: rtl8723bs: add missing range check on id The value of the u8 id needs to be upper bounds checked to ensure the cam_cache array on the adapter dvobj is not indexed outside of the allowed range of 0..TOTAL_CAM_ENTRY-1. This can currently occur if id is >= TOTAL_CAM_ENTRY when calling write_cam_from_cache. Fix this by adding an upper range check. Detected by CoverityScan, CID#1428464 ("Use of untrusted scalar value") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 2 ++ 1 file changed, 2 insertions(+) commit e87be9b29c22852ec300826e3b1d551b00c1eb7a Author: Wolfram Sang Date: Thu Sep 14 14:30:43 2017 +0200 mmc: tmio: remove broken and noisy debug macro Some change for v4.14 broke the debug output for TMIO. But since it was not helpful to me and too noisy for my taste anyhow, let's just remove it instead of fixing it. We'll find something better if we'd need it... Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 47 ---------------------------------------- 1 file changed, 47 deletions(-) commit e001fa78d44d0b5c7b1498d1e4a038740efa3b1e Author: Michael Neuling Date: Fri Sep 15 15:26:14 2017 +1000 KVM: PPC: Book3S HV: Check for updated HDSISR on P9 HDSI exception On POWER9 DD2.1 and below, sometimes on a Hypervisor Data Storage Interrupt (HDSI) the HDSISR is not be updated at all. To work around this we put a canary value into the HDSISR before returning to a guest and then check for this canary when we take a HDSI. If we find the canary on a HDSI, we know the hardware didn't update the HDSISR. In this case we return to the guest to retake the HDSI which should correctly update the HDSISR the second time HDSI entry. After talking to Paulus we've applied this workaround to all POWER9 CPUs. The workaround of returning to the guest shouldn't ever be triggered on well behaving CPU. The extra instructions should have negligible performance impact. Signed-off-by: Michael Neuling Signed-off-by: Paolo Bonzini arch/powerpc/kvm/book3s_hv_rmhandlers.S | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 44889942b6eb356eab27ce25fe10701adfec7776 Author: Ladi Prosek Date: Fri Sep 22 07:53:15 2017 +0200 KVM: nVMX: fix HOST_CR3/HOST_CR4 cache For nested virt we maintain multiple VMCS that can run on a vCPU. So it is incorrect to keep vmcs_host_cr3 and vmcs_host_cr4, whose purpose is caching the value of the rarely changing HOST_CR3 and HOST_CR4 VMCS fields, in vCPU-wide data structures. Hyper-V nested on KVM runs into this consistently for me with PCID enabled. CR3 is updated with a new value, unlikely(cr3 != vmx->host_state.vmcs_host_cr3) fires, and the currently loaded VMCS is updated. Then we switch from L2 to L1 and the next exit reverts CR3 to its old value. Fixes: d6e41f1151fe ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant") Signed-off-by: Ladi Prosek Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 549e658a0919e355a2b2144dc380b3729bef7f3e Author: Olaf Hering Date: Thu Sep 21 23:41:48 2017 -0700 Drivers: hv: fcopy: restore correct transfer length Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the daemon changed slightly. For START_FILE_COPY it is still the size of hv_start_fcopy. But for WRITE_TO_FILE and the other operations it is as large as the buffer that arrived via vmbus. In case of WRITE_TO_FILE that is slightly larger than a struct hv_do_fcopy. Since the buffer in the daemon was still larger everything was fine. Currently, the daemon reads only what is actually needed. The new buffer layout is as large as a struct hv_do_fcopy, for the WRITE_TO_FILE operation. Since the kernel expects a slightly larger size, hvt_op_read will return -EINVAL because the daemon will read slightly less than expected. Address this by restoring the expected buffer size in case of WRITE_TO_FILE. Fixes: 'c7e490fc23eb ("Drivers: hv: fcopy: convert to hv_utils_transport")' Fixes: '3f2baa8a7d2e ("Tools: hv: update buffer handling in hv_fcopy_daemon")' Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_fcopy.c | 4 ++++ 1 file changed, 4 insertions(+) commit 33c150c2ee4a65a59190a124b45d05b1abf9478e Author: Dexuan Cui Date: Thu Sep 21 23:41:47 2017 -0700 vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() -> vmbus_device_release(), we'll get a deadlock, because vmbus_device_release() tries to get the same mutex. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Cc: stable@vger.kernel.org (4.13 and above) Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 4 ---- 1 file changed, 4 deletions(-) commit 24600840c74112ad04a9ddd99d7d7f731dcaa1cb Author: Alexander Shishkin Date: Tue Sep 19 18:47:42 2017 +0300 intel_th: pci: Add Lewisburg PCH support This adds Intel(R) Trace Hub PCI ID for Lewisburg PCH. Signed-off-by: Alexander Shishkin Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 920ce7c33db25cf4acb4ade3ae8c93bd23dfd730 Author: Alexander Shishkin Date: Tue Sep 19 18:47:41 2017 +0300 intel_th: pci: Add Cedar Fork PCH support This adds Intel(R) Trace Hub PCI ID for Cedar Fork PCH. Signed-off-by: Alexander Shishkin Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit fd085bb1766d6a598f53af2308374a546a49775a Author: Alexander Shishkin Date: Tue Sep 19 18:47:40 2017 +0300 stm class: Fix a use-after-free For reasons unknown, the stm_source removal path uses device_destroy() to kill the underlying device object. Because device_destroy() uses devt to look for the device to destroy and the fact that stm_source devices don't have one (or all have the same one), it just picks the first device in the class, which may well be the wrong one. That is, loading stm_console and stm_heartbeat and then removing both will die in dereferencing a freed object. Since this should have been device_unregister() in the first place, use it instead of device_destroy(). Signed-off-by: Alexander Shishkin Fixes: 7bd1d4093c2 ("stm class: Introduce an abstraction for System Trace Module devices") Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/stm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 113f6eb6d50cfa5e2a1cdcf1678b12661fa272ab Author: Alan Stern Date: Thu Sep 21 15:59:30 2017 -0400 usb-storage: unusual_devs entry to fix write-access regression for Seagate external drives Kris Lindgren reports that without the NO_WP_DETECT flag, his Seagate external disk drive fails all write accesses. This regresssion dates back approximately to the start of the 4.x kernel releases. Signed-off-by: Alan Stern Reported-by: Kris Lindgren CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 7 +++++++ 1 file changed, 7 insertions(+) commit a4fd4a724d6c30ad671046d83be2e9be2f11d275 Author: Alan Stern Date: Thu Sep 21 16:02:05 2017 -0400 usb-storage: fix bogus hardware error messages for ATA pass-thru devices Ever since commit a621bac3044e ("scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands"), people have been getting bogus error messages for USB disk drives using ATA pass-thru. For example: [ 1344.880193] sd 6:0:0:0: [sdb] Attached SCSI disk [ 1345.069152] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE [ 1345.069159] sd 6:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] [ 1345.069162] sd 6:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information [ 1345.069168] sd 6:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00 [ 1345.172252] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE [ 1345.172258] sd 6:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] [ 1345.172261] sd 6:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information [ 1345.172266] sd 6:0:0:0: [sdb] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00 These messages can be quite annoying, because programs like udisks2 provoke them every 10 minutes or so. Other programs can also have this effect, such as those in smartmontools. I don't fully understand how that commit induced the SCSI core to log these error messages, but the underlying cause for them is code added to usb-storage by commit f1a0743bc0e7 ("USB: storage: When a device returns no sense data, call it a Hardware Error"). At the time it was necessary to do this, in order to prevent an infinite retry loop with some not-so-great mass storage devices. However, the ATA pass-thru protocol uses SCSI sense data to return command status values, and some devices always report Check Condition status for ATA pass-thru commands to ensure that the host retrieves the sense data, even if the command succeeded. This violates the USB mass-storage protocol (Check Condition status is supposed to mean the command failed), but we can't help that. This patch attempts to mitigate the problem of these bogus error reports by changing usb-storage. The HARDWARE ERROR sense key will be inserted only for commands that aren't ATA pass-thru. Thanks to Ewan Milne for pointing out that this mechanism was present in usb-storage. 8 years after writing it, I had completely forgotten its existence. Signed-off-by: Alan Stern Tested-by: Kris Lindgren Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1351305 CC: Ewan D. Milne CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/transport.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 4ba72fc080ad44a5c1e93449ec070cd4d331803f Author: Hans Verkuil Date: Thu Sep 21 22:34:54 2017 +0200 drm/sun4i: cec: Enable back CEC-pin framework Now that the cec-pin framework has been merged, we can remove the safeguard that were preventing the CEC part of the sun4i HDMI driver and actually start to use it. Signed-off-by: Hans Verkuil Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Kconfig | 2 +- drivers/gpu/drm/sun4i/sun4i_hdmi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 222d7dbd258dad4cd5241c43ef818141fad5a87a Author: Eric Dumazet Date: Thu Sep 21 09:15:46 2017 -0700 net: prevent dst uses after free In linux-4.13, Wei worked hard to convert dst to a traditional refcounted model, removing GC. We now want to make sure a dst refcount can not transition from 0 back to 1. The problem here is that input path attached a not refcounted dst to an skb. Then later, because packet is forwarded and hits skb_dst_force() before exiting RCU section, we might try to take a refcount on one dst that is about to be freed, if another cpu saw 1 -> 0 transition in dst_release() and queued the dst for freeing after one RCU grace period. Lets unify skb_dst_force() and skb_dst_force_safe(), since we should always perform the complete check against dst refcount, and not assume it is not zero. Bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=197005 [ 989.919496] skb_dst_force+0x32/0x34 [ 989.919498] __dev_queue_xmit+0x1ad/0x482 [ 989.919501] ? eth_header+0x28/0xc6 [ 989.919502] dev_queue_xmit+0xb/0xd [ 989.919504] neigh_connected_output+0x9b/0xb4 [ 989.919507] ip_finish_output2+0x234/0x294 [ 989.919509] ? ipt_do_table+0x369/0x388 [ 989.919510] ip_finish_output+0x12c/0x13f [ 989.919512] ip_output+0x53/0x87 [ 989.919513] ip_forward_finish+0x53/0x5a [ 989.919515] ip_forward+0x2cb/0x3e6 [ 989.919516] ? pskb_trim_rcsum.part.9+0x4b/0x4b [ 989.919518] ip_rcv_finish+0x2e2/0x321 [ 989.919519] ip_rcv+0x26f/0x2eb [ 989.919522] ? vlan_do_receive+0x4f/0x289 [ 989.919523] __netif_receive_skb_core+0x467/0x50b [ 989.919526] ? tcp_gro_receive+0x239/0x239 [ 989.919529] ? inet_gro_receive+0x226/0x238 [ 989.919530] __netif_receive_skb+0x4d/0x5f [ 989.919532] netif_receive_skb_internal+0x5c/0xaf [ 989.919533] napi_gro_receive+0x45/0x81 [ 989.919536] ixgbe_poll+0xc8a/0xf09 [ 989.919539] ? kmem_cache_free_bulk+0x1b6/0x1f7 [ 989.919540] net_rx_action+0xf4/0x266 [ 989.919543] __do_softirq+0xa8/0x19d [ 989.919545] irq_exit+0x5d/0x6b [ 989.919546] do_IRQ+0x9c/0xb5 [ 989.919548] common_interrupt+0x93/0x93 [ 989.919548] Similarly dst_clone() can use dst_hold() helper to have additional debugging, as a follow up to commit 44ebe79149ff ("net: add debug atomic_inc_not_zero() in dst_hold()") In net-next we will convert dst atomic_t to refcount_t for peace of mind. Fixes: a4c2fd7f7891 ("net: remove DST_NOCACHE flag") Signed-off-by: Eric Dumazet Cc: Wei Wang Reported-by: Paweł Staszewski Bisected-by: Paweł Staszewski Acked-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/net/dst.h | 22 ++++------------------ include/net/route.h | 2 +- include/net/sock.h | 2 +- 3 files changed, 6 insertions(+), 20 deletions(-) commit 059fbe8b5171960bd5c2371bb327ac18733773de Author: Geert Uytterhoeven Date: Thu Sep 21 13:27:02 2017 +0200 net: phy: Fix truncation of large IRQ numbers in phy_attached_print() Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is not enough to represent interrupt numbers on all architectures. Hence PHY interrupt numbers may be truncated during printing. Increase the buffer size from 4 to 8 bytes to fix this. Fixes: 5e369aefdce4818c ("net: stmmac: Delete dead code for MDIO registration") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e80ecdddf4ea6f3cd84e83720f3d852e6624a68 Merge: 4a704d6 33a5608 Author: Linus Torvalds Date: Thu Sep 21 15:51:19 2017 -1000 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A crash fix and corresponding regression test enabling for the crash scenario. The unit test for this crash is available in ndctl-v58.2. This branch has received a build success notification from the 0day-kbuild robot over 148 configs. The fix is tagged for -stable / backport to 4.13" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, namespace: fix btt claim class crash tools/testing/nvdimm: disable labels for nfit_test.1 commit 127b8e2692b6c145955bb71e482ca1bc6ce10027 Author: Gabriel Fernandez Date: Tue Sep 19 13:44:06 2017 +0200 dt-bindings: clk: stm32h7: fix clock-cell size The clock-cell size is 1 on stm32h7 plaform. Signed-off-by: Gabriel Fernandez Fixes: 3e4d618b0722 ("clk: stm32h7: Add stm32h743 clock driver") Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b4877c7bdc6ae39ce03716df7caeecf204697eb Author: Dmitry Torokhov Date: Wed Sep 6 16:22:59 2017 -0700 Input: uinput - avoid crash when sending FF request to device going away If FF request comes in while uinput device is going away, uinput_request_send() will fail with -ENODEV, and uinput_request_submit() will attempt to mark the slot as unused by calling uinput_request_done(). Unfortunately in this case we haven't initialized request->done completion yet, and we get a crash: [ 39.402036] BUG: spinlock bad magic on CPU#1, fftest/3108 [ 39.402046] lock: 0xffff88006a93bb00, .magic: 00000000, .owner: /39, .owner_cpu: 1217155072 [ 39.402055] CPU: 1 PID: 3108 Comm: fftest Tainted: G W 4.13.0+ #15 [ 39.402059] Hardware name: LENOVO 20HQS0EG02/20HQS0EG02, BIOS N1MET37W (1.22 ) 07/04/2017 [ 39.402064] 0000000000000086 f0fad82f3ceaa120 ffff88006a93b9a0 ffffffff9de941bb [ 39.402077] ffff88026df8ae00 ffff88006a93bb00 ffff88006a93b9c0 ffffffff9dca62b7 [ 39.402088] ffff88006a93bb00 ffff88006a93baf8 ffff88006a93b9e0 ffffffff9dca62e7 [ 39.402099] Call Trace: [ 39.402112] [] dump_stack+0x4d/0x63 [ 39.402123] [] spin_dump+0x97/0x9c [ 39.402130] [] spin_bug+0x2b/0x2d [ 39.402138] [] do_raw_spin_lock+0x28/0xfd [ 39.402147] [] _raw_spin_lock_irqsave+0x19/0x1f [ 39.402154] [] complete+0x1d/0x48 [ 39.402162] [] 0xffffffffc04f30af [ 39.402167] [] 0xffffffffc04f468c [ 39.402177] [] ? __slab_free+0x22f/0x359 [ 39.402184] [] ? tk_clock_read+0xc/0xe [ 39.402189] [] 0xffffffffc04f471f [ 39.402195] [] ? __wake_up+0x44/0x4b [ 39.402200] [] ? 0xffffffffc04f3240 [ 39.402207] [] erase_effect+0xa1/0xd2 [ 39.402214] [] input_ff_flush+0x43/0x5c [ 39.402219] [] 0xffffffffc04f32ad [ 39.402227] [] input_flush_device+0x3d/0x51 [ 39.402234] [] evdev_flush+0x49/0x5c [ 39.402243] [] filp_close+0x3f/0x65 [ 39.402253] [] put_files_struct+0x66/0xc1 [ 39.402261] [] exit_files+0x47/0x4e [ 39.402270] [] do_exit+0x483/0x969 [ 39.402278] [] ? recalc_sigpending_tsk+0x3d/0x44 [ 39.402285] [] do_group_exit+0x42/0xb0 [ 39.402293] [] get_signal+0x58d/0x5bf [ 39.402300] [] do_signal+0x37/0x53e [ 39.402307] [] ? evdev_ioctl_handler+0xac8/0xb04 [ 39.402314] [] ? evdev_ioctl+0x10/0x12 [ 39.402321] [] ? do_vfs_ioctl+0x42e/0x501 [ 39.402328] [] prepare_exit_to_usermode+0x66/0x90 [ 39.402333] [] syscall_return_slowpath+0xe3/0xec [ 39.402339] [] int_ret_from_sys_call+0x25/0x8f While we could solve this by simply initializing the completion earlier, we are better off rearranging the code a bit so we avoid calling complete() on requests that we did not send out. This patch consolidates marking request slots as free in one place (in uinput_request_submit(), the same place where we acquire them) and having everyone else simply signal completion of the requests. Fixes: 00ce756ce53a ("Input: uinput - mark failed submission requests as free") Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit e8b95728f724797f958912fd9b765a695595d3a6 Author: Dmitry Torokhov Date: Fri Sep 1 17:13:43 2017 -0700 Input: uinput - avoid FF flush when destroying device Normally, when input device supporting force feedback effects is being destroyed, we try to "flush" currently playing effects, so that the physical device does not continue vibrating (or executing other effects). Unfortunately this does not work well for uinput as flushing of the effects deadlocks with the destroy action: - if device is being destroyed because the file descriptor is being closed, then there is noone to even service FF requests; - if device is being destroyed because userspace sent UI_DEV_DESTROY, while theoretically it could be possible to service FF requests, userspace is unlikely to do so (they'd need to make sure FF handling happens on a separate thread) even if kernel solves the issue with FF ioctls deadlocking with UI_DEV_DESTROY ioctl on udev->mutex. To avoid lockups like the one below, let's install a custom input device flush handler, and avoid trying to flush force feedback effects when we destroying the device, and instead rely on uinput to shut off the device properly. NMI watchdog: Watchdog detected hard LOCKUP on cpu 3 ... <> [] _raw_spin_lock_irqsave+0x37/0x40 [] complete+0x1d/0x50 [] uinput_request_done+0x3c/0x40 [uinput] [] uinput_request_submit.part.7+0x47/0xb0 [uinput] [] uinput_dev_erase_effect+0x5b/0x76 [uinput] [] erase_effect+0xad/0xf0 [] flush_effects+0x4d/0x90 [] input_flush_device+0x40/0x60 [] evdev_cleanup+0xac/0xc0 [] evdev_disconnect+0x2b/0x60 [] __input_unregister_device+0xac/0x150 [] input_unregister_device+0x47/0x70 [] uinput_destroy_device+0xb5/0xc0 [uinput] [] uinput_ioctl_handler.isra.9+0x65e/0x740 [uinput] [] ? do_futex+0x12b/0xad0 [] uinput_ioctl+0x18/0x20 [uinput] [] do_vfs_ioctl+0x298/0x480 [] ? security_file_ioctl+0x43/0x60 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x12/0x71 Reported-by: Rodrigo Rivas Costa Reported-by: Clément VUCHENER Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=193741 Signed-off-by: Dmitry Torokhov drivers/input/ff-core.c | 13 ++++++++++--- drivers/input/misc/uinput.c | 18 ++++++++++++++++++ include/linux/input.h | 1 + 3 files changed, 29 insertions(+), 3 deletions(-) commit 5d6b66c031ed040c6eeedbc0b0477511edcbfa1b Merge: f0ef1f4 8c96fee Author: David S. Miller Date: Thu Sep 21 15:31:03 2017 -0700 Merge branch 'smc-bug-fixes' Ursula Braun says: ==================== net/smc: bug fixes 2017-09-20 here is a collection of small smc-patches built for net fixing smc problems in different areas. ==================== Signed-off-by: David S. Miller commit 8c96feeeb39ba0b89c6121f71e8f7aa2a4d46671 Author: Ursula Braun Date: Thu Sep 21 09:16:34 2017 +0200 net/smc: no close wait in case of process shut down Usually socket closing is delayed if there is still data available in the send buffer to be transmitted. If a process is killed, the delay should be avoided. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_close.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 18e537cd58e8d6932719bfa79cb96a1fbc639199 Author: Ursula Braun Date: Thu Sep 21 09:16:33 2017 +0200 net/smc: introduce a delay The number of outstanding work requests is limited. If all work requests are in use, tx processing is postponed to another scheduling of the tx worker. Switch to a delayed worker to have a gap for tx completion queue events before the next retry. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc.h | 2 +- net/smc/smc_close.c | 12 +++++++----- net/smc/smc_tx.c | 12 ++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) commit bfbedfd38378c1ad9df84469403d69c17b074b66 Author: Ursula Braun Date: Thu Sep 21 09:16:32 2017 +0200 net/smc: terminate link group if out-of-sync is received An out-of-sync condition can just be detected by the client. If the server receives a CLC DECLINE message indicating an out-of-sync condition for the link groups, the server must clean up the out-of-sync link group. There is no need for an extra third parameter in smc_clc_send_decline(). Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 6 ++---- net/smc/smc_clc.c | 10 +++++----- net/smc/smc_clc.h | 3 +-- 3 files changed, 8 insertions(+), 11 deletions(-) commit 5bc11ddbdf7fc6681db5c3f9a92cdee0f19cee1e Author: Ursula Braun Date: Thu Sep 21 09:16:31 2017 +0200 net/smc: longer delay for client link group removal Client link group creation always follows the server linkgroup creation. If peer creates a new server link group, client has to create a new client link group. If peer reuses a server link group for a new connection, client has to reuse its client link group as well. This patch introduces a longer delay for client link group removal to make sure this link group still exists, once the peer decides to reuse a server link group. This avoids out-of-sync conditions for link groups. If already scheduled, modify the delay. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_core.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 8301fa44b41b1ca46a0547809eb173112559dc51 Author: Ursula Braun Date: Thu Sep 21 09:16:30 2017 +0200 net/smc: adapt send request completion notification The solicited flag is meaningful for the receive completion queue. Ask for next work completion of any type on the send queue. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_wr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6832c3acdb2ceb099ec3c385777fbaa6d5a5fd6 Author: Ursula Braun Date: Thu Sep 21 09:16:29 2017 +0200 net/smc: adjust net_device refcount smc_pnet_fill_entry() uses dev_get_by_name() adding a refcount to ndev. The following smc_pnet_enter() has to reduce the refcount if the entry to be added exists already in the pnet table. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_pnet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 731b008560e6dfaf5fb297543f17bbe9bb868f3c Author: Ursula Braun Date: Thu Sep 21 09:16:28 2017 +0200 net/smc: take RCU read lock for routing cache lookup smc_netinfo_by_tcpsk() looks up the routing cache. Such a lookup requires protection by an RCU read lock. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 846e344eb7229018457d6d6fc1ab0cc0a167692f Author: Hans Wippel Date: Thu Sep 21 09:16:27 2017 +0200 net/smc: add receive timeout check The SMC receive function currently lacks a timeout check under the condition that no data were received and no data are available. This patch adds such a check. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_rx.c | 2 ++ 1 file changed, 2 insertions(+) commit 09579ac803a3638344b8544b5940793d5358673e Author: Hans Wippel Date: Thu Sep 21 09:16:26 2017 +0200 net/smc: add missing dev_put In the infiniband part, SMC currently uses get_netdev which calls dev_hold on the returned net device. However, the SMC code never calls dev_put on that net device resulting in a wrong reference count. This patch adds a dev_put after the usage of the net device to fix the issue. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_ib.c | 1 + 1 file changed, 1 insertion(+) commit f0ef1f4f2b772c0a1c8b35a6ae3edf974cc110dd Author: Thomas Meyer Date: Thu Sep 21 08:24:27 2017 +0200 net: stmmac: 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: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 + 1 file changed, 1 insertion(+) commit 687740cebbea7ec56da13b82be6be6d4164e5bb4 Merge: 59ec693 e365280 Author: David S. Miller Date: Thu Sep 21 15:22:54 2017 -0700 Merge branch 'lan78xx-fixes' Nisar Sayed says: ==================== lan78xx: This series of patches are for lan78xx driver. This series of patches are for lan78xx driver. These patches fixes potential issues associated with lan78xx driver. v5 - Updated changes as per comments v4 - Updated changes to handle return values as per comments - Updated EEPROM write handling as per comments v3 - Updated chagnes as per comments v2 - Added patch version information - Added fixes tag - Updated patch description - Updated chagnes as per comments v1 - Splitted patches as per comments - Dropped "fixed_phy device support" and "Fix for system suspend" changes ==================== Signed-off-by: David S. Miller commit e365280521029c9366bab038915274ddaa1b7195 Author: Nisar Sayed Date: Thu Sep 21 02:36:38 2017 +0530 lan78xx: Use default values loaded from EEPROM/OTP after reset Use default value of auto duplex and auto speed values loaded from EEPROM/OTP after reset. The LAN78xx allows platform configurations to be loaded from EEPROM/OTP. Ex: When external phy is connected, the MAC can be configured to have correct auto speed, auto duplex, auto polarity configured from the EEPROM/OTP. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 1 - 1 file changed, 1 deletion(-) commit c077682282dd34c75e8477c22dffe7c9aebc6e98 Author: Nisar Sayed Date: Thu Sep 21 02:36:37 2017 +0530 lan78xx: Allow EEPROM write for less than MAX_EEPROM_SIZE Allow EEPROM write for less than MAX_EEPROM_SIZE Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8a7ffeb795f864dd605b579c05934cba95dc8ad3 Author: Nisar Sayed Date: Thu Sep 21 02:36:36 2017 +0530 lan78xx: Fix for eeprom read/write when device auto suspend Fix for eeprom read/write when device auto suspend Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 59ec693a45b9bc0a3977552bc3421202fd7fb2f1 Merge: 4a7a386 ceb6281 Author: David S. Miller Date: Thu Sep 21 15:20:41 2017 -0700 Merge branch 'phylib-xcvr-type' Florian Fainelli says: ==================== net: Bring back transceiver type for PHYLIB With the introduction of the xLINKSETTINGS ethtool APIs, the transceiver type was deprecated, but in that process we lost some useful information that PHYLIB was consistently reporting about internal vs. external PHYs. This brings back transceiver as a read-only field that is only consumed in the legacy path where ETHTOOL_GET is called but the underlying drivers implement the new style klink_settings API. ==================== Signed-off-by: David S. Miller commit ceb628134a75564d7bfa8e4ef902e6e588339e11 Author: Florian Fainelli Date: Wed Sep 20 15:52:14 2017 -0700 net: phy: Keep reporting transceiver type With commit 2d55173e71b0 ("phy: add generic function to support ksetting support"), we lost the ability to report the transceiver type like we used to. Now that we have added back the transceiver type to ethtool_link_settings, we can report it back like we used to and have no loss of information. Fixes: 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") Fixes: 2d55173e71b0 ("phy: add generic function to support ksetting support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19cab8872692960535aa6d12e3a295ac51d1a648 Author: Florian Fainelli Date: Wed Sep 20 15:52:13 2017 -0700 net: ethtool: Add back transceiver type Commit 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") deprecated the ethtool_cmd::transceiver field, which was fine in premise, except that the PHY library was actually using it to report the type of transceiver: internal or external. Use the first word of the reserved field to put this __u8 transceiver field back in. It is made read-only, and we don't expect the ETHTOOL_xLINKSETTINGS API to be doing anything with this anyway, so this is mostly for the legacy path where we do: ethtool_get_settings() -> dev->ethtool_ops->get_link_ksettings() -> convert_link_ksettings_to_legacy_settings() to have no information loss compared to the legacy get_settings API. Fixes: 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 6 +++++- net/core/ethtool.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 4a7a3860caac1a8779e8c459d8abe21b111798d6 Author: Timur Tabi Date: Wed Sep 20 15:32:53 2017 -0500 net: qcom/emac: add software control for pause frame mode The EMAC has the option of sending only a single pause frame when flow control is enabled and the RX queue is full. Although sending only one pause frame has little value, this would allow admins to enable automatic flow control without having to worry about the EMAC flooding nearby switches with pause frames if the kernel hangs. The option is enabled by using the single-pause-mode private flag. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 30 +++++++++++++++++++++++ drivers/net/ethernet/qualcomm/emac/emac-mac.c | 22 +++++++++++++++++ drivers/net/ethernet/qualcomm/emac/emac.c | 3 +++ drivers/net/ethernet/qualcomm/emac/emac.h | 3 +++ 4 files changed, 58 insertions(+) commit 0ab09befdbb7ca9b969d6206108629ddff43876e Author: Alex Ng Date: Wed Sep 20 11:17:35 2017 -0700 hv_netvsc: fix send buffer failure on MTU change If MTU is changed the host would reject the send buffer change. This problem is result of recent change to allow changing send buffer size. Every time we change the MTU, we store the previous net_device section count before destroying the buffer, but we don’t store the previous section size. When we reinitialize the buffer, its size is calculated by multiplying the previous count and previous size. Since we continuously increase the MTU, the host returns us a decreasing count value while the section size is reinitialized to 1728 bytes every time. This eventually leads to a condition where the calculated buf_size is so small that the host rejects it. Fixes: 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size") Signed-off-by: Alex Ng Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc.c | 7 ++----- drivers/net/hyperv/netvsc_drv.c | 8 ++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) commit fe2502e49b58606580c77b3d84e42f946de182d8 Author: Cong Wang Date: Wed Sep 20 09:18:45 2017 -0700 net_sched: remove cls_flower idr on failure Fixes: c15ab236d69d ("net/sched: Change cls_flower to use IDR") Cc: Chris Mi Cc: Jiri Pirko Signed-off-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1ebfc603d046f1dda6507d11803f9b4046cee712 Merge: b0e07da 4a704d6 Author: Sean Paul Date: Thu Sep 21 14:18:46 2017 -0700 Merge remote-tracking branch 'origin/master' into drm-misc-fixes Pick up 4.14-rc1 Signed-off-by: Sean Paul commit 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 Author: Konstantin Khlebnikov Date: Wed Sep 20 15:46:11 2017 +0300 net_sched/hfsc: fix curve activation in hfsc_change_class() If real-time or fair-share curves are enabled in hfsc_change_class() class isn't inserted into rb-trees yet. Thus init_ed() and init_vf() must be called in place of update_ed() and update_vf(). Remove isn't required because for now curves cannot be disabled. Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit c8e1812960eeae42e2183154927028511c4bc566 Author: Konstantin Khlebnikov Date: Wed Sep 20 15:45:36 2017 +0300 net_sched: always reset qdisc backlog in qdisc_reset() SKB stored in qdisc->gso_skb also counted into backlog. Some qdiscs don't reset backlog to zero in ->reset(), for example sfq just dequeue and free all queued skb. Signed-off-by: Konstantin Khlebnikov Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Signed-off-by: David S. Miller net/sched/sch_generic.c | 1 + 1 file changed, 1 insertion(+) commit 2ccb4837c938357233a0b8818e3ca3e58242c952 Author: Peter Ujfalusi Date: Thu Sep 21 14:35:32 2017 +0300 dmaengine: ti-dma-crossbar: Fix possible race condition with dma_inuse When looking for unused xbar_out lane we should also protect the set_bit() call with the same mutex to protect against concurrent threads picking the same ID. Fixes: ec9bfa1e1a796 ("dmaengine: ti-dma-crossbar: dra7: Use bitops instead of idr") Signed-off-by: Peter Ujfalusi Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul drivers/dma/ti-dma-crossbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 87a2f622cc6446c7d09ac655b7b9b04886f16a4c Author: Peter Ujfalusi Date: Mon Sep 18 11:16:26 2017 +0300 dmaengine: edma: Align the memcpy acnt array size with the transfer Memory to Memory transfers does not have any special alignment needs regarding to acnt array size, but if one of the areas are in memory mapped regions (like PCIe memory), we need to make sure that the acnt array size is aligned with the mem copy parameters. Before "dmaengine: edma: Optimize memcpy operation" change the memcpy was set up in a different way: acnt == number of bytes in a word based on __ffs((src | dest | len), bcnt and ccnt for looping the necessary number of words to comlete the trasnfer. Instead of reverting the commit we can fix it to make sure that the ACNT size is aligned to the traswnfer. Fixes: df6694f80365a (dmaengine: edma: Optimize memcpy operation) Signed-off-by: Peter Ujfalusi Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul drivers/dma/edma.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 51a9a8284e43642fc3e85810fd54f4c245d23a14 Author: Colin Ian King Date: Mon Sep 18 10:03:12 2017 +0100 x86/xen: clean up clang build warning In the case where sizeof(maddr) != sizeof(long) p is initialized and never read and clang throws a warning on this. Move declaration of p to clean up the clang build warning: warning: Value stored to 'p' during its initialization is never read Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/include/asm/xen/hypercall.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a704d6db0ee4a349d5d523813a718e429b4914d Merge: 449cd5d 25b080b Author: Linus Torvalds Date: Thu Sep 21 06:01:03 2017 -1000 Merge tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: "Here are some early Kbuild fixes. The in-kernel firmware was removed during the previous merge window. Since then, some bug reports of broken rpm building are flying in ML. We need to fix it now. Summary: - remove firmware install from rpm-pkg / deb-pkg - fix mismatch between release number and UTS_VERSION for rpm-pkg" * tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: rpm-pkg: fix version number handling kbuild: deb-pkg: remove firmware package support kbuild: rpm-pkg: delete firmware_install to fix build error commit 449cd5d2a08ddf3cb99dc9eb066e494345eb2a92 Merge: d9fde26 58aff0a Author: Linus Torvalds Date: Thu Sep 21 05:57:50 2017 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc fixes from Al Viro: "A couple of regression fixes, one for this merge window, one for the previous cycle" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user iov_iter: fix page_copy_sane for compound pages commit d9fde269823620e517fea34b28b41b587c4a81f5 Merge: b6e78a6 73600b6 Author: Linus Torvalds Date: Thu Sep 21 05:55:20 2017 -1000 Merge tag 'mtd/fixes-for-4.14-rc2' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "SPI NOR: - Fix the SFDP parsing code (bugs reported by Geert Uytterhoeven) NAND: - Fix a resource leak in the lpc32xx_mlc driver - Fix a build warning in the core" * tag 'mtd/fixes-for-4.14-rc2' of git://git.infradead.org/linux-mtd: mtd: nand: remove unused blockmask variable mtd: nand: lpc32xx_mlc: Fix an error handling path in lpc32xx_nand_probe() mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp() mtd: spi-nor: Check consistency of the memory size extracted from the SFDP commit b6e78a6f21a85c84fa7e9248eac0fb04953426dd Merge: 20c29a9 56eac98 Author: Linus Torvalds Date: Thu Sep 21 05:52:36 2017 -1000 Merge tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "amdkfd, i915 and exynos fixes. I've ended up on unplanned + planned leave this week, but there were some fixes I decided to dequeue, some amdkfd bits missed the next pull but they are pretty trivial, so I included them. I'm not sure I'll see much else for rc2, lots of people are at XDC" * tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux: drm/exynos/hdmi: Fix unsafe list iteration drm: exynos: include linux/irq.h drm/exynos: Fix suspend/resume support drm/exynos: Fix locking in the suspend/resume paths drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos() drm/i915/cnp: set min brightness from VBT Revert "drm/i915/bxt: Disable device ready before shutdown command" drm/i915/bxt: set min brightness from VBT drm/i915: Fix an error handling in 'intel_framebuffer_init()' drm/i915/gvt: Fix incorrect PCI BARs reporting drm/amdkfd: pass queue's mqd when destroying mqd drm/amdkfd: remove memset before memcpy uapi linux/kfd_ioctl.h: only use __u32 and __u64 commit 20c29a97559c9a59991170d3d648884a9f6aacd3 Merge: c52f56a 6d57339 Author: Linus Torvalds Date: Thu Sep 21 05:51:03 2017 -1000 Merge tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma mapping fix from Christoph Hellwig: "A fix for a fix that went in this merge window from Arnd" * tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping: dma-coherent: fix rmem_dma_device_init regression commit 2e1c42391ff2556387b3cb6308b24f6f65619feb Author: Greg Kroah-Hartman Date: Thu Sep 21 16:58:48 2017 +0200 USB: core: harden cdc_parse_cdc_header Andrey Konovalov reported a possible out-of-bounds problem for the cdc_parse_cdc_header function. He writes: It looks like cdc_parse_cdc_header() doesn't validate buflen before accessing buffer[1], buffer[2] and so on. The only check present is while (buflen > 0). So fix this issue up by properly validating the buffer length matches what the descriptor says it is. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6af1de2e4ec49635905aaed31d073a0d92c8d3bf Author: Arnd Bergmann Date: Wed Sep 6 14:58:53 2017 +0200 ath10k: mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get a compile-time warning: drivers/net/wireless/ath/ath10k/pci.c:3417:12: error: 'ath10k_pci_pm_resume' defined but not used [-Werror=unused-function] static int ath10k_pci_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/pci.c:3401:12: error: 'ath10k_pci_pm_suspend' defined but not used [-Werror=unused-function] static int ath10k_pci_pm_suspend(struct device *dev) Rather than fixing the #ifdef, this just marks both functions as __maybe_unused, which is a more robust way to do this. Fixes: 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 8eba3651f1dad49c83bb7f8d672301dac4c6add6 Author: Manuel Lauss Date: Tue Sep 12 20:36:28 2017 +0200 MIPS: PCI: fix pcibios_map_irq section mismatch Drop the __init from pcibios_map_irq() to make this section mis- match go away: WARNING: vmlinux.o(.text+0x56acd4): Section mismatch in reference from the function pcibios_scanbus() to the function .init.text:pcibios_map_irq() The function pcibios_scanbus() references the function __init pcibios_map_irq(). This is often because pcibios_scanbus lacks a __init annotation or the annotation of pcibios_map_irq is wrong. Run-Tested only on Alchemy. Signed-off-by: Manuel Lauss Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17267/ Signed-off-by: Ralf Baechle arch/mips/pci/fixup-capcella.c | 2 +- arch/mips/pci/fixup-cobalt.c | 2 +- arch/mips/pci/fixup-emma2rh.c | 2 +- arch/mips/pci/fixup-fuloong2e.c | 2 +- arch/mips/pci/fixup-ip32.c | 2 +- arch/mips/pci/fixup-lantiq.c | 2 +- arch/mips/pci/fixup-lemote2f.c | 2 +- arch/mips/pci/fixup-loongson3.c | 2 +- arch/mips/pci/fixup-malta.c | 2 +- arch/mips/pci/fixup-mpc30x.c | 2 +- arch/mips/pci/fixup-pmcmsp.c | 2 +- arch/mips/pci/fixup-sni.c | 2 +- arch/mips/pci/fixup-tb0219.c | 2 +- arch/mips/pci/fixup-tb0226.c | 2 +- arch/mips/pci/fixup-tb0287.c | 2 +- arch/mips/pci/pci-alchemy.c | 2 +- arch/mips/pci/pci-bcm47xx.c | 2 +- arch/mips/pci/pci-lasat.c | 2 +- arch/mips/pci/pci-mt7620.c | 2 +- arch/mips/pci/pci-octeon.c | 4 ++-- arch/mips/pci/pci-rt2880.c | 2 +- arch/mips/pci/pci-rt3883.c | 2 +- arch/mips/pci/pci-xlp.c | 2 +- arch/mips/pci/pci-xlr.c | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) commit c22c8043105591a8b74142cf837604087cdba40b Author: James Hogan Date: Tue Sep 19 14:11:22 2017 +0100 MIPS: Fix input modify in __write_64bit_c0_split() The inline asm in __write_64bit_c0_split() modifies the 64-bit input operand by shifting the high register left by 32, and constructing the full 64-bit value in the low register (even on a 32-bit kernel), so if that value is used again it could cause breakage as GCC would assume the registers haven't changed when they have. To quote the GCC extended asm documentation: > Warning: Do not modify the contents of input-only operands (except for > inputs tied to outputs). The compiler assumes that on exit from the > asm statement these operands contain the same values as they had > before executing the statement. Avoid modifying the input by using a temporary variable as an output which is modified instead of the input and not otherwise used. The asm is always __volatile__ so GCC shouldn't optimise it out. The low register of the temporary output is written before the high register of the input is read, so we have two constraint alternatives, one where both use the same registers (for when the input value isn't subsequently used), and one with an early clobber on the output in case the low output uses the same register as the high input. This allows the resulting assembly to remain mostly unchanged. A diff of a MIPS32r6 kernel reveals only three differences, two in relation to write_c0_r10k_diag() in cpu_probe() (register allocation rearranged slightly but otherwise identical), and one in relation to write_c0_cvmmemctl2() in kvm_vz_local_flush_guesttlb_all(), but the octeon CPU is only supported on 64-bit kernels where __write_64bit_c0_split() isn't used so that shouldn't matter in practice. So there currently doesn't appear to be anything broken by this bug. Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17315/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mipsregs.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 9bbe7dc05c1f80200621a626ec2266987f4b42b3 Author: Arnd Bergmann Date: Mon Sep 18 17:55:24 2017 +0200 MIPS: MSP71xx: Include asm/setup.h msp71xx_defconfig can not be built at the in v4.14-rc1 arch/mips/pmcs-msp71xx/msp_smp.c:72:2: error: implicit declaration of function 'set_vi_handler' [-Werror=implicit-function-declaration] I don't know what caused the regression, but including the right header is the obvious fix. Signed-off-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17309/ Signed-off-by: Ralf Baechle arch/mips/pmcs-msp71xx/msp_smp.c | 2 ++ 1 file changed, 2 insertions(+) commit 1a940687e424080a6ed285f2de8b2f0d018edf3e Author: Shuah Khan Date: Mon Sep 11 19:03:11 2017 -0600 selftests: lib.mk: copy test scripts and test files for make O=dir run For make O=dir run_tests to work, test scripts, test files, and other dependencies need to be copied over to the object directory. Running tests from the object directory is necessary to avoid making the source tree dirty. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b2fc6ade9fe2118591e7f51e21b51f65e36f138f Author: Shuah Khan Date: Mon Sep 11 14:14:41 2017 -0600 selftests: sync: kselftest and kselftest-clean fail for make O=dir case sync test fails to build when object directory is specified to relocate object files. Fix it to specify the correct path. Fix clean target to remove objects. Also include simplified logic to use TEST_CUSTOM_PROGS in build and clean targets instead of hard-coding the test name each time. Signed-off-by: Shuah Khan tools/testing/selftests/sync/Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 38f7251852a0cd47f34af4a6f84df0fadafa8ac7 Author: Shuah Khan Date: Mon Sep 11 13:46:44 2017 -0600 selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS lib.mk var TEST_CUSTOM_PROGS is for tests that need custom build rules. TEST_PROGS is used for test shell scripts. Fix it to use TEST_CUSTOM_PROGS. lib.mk will run and install them. Signed-off-by: Shuah Khan tools/testing/selftests/sync/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit be16a244c199983656e58ddb10d80c67197e502f Author: Shuah Khan Date: Mon Sep 11 13:06:33 2017 -0600 selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test run/install Some tests such as sync can't use generic build rules in lib.mk and require custom rules. Currently there is no provision to allow custom builds and test such as sync use TEST_PROGS which is reserved for test shell scripts. Add TEST_CUSTOM_PROGS variable to lib.mk to run and install custom tests built by individual test make files. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit e2fb65594cae9a016fab4639a5d22a914f1e16c8 Author: Shuah Khan Date: Fri Sep 8 16:05:50 2017 -0600 selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean TEST_PROGS should be used for test scripts that don't ned to be built. Use TEST_GEN_PROGS instead which is intended for test executables. Remove clean target and let the common clean take care of cleaning. Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e0a5696a23290c31c5ac2c76f0e7fe50a12c1fc6 Author: Shuah Khan Date: Thu Sep 7 20:04:26 2017 -0600 selftests: lib.mk: fix test executable status check to use full path Fix test executable status check to use full path for make O=dir case,m when tests are relocated to user specified object directory. Without the full path, this check fails to find the file and fails the test. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52fd1d082398b928a86d4fdf33c9f3abe1bf7914 Author: Shuah Khan Date: Thu Sep 7 19:57:43 2017 -0600 selftests: Makefile: clear LDFLAGS for make O=dir use-case kselftest target fails when object directory is specified to relocate objects. Inherited "LDFLAGS = -m" fails the test builds. Clear it. Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 8050ef2b83a18f628f9501af958fbff39443d58d Author: Shuah Khan Date: Wed Sep 6 18:36:22 2017 -0600 selftests: lib.mk: kselftest and kselftest-clean fail for make O=dir case kselftest and kselftest-clean targets fail when object directory is specified to relocate objects. Main Makefile make O= path clears the built-in defines LINK.c, COMPILE.S, LINK.S, and RM that are used in lib.mk to build and clean targets. Define them. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2bc84526d174a2a89c76438f049fc03ac259a159 Author: Shuah Khan Date: Wed Sep 6 16:44:35 2017 -0600 Makefile: kselftest and kselftest-clean fail for make O=dir case kselftest and kselftest-clean targets fail when object directory is specified to relocate objects. Fix it so it can find the source tree to build from. make O=/tmp/kselftest_top kselftest make[1]: Entering directory '/tmp/kselftest_top' make[2]: Entering directory '/tmp/kselftest_top' make[2]: *** tools/testing/selftests: No such file or directory. Stop. make[2]: Leaving directory '/tmp/kselftest_top' ./linux-kselftest/Makefile:1185: recipe for target 'kselftest' failed make[1]: *** [kselftest] Error 2 make[1]: Leaving directory '/tmp/kselftest_top' Makefile:145: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 Signed-off-by: Shuah Khan Acked-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c84284e59d60514539cb06741972adf60b14a5a3 Author: Corentin Labbe Date: Tue Sep 19 21:04:56 2017 +0200 pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank This patch fix the following build warning: drivers/pinctrl/bcm/pinctrl-bcm2835.c:376:15: warning: variable 'type' set but not used [-Wunused-but-set-variable] Furthermore, it is unused for a long time, at least since commit 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP") where a "FIXME no clue why the code looks up the type here" was added. A year after, nobody answeered this question, so its time to remove it. Signed-off-by: Corentin Labbe Acked-by: Stefan Wahren Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ---- 1 file changed, 4 deletions(-) commit e4b2ae7a8a11c5d4e0a6e21ba65d4b487a15d3d8 Author: Arnd Bergmann Date: Sat Sep 16 22:42:21 2017 +0200 gpio: omap: omap_gpio_show_rev is not __init The probe function calls omap_gpio_show_rev(), which on most compilers is inlined, but on the old gcc-4.6 is not, causing a valid warning about the incorrect __init annotation: WARNING: vmlinux.o(.text+0x40f614): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_show_rev() The function omap_gpio_probe() references the function __init omap_gpio_show_rev(). This is often because omap_gpio_probe lacks a __init annotation or the annotation of omap_gpio_show_rev is wrong. This removes the __init. Signed-off-by: Arnd Bergmann Acked-by: Santosh Shilimkar Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 544e3bf4f0e8278400f19ca7918a3cdf2548b4eb Author: Geert Uytterhoeven Date: Mon Sep 11 14:22:08 2017 +0200 reset: Restrict RESET_HSDK to ARC_SOC_HSDK or COMPILE_TEST The HSDK reset driver is only useful when building for an ARC HSDK platform. While at it, drop the "default n", as that is the default. Fixes: e0be864f14240cb1 ("ARC: reset: introduce HSDKv1 reset driver") Signed-off-by: Geert Uytterhoeven [p.zabel@pengutronix.de: rebased, renamed RESET_HSDK_V1 to RESET_HSDK] Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf00ab842eec7cd4923a3f0f3b5ddcead9b11306 Merge: 0551968 90019f8 Author: Thomas Gleixner Date: Thu Sep 21 11:57:08 2017 +0200 Merge tag 'irqchip-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip updates from Marc Zyngier - A GICv3 initialisation fix when some CPUs fail to be brought up - A GICv4 compile fix for GCC 4.5 (!) - A MIPS-GIC fix for the PCIe support commit 0551968add53777fddd18f4ffb4e3bbc1f646d79 Author: Thomas Gleixner Date: Thu Sep 21 11:54:44 2017 +0200 Revert "genirq: Restrict effective affinity to interrupts actually using it" This reverts commit 74def747bcd09692bdbf8c6a15350795b0f11ca8. The change to the helper function is only correct for the /proc/irq/ readout usage, but breaks the existing x86 usage of that function. Reported-by: Yanko Kaneti Signed-off-by: Thomas Gleixner Cc: Marc Zyngier include/linux/irq.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b537ca6fede69a281dc524983e5e633d79a10a08 Author: Tyrel Datwyler Date: Wed Sep 20 17:02:52 2017 -0400 powerpc/pseries: Fix parent_dn reference leak in add_dt_node() A reference to the parent device node is held by add_dt_node() for the node to be added. If the call to dlpar_configure_connector() fails add_dt_node() returns ENOENT and that reference is not freed. Add a call to of_node_put(parent_dn) prior to bailing out after a failed dlpar_configure_connector() call. Fixes: 8d5ff320766f ("powerpc/pseries: Make dlpar_configure_connector parent node aware") Cc: stable@vger.kernel.org # v3.12+ Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/mobility.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 087ff6a5ae3052bb2835e191094b793789cb8817 Author: Tyrel Datwyler Date: Wed Sep 20 17:02:51 2017 -0400 powerpc/pseries: Fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR Commit 215ee763f8cb ("powerpc: pseries: remove dlpar_attach_node dependency on full path") reworked dlpar_attach_node() to no longer look up the parent node "/cpus", but instead to have the parent node passed by the caller in the function parameter list. As a result dlpar_attach_node() is no longer responsible for freeing the reference to the parent node. However, commit 215ee763f8cb failed to remove the of_node_put(parent) call in dlpar_attach_node(), or to take into account that the reference to the parent in the caller dlpar_cpu_add() needs to be held until after dlpar_attach_node() returns. As a result doing repeated cpu add/remove dlpar operations will eventually result in the following error: OF: ERROR: Bad of_node_put() on /cpus CPU: 0 PID: 10896 Comm: drmgr Not tainted 4.13.0-autotest #1 Call Trace: dump_stack+0x15c/0x1f8 (unreliable) of_node_release+0x1a4/0x1c0 kobject_put+0x1a8/0x310 kobject_del+0xbc/0xf0 __of_detach_node_sysfs+0x144/0x210 of_detach_node+0xf0/0x180 dlpar_detach_node+0xc4/0x120 dlpar_cpu_remove+0x280/0x560 dlpar_cpu_release+0xbc/0x1b0 arch_cpu_release+0x6c/0xb0 cpu_release_store+0xa0/0x100 dev_attr_store+0x68/0xa0 sysfs_kf_write+0xa8/0xf0 kernfs_fop_write+0x2cc/0x400 __vfs_write+0x5c/0x340 vfs_write+0x1a8/0x3d0 SyS_write+0xa8/0x1a0 system_call+0x58/0x6c Fix the issue by removing the of_node_put(parent) call from dlpar_attach_node(), and ensuring that the reference to the parent node is properly held and released by the caller dlpar_cpu_add(). Fixes: 215ee763f8cb ("powerpc: pseries: remove dlpar_attach_node dependency on full path") Signed-off-by: Tyrel Datwyler Reported-by: Abdul Haleem [mpe: Add a comment in the code and frob the change log slightly] Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 60e70ecd7ae0f09ed07699517071eacb01c26d13 Merge: bd7a3fe 7661ca0 Author: Greg Kroah-Hartman Date: Thu Sep 21 10:05:41 2017 +0200 Merge tag 'fixes-for-v4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.14-rc2 First set of fixes for the gadget side. Not much this time around, things have been rather calm. In no order whatsoever, this pull request contains: - A DMA starvation fix on dwc3 caused by some recent changes to how we map/unmap requests - A build error fix on the snps_udc_plat.c driver - A fix for how to we call ->udc_set_speed() - Spinlock recursion fix on the printer gadget - Removal of pointless comparisons on dummy driver commit 829e4887b8676255778e162efc57e4a0f18f8bb3 Author: Ulrich Hecht Date: Mon Sep 18 17:56:14 2017 +0200 arm64: dts: salvator-common: add 12V regulator to backlight This fixes the warning "pwm-backlight backlight: backlight supply power not found, using dummy regulator". Fixes: b33be33670217533 ("arm64: dts: salvator-x: Add panel backlight support") Reported-by: Geert Uytterhoeven Signed-off-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3e77adeea3c5393c9b624832f65441e92867f618 Author: Benjamin Herrenschmidt Date: Thu Sep 7 16:35:40 2017 +1000 powerpc/eeh: Create PHB PEs after EEH is initialized Otherwise we end up not yet having computed the right diag data size on powernv where EEH initialization is delayed, thus causing memory corruption later on when calling OPAL. Fixes: 5cb1f8fdddb7 ("powerpc/powernv/pci: Dynamically allocate PHB diag data") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Benjamin Herrenschmidt Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 4 ++++ arch/powerpc/kernel/eeh_dev.c | 18 ------------------ 2 files changed, 4 insertions(+), 18 deletions(-) commit 58aff0af757356065f33290d96a9cd46dfbcae88 Author: Will Deacon Date: Mon Sep 18 17:47:38 2017 +0100 ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user Commit 553f770ef71b ("ipc: move compat shmctl to native") moved the compat IPC syscall handling into ipc/shm.c and refactored the struct accessors in the process. Unfortunately, the call to copy_compat_shmid_to_user when handling a compat {IPC,SHM}_STAT command gets the arguments the wrong way round, passing a kernel stack address as the user buffer (destination) and the user buffer as the kernel stack address (source). This patch fixes the parameter ordering so the buffers are accessed correctly. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Will Deacon Signed-off-by: Al Viro ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a90bcb86ae700c12432446c4aa1819e7b8e172ec Author: Petar Penkov Date: Tue Aug 29 11:20:32 2017 -0700 iov_iter: fix page_copy_sane for compound pages Issue is that if the data crosses a page boundary inside a compound page, this check will incorrectly trigger a WARN_ON. To fix this, compute the order using the head of the compound page and adjust the offset to be relative to that head. Fixes: 72e809ed81ed ("iov_iter: sanity checks for copy to/from page primitives") Signed-off-by: Petar Penkov CC: Al Viro CC: Eric Dumazet Signed-off-by: Al Viro lib/iov_iter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0603c96f3af50e2f9299fa410c224ab1d465e0f9 Author: Steve French Date: Wed Sep 20 19:57:18 2017 -0500 SMB: Validate negotiate (to protect against downgrade) even if signing off As long as signing is supported (ie not a guest user connection) and connection is SMB3 or SMB3.02, then validate negotiate (protect against man in the middle downgrade attacks). We had been doing this only when signing was required, not when signing was just enabled, but this more closely matches recommended SMB3 behavior and is better security. Suggested by Metze. Signed-off-by: Steve French Reviewed-by: Jeremy Allison Acked-by: Stefan Metzmacher Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/smb2pdu.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit f5c4ba816315d3b813af16f5571f86c8d4e897bd Author: Shu Wang Date: Fri Sep 8 18:48:33 2017 +0800 cifs: release auth_key.response for reconnect. There is a race that cause cifs reconnect in cifs_mount, - cifs_mount - cifs_get_tcp_session - [ start thread cifs_demultiplex_thread - cifs_read_from_socket: -ECONNABORTED - DELAY_WORK smb2_reconnect_server ] - cifs_setup_session - [ smb2_reconnect_server ] auth_key.response was allocated in cifs_setup_session, and will release when the session destoried. So when session re- connect, auth_key.response should be check and released. Tested with my system: CIFS VFS: Free previous auth_key.response = ffff8800320bbf80 A simple auth_key.response allocation call trace: - cifs_setup_session - SMB2_sess_setup - SMB2_sess_auth_rawntlmssp_authenticate - build_ntlmssp_auth_blob - setup_ntlmv2_rsp Signed-off-by: Shu Wang Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg fs/cifs/connect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 94183331e815617246b1baa97e0916f358c794bb Author: Shu Wang Date: Thu Sep 7 16:03:27 2017 +0800 cifs: release cifs root_cred after exit_cifs memory leak was found by kmemleak. exit_cifs_spnego should be called before cifs module removed, or cifs root_cred will not be released. kmemleak report: unreferenced object 0xffff880070a3ce40 (size 192): backtrace: kmemleak_alloc+0x4a/0xa0 kmem_cache_alloc+0xc7/0x1d0 prepare_kernel_cred+0x20/0x120 init_cifs_spnego+0x2d/0x170 [cifs] 0xffffffffc07801f3 do_one_initcall+0x51/0x1b0 do_init_module+0x60/0x1fd load_module+0x161e/0x1b60 SYSC_finit_module+0xa9/0x100 SyS_finit_module+0xe/0x10 Signed-off-by: Shu Wang Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d61eda812041ef9c820d7f147884133fd3307bc Author: Colin Ian King Date: Tue Sep 19 16:27:39 2017 +0100 CIFS: make arrays static const, reduces object code size Don't populate the read-only arrays types[] on the stack, instead make them both static const. Makes the object code smaller by over 200 bytes: Before: text data bss dec hex filename 111503 37696 448 149647 2488f fs/cifs/file.o After: text data bss dec hex filename 111140 37856 448 149444 247c4 fs/cifs/file.o Signed-off-by: Colin Ian King Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/file.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 6cc40834b480759b9901510578a59b722c37073a Merge: 4c4d11b c5795c5 Author: David S. Miller Date: Wed Sep 20 16:15:40 2017 -0700 Merge branch 'hns3-tm-fixes' Yunsheng Lin says: ==================== TM related bugfixes for the HNS3 Ethernet Driver This patch set contains a few bugfixes related to hclge_tm module. ==================== Signed-off-by: David S. Miller commit c5795c5308af81568d1573598716091120c85a38 Author: Yunsheng Lin Date: Wed Sep 20 18:52:58 2017 +0800 net: hns3: Fix for pri to tc mapping in TM Current mapping between pri and tc is one to one, so user can't map multi priorities to the same tc. This patch changes the mapping to many to one. Fixes: 848440544b41f ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 16 +++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) commit 68ece54efd417d415462adbaa2700cba50de3ff6 Author: Yunsheng Lin Date: Wed Sep 20 18:52:57 2017 +0800 net: hns3: Fix for setting rss_size incorrectly rss_size is 1, 2, 4, 8, 16, 32, 64, 128, but acutal tc queue size can be any u16 less than 128. If tc queue size is 5, we set the rss_size to 8, indirection table will be used to limit the size of actual queue size. It may cause dropping of receiving packet in hardware if rss_size is not set correctly. For now, each TC has the same rss size. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 76 ++++++++++------------ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 1 + 3 files changed, 38 insertions(+), 40 deletions(-) commit c4726338d928c824f56c27734d837b8244132705 Author: Yunsheng Lin Date: Wed Sep 20 18:52:56 2017 +0800 net: hns3: Fix typo error for feild in hclge_tm This patch fixes a typo error for feild, which should be field. Fixes: 848440544b41f ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 20 ++++++++++---------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit d602a52540c9b92e0dd152cfe1d0848c23f08894 Author: Yunsheng Lin Date: Wed Sep 20 18:52:55 2017 +0800 net: hns3: Fix for rx priv buf allocation when DCB is not supported When hdev doesn't support DCB, rx private buffer is not allocated, otherwise there is not enough buffer for rx shared buffer, causing buffer allocation process to fail. This patch fixes by checking the dcb capability in hclge_rx_buffer_calc. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b8c8bf47da5576657370798da6f18a8cb0245d5b Author: Yunsheng Lin Date: Wed Sep 20 18:52:54 2017 +0800 net: hns3: Fix for rx_priv_buf_alloc not setting rx shared buffer rx_priv_buf_alloc is used to tell hardware how much buffer is used for rx direction, right now only the private buffer is assigned. For ae_dev that doesn't support DCB, private rx buffer is assigned to zero, only shared rx buffer is used. So not setting the shared rx buffer cause dropping of packet in SSU. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit bb1fe9ea6371e075d3d1448cd3ff6441d31307be Author: Yunsheng Lin Date: Wed Sep 20 18:52:53 2017 +0800 net: hns3: Fix for not setting rx private buffer size to zero When rx private buffer is disabled, there may be some case that the rx private buffer is not set to zero, which may cause buffer allocation process to fail. This patch fixes this problem by setting priv->enable to 0 and priv->buf_size to zero when rx private buffer is disabled. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit d221df4e0faae2b9cc8ad78f3e5e777461b6b542 Author: Yunsheng Lin Date: Wed Sep 20 18:52:52 2017 +0800 net: hns3: Fix for DEFAULT_DV when dev doesn't support DCB When ae_dev doesn't support DCB, DEFAULT_DV must be set to a lower value, otherwise the buffer allocation process will fail. This patch fix it by setting it to 30K bytes. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 2daf4a6536f3109ed0ed758cec14743e0e5c20ea Author: Yunsheng Lin Date: Wed Sep 20 18:52:51 2017 +0800 net: hns3: Fix initialization when cmd is not supported When ae_dev doesn't support DCB, rx_priv_wl_config, common_thrd_config and tm_qs_bp_cfg can't be called, otherwise cmd return fail, which causes the hclge module initialization process to fail. This patch fix it by adding a DCB capability flag to check if the ae_dev support DCB. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 7 ++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 26 +++++++++++++--------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 4 ++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 10 ++++----- 4 files changed, 31 insertions(+), 16 deletions(-) commit e92a0843795779678397ac0790a76de20f79cc13 Author: Yunsheng Lin Date: Wed Sep 20 18:52:50 2017 +0800 net: hns3: Cleanup for ROCE capability flag in ae_dev This patch add the ROCE supported flag in the driver_data field of pci_device_id, delete roce_pci_tbl and change HNAE_DEV_SUPPORT_ROCE_B to HNAE3_DEV_SUPPORT_ROCE_B. This cleanup is done in order to support adding capability in pci_device_id and to fix initialization failure when cmd is not supported. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 5 ++++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 25 ++++------------------ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 16 +++++++++----- 3 files changed, 19 insertions(+), 27 deletions(-) commit 4c4d11b913ccef0eee8d32e5974ae26617676b77 Merge: 02388bf 7f4f7dd Author: David S. Miller Date: Wed Sep 20 16:08:23 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains two Netfilter fixes for your net tree, they are: 1) Fix NAt compilation with UP, from Geert Uytterhoeven. 2) Fix incorrect number of entries when dumping a set, from Vishwanath Pai. ==================== Signed-off-by: David S. Miller commit 02388bf87f72e1d47174cd8f81c34443920eb5a0 Author: Meng Xu Date: Tue Sep 19 21:49:55 2017 -0400 isdn/i4l: fetch the ppp_write buffer in one shot In isdn_ppp_write(), the header (i.e., protobuf) of the buffer is fetched twice from userspace. The first fetch is used to peek at the protocol of the message and reset the huptimer if necessary; while the second fetch copies in the whole buffer. However, given that buf resides in userspace memory, a user process can race to change its memory content across fetches. By doing so, we can either avoid resetting the huptimer for any type of packets (by first setting proto to PPP_LCP and later change to the actual type) or force resetting the huptimer for LCP packets. This patch changes this double-fetch behavior into two single fetches decided by condition (lp->isdn_device < 0 || lp->isdn_channel <0). A more detailed discussion can be found at https://marc.info/?l=linux-kernel&m=150586376926123&w=2 Signed-off-by: Meng Xu Signed-off-by: David S. Miller drivers/isdn/i4l/isdn_ppp.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit e24ee2780a1d6786b94139ebf95b44c9ae62bf13 Author: Troy Kisky Date: Tue Sep 19 17:33:09 2017 -0700 net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it fec_ptp_check_pps_event will return 1 if FEC_T_TF_MASK caused an interrupt. Don't return IRQ_NONE in this case. Signed-off-by: Troy Kisky Acked-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 7063c163cd4a20184b3bbada503dab8f254a8c56 Author: Troy Kisky Date: Tue Sep 19 17:33:08 2017 -0700 net: fec: remove unused interrupt FEC_ENET_TS_TIMER FEC_ENET_TS_TIMER is not checked in the interrupt routine so there is no need to enable it. Signed-off-by: Troy Kisky Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e62d98c4bbc243f3dca18e73a754b629839fc5c Author: Troy Kisky Date: Tue Sep 19 17:33:07 2017 -0700 net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set Before queue 0 was always checked if any queue caused an interrupt. It is better to just mark queue 0 if queue 0 has caused an interrupt. Signed-off-by: Troy Kisky Acked-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 92dd5452c1be873a1193561f4f691763103d22ac Author: Edward Cree Date: Tue Sep 19 18:45:56 2017 +0100 net: change skb->mac_header when Generic XDP calls adjust_head Since XDP's view of the packet includes the MAC header, moving the start- of-packet with bpf_xdp_adjust_head needs to also update the offset of the MAC header (which is relative to skb->head, not to the skb->data that was changed). Without this, tcpdump sees packets starting from the old MAC header rather than the new one, at least in my tests on the loopback device. Fixes: b5cdae3291f7 ("net: Generic XDP") Signed-off-by: Edward Cree Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit c2a64bb9fcd31c39feddf30748b4ee8d82e53c6a Author: Meng Xu Date: Tue Sep 19 13:19:13 2017 -0400 net: compat: assert the size of cmsg copied in is as expected The actual length of cmsg fetched in during the second loop (i.e., kcmsg - kcmsg_base) could be different from what we get from the first loop (i.e., kcmlen). The main reason is that the two get_user() calls in the two loops (i.e., get_user(ucmlen, &ucmsg->cmsg_len) and __get_user(ucmlen, &ucmsg->cmsg_len)) could cause ucmlen to have different values even they fetch from the same userspace address, as user can race to change the memory content in &ucmsg->cmsg_len across fetches. Although in the second loop, the sanity check if ((char *)kcmsg_base + kcmlen - (char *)kcmsg < CMSG_ALIGN(tmp)) is inplace, it only ensures that the cmsg fetched in during the second loop does not exceed the length of kcmlen, but not necessarily equal to kcmlen. But indicated by the assignment kmsg->msg_controllen = kcmlen, we should enforce that. This patch adds this additional sanity check and ensures that what is recorded in kmsg->msg_controllen is the actual cmsg length. Signed-off-by: Meng Xu Signed-off-by: David S. Miller net/compat.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c986169fdec992c464c84d0a3abdbfc846ed3df9 Author: Felix Kuehling Date: Wed Sep 20 18:10:22 2017 -0400 drm/amdkfd: Print event limit messages only once per process To avoid spamming the log. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 5 ++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit cb1d9967461cdf3b6aac6317c8d954a14f842571 Author: Yong Zhao Date: Wed Sep 20 18:10:21 2017 -0400 drm/amdkfd: Fix kernel-queue wrapping bugs Avoid intermediate negative numbers when doing calculations with a mix of signed and unsigned variables where implicit conversions can lead to unexpected results. When kernel queue buffer wraps around to 0, we need to check that rptr won't be overwritten by the new packet. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit b22666febf6fc67776d49782057fe4dd06f41552 Author: Felix Kuehling Date: Wed Sep 20 18:10:17 2017 -0400 drm/amdkfd: Fix incorrect destroy_mqd parameter When uninitializing a kernel queue. 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_kernel_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56eac98b8a0bbb72132340dbfedc912c68c4bd56 Merge: c106c7a 04fc52f Author: Dave Airlie Date: Thu Sep 21 08:02:39 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - fix suspend/resume issues. - fix memory corruption detected by kasan. - fix build error on x86. * tag 'exynos-drm-fixes-for-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos/hdmi: Fix unsafe list iteration drm: exynos: include linux/irq.h drm/exynos: Fix suspend/resume support drm/exynos: Fix locking in the suspend/resume paths commit c106c7a5afa6edb7f245b2d1409636be52d80c7a Merge: 134dd2e 99df13b Author: Dave Airlie Date: Thu Sep 21 08:02:21 2017 +1000 Merge tag 'drm-intel-fixes-2017-09-20' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for 4.14-rc1 Couple fixes for stable: - Fix MIPI panels on BXT. - Fix PCI BARs information on GVT. Plus other fixes: - Fix minimal brightness for BXT, GLK, CFL and CNL. - Fix compilation warning: unused in_vbl - Fix error handling in intel_framebuffer_init * tag 'drm-intel-fixes-2017-09-20' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos() drm/i915/cnp: set min brightness from VBT Revert "drm/i915/bxt: Disable device ready before shutdown command" drm/i915/bxt: set min brightness from VBT drm/i915: Fix an error handling in 'intel_framebuffer_init()' drm/i915/gvt: Fix incorrect PCI BARs reporting commit 1fa089ec6d68849bfe60abd141375dc9b21b0ee8 Author: Steve French Date: Wed Sep 20 16:46:49 2017 -0500 [SMB3] Update session and share information displayed for debugging SMB2/SMB3 We were not displaying some key fields (session status and capabilities and whether guest authenticated) for SMB2/SMB3 session in /proc/fs/cifs/DebugData. This is needed for real world triage of problems with the (now much more common) SMB3 mounts. Signed-off-by: Steve French fs/cifs/cifs_debug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ec9dd352d591f0c90402ec67a317c1ed4fb2e638 Author: Yonghong Song Date: Mon Sep 18 16:38:36 2017 -0700 bpf: one perf event close won't free bpf program attached by another perf event This patch fixes a bug exhibited by the following scenario: 1. fd1 = perf_event_open with attr.config = ID1 2. attach bpf program prog1 to fd1 3. fd2 = perf_event_open with attr.config = ID1 4. user program closes fd2 and prog1 is detached from the tracepoint. 5. user program with fd1 does not work properly as tracepoint no output any more. The issue happens at step 4. Multiple perf_event_open can be called successfully, but only one bpf prog pointer in the tp_event. In the current logic, any fd release for the same tp_event will free the tp_event->prog. The fix is to free tp_event->prog only when the closing fd corresponds to the one which registered the program. Signed-off-by: Yonghong Song Signed-off-by: David S. Miller include/linux/trace_events.h | 1 + kernel/events/core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 008ba2a13f2d04c947adc536d19debb8fe66f110 Author: Willem de Bruijn Date: Thu Sep 14 17:14:41 2017 -0400 packet: hold bind lock when rebinding to fanout hook Packet socket bind operations must hold the po->bind_lock. This keeps po->running consistent with whether the socket is actually on a ptype list to receive packets. fanout_add unbinds a socket and its packet_rcv/tpacket_rcv call, then binds the fanout object to receive through packet_rcv_fanout. Make it hold the po->bind_lock when testing po->running and rebinding. Else, it can race with other rebind operations, such as that in packet_set_ring from packet_rcv to tpacket_rcv. Concurrent updates can result in a socket being added to a fanout group twice, causing use-after-free KASAN bug reports, among others. Reported independently by both trinity and syzkaller. Verified that the syzkaller reproducer passes after this patch. Fixes: dc99f600698d ("packet: Add fanout support.") Reported-by: nixioaming Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 0dcd020b7abbff238f188d4db8f02389dc849553 Author: Kai-Heng Feng Date: Wed Sep 20 09:21:40 2017 +0800 ALSA: usb-audio: Add sample rate quirk for Plantronics C310/C520-M Like other Plantronics devices, C310 and C520-M do not support sample rate reading. Add them to the sample rate quirk accordingly. BugLink: https://bugs.launchpad.net/bugs/1708499 BugLink: https://bugs.launchpad.net/bugs/1709282 Signed-off-by: Kai-Heng Feng Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit 749aaf3372b8b56b8743c3e27700d64c8bd06921 Author: John Keeping Date: Wed Sep 20 13:56:06 2017 -0500 PCI: endpoint: Use correct "end of test" interrupt pci_epf_test_raise_irq() reads the interrupt to use for the response from reg->command, but this has been cleared at the beginning of the command handler so the value is always zero at this point. Instead, extract the interrupt index before handling the command and then pass the requested interrupt into pci_epf_test_raise_irq(). This allows us to remove the specific code to extract the interrupt for COMMAND_RAISE_MSI_IRQ since it is now handled in common code. Fixes: 3ecf3232c54c ("PCI: endpoint: Do not reset *command* inadvertently") Signed-off-by: John Keeping Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit c52f56a69d104d5294af3d652776d94b1ef6a175 Merge: 820bf5c4 75df6e6 Author: Linus Torvalds Date: Wed Sep 20 06:38:07 2017 -1000 Merge tag 'trace-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "This includes three minor fixes. - Have writing to trace file clear the irqsoff (and friends) tracer - trace_pipe behavior for instance buffers was different than top buffer - Show a message of why mmiotrace doesn't start from commandline" * tag 'trace-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix trace_pipe behavior for instance traces tracing: Ignore mmiotrace from kernel commandline tracing: Erase irqsoff trace with empty write commit 35f3c984548524be5eb4c3f5295cf58d909e8746 Author: Frank Rowand Date: Mon Sep 18 17:18:44 2017 -0700 scripts/dtc: dtx_diff - 2nd update of include dts paths to match build Update dtx_diff include paths in the same manner as: commit b12869a8d519 ("of: remove drivers/of/testcase-data from include search path for CPP"), commit 5ffa2aed389c ("of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP"), and commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path for both CPP and DTC"). Remove proposed include path kernel/dts/, which was never implemented for the dtb build. For the diff case, each source file is compiled separately. For each of those compiles, provide the location of the source file as an include path, not the location of both source files. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring scripts/dtc/dtx_diff | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 25b080bd53f2873785fa049f570ac1b361c11d72 Author: Masahiro Yamada Date: Wed Sep 20 22:01:26 2017 +0900 kbuild: rpm-pkg: fix version number handling The "Release:" field of the spec file is determined based on the .version file. However, the .version file is not copied to the source tar file. So, when we build the kernel from the source package, the UTS_VERSION always indicates #1. This does not match with "rpm -q". The kernel UTS_VERSION and "rpm -q" do not agree for binrpm-pkg, either. Please note the kernel has already been built before the spec file is created. Currently, mkspec invokes mkversion. This script returns an incremented version. So, the "Release:" field of the spec file is greater than the version in the kernel by one. For the source package build (where .version file is missing), we can give KBUILD_BUILD_VERSION=%{release} to the build command. For the binary package build, we can simply read out the .version file because it contains the version number that was used for building the kernel image. We can remove scripts/mkversion because scripts/package/Makefile need not touch the .version file. Signed-off-by: Masahiro Yamada scripts/mkversion | 6 ------ scripts/package/Makefile | 5 ----- scripts/package/mkspec | 6 ++---- 3 files changed, 2 insertions(+), 15 deletions(-) commit cc18abbe449aafc013831a8e0440afc336ae1cba Author: Masahiro Yamada Date: Mon Sep 18 18:22:19 2017 +0900 kbuild: deb-pkg: remove firmware package support Commit 5620a0d1aacd ("firmware: delete in-kernel firmware") deleted in-kernel firmware support, including the firmware install command. So, the firmware package does not make sense any more. Remove it. Signed-off-by: Masahiro Yamada Reviewed-by: Riku Voipio Acked-by: Greg Kroah-Hartman scripts/package/builddeb | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 9e09007486c883de4aa78a384e1d54c3fe6e42d5 Author: Masahiro Yamada Date: Mon Sep 18 18:12:36 2017 +0900 kbuild: rpm-pkg: delete firmware_install to fix build error Commit 5620a0d1aacd ("firmware: delete in-kernel firmware") deleted in-kernel firmware support, including "make firmware_install". Since then, "make rpm-pkg" / "make binrpm-pkg" fails to build with the error: make[2]: *** No rule to make target `firmware_install'. Stop. Commit df85b2d767aa ("firmware: Restore support for built-in firmware") restored the build infrastructure for CONFIG_EXTRA_FIRMWARE, but this is out of the scope of "make firmware_install". So, the right thing to do is to kill the use of "make firmware_install". Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware") Signed-off-by: Masahiro Yamada Acked-by: Greg Kroah-Hartman scripts/package/mkspec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a715b3a0efe76d36c3ef96a93894a13db9d3a72f Author: Sergey Matyukevich Date: Mon Sep 18 15:29:50 2017 +0300 qtnfmac: cancel scans on wireless interface changes Cancel active scans and deactivate firmware scan watchdog timer when wireless interface configuration is changed. The usecases include wireless interface mode change, interface down, AP stop, virtual interface removal. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 9 ++++++--- drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 3 +++ drivers/net/wireless/quantenna/qtnfmac/event.c | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) commit 20da2ec06bfad2d4dfd40d77d3831f5e56365d20 Author: Sergey Matyukevich Date: Mon Sep 18 15:29:49 2017 +0300 qtnfmac: lock access to h/w in tx path Fix tx path regression. Lock should be held when queuing packets to h/w fifos in order to properly handle configurations with multiple enabled interfaces. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 9 ++++++++- drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 7661ca09b2ff98f48693f431bb01fed62830e433 Author: Arnd Bergmann Date: Thu Sep 7 16:14:31 2017 +0200 usb: gadget: dummy: fix nonsensical comparisons gcc-8 points out two comparisons that are clearly bogus and almost certainly not what the author intended to write: drivers/usb/gadget/udc/dummy_hcd.c: In function 'set_link_state_by_speed': drivers/usb/gadget/udc/dummy_hcd.c:379:31: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] USB_PORT_STAT_ENABLE) == 1 && ^~ drivers/usb/gadget/udc/dummy_hcd.c:381:25: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] USB_SS_PORT_LS_U0) == 1 && ^~ I looked at the code for a bit and came up with a change that makes it look like what the author probably meant here. This makes it look reasonable to me and to gcc, shutting up the warning. It does of course change behavior as the two conditions are actually evaluated rather than being hardcoded to false, and I have made no attempt at verifying that the changed logic makes sense in the context of a USB HCD, so that part needs to be reviewed carefully. Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support") Cc: Tatyana Brokhman Cc: Felipe Balbi Acked-by: Alan Stern Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 641663a19f6002ecc5c5af517a5184d4164cc749 Author: Randy Dunlap Date: Mon Sep 11 09:24:15 2017 -0700 usb: gadget: udc: fix snps_udc_plat.c build errors Fix build errors that happen when CONFIG_EXTCON=m and CONFIG_USB_SNP_UDC_PLAT=y by preventing that combination in Kconfig. CONFIG_EXTCON can still be disabled or enabled for this driver since has stubs for the disabled case, but if CONFIG_EXTCON=m, USB_SNP_UDC_PLAT is restricted to m or n (cannot be builtin). drivers/built-in.o: In function `udc_plat_remove': snps_udc_plat.c:(.text+0x2c4060): undefined reference to `extcon_unregister_notifier' drivers/built-in.o: In function `udc_plat_probe': snps_udc_plat.c:(.text+0x2c438c): undefined reference to `extcon_get_edev_by_phandle' snps_udc_plat.c:(.text+0x2c43f2): undefined reference to `extcon_register_notifier' snps_udc_plat.c:(.text+0x2c4416): undefined reference to `extcon_get_state' snps_udc_plat.c:(.text+0x2c44f7): undefined reference to `extcon_unregister_notifier' Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9ada8c582088d32bd5c071c17213bc6edf37443a Author: Yoshihiro Shimoda Date: Wed Sep 13 15:31:33 2017 +0900 usb: gadget: function: printer: avoid spinlock recursion If usb_gadget_giveback_request() is called in usb_ep_queue(), this printer_write() is possible to cause spinlock recursion. So, this patch adds spin_unlock() before calls usb_ep_queue() to avoid it. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_printer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 97e133d54c1ca8948b191e5721a145a76c4db33d Author: Roger Quadros Date: Tue Sep 19 11:46:16 2017 +0300 usb: gadget: core: fix ->udc_set_speed() logic Consider the following case: udc controller supports SuperSpeed. If we first load a HighSpeed gadget followed by a SuperSpeed gadget, the SuperSpeed gadget will be limited to HighSpeed as UDC core driver doesn't call ->udc_set_speed() in the second case. Call ->udc_set_speed() unconditionally to fix this issue. This will also fix the case for dwc3 controller driver when SuperSpeed gadget is loaded first and works in HighSpeed only as udc_set_speed() was never being called. Fixes: 6099eca796ae ("usb: gadget: core: introduce ->udc_set_speed() method") Cc: [v4.13+] Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 51dce3867c6c63c7500332e5448c2ba76808d6b5 Author: Heiko Carstens Date: Thu Sep 14 14:42:32 2017 +0200 s390/topology: enable / disable topology dynamically Add a new sysctl file /proc/sys/s390/topology which displays if topology is on (1) or off (0) as specified by the "topology=" kernel parameter. This allows to change topology information during runtime and configuring it via /etc/sysctl.conf instead of using the kernel line parameter. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/topology.c | 76 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit 1b25fda0533462c9cee3a22e8a7bea68fa670af2 Author: Heiko Carstens Date: Tue Sep 19 12:52:22 2017 +0200 s390/topology: alternative topology for topology-less machines If running on machines that do not provide topology information we currently generate a "fake" topology which defines the maximum distance between each cpu: each cpu will be put into an own drawer. Historically this used to be the best option for (virtual) machines in overcommited hypervisors. For some workloads however it is better to generate a different topology where all cpus are siblings within a package (all cpus are core siblings). This shows performance improvements of up to 10%, depending on the workload. In order to keep the current behaviour, but also allow to switch to the different core sibling topology use the existing "topology=" kernel parameter: Specifying "topology=on" on machines without topology information will generate the core siblings (fake) topology information, instead of the default topology information where all cpus have the maximum distance. On machines which provide topology information specifying "topology=on" does not have any effect. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 12 -------- arch/s390/kernel/topology.c | 72 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 61 insertions(+), 23 deletions(-) commit 8afafa6fba7809c0785018b77c95b19e58b35b94 Author: Naveen N. Rao Date: Fri Sep 15 15:38:21 2017 +0530 powerpc/kprobes: Update optprobes to use emulate_update_regs() Optprobes depended on an updated regs->nip from analyse_instr() to identify the location to branch back from the optprobes trampoline. However, since commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs"), analyse_instr() doesn't update the registers anymore. Due to this, we end up branching back from the optprobes trampoline to the same branch into the trampoline resulting in a loop. Fix this by calling out to emulate_update_regs() before using the nip. Additionally, explicitly compare the return value from analyse_instr() to 1, rather than just checking for !0 so as to guard against any future changes to analyse_instr() that may result in -1 being returned in more scenarios. Fixes: 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/optprobes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b134165eadd6dd07c49f8db40b218185ca3130b0 Merge: 5d298ba a4e89ff Author: Michael Ellerman Date: Wed Sep 20 20:05:24 2017 +1000 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into fixes Merge one commit from Scott which I missed while away. commit 5a5d718f952b55e7fa96bfaf6f31f2c08babd77b Author: Sriram Periyasamy Date: Tue Sep 19 17:25:05 2017 -0500 ALSA: hda - program ICT bits to support HBR audio On recent Intel platforms (Haswell, Broadwell, Skylake, ApolloLake, KabyLake, ...), the IEC Coding Type (ICT) bitfield in the Digital Converter Control #3 needs to be set explicitly for HDMI/DisplayPort High Bit Rate (HBR) audio playback to work. This was not required in earlier platforms when HBR was first introduced. The ICT bits are defined in Section 7.3.3.9 of the HDaudio 1.0a specification. Since the ICT bitfield was not specified for HDAudio 1.0 devices (before 2009), we only program it on machines more recent than Haswell. We tested that this fix is not needed on Baytrail-I (MinnowBoard Turbot) and believe by extension it also does not apply to Braswell. [ Moved AC_VERB_SET_DIGI_CONVERT_3 definition to the right place by tiwai ] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98797 Signed-off-by: Sriram Periyasamy Signed-off-by: Pierre-Louis Bossart Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_verbs.h | 1 + sound/pci/hda/patch_hdmi.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit e117765a117da3ece15689cb8a759d16c415b08c Author: Stephan Mueller Date: Wed Aug 30 09:17:39 2017 +0200 crypto: af_alg - update correct dst SGL entry When two adjacent TX SGL are processed and parts of both TX SGLs are pulled into the per-request TX SGL, the wrong per-request TX SGL entries were updated. This fixes a NULL pointer dereference when a cipher implementation walks the TX SGL where some of the SGL entries were NULL. Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory...") Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/af_alg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c056d910f08029662080a01b4ce2110e2c9a27b6 Author: Horia Geantă Date: Fri Sep 1 17:12:59 2017 +0300 crypto: caam - fix LS1021A support on ARMv7 multiplatform kernel When built using multi_v7_defconfig, driver does not work on LS1021A: [...] caam 1700000.crypto: can't identify CAAM ipg clk: -2 caam: probe of 1700000.crypto failed with error -2 [...] It turns out we have to detect at runtime whether driver is running on an i.MX platform or not. Cc: Fixes: 6c3af9559352 ("crypto: caam - add support for LS1021A") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/Kconfig | 5 +--- drivers/crypto/caam/ctrl.c | 19 ++++++++------- drivers/crypto/caam/regs.h | 59 +++++++++++++++++++++------------------------ 3 files changed, 39 insertions(+), 44 deletions(-) commit 3e1166b94e661ed51af1fe1fe5f74bd83450b50f Author: Arnd Bergmann Date: Tue Sep 12 12:12:16 2017 +0200 crypto: inside-secure - fix gcc-4.9 warnings All older compiler versions up to gcc-4.9 produce these harmless warnings: drivers/crypto/inside-secure/safexcel_cipher.c:389:9: warning: missing braces around initializer [-Wmissing-braces] drivers/crypto/inside-secure/safexcel_cipher.c:389:9: warning: (near initialization for ‘result.completion’) [-Wmissing-braces] drivers/crypto/inside-secure/safexcel_hash.c:422:9: warning: missing braces around initializer [-Wmissing-braces] drivers/crypto/inside-secure/safexcel_hash.c:422:9: warning: (near initialization for ‘result.completion’) [-Wmissing-braces] This changes the syntax to something that works on all versions without warnings. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Arnd Bergmann Acked-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 2 +- drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 56136631573baa537a15e0012055ffe8cfec1a33 Author: LEROY Christophe Date: Tue Sep 12 11:03:39 2017 +0200 crypto: talitos - Don't provide setkey for non hmac hashing algs. Today, md5sum fails with error -ENOKEY because a setkey function is set for non hmac hashing algs, see strace output below: mmap(NULL, 378880, PROT_READ, MAP_SHARED, 6, 0) = 0x77f50000 accept(3, 0, NULL) = 7 vmsplice(5, [{"bin/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 378880}], 1, SPLICE_F_MORE|SPLICE_F_GIFT) = 262144 splice(4, NULL, 7, NULL, 262144, SPLICE_F_MORE) = -1 ENOKEY (Required key not available) write(2, "Generation of hash for file kcap"..., 50) = 50 munmap(0x77f50000, 378880) = 0 This patch ensures that setkey() function is set only for hmac hashing. Cc: Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 886a27c0fc8a34633aadb0986dba11d8c150ae2e Author: LEROY Christophe Date: Wed Sep 13 12:44:57 2017 +0200 crypto: talitos - fix hashing md5sum on some files gives wrong result Exemple: With the md5sum from libkcapi: c15115c05bad51113f81bdaee735dd09 test With the original md5sum: bbdf41d80ba7e8b2b7be3a0772be76cb test This patch fixes this issue Cc: Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afd62fa26343be6445479e75de9f07092a061459 Author: LEROY Christophe Date: Wed Sep 13 12:44:51 2017 +0200 crypto: talitos - fix sha224 Kernel crypto tests report the following error at startup [ 2.752626] alg: hash: Test 4 failed for sha224-talitos [ 2.757907] 00000000: 30 e2 86 e2 e7 8a dd 0d d7 eb 9f d5 83 fe f1 b0 00000010: 2d 5a 6c a5 f9 55 ea fd 0e 72 05 22 This patch fixes it Cc: Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f182f845d0fa26ecc18d3bdcc3d1077a0ea3a31 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:11 2017 -0500 crypto: x86/twofish - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R13 instead of RBP. Both are callee-saved registers, so the substitution is straightforward. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/twofish-avx-x86_64-asm_64.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ca04c823763e5b82c237cabe0c17f547ecdc6271 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:10 2017 -0500 crypto: sha512-avx2 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Mix things up a little bit to get rid of the RBP usage, without hurting performance too much. Use RDI instead of RBP for the TBL pointer. That will clobber CTX, so spill CTX onto the stack and use R12 to read it in the outer loop. R12 is used as a non-persistent temporary variable elsewhere, so it's safe to use. Also remove the unused y4 variable. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha512-avx2-asm.S | 75 ++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 36 deletions(-) commit 539012dcbdd1ff028268764385ed1f6d600812a7 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:09 2017 -0500 crypto: x86/sha256-ssse3 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Swap the usages of R12 and RBP. Use R12 for the TBL register, and use RBP to store the pre-aligned stack pointer. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha256-ssse3-asm.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d3dfbfe2e6e7ecd620531d5201314ad14c4ed5b3 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:08 2017 -0500 crypto: x86/sha256-avx2 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. There's no need to use RBP as a temporary register for the TBL value, because it always stores the same value: the address of the K256 table. Instead just reference the address of K256 directly. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha256-avx2-asm.S | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 673ac6fbc74f835e2125df9ee39e8a2a423832e2 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:07 2017 -0500 crypto: x86/sha256-avx - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Swap the usages of R12 and RBP. Use R12 for the TBL register, and use RBP to store the pre-aligned stack pointer. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha256-avx-asm.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 6488bce756861b94810e54f83416d5e74c0f18bf Author: Josh Poimboeuf Date: Mon Sep 18 14:42:06 2017 -0500 crypto: x86/sha1-ssse3 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Swap the usages of R12 and RBP. Use R12 for the REG_D register, and use RBP to store the pre-aligned stack pointer. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha1_ssse3_asm.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit d7b1722c72aa915283ada27709c6feeb392f6038 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:05 2017 -0500 crypto: x86/sha1-avx2 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R11 instead of RBP. Since R11 isn't a callee-saved register, it doesn't need to be saved and restored on the stack. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/sha1_avx2_x86_64_asm.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3ed7b4d67c6745300c9b5c6baa55da1161b57f60 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:04 2017 -0500 crypto: x86/des3_ede - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use RSI instead of RBP for RT1. Since RSI is also used as a the 'dst' function argument, it needs to be saved on the stack until the argument is needed. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/des3_ede-asm_64.S | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit c66cc3be2951fad4d7d7f799baf57c8c5cc8d655 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:03 2017 -0500 crypto: x86/cast6 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R15 instead of RBP. R15 can't be used as the RID1 register because of x86 instruction encoding limitations. So use R15 for CTX and RDI for CTX. This means that CTX is no longer an implicit function argument. Instead it needs to be explicitly copied from RDI. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/cast6-avx-x86_64-asm_64.S | 50 +++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 16 deletions(-) commit 4b15606664a2f8d7c4f0092fb0305fe1c7c65b7b Author: Josh Poimboeuf Date: Mon Sep 18 14:42:02 2017 -0500 crypto: x86/cast5 - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R15 instead of RBP. R15 can't be used as the RID1 register because of x86 instruction encoding limitations. So use R15 for CTX and RDI for CTX. This means that CTX is no longer an implicit function argument. Instead it needs to be explicitly copied from RDI. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/cast5-avx-x86_64-asm_64.S | 47 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) commit b46c9d717645529417ca9045cfdbf59f84922573 Author: Josh Poimboeuf Date: Mon Sep 18 14:42:01 2017 -0500 crypto: x86/camellia - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R12 instead of RBP. Both are callee-saved registers, so the substitution is straightforward. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/camellia-x86_64-asm_64.S | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 569f11c9f788959b640116b5bbd6d8a1f07326da Author: Josh Poimboeuf Date: Mon Sep 18 14:42:00 2017 -0500 crypto: x86/blowfish - Fix RBP usage Using RBP as a temporary register breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Use R12 instead of RBP. R12 can't be used as the RT0 register because of x86 instruction encoding limitations. So use R12 for CTX and RDI for CTX. This means that CTX is no longer an implicit function argument. Instead it needs to be explicitly copied from RDI. Reported-by: Eric Biggers Reported-by: Peter Zijlstra Tested-by: Eric Biggers Acked-by: Eric Biggers Signed-off-by: Josh Poimboeuf Signed-off-by: Herbert Xu arch/x86/crypto/blowfish-x86_64-asm_64.S | 48 +++++++++++++++++--------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit bd6227a150fdb56e7bb734976ef6e53a2c1cb334 Author: Stephan Mueller Date: Thu Sep 14 17:10:28 2017 +0200 crypto: drbg - fix freeing of resources During the change to use aligned buffers, the deallocation code path was not updated correctly. The current code tries to free the aligned buffer pointer and not the original buffer pointer as it is supposed to. Thus, the code is updated to free the original buffer pointer and set the aligned buffer pointer that is used throughout the code to NULL. Fixes: 3cfc3b9721123 ("crypto: drbg - use aligned buffers") CC: CC: Herbert Xu Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd0b19ed5389187829b854900511c9195875bb42 Author: Paul Burton Date: Tue Sep 19 22:07:18 2017 -0700 MIPS: Fix perf event init Commit c311c797998c ("cpumask: make "nr_cpumask_bits" unsigned") modified mipspmu_event_init() to cast the struct perf_event cpu field to an unsigned integer before it is compared with nr_cpumask_bits (and *ahem* did so without copying the linux-mips mailing list or any MIPS developers...). This is broken because the cpu field may be -1 for events which follow a process rather than being affine to a particular CPU. When this is the case the cast to an unsigned int results in a value equal to ULONG_MAX, which is always greater than nr_cpumask_bits so we always fail mipspmu_event_init() and return -ENODEV. The check against nr_cpumask_bits seems nonsensical anyway, so this patch simply removes it. The cpu field is going to either be -1 or a valid CPU number. Comparing it with nr_cpumask_bits is effectively checking that it's a valid cpu number, but it seems safe to rely on the core perf events code to ensure that's the case. The end result is that this fixes use of perf on MIPS when not constraining events to a particular CPU, and fixes the "perf list hw" command which fails to list any events without this. Signed-off-by: Paul Burton Fixes: c311c797998c ("cpumask: make "nr_cpumask_bits" unsigned") Cc: Alexey Dobriyan Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: stable # v4.12+ Patchwork: https://patchwork.linux-mips.org/patch/17323/ Signed-off-by: Ralf Baechle arch/mips/kernel/perf_event_mipsxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ce21574ad1922b403198ee664c4dff276f514f1d Author: Sekhar Nori Date: Tue Aug 29 13:52:51 2017 +0530 ARM: dts: da850-evm: add serial and ethernet aliases Add aliases for serial and ethernet nodes. Serial aliases help keep order of tty nodes fixed and ethernet alias is used by bootloader to setup mac address correctly. Reported-by: Adam Ford Acked-by: Tony Lindgren Fixes: dd7deaf218bf ("ARM: davinci: da850: add DT node for ethernet") Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 6e82e929d98552ed5156919e0f532eeba2da704b Author: Ronnie Sahlberg Date: Wed Sep 20 13:09:23 2017 +1000 cifs: show 'soft' in the mount options for hard mounts Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cifsfs.c | 2 ++ 1 file changed, 2 insertions(+) commit c721c38957fb19982416f6be71aae7b30630d83b Author: Steve French Date: Tue Sep 19 18:40:03 2017 -0500 SMB3: Warn user if trying to sign connection that authenticated as guest It can be confusing if user ends up authenticated as guest but they requested signing (server will return error validating signed packets) so add log message for this. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/smb2pdu.c | 2 ++ 1 file changed, 2 insertions(+) commit 590d08d3da45e9fed423b08ab38d71886c07abc8 Author: Steve French Date: Tue Sep 19 11:43:47 2017 -0500 SMB3: Fix endian warning Multi-dialect negotiate patch had a minor endian error. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable # 4.13+ fs/cifs/smb2pdu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 35f62727df0ed8e5e4857e162d94fd46d861f1cf Author: Arend Van Spriel Date: Tue Sep 12 10:47:54 2017 +0200 brcmfmac: setup passive scan if requested by user-space The driver was not properly configuring firmware with regard to the type of scan. It always performed an active scan even when user-space was requesting for passive scan, ie. the scan request was done without any SSIDs specified. Cc: stable@vger.kernel.org # v4.0.x Reported-by: Huang, Jiangyang Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 19 ++++--------------- .../wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 5 +++++ 2 files changed, 9 insertions(+), 15 deletions(-) commit 17df6453d4be17910456e99c5a85025aa1b7a246 Author: Arend Van Spriel Date: Tue Sep 12 10:47:53 2017 +0200 brcmfmac: add length check in brcmf_cfg80211_escan_handler() Upon handling the firmware notification for scans the length was checked properly and may result in corrupting kernel heap memory due to buffer overruns. This fix addresses CVE-2017-0786. Cc: stable@vger.kernel.org # v4.0.x Cc: Kevin Cernekee Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 5d298baa41883fc421acfd932799c0f4177249ae Author: Gautham R. Shenoy Date: Thu Aug 31 17:17:41 2017 +0530 powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline Commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug") clears the PECE1 bit of the LPCR via stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on an offlined CPU which is in a deep stop state. In the case where the stop-api support is found to be lacking, the commit 785a12afdb4a ("powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails") disables deep states that lose hypervisor context. Thus in this case, the offlined CPU will be put to some shallow idle state. However, we currently unconditionally clear the PECE1 in LPCR via stop-api during CPU-Hotplug even when deep states are disabled due to stop-api failure. Fix this by clearing PECE1 of LPCR via stop-api during CPU-Hotplug *only* when the offlined CPU will be put to a deep state that loses hypervisor context. Fixes: 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug") Reported-by: Pavithra Prakash Signed-off-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin Tested-by: Pavithra Prakash Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1575fe06f6b1d156ed31fb22c8631d49d79751d8 Author: Anton Blanchard Date: Wed Sep 20 09:32:19 2017 +1000 powerpc/sstep: mullw should calculate a 64 bit signed result mullw should do a 32 bit signed multiply and create a 64 bit signed result. It currently truncates the result to 32 bits. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5bcaa4cc41923871777c3d13906267e812775094 Author: Anton Blanchard Date: Tue Sep 19 20:45:53 2017 +1000 powerpc/sstep: Fix issues with mcrf mcrf broke when we changed analyse_instr() to not modify the register state. The instruction writes to the CR, so we need to store the result in op->ccval, not op->val. Fixes: 3cdfcbfd32b9 ("powerpc: Change analyse_instr so it doesn't modify *regs") Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad47ff3e33503e0969db2d4f9a40942aa6414598 Author: Anton Blanchard Date: Tue Sep 19 20:45:52 2017 +1000 powerpc/sstep: Fix issues with set_cr0() set_cr0() broke when we changed analyse_instr() to not modify the register state. Instead of looking at regs->gpr[x] which has not been updated yet, we need to look at op->val. Fixes: 3cdfcbfd32b9 ("powerpc: Change analyse_instr so it doesn't modify *regs") Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c1fa0768a8713b135848f78fd43ffc208d8ded70 Author: Gustavo Romero Date: Wed Sep 13 22:13:48 2017 -0400 powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to thread structures. flush_tmregs_to_thread() is indeed guarded by CONFIG_PPC_TRANSACTIONAL_MEM but it might be the case that kernel was compiled with CONFIG_PPC_TRANSACTIONAL_MEM enabled and ran on a CPU without TM feature available, thus rendering the execution of TM instructions that are treated by the CPU as illegal instructions. The fix is just to add proper checking in flush_tmregs_to_thread() if CPU has the TM feature before accessing any TM-specific resource, returning immediately if TM is no available on the CPU. Adding that checking in flush_tmregs_to_thread() instead of in places where it is called, like in vsr_get() and vsr_set(), is better because avoids the same problem cropping up elsewhere. Cc: stable@vger.kernel.org # v4.13+ Fixes: cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") Signed-off-by: Gustavo Romero Reviewed-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4917fcb58cc73f6b81455e3c5f960144809ddf1a Author: Ravi Bangoria Date: Tue Sep 19 11:47:06 2017 +0530 powerpc/sysrq: Fix oops whem ppmu is not registered Kernel crashes if power pmu is not registered and user tries to dump regs with 'echo p > /proc/sysrq-trigger'. Sample log: Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xc0000000000d52f0 NIP [c0000000000d52f0] perf_event_print_debug+0x10/0x230 LR [c00000000058a938] sysrq_handle_showregs+0x38/0x50 Call Trace: printk+0x38/0x4c (unreliable) __handle_sysrq+0xe4/0x270 write_sysrq_trigger+0x64/0x80 proc_reg_write+0x80/0xd0 __vfs_write+0x40/0x200 vfs_write+0xc8/0x240 SyS_write+0x60/0x110 system_call+0x58/0x6c Fixes: 5f6d0380c640 ("powerpc/perf: Define perf_event_print_debug() to print PMU register values") Signed-off-by: Ravi Bangoria Reviewed-by: Kamalesh Babulal Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8632ec8cdcaead67c019f1ba36760d1bdd0c5d23 Author: Michael Ellerman Date: Wed Aug 23 15:37:53 2017 +1000 powerpc/configs: Update for CONFIG_SND changes Commit eb3b705aaed9 ("ALSA: Make CONFIG_SND_OSSEMUL user-selectable") means we need to set CONFIG_SND_OSSEMUL in our configs, otherwise we lose some of the SND symbols. And commit 0181307abc1d ("ALSA: seq: Reorganize kconfig and build") reorganised things, which causes the churn. Signed-off-by: Michael Ellerman arch/powerpc/configs/g5_defconfig | 5 +++-- arch/powerpc/configs/gamecube_defconfig | 5 +++-- arch/powerpc/configs/pasemi_defconfig | 3 ++- arch/powerpc/configs/pmac32_defconfig | 7 ++++--- arch/powerpc/configs/ppc64_defconfig | 7 ++++--- arch/powerpc/configs/ppc64e_defconfig | 7 ++++--- arch/powerpc/configs/ppc6xx_defconfig | 7 ++++--- arch/powerpc/configs/wii_defconfig | 5 +++-- 8 files changed, 27 insertions(+), 19 deletions(-) commit 820bf5c419e4b85298e5c3001bd1b5be46d60765 Merge: b8350cd 3e00974 Author: Linus Torvalds Date: Tue Sep 19 17:09:55 2017 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a set of five small fixes: one is a null deref fix which is pretty critical for the fc transport class and one fixes a potential security issue of sg leaking kernel information" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE scsi: sg: factor out sg_fill_request_table() scsi: sd: Remove unnecessary condition in sd_read_block_limits() scsi: acornscsi: fix build error scsi: scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout commit b8350cd00407a121e10727d9591026d6194714b7 Merge: 94686c3 54640d2 Author: Linus Torvalds Date: Tue Sep 19 17:07:18 2017 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull si_code fix from Eric Biederman: "When sorting out the si_code ambiguity fcntl I accidentally overshot and included SIGPOLL as well. Ooops! This is my trivial fix for that. Vince Weaver caught this when it landed in your tree with his perf_event_tests many of which started failing because the si_code changed" Quoth Vince Weaver: "I've tested with this patch applied and can confirm all of my tests now pass again" Fixes: d08477aa975e ("fcntl: Don't use ambiguous SIG_POLL si_codes") * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: fcntl: Don't set si_code to SI_SIGIO when sig == SIGPOLL commit 94686c3c9410403278cea071bac97ed034cf19bd Merge: 12fcf66 5753743f Author: Linus Torvalds Date: Tue Sep 19 17:05:53 2017 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: - fix build without CONFIG_HAVE_KVM_IRQ_ROUTING - fix NULL access in x86 CR access - fix race with VMX posted interrups * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt KVM: VMX: do not change SN bit in vmx_update_pi_irte() KVM: x86: Fix the NULL pointer parameter in check_cr_write() Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD" commit 04fc52fb222d35e1f7a0d5d85b19a676ea1e10e8 Author: Maciej Purski Date: Tue Sep 5 14:23:02 2017 +0200 drm/exynos/hdmi: Fix unsafe list iteration Function hdmi_mode_fixup() used bare list_for_each entry, which was unsafe and caused memory corruption detected by kasan. It now uses drm_for_each_connector_iter macro, which is now recommended by the documentation and safe. Signed-off-by: Maciej Purski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 23586b66d84ba3184b8820277f3fc42761640f87 Author: Steve French Date: Mon Sep 18 18:18:45 2017 -0500 Fix SMB3.1.1 guest authentication to Samba Samba rejects SMB3.1.1 dialect (vers=3.1.1) negotiate requests from the kernel client due to the two byte pad at the end of the negotiate contexts. CC: Stable Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35e015e1f5773417952fe91ce8790baf9b4237a2 Author: Matteo Croce Date: Tue Sep 12 17:46:37 2017 +0200 ipv6: fix net.ipv6.conf.all interface DAD handlers Currently, writing into net.ipv6.conf.all.{accept_dad,use_optimistic,optimistic_dad} has no effect. Fix handling of these flags by: - using the maximum of global and per-interface values for the accept_dad flag. That is, if at least one of the two values is non-zero, enable DAD on the interface. If at least one value is set to 2, enable DAD and disable IPv6 operation on the interface if MAC-based link-local address was found - using the logical OR of global and per-interface values for the optimistic_dad flag. If at least one of them is set to one, optimistic duplicate address detection (RFC 4429) is enabled on the interface - using the logical OR of global and per-interface values for the use_optimistic flag. If at least one of them is set to one, optimistic addresses won't be marked as deprecated during source address selection on the interface. While at it, as we're modifying the prototype for ipv6_use_optimistic_addr(), drop inline, and let the compiler decide. Fixes: 7fd2561e4ebd ("net: ipv6: Add a sysctl to make optimistic addresses useful candidates") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 18 ++++++++++++++---- net/ipv6/addrconf.c | 27 ++++++++++++++++++++------- 2 files changed, 34 insertions(+), 11 deletions(-) commit 6819a14ecbe2e089e5c5bb74edecafdde2028a00 Author: Mike Manning Date: Mon Sep 4 15:52:55 2017 +0100 net: ipv6: fix regression of no RTM_DELADDR sent after DAD failure Commit f784ad3d79e5 ("ipv6: do not send RTM_DELADDR for tentative addresses") incorrectly assumes that no RTM_NEWADDR are sent for addresses in tentative state, as this does happen for the standard IPv6 use-case of DAD failure, see the call to ipv6_ifa_notify() in addconf_dad_stop(). So as a result of this change, no RTM_DELADDR is sent after DAD failure for a link-local when strict DAD (accept_dad=2) is configured, or on the next admin down in other cases. The absence of this notification breaks backwards compatibility and causes problems after DAD failure if this notification was being relied on. The solution is to allow RTM_DELADDR to still be sent after DAD failure. Fixes: f784ad3d79e5 ("ipv6: do not send RTM_DELADDR for tentative addresses") Signed-off-by: Mike Manning Cc: Mahesh Bandewar Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7c30013133964aaa2f45c17d6e9782ac6cfd7f5f Author: Daniel Borkmann Date: Wed Sep 20 00:44:21 2017 +0200 bpf: fix ri->map_owner pointer on bpf_prog_realloc Commit 109980b894e9 ("bpf: don't select potentially stale ri->map from buggy xdp progs") passed the pointer to the prog itself to be loaded into r4 prior on bpf_redirect_map() helper call, so that we can store the owner into ri->map_owner out of the helper. Issue with that is that the actual address of the prog is still subject to change when subsequent rewrites occur that require slow path in bpf_prog_realloc() to alloc more memory, e.g. from patching inlining helper functions or constant blinding. Thus, we really need to take prog->aux as the address we're holding, which also works with prog clones as they share the same aux object. Instead of then fetching aux->prog during runtime, which could potentially incur cache misses due to false sharing, we are going to just use aux for comparison on the map owner. This will also keep the patchlet of the same size, and later check in xdp_map_invalid() only accesses read-only aux pointer from the prog, it's also in the same cacheline already from prior access when calling bpf_func. Fixes: 109980b894e9 ("bpf: don't select potentially stale ri->map from buggy xdp progs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 7 ++++++- net/core/filter.c | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) commit f55956065ec94e3e9371463d693a1029c4cc3007 Author: Christian Lamparter Date: Tue Sep 19 19:35:18 2017 +0200 net: emac: Fix napi poll list corruption This patch is pretty much a carbon copy of commit 3079c652141f ("caif: Fix napi poll list corruption") with "caif" replaced by "emac". The commit d75b1ade567f ("net: less interrupt masking in NAPI") breaks emac. It is now required that if the entire budget is consumed when poll returns, the napi poll_list must remain empty. However, like some other drivers emac tries to do a last-ditch check and if there is more work it will call napi_reschedule and then immediately process some of this new work. Should the entire budget be consumed while processing such new work then we will violate the new caller contract. This patch fixes this by not touching any work when we reschedule in emac. Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/mal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b5b7db8d680464b1d631fd016f5e093419f0bfd9 Author: Eric Dumazet Date: Tue Sep 19 10:05:57 2017 -0700 tcp: fastopen: fix on syn-data transmit failure Our recent change exposed a bug in TCP Fastopen Client that syzkaller found right away [1] When we prepare skb with SYN+DATA, we attempt to transmit it, and we update socket state as if the transmit was a success. In socket RTX queue we have two skbs, one with the SYN alone, and a second one containing the DATA. When (malicious) ACK comes in, we now complain that second one had no skb_mstamp. The proper fix is to make sure that if the transmit failed, we do not pretend we sent the DATA skb, and make it our send_head. When 3WHS completes, we can now send the DATA right away, without having to wait for a timeout. [1] WARNING: CPU: 0 PID: 100189 at net/ipv4/tcp_input.c:3117 tcp_clean_rtx_queue+0x2057/0x2ab0 net/ipv4/tcp_input.c:3117() WARN_ON_ONCE(last_ackt == 0); Modules linked in: CPU: 0 PID: 100189 Comm: syz-executor1 Not tainted Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 ffff8800b35cb1d8 ffffffff81cad00d 0000000000000000 ffffffff828a4347 ffff88009f86c080 ffffffff8316eb20 0000000000000d7f ffff8800b35cb220 ffffffff812c33c2 ffff8800baad2440 00000009d46575c0 Call Trace: [] __dump_stack [] dump_stack+0xc1/0x124 [] warn_slowpath_common+0xe2/0x150 [] warn_slowpath_null+0x2e/0x40 [] tcp_clean_rtx_queue+0x2057/0x2ab0 n [] tcp_ack+0x151d/0x3930 [] tcp_rcv_state_process+0x1c69/0x4fd0 [] tcp_v4_do_rcv+0x54f/0x7c0 [] sk_backlog_rcv [] __release_sock+0x12b/0x3a0 [] release_sock+0x5e/0x1c0 [] inet_wait_for_connect [] __inet_stream_connect+0x545/0xc50 [] tcp_sendmsg_fastopen [] tcp_sendmsg+0x2298/0x35a0 [] inet_sendmsg+0xe5/0x520 [] sock_sendmsg_nosec [] sock_sendmsg+0xcf/0x110 Fixes: 8c72c65b426b ("tcp: update skb->skb_mstamp more carefully") Fixes: 783237e8daf1 ("net-tcp: Fast Open client - sending SYN-data") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1e513b6b238d24cb2b332449b2e36446f1c54cc6 Merge: 930651a 90f7b11 Author: David S. Miller Date: Tue Sep 19 16:06:50 2017 -0700 Merge branch 'hns3-bug-fixes' Salil Mehta says: ==================== Bug fixes for the HNS3 Ethernet Driver for Hip08 SoC This patch set presents some bug fixes for the HNS3 Ethernet driver identified during internal testing & stabilization efforts. Change Log: Patch V2: Resolved comments from Leon Romanovsky Patch V1: Initial Submit ==================== Signed-off-by: David S. Miller commit 90f7b11a5a0081feb7041fcc795c9a131a62a725 Author: Lipeng Date: Tue Sep 19 17:17:16 2017 +0100 net: hns3: Fixes the premature exit of loop when matching clients When register/unregister ae_dev, ae_dev should match all client in the client_list. Enet and roce can co-exists together so we should continue checking for enet and roce presence together. So break should not be there. Above caused problems in loading and unloading of modules. Fixes: 38eddd126772 ("net: hns3: Add support of the HNAE3 framework") Signed-off-by: Lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.c | 43 ++++++----------------------- 1 file changed, 9 insertions(+), 34 deletions(-) commit 5e43aef8491ae3b5feb79cd15260faf39303ef33 Author: Lipeng Date: Tue Sep 19 17:17:15 2017 +0100 net: hns3: Fixes the default VLAN-id of PF When there is no vlan id in the packets, hardware will treat the vlan id as 0 and look for the mac_vlan table. This patch set the default vlan id of PF as 0. Without this config, it will fail when look for mac_vlan table, and hardware will drop packets. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Mingguang Qu Signed-off-by: Lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fbbb1536b220eb4f4f95cbceae6579489a8adad5 Author: Salil Mehta Date: Tue Sep 19 17:17:14 2017 +0100 net: hns3: Fixes the ether address copy with appropriate API This patch replaces the ethernet address copy instance with more appropriate ether_addr_copy() function. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 139e8792537b327252a9676591a78e6408d50a85 Author: Lipeng Date: Tue Sep 19 17:17:13 2017 +0100 net: hns3: Fixes the initialization of MAC address in hardware This patch fixes the initialization of MAC address, fetched from HNS3 firmware i.e. when it is not randomly generated, to the HNS3 hardware. Fixes: ca60906d2795 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0305b443a3ba5b84aa474786026df04a70460135 Author: Lipeng Date: Tue Sep 19 17:17:12 2017 +0100 net: hns3: Fixes ring-to-vector map-and-unmap command This patch fixes the vector-to-ring map and unmap command and adds INT_GL(for, Gap Limiting Interrupts) and VF id to it as required by the hardware interface. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng Signed-off-by: Mingguang Qu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 8 ++++++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit c5b1b97522ef32d2170c9aa1a0c1eec179acbb3a Author: Lipeng Date: Tue Sep 19 17:17:11 2017 +0100 net: hns3: Fixes the command used to unmap ring from vector This patch fixes the IMP command being used to unmap the vector from the corresponding ring. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a4776e14f7da3d48fffb4edbb82355742f23478 Author: Lipeng Date: Tue Sep 19 17:17:10 2017 +0100 net: hns3: Fixes initialization of phy address from firmware Default phy address of every port is 0. Therefore, phy address for each port need to be fetched from firmware and device initialized with fetched non-default phy address. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) commit 039cc1c1eb971ffe1973fddb8769a80fd4950a6f Author: Dave Gerlach Date: Tue Sep 19 15:06:13 2017 -0500 cpufreq: ti-cpufreq: Support additional am43xx platforms Rather than letting the ti-cpufreq driver match against 'ti,am4372' machine compatible during probe let's match against 'ti,am43' so that we can support both 'ti,am4372' and 'ti,am438x' platforms which both match to this compatible. Signed-off-by: Dave Gerlach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 930651a75bf1ba6893a8b8475270664ebdb6cf4a Author: Eric Dumazet Date: Tue Sep 19 09:15:59 2017 -0700 bpf: do not disable/enable BH in bpf_map_free_id() syzkaller reported following splat [1] Since hard irq are disabled by the caller, bpf_map_free_id() should not try to enable/disable BH. Another solution would be to change htab_map_delete_elem() to defer the free_htab_elem() call after raw_spin_unlock_irqrestore(&b->lock, flags), but this might be not enough to cover other code paths. [1] WARNING: CPU: 1 PID: 8052 at kernel/softirq.c:161 __local_bh_enable_ip +0x1e/0x160 kernel/softirq.c:161 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 8052 Comm: syz-executor1 Not tainted 4.13.0-next-20170915+ #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 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:__local_bh_enable_ip+0x1e/0x160 kernel/softirq.c:161 RSP: 0018:ffff8801cdcd7748 EFLAGS: 00010046 RAX: 0000000000000082 RBX: 0000000000000201 RCX: 0000000000000000 RDX: 1ffffffff0b5933c RSI: 0000000000000201 RDI: ffffffff85ac99e0 RBP: ffff8801cdcd7758 R08: ffffffff85b87158 R09: 1ffff10039b9aec6 R10: ffff8801c99f24c0 R11: 0000000000000002 R12: ffffffff817b0b47 R13: dffffc0000000000 R14: ffff8801cdcd77e8 R15: 0000000000000001 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:207 spin_unlock_bh include/linux/spinlock.h:361 [inline] bpf_map_free_id kernel/bpf/syscall.c:197 [inline] __bpf_map_put+0x267/0x320 kernel/bpf/syscall.c:227 bpf_map_put+0x1a/0x20 kernel/bpf/syscall.c:235 bpf_map_fd_put_ptr+0x15/0x20 kernel/bpf/map_in_map.c:96 free_htab_elem+0xc3/0x1b0 kernel/bpf/hashtab.c:658 htab_map_delete_elem+0x74d/0x970 kernel/bpf/hashtab.c:1063 map_delete_elem kernel/bpf/syscall.c:633 [inline] SYSC_bpf kernel/bpf/syscall.c:1479 [inline] SyS_bpf+0x2188/0x46a0 kernel/bpf/syscall.c:1451 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: f3f1c054c288 ("bpf: Introduce bpf_map ID") Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Acked-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/syscall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 75df6e688ccd517e339a7c422ef7ad73045b18a2 Author: Tahsin Erdogan Date: Sun Sep 17 03:23:48 2017 -0700 tracing: Fix trace_pipe behavior for instance traces When reading data from trace_pipe, tracing_wait_pipe() performs a check to see if tracing has been turned off after some data was read. Currently, this check always looks at global trace state, but it should be checking the trace instance where trace_pipe is located at. Because of this bug, cat instances/i1/trace_pipe in the following script will immediately exit instead of waiting for data: cd /sys/kernel/debug/tracing echo 0 > tracing_on mkdir -p instances/i1 echo 1 > instances/i1/tracing_on echo 1 > instances/i1/events/sched/sched_process_exec/enable cat instances/i1/trace_pipe Link: http://lkml.kernel.org/r/20170917102348.1615-1-tahsin@google.com Cc: stable@vger.kernel.org Fixes: 10246fa35d4f ("tracing: give easy way to clear trace buffer") Signed-off-by: Tahsin Erdogan Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0647169cf9aa441700eb8f23ea49be060626534b Author: Andreas Gruenbacher Date: Tue Sep 19 12:41:37 2017 +0200 rhashtable: Documentation tweak Clarify that rhashtable_walk_{stop,start} will not reset the iterator to the beginning of the hash table. Confusion between rhashtable_walk_enter and rhashtable_walk_start has already lead to a bug. Signed-off-by: Andreas Gruenbacher Signed-off-by: David S. Miller lib/rhashtable.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0c0bceb796878a5baea1f47033215fac0774e498 Author: Sakari Ailus Date: Fri Sep 8 12:24:41 2017 +0300 ACPI: properties: Return _DSD hierarchical extension (data) sub-nodes correctly The recently merged patch "ACPI: Prepare for constifying acpi_get_next_subnode() fwnode argument" was part of a patchset constifying the fwnode arguments across the fwnode property API. The purpose of the patch was to allow returning non-const fwnodes from a data structure the root of which is const. Unfortunately the patch introduced the functionality, in particular when starting parsed from an ACPI device node, the hierarchical data extension nodes would not be enumerated. Restore the old behaviour while still retaining constness properties of the patch. Fixes: 01c1da289791 "ACPI: Prepare for constifying acpi_get_next_subnode() fwnode argument" Signed-off-by: Sakari Ailus Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ed40fad9a568efe83f5e80897ded71117b6911b3 Author: Stefan Wahren Date: Thu Aug 31 22:24:36 2017 +0200 ARM: cpuidle: Avoid memleak if init fail In case there are no DT idle states defined or cpuidle_register_driver() fails, the copy of the idle driver is leaked: unreferenced object 0xede0dc00 (size 1024): comm "swapper/0", pid 1, jiffies 4294937431 (age 744.510s) hex dump (first 32 bytes): 94 9e 0b c1 00 00 00 00 00 00 00 00 00 00 00 00 ................ 57 46 49 00 00 00 00 00 00 00 00 00 00 00 00 00 WFI............. backtrace: [] arm_idle_init+0x44/0x1ac [] do_one_initcall+0x3c/0x16c [] kernel_init_freeable+0x110/0x1d0 [] kernel_init+0x8/0x114 [] ret_from_fork+0x14/0x3c So fix this by freeing the unregistered copy in error case. Signed-off-by: Stefan Wahren Fixes: d50a7d8acd78 (ARM: cpuidle: Support asymmetric idle definition) Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ff76898c0a14a43f71bfe63dd1903087e96ce238 Author: Viresh Kumar Date: Tue Sep 19 08:23:22 2017 -0700 cpufreq: dt-platdev: Add some missing platforms to the blacklist Commit edeec420de24 (cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2) missed adding few platforms to the blacklist which create the cpufreq-dt device from their own drivers, after some dependencies are sorted out. And for those platforms, both the platform specific driver and the cpufreq-dt-platdev driver try to create the cpufreq-dt device now. Fix that by including those platforms in the blacklist. This doesn't include the TI platforms, for which there is a separate patch. Fixes: edeec420de24 (cpufreq: dt-cpufreq: platdev Automatically create device with OPP v2) Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 157c460e10cb6eca29ccbd0f023db159d0c55ec7 Author: Rafael J. Wysocki Date: Tue Sep 19 02:22:39 2017 +0200 PM: core: Fix device_pm_check_callbacks() The device_pm_check_callbacks() function doesn't check legacy ->suspend and ->resume callback pointers under the device's bus type, class and driver, so in some cases it may set the no_pm_callbacks flag for the device incorrectly and then the callbacks may be skipped during system suspend/resume, which shouldn't happen. Fixes: aa8e54b55947 (PM / sleep: Go direct_complete if driver has no callbacks) Signed-off-by: Rafael J. Wysocki Cc: 4.5+ # 4.5+ drivers/base/power/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b247c211ee367cfe975dd54e381094083adfd8d3 Author: Rafael J. Wysocki Date: Tue Sep 19 02:43:13 2017 +0200 PM: docs: Drop an excess character from devices.rst Drop an excess "`" from Documentation/driver-api/pm/devices.rst. Fixes: 2728b2d2e5be (PM / core / docs: Convert sleep states API document to reST) Signed-off-by: Rafael J. Wysocki Documentation/driver-api/pm/devices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6073512cc8e2c48bed5c6625c02c5e4ae50cec34 Author: Jerome Brunet Date: Mon Sep 18 14:59:20 2017 +0200 net: phy: Kconfig: Fix PHY infrastructure menu in menuconfig Since the integration of PHYLINK, the configuration option which used to be under the PHY infrastructure menu in menuconfig ended up one level up (the network device driver section) By placing PHYLINK option right after PHYLIB entry, it broke the way Kconfig used to build the menu. See kconfig-language.txt, section "Menu structure", 2nd method. This is fixed by placing the PHYLINK option just before PHYLIB. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Jerome Brunet Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9e987b70ada27554c5d176421de1d167218c49b5 Author: John Hubbard Date: Fri Sep 15 17:35:27 2017 -0700 ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again Due to commit db3e50f3234b (device property: Get rid of struct fwnode_handle type field), ACPI_HANDLE() inadvertently became a GPL-only call. The call path that led to that was: ACPI_HANDLE() ACPI_COMPANION() to_acpi_device_node() is_acpi_device_node() acpi_device_fwnode_ops DECLARE_ACPI_FWNODE_OPS(acpi_device_fwnode_ops); ...and the new DECLARE_ACPI_FWNODE_OPS() includes EXPORT_SYMBOL_GPL, whereas previously it was a static struct. In order to avoid changing any of that, let's instead provide ever so slightly better encapsulation of those struct fwnode_operations instances. Those do not really need to be directly used in inline function calls in header files. Simply moving two small functions (is_acpi_device_node and is_acpi_data_node) out of acpi_bus.h, and into a .c file, does that. That leaves the internals of struct fwnode_operations as GPL-only (which I think was the intent all along), but un-breaks any driver code out there that relies on the ACPI subsystem's being (historically) an EXPORT_SYMBOL-usable system. By that, I mean, ACPI_HANDLE() and other basic ACPI calls were non-GPL-protected. Also, while I'm there, remove a tiny bit of redundancy that was missed in the earlier commit, by having is_acpi_node() use the other two routines, instead of checking fwnode directly. Fixes: db3e50f3234b (device property: Get rid of struct fwnode_handle type field) Signed-off-by: John Hubbard Acked-by: Sakari Ailus Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 13 +++++++++++++ include/acpi/acpi_bus.h | 18 ++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) commit 06e8852ceecccdeff6841a6c5cd78a947a75d5bc Author: Thomas Meyer Date: Fri Sep 8 14:01:19 2017 +0200 selftests/net: msg_zerocopy enable build with older kernel headers Explicitly define SO_EE_ORIGIN_ZEROCOPY. This makes the test program build with older kernel headers, e.g. from Debian 9. Signed-off-by: Thomas Meyer Signed-off-by: Shuah Khan tools/testing/selftests/net/msg_zerocopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e06d79fbc338935ef27befc84f8b8b2e5f878a10 Author: Josef Bacik Date: Tue Sep 19 09:51:27 2017 -0400 selftests: actually run the various net selftests These self tests are just self contained binaries, they are not run by any of the scripts in the directory. This means they need to be marked with TEST_GEN_PROGS to actually be run, not TEST_GEN_FILES. Signed-off-by: Josef Bacik Signed-off-by: Shuah Khan tools/testing/selftests/net/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 422d8dc6fd3afecd66bd6acfcd73a2d53e338ff3 Author: Josef Bacik Date: Tue Sep 19 09:51:26 2017 -0400 selftest: add a reuseaddr test This is to test for a regression introduced by b9470c27607b ("inet: kill smallest_size and smallest_port") which introduced a problem with reuseaddr and bind conflicts. Signed-off-by: Josef Bacik Signed-off-by: Shuah Khan tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/reuseaddr_conflict.c | 114 +++++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) commit fbcab13d2e2511a858590846ac2e2d7cbd830591 Author: Josef Bacik Date: Tue Sep 19 09:51:28 2017 -0400 selftests: silence test output by default Some of the networking tests are very noisy and make it impossible to see if we actually passed the tests as they run. Default to suppressing the output from any tests run in order to make it easier to track what failed. Signed-off-by: Josef Bacik Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1af344df4e5c8fe90f4a63235a68d5405afc41b Author: Meng Xu Date: Tue Sep 19 01:21:56 2017 -0400 ALSA: asihpi: fix a potential double-fetch bug when copying puhm The hm->h.size is intended to hold the actual size of the hm struct that is copied from userspace and should always be <= sizeof(*hm). However, after copy_from_user(hm, puhm, hm->h.size), since userspace process has full control over the memory region pointed by puhm, it is possible that the value of hm->h.size is different from what is fetched-in previously (get_user(hm->h.size, (u16 __user *)puhm)). In other words, hm->h.size is overriden and the relation between hm->h.size and the hm struct is broken. This patch proposes to use a seperate variable, msg_size, to hold the value of the first fetch and override hm->h.size to msg_size after the second fetch to maintain the relation. Signed-off-by: Meng Xu Signed-off-by: Takashi Iwai sound/pci/asihpi/hpioctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 19a8d6b7604df85402deecae01d7861cb1d40c89 Author: Lorenzo Pieralisi Date: Tue Sep 19 15:50:42 2017 +0100 MIPS: PCI: Move map_irq() hooks out of initdata 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") moved the PCI IRQ fixup to the new host bridge map/swizzle_irq() hooks mechanism. Those hooks can also be called after boot, when all the __init/__initdata/__initconst sections have been freed. Therefore, functions called by them (and the data they refer to) must not be marked as __init/__initdata/__initconst lest compilation trigger section mismatch warnings. Fix all the board files map_irq() hooks by simply removing the respective __init/__initdata/__initconst section markers and by adding another persistent hook IRQ map for the txx9 board files. Fixes: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Cc: Ralf Baechle Cc: Steve French arch/mips/ath79/pci.c | 12 ++++++------ arch/mips/pci/fixup-capcella.c | 4 ++-- arch/mips/pci/fixup-cobalt.c | 8 ++++---- arch/mips/pci/fixup-emma2rh.c | 4 ++-- arch/mips/pci/fixup-fuloong2e.c | 2 +- arch/mips/pci/fixup-ip32.c | 4 ++-- arch/mips/pci/fixup-jmr3927.c | 2 +- arch/mips/pci/fixup-lantiq.c | 2 +- arch/mips/pci/fixup-lemote2f.c | 4 ++-- arch/mips/pci/fixup-loongson3.c | 2 +- arch/mips/pci/fixup-malta.c | 4 ++-- arch/mips/pci/fixup-mpc30x.c | 6 +++--- arch/mips/pci/fixup-pmcmsp.c | 8 ++++---- arch/mips/pci/fixup-rbtx4927.c | 2 +- arch/mips/pci/fixup-rbtx4938.c | 2 +- arch/mips/pci/fixup-sni.c | 12 ++++++------ arch/mips/pci/fixup-tb0219.c | 2 +- arch/mips/pci/fixup-tb0226.c | 2 +- arch/mips/pci/fixup-tb0287.c | 2 +- arch/mips/pci/pci-alchemy.c | 2 +- arch/mips/pci/pci-bcm47xx.c | 2 +- arch/mips/pci/pci-lasat.c | 2 +- arch/mips/pci/pci-mt7620.c | 2 +- arch/mips/pci/pci-octeon.c | 5 ++--- arch/mips/pci/pci-rt2880.c | 2 +- arch/mips/pci/pci-rt3883.c | 2 +- arch/mips/pci/pci-tx4938.c | 2 +- arch/mips/pci/pci-tx4939.c | 4 ++-- arch/mips/pci/pci-xlp.c | 2 +- arch/mips/pci/pci-xlr.c | 2 +- arch/mips/pci/pcie-octeon.c | 3 +-- arch/mips/txx9/generic/pci.c | 8 ++++++-- 32 files changed, 62 insertions(+), 60 deletions(-) commit 717e6f2893eb35ce6728c3cacdc297b78d371b31 Author: Yan, Zheng Date: Mon Sep 11 12:10:08 2017 +0800 ceph: avoid panic in create_session_open_msg() if utsname() returns NULL utsname() can return NULL while process is exiting. Kernel releases file locks during process exits. We send request to mds when releasing file lock. So it's possible that we open mds session while process is exiting. utsname() is called in create_session_open_msg(). Link: http://tracker.ceph.com/issues/21275 Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton [idryomov@gmail.com: drop utsname.h include from mds_client.c] Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 7 ++++--- fs/ceph/mds_client.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 90019f8fcd71bf71653690329e32f41489e96122 Author: Paul Burton Date: Tue Sep 5 11:28:46 2017 -0700 irqchip.mips-gic: Fix shared interrupt mask writes The write_gic_smask() & write_gic_rmask() functions take a shared interrupt number as a parameter, but we're incorrectly providing them a bitmask with the shared interrupt's bit set. This effectively means that we mask or unmask the shared interrupt 1< Fixes: 68898c8765f4 ("irqchip: mips-gic: Drop gic_(re)set_mask() functions") Cc: Jason Cooper Cc: Marc Zyngier Cc: Ralf Baechle Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c09ffd027255d97c536aa4ac51a90973adfedc6 Author: Arnd Bergmann Date: Tue Sep 12 22:08:23 2017 +0200 irqchip/gic-v4: Fix building with ancient gcc gcc-4.5 and earlier don't like named initializers for anonymous union members: drivers/irqchip/irq-gic-v4.c: In function 'its_map_vlpi': drivers/irqchip/irq-gic-v4.c:176:3: error: unknown field 'map' specified in initializer drivers/irqchip/irq-gic-v4.c:176:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:176:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c: In function 'its_get_vlpi': drivers/irqchip/irq-gic-v4.c:192:3: error: unknown field 'map' specified in initializer drivers/irqchip/irq-gic-v4.c:192:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:192:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c: In function 'its_prop_update_vlpi': drivers/irqchip/irq-gic-v4.c:208:3: error: unknown field 'config' specified in initializer drivers/irqchip/irq-gic-v4.c:208:3: error: missing braces around initializer drivers/irqchip/irq-gic-v4.c:208:3: error: (near initialization for 'info.') drivers/irqchip/irq-gic-v4.c:208:3: error: initialization makes pointer from integer without a cast This is fairly easy to work around, by using extra curly braces. Signed-off-by: Arnd Bergmann Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3fad4cdac235c5b13227d0c09854c689ae62c70b Author: zijun_hu Date: Sat Sep 16 01:59:41 2017 +0800 irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu() get_cpu_number() doesn't use existing helper to iterate over possible CPUs, It will cause an error in case of discontinuous @cpu_possible_mask such as 0b11110001, which can result from a core having failed to come up on a SMP machine. Fixed by using existing helper for_each_possible_cpu(). Signed-off-by: zijun_hu Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 29a0cfbf91ba997591535a4f7246835ce8328141 Author: Ilya Dryomov Date: Mon Sep 18 12:21:37 2017 +0200 libceph: don't allow bidirectional swap of pg-upmap-items This reverts most of commit f53b7665c8ce ("libceph: upmap semantic changes"). We need to prevent duplicates in the final result. For example, we can currently take [1,2,3] and apply [(1,2)] and get [2,2,3] or [1,2,3] and apply [(3,2)] and get [1,2,2] The rest of the system is not prepared to handle duplicates in the result set like this. The reverted piece was intended to allow [1,2,3] and [(1,2),(2,1)] to get [2,1,3] to reorder primaries. First, this bidirectional swap is hard to implement in a way that also prevents dups. For example, [1,2,3] and [(1,4),(2,3),(3,4)] would give [4,3,4] but would we just drop the last step we'd have [4,3,3] which is also invalid, etc. Simpler to just not handle bidirectional swaps. In practice, they are not needed: if you just want to choose a different primary then use primary_affinity, or pg_upmap (not pg_upmap_items). Cc: stable@vger.kernel.org # 4.13 Link: http://tracker.ceph.com/issues/21410 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/osdmap.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 4afa616ce937f88d9a69a71b8c561551596a81e3 Author: Yogesh Siraswar Date: Thu Sep 14 14:30:07 2017 -0500 ARM: dts: am43xx-epos-evm: Remove extra CPSW EMAC entry On am438x EPOS boards there is only one ethernet port, remove extra port definition. This boot log warnings during PHY detection. Signed-off-by: Yogesh Siraswar Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cddfae253c875076750a03bd05ba5b1569e6876e Author: Suniel Mahesh Date: Mon Sep 11 12:00:16 2017 +0530 ARM: dts: am33xx: Add spi alias to match SOC schematics Linux bus numbers should match the numbers defined by the chip manufacturer. This patch add's spi aliases to achieve that bus naming convention. Signed-off-by: Suniel Mahesh Signed-off-by: Karthik Tummala Tested-by: Karthik Tummala Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 20547dfd85f5baaf27ca01b32570bd6bfd7b209c Author: H. Nikolaus Schaller Date: Fri Sep 8 21:15:51 2017 +0200 ARM: OMAP2+: hsmmc: fix logic to call either omap_hsmmc_init or omap_hsmmc_late_init but not both With 4.13 kernel I get this boot message: [    1.051727] ------------[ cut here ]------------ [    1.051818] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74 [    1.051849] sysfs: cannot create duplicate filename '/devices/platform/omap_hsmmc.2' [    1.051879] Modules linked in: [    1.051971] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-letux+ #1360 [    1.052001] Hardware name: Generic OMAP3 (Flattened Device Tree) [    1.052062] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [    1.052124] [] (show_stack) from [] (dump_stack+0x98/0xd0) [    1.052185] [] (dump_stack) from [] (__warn+0xd0/0x100) [    1.052215] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) [    1.052276] [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x54/0x74) [    1.052337] [] (sysfs_warn_dup) from [] (sysfs_create_dir_ns+0x74/0x84) [    1.052398] [] (sysfs_create_dir_ns) from [] (kobject_add_internal+0xd0/0x294) [    1.052429] [] (kobject_add_internal) from [] (kobject_add+0x6c/0x8c) [    1.052490] [] (kobject_add) from [] (device_add+0xe4/0x510) [    1.052551] [] (device_add) from [] (platform_device_add+0x130/0x1c0) [    1.052612] [] (platform_device_add) from [] (omap_hsmmc_late_init+0x3c/0x60) [    1.052673] [] (omap_hsmmc_late_init) from [] (omap3_pandora_legacy_init+0x24/0xb4) [    1.052734] [] (omap3_pandora_legacy_init) from [] (pdata_quirks_check+0x30/0x3c) [    1.052795] [] (pdata_quirks_check) from [] (omap_generic_init+0xc/0x18) [    1.052856] [] (omap_generic_init) from [] (customize_machine+0x1c/0x28) [    1.052917] [] (customize_machine) from [] (do_one_initcall+0xa8/0x150) [    1.052947] [] (do_one_initcall) from [] (kernel_init_freeable+0x110/0x1d4) [    1.053009] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x10c) [    1.053070] [] (kernel_init) from [] (ret_from_fork+0x14/0x24) [    1.055023] ---[ end trace 44e490b09ac4ab88 ]--- This can be traced down to the calls of omap_hsmmc_init(pandora_mmc3); omap_hsmmc_late_init(pandora_mmc3); in omap3_pandora_legacy_init(). It turns out that both funcions disagree how to decide if the other one was alredy called. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/mach-omap2/hsmmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8aed1026ccfe9cf5772c62bde35bc101ead9308c Author: Keerthy Date: Wed Sep 6 19:09:32 2017 +0530 ARM: dts: dra7: Set a default parent to mcasp3_ahclkx_mux Assign a default parent to mcasp3_ahclkx_mux clock using the assigned-clock-parents property. This is helpful in cases like kexec where in the clock parent can be something other than the value at reset. Suggested-by: Tero Kristo Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit fd0e4c599969d4bdeb375fb82240f88bb896ae20 Merge: 3993491 265698d Author: David S. Miller Date: Tue Sep 19 10:51:08 2017 -0700 Merge tag 'mac80211-for-davem-2017-11-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just two netlink fixes, both allowing privileged users to crash the kernel with malformed netlink messages. ==================== Signed-off-by: David S. Miller commit 06480f8cf559001c9eb49b4e9d822e13ad1cc5c4 Author: Keerthy Date: Wed Sep 6 16:03:58 2017 +0530 ARM: OMAP2+: dra7xx: Set OPT_CLKS_IN_RESET flag for gpio1 gpio1 soft reset fails in the kexec path as the optional clock is not enabled hence enable the HWMOD_CONTROL_OPT_CLKS_IN_RESET flag for gpio1 hwmod. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 1 + 1 file changed, 1 insertion(+) commit 4ae7c364b9320063504db78834fabe59d16f85bf Author: Pavel Machek Date: Mon Aug 28 15:18:16 2017 +0200 ARM: dts: nokia n900: drop unneeded/undocumented parts of the dts Sakari mentioned that some parts of the dts are not needed and do not have proper documentation, yet. As the camera works without them, remove them for now. Signed-off-by: Pavel Machek Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-n900.dts | 11 ----------- 1 file changed, 11 deletions(-) commit 3993491bf27117782bee05debc6a6afa51d61760 Author: Ariel Elior Date: Tue Sep 19 12:54:34 2017 +0300 MAINTAINERS: Remove Yuval Mintz from maintainers list Remove Yuval from maintaining the bnx2x & qed* modules as he is no longer working for the company. Thanks Yuval for your huge contributions and tireless efforts over the many years and various companies. Ariel Signed-off-by: Ariel Elior Signed-off-by: David S. Miller MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit bb4e6ff01ac356f82327d980e45fee8a65491328 Author: Nickey Yang Date: Mon Sep 18 17:05:37 2017 +0800 arm64: dts: rockchip: Correct MIPI DPHY PLL clock on rk3399 There is a further gate in between the mipidphy reference clock and the actual ref-clock input to the dsi host, making the clock hirarchy look like clk_24m --> Gate11[14] --> clk_mipidphy_ref --> Gate21[0] --> clk_dphy_pll Fix the clock reference so that the whole clock subtree gets enabled when the dsi host needs it. Signed-off-by: Nickey Yang [amended commit message] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6899e900509bb2442239d6198dc8bc64f8437ec Author: Alexandre Belloni Date: Thu Sep 14 23:39:38 2017 +0200 dt-bindings: fix vendor prefix for Abracon Commit 446810f2dd41 ("of: add vendor prefix for Abracon Corporation") claimed that "abcn" was used as the vendor prefix while in fact "abracon" was used in the subsequent commits. It is also the only prefix used in the tree. Signed-off-by: Alexandre Belloni [robh: fix alphabetical order] Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa767cfb75341a6b93742f4d7d1589ac2532c29e Author: Arnd Bergmann Date: Mon Sep 11 22:07:50 2017 +0200 of: provide inline helper for of_find_device_by_node The ipmmu-vmsa driver fails in compile-testing on non-OF platforms: drivers/iommu/ipmmu-vmsa.o: In function `ipmmu_of_xlate': ipmmu-vmsa.c:(.text+0x740): undefined reference to `of_find_device_by_node' It would be reasonable to assume that this interface works but returns failure on non-OF builds, like it does on machines that have been booted in another way, so this adds another inline function helper. Fixes: 7b2d59611fef ("iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Herring include/linux/of_platform.h | 7 +++++++ 1 file changed, 7 insertions(+) commit c7b3ae0bd2ca658c7a71c49901d08c590294fac9 Author: Ziqian SUN (Zamir) Date: Mon Sep 11 14:26:35 2017 +0800 tracing: Ignore mmiotrace from kernel commandline The mmiotrace tracer cannot be enabled with ftrace=mmiotrace in kernel commandline. With this patch, noboot is added to the tracer struct, and when system boot with a tracer that has noboot=true, it will print out a warning message and continue booting. Link: http://lkml.kernel.org/r/1505111195-31942-1-git-send-email-zsun@redhat.com Signed-off-by: Ziqian SUN (Zamir) Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 7 +++++++ kernel/trace/trace.h | 2 ++ kernel/trace/trace_mmiotrace.c | 1 + 3 files changed, 10 insertions(+) commit 8dd33bcb7050dd6f8c1432732f930932c9d3a33e Author: Bo Yan Date: Mon Sep 18 10:03:35 2017 -0700 tracing: Erase irqsoff trace with empty write One convenient way to erase trace is "echo > trace". However, this is currently broken if the current tracer is irqsoff tracer. This is because irqsoff tracer use max_buffer as the default trace buffer. Set the max_buffer as the one to be cleared when it's the trace buffer currently in use. Link: http://lkml.kernel.org/r/1505754215-29411-1-git-send-email-byan@nvidia.com Cc: Cc: stable@vger.kernel.org Fixes: 4acd4d00f ("tracing: give easy way to clear trace buffer") Signed-off-by: Bo Yan Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 12fcf66e74b16b96e57fc1ce32bdf27b3a426fd0 Merge: 2442086 184a09e Author: Linus Torvalds Date: Tue Sep 19 08:39:32 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "Two small patches to fix long-lived raid5 stripe batch bugs, one from Dennis and the other from me" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list md/raid5: fix a race condition in stripe batch commit 24420862bfb0db7c6b950b51dfecf3066766cb61 Merge: ebb2c24 94a9dae Author: Linus Torvalds Date: Tue Sep 19 08:35:42 2017 -0700 Merge tag '4.14-smb3-multidialect-support-and-fixes-for-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Convert default dialect to smb2.1 or later to allow connecting to Windows 7 for example, also includes some fixes for stable" * tag '4.14-smb3-multidialect-support-and-fixes-for-stable' of git://git.samba.org/sfrench/cifs-2.6: Update version of cifs module cifs: hide unused functions SMB3: Add support for multidialect negotiate (SMB2.1 and later) CIFS/SMB3: Update documentation to reflect SMB3 and various changes cifs: check rsp for NULL before dereferencing in SMB2_open commit bd7a3fe770ebd8391d1c7d072ff88e9e76d063eb Author: Greg Kroah-Hartman Date: Tue Sep 19 15:07:17 2017 +0200 USB: fix out-of-bounds in usb_set_configuration Andrey Konovalov reported a possible out-of-bounds problem for a USB interface association descriptor. He writes: It seems there's no proper size check of a USB_DT_INTERFACE_ASSOCIATION descriptor. It's only checked that the size is >= 2 in usb_parse_configuration(), so find_iad() might do out-of-bounds access to intf_assoc->bInterfaceCount. And he's right, we don't check for crazy descriptors of this type very well, so resolve this problem. Yet another issue found by syzkaller... Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 14 +++++++++++--- include/uapi/linux/usb/ch9.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) commit 9e7460fc325dad06d2066abdbc1f4dd49456f9a4 Author: Baruch Siach Date: Fri Sep 15 10:50:07 2017 +0300 arm64: dt marvell: Fix AP806 system controller size Extend the container size to 0x2000 to include the gpio controller at offset 0x1040. While at it, add start address notation to the gpio node name to match its 'offset' property. Fixes: 63dac0f4924b ("arm64: dts: marvell: add gpio support for Armada 7K/8K") Cc: Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d03d5d530a46c9def981a2a4ec98f6ec2e9b7878 Author: Russell King Date: Sat Jul 8 20:16:29 2017 +0100 MAINTAINERS: add Macchiatobin maintainers entry Add a maintainers entry for the Macchiatobin board. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 986a5f70173626eea9863fee6d6e029f0f2bc361 Author: Geert Uytterhoeven Date: Mon Sep 11 14:34:34 2017 +0200 iommu/qcom: Depend on HAS_DMA to fix compile error If NO_DMA=y: warning: (IPMMU_VMSA && ARM_SMMU && ARM_SMMU_V3 && QCOM_IOMMU) selects IOMMU_IO_PGTABLE_LPAE which has unmet direct dependencies (IOMMU_SUPPORT && HAS_DMA && (ARM || ARM64 || COMPILE_TEST && !GENERIC_ATOMIC64)) and drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_sync_pte': io-pgtable-arm.c:(.text+0x206): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_free_pages': io-pgtable-arm.c:(.text+0x6a6): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_alloc_pages': io-pgtable-arm.c:(.text+0x812): undefined reference to `bad_dma_ops' io-pgtable-arm.c:(.text+0x81c): undefined reference to `bad_dma_ops' io-pgtable-arm.c:(.text+0x862): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `arm_lpae_run_tests': io-pgtable-arm.c:(.init.text+0x86): undefined reference to `alloc_io_pgtable_ops' io-pgtable-arm.c:(.init.text+0x47c): undefined reference to `free_io_pgtable_ops' drivers/iommu/qcom_iommu.o: In function `qcom_iommu_init_domain': qcom_iommu.c:(.text+0x1ce): undefined reference to `alloc_io_pgtable_ops' drivers/iommu/qcom_iommu.o: In function `qcom_iommu_domain_free': qcom_iommu.c:(.text+0x754): undefined reference to `free_io_pgtable_ops' QCOM_IOMMU selects IOMMU_IO_PGTABLE_LPAE, which bypasses its dependency on HAS_DMA. Make QCOM_IOMMU depend on HAS_DMA to fix this. Fixes: 0ae349a0f33fb040 ("iommu/qcom: Add qcom_iommu") Signed-off-by: Geert Uytterhoeven Signed-off-by: Joerg Roedel drivers/iommu/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0555ac4333d7da7cff83d5b06bd3679a3e1ef584 Author: Tycho Andersen Date: Mon Sep 18 16:35:32 2017 -0600 xen, arm64: drop dummy lookup_address() This is unused, and conflicts with the definition that we'll add for XPFO. Signed-off-by: Tycho Andersen Reviewed-by: Julien Grall CC: Boris Ostrovsky CC: Juergen Gross CC: Stefano Stabellini Signed-off-by: Boris Ostrovsky include/xen/arm/page.h | 10 ---------- 1 file changed, 10 deletions(-) commit 5753743fa5108b8f98bd61e40dc63f641b26c768 Author: Haozhong Zhang Date: Mon Sep 18 09:56:50 2017 +0800 KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt WARN_ON_ONCE(pi_test_sn(&vmx->pi_desc)) in kvm_vcpu_trigger_posted_interrupt() intends to detect the violation of invariant that VT-d PI notification event is not suppressed when vcpu is in the guest mode. Because the two checks for the target vcpu mode and the target suppress field cannot be performed atomically, the target vcpu mode may change in between. If that does happen, WARN_ON_ONCE() here may raise false alarms. As the previous patch fixed the real invariant breaker, remove this WARN_ON_ONCE() to avoid false alarms, and document the allowed cases instead. Signed-off-by: Haozhong Zhang Reported-by: "Ramamurthy, Venkatesh" Reported-by: Dan Williams Reviewed-by: Paolo Bonzini Fixes: 28b835d60fcc ("KVM: Update Posted-Interrupts Descriptor when vCPU is preempted") Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit dc91f2eb1a4021eb6705c15e474942f84ab9b211 Author: Haozhong Zhang Date: Mon Sep 18 09:56:49 2017 +0800 KVM: VMX: do not change SN bit in vmx_update_pi_irte() In kvm_vcpu_trigger_posted_interrupt() and pi_pre_block(), KVM assumes that PI notification events should not be suppressed when the target vCPU is not blocked. vmx_update_pi_irte() sets the SN field before changing an interrupt from posting to remapping, but it does not check the vCPU mode. Therefore, the change of SN field may break above the assumption. Besides, I don't see reasons to suppress notification events here, so remove the changes of SN field to avoid race condition. Signed-off-by: Haozhong Zhang Reported-by: "Ramamurthy, Venkatesh" Reported-by: Dan Williams Reviewed-by: Paolo Bonzini Fixes: 28b835d60fcc ("KVM: Update Posted-Interrupts Descriptor when vCPU is preempted") Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d6500149bc4fddc5a91cd1a0c31b38fa36bff3ee Author: Yu Zhang Date: Mon Sep 18 18:45:01 2017 +0800 KVM: x86: Fix the NULL pointer parameter in check_cr_write() Routine check_cr_write() will trigger emulator_get_cpuid()-> kvm_cpuid() to get maxphyaddr, and NULL is passed as values for ebx/ecx/edx. This is problematic because kvm_cpuid() will dereference these pointers. Fixes: d1cd3ce90044 ("KVM: MMU: check guest CR3 reserved bits based on its physical address width.") Reported-by: Jim Mattson Signed-off-by: Yu Zhang Reviewed-by: David Hildenbrand Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9ac30ef6d8ec3533d0feec53e268c4fa32ea700c Author: Arnd Bergmann Date: Tue Sep 5 10:19:55 2017 +0200 drm: exynos: include linux/irq.h I ran into a build error on x86: drivers/gpu/drm/exynos/exynos5433_drm_decon.c: In function 'decon_conf_irq': drivers/gpu/drm/exynos/exynos5433_drm_decon.c:706:2: error: implicit declaration of function 'irq_set_status_flags'; did you mean 'dquot_state_flag'? [-Werror=implicit-function-declaration] irq_set_status_flags(irq, IRQ_NOAUTOEN); Adding the missing include fixes the error. Fixes: b37d53a0382c ("drm/exynos/decon5433: move TE handling to DECON") Signed-off-by: Arnd Bergmann Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 + 1 file changed, 1 insertion(+) commit 6e8edf8a7d8d98e1734ff41e5c69439419319402 Author: Marek Szyprowski Date: Thu Sep 14 14:01:01 2017 +0200 drm/exynos: Fix suspend/resume support Commit 7d902c05b480 ("drm: Nuke drm_atomic_helper_connector_dpms") removed drm_atomic_helper_connector_dpms() helper saying that it was a dead code. It was however indirectly used by Exynos DRM driver for implementing suspend/resume support. To fix this regression (after that patch Exynos DRM suspend/resume functions became no-ops and hardware fails to suspend), this patch rewrites them with drm_atomic_helper_suspend/resume() helpers. Fixes: 7d902c05b480 ("drm: Nuke drm_atomic_helper_connector_dpms") Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 40 ++++++++++--------------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 20 ++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_fbdev.h | 10 ++++++++ 4 files changed, 43 insertions(+), 28 deletions(-) commit 5baf6bb0fd2388742a0846cc7bcacee6dec78235 Author: Marek Szyprowski Date: Thu Sep 14 14:01:00 2017 +0200 drm/exynos: Fix locking in the suspend/resume paths Commit 48a92916729b ("drm/exynos: use drm_for_each_connector_iter()") replaced unsafe drm_for_each_connector() with drm_for_each_connector_iter() and removed surrounding drm_modeset_lock calls. However, that lock was there not only to protect unsafe drm_for_each_connector(), but it was also required to be held by the dpms code which was called from the loop body. This patch restores those drm_modeset_lock calls to fix broken suspend and resume of Exynos DRM subsystem in v4.13 kernel. Fixes: 48a92916729b ("drm/exynos: use drm_for_each_connector_iter()") CC: stable@vger.kernel.org # v4.13 Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3bd71e18c5803c23014df962bdd74af1b34697fe Author: Arnd Bergmann Date: Tue Sep 12 22:10:21 2017 +0200 iommu/vt-d: Fix harmless section mismatch warning Building with gcc-4.6 results in this warning due to dmar_table_print_dmar_entry being inlined as in newer compiler versions: WARNING: vmlinux.o(.text+0x5c8bee): Section mismatch in reference from the function dmar_walk_remapping_entries() to the function .init.text:dmar_table_print_dmar_entry() The function dmar_walk_remapping_entries() references the function __init dmar_table_print_dmar_entry(). This is often because dmar_walk_remapping_entries lacks a __init annotation or the annotation of dmar_table_print_dmar_entry is wrong. This removes the __init annotation to avoid the warning. On compilers that don't show the warning today, this should have no impact since the function gets inlined anyway. Signed-off-by: Arnd Bergmann Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4aaeccc7a91e24cc17f72a7eb2f586f5c3d811d Author: Guenter Roeck Date: Sun Sep 10 13:43:37 2017 -0700 iommu: Add missing dependencies parisc:allmodconfig, xtensa:allmodconfig, and possibly others generate the following Kconfig warning. warning: (IPMMU_VMSA && ARM_SMMU && ARM_SMMU_V3 && QCOM_IOMMU) selects IOMMU_IO_PGTABLE_LPAE which has unmet direct dependencies (IOMMU_SUPPORT && HAS_DMA && (ARM || ARM64 || COMPILE_TEST && !GENERIC_ATOMIC64)) IOMMU_IO_PGTABLE_LPAE depends on (COMPILE_TEST && !GENERIC_ATOMIC64), so any configuration option selecting it needs to have the same dependencies. Signed-off-by: Guenter Roeck Signed-off-by: Joerg Roedel drivers/iommu/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c496ad835c31ad639b6865714270b3003df031f6 Author: Andreas Engel Date: Mon Sep 18 21:11:57 2017 +0200 USB: serial: cp210x: add support for ELV TFD500 Add the USB device id for the ELV TFD500 data logger. Signed-off-by: Andreas Engel Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit e40a3ae1f794a35c4af3746291ed6fedc1fa0f6f Author: Arnd Bergmann Date: Wed Sep 6 17:47:45 2017 +0200 gpio: acpi: work around false-positive -Wstring-overflow warning gcc-7 notices that the pin_table is an array of 16-bit numbers, but fails to take the following range check into account: drivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt': drivers/gpio/gpiolib-acpi.c:206:24: warning: '%02X' directive writing between 2 and 4 bytes into a region of size 3 [-Wformat-overflow=] sprintf(ev_name, "_%c%02X", ^~~~ drivers/gpio/gpiolib-acpi.c:206:20: note: directive argument in the range [0, 65535] sprintf(ev_name, "_%c%02X", ^~~~~~~~~ drivers/gpio/gpiolib-acpi.c:206:3: note: 'sprintf' output between 5 and 7 bytes into a destination of size 5 sprintf(ev_name, "_%c%02X", ^~~~~~~~~~~~~~~~~~~~~~~~~~~ agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L', ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pin); ~~~~ As suggested by Andy, this changes the format string to have a fixed length. Since modifying the range check did not help, I also opened a bug against gcc, see link below. Fixes: 0d1c28a449c6 ("gpiolib-acpi: Add ACPI5 event model support to gpio.") Cc: Andy Shevchenko Link: https://patchwork.kernel.org/patch/9840801/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82123 Signed-off-by: Arnd Bergmann Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 311de3ce96f453a5a6edb3066eb6109cc07e81d2 Author: Masahiro Yamada Date: Wed Sep 6 10:40:52 2017 +0900 gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on IRQ_DOMAIN_HIERARCHY is not user-configurable, but supposed to be selected by drivers that need IRQ domain hierarchy support. GPIO_THUNDERX is the only user of "depends on IRQ_DOMAIN_HIERARCHY". This means, we can not enable GPIO_THUNDERX unless other drivers select IRQ_DOMAIN_HIERARCHY elsewhere. This is odd. Flip the logic. Signed-off-by: Masahiro Yamada Acked-by: David Daney Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7eac35ea29dc54cbc8399de84c9bf16553575b89 Author: Sebastian Frei Date: Tue Sep 12 09:50:59 2017 +0200 USB: serial: cp210x: fix partnum regression When adding GPIO support for the cp2105, the mentioned commit by Martyn Welch introduced a query for the part number of the chip. Unfortunately the driver aborts probing when this query fails, so currently the driver can not be used with chips not supporting this query. I have a data cable for Siemens mobile phones (ID 10ab:10c5) where this is the case. With this patch the driver can be bound even if the part number can not be queried. Fixes: cf5276ce7867 ("USB: serial: cp210x: Adding GPIO support for CP2105") Signed-off-by: Sebastian Frei [ johan: amend commit message; shorten error message and demote to warning; drop unnecessary move of usb_set_serial_data() ] Cc: stable # 4.9 Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 850fdec8d2fd1eebfa003fea39bec08cd69b6155 Author: Greg Kroah-Hartman Date: Mon Sep 18 12:17:57 2017 +0200 driver core: remove DRIVER_ATTR DRIVER_ATTR is no longer in use, and driver authors should be using DRIVER_ATTR_RW() or DRIVER_ATTR_RO() or DRIVER_ATTR_WO() instead in order to always get the permissions correct. So remove it so that no one can use it anymore. Acked-by: Alan Tull Reviewed-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman Documentation/driver-model/driver.txt | 7 ++++--- Documentation/filesystems/sysfs.txt | 3 ++- include/linux/device.h | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-) commit 55e001aabb826c96f09e0a440bdcbce620189dbc Author: Greg Kroah-Hartman Date: Mon Sep 18 12:17:36 2017 +0200 fpga: altera-cvp: remove DRIVER_ATTR() usage It's better to be explicit and use the DRIVER_ATTR_RW() macro when defining a driver's sysfs file. This is part of a series to drop DRIVER_ATTR() from the tree entirely. Cc: linux-fpga@vger.kernel.org Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/altera-cvp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95e2a3b3ef177730019e3799917193595133b275 Author: Jan H. Schönherr Date: Sat Sep 16 22:12:24 2017 +0200 Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD" This reverts commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563. The commit broke compilation on !CONFIG_HAVE_KVM_IRQ_ROUTING. Also, there may be cases with CONFIG_HAVE_KVM_IRQ_ROUTING, where larger gsi values make sense. As the commit was meant as an early indicator to user space that something is wrong, reverting just restores the previous behavior where overly large values are ignored when encountered (without any direct feedback). Reported-by: Abdul Haleem Signed-off-by: Jan H. Schönherr Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář virt/kvm/eventfd.c | 2 -- 1 file changed, 2 deletions(-) commit ba385c0594e723d41790ecfb12c610e6f90c7785 Author: Gerald Schaefer Date: Mon Sep 18 16:51:51 2017 +0200 s390/mm: fix write access check in gup_huge_pmd() The check for the _SEGMENT_ENTRY_PROTECT bit in gup_huge_pmd() is the wrong way around. It must not be set for write==1, and not be checked for write==0. Fix this similar to how it was fixed for ptes long time ago in commit 25591b070336 ("[S390] fix get_user_pages_fast"). One impact of this bug would be unnecessarily using the gup slow path for write==0 on r/w mappings. A potentially more severe impact would be that gup_huge_pmd() will succeed for write==1 on r/o mappings. Cc: Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/mm/gup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 91c575b335766effa6103eba42a82aea560c365f Author: Gerald Schaefer Date: Mon Sep 18 16:10:35 2017 +0200 s390/mm: make pmdp_invalidate() do invalidation only Commit 227be799c39a ("s390/mm: uninline pmdp_xxx functions from pgtable.h") inadvertently changed the behavior of pmdp_invalidate(), so that it now clears the pmd instead of just marking it as invalid. Fix this by restoring the original behavior. A possible impact of the misbehaving pmdp_invalidate() would be the MADV_DONTNEED races (see commits ced10803 and 58ceeb6b), although we should not have any negative impact on the related dirty/young flags, since those flags are not set by the hardware on s390. Fixes: 227be799c39a ("s390/mm: uninline pmdp_xxx functions from pgtable.h") Cc: # v4.6+ Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 55fb7347579017bdb09550b4e8019447340b7004 Author: Sebastian Ott Date: Thu Sep 14 13:55:22 2017 +0200 s390/cio: recover from bad paths In some situations we don't receive notification from firmware that a previously unusable channelpath is usable again. Schedule recovery for devices that return from path verification without using all potentially usable paths. The recovery thread will periodically trigger a path verification on the affected devices. Signed-off-by: Sebastian Ott Suggested-by: Peter Oberparleiter Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/device.c | 12 +++++++++--- drivers/s390/cio/device.h | 1 + drivers/s390/cio/device_fsm.c | 12 ++++++++++++ drivers/s390/cio/io_sch.h | 2 ++ 4 files changed, 24 insertions(+), 3 deletions(-) commit c8b850241559d6bad7e640075e282a83a4ad7ead Author: Sebastian Ott Date: Mon Sep 18 12:25:22 2017 +0200 s390/scm_blk: consistently use blk_status_t as error type Fix these warnings found by sparse: drivers/s390/block/scm_blk.c:257:24: warning: incorrect type in assignment (different base types) drivers/s390/block/scm_blk.c:257:24: expected int [signed] drivers/s390/block/scm_blk.c:257:24: got restricted blk_status_t [usertype] error drivers/s390/block/scm_blk.c:420:33: warning: incorrect type in argument 2 (different base types) drivers/s390/block/scm_blk.c:420:33: expected restricted blk_status_t [usertype] error drivers/s390/block/scm_blk.c:420:33: got int [signed] Signed-off-by: Sebastian Ott Reported-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ecb1a29e11e24c458ee4ee59447d0ddf8274589 Author: Florian Fainelli Date: Mon Sep 18 16:31:30 2017 -0700 net: systemport: Fix 64-bit statistics dependency There are several problems with commit 10377ba7673d ("net: systemport: Support 64bit statistics", first one got fixed in 7095c973453e ("net: systemport: Fix 64-bit stats deadlock"). The second problem is that this specific code updates the stats64.tx_{packets,bytes} from ndo_get_stats64() and that is what we are returning to ethtool -S. If we are not running a tool that involves calling ndo_get_stats64(), then we won't get updated ethtool stats. The solution to this is to update the stats from both call sites, factoring that into a specific function, While at it, don't just check the sizeof() but also the type of the statistics in order to use the 64-bit stats seqlock. Fixes: 10377ba7673d ("net: systemport: Support 64bit statistics") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 52 ++++++++++++++++++------------ 1 file changed, 32 insertions(+), 20 deletions(-) commit 129c6cda2de2a8ac44fab096152469999b727faf Author: Eric Dumazet Date: Mon Sep 18 13:03:43 2017 -0700 8139too: revisit napi_complete_done() usage It seems we have to be more careful in napi_complete_done() use. This patch is not a revert, as it seems we can avoid bug that Ville reported by moving the napi_complete_done() test in the spinlock section. Many thanks to Ville for detective work and all tests. Fixes: 617f01211baf ("8139too: use napi_complete_done()") Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139too.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 54640d238760a1a54dfebe039b49682522100186 Author: Eric W. Biederman Date: Mon Sep 18 22:51:14 2017 -0500 fcntl: Don't set si_code to SI_SIGIO when sig == SIGPOLL When fixing things to avoid ambiguous cases I had a thinko and included SIGPOLL/SIGIO in with all of the other signals that have signal specific si_codes. Which is completely wrong. Fix that. Reported-by: Vince Weaver Signed-off-by: "Eric W. Biederman" fs/fcntl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80a921e207cea3dd18038501187078669a218dab Author: Ville Syrjälä Date: Mon Sep 18 23:00:08 2017 +0300 ata_piix: Add Fujitsu-Siemens Lifebook S6120 to short cable IDs Fujitsu-Siemens Lifebook S6120 misdetects the cable type for some drives. The problematic one in this case is an mSATA SSD hooked up via a mSATA->PATA bridge. With regular hard disks the detection seems to work correctly. Strangely an older Lifebook model (S6020) detects the cable as 80c with the mSATA SSD, even if using the exact same flex cable. Cc: Tejun Heo Signed-off-by: Ville Syrjälä Signed-off-by: Tejun Heo drivers/ata/ata_piix.c | 1 + 1 file changed, 1 insertion(+) commit 47684e111f52fface17820d3ef84cc845b26070e Author: Randy Dunlap Date: Mon Sep 18 13:10:15 2017 -0700 Documentation: core-api: minor workqueue.rst cleanups Clean up workqueue.rst: - fix minor typos - put '@' after `` instead of preceding them (one place) - use "CPU" instead of "cpu" in text consistently - quote one function name Signed-off-by: Randy Dunlap Cc: Tejun Heo Cc: Florian Mickler Signed-off-by: Tejun Heo Documentation/core-api/workqueue.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 33a56086712561b8b9cdc881e0317f4c36861f72 Author: Dan Williams Date: Mon Sep 18 14:48:58 2017 -0700 libnvdimm, namespace: fix btt claim class crash Maurice reports: BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 IP: holder_class_store+0x253/0x2b0 [libnvdimm] ...while trying to reconfigure an NVDIMM-N namespace into 'sector' / 'btt' mode. The crash points to this line: (gdb) li *(holder_class_store+0x253) 0x7773 is in holder_class_store (drivers/nvdimm/namespace_devs.c:1420). 1415 for (i = 0; i < nd_region->ndr_mappings; i++) { 1416 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; 1417 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); 1418 struct nd_namespace_index *nsindex; 1419 1420 nsindex = to_namespace_index(ndd, ndd->ns_current); ...where we are failing because ndd is NULL due to NVDIMM-N dimms not supporting labels. Long story short, default to the BTTv1 format in the label-less / NVDIMM-N case. Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format") Cc: Cc: Vishal Verma Reported-by: Maurice A. Saldivar Tested-by: Maurice A. Saldivar Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4c7124413aa759b8ea0b90cd39177e525396e662 Author: Yuchung Cheng Date: Mon Sep 18 11:05:16 2017 -0700 tcp: remove two unused functions remove tcp_may_send_now and tcp_snd_test that are no longer used Fixes: 840a3cbe8969 ("tcp: remove forward retransmit feature") Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 1 - net/ipv4/tcp_output.c | 34 ---------------------------------- 2 files changed, 35 deletions(-) commit 5e75fe3927559505682b0053b5745e3f42d66e8c Author: Dan Williams Date: Mon Sep 18 17:19:10 2017 -0700 tools/testing/nvdimm: disable labels for nfit_test.1 Improve coverage of NVDIMM-N test scenarios by providing a test bus incapable of label operations. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 3 --- 1 file changed, 3 deletions(-) commit 582db7e0c4c2fc5bb4f932f268035883385e3692 Author: Tobias Klauser Date: Mon Sep 18 15:03:46 2017 +0200 bpf: devmap: pass on return value of bpf_map_precharge_memlock If bpf_map_precharge_memlock in dev_map_alloc, -ENOMEM is returned regardless of the actual error produced by bpf_map_precharge_memlock. Fix it by passing on the error returned by bpf_map_precharge_memlock. Also return -EINVAL instead of -ENOMEM if the page count overflow check fails. This makes dev_map_alloc match the behavior of other bpf maps' alloc functions wrt. return values. Signed-off-by: Tobias Klauser Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/devmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1e3c5ec66119783440ed211ae527674651affa9b Author: Sathya Perla Date: Mon Sep 18 17:05:37 2017 +0530 bnxt_en: check for ingress qdisc in flower offload Check for ingress-only qdisc for flower offload, as other qdiscs are not supported for flower offload. Suggested-by: Jiri Pirko Signed-off-by: Sathya Perla Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6ce14f6416c84bd9c81777edf899b57ac5000c87 Author: Arnd Bergmann Date: Tue Sep 19 01:49:02 2017 +0200 ACPI / watchdog: properly initialize resources We copy a local resource structure into a list, but only initialize some of its members, as pointed out by gcc-4.4: drivers/acpi/acpi_watchdog.c: In function 'acpi_watchdog_init': drivers/acpi/acpi_watchdog.c:105: error: 'res.child' may be used uninitialized in this function drivers/acpi/acpi_watchdog.c:105: error: 'res.sibling' may be used uninitialized in this function drivers/acpi/acpi_watchdog.c:105: error: 'res.parent' may be used uninitialized in this function drivers/acpi/acpi_watchdog.c:105: error: 'res.desc' may be used uninitialized in this function drivers/acpi/acpi_watchdog.c:105: error: 'res.name' may be used uninitialized in this function Newer compilers can presumably optimize the uninitialized access away entirely and don't warn at all, but rely on the kzalloc() to zero the structure first. This adds an explicit initialization to force consistent behavior. Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog) Signed-off-by: Arnd Bergmann Acked-by: Guenter Roeck Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51513748ddfe7a5d2812158a1e0570499b0c511c Author: Randy Dunlap Date: Sat Sep 16 13:10:06 2017 -0700 Documentation: networking: fix ASCII art in switchdev.txt Fix ASCII art in Documentation/networking/switchdev.txt: Change non-ASCII "spaces" to ASCII spaces. Change 2 erroneous '+' characters in ASCII art to '-' (at the '*' characters below): line 32: +--+----+----+----+-*--+----+---+ +-----+-----+ line 41: +--------------+---*------------+ Signed-off-by: Randy Dunlap Acked-by: Pavel Machek Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 68 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit 3ff4cbec87da48b0ec1f7b6196607b034de0c680 Author: Davide Caratti Date: Sat Sep 16 14:02:21 2017 +0200 net/sched: cls_matchall: fix crash when used with classful qdisc this script, edited from Linux Advanced Routing and Traffic Control guide tc q a dev en0 root handle 1: htb default a tc c a dev en0 parent 1: classid 1:1 htb rate 6mbit burst 15k tc c a dev en0 parent 1:1 classid 1:a htb rate 5mbit ceil 6mbit burst 15k tc c a dev en0 parent 1:1 classid 1:b htb rate 1mbit ceil 6mbit burst 15k tc f a dev en0 parent 1:0 prio 1 $clsname $clsargs classid 1:b ping $address -c1 tc -s c s dev en0 classifies traffic to 1:b or 1:a, depending on whether the packet matches or not the pattern $clsargs of filter $clsname. However, when $clsname is 'matchall', a systematic crash can be observed in htb_classify(). HTB and classful qdiscs don't assign initial value to struct tcf_result, but then they expect it to contain valid values after filters have been run. Thus, current 'matchall' ignores the TCA_MATCHALL_CLASSID attribute, configured by user, and makes HTB (and classful qdiscs) dereference random pointers. By assigning head->res to *res in mall_classify(), before the actions are invoked, we fix this crash and enable TCA_MATCHALL_CLASSID functionality, that had no effect on 'matchall' classifier since its first introduction. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1460213 Reported-by: Jiri Benc Fixes: b87f7936a932 ("net/sched: introduce Match-all classifier") Signed-off-by: Davide Caratti Acked-by: Yotam Gigi Signed-off-by: David S. Miller net/sched/cls_matchall.c | 1 + 1 file changed, 1 insertion(+) commit 8c22dab03ad072e45060c299c70d02a4f6fc4aab Author: Xin Long Date: Fri Sep 15 15:58:33 2017 +0800 ip6_tunnel: do not allow loading ip6_tunnel if ipv6 is disabled in cmdline If ipv6 has been disabled from cmdline since kernel started, it makes no sense to allow users to create any ip6 tunnel. Otherwise, it could some potential problem. Jianlin found a kernel crash caused by this in ip6_gre when he set ipv6.disable=1 in grub: [ 209.588865] Unable to handle kernel paging request for data at address 0x00000080 [ 209.588872] Faulting instruction address: 0xc000000000a3aa6c [ 209.588879] Oops: Kernel access of bad area, sig: 11 [#1] [ 209.589062] NIP [c000000000a3aa6c] fib_rules_lookup+0x4c/0x260 [ 209.589071] LR [c000000000b9ad90] fib6_rule_lookup+0x50/0xb0 [ 209.589076] Call Trace: [ 209.589097] fib6_rule_lookup+0x50/0xb0 [ 209.589106] rt6_lookup+0xc4/0x110 [ 209.589116] ip6gre_tnl_link_config+0x214/0x2f0 [ip6_gre] [ 209.589125] ip6gre_newlink+0x138/0x3a0 [ip6_gre] [ 209.589134] rtnl_newlink+0x798/0xb80 [ 209.589142] rtnetlink_rcv_msg+0xec/0x390 [ 209.589151] netlink_rcv_skb+0x138/0x150 [ 209.589159] rtnetlink_rcv+0x48/0x70 [ 209.589169] netlink_unicast+0x538/0x640 [ 209.589175] netlink_sendmsg+0x40c/0x480 [ 209.589184] ___sys_sendmsg+0x384/0x4e0 [ 209.589194] SyS_sendmsg+0xd4/0x140 [ 209.589201] SyS_socketcall+0x3e0/0x4f0 [ 209.589209] system_call+0x38/0xe0 This patch is to return -EOPNOTSUPP in ip6_tunnel_init if ipv6 has been disabled from cmdline. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 3 +++ 1 file changed, 3 insertions(+) commit f2654a4781318dc7ab8d6cde66f1fa39eab980a9 Author: Fahad Kunnathadi Date: Fri Sep 15 12:01:58 2017 +0530 net: phy: Fix mask value write on gmii2rgmii converter speed register To clear Speed Selection in MDIO control register(0x10), ie, clear bits 6 and 13 to zero while keeping other bits same. Before AND operation,The Mask value has to be perform with bitwise NOT operation (ie, ~ operator) This patch clears current speed selection before writing the new speed settings to gmii2rgmii converter Fixes: f411a6160bd4 ("net: phy: Add gmiitorgmii converter support") Signed-off-by: Fahad Kunnathadi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99df13b6ea811a63eeacb278d05a5b914ce28073 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ä (cherry picked from commit e01e71fc49d4c95090a04f898a3fe788c652a04b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_irq.c | 3 --- 1 file changed, 3 deletions(-) commit 8c7a758873577f0d1bb3f879584338f73e6c6bc3 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 (cherry picked from commit f44e354f857f207cd361269c5e38e1f96e0b616c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_panel.c | 2 ++ 1 file changed, 2 insertions(+) commit abeae421b03d800d33894df7fbca6d00c70c358e 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 (cherry picked from commit 33c8d8870c67faf3161898a56af98ac3c1c71450) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dsi.c | 11 ----------- 1 file changed, 11 deletions(-) commit ac73661c6222faef1a97ec44f424234f165e4710 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 (cherry picked from commit c3881128cb672cf484a52fbb36b5daa9044d9168) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_panel.c | 2 ++ 1 file changed, 2 insertions(+) commit 814feed316e9d15b0ae869ca729370e7630b8d13 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 (cherry picked from commit 37875d6b3af702425ce292de81b77faf94766616) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b4dc3c0da0d66e7b20a826c537d41bb73e4df54 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 (cherry picked from commit f1751362d6357a90bc6e53176cec715ff2dbed74) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gvt/cfg_space.c | 113 +++++++++++++++-------------------- 1 file changed, 48 insertions(+), 65 deletions(-) commit 76cc0d3282d4b933fa144fa41fbc5318e0fdca24 Author: Xin Long Date: Fri Sep 15 12:00:07 2017 +0800 ip6_gre: skb_push ipv6hdr before packing the header in ip6gre_header Now in ip6gre_header before packing the ipv6 header, it skb_push t->hlen which only includes encap_hlen + tun_hlen. It means greh and inner header would be over written by ipv6 stuff and ipv6h might have no chance to set up. Jianlin found this issue when using remote any on ip6_gre, the packets he captured on gre dev are truncated: 22:50:26.210866 Out ethertype IPv6 (0x86dd), length 120: truncated-ip6 -\ 8128 bytes missing!(flowlabel 0x92f40, hlim 0, next-header Options (0) \ payload length: 8192) ::1:2000:0 > ::1:0:86dd: HBH [trunc] ip-proto-128 \ 8184 It should also skb_push ipv6hdr so that ipv6h points to the right position to set ipv6 stuff up. This patch is to skb_push hlen + sizeof(*ipv6h) and also fix some indents in ip6gre_header. Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 265698d7e6132a2d41471135534f4f36ad15b09c Author: Johannes Berg Date: Mon Sep 18 22:46:36 2017 +0200 nl80211: fix null-ptr dereference on invalid mesh configuration If TX rates are specified during mesh join, the channel must also be specified. Check the channel pointer to avoid a null pointer dereference if it isn't. Reported-by: Jouni Malinen Fixes: 8564e38206de ("cfg80211: add checks for beacon rate, extend to mesh") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 7d34cd12061d2cf38f7505c0ab2ae2f03fbe8e08 Author: Eric Biggers Date: Mon Sep 18 11:12:02 2017 -0400 MAINTAINERS: associate linux/fs.h with VFS instead of file locking include/linux/fs.h and include/uapi/linux/fs.h deal with much more than just file locking. Move them to the "FILESYSTEMS (VFS and infrastructure)" section of the MAINTAINERS file so that the first suggestion from get_maintainer.pl isn't the file locking maintainers, which has caused some confusion. Cc: J. Bruce Fields Cc: Al Viro Signed-off-by: Eric Biggers Acked-by: Jeff Layton Signed-off-by: J. Bruce Fields MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63ecc3d9436f8012e49dc846d6cb0a85a3433517 Author: Subash Abhinov Kasiviswanathan Date: Wed Sep 13 19:30:51 2017 -0600 udpv6: Fix the checksum computation when HW checksum does not apply While trying an ESP transport mode encryption for UDPv6 packets of datagram size 1436 with MTU 1500, checksum error was observed in the secondary fragment. This error occurs due to the UDP payload checksum being missed out when computing the full checksum for these packets in udp6_hwcsum_outgoing(). Fixes: d39d938c8228 ("ipv6: Introduce udpv6_send_skb()") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller net/ipv6/udp.c | 1 + 1 file changed, 1 insertion(+) commit 84c06566cfb84e5f6aed9582d4570df8406700c9 Author: Thomas Meyer Date: Fri Sep 8 14:01:17 2017 +0200 selftests/ftrace: multiple_kprobes: Also check for support The multiple_kprobes test case fails to check for KPROBE_EVENT support. Add the check to prevent a false test result. Signed-off-by: Thomas Meyer Acked-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 2 ++ 1 file changed, 2 insertions(+) commit 56a268cd4a410081d477913d51e044039d3a8834 Author: Thomas Meyer Date: Fri Sep 8 13:19:23 2017 +0200 selftests/bpf: Make bpf_util work on uniprocessor systems The current implementation fails to work on uniprocessor systems. Fix the parser to also handle the uniprocessor case. Signed-off-by: Thomas Meyer Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Shuah Khan tools/testing/selftests/bpf/bpf_util.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 6f0003363a13be699ba945cfa4074193e04fbea5 Author: Thomas Meyer Date: Fri Sep 8 14:01:18 2017 +0200 selftests/intel_pstate: No need to compile test progs in the run script Both test programs are being compiled by make, so no need to compile both programs in the runner script. This resolves an error when installing all selftests via make install and run them in a different environemnt. Running tests in intel_pstate ======================================== ./run.sh: line 35: gcc: command not found Problem compiling aperf.c. Signed-off-by: Thomas Meyer Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/run.sh | 6 ------ 1 file changed, 6 deletions(-) commit 67b2e30eb7b346db60afe91b0927738fb604d0a4 Author: Daniel Díaz Date: Thu Aug 17 10:55:30 2017 -0500 selftests: intel_pstate: build only on x86 These tests are only for x86, so don't try to build or run them on other architectures. Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan tools/testing/selftests/intel_pstate/Makefile | 2 ++ tools/testing/selftests/intel_pstate/run.sh | 5 +++++ 2 files changed, 7 insertions(+) commit 172a8ca880f1c8b01bc4d1e0239bcb293ef65e0b Author: Fathi Boudra Date: Thu Jun 29 12:39:53 2017 +0300 selftests: breakpoints: re-order TEST_GEN_PROGS targets breakpoint_test can fail on arm64 with older/unpatched glibc: breakpoint_test_arm64.c: In function 'run_test': breakpoint_test_arm64.c:170:25: error: 'TRAP_HWBKPT' undeclared (first use in this function) due to glibc missing several of the TRAP_* constants in the userspace definitions. Specifically TRAP_BRANCH and TRAP_HWBKPT. See https://sourceware.org/bugzilla/show_bug.cgi?id=21286 It prevents to build step_after_suspend_test afterward, since make won't continue. We still want to be able to build and run the test, independently of breakpoint_test_arm64 build failure. Re-order TEST_GEN_PROGS to be able to build step_after_suspend_test first. Signed-off-by: Fathi Boudra Signed-off-by: Shuah Khan tools/testing/selftests/breakpoints/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96e5335859e30fa2bb2da8befc86292c3c1a73dd Author: Thomas Richter Date: Mon Sep 11 12:49:01 2017 +0200 tools: fix testing/selftests/sigaltstack for s390x On s390x the compilation of the file sas.c in directory tools/testing/selftests/sigaltstack fails with this error message: root@s35lp76 testing]# make selftests/sigaltstack/sas cc selftests/sigaltstack/sas.c -o selftests/sigaltstack/sas selftests/sigaltstack/sas.c: In function ‘my_usr1’: selftests/sigaltstack/sas.c:42:25: error: invalid register name for ‘sp’ register unsigned long sp asm("sp"); ^~ : recipe for target 'selftests/sigaltstack/sas' failed make: *** [selftests/sigaltstack/sas] Error 1 [root@s35lp76 testing]# On s390x the stack pointer is register r15, the register name "sp" is unknown. Make this line platform dependend and use register r15. With this patch the compilation and test succeeds: [root@s35lp76 testing]# ./selftests/sigaltstack/sas TAP version 13 ok 1 Initial sigaltstack state was SS_DISABLE # [RUN] signal USR1 ok 2 sigaltstack is disabled in sighandler # [RUN] switched to user ctx # [RUN] signal USR2 # [OK] Stack preserved ok 3 sigaltstack is still SS_AUTODISARM after signal Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 1..3 [root@s35lp76 testing]# Signed-off-by: Thomas Richter Signed-off-by: Shuah Khan tools/testing/selftests/sigaltstack/sas.c | 4 ++++ 1 file changed, 4 insertions(+) commit 64cfcaed7b25f69d8b7a091a23961f50c6788a66 Author: Daniel Díaz Date: Fri Jul 7 10:27:06 2017 -0500 selftests: net: More graceful finding of `ip'. The ip tool might be provided by another package (such as Busybox), not necessarily implementing the -Version switch. Trying an actual usage (`ip link show') might be a better test that would work with all implementations of `ip'. Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan tools/testing/selftests/net/netdevice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c91261437985d481c472639d4397931d77f5d4e9 Author: Alexey Khoroshilov Date: Sat Sep 2 23:13:55 2017 +0300 serial: sccnxp: Fix error handling in sccnxp_probe() sccnxp_probe() returns result of regulator_disable() that may lead to returning zero, while device is not properly initialized. Also the driver enables clocks, but it does not disable it. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sccnxp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9d7ee0e28da59b05647c3d2a7ad4076c16b1a6ef Author: Fugang Duan Date: Mon Sep 4 19:20:24 2017 +0800 tty: serial: lpuart: avoid report NULL interrupt The current driver register irq in .startup() and free the irq in .shutdown(), then user will see the NULL interrupt output from 'cat /proc/interrupts' after the uart port test completed: ... 41: 515 0 0 0 GICv3 257 Level fsl-lpuart 42: 2 0 0 0 GICv3 258 Level ... It is better to register all the irqs during probe function via devm_request_irq() to avoid to call free_irq(). Signed-off-by: Fugang Duan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit 0e5ec4140c4a8a38c4ff7293c018eb7da69a30db Author: Russell Enderby Date: Tue Sep 5 12:16:47 2017 -0500 serial: bcm63xx: fix timing issue. Issue where unprintable characters can occur or output is cut off over the serial uart / linux console depending on timing. Problem occurs when changing the serial baud rate when setting up the new console.The bcm63xx driver does a disable and flush of the uart tx fifo while there is data still in the tx fifo. If the tx fifo still has data it is trying to send out, we need to wait until it is empty before disabling and flushing the uart. When we now go to change the uart parameters including speed we check if there is data currently in the tx fifo.If there is was mdelay(10) and check again.If it tries 3 times and still has data in it we just continue and sacrifice the tx fifo buffer. A cleaner and more preferred approach would be to remove : - spin_lock_irqsave() - bcm_uart_disable() - bcm_uart_flush() However it is not clear if the author put those in to fix another underlying issue.As a result this solution is a safer approach. Output before the fix: [0.306000] 14e00520.serial: ttyS0 at MMIO 0x14e00520 (irq = 9, base_baud = 1687500) is a° 0.315000] console[ttyS0] enabled Output verified after the fix: [0.315000] 14e00520.serial: ttyS0 at MMIO 0x14e00520 (irq = 9, base_baud = 1687500) is a bcm63xx_uart [0.334000] console[ttyS0] enabled Signed-off-by: Russell Enderby Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/bcm63xx_uart.c | 5 +++++ 1 file changed, 5 insertions(+) commit 104583b504da8a3ad86d033b497cb6e58941a9a1 Author: Jiri Slaby Date: Tue Sep 12 12:39:54 2017 +0200 mxser: fix timeout calculation for low rates Paul reported, that low rates like B300 make the driver to hang in mxser_wait_until_sent. His debugging tackled the issue down to the info->timeout computation in mxser_set_baud. Obviously, ints are used there and they easily overflow with these low rates: B300 makes info->timeout to be -373. So switch all these types to unsigned as it ought to be. And use the u64 domain to perform the computation as in the worst case, we need 35 bits to store the computed value (before division). And use do_div not to break 32 bit kernels. [v2] make it actually build Signed-off-by: Jiri Slaby Cc: Paul Tested-by: Signed-off-by: Greg Kroah-Hartman drivers/tty/mxser.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 432219fd002ada95d2f45dd3a25c3f7c73f27864 Author: Sergei Shtylyov Date: Sat Sep 2 01:15:13 2017 +0300 serial: sh-sci: document R8A77970 bindings R-Car V3M (R8A77970) SoC also has the R-Car gen3 compatible SCIF and HSCIF ports, so document the SoC specific bindings. Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Acked-by: Geert Uytterhoeven Acked-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+) commit ebb2c2437d8008d46796902ff390653822af6cc4 Merge: 0666f56 b917c6d Author: Linus Torvalds Date: Mon Sep 18 08:44:51 2017 -0700 Merge tag 'mmc-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix trivial typo in Kconfig - Fixup initialization of mmc block requests MMC host: - cavium: Fix use-after-free bug reported by KASAN" * tag 'mmc-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: cavium: Fix use-after-free in of_platform_device_destroy mmc: host: fix typo after MMC_DEBUG move mmc: block: Fix incorrectly initialized requests commit 7f4f7dd4417d9efd038b14d39c70170db2e0baa0 Author: Vishwanath Pai Date: Mon Sep 11 21:52:40 2017 +0200 netfilter: ipset: ipset list may return wrong member count for set with timeout Simple testcase: $ ipset create test hash:ip timeout 5 $ ipset add test 1.2.3.4 $ ipset add test 1.2.2.2 $ sleep 5 $ ipset l Name: test Type: hash:ip Revision: 5 Header: family inet hashsize 1024 maxelem 65536 timeout 5 Size in memory: 296 References: 0 Number of entries: 2 Members: We return "Number of entries: 2" but no members are listed. That is because mtype_list runs "ip_set_timeout_expired" and does not list the expired entries, but set->elements is never upated (until mtype_gc cleans it up later). Reviewed-by: Joshua Hunt Signed-off-by: Vishwanath Pai Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_gen.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit b0ade85165b3caeb0cd908cffe5921a39f25c243 Author: Geert Uytterhoeven Date: Sun Sep 10 13:41:41 2017 +0200 netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to fix zero div If no spinlock debugging options (CONFIG_GENERIC_LOCKBREAK, CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC) are enabled on a UP platform (e.g. m68k defconfig), arch_spinlock_t is an empty struct, hence using ARRAY_SIZE(nf_nat_locks) causes a division by zero: net/netfilter/nf_nat_core.c: In function ‘nf_nat_setup_info’: net/netfilter/nf_nat_core.c:432: warning: division by zero net/netfilter/nf_nat_core.c: In function ‘__nf_nat_cleanup_conntrack’: net/netfilter/nf_nat_core.c:535: warning: division by zero net/netfilter/nf_nat_core.c:537: warning: division by zero net/netfilter/nf_nat_core.c: In function ‘nf_nat_init’: net/netfilter/nf_nat_core.c:810: warning: division by zero net/netfilter/nf_nat_core.c:811: warning: division by zero net/netfilter/nf_nat_core.c:824: warning: division by zero Fix this by using the CONNTRACK_LOCKS definition instead. Suggested-by: Florian Westphal Fixes: 8073e960a03bf7b5 ("netfilter: nat: use keyed locks") Signed-off-by: Geert Uytterhoeven Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bf563b01c2895a4bfd1a29cc5abc67fe706ecffd Author: Nicolai Stange Date: Mon Sep 11 09:45:42 2017 +0200 driver core: platform: Don't read past the end of "driver_override" buffer When printing the driver_override parameter when it is 4095 and 4094 bytes long, the printing code would access invalid memory because we need count+1 bytes for printing. Reject driver_override values of these lengths in driver_override_store(). This is in close analogy to commit 4efe874aace5 ("PCI: Don't read past the end of sysfs "driver_override" buffer") from Sasha Levin. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'") Cc: stable@vger.kernel.org # v3.17+ Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bcd6a7aa13800afc1418e6b29d944d882214939a Author: Kai-Heng Feng Date: Mon Sep 18 17:39:19 2017 +0300 Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts" This reverts commit dec08194ffeccfa1cf085906b53d301930eae18f. Commit dec08194ffec ("xhci: Limit USB2 port wake support for AMD Promontory hosts") makes all high speed USB ports on ASUS PRIME B350M-A cease to function after enabling runtime PM. All boards with this chipsets will be affected, so revert the commit. The original patch was added to stable 4.9, 4.11 and 4.12 and needs to reverted from there as well Cc: # 4.9+ Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 --- drivers/usb/host/xhci-pci.c | 12 ------------ drivers/usb/host/xhci.h | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) commit 7bea22b124d77845c85a62eaa29a85ba6cc2f899 Author: Mathias Nyman Date: Mon Sep 18 17:39:18 2017 +0300 xhci: set missing SuperSpeedPlus Link Protocol bit in roothub descriptor A SuperSpeedPlus roothub needs to have the Link Protocol (LP) bit set in the bmSublinkSpeedAttr[] entry of a SuperSpeedPlus descriptor. If the xhci controller has an optional Protocol Speed ID (PSI) table then that will be used as a base to create the roothub SuperSpeedPlus descriptor. The PSI table does not however necessary contain the LP bit so we need to set it manually. Check the psi speed and set LP bit if speed is 10Gbps or higher. We're not setting it for 5 to 10Gbps as USB 3.1 specification always mention SuperSpeedPlus for 10Gbps or higher, and some SSIC USB 3.0 speeds can be over 5Gbps, such as SSIC-G3B-L1 at 5830 Mbps Cc: # 4.6+ Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4ec1cd3eeeee7ccc35681270da028dbc29ca7bbd Author: Mathias Nyman Date: Mon Sep 18 17:39:17 2017 +0300 xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround The flow control workaround for ASM1042A xHC hosts sleeps between register polling. The workaround gets called in several places, among them with spin_lock_irq() held when xHC host is resumed or hoplug removed. This was noticed as kernel panics at resume on a Dell XPS15 9550 with TB16 thunderbolt dock. Avoid sleeping with spin_lock_irq() held, use udelay() instead The original workaround was added to 4.9 and 4.12 stable releases, this patch needs to be applied to those as well. Fixes: 9da5a1092b13 ("xhci: Bad Ethernet performance plugged in ASM1042A host") Cc: #4.9+ Reported-by: Jose Marino Tested-by: Jose Marino Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6b8e79306f515b5483eb11076e0fbfc140434a8 Author: Adam Wallis Date: Mon Sep 18 17:39:16 2017 +0300 usb: host: xhci-plat: allow sysdev to inherit from ACPI Commit 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA configuration") updated the method determining DMA for XHCI from sysdev. However, this patch broke the ability to enumerate the FWNODE from parent ACPI devices from the child plat XHCI device. Currently, xhci_plat is not set up properly when the parent device is an ACPI node. The conditions that xhci_plat_probe should satisfy are 1. xhci_plat comes from firmware 2. xhci_plat is child of a device from firmware (dwc3-plat) 3. xhci_plat is grandchild of a pci device (dwc3-pci) Case 2 is covered when the child is an OF node (by checking sysdev->parent->of_node), however, an ACPI parent will return NULL in the of_node check and will thus not result in sysdev being set to sysdev->parent [ 17.591549] xhci-hcd: probe of xhci-hcd.6.auto failed with error -5 This change adds a check for ACPI to completely allow for condition 2. This is done by first checking if the parent node is of type ACPI (e.g., dwc3-plat) and set sysdev to sysdev->parent if either of the two following conditions are met: 1: If fwnode is empty (in the case that platform_device_add_properties was not called on the allocated platform device) 2: fwnode exists but is not of type ACPI (this would happen if platform_device_add_properties was called on the allocated device. Instead of type FWNODE_ACPI, you would end up with FWNODE_PDATA) Cc: stable@vger.kernel.org #4.12.x Cc: stable@vger.kernel.org #4.13.x Fixes: 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA configuration") Tested-by: Thang Q. Nguyen Signed-off-by: Adam Wallis Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 76a14d7bf92960aac2f5450bfd23783bfa618be9 Author: Mathias Nyman Date: Mon Sep 18 17:39:15 2017 +0300 xhci: fix wrong endpoint ESIT value shown in tracing Read the endpiont ESIT from endpiont context using correct macro. Add a macro for reading the high bits of ESIT for Large ESIT Payload Capable hosts (LEC=1) Cc: # 4.12 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 114ec3a6f9096d211a4aff4277793ba969a62c73 Author: Jim Dickerson Date: Mon Sep 18 17:39:14 2017 +0300 usb: pci-quirks.c: Corrected timeout values used in handshake Servers were emitting failed handoff messages but were not waiting the full 1 second as designated in section 4.22.1 of the eXtensible Host Controller Interface specifications. The handshake was using wrong units so calls were made with milliseconds not microseconds. Comments referenced 5 seconds not 1 second as in specs. The wrong units were also corrected in a second handshake call. Cc: Signed-off-by: Jim Dickerson Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5a838a13c9b4e5dd188b7a6eaeb894e9358ead0c Author: Mathias Nyman Date: Mon Sep 18 17:39:13 2017 +0300 xhci: fix finding correct bus_state structure for USB 3.1 hosts xhci driver keeps a bus_state structure for each hcd (usb2 and usb3) The structure is picked based on hcd speed, but driver only compared for HCD_USB3 speed, returning the wrong bus_state for HCD_USB31 hosts. This caused null pointer dereference errors in bus_resume function. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9821786d7c90eee2f6852261893d9703801aae47 Author: Lu Baolu Date: Mon Sep 18 17:39:12 2017 +0300 usb: xhci: Free the right ring in xhci_add_endpoint() In the xhci_add_endpoint(), a new ring was allocated and saved at xhci_virt_ep->new_ring. Hence, when error happens, we need to free the allocated ring before returning error. Current code frees xhci_virt_ep->ring instead of the new_ring. This patch fixes this. Cc: 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, 2 insertions(+), 1 deletion(-) commit 452562abb5b76c14449dead2a7113f641893e8bc Author: Sudeep Holla Date: Thu Sep 7 15:16:05 2017 +0100 base: arch_topology: fix section mismatch build warnings Commit 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") introduced init_cpu_capacity_callback and init_cpu_capacity_notifier which are referenced from initcall and are missing __init{,data} annotations resulting the below section mismatch build warnings. "WARNING: vmlinux.o(.text+0xbab790): Section mismatch in reference from the function init_cpu_capacity_callback() to the variable .init.text:$x The function init_cpu_capacity_callback() references the variable __init $x. This is often because init_cpu_capacity_callback lacks a __init annotation or the annotation of $x is wrong." This patch fixes the above build warnings by adding the required annotations. Fixes: 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") Cc: Juri Lelli Cc: stable Signed-off-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6878e7de6af726de47f9f3bec649c3f49e786586 Author: Dmitry Torokhov Date: Wed Sep 13 16:29:48 2017 -0700 driver core: suppress sending MODALIAS in UNBIND uevents The current udev rules cause modules to be loaded on all device events save for "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes issues, as driver modules that have devices bound to their drivers get immediately reloaded, and it appears to the user that module unloading doe snot work. The standard udev matching rule is foillowing: ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}" Given that MODALIAS data is not terribly useful for UNBIND event, let's zap it from the generated uevent environment until we get userspace updated with the correct udev rule that only loads modules on "add" event. Reported-by: Jakub Kicinski Tested-by: Jakub Kicinski Fixes: 1455cf8dbfd0 ("driver core: emit uevents when device is bound ...") Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman lib/kobject_uevent.c | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) commit aad8d097c9224be264939fc6c02a5570ea094f60 Author: Masahiro Yamada Date: Mon Sep 11 11:00:12 2017 +0200 nvmem: add missing of_node_put() in of_nvmem_cell_get() of_get_next_parent() increments the refcount of the returned node. It should be put when done. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 1 + 1 file changed, 1 insertion(+) commit 38b0774c0598c7a54b8499d18c2b764c35dc94ab Author: Guy Shapiro Date: Mon Sep 11 11:00:11 2017 +0200 nvmem: core: return EFBIG on out-of-range write When writing data that exceeds the nvmem size to a nvmem sysfs file using the sh redirection operator >, the shell hangs, trying to write the out-of-range bytes endlessly. Fix the problem by returning EFBIG described in man 2 write. Similar change was done for binary sysfs files on commit 0936896056365349afa867c16e9f9100a6707cbf Signed-off-by: Guy Shapiro Cc: linux-api@vger.kernel.org Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93dc1774d2a4c7a298d5cdf78cc8acdcb7b1428d Author: Willy Tarreau Date: Thu Sep 7 15:37:30 2017 +0200 auxdisplay: charlcd: properly restore atomic counter on error path Commit f4757af ("staging: panel: Fix single-open policy race condition") introduced in 3.19-rc1 attempted to fix a race condition on the open, but failed to properly do it and used to exit without restoring the semaphore. This results in -EBUSY being returned after the first open error until the module is reloaded or the system restarted (ie: consecutive to a dual open resulting in -EBUSY or to a permission error). [ Note for stable maintainers: the code moved from drivers/misc/panel.c to drivers/auxdisplay/{charlcd,panel}.c during 4.12. The patch easily applies there (modulo the renamed atomic counter) but I can provide a tested backport if desired. ] Fixes: f4757af85 # 3.19-rc1 Cc: stable@vger.kernel.org Cc: Mariusz Gorski Cc: Geert Uytterhoeven Cc: Miguel Ojeda Sandonis Signed-off-by: Willy Tarreau Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/charlcd.c | 11 +++++++++-- drivers/auxdisplay/panel.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) commit d53bebdf4d779497b29e1aad26e19cac1d446f42 Author: Xu YiPing Date: Tue Sep 5 10:21:52 2017 -0700 binder: fix memory corruption in binder_transaction binder commit 7a4408c6bd3e ("binder: make sure accesses to proc/thread are safe") made a change to enqueue tcomplete to thread->todo before enqueuing the transaction. However, in err_dead_proc_or_thread case, the tcomplete is directly freed, without dequeued. It may cause the thread->todo list to be corrupted. So, dequeue it before freeing. Fixes: 7a4408c6bd3e ("binder: make sure accesses to proc/thread are safe") Signed-off-by: Xu YiPing Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 1 + 1 file changed, 1 insertion(+) commit 52b81611f209da5f49019260522633e994e241b5 Author: Xu YiPing Date: Tue Sep 5 10:25:38 2017 -0700 binder: fix an ret value override commit 372e3147df70 ("binder: guarantee txn complete / errors delivered in-order") incorrectly defined a local ret value. This ret value will be invalid when out of the if block Fixes: 372e3147df70 ("binder: refactor binder ref inc/dec for thread safety") Signed-off-by: Xu YiPing Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 1 - 1 file changed, 1 deletion(-) commit 1c363eaece2752c5f8b1b874cb4ae435de06aa66 Author: Arnd Bergmann Date: Tue Sep 5 10:56:13 2017 +0200 android: binder: fix type mismatch warning Allowing binder to expose the 64-bit API on 32-bit kernels caused a build warning: drivers/android/binder.c: In function 'binder_transaction_buffer_release': drivers/android/binder.c:2220:15: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] fd_array = (u32 *)(parent_buffer + fda->parent_offset); ^ drivers/android/binder.c: In function 'binder_translate_fd_array': drivers/android/binder.c:2445:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] fd_array = (u32 *)(parent_buffer + fda->parent_offset); ^ drivers/android/binder.c: In function 'binder_fixup_parent': drivers/android/binder.c:2511:18: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] This adds extra type casts to avoid the warning. However, there is another problem with the Kconfig option: turning it on or off creates two incompatible ABI versions, a kernel that has this enabled cannot run user space that was built without it or vice versa. A better solution might be to leave the option hidden until the binder code is fixed to deal with both ABI versions. Fixes: e8d2ed7db7c3 ("Revert "staging: Fix build issues with new binder API"") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a931b9ce93841a5b66b709ba5a244276e345e63b Author: Guneshwor Singh Date: Thu Sep 14 17:49:40 2017 +0530 ALSA: compress: Remove unused variable Commit 04c5d5a430fc ("ALSA: compress: Embed struct device") removed the statement that used 'str' but didn't remove the variable itself. So remove it. [Adding stable to Cc since pr_debug() may refer to the uninitialized buffer -- tiwai] Fixes: 04c5d5a430fc ("ALSA: compress: Embed struct device") Signed-off-by: Guneshwor Singh Cc: Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe9c1c9555a529bf678148f719c1b9f1730f68a3 Author: Juergen Gross Date: Thu Sep 14 14:38:58 2017 +0200 xen: don't compile pv-specific parts if XEN_PV isn't configured xenbus_client.c contains some functions specific for pv guests. Enclose them with #ifdef CONFIG_XEN_PV to avoid compiling them when they are not needed (e.g. on ARM). Signed-off-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_client.c | 130 +++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 63 deletions(-) commit 73600b619bf8b9803a0610624a0e11f5ed8f761e Author: Corentin Labbe Date: Sat Sep 2 10:49:38 2017 +0200 mtd: nand: remove unused blockmask variable This patch fix the following build warning: drivers/mtd/nand/nand_base.c:2671:30: attention : variable ‘blockmask’ set but not used [-Wunused-but-set-variable] Fixes: 0b4773fd1649 ("mtd: nand: Drop unused cached programming support") Signed-off-by: Corentin Labbe Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 41ba8bd0829f5c210715ece8b0f699bed0da8eb5 Author: Jan H. Schönherr Date: Tue Sep 5 23:14:29 2017 +0200 PM / QoS: Use the correct variable to check the QoS request type Use the actual function argument for the validation of the request type, instead of the type field in a fresh (supposedly zero-initialized) request structure. Signed-off-by: Jan H. Schönherr Signed-off-by: Rafael J. Wysocki drivers/base/power/qos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 096a2c610df279d001a8f61faa3eb7f98ca6196b Author: Rafael Wysocki Date: Fri Sep 8 01:20:54 2017 +0200 ACPI / PMIC: Add code reviewers to MAINTAINERS Andy and Mika review code changes under drivers/acpi/pmic/ on a regular basis and I rely on their help with that, so add them as code reviwewers for that part of the kernel. Signed-off-by: Rafael J. Wysocki Acked-by: Lee Jones Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 74378c5c8cdaf0ce9f65e67cbd0613286f2c3bad Author: Geert Uytterhoeven Date: Tue Sep 5 20:16:27 2017 +0200 driver core: Fix link to device power management documentation Correct location as of commit 2728b2d2e5be4b82 (PM / core / docs: Convert sleep states API document to reST). Fixes: 2728b2d2e5be4b82 (PM / core / docs: Convert sleep states API document to reST) Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki include/linux/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c707c04f622a7a8570a8db6389e5a2310b92195 Merge: 2bd6bf0 5f90472 Author: Kalle Valo Date: Mon Sep 18 14:08:43 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-09-15' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes First set of fixes for 4.14 * A couple of bugzilla bugs related to multicast handling; * Two fixes for WoWLAN bugs that were causing queue hangs and re-initialization problems; * Two fixes for potential uninitialized variable use reported by Dan Carpenter in relation to a recently introduced patch; * A fix for buffer reordering in the newly supported 9000 device family; * Fix a race when starting aggregation; * Small fix for a recent patch to wake mac80211 queues; * Send non-bufferable management frames in the generic queue so they are not sent on queues that are under power-save; commit 13541226dc056fa3f54417ce12f18ba711a1591c Author: Vineet Gupta Date: Thu Aug 31 11:06:07 2017 -0700 ARC: reset: remove the misleading v1 suffix all over There is no plan yet to do a v2 board. And even if we were to do it only some IPs would actually change, so it be best to add suffixes at that point, not now ! Signed-off-by: Vineet Gupta Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/snps,hsdk-reset.txt | 28 +++++ .../bindings/reset/snps,hsdk-v1-reset.txt | 28 ----- MAINTAINERS | 6 +- drivers/reset/Kconfig | 6 +- drivers/reset/Makefile | 2 +- drivers/reset/reset-hsdk-v1.c | 137 --------------------- drivers/reset/reset-hsdk.c | 137 +++++++++++++++++++++ include/dt-bindings/reset/snps,hsdk-reset.h | 17 +++ include/dt-bindings/reset/snps,hsdk-v1-reset.h | 17 --- 9 files changed, 189 insertions(+), 189 deletions(-) commit 55168470835688e5da5828cdcf1b1498d7baadb1 Author: Felipe Balbi Date: Mon Sep 11 10:45:12 2017 +0300 usb: dwc3: ep0: fix DMA starvation by assigning req->trb on ep0 If we don't assign a TRB to ep0 requests, we won't be able to unmap the request later on resulting in starvation of DMA resources. Fixes: 4a71fcb8ac5f ("usb: dwc3: gadget: only unmap requests from DMA if mapped") Reported-by: Thinh Nguyen Tested-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 974d4d03fc020af4fa4e9e72a86f0fefa37803c5 Author: Stefan Wahren Date: Sun Sep 3 19:06:31 2017 +0200 staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist This fixes a NULL pointer dereference on RPi 2 with multi_v7_defconfig. The function page_address() could return NULL with enabled CONFIG_HIGHMEM. So fix this by using kmap() instead. Signed-off-by: Stefan Wahren Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver") Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5f5d0e20b6cecc0ebe6fc8e7df6f8823ad2d594 Author: Okash Khawaja Date: Tue Sep 5 12:51:59 2017 +0100 staging: speakup: fix speakup-r empty line lockup When cursor is at beginning of an empty or whitespace-only line and speakup-r typed, kernel locks up. This happens because deadlock of in input_event function over dev->event_lock, as demonstrated by lockdep logs. The reason for that is speakup simulates a down arrow - because cursor is at an empty line - while inside key press notifier handler which is ultimately triggered from input_event function. The simulated key press leads to input_event being called again, this time under its own context. So the spinlock is dev->event_lock is acquired while still being held. This patch ensures that key press is not simulated from inside key press notifier handler. Instead it delegates to cursor_timer. It starts the timer and passes RA_DOWN_ARROW as argument. When timer handler runs and sees RA_DOWN_ARROW, it will then call kbd_fakekey2(RA_DOWN_ARROW) which will correctly simulate the keypress inside timer context. When not inside key press notifier callback, the behaviour will remain the same as before this patch. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b72703e26b9478da531144ce5c4552dd22f1103d Author: Geert Uytterhoeven Date: Wed Sep 6 17:40:25 2017 +0200 staging: pi433: Move limit check to switch default to kill warning With gcc-4.1.2: drivers/staging/pi433/rf69.c: In function ‘rf69_set_dio_mapping’: drivers/staging/pi433/rf69.c:566: warning: ‘regaddr’ may be used uninitialized in this function drivers/staging/pi433/rf69.c:565: warning: ‘shift’ may be used uninitialized in this function drivers/staging/pi433/rf69.c:564: warning: ‘mask’ may be used uninitialized in this function While this is a false positive, it can easily be fixed by moving the limit check into the "default" case of the switch statement. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e1bf28868ab0bfd1fc73dd8d5e642d88456c30e9 Author: Colin Ian King Date: Fri Sep 8 14:55:06 2017 +0100 staging: r8822be: fix null pointer dereferences with a null driver_adapter The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on a null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null driver_adapter is passed instead. I should have spotted these with an earlier patch I sent, but I overlooked these in the rather large CoverityScan logs. Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565, CID#1454591, CID#1454598 ("Explicit null dereferenced") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 4 ++-- .../staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) commit a3563b09f132661d447f69224ef65fdec02f5c61 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: Greg Kroah-Hartman drivers/staging/mt29f_spinand/mt29f_spinand.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 056e4fc2018364ba01a23a1ced0ccbbdfa4520b3 Author: Arnd Bergmann Date: Fri Sep 15 21:23:13 2017 +0200 staging: unisys/visorbus: add __init/__exit annotations gcc-4.6 causes a harmless warning about the init function: WARNING: vmlinux.o(.text+0xed62c2): Section mismatch in reference from the function init_unisys() to the function .init.text:visorutil_spar_detect() The function init_unisys() references the function __init visorutil_spar_detect(). This is often because init_unisys lacks a __init annotation or the annotation of visorutil_spar_detect is wrong. It appears that newer versions inline visorutil_spar_detect(), end up with an empty __init section. This marks the module entry points as __init and __exit respectively, which avoids the warning and slightly reduces the runtime code size. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ab0b271bf75073cb254b5ea0593aceae5a42bd3 Author: Arnd Bergmann Date: Sat Sep 16 22:32:12 2017 +0200 isofs: fix build regression The new isofs_show_options() function fails to build when CONFIG_NLS is disabled: fs/isofs/inode.c: In function 'isofs_show_options': fs/isofs/inode.c:518:44: error: 'CONFIG_NLS_DEFAULT' undeclared (first use in this function) fs/isofs/inode.c:518:44: note: each undeclared identifier is reported only once for each function it appears in This adds a check for CONFIG_JOLIET (which selects NLS), matching the other uses of the iocharset handling in this file. Fixes: 6fecb86a44f5 ("isofs: Implement show_options") Signed-off-by: Arnd Bergmann Signed-off-by: Jan Kara fs/isofs/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit 0a51fb7174f2b7866b4d7a4a5c23b685b674beb6 Author: Konstantin Khlebnikov Date: Sat Sep 9 12:19:22 2017 +0300 quota: add missing lock into __dquot_transfer() Lock dq_dqb_lock around dquot_decr_inodes() Signed-off-by: Konstantin Khlebnikov Fixes: 7b9ca4c61bc2 ("quota: Reduce contention on dq_data_lock") Signed-off-by: Jan Kara fs/quota/dquot.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d6a7b99e3fa29b92d6288487e057e0a596bd2b0 Author: Andrew Pinski Date: Mon Sep 18 11:20:20 2017 +0100 arm64: ensure the kernel is compiled for LP64 The kernel needs to be compiled as a LP64 binary for ARM64, even when using a compiler that defaults to code-generation for the ILP32 ABI. Consequently, we need to explicitly pass '-mabi=lp64' (supported on gcc-4.9 and newer). Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney Signed-off-by: Catalin Marinas arch/arm64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) commit c73cc120a33e12e4e254b4b42bc613204ccb923b Author: Masahiro Yamada Date: Mon Sep 18 11:20:19 2017 +0100 arm64: relax assembly code alignment from 16 byte to 4 byte Aarch64 instructions must be word aligned. The current 16 byte alignment is more than enough. Relax it into 4 byte alignment. Signed-off-by: Masahiro Yamada Signed-off-by: Catalin Marinas arch/arm64/include/asm/linkage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e580b8bc4316cbb8bbffb5ed7bf1e477064755ed Author: Dave Martin Date: Mon Sep 18 09:40:12 2017 +0100 arm64: efi: Don't include EFI fpsimd save/restore code in non-EFI kernels __efi_fpsimd_begin()/__efi_fpsimd_end() are for use when making EFI calls only, so using them in non-EFI kernels is not allowed. This patch compiles them out if CONFIG_EFI is not set. Acked-by: Ard Biesheuvel Signed-off-by: Dave Martin Signed-off-by: Catalin Marinas arch/arm64/kernel/fpsimd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 17b694a5476de09e119c517dcc3b71eff6835bdf Author: Christophe JAILLET Date: Sun Sep 3 13:58:31 2017 +0200 mtd: nand: lpc32xx_mlc: Fix an error handling path in lpc32xx_nand_probe() If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock. Fixes: 4d26f012ab59 ("mtd: nand: lpc32xx_mlc: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET Signed-off-by: Boris Brezillon drivers/mtd/nand/lpc32xx_mlc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2a542bbb3081dbd64acc8929c140d196664c406 Author: Dmitry Fleytman Date: Tue Sep 5 11:40:56 2017 +0300 usb: Increase quirk delay for USB devices Commit e0429362ab15 ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") introduced quirk to workaround an issue with some Logitech webcams. The workaround is introducing delay for some USB operations. According to our testing, delay introduced by original commit is not long enough and in rare cases we still see issues described by the aforementioned commit. This patch increases delays introduced by original commit. Having this patch applied we do not see those problems anymore. Signed-off-by: Dmitry Fleytman Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 2 +- drivers/usb/core/hub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bbf26183b7a6236ba602f4d6a2f7cade35bba043 Author: Andrey Konovalov Date: Thu Sep 14 14:30:55 2017 +0200 uwb: properly check kthread_run return value uwbd_start() calls kthread_run() and checks that the return value is not NULL. But the return value is not NULL in case kthread_run() fails, it takes the form of ERR_PTR(-EINTR). Use IS_ERR() instead. Also add a check to uwbd_stop(). Signed-off-by: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/uwb/uwbd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 70e743e4cec3733dc13559f6184b35d358b9ef3f Author: Andrey Konovalov Date: Thu Sep 14 16:52:59 2017 +0200 uwb: ensure that endpoint is interrupt hwarc_neep_init() assumes that endpoint 0 is interrupt, but there's no check for that, which results in a WARNING in USB core code, when a bad USB descriptor is provided from a device: usb 1-1: BOGUS urb xfer, pipe 1 != type 3 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0 Modules linked in: CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.13.0+ #111 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event task: ffff88006bdc1a00 task.stack: ffff88006bde8000 RIP: 0010:usb_submit_urb+0xf8a/0x11d0 drivers/usb/core/urb.c:448 RSP: 0018:ffff88006bdee3c0 EFLAGS: 00010282 RAX: 0000000000000029 RBX: ffff8800672a7200 RCX: 0000000000000000 RDX: 0000000000000029 RSI: ffff88006c815c78 RDI: ffffed000d7bdc6a RBP: ffff88006bdee4c0 R08: fffffbfff0fe00ff R09: fffffbfff0fe00ff R10: 0000000000000018 R11: fffffbfff0fe00fe R12: 1ffff1000d7bdc7f R13: 0000000000000003 R14: 0000000000000001 R15: ffff88006b02cc90 FS: 0000000000000000(0000) GS:ffff88006c800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe4daddf000 CR3: 000000006add6000 CR4: 00000000000006f0 Call Trace: hwarc_neep_init+0x4ce/0x9c0 drivers/uwb/hwa-rc.c:710 uwb_rc_add+0x2fb/0x730 drivers/uwb/lc-rc.c:361 hwarc_probe+0x34e/0x9b0 drivers/uwb/hwa-rc.c:858 usb_probe_interface+0x351/0x8d0 drivers/usb/core/driver.c:361 really_probe drivers/base/dd.c:385 driver_probe_device+0x610/0xa00 drivers/base/dd.c:529 __device_attach_driver+0x230/0x290 drivers/base/dd.c:625 bus_for_each_drv+0x15e/0x210 drivers/base/bus.c:463 __device_attach+0x269/0x3c0 drivers/base/dd.c:682 device_initial_probe+0x1f/0x30 drivers/base/dd.c:729 bus_probe_device+0x1da/0x280 drivers/base/bus.c:523 device_add+0xcf9/0x1640 drivers/base/core.c:1703 usb_set_configuration+0x1064/0x1890 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:385 driver_probe_device+0x610/0xa00 drivers/base/dd.c:529 __device_attach_driver+0x230/0x290 drivers/base/dd.c:625 bus_for_each_drv+0x15e/0x210 drivers/base/bus.c:463 __device_attach+0x269/0x3c0 drivers/base/dd.c:682 device_initial_probe+0x1f/0x30 drivers/base/dd.c:729 bus_probe_device+0x1da/0x280 drivers/base/bus.c:523 device_add+0xcf9/0x1640 drivers/base/core.c:1703 usb_new_device+0x7b8/0x1020 drivers/usb/core/hub.c:2457 hub_port_connect drivers/usb/core/hub.c:4890 hub_port_connect_change drivers/usb/core/hub.c:4996 port_event drivers/usb/core/hub.c:5102 hub_event+0x23c8/0x37c0 drivers/usb/core/hub.c:5182 process_one_work+0x9fb/0x1570 kernel/workqueue.c:2097 worker_thread+0x1e4/0x1350 kernel/workqueue.c:2231 kthread+0x324/0x3f0 kernel/kthread.c:231 ret_from_fork+0x25/0x30 arch/x86/entry/entry_64.S:425 Code: 48 8b 85 30 ff ff ff 48 8d b8 98 00 00 00 e8 8e 93 07 ff 45 89 e8 44 89 f1 4c 89 fa 48 89 c6 48 c7 c7 a0 e5 55 86 e8 20 08 8f fd <0f> ff e9 9b f7 ff ff e8 4a 04 d6 fd e9 80 f7 ff ff e8 60 11 a6 ---[ end trace 55d741234124cfc3 ]--- Check that endpoint is interrupt. Found by syzkaller. Signed-off-by: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/uwb/hwa-rc.c | 2 ++ 1 file changed, 2 insertions(+) commit fc9655e65160936e32adae0d0e8aae25eb12c4e0 Author: Eugeniy Paltsev Date: Thu Sep 14 12:49:41 2017 +0200 ARC: reset: add missing DT binding documentation for HSDKv1 reset driver When applying the original patch [1], the DT binding docs were lost. This patch adds them back. [1] https://patchwork.kernel.org/patch/9852997/ Fixes: e0be864f1424 ("ARC: reset: introduce HSDKv1 reset driver") Signed-off-by: Eugeniy Paltsev Signed-off-by: Philipp Zabel .../bindings/reset/snps,hsdk-v1-reset.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 2d48a237c8b61b457d146310d7e1e61224d0ca56 Author: Thomas Meyer Date: Sat Sep 9 06:02:46 2017 +0200 ARC: reset: Only build on archs that have IOMEM This avoids the error: drivers/reset/reset-hsdk-v1.o: In function `hsdkv1_reset_probe': /home/thomas/git/linux/drivers/reset/reset-hsdk-v1.c:101: undefined reference to `devm_ioremap_resource' collect2: error: ld returned 1 exit status Signed-off-by: Thomas Meyer Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 837ddc4793a69b256ac5e781a5e729b448a8d983 Author: Henryk Heisig Date: Mon Sep 11 17:57:34 2017 +0200 USB: serial: option: add support for TP-Link LTE module This commit adds support for TP-Link LTE mPCIe module is used in in TP-Link MR200v1, MR6400v1 and v2 routers. Signed-off-by: Henryk Heisig Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit a6c215e21b0dc5fe9416dce90f9acc2ea53c4502 Author: Jeffrey Chu Date: Fri Sep 8 21:08:58 2017 +0000 USB: serial: ftdi_sio: add id for Cypress WICED dev board Add CYPRESS_VID vid and CYPRESS_WICED_BT_USB and CYPRESS_WICED_WL_USB device IDs to ftdi_sio driver. Signed-off-by: Jeffrey Chu Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 2 ++ drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++ 2 files changed, 9 insertions(+) commit 093d79f62a89f47d9b5fd0746768146d9696535c Author: Alexandre Belloni Date: Thu Aug 24 13:44:54 2017 +0200 ARM: at91: Replace uses of virt_to_phys with __pa_symbol The PM code wrongly uses virt_to_phys() instead of __pa_symbol() and was not updated by commit 64fc2a947a98 ("ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol") because it was not yet in tree. Signed-off-by: Alexandre Belloni Signed-off-by: Nicolas Ferre arch/arm/mach-at91/pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e025a3ac3460275bf86a4c5d02857eee14db4247 Author: Nicolas Ferre Date: Thu Sep 14 17:28:14 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: fix USB host vbus The USB host has 3 ports so we must specify the entries for each in the atmel,vbus-gpio property. The specified pin (PA27) is the vbus for USBB and not USBA. Signed-off-by: Nicolas Ferre [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5f506faa0de810f07af9345826fd588f61bb3b2f Author: Ludovic Desroches Date: Thu Sep 14 17:28:13 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: fix typos Fix typos that prevent proper using of uart2 and uart4 devices. Signed-off-by: Ludovic Desroches Signed-off-by: Claudiu Beznea Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27563cd9f8f52f09523e061985917c38f302bd0c Author: Ludovic Desroches Date: Thu Sep 14 17:28:12 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: update pinmux/pinconf for LEDs and USB There are some changes from the prototype board concerning LEDs and USB pins: - USBB power enable and red LED pins are inverted. - The polarity of LEDs is inverted too. Signed-off-by: Ludovic Desroches Signed-off-by: Claudiu Beznea Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bfa4133795e5a0badd402dd3f58b13b3cec64a4b Author: Cyrille Pitchen Date: Wed Sep 6 23:45:02 2017 +0200 mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp() spi_nor_read_sfdp() calls nor->read() to read the SFDP data. When the m25p80 driver is used (pretty common case), nor->read() is then implemented by the m25p80_read() function, which is likely to initialize a 'struct spi_transfer' from its buf argument before appending this structure inside the 'struct spi_message' argument of spi_sync(). Besides the SPI sub-system states that both .tx_buf and .rx_buf members of 'struct spi_transfer' must point into dma-safe memory. However, two of the three calls of spi_nor_read_sfdp() were given pointers to stack allocated memory as buf argument, hence not in a dma-safe area. Hopefully, the third and last call of spi_nor_read_sfdp() was already given a kmalloc'ed buffer argument, hence dma-safe. So this patch fixes this issue by introducing a spi_nor_read_sfdp_dma_unsafe() function which simply wraps the existing spi_nor_read_sfdp() function and uses some kmalloc'ed memory as a bounce buffer. Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Reported-by: Geert Uytterhoeven Signed-off-by: Cyrille Pitchen Signed-off-by: Boris Brezillon drivers/mtd/spi-nor/spi-nor.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) commit b8f3911610529ba531b99d1e109c7a40fb071f0a Author: Boris Brezillon Date: Tue Sep 12 15:10:35 2017 +0200 mtd: spi-nor: Check consistency of the memory size extracted from the SFDP One field of the flash parameter table contains information about the flash device size. Most of the time the data extracted from this field is valid, but sometimes the BFPT section of the SFDP table is corrupted or invalid and this field is set to 0xffffffff, thus resulting in an integer overflow when setting params->size. Since NOR devices are anayway always smaller than 2^64 bytes, we can easily stop the BFPT parsing if the size reported in this table is invalid. Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Reported-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon Tested-by: Geert Uytterhoeven Acked-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8fce3dc5c5d6f6301f67311fa79f333902b58cea Author: Arnd Bergmann Date: Fri Sep 15 21:42:59 2017 +0200 clocksource/integrator: Fix section mismatch warning gcc-4.6 and older fail to inline integrator_clocksource_init, so they end up showing a harmless warning: WARNING: vmlinux.o(.text+0x4aa94c): Section mismatch in reference from the function integrator_clocksource_init() to the function .init.text:clocksource_mmio_init() The function integrator_clocksource_init() references the function __init clocksource_mmio_init(). This is often because integrator_clocksource_init lacks a __init annotation or the annotation of clocksource_mmio_init is wrong. Add the missing __init annotation that makes it build cleanly with all compilers. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Thierry Reding Cc: Linus Walleij Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/20170915194310.1170514-1-arnd@arndb.de drivers/clocksource/timer-integrator-ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 134dd2e616b9cd8300c08cd1b38987ded74f662f Merge: 2bd6bf0 1fabbf7 Author: Dave Airlie Date: Mon Sep 18 16:29:47 2017 +1000 Merge tag 'drm-amdkfd-next-2017-09-02' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes some trivial amdkfd cleanups * tag 'drm-amdkfd-next-2017-09-02' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: pass queue's mqd when destroying mqd drm/amdkfd: remove memset before memcpy uapi linux/kfd_ioctl.h: only use __u32 and __u64 commit 94a9daeaece415ce37ccb413b49a580e68e3477b Author: Steve French Date: Tue Sep 12 18:13:11 2017 -0500 Update version of cifs module Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1368f155a972eab037f81b5dea82afd544227552 Author: Arnd Bergmann Date: Tue Sep 5 11:24:15 2017 +0200 cifs: hide unused functions The newly added SMB2+ attribute support causes unused function warnings when CONFIG_CIFS_XATTR is disabled: fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function] smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function] smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon, This adds another #ifdef around the affected functions. Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+") Fixes: 95907fea4fd8 ("cifs: Add support for reading attributes on SMB2+") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Steve French fs/cifs/smb2ops.c | 2 ++ 1 file changed, 2 insertions(+) commit 9764c02fcbad40001fd3f63558d918e4d519bb75 Author: Steve French Date: Sun Sep 17 10:41:35 2017 -0500 SMB3: Add support for multidialect negotiate (SMB2.1 and later) With the need to discourage use of less secure dialect, SMB1 (CIFS), we temporarily upgraded the dialect to SMB3 in 4.13, but since there are various servers which only support SMB2.1 (2.1 is more secure than CIFS/SMB1) but not optimal for a default dialect - add support for multidialect negotiation. cifs.ko will now request SMB2.1 or later (ie SMB2.1 or SMB3.0, SMB3.02) and the server will pick the latest most secure one it can support. In addition since we are sending multidialect negotiate, add support for secure negotiate to validate that a man in the middle didn't downgrade us. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable # 4.13+ fs/cifs/cifsglob.h | 6 ++++ fs/cifs/connect.c | 24 ++++++++++----- fs/cifs/smb2ops.c | 40 +++++++++++++++++++++++++ fs/cifs/smb2pdu.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++------- fs/cifs/smb2pdu.h | 2 +- 5 files changed, 139 insertions(+), 18 deletions(-) commit a2048e34d4655c06d31400646ae495bbfeb16b27 Author: Thomas Garnier Date: Thu Sep 7 08:30:47 2017 -0700 arm64/syscalls: Move address limit check in loop A bug was reported on ARM where set_fs might be called after it was checked on the work pending function. ARM64 is not affected by this bug but has a similar construct. In order to avoid any similar problems in the future, the addr_limit_user_check function is moved at the beginning of the loop. Fixes: cf7de27ab351 ("arm64/syscalls: Check address limit on user-mode return") Reported-by: Leonard Crestez Signed-off-by: Thomas Garnier Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Pratyush Anand Cc: Dave Martin Cc: Will Drewry Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Andy Lutomirski Cc: David Howells Cc: Dave Hansen Cc: Al Viro Cc: linux-api@vger.kernel.org Cc: Yonghong Song Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1504798247-48833-5-git-send-email-keescook@chromium.org arch/arm64/kernel/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e33f8d32677fa4f4f8996ef46748f86aac81ccff Author: Thomas Garnier Date: Thu Sep 7 08:30:46 2017 -0700 arm/syscalls: Optimize address limit check Disable the generic address limit check in favor of an architecture specific optimized implementation. The generic implementation using pending work flags did not work well with ARM and alignment faults. The address limit is checked on each syscall return path to user-mode path as well as the irq user-mode return function. If the address limit was changed, a function is called to report data corruption (stopping the kernel or process based on configuration). The address limit check has to be done before any pending work because they can reset the address limit and the process is killed using a SIGKILL signal. For example the lkdtm address limit check does not work because the signal to kill the process will reset the user-mode address limit. Signed-off-by: Thomas Garnier Signed-off-by: Kees Cook Tested-by: Kees Cook Tested-by: Leonard Crestez Reviewed-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Pratyush Anand Cc: Dave Martin Cc: Will Drewry Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Andy Lutomirski Cc: David Howells Cc: Dave Hansen Cc: Al Viro Cc: linux-api@vger.kernel.org Cc: Yonghong Song Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1504798247-48833-4-git-send-email-keescook@chromium.org arch/arm/kernel/entry-common.S | 11 +++++++++++ arch/arm/kernel/signal.c | 7 +++++++ 2 files changed, 18 insertions(+) commit 2404269bc4e77a67875c8db6667be34c9913c96e Author: Thomas Garnier Date: Thu Sep 7 08:30:45 2017 -0700 Revert "arm/syscalls: Check address limit on user-mode return" This reverts commit 73ac5d6a2b6ac3ae8d1e1818f3e9946f97489bc9. The work pending loop can call set_fs after addr_limit_user_check removed the _TIF_FSCHECK flag. This may happen at anytime based on how ARM handles alignment exceptions. It leads to an infinite loop condition. After discussion, it has been agreed that the generic approach is not tailored to the ARM architecture and any fix might not be complete. This patch will be replaced by an architecture specific implementation. The work flag approach will be kept for other architectures. Reported-by: Leonard Crestez Signed-off-by: Thomas Garnier Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Pratyush Anand Cc: Dave Martin Cc: Will Drewry Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Andy Lutomirski Cc: David Howells Cc: Dave Hansen Cc: Al Viro Cc: linux-api@vger.kernel.org Cc: Yonghong Song Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1504798247-48833-3-git-send-email-keescook@chromium.org arch/arm/include/asm/thread_info.h | 15 ++++++--------- arch/arm/include/asm/uaccess.h | 2 -- arch/arm/kernel/entry-common.S | 9 ++------- arch/arm/kernel/signal.c | 5 ----- 4 files changed, 8 insertions(+), 23 deletions(-) commit bf29ed1567b67854dc13504f685c45a2ea9b2081 Author: Thomas Garnier Date: Thu Sep 7 08:30:44 2017 -0700 syscalls: Use CHECK_DATA_CORRUPTION for addr_limit_user_check Use CHECK_DATA_CORRUPTION instead of BUG_ON to provide more flexibility on address limit failures. By default, send a SIGKILL signal to kill the current process preventing exploitation of a bad address limit. Make the TIF_FSCHECK flag optional so ARM can use this function. Signed-off-by: Thomas Garnier Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Pratyush Anand Cc: Dave Martin Cc: Will Drewry Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Andy Lutomirski Cc: David Howells Cc: Dave Hansen Cc: Al Viro Cc: linux-api@vger.kernel.org Cc: Yonghong Song Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1504798247-48833-2-git-send-email-keescook@chromium.org include/linux/syscalls.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4ba55e65f471d011d3ba2ac2022180ea0877d68e Author: Andy Lutomirski Date: Sun Sep 17 09:03:51 2017 -0700 x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs For unknown historical reasons (i.e. Borislav doesn't recall), 32-bit kernels invoke cpu_init() on secondary CPUs with initial_page_table loaded into CR3. Then they set current->active_mm to &init_mm and call enter_lazy_tlb() before fixing CR3. This means that the x86 TLB code gets invoked while CR3 is inconsistent, and, with the improved PCID sanity checks I added, we warn. Fix it by loading swapper_pg_dir (i.e. init_mm.pgd) earlier. Reported-by: Paul Menzel Reported-by: Pavel Machek Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 72c0098d92ce ("x86/mm: Reinitialize TLB state on hotplug and resume") Link: http://lkml.kernel.org/r/30cdfea504682ba3b9012e77717800a91c22097f.1505663533.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b8b7abaed7a49b350f8ba659ddc264b04931d581 Author: Andy Lutomirski Date: Sun Sep 17 09:03:50 2017 -0700 x86/mm/32: Move setup_clear_cpu_cap(X86_FEATURE_PCID) earlier Otherwise we might have the PCID feature bit set during cpu_init(). This is just for robustness. I haven't seen any actual bugs here. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: cba4671af755 ("x86/mm: Disable PCID on 32-bit kernels") Link: http://lkml.kernel.org/r/b16dae9d6b0db5d9801ddbebbfd83384097c61f3.1505663533.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/bugs.c | 8 -------- arch/x86/kernel/cpu/common.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 52a2af400c1075219b3f0ce5c96fc961da44018a Author: Andy Lutomirski Date: Sun Sep 17 09:03:49 2017 -0700 x86/mm/64: Stop using CR3.PCID == 0 in ASID-aware code Putting the logical ASID into CR3's PCID bits directly means that we have two cases to consider separately: ASID == 0 and ASID != 0. This means that bugs that only hit in one of these cases trigger nondeterministically. There were some bugs like this in the past, and I think there's still one in current kernels. In particular, we have a number of ASID-unware code paths that save CR3, write some special value, and then restore CR3. This includes suspend/resume, hibernate, kexec, EFI, and maybe other things I've missed. This is currently dangerous: if ASID != 0, then this code sequence will leave garbage in the TLB tagged for ASID 0. We could potentially see corruption when switching back to ASID 0. In principle, an initialize_tlbstate_and_flush() call after these sequences would solve the problem, but EFI, at least, does not call this. (And it probably shouldn't -- initialize_tlbstate_and_flush() is rather expensive.) Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/cdc14bbe5d3c3ef2a562be09a6368ffe9bd947a6.1505663533.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 47061a24e2ee5bd8a40d473d47a5bd823fa0081f Author: Andy Lutomirski Date: Sun Sep 17 09:03:48 2017 -0700 x86/mm: Factor out CR3-building code Current, the code that assembles a value to load into CR3 is open-coded everywhere. Factor it out into helpers build_cr3() and build_cr3_noflush(). This makes one semantic change: __get_current_cr3_fast() was wrong on SME systems. No one noticed because the only caller is in the VMX code, and there are no CPUs with both SME and VMX. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Link: http://lkml.kernel.org/r/ce350cf11e93e2842d14d0b95b0199c7d881f527.1505663533.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 15 +++++++++++---- arch/x86/mm/tlb.c | 11 +++++------ 2 files changed, 16 insertions(+), 10 deletions(-) commit ec11653b531099ddc08a8c7eb495ab83cae84e19 Author: Steve French Date: Thu Sep 14 14:51:20 2017 -0500 CIFS/SMB3: Update documentation to reflect SMB3 and various changes Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Documentation/filesystems/cifs/AUTHORS | 5 ++ Documentation/filesystems/cifs/README | 81 ++++++++++++++++----------------- Documentation/filesystems/cifs/TODO | 72 ++++++++++++++--------------- Documentation/filesystems/cifs/cifs.txt | 24 ++++++---- 4 files changed, 91 insertions(+), 91 deletions(-) commit 6d57339890c9a9dfcd4ba4f8931b911b962968e3 Author: Arnd Bergmann Date: Fri Sep 15 17:08:16 2017 +0200 dma-coherent: fix rmem_dma_device_init regression My recent bug fix introduced another bug, which caused rmem_dma_device_init to always fail, as rmem->priv is never set to anything. This restores the previous behavior, calling dma_init_coherent_memory() whenever ->priv is NULL. Fixes: d35b0996fef3 ("dma-coherent: fix dma_declare_coherent_memory() logic error") Reported-by: Roy Pledge Tested-by: Roy Pledge Signed-off-by: Arnd Bergmann Signed-off-by: Christoph Hellwig drivers/base/dma-coherent.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 0666f560b71b899cd11a7caf39fd45129e9030fd Merge: e77d3b0 fd7d562 Author: Linus Torvalds Date: Sun Sep 17 08:16:36 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc fixes from Thomas Gleixner: - A fix for a user space regression in /proc/$PID/stat - A couple of objtool fixes: ~ Plug a memory leak ~ Avoid accessing empty sections which upsets certain binutil versions ~ Prevent corrupting the obj file when section sizes did not change * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fs/proc: Report eip/esp in /prod/PID/stat for coredumping objtool: Fix object file corruption objtool: Do not retrieve data from empty sections objtool: Fix memory leak in elf_create_rela_section() commit e77d3b0c4a6a973872652601aae35d4ab1785fb4 Merge: c44d1ac 9cb067e Author: Linus Torvalds Date: Sun Sep 17 08:15:11 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "Fix for an off by one error in a cpumask result comparison" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix cpumask check in __irq_startup_managed() commit c44d1ac0c38e24e6463a02fef315ec0b73304b96 Merge: 2bd6bf0 f7f3dc0 Author: Linus Torvalds Date: Sun Sep 17 08:05:54 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "A single fix addressing the missing CP8 feature bit in CPUID for a range of AMD ZEN models/mask revisions" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/AMD: Fix erratum 1076 (CPB bit) commit a231d2783c332ef3e3ba238e82dbe599ff41ba14 Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:09 2017 +0800 ARM: dts: sun6i: Fix endpoint IDs in second display pipeline When the second display pipeline device nodes for the A31/A31s were added, it was not known that the TCONs could (through either DRCs) select either backend as their input. Thus in the endpoints connecting these components together, the endpoint IDs were set to 0, while in fact they should have been set to 1. Cc: Fixes: 9a26882a7378 ("ARM: dts: sun6i: Add second display pipeline device nodes") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3f241bfa60bdc9c4fde63fa6664a8ce00fd668c6 Author: Jagan Teki Date: Sat Aug 12 11:10:02 2017 +0530 arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0 Since current tree support AXP803 regulators, replace fixed regulator with AXP803 dcdc1 regulator. Tested on pine64. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 00e6751ffc9e6e0651e514961316fd15f0409683 Author: Elaine Zhang Date: Fri Sep 1 10:01:46 2017 +0800 clk: rockchip: add sclk_timer5 as critical clock on rk3128 sclk_timer5 is for arm arch counter, so need always on. but no dts node to handle this clk, so make it as critical clock Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3128.c | 1 + 1 file changed, 1 insertion(+) commit a4eb286565eb07ee5acfe6a1409f68ad9f663845 Author: Elaine Zhang Date: Fri Sep 1 10:01:45 2017 +0800 clk: rockchip: fix up rk3128 pvtm and mipi_24m gate regs error A copy-paste error made them use the wrong bits in the register. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3128.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e8620acc90785ecbde041d241a13778044df9208 Author: Elaine Zhang Date: Fri Sep 1 10:01:44 2017 +0800 clk: rockchip: add pclk_pmu as critical clock on rk3128 pclk_pmu need always on, and no dts node to handle this clk, so make it as critical clock Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3128.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6354a06cbaa8c49d8377a6cee3e7db399c23601c Author: Heiko Stuebner Date: Wed Sep 13 09:38:40 2017 +0200 Revert "arm64: dts: rockchip: Add basic cpu frequencies for RK3368" This reverts commit 6f2dea1f5fdb73eb2e050d9ebe990121d557e519. Without accurate cpu regulators being set for boards this will wreak havoc when cpufreq-dt begins to set new frequencies without adjusting the core frequency. Additionally the rk3368 has an unsolved issue in that it has two separate cpu clusters with separate clock lines but only one cpu supply regulator for both clusters, which causes even more problems. While it seems that originally only one cluster was supposed to be active at a time (big or little), talking with real users of the hardware revealed that having all 8 cores accessible at 1.2GHz max is way more liked than having 4 cores at 1.5GHz max. Such an approach needs changes to cpufreq and/or opp though to control the two separate clock lines when setting both clusters to the same frequencies. In any case, having the OPPs in the dts at this point in time is undesireable, so remove them again for now. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 72 +------------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e Author: Linus Torvalds Date: Sat Sep 16 15:47:51 2017 -0700 Linux 4.14-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 194a4ef902220f34c1ce0d7a46f5e2c3ebe6c86c Merge: 2896b80e 89b68cd Author: Linus Torvalds Date: Sat Sep 16 12:08:10 2017 -0700 Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs Pull UBI updates from Richard Weinberger: "Minor improvements" * tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs: UBI: Fix two typos in comments ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate" ubi: pr_err() strings should end with newlines ubi: pr_err() strings should end with newlines ubi: pr_err() strings should end with newlines commit 2896b80e002df4ab268577c1eb806d7f7ebaf95e Merge: 48bddb1 6d20e6b Author: Linus Torvalds Date: Sat Sep 16 12:03:25 2017 -0700 Merge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - minor improvements - fixes for Debian's new gcc defaults (pie enabled by default) - fixes for XSTATE/XSAVE to make UML work again on modern systems * 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: return negative in tuntap_open_tramp() um: remove a stray tab um: Use relative modversions with LD_SCRIPT_DYN um: link vmlinux with -no-pie um: Fix CONFIG_GCOV for modules. Fix minor typos and grammar in UML start_up help um: defconfig: Cleanup from old Kconfig options um: Fix FP register size for XSTATE/XSAVE commit 48bddb143befb1dd93c0e5a66af62cfd60c86b04 Merge: c850372 8e29f97 Author: Linus Torvalds Date: Sat Sep 16 11:28:59 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger. 2) Fix double-free in rmnet driver, from Dan Carpenter. 3) INET connection socket layer can double put request sockets, fix from Eric Dumazet. 4) Don't match collect metadata-mode tunnels if the device is down, from Haishuang Yan. 5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in be2net driver, from Suresh Reddy. 6) Fix scaling error in gen_estimator, from Eric Dumazet. 7) Fix 64-bit statistics deadlock in systemport driver, from Florian Fainelli. 8) Fix use-after-free in sctp_sock_dump, from Xin Long. 9) Reject invalid BPF_END instructions in verifier, from Edward Cree. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits) mlxsw: spectrum_router: Only handle IPv4 and IPv6 events Documentation: link in networking docs tcp: fix data delivery rate bpf/verifier: reject BPF_ALU64|BPF_END sctp: do not mark sk dumped when inet_sctp_diag_fill returns err sctp: fix an use-after-free issue in sctp_sock_dump netvsc: increase default receive buffer size tcp: update skb->skb_mstamp more carefully net: ipv4: fix l3slave check for index returned in IP_PKTINFO net: smsc911x: Quieten netif during suspend net: systemport: Fix 64-bit stats deadlock net: vrf: avoid gcc-4.6 warning qed: remove unnecessary call to memset tg3: clean up redundant initialization of tnapi tls: make tls_sw_free_resources static sctp: potential read out of bounds in sctp_ulpevent_type_enabled() MAINTAINERS: review Renesas DT bindings as well net_sched: gen_estimator: fix scaling error in bytes/packets samples nfp: wait for the NSP resource to appear on boot nfp: wait for board state before talking to the NSP ... commit c8503720fd0b952ff25bcc49b6eb9c492e22f3c6 Merge: df85b2d bbc8608 Author: Linus Torvalds Date: Sat Sep 16 11:24:26 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: "A second round of updates for the input subsystem: - a new driver for PWM-controlled vibrators - ucb1400 touchscreen driver had completely busted suspend/resume handling - we now handle "home" button found on some devices with Goodix touchscreens - assorted other fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Gigabyte P57 to the keyboard reset table Input: xpad - validate USB endpoint type during probe Input: ucb1400_ts - fix suspend and resume handling Input: edt-ft5x06 - fix access to non-existing register Input: elantech - make arrays debounce_packet static, reduces object code size Input: surface3_spi - make const array header static, reduces object code size Input: goodix - add support for capacitive home button Input: add a driver for PWM controllable vibrators Input: adi - make array seq static, reduces object code size commit 9cb067ef8a10bb13112e4d1c0ea996ec96527422 Author: Thomas Gleixner Date: Wed Sep 13 23:29:03 2017 +0200 genirq: Fix cpumask check in __irq_startup_managed() The result of cpumask_any_and() is invalid when result greater or equal nr_cpu_ids. The current check is checking for greater only. Fix it. Fixes: 761ea388e8c4 ("genirq: Handle managed irqs gracefully in irq_startup()") Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Tony Luck Cc: Chen Yu 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: stable@vger.kernel.org Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: http://lkml.kernel.org/r/20170913213152.272283444@linutronix.de kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df85b2d767aad90fd2746f993fcd66dd322768f8 Author: Markus Trippelsdorf Date: Sat Sep 16 11:01:16 2017 +0200 firmware: Restore support for built-in firmware Commit 5620a0d1aac ("firmware: delete in-kernel firmware") removed the entire firmware directory. Unfortunately it thereby also removed the support for built-in firmware. This restores the ability to build firmware directly into the kernel by pruning the original Makefile to the necessary minimum. The default for EXTRA_FIRMWARE_DIR is now the standard directory /lib/firmware/. Fixes: 5620a0d1aac ("firmware: delete in-kernel firmware") Signed-off-by: Markus Trippelsdorf Acked-by: Greg K-H Signed-off-by: Linus Torvalds Makefile | 2 +- drivers/base/Kconfig | 5 +---- firmware/.gitignore | 6 +++++ firmware/Makefile | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 5 deletions(-) commit 8e29f97979c300406c21994986bdfcdb67fe4ff7 Author: Ido Schimmel Date: Fri Sep 15 15:31:07 2017 +0200 mlxsw: spectrum_router: Only handle IPv4 and IPv6 events The driver doesn't support events from address families other than IPv4 and IPv6, so ignore them. Otherwise, we risk queueing a work item before it's initialized. This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES is enabled, as the VRF driver will try to add an l3mdev rule for the IPMR family. Fixes: 65e65ec137f4 ("mlxsw: spectrum_router: Don't ignore IPv6 notifications") Signed-off-by: Ido Schimmel Reported-by: Andreas Rammhold Reported-by: Florian Klink 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 2130c0281608a109653272902e4d00b45bf00571 Author: Pavel Machek Date: Sat Sep 16 16:28:02 2017 +0200 Documentation: link in networking docs Fix link in filter.txt. Acked-by: Pavel Machek Signed-off-by: David S. Miller Documentation/networking/filter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc22579917eb7e13433448a342f1cb1592920940 Author: Eric Dumazet Date: Fri Sep 15 16:47:42 2017 -0700 tcp: fix data delivery rate Now skb->mstamp_skb is updated later, we also need to call tcp_rate_skb_sent() after the update is done. Fixes: 8c72c65b426b ("tcp: update skb->skb_mstamp more carefully") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7318413077a5141a50a753b1fab687b7907eef16 Merge: 8d93c7a 35eed7c Author: Linus Torvalds Date: Fri Sep 15 20:43:33 2017 -0700 Merge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from Ralf Baechle: "This is the main pull request for 4.14 for MIPS; below a summary of the non-merge commits: CM: - Rename mips_cm_base to mips_gcr_base - Specify register size when generating accessors - Use BIT/GENMASK for register fields, order & drop shifts - Add cluster & block args to mips_cm_lock_other() CPC: - Use common CPS accessor generation macros - Use BIT/GENMASK for register fields, order & drop shifts - Introduce register modify (set/clear/change) accessors - Use change_*, set_* & clear_* where appropriate - Add CM/CPC 3.5 register definitions - Use GlobalNumber macros rather than magic numbers - Have asm/mips-cps.h include CM & CPC headers - Cluster support for topology functions - Detect CPUs in secondary clusters CPS: - Read GIC_VL_IDENT directly, not via irqchip driver DMA: - Consolidate coherent and non-coherent dma_alloc code - Don't use dma_cache_sync to implement fd_cacheflush FPU emulation / FP assist code: - Another series of 14 commits fixing corner cases such as NaN propgagation and other special input values. - Zero bits 32-63 of the result for a CLASS.D instruction. - Enhanced statics via debugfs - Do not use bools for arithmetic. GCC 7.1 moans about this. - Correct user fault_addr type Generic MIPS: - Enhancement of stack backtraces - Cleanup from non-existing options - Handle non word sized instructions when examining frame - Fix detection and decoding of ADDIUSP instruction - Fix decoding of SWSP16 instruction - Refactor handling of stack pointer in get_frame_info - Remove unreachable code from force_fcr31_sig() - Convert to using %pOF instead of full_name - Remove the R6000 support. - Move FP code from *_switch.S to *_fpu.S - Remove unused ST_OFF from r2300_switch.S - Allow platform to specify multiple its.S files - Add #includes to various files to ensure code builds reliable and without warning.. - Remove __invalidate_kernel_vmap_range - Remove plat_timer_setup - Declare various variables & functions static - Abstract CPU core & VP(E) ID access through accessor functions - Store core & VP IDs in GlobalNumber-style variable - Unify checks for sibling CPUs - Add CPU cluster number accessors - Prevent direct use of generic_defconfig - Make CONFIG_MIPS_MT_SMP default y - Add __ioread64_copy - Remove unnecessary inclusions of linux/irqchip/mips-gic.h GIC: - Introduce asm/mips-gic.h with accessor functions - Use new GIC accessor functions in mips-gic-timer - Remove counter access functions from irq-mips-gic.c - Remove gic_read_local_vp_id() from irq-mips-gic.c - Simplify shared interrupt pending/mask reads in irq-mips-gic.c - Simplify gic_local_irq_domain_map() in irq-mips-gic.c - Drop gic_(re)set_mask() functions in irq-mips-gic.c - Remove gic_set_polarity(), gic_set_trigger(), gic_set_dual_edge(), gic_map_to_pin() and gic_map_to_vpe() from irq-mips-gic.c. - Convert remaining shared reg access, local int mask access and remaining local reg access to new accessors - Move GIC_LOCAL_INT_* to asm/mips-gic.h - Remove GIC_CPU_INT* macros from irq-mips-gic.c - Move various definitions to the driver - Remove gic_get_usm_range() - Remove __gic_irq_dispatch() forward declaration - Remove gic_init() - Use mips_gic_present() in place of gic_present and remove gic_present - Move gic_get_c0_*_int() to asm/mips-gic.h - Remove linux/irqchip/mips-gic.h - Inline __gic_init() - Inline gic_basic_init() - Make pcpu_masks a per-cpu variable - Use pcpu_masks to avoid reading GIC_SH_MASK* - Clean up mti, reserved-cpu-vectors handling - Use cpumask_first_and() in gic_set_affinity() - Let the core set struct irq_common_data affinity microMIPS: - Fix microMIPS stack unwinding on big endian systems MIPS-GIC: - SYNC after enabling GIC region NUMA: - Remove the unused parent_node() macro R6: - Constify r2_decoder_tables - Add accessor & bit definitions for GlobalNumber SMP: - Constify smp ops - Allow boot_secondary SMP op to return errors VDSO: - Drop gic_get_usm_range() usage - Avoid use of linux/irqchip/mips-gic.h Platform changes: Alchemy: - Add devboard machine type to cpuinfo - update cpu feature overrides - Threaded carddetect irqs for devboards AR7: - allow NULL clock for clk_get_rate BCM63xx: - Fix ENETDMA_6345_MAXBURST_REG offset - Allow NULL clock for clk_get_rate CI20: - Enable GPIO and RTC drivers in defconfig - Add ethernet and fixed-regulator nodes to DTS Generic platform: - Move Boston and NI 169445 FIT image source to their own files - Include asm/bootinfo.h for plat_fdt_relocated() - Include asm/time.h for get_c0_*_int() - Include asm/bootinfo.h for plat_fdt_relocated() - Include asm/time.h for get_c0_*_int() - Allow filtering enabled boards by requirements - Don't explicitly disable CONFIG_USB_SUPPORT - Bump default NR_CPUS to 16 JZ4700: - Probe the jz4740-rtc driver from devicetree Lantiq: - Drop check of boot select from the spi-falcon driver. - Drop check of boot select from the lantiq-flash MTD driver. - Access boot cause register in the watchdog driver through regmap - Add device tree binding documentation for the watchdog driver - Add docs for the RCU DT bindings. - Convert the fpi bus driver to a platform_driver - Remove ltq_reset_cause() and ltq_boot_select( - Switch to a proper reset driver - Switch to a new drivers/soc GPHY driver - Add an USB PHY driver for the Lantiq SoCs using the RCU module - Use of_platform_default_populate instead of __dt_register_buses - Enable MFD_SYSCON to be able to use it for the RCU MFD - Replace ltq_boot_select() with dummy implementation. Loongson 2F: - Allow NULL clock for clk_get_rate Malta: - Use new GIC accessor functions NI 169445: - Add support for NI 169445 board. - Only include in 32r2el kernels Octeon: - Add support for watchdog of 78XX SOCs. - Add support for watchdog of CN68XX SOCs. - Expose support for mips32r1, mips32r2 and mips64r1 - Enable more drivers in config file - Add support for accessing the boot vector. - Remove old boot vector code from watchdog driver - Define watchdog registers for 70xx, 73xx, 78xx, F75xx. - Make CSR functions node aware. - Allow access to CIU3 IRQ domains. - Misc cleanups in the watchdog driver Omega2+: - New board, add support and defconfig Pistachio: - Enable Root FS on NFS in defconfig Ralink: - Add Mediatek MT7628A SoC - Allow NULL clock for clk_get_rate - Explicitly request exclusive reset control in the pci-mt7620 PCI driver. SEAD3: - Only include in 32 bit kernels by default VoCore: - Add VoCore as a vendor t0 dt-bindings - Add defconfig file" * '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (167 commits) MIPS: Refactor handling of stack pointer in get_frame_info MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems MIPS: microMIPS: Fix decoding of swsp16 instruction MIPS: microMIPS: Fix decoding of addiusp instruction MIPS: microMIPS: Fix detection of addiusp instruction MIPS: Handle non word sized instructions when examining frame MIPS: ralink: allow NULL clock for clk_get_rate MIPS: Loongson 2F: allow NULL clock for clk_get_rate MIPS: BCM63XX: allow NULL clock for clk_get_rate MIPS: AR7: allow NULL clock for clk_get_rate MIPS: BCM63XX: fix ENETDMA_6345_MAXBURST_REG offset mips: Save all registers when saving the frame MIPS: Add DWARF unwinding to assembly MIPS: Make SAVE_SOME more standard MIPS: Fix issues in backtraces MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree MIPS: Ci20: Enable RTC driver watchdog: octeon-wdt: Add support for 78XX SOCs. watchdog: octeon-wdt: Add support for cn68XX SOCs. watchdog: octeon-wdt: File cleaning. ... commit 8d93c7a4315711ea0f7a95ca353a89c4ed0763fb Merge: 02cfe97 0f50a49 Author: Linus Torvalds Date: Fri Sep 15 20:25:06 2017 -0700 Merge tag 'pci-v4.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Revert an attempt to fix a race while enabling upstream bridges because it broke iwlwifi firmware loading" * tag 'pci-v4.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI: Avoid race while enabling upstream bridges" commit 4cb433e856bce5974ea035181cc8eb406496dccc Author: Nikola Pajkovsky Date: Wed Sep 13 10:46:17 2017 +0200 scsi: aacraid: error: testing array offset 'bus' after use Fix possible indexing array of bound for &aac->hba_map[bus][cid], where bus and cid boundary check happens later. Fixes: 0d643ff3c353 ("scsi: aacraid: use aac_tmf_callback for reset fib") Signed-off-by: Nikola Pajkovsky Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 5c756065e47dc3e84b00577bd109f0a8e69903d7 Author: Stefano Brivio Date: Wed Sep 6 11:02:56 2017 +0200 scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function Internal error codes happen to be positive, thus the PCI driver core won't treat them as failure, but we do. This would cause a crash later on as lpfc_pci_remove_one() is called (e.g. as shutdown function). Fixes: 6d368e532168 ("[SCSI] lpfc 8.3.24: Add resource extent support") Signed-off-by: Stefano Brivio Reviewed-by: Johannes Thumshirn Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+) commit 02cfe977e813501ad0e524477eb5cd5b52860448 Merge: bbe05e5 47e0cd6 Author: Linus Torvalds Date: Fri Sep 15 17:52:52 2017 -0700 Merge tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm AMD fixes from Dave Airlie: "Just had a single AMD fixes pull from Alex for rc1" * tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: revert "fix deadlock of reservation between cs and gpu reset v2" drm/amdgpu: remove duplicate return statement drm/amdgpu: check memory allocation failure drm/amd/amdgpu: fix BANK_SELECT on Vega10 (v2) drm/amdgpu: inline amdgpu_ttm_do_bind again drm/amdgpu: fix amdgpu_ttm_bind drm/amdgpu: remove the GART copy hack drm/ttm:fix wrong decoding of bo_count drm/ttm: fix missing inc bo_count drm/amdgpu: set sched_hw_submission higher for KIQ (v3) drm/amdgpu: move default gart size setting into gmc modules drm/amdgpu: refine default gart size drm/amd/powerplay: ACG frequency added in PPTable drm/amdgpu: discard commands of killed processes drm/amdgpu: fix and cleanup shadow handling drm/amdgpu: add automatic per asic settings for gart_size drm/amdgpu/gfx8: fix spelling typo in mqd allocation drm/amd/powerplay: unhalt mec after loading drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately drm/amdgpu: Fix huge page updates with CPU commit bbe05e543bfeab1c37127f38b7e575db916fbc6c Merge: 9db5959 aeb068c Author: Linus Torvalds Date: Fri Sep 15 17:49:46 2017 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "I2C has two more new drivers: Altera FPGA and STM32F7" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i2c-stm32f7: add driver i2c: i2c-stm32f4: use generic definition of speed enum dt-bindings: i2c-stm32: Document the STM32F7 I2C bindings i2c: altera: Add Altera I2C Controller driver dt-bindings: i2c: Add Altera I2C Controller commit 9db59599ae502b38b27cff6462273f84acd59927 Merge: b38923a 4f350c6 Author: Linus Torvalds Date: Fri Sep 15 15:43:55 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: - PPC bugfixes - RCU splat fix - swait races fix - pointless userspace-triggerable BUG() fix - misc fixes for KVM_RUN corner cases - nested virt correctness fixes + one host DoS - some cleanups - clang build fix - fix AMD AVIC with default QEMU command line options - x86 bugfixes * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits) kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry kvm,mips: Fix potential swait_active() races kvm,powerpc: Serialize wq active checks in ops->vcpu_kick kvm: Serialize wq active checks in kvm_vcpu_wake_up() kvm,x86: Fix apf_task_wake_one() wq serialization kvm,lapic: Justify use of swait_active() kvm,async_pf: Use swq_has_sleeper() sched/wait: Add swq_has_sleeper() KVM: VMX: Do not BUG() on out-of-bounds guest IRQ KVM: Don't accept obviously wrong gsi values via KVM_IRQFD kvm: nVMX: Don't allow L2 to access the hardware CR8 KVM: trace events: update list of exit reasons KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously KVM: X86: Don't block vCPU if there is pending exception KVM: SVM: Add irqchip_split() checks before enabling AVIC KVM: Add struct kvm_vcpu pointer parameter to get_enable_apicv() KVM: SVM: Refactor AVIC vcpu initialization into avic_init_vcpu() KVM: x86: fix clang build ... commit e67b8a685c7c984e834e3181ef4619cd7025a136 Author: Edward Cree Date: Fri Sep 15 14:37:38 2017 +0100 bpf/verifier: reject BPF_ALU64|BPF_END Neither ___bpf_prog_run nor the JITs accept it. Also adds a new test case. Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 3 ++- tools/testing/selftests/bpf/test_verifier.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 8c7c19a55e41ae69d1cd18ab56e6e9b66a679a7c Author: Xin Long Date: Fri Sep 15 11:02:48 2017 +0800 sctp: do not mark sk dumped when inet_sctp_diag_fill returns err sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill returns err, in which case it shouldn't mark sk dumped by setting cb->args[3] as 1 in sctp_sock_dump(). Otherwise, it could cause some asocs to have no parent's sk dumped in 'ss --sctp'. So this patch is to not set cb->args[3] when inet_sctp_diag_fill() returns err in sctp_sock_dump(). Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sctp_diag.c | 1 - 1 file changed, 1 deletion(-) commit d25adbeb0cdb860fb39e09cdd025e9cfc954c5ab Author: Xin Long Date: Fri Sep 15 11:02:21 2017 +0800 sctp: fix an use-after-free issue in sctp_sock_dump Commit 86fdb3448cc1 ("sctp: ensure ep is not destroyed before doing the dump") tried to fix an use-after-free issue by checking !sctp_sk(sk)->ep with holding sock and sock lock. But Paolo noticed that endpoint could be destroyed in sctp_rcv without sock lock protection. It means the use-after-free issue still could be triggered when sctp_rcv put and destroy ep after sctp_sock_dump checks !ep, although it's pretty hard to reproduce. I could reproduce it by mdelay in sctp_rcv while msleep in sctp_close and sctp_sock_dump long time. This patch is to add another param cb_done to sctp_for_each_transport and dump ep->assocs with holding tsp after jumping out of transport's traversal in it to avoid this issue. It can also improve sctp diag dump to make it run faster, as no need to save sk into cb->args[5] and keep calling sctp_for_each_transport any more. This patch is also to use int * instead of int for the pos argument in sctp_for_each_transport, which could make postion increment only in sctp_for_each_transport and no need to keep changing cb->args[2] in sctp_sock_filter and sctp_sock_dump any more. Fixes: 86fdb3448cc1 ("sctp: ensure ep is not destroyed before doing the dump") Reported-by: Paolo Abeni Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller include/net/sctp/sctp.h | 3 ++- net/sctp/sctp_diag.c | 32 +++++++++----------------------- net/sctp/socket.c | 40 +++++++++++++++++++++++++--------------- 3 files changed, 36 insertions(+), 39 deletions(-) commit 5023a6db73196695f4cc2db1a0eb37957ca27772 Author: Stephen Hemminger Date: Thu Sep 14 09:31:07 2017 -0700 netvsc: increase default receive buffer size The default receive buffer size was reduced by recent change to a value which was appropriate for 10G and Windows Server 2016. But the value is too small for full performance with 40G on Azure. Increase the default back to maximum supported by host. Fixes: 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c72c65b426b47b3c166a8fef0d8927fe5e8a28d Author: Eric Dumazet Date: Wed Sep 13 20:30:39 2017 -0700 tcp: update skb->skb_mstamp more carefully liujian reported a problem in TCP_USER_TIMEOUT processing with a patch in tcp_probe_timer() : https://www.spinics.net/lists/netdev/msg454496.html After investigations, the root cause of the problem is that we update skb->skb_mstamp of skbs in write queue, even if the attempt to send a clone or copy of it failed. One reason being a routing problem. This patch prevents this, solving liujian issue. It also removes a potential RTT miscalculation, since __tcp_retransmit_skb() is not OR-ing TCP_SKB_CB(skb)->sacked with TCPCB_EVER_RETRANS if a failure happens, but skb->skb_mstamp has been changed. A future ACK would then lead to a very small RTT sample and min_rtt would then be lowered to this too small value. Tested: # cat user_timeout.pkt --local_ip=192.168.102.64 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 +0 `ifconfig tun0 192.168.102.64/16; ip ro add 192.0.2.1 dev tun0` +0 < S 0:0(0) win 0 +0 > S. 0:0(0) ack 1 +.1 < . 1:1(0) ack 1 win 65530 +0 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_USER_TIMEOUT, [3000], 4) = 0 +0 write(4, ..., 24) = 24 +0 > P. 1:25(24) ack 1 win 29200 +.1 < . 1:1(0) ack 25 win 65530 //change the ipaddress +1 `ifconfig tun0 192.168.0.10/16` +1 write(4, ..., 24) = 24 +1 write(4, ..., 24) = 24 +1 write(4, ..., 24) = 24 +1 write(4, ..., 24) = 24 +0 `ifconfig tun0 192.168.102.64/16` +0 < . 1:2(1) ack 25 win 65530 +0 `ifconfig tun0 192.168.0.10/16` +3 write(4, ..., 24) = -1 # ./packetdrill user_timeout.pkt Signed-off-by: Eric Dumazet Reported-by: liujian Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit fd7d56270b526ca3ed0c224362e3c64a0f86687a Author: John Ogness Date: Thu Sep 14 11:42:17 2017 +0200 fs/proc: Report eip/esp in /prod/PID/stat for coredumping Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat") stopped reporting eip/esp because it is racy and dangerous for executing tasks. The comment adds: As far as I know, there are no use programs that make any material use of these fields, so just get rid of them. However, existing userspace core-dump-handler applications (for example, minicoredumper) are using these fields since they provide an excellent cross-platform interface to these valuable pointers. So that commit introduced a user space visible regression. Partially revert the change and make the readout possible for tasks with the proper permissions and only if the target task has the PF_DUMPCORE flag set. Fixes: 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in> /proc/PID/stat") Reported-by: Marco Felsch Signed-off-by: John Ogness Reviewed-by: Andy Lutomirski Cc: Tycho Andersen Cc: Kees Cook Cc: Peter Zijlstra Cc: Brian Gerst Cc: stable@vger.kernel.org Cc: Tetsuo Handa Cc: Borislav Petkov Cc: Al Viro Cc: Linux API Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/87poatfwg6.fsf@linutronix.de Signed-off-by: Thomas Gleixner fs/proc/array.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit cbea8f02069533ea2ad4e5b3bfbcdb0894c20354 Author: David Ahern Date: Wed Sep 13 17:11:37 2017 -0700 net: ipv4: fix l3slave check for index returned in IP_PKTINFO rt_iif is only set to the actual egress device for the output path. The recent change to consider the l3slave flag when returning IP_PKTINFO works for local traffic (the correct device index is returned), but it broke the more typical use case of packets received from a remote host always returning the VRF index rather than the original ingress device. Update the fixup to consider l3slave and rt_iif actually getting set. Fixes: 1dfa76390bf05 ("net: ipv4: add check for l3slave for index returned in IP_PKTINFO") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2aa70f864955bf02362e3fb3008e4208d7a17a98 Author: Geert Uytterhoeven Date: Wed Sep 13 19:42:05 2017 +0200 net: smsc911x: Quieten netif during suspend If the network interface is kept running during suspend, the net core may call net_device_ops.ndo_start_xmit() while the Ethernet device is still suspended, which may lead to a system crash. E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is driven by a PM controlled clock. If the Ethernet registers are accessed while the clock is not running, the system will crash with an imprecise external abort. As this is a race condition with a small time window, it is not so easy to trigger at will. Using pm_test may increase your chances: # echo 0 > /sys/module/printk/parameters/console_suspend # echo platform > /sys/power/pm_test # echo mem > /sys/power/state To fix this, make sure the network interface is quietened during suspend. Signed-off-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 7095c973453e56efa0903e863b59cd89c75e62dc Author: Florian Fainelli Date: Tue Sep 12 13:14:26 2017 -0700 net: systemport: Fix 64-bit stats deadlock We can enter a deadlock situation because there is no sufficient protection when ndo_get_stats64() runs in process context to guard against RX or TX NAPI contexts running in softirq, this can lead to the following lockdep splat and actual deadlock was experienced as well with an iperf session in the background and a while loop doing ifconfig + ethtool. [ 5.780350] ================================ [ 5.784679] WARNING: inconsistent lock state [ 5.789011] 4.13.0-rc7-02179-g32fae27c725d #70 Not tainted [ 5.794561] -------------------------------- [ 5.798890] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 5.804971] swapper/0/0 [HC0[0]:SC1[1]:HE0:SE0] takes: [ 5.810175] (&syncp->seq#2){+.?...}, at: [] bcm_sysport_tx_reclaim+0x30/0x54 [ 5.818327] {SOFTIRQ-ON-W} state was registered at: [ 5.823278] bcm_sysport_get_stats64+0x17c/0x258 [ 5.828053] dev_get_stats+0x38/0xac [ 5.831776] rtnl_fill_stats+0x30/0x118 [ 5.835761] rtnl_fill_ifinfo+0x538/0xe24 [ 5.839921] rtmsg_ifinfo_build_skb+0x6c/0xd8 [ 5.844430] rtmsg_ifinfo_event.part.5+0x14/0x44 [ 5.849201] rtmsg_ifinfo+0x20/0x28 [ 5.852837] register_netdevice+0x628/0x6b8 [ 5.857171] register_netdev+0x14/0x24 [ 5.861051] bcm_sysport_probe+0x30c/0x438 [ 5.865280] platform_drv_probe+0x50/0xb0 [ 5.869418] driver_probe_device+0x2e8/0x450 [ 5.873817] __driver_attach+0x104/0x120 [ 5.877871] bus_for_each_dev+0x7c/0xc0 [ 5.881834] bus_add_driver+0x1b0/0x270 [ 5.885797] driver_register+0x78/0xf4 [ 5.889675] do_one_initcall+0x54/0x190 [ 5.893646] kernel_init_freeable+0x144/0x1d0 [ 5.898135] kernel_init+0x8/0x110 [ 5.901665] ret_from_fork+0x14/0x2c [ 5.905363] irq event stamp: 24263 [ 5.908804] hardirqs last enabled at (24262): [] net_rx_action+0xc4/0x4e4 [ 5.916624] hardirqs last disabled at (24263): [] _raw_spin_lock_irqsave+0x1c/0x98 [ 5.925143] softirqs last enabled at (24258): [] irq_enter+0x84/0x98 [ 5.932524] softirqs last disabled at (24259): [] irq_exit+0x108/0x16c [ 5.939985] [ 5.939985] other info that might help us debug this: [ 5.946576] Possible unsafe locking scenario: [ 5.946576] [ 5.952556] CPU0 [ 5.955031] ---- [ 5.957506] lock(&syncp->seq#2); [ 5.960955] [ 5.963604] lock(&syncp->seq#2); [ 5.967227] [ 5.967227] *** DEADLOCK *** [ 5.967227] [ 5.973222] 1 lock held by swapper/0/0: [ 5.977092] #0: (&(&ring->lock)->rlock){..-...}, at: [] bcm_sysport_tx_reclaim+0x20/0x54 So just remove the u64_stats_update_begin()/end() pair in ndo_get_stats64() since it does not appear to be useful for anything. No inconsistency was observed with either ifconfig or ethtool, global TX counts equal the sum of per-queue TX counts on a 32-bit architecture. Fixes: 10377ba7673d ("net: systemport: Support 64bit statistics") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 3 --- 1 file changed, 3 deletions(-) commit ecf091171b70787f92b18eeaa4ddc74f9221fa56 Author: Arnd Bergmann Date: Tue Sep 12 22:10:53 2017 +0200 net: vrf: avoid gcc-4.6 warning When building an allmodconfig kernel with gcc-4.6, we get a rather odd warning: drivers/net/vrf.c: In function ‘vrf_ip6_input_dst’: drivers/net/vrf.c:964:3: error: initialized field with side-effects overwritten [-Werror] drivers/net/vrf.c:964:3: error: (near initialization for ‘fl6’) [-Werror] I have no idea what this warning is even trying to say, but it does seem like a false positive. Reordering the initialization in to match the structure definition gets rid of the warning, and might also avoid whatever gcc thinks is wrong here. Fixes: 9ff74384600a ("net: vrf: Handle ipv6 multicast and link-local addresses") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/vrf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4739df6211911e6597602222b640e5c002563df6 Author: Himanshu Jha Date: Tue Sep 12 16:49:22 2017 +0530 qed: 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: Himanshu Jha Acked-by: Sudarsana Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 - 1 file changed, 1 deletion(-) commit b38923a068c10fc36ca8f596d650d095ce390b85 Merge: 866a30e 5620a0d Author: Linus Torvalds Date: Fri Sep 15 12:58:55 2017 -0700 Merge tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull firmware removal from Greg KH: "Many many years ago (at the kernel summit in Boston), we all came to the agreement that the firmware/ tree should be dropped from the kernel, and everyone use the linux-firmware package instead. For some minor reason, David Woodhouse didn't send the pull request at that point in time, and everyone forgot about this. The topic came up in the hallway track at the Plumbers conference this week, so here's a single patch that drops the whole firmware tree. The last firmware update was back in 2013, and all distros have been using linux-firmware instead since at least that year, if not before. The only commits to that directory since 2013 was some kbuild fixups for various build tool issues. So lets finally drop this, we don't need to lug them around in the kernel source tree anymore, especially as no one wants or uses them. This has passed build testing with 0-day, I don't think it made it into linux-next this week, but I figured it was good to get in before 4.14-rc1 was out" * tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware: delete in-kernel firmware commit 51ae253870f55e14ba2854ce9577ac2920efef0c Author: Arnd Bergmann Date: Fri Sep 15 21:29:13 2017 +0200 xen: x86: mark xen_find_pt_base as __init gcc-4.6 causes a harmless link-time warning: WARNING: vmlinux.o(.text.unlikely+0x48e): Section mismatch in reference from the function xen_find_pt_base() to the function .init.text:m2p() The function xen_find_pt_base() references the function __init m2p(). This is often because xen_find_pt_base lacks a __init annotation or the annotation of m2p is wrong. Newer compilers inline this function, so it never shows up, but marking it __init is the right way to avoid the warning. Fixes: 70e61199559a ("xen: move p2m list if conflicting with e820 map") Signed-off-by: Arnd Bergmann Signed-off-by: Boris Ostrovsky arch/x86/xen/mmu_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c92f7dbf25c36f35320e4ae0b508676410bac04 Author: Dave Carroll Date: Fri Sep 15 11:04:28 2017 -0600 scsi: aacraid: Fix 2T+ drives on SmartIOC-2000 The logic for supporting large drives was previously tied to 4Kn support for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn drives, use the intended option flag AAC_OPT_NEW_COMM_64 to determine support for volumes greater than 2T. Cc: Signed-off-by: Dave Carroll Reviewed-by: Christoph Hellwig Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 12 ++++++------ drivers/scsi/aacraid/aacraid.h | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) commit 866a30efdcb63a330b480600d0b501547f9a5a58 Merge: 418702b 65d1e3d Author: Linus Torvalds Date: Fri Sep 15 12:47:21 2017 -0700 Merge tag 'nios2-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull arch/nios2 update from Ley Foon Tan. * tag 'nios2-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: time: Read timer in get_cycles only if initialized nios2: add earlycon support to 3c120 devboard DTS commit 418702b91073ed0dae774189f69b335cbc92f84d Merge: 30db202 1bc944c Author: Linus Torvalds Date: Fri Sep 15 12:44:59 2017 -0700 Merge tag 'powerpc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Just one fix, for the handling of alignment interrupts on dcbz instructions. Thanks to Paul Mackerras, Christian Zigotzky, Michal Sojka" * tag 'powerpc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Fix handling of alignment interrupt on dcbz instruction commit 3e0097499839e0fe3af380410eababe5a47c4cf9 Author: Hannes Reinecke Date: Fri Sep 15 14:05:16 2017 +0200 scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE When calling SG_GET_REQUEST_TABLE ioctl only a half-filled table is returned; the remaining part will then contain stale kernel memory information. This patch zeroes out the entire table to avoid this issue. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Eric Dumazet Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 30db202e54d251e4887935f7b4538b44911bb091 Merge: 711aab1 0b08273 Author: Linus Torvalds Date: Fri Sep 15 12:16:18 2017 -0700 Merge tag 'for-linus-4.14-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Some cleanups and a big bug fix for ACLs. When I was reviewing Jan Kara's ACL patch, I realized that Orangefs ACL code was busted, not just in the kernel module, but in the server as well. I've been working on the code in the server mostly, but here's one kernel patch, there will be more" * tag 'for-linus-4.14-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: Adjust three checks for null pointers orangefs: Use kcalloc() in orangefs_prepare_cdm_array() orangefs: Delete error messages for a failed memory allocation in five functions orangefs: constify xattr_handler structure orangefs: don't call filemap_write_and_wait from fsync orangefs: off by ones in xattr size checks orangefs: documentation clean up orangefs: react properly to posix_acl_update_mode's aftermath. orangefs: Don't clear SGID when inheriting ACLs commit 4759df905a474d245752c9dc94288e779b8734dd Author: Hannes Reinecke Date: Fri Sep 15 14:05:15 2017 +0200 scsi: sg: factor out sg_fill_request_table() Factor out sg_fill_request_table() for better readability. [mkp: typos, applied by hand] Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 61 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 26 deletions(-) commit 9c95be0163a0a699ed7eda4727f485f8453580ef Author: Lukas Czerner Date: Wed Sep 13 16:29:46 2017 +0200 scsi: sd: Remove unnecessary condition in sd_read_block_limits() After series of changes around WRITE_SAME and UNMAP setup we ended up with leftover unnecessary condition. Remove it. Signed-off-by: Lukas Czerner Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 -- 1 file changed, 2 deletions(-) commit bbc8608755da42e7494c00dce24a636007972def Merge: a6cbfa1 697c5d8 Author: Dmitry Torokhov Date: Fri Sep 15 09:52:21 2017 -0700 Merge branch 'next' into for-linus Prepare second round of input updates for 4.14 merge window. commit 697c5d8a36768b36729533fb44622b35d56d6ad0 Author: Kai-Heng Feng Date: Fri Sep 15 09:36:16 2017 -0700 Input: i8042 - add Gigabyte P57 to the keyboard reset table Similar to other Gigabyte laptops, the touchpad on P57 requires a keyboard reset to detect Elantech touchpad correctly. BugLink: https://bugs.launchpad.net/bugs/1594214 Signed-off-by: Kai-Heng Feng Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 37128514d708457fc060a2309aaa78b057a00043 Author: Hsin-Yu Chao Date: Fri Sep 15 12:32:00 2017 +0800 ASoC: rt5514: Revert Hotword Model control This reverts commit eb33869c7206 ("ASoC: rt5514: Guard Hotword Model bytes loading") and commit d18420b0a0b8 ("ASoC: rt5514: expose Hotword Model control") It is discouraged to use SND_SOC_BYTES_TLV to load arbitrary bytes from userspace to driver. Removing the 'Hotword Model' control until we have a good way to verify the content of hotword model blobs. Signed-off-by: Hsin-Yu Chao Reviewed-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 63 ----------------------------------------------- sound/soc/codecs/rt5514.h | 3 --- 2 files changed, 66 deletions(-) commit 820608548737e315c6f93e3099b4e65bde062334 Author: Alex Deucher Date: Fri Sep 15 11:55:27 2017 -0400 drm/radeon: disable hard reset in hibernate for APUs Fixes a hibernation regression on APUs. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=191571 Fixes: 274ad65c9d02bdc (drm/radeon: hard reset r600 and newer GPU when hibernating.) Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f350c6dbcb9000e18907515ec8a7b205ac33c69 Author: Jim Mattson Date: Thu Sep 14 16:31:44 2017 -0700 kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly When emulating a nested VM-entry from L1 to L2, several control field validation checks are deferred to the hardware. Should one of these validation checks fail, vcpu_vmx_run will set the vmx->fail flag. When this happens, the L2 guest state is not loaded (even in part), and execution should continue in L1 with the next instruction after the VMLAUNCH/VMRESUME. The VMCS12 is not modified (except for the VM-instruction error field), the VMCS12 MSR save/load lists are not processed, and the CPU state is not loaded from the VMCS12 host area. Moreover, the vmcs02 exit reason is stale, so it should not be consulted for any reason. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 134 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 75 insertions(+), 59 deletions(-) commit b060ca3b2e9e72ef005e2042476f95ee0b8839e9 Author: Jim Mattson Date: Thu Sep 14 16:31:42 2017 -0700 kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly On an early VMLAUNCH/VMRESUME failure (i.e. one which sets the VM-instruction error field of the current VMCS), the launch state of the current VMCS is not set to "launched," and the VM-exit information fields of the current VMCS (including IDT-vectoring information and exit reason) are stale. On a late VMLAUNCH/VMRESUME failure (i.e. one which sets the high bit of the exit reason field), the launch state of the current VMCS is not set to "launched," and only two of the VM-exit information fields of the current VMCS are modified (exit reason and exit qualification). The remaining VM-exit information fields of the current VMCS (including IDT-vectoring information, in particular) are stale. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7881f96cac4d420c94e62a4e1eea243899a7052e Author: Jim Mattson Date: Thu Sep 14 16:31:40 2017 -0700 kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry After a successful VM-entry, RFLAGS is cleared, with the exception of bit 1, which is always set. This is handled by load_vmcs12_host_state. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 4c0b4bc60f95de4741c89b41174760258343f091 Author: Davidlohr Bueso Date: Wed Sep 13 13:08:24 2017 -0700 kvm,mips: Fix potential swait_active() races For example, the following could occur, making us miss a wakeup: CPU0 CPU1 kvm_vcpu_block kvm_mips_comparecount_func [L] swait_active(&vcpu->wq) [S] prepare_to_swait(&vcpu->wq) [L] if (!kvm_vcpu_has_pending_timer(vcpu)) schedule() [S] queue_timer_int(vcpu) Ensure that the swait_active() check is not hoisted over the interrupt. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 267ad7bc2d3f69af536035b6a3e4a9a2b6ae11dc Author: Davidlohr Bueso Date: Wed Sep 13 13:08:23 2017 -0700 kvm,powerpc: Serialize wq active checks in ops->vcpu_kick Particularly because kvmppc_fast_vcpu_kick_hv() is a callback, ensure that we properly serialize wq active checks in order to avoid potentially missing a wakeup due to racing with the waiter side. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e0018b3e39e9b44dbfb380b83026e55d2f65b91 Author: Davidlohr Bueso Date: Wed Sep 13 13:08:22 2017 -0700 kvm: Serialize wq active checks in kvm_vcpu_wake_up() This is a generic call and can be suceptible to races in reading the wq task_list while another task is adding itself to the list. Add a full barrier by using the swq_has_sleeper() helper. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0cff57bb2a41cb9cbf13d3203097b4156d8c0ae Author: Davidlohr Bueso Date: Wed Sep 13 13:08:21 2017 -0700 kvm,x86: Fix apf_task_wake_one() wq serialization During code inspection, the following potential race was seen: CPU0 CPU1 kvm_async_pf_task_wait apf_task_wake_one [L] swait_active(&n->wq) [S] prepare_to_swait(&n.wq) [L] if (!hlist_unhahed(&n.link)) schedule() [S] hlist_del_init(&n->link); Properly serialize swait_active() checks such that a wakeup is not missed. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc1b46803a671047be22f7832ef4a2bb3f63dd94 Author: Davidlohr Bueso Date: Wed Sep 13 13:08:20 2017 -0700 kvm,lapic: Justify use of swait_active() A comment might serve future readers. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 4 ++++ 1 file changed, 4 insertions(+) commit b9f67a420b3d76991592558af06e9cf1b8953b3d Author: Davidlohr Bueso Date: Wed Sep 13 13:08:19 2017 -0700 kvm,async_pf: Use swq_has_sleeper() ... as we've got the new helper now. This caller already does the right thing, hence no changes in semantics. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini virt/kvm/async_pf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 8cd641e3c7cbf86c7cbd2a17a160dd137d86c860 Author: Davidlohr Bueso Date: Wed Sep 13 13:08:18 2017 -0700 sched/wait: Add swq_has_sleeper() Which is the equivalent of what we have in regular waitqueues. I'm not crazy about the name, but this also helps us get both apis closer -- which iirc comes originally from the -net folks. We also duplicate the comments for the lockless swait_active(), from wait.h. Future users will make use of this interface. Signed-off-by: Davidlohr Bueso Signed-off-by: Paolo Bonzini include/linux/swait.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb Author: Jan H. Schönherr Date: Thu Sep 7 19:02:30 2017 +0100 KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only once if we find that we don't have a route for a certain IRQ (which can be out-of-bounds or within the array). This fixes CVE-2017-1000252. Fixes: efc644048ecde54 ("KVM: x86: Update IRTE for posted-interrupts") Signed-off-by: Jan H. Schönherr Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 Author: Jan H. Schönherr Date: Thu Sep 7 19:02:48 2017 +0100 KVM: Don't accept obviously wrong gsi values via KVM_IRQFD We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see kvm_set_irq_routing(). Hence, there is no sense in accepting them via KVM_IRQFD. Prevent them from entering the system in the first place. Signed-off-by: Jan H. Schönherr Signed-off-by: Paolo Bonzini virt/kvm/eventfd.c | 2 ++ 1 file changed, 2 insertions(+) commit 65d1e3ddeae117f6a224535e10a09145f0f96508 Author: Guenter Roeck Date: Mon Sep 11 20:45:26 2017 -0700 nios2: time: Read timer in get_cycles only if initialized Mainline crashes as follows when running nios2 images. On node 0 totalpages: 65536 free_area_init_node: node 0, pgdat c8408fa0, node_mem_map c8726000 Normal zone: 512 pages used for memmap Normal zone: 0 pages reserved Normal zone: 65536 pages, LIFO batch:15 Unable to handle kernel NULL pointer dereference at virtual address 00000000 ea = c8003cb0, ra = c81cbf40, cause = 15 Kernel panic - not syncing: Oops Problem is seen because get_cycles() is called before the timer it depends on is initialized. Returning 0 in that situation fixes the problem. Fixes: 33d72f3822d7 ("init/main.c: extract early boot entropy from the ..") Cc: Laura Abbott Cc: Kees Cook Cc: Daniel Micay Signed-off-by: Guenter Roeck arch/nios2/kernel/time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8993d5e4662b16845492c413efe82ec162bf5370 Author: Tobias Klauser Date: Tue Jun 20 09:43:18 2017 +0200 nios2: add earlycon support to 3c120 devboard DTS Allow earlycon to be used on the JTAG UART present in the 3c120 GHRD. Signed-off-by: Tobias Klauser arch/nios2/boot/dts/3c120_devboard.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51aa68e7d57e3217192d88ce90fd5b8ef29ec94f Author: Jim Mattson Date: Tue Sep 12 13:02:54 2017 -0700 kvm: nVMX: Don't allow L2 to access the hardware CR8 If L1 does not specify the "use TPR shadow" VM-execution control in vmcs12, then L0 must specify the "CR8-load exiting" and "CR8-store exiting" VM-execution controls in vmcs02. Failure to do so will give the L2 VM unrestricted read/write access to the hardware CR8. This fixes CVE-2017-12154. Signed-off-by: Jim Mattson Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 97dab2ae7e8473a821f72a039ead0f36b12ba22d Author: Josh Poimboeuf Date: Fri Sep 15 02:17:11 2017 -0500 objtool: Fix object file corruption Arnd Bergmann reported that a randconfig build was failing with the following link error: built-in.o: member arch/x86/kernel/time.o in archive is not an object It turns out the link failed because the time.o file had been corrupted by objtool: nm: arch/x86/kernel/time.o: File format not recognized In certain rare cases, when a .o file's ORC table is very small, the .data section size doesn't change because it's page aligned. Because all the existing sections haven't changed size, libelf doesn't detect any section header changes, and so it doesn't update the section header table properly. Instead it writes junk in the section header entries for the new ORC sections. Make sure libelf properly updates the section header table by setting the ELF_F_DIRTY flag in the top level elf struct. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 627fce14809b ("objtool: Add ORC unwind table generation") Link: http://lkml.kernel.org/r/e650fd0f2d8a209d1409a9785deb101fdaed55fb.1505459813.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/elf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit df968c9329f6e5cf3596a0a54adb6f749747a746 Author: Petr Vandrovec Date: Fri Sep 15 02:15:05 2017 -0500 objtool: Do not retrieve data from empty sections Binutils 2.29-9 in Debian return an error when elf_getdata is invoked on empty section (.note.GNU-stack in all kernel files), causing immediate failure of kernel build with: elf_getdata: can't manipulate null section As nothing is done with sections that have zero size, just do not retrieve their data at all. Signed-off-by: Petr Vandrovec Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2ce30a44349065b70d0f00e71e286dc0cbe745e6.1505459652.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/elf.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 0998b7a0befdf6e734032895ee639a5e6f88cc3f Author: Martin Kepplinger Date: Thu Sep 14 08:01:38 2017 +0200 objtool: Fix memory leak in elf_create_rela_section() Let's free the allocated char array 'relaname' before returning, in order to avoid leaking memory. Signed-off-by: Martin Kepplinger Acked-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: mingo.kernel.org@gmail.com Link: http://lkml.kernel.org/r/20170914060138.26472-1-martink@posteo.de Signed-off-by: Ingo Molnar tools/objtool/elf.c | 1 + 1 file changed, 1 insertion(+) commit f7f3dc00f61261cdc9ccd8b886f21bc4dffd6fd9 Author: Borislav Petkov Date: Thu Sep 7 19:08:21 2017 +0200 x86/cpu/AMD: Fix erratum 1076 (CPB bit) CPUID Fn8000_0007_EDX[CPB] is wrongly 0 on models up to B1. But they do support CPB (AMD's Core Performance Boosting cpufreq CPU feature), so fix that. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sherry Hurwitz Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170907170821.16021-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e785fa0a164aa11001cba931367c7f94ffaff888 Author: Vladis Dronov Date: Wed Sep 13 00:21:21 2017 +0200 nl80211: check for the required netlink attributes presence nl80211_set_rekey_data() does not check if the required attributes NL80211_REKEY_DATA_{REPLAY_CTR,KEK,KCK} are present when processing NL80211_CMD_SET_REKEY_OFFLOAD 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 attributes presence. This patch is based on the patch by bo Zhang. This fixes CVE-2017-12153. References: https://bugzilla.redhat.com/show_bug.cgi?id=1491046 Fixes: e5497d766ad ("cfg80211/nl80211: support GTK rekey offload") Cc: # v3.1-rc1 Reported-by: bo Zhang Signed-off-by: Vladis Dronov Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 0f50a49e3008597abed0fff052d487f77db89093 Author: Bjorn Helgaas Date: Fri Sep 15 01:33:51 2017 -0500 Revert "PCI: Avoid race while enabling upstream bridges" This reverts commit 40f11adc7cd9281227f0a6a627d966dd0a5f0cd9. Jens found that iwlwifi firmware loading failed on a Lenovo X1 Carbon, gen4: iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-34.ucode failed with error -2 iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2 iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2 iwlwifi 0000:04:00.0: loaded firmware version 31.532993.0 op_mode iwlmvm iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208 ... iwlwifi 0000:04:00.0: Failed to load firmware chunk! iwlwifi 0000:04:00.0: Could not load the [0] uCode section iwlwifi 0000:04:00.0: Failed to start INIT ucode: -110 iwlwifi 0000:04:00.0: Failed to run INIT ucode: -110 He bisected it to 40f11adc7cd9 ("PCI: Avoid race while enabling upstream bridges"). Revert that commit to fix the regression. Link: http://lkml.kernel.org/r/4bcbcbc1-7c79-09f0-5071-bc2f53bf6574@kernel.dk Fixes: 40f11adc7cd9 ("PCI: Avoid race while enabling upstream bridges") Signed-off-by: Bjorn Helgaas CC: Srinath Mannam CC: Jens Axboe CC: Luca Coelho CC: Johannes Berg CC: Emmanuel Grumbach drivers/pci/pci.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 711aab1dbb324d321e3d84368a435a78908c7bce Author: Mimi Zohar Date: Tue Sep 12 22:45:33 2017 -0400 vfs: constify path argument to kernel_read_file_from_path This patch constifies the path argument to kernel_read_file_from_path(). Signed-off-by: Mimi Zohar Cc: Christoph Hellwig Signed-off-by: Linus Torvalds fs/exec.c | 2 +- include/linux/fs.h | 2 +- sound/oss/sound_firmware.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6ed0529fef09f50ef41d396cb55c5519e4936b16 Merge: 9e0ce55 bf4b490 Author: Linus Torvalds Date: Thu Sep 14 20:04:32 2017 -0700 Merge tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull more NFS client updates from Trond Myklebust: "Hightlights include: Bugfixes: - Various changes relating to reporting IO errors. - pnfs: Use the standard I/O stateid when calling LAYOUTGET Features: - Add static NFS I/O tracepoints for debugging" * tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: various changes relating to reporting IO errors. NFS: Add static NFS I/O tracepoints pNFS: Use the standard I/O stateid when calling LAYOUTGET commit 9e0ce554b039e3df288d83189ecf226c16da04af Merge: e253d98 1985296 Author: Linus Torvalds Date: Thu Sep 14 20:01:41 2017 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc leftovers from Al Viro. * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the __user misannotations in asm-generic get_user/put_user fput: Don't reinvent the wheel but use existing llist API namespace.c: Don't reinvent the wheel but use existing llist API commit e253d98f5babbec7e6ced810f7335b265a7f7e83 Merge: 0f0d127 c35fc7a Author: Linus Torvalds Date: Thu Sep 14 19:29:55 2017 -0700 Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull nowait read support from Al Viro: "Support IOCB_NOWAIT for buffered reads and block devices" * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: block_dev: support RFW_NOWAIT on block device nodes fs: support RWF_NOWAIT for buffered reads fs: support IOCB_NOWAIT in generic_file_buffered_read fs: pass iocb to do_generic_file_read commit 0f0d12728e56c94d3289c6831243b6faeae8a19d Merge: 581bfce e462ec5 Author: Linus Torvalds Date: Thu Sep 14 18:54:01 2017 -0700 Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount flag updates from Al Viro: "Another chunk of fmount preparations from dhowells; only trivial conflicts for that part. It separates MS_... bits (very grotty mount(2) ABI) from the struct super_block ->s_flags (kernel-internal, only a small subset of MS_... stuff). This does *not* convert the filesystems to new constants; only the infrastructure is done here. The next step in that series is where the conflicts would be; that's the conversion of filesystems. It's purely mechanical and it's better done after the merge, so if you could run something like list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$') sed -i -e 's/\/SB_RDONLY/g' \ -e 's/\/SB_NOSUID/g' \ -e 's/\/SB_NODEV/g' \ -e 's/\/SB_NOEXEC/g' \ -e 's/\/SB_SYNCHRONOUS/g' \ -e 's/\/SB_MANDLOCK/g' \ -e 's/\/SB_DIRSYNC/g' \ -e 's/\/SB_NOATIME/g' \ -e 's/\/SB_NODIRATIME/g' \ -e 's/\/SB_SILENT/g' \ -e 's/\/SB_POSIXACL/g' \ -e 's/\/SB_KERNMOUNT/g' \ -e 's/\/SB_I_VERSION/g' \ -e 's/\/SB_LAZYTIME/g' \ $list and commit it with something along the lines of 'convert filesystems away from use of MS_... constants' as commit message, it would save a quite a bit of headache next cycle" * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: VFS: Differentiate mount flags (MS_*) from internal superblock flags VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags commit 581bfce969cbfc7ce43ee92273be9cb7c3fdfa61 Merge: cc73fee 9725d4c Author: Linus Torvalds Date: Thu Sep 14 18:13:32 2017 -0700 Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more set_fs removal from Al Viro: "Christoph's 'use kernel_read and friends rather than open-coding set_fs()' series" * 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: unexport vfs_readv and vfs_writev fs: unexport vfs_read and vfs_write fs: unexport __vfs_read/__vfs_write lustre: switch to kernel_write gadget/f_mass_storage: stop messing with the address limit mconsole: switch to kernel_read btrfs: switch write_buf to kernel_write net/9p: switch p9_fd_read to kernel_write mm/nommu: switch do_mmap_private to kernel_read serial2002: switch serial2002_tty_write to kernel_{read/write} fs: make the buf argument to __kernel_write a void pointer fs: fix kernel_write prototype fs: fix kernel_read prototype fs: move kernel_read to fs/read_write.c fs: move kernel_write to fs/read_write.c autofs4: switch autofs4_write to __kernel_write ashmem: switch to ->read_iter commit fd536998314a9dc54f384fa16287321edb81602a Author: Arnd Bergmann Date: Mon Sep 11 22:00:57 2017 +0200 scsi: acornscsi: fix build error A cleanup patch introduced a fatal typo from inbalanced curly braces: drivers/scsi/arm/acornscsi.c: In function 'acornscsi_host_reset': drivers/scsi/arm/acornscsi.c:2773:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] drivers/scsi/arm/acornscsi.c:2795:12: error: invalid storage class for function 'acornscsi_show_info' static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance) The same patch incorrectly changed the argument type of the reset handler, as shown by this warning: drivers/scsi/arm/acornscsi.c:2888:27: error: initialization of 'int (*)(struct scsi_cmnd *)' from incompatible pointer type 'int (*)(struct Scsi_Host *)' [-Werror=incompatible-pointer-types] .eh_host_reset_handler = acornscsi_host_reset, This removes one the extraneous opening brace and reverts the argument type change. [mkp: fixed checkpatch complaint] Fixes: 74fa80ee3fae ("scsi: acornscsi: move bus reset to host reset") Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/arm/acornscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b468b6a4969f9bdddb31d484f151bfa03fbee767 Author: Christoph Hellwig Date: Thu Sep 7 13:54:36 2017 +0200 scsi: scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout bsg-lib now embeddeds the job structure into the request, and req->special can't be used anymore. Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc73fee0bae2d66594d1fa2df92bbd783aa98e04 Merge: e7cdb60 aaed2dd Author: Linus Torvalds Date: Thu Sep 14 17:37:26 2017 -0700 Merge branch 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ipc compat cleanup and 64-bit time_t from Al Viro: "IPC copyin/copyout sanitizing, including 64bit time_t work from Deepa Dinamani" * 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: utimes: Make utimes y2038 safe ipc: shm: Make shmid_kernel timestamps y2038 safe ipc: sem: Make sem_array timestamps y2038 safe ipc: msg: Make msg_queue timestamps y2038 safe ipc: mqueue: Replace timespec with timespec64 ipc: Make sys_semtimedop() y2038 safe get rid of SYSVIPC_COMPAT on ia64 semtimedop(): move compat to native shmat(2): move compat to native msgrcv(2), msgsnd(2): move compat to native ipc(2): move compat to native ipc: make use of compat ipc_perm helpers semctl(): move compat to native semctl(): separate all layout-dependent copyin/copyout msgctl(): move compat to native msgctl(): split the actual work from copyin/copyout ipc: move compat shmctl to native shmctl: split the work from copyin/copyout commit e7cdb60fd28b252f1c15a0e50f79a01906124915 Merge: a2bc8de 87bf54b Author: Linus Torvalds Date: Thu Sep 14 17:30:49 2017 -0700 Merge branch 'zstd-minimal' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull zstd support from Chris Mason: "Nick Terrell's patch series to add zstd support to the kernel has been floating around for a while. After talking with Dave Sterba, Herbert and Phillip, we decided to send the whole thing in as one pull request. zstd is a big win in speed over zlib and in compression ratio over lzo, and the compression team here at FB has gotten great results using it in production. Nick will continue to update the kernel side with new improvements from the open source zstd userland code. Nick has a number of benchmarks for the main zstd code in his lib/zstd commit: I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor, 16 GB of RAM, and a SSD. I benchmarked using `silesia.tar` [3], which is 211,988,480 B large. Run the following commands for the benchmark: sudo modprobe zstd_compress_test sudo mknod zstd_compress_test c 245 0 sudo cp silesia.tar zstd_compress_test The time is reported by the time of the userland `cp`. The MB/s is computed with 1,536,217,008 B / time(buffer size, hash) which includes the time to copy from userland. The Adjusted MB/s is computed with 1,536,217,088 B / (time(buffer size, hash) - time(buffer size, none)). The memory reported is the amount of memory the compressor requests. | Method | Size (B) | Time (s) | Ratio | MB/s | Adj MB/s | Mem (MB) | |----------|----------|----------|-------|---------|----------|----------| | none | 11988480 | 0.100 | 1 | 2119.88 | - | - | | zstd -1 | 73645762 | 1.044 | 2.878 | 203.05 | 224.56 | 1.23 | | zstd -3 | 66988878 | 1.761 | 3.165 | 120.38 | 127.63 | 2.47 | | zstd -5 | 65001259 | 2.563 | 3.261 | 82.71 | 86.07 | 2.86 | | zstd -10 | 60165346 | 13.242 | 3.523 | 16.01 | 16.13 | 13.22 | | zstd -15 | 58009756 | 47.601 | 3.654 | 4.45 | 4.46 | 21.61 | | zstd -19 | 54014593 | 102.835 | 3.925 | 2.06 | 2.06 | 60.15 | | zlib -1 | 77260026 | 2.895 | 2.744 | 73.23 | 75.85 | 0.27 | | zlib -3 | 72972206 | 4.116 | 2.905 | 51.50 | 52.79 | 0.27 | | zlib -6 | 68190360 | 9.633 | 3.109 | 22.01 | 22.24 | 0.27 | | zlib -9 | 67613382 | 22.554 | 3.135 | 9.40 | 9.44 | 0.27 | I benchmarked zstd decompression using the same method on the same machine. The benchmark file is located in the upstream zstd repo under `contrib/linux-kernel/zstd_decompress_test.c` [4]. The memory reported is the amount of memory required to decompress data compressed with the given compression level. If you know the maximum size of your input, you can reduce the memory usage of decompression irrespective of the compression level. | Method | Time (s) | MB/s | Adjusted MB/s | Memory (MB) | |----------|----------|---------|---------------|-------------| | none | 0.025 | 8479.54 | - | - | | zstd -1 | 0.358 | 592.15 | 636.60 | 0.84 | | zstd -3 | 0.396 | 535.32 | 571.40 | 1.46 | | zstd -5 | 0.396 | 535.32 | 571.40 | 1.46 | | zstd -10 | 0.374 | 566.81 | 607.42 | 2.51 | | zstd -15 | 0.379 | 559.34 | 598.84 | 4.61 | | zstd -19 | 0.412 | 514.54 | 547.77 | 8.80 | | zlib -1 | 0.940 | 225.52 | 231.68 | 0.04 | | zlib -3 | 0.883 | 240.08 | 247.07 | 0.04 | | zlib -6 | 0.844 | 251.17 | 258.84 | 0.04 | | zlib -9 | 0.837 | 253.27 | 287.64 | 0.04 | I ran a long series of tests and benchmarks on the btrfs side and the gains are very similar to the core benchmarks Nick ran" * 'zstd-minimal' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: squashfs: Add zstd support btrfs: Add zstd support lib: Add zstd modules lib: Add xxhash module commit 1bc944cee663f232e3c37b15a6b2f9185bca413c Author: Paul Mackerras Date: Wed Sep 13 14:51:24 2017 +1000 powerpc: Fix handling of alignment interrupt on dcbz instruction This fixes the emulation of the dcbz instruction in the alignment interrupt handler. The error was that we were comparing just the instruction type field of op.type rather than the whole thing, and therefore the comparison "type != CACHEOP + DCBZ" was always true. Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") Signed-off-by: Paul Mackerras Tested-by: Michal Sojka Tested-by: Christian Zigotzky Signed-off-by: Michael Ellerman arch/powerpc/kernel/align.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5620a0d1aacd554ebebcff373e31107bb1ef7769 Author: Greg Kroah-Hartman Date: Thu Sep 14 14:23:01 2017 -0700 firmware: delete in-kernel firmware The last firmware change for the in-kernel firmware source code was back in 2013. Everyone has been relying on the out-of-tree linux-firmware package for a long long time. So let's drop it, it's baggage we don't need to keep dragging around (and having to fix random kbuild issues over time...) Cc: Kyle McMartin Cc: Andrew Morton Cc: Michal Marek Cc: Masahiro Yamada Acked-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman Makefile | 16 +- firmware/.gitignore | 6 - firmware/3com/typhoon.bin.ihex | 2819 ----- firmware/Makefile | 238 - firmware/README.AddingFirmware | 45 - firmware/WHENCE | 854 -- firmware/acenic/tg1.bin.ihex | 4573 -------- firmware/acenic/tg2.bin.ihex | 4844 -------- firmware/adaptec/starfire_rx.bin.ihex | 53 - firmware/adaptec/starfire_tx.bin.ihex | 53 - firmware/advansys/3550.bin.ihex | 317 - firmware/advansys/38C0800.bin.ihex | 336 - firmware/advansys/38C1600.bin.ihex | 398 - firmware/advansys/mcode.bin.ihex | 147 - firmware/atmsar11.HEX | 204 - firmware/av7110/Boot.S | 109 - firmware/av7110/bootcode.bin.ihex | 15 - firmware/bnx2/bnx2-mips-06-6.2.1.fw.ihex | 5818 ---------- firmware/bnx2/bnx2-mips-09-6.2.1a.fw.ihex | 6512 ----------- firmware/bnx2/bnx2-rv2p-06-6.0.15.fw.ihex | 366 - firmware/bnx2/bnx2-rv2p-09-6.0.17.fw.ihex | 392 - firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw.ihex | 425 - firmware/bnx2x/bnx2x-e1-6.2.9.0.fw.ihex | 9484 ---------------- firmware/bnx2x/bnx2x-e1h-6.2.9.0.fw.ihex | 13192 ---------------------- firmware/bnx2x/bnx2x-e2-6.2.9.0.fw.ihex | 15473 -------------------------- firmware/cis/.gitignore | 1 - firmware/cis/3CCFEM556.cis.ihex | 13 - firmware/cis/3CXEM556.cis.ihex | 13 - firmware/cis/COMpad2.cis.ihex | 11 - firmware/cis/COMpad4.cis.ihex | 9 - firmware/cis/DP83903.cis.ihex | 14 - firmware/cis/LA-PCM.cis.ihex | 20 - firmware/cis/MT5634ZLX.cis.ihex | 11 - firmware/cis/NE2K.cis.ihex | 8 - firmware/cis/PCMLM28.cis.ihex | 18 - firmware/cis/PE-200.cis.ihex | 9 - firmware/cis/PE520.cis.ihex | 9 - firmware/cis/RS-COM-2P.cis.ihex | 10 - firmware/cis/SW_555_SER.cis.ihex | 12 - firmware/cis/SW_7xx_SER.cis.ihex | 13 - firmware/cis/SW_8xx_SER.cis.ihex | 13 - firmware/cis/tamarack.cis.ihex | 10 - firmware/cpia2/stv0672_vp4.bin.ihex | 73 - firmware/cxgb3/ael2005_opt_edc.bin.ihex | 69 - firmware/cxgb3/ael2005_twx_edc.bin.ihex | 93 - firmware/cxgb3/ael2020_twx_edc.bin.ihex | 100 - firmware/cxgb3/t3b_psram-1.1.0.bin.ihex | 162 - firmware/cxgb3/t3c_psram-1.1.0.bin.ihex | 162 - firmware/dsp56k/bootstrap.asm | 98 - firmware/dsp56k/bootstrap.bin.ihex | 26 - firmware/e100/d101m_ucode.bin.ihex | 38 - firmware/e100/d101s_ucode.bin.ihex | 38 - firmware/e100/d102e_ucode.bin.ihex | 38 - firmware/edgeport/boot.H16 | 29 - firmware/edgeport/boot2.H16 | 28 - firmware/edgeport/down.H16 | 29 - firmware/edgeport/down2.H16 | 29 - firmware/edgeport/down3.bin.ihex | 815 -- firmware/emi26/bitstream.HEX | 4391 -------- firmware/emi26/firmware.HEX | 1261 --- firmware/emi26/loader.HEX | 116 - firmware/emi62/bitstream.HEX | 6107 ---------- firmware/emi62/loader.HEX | 107 - firmware/emi62/midi.HEX | 1266 --- firmware/emi62/spdif.HEX | 1257 --- firmware/ess/maestro3_assp_kernel.fw.ihex | 120 - firmware/ess/maestro3_assp_minisrc.fw.ihex | 51 - firmware/ihex2fw.c | 281 - firmware/kaweth/new_code.bin.ihex | 206 - firmware/kaweth/new_code_fix.bin.ihex | 40 - firmware/kaweth/trigger_code.bin.ihex | 13 - firmware/kaweth/trigger_code_fix.bin.ihex | 3 - firmware/keyspan/mpr.HEX | 104 - firmware/keyspan/usa18x.HEX | 141 - firmware/keyspan/usa19.HEX | 101 - firmware/keyspan/usa19qi.HEX | 101 - firmware/keyspan/usa19qw.HEX | 142 - firmware/keyspan/usa19w.HEX | 141 - firmware/keyspan/usa28.HEX | 148 - firmware/keyspan/usa28x.HEX | 141 - firmware/keyspan/usa28xa.HEX | 141 - firmware/keyspan/usa28xb.HEX | 142 - firmware/keyspan/usa49w.HEX | 145 - firmware/keyspan/usa49wlc.HEX | 153 - firmware/keyspan_pda/keyspan_pda.HEX | 83 - firmware/keyspan_pda/keyspan_pda.S | 1124 -- firmware/keyspan_pda/xircom_pgs.HEX | 87 - firmware/keyspan_pda/xircom_pgs.S | 1192 -- firmware/korg/k1212.dsp.ihex | 987 -- firmware/matrox/g200_warp.H16 | 28 - firmware/matrox/g400_warp.H16 | 44 - firmware/mts_cdma.fw.ihex | 867 -- firmware/mts_edge.fw.ihex | 881 -- firmware/mts_gsm.fw.ihex | 867 -- firmware/myricom/lanai.bin.ihex | 4771 -------- firmware/ositech/Xilinx7OD.bin.ihex | 177 - firmware/qlogic/1040.bin.ihex | 2111 ---- firmware/qlogic/12160.bin.ihex | 1771 --- firmware/qlogic/1280.bin.ihex | 2008 ---- firmware/qlogic/isp1000.bin.ihex | 1158 -- firmware/qlogic/sd7220.fw.ihex | 513 - firmware/r128/r128_cce.bin.ihex | 129 - firmware/radeon/R100_cp.bin.ihex | 130 - firmware/radeon/R200_cp.bin.ihex | 130 - firmware/radeon/R300_cp.bin.ihex | 130 - firmware/radeon/R420_cp.bin.ihex | 130 - firmware/radeon/R520_cp.bin.ihex | 130 - firmware/radeon/R600_me.bin.ihex | 1345 --- firmware/radeon/R600_pfp.bin.ihex | 145 - firmware/radeon/RS600_cp.bin.ihex | 130 - firmware/radeon/RS690_cp.bin.ihex | 130 - firmware/radeon/RS780_me.bin.ihex | 1345 --- firmware/radeon/RS780_pfp.bin.ihex | 145 - firmware/radeon/RV610_me.bin.ihex | 1345 --- firmware/radeon/RV610_pfp.bin.ihex | 145 - firmware/radeon/RV620_me.bin.ihex | 1345 --- firmware/radeon/RV620_pfp.bin.ihex | 145 - firmware/radeon/RV630_me.bin.ihex | 1345 --- firmware/radeon/RV630_pfp.bin.ihex | 145 - firmware/radeon/RV635_me.bin.ihex | 1345 --- firmware/radeon/RV635_pfp.bin.ihex | 145 - firmware/radeon/RV670_me.bin.ihex | 1345 --- firmware/radeon/RV670_pfp.bin.ihex | 145 - firmware/radeon/RV710_me.bin.ihex | 341 - firmware/radeon/RV710_pfp.bin.ihex | 213 - firmware/radeon/RV730_me.bin.ihex | 341 - firmware/radeon/RV730_pfp.bin.ihex | 213 - firmware/radeon/RV770_me.bin.ihex | 341 - firmware/radeon/RV770_pfp.bin.ihex | 213 - firmware/sb16/alaw_main.csp.ihex | 87 - firmware/sb16/ima_adpcm_capture.csp.ihex | 121 - firmware/sb16/ima_adpcm_init.csp.ihex | 70 - firmware/sb16/ima_adpcm_playback.csp.ihex | 122 - firmware/sb16/mulaw_main.csp.ihex | 84 - firmware/sun/cassini.bin.ihex | 143 - firmware/tehuti/bdx.bin.ihex | 2678 ----- firmware/ti_3410.fw.ihex | 862 -- firmware/ti_5052.fw.ihex | 862 -- firmware/tigon/tg3.bin.ihex | 175 - firmware/tigon/tg3_tso.bin.ihex | 446 - firmware/tigon/tg3_tso5.bin.ihex | 252 - firmware/ttusb-budget/dspbootcode.bin.ihex | 820 -- firmware/vicam/firmware.H16 | 7 - firmware/whiteheat.HEX | 1097 -- firmware/whiteheat_loader.HEX | 314 - firmware/whiteheat_loader_debug.HEX | 403 - firmware/yam/1200.bin.ihex | 342 - firmware/yam/9600.bin.ihex | 342 - firmware/yamaha/ds1_ctrl.fw.ihex | 769 -- firmware/yamaha/ds1_dsp.fw.ihex | 9 - firmware/yamaha/ds1e_ctrl.fw.ihex | 769 -- firmware/yamaha/yss225_registers.bin.ihex | 998 -- scripts/Makefile.fwinst | 70 - 153 files changed, 1 insertion(+), 129170 deletions(-) commit f3ee9096fcaf55eae37dfb58603c4dbff6f0a7c9 Author: Christophe JAILLET Date: Thu Sep 14 22:44:24 2017 +0200 ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()' If this sanity check fails, we must free the memory that has already been allocated. So we must go to 'err' as in the other error handling parth of this function. Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum controls") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d5574ed5c8b1a1f31fcbdab5d26e15533c442ca Author: Christophe JAILLET Date: Thu Sep 14 22:44:12 2017 +0200 ASoC: topology: Fix a potential NULL pointer dereference in 'soc_tplg_dapm_widget_denum_create()' if 'se = kzalloc()' fails in the 'for' loop, we will branch to 'err'. But in this case, 'kc[i].private_value' will still be NULL. A NULL pointer dereference will then occur is the error handling path. In such a case, it is safe to just 'continue' in order to skip this entry and free the other ones. Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum controls") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown sound/soc/soc-topology.c | 3 +++ 1 file changed, 3 insertions(+) commit a2bc8dea9e96872e16248884367ad0013e040089 Merge: dff4d1f 77780f7 Author: Linus Torvalds Date: Thu Sep 14 13:46:33 2017 -0700 Merge tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Use Make-builtin $(abspath ...) helper to get absolute path - Add W=2 extra warning option to detect unused macros - Use more KCONFIG_CONFIG instead hard-coded .config - Fix bugs of tar*-pkg targets * tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: buildtar: do not print successful message if tar returns error kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled kbuild: Use KCONFIG_CONFIG in buildtar Kbuild: enable -Wunused-macros warning for "make W=2" kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd) commit dff4d1f6fe85627b7ce8e4c5291d8621a1995605 Merge: 503f045 c3ca015 Author: Linus Torvalds Date: Thu Sep 14 13:43:16 2017 -0700 Merge tag 'for-4.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Some request-based DM core and DM multipath fixes and cleanups - Constify a few variables in DM core and DM integrity - Add bufio optimization and checksum failure accounting to DM integrity - Fix DM integrity to avoid checking integrity of failed reads - Fix DM integrity to use init_completion - A couple DM log-writes target fixes - Simplify DAX flushing by eliminating the unnecessary flush abstraction that was stood up for DM's use. * tag 'for-4.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dax: remove the pmem_dax_ops->flush abstraction dm integrity: use init_completion instead of COMPLETION_INITIALIZER_ONSTACK dm integrity: make blk_integrity_profile structure const dm integrity: do not check integrity for failed read operations dm log writes: fix >512b sectorsize support dm log writes: don't use all the cpu while waiting to log blocks dm ioctl: constify ioctl lookup table dm: constify argument arrays dm integrity: count and display checksum failures dm integrity: optimize writing dm-bufio buffers that are partially changed dm rq: do not update rq partially in each ending bio dm rq: make dm-sq requeuing behavior consistent with dm-mq behavior dm mpath: complain about unsupported __multipath_map_bio() return values dm mpath: avoid that building with W=1 causes gcc 7 to complain about fall-through commit 503f04530fec97f93673ae9048b5312cc4455cfe Merge: 939ae58 23e9f4e Author: Linus Torvalds Date: Thu Sep 14 13:33:33 2017 -0700 Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: - make fbcon a built-time depency for fbdev (fbcon was tristate option before, now it is a bool) - this is a first step in preparations for making console_lock usage saner (currently it acts like the BKL for all things fbdev/fbcon) (Daniel Vetter) - add fbcon=margin: command line option to select the fbcon margin color (David Lechner) - add DMI quirk table for x86 systems which need fbcon rotation (devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works TW891) (Hans de Goede) - fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS EV3) (David Lechner) - enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek) - fix use after free in the error path of udlfb driver (Anton Vasilyev) - fix error return code handling in pxa3xx_gcu driver (Gustavo A. R. Silva) - fix bootparams.screeninfo arguments checking in vgacon (Jan H. Schönherr) - do not leak uninitialized padding in clk to userspace in the debug code of atyfb driver (Vladis Dronov) - fix compiler warnings in fbcon code and matroxfb driver (Arnd Bergmann) - convert fbdev susbsytem to using %pOF instead of full_name (Rob Herring) - structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A. R. Silva, Julia Lawall) - misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori Morimoto, Lynn Lei) * tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits) video/console: Update BIOS dates list for GPD win console rotation DMI quirk video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17 video: fbdev: sis: fix duplicated code for different branches video: fbdev: make fb_var_screeninfo const video: fbdev: aty: do not leak uninitialized padding in clk to userspace vgacon: Prevent faulty bootparams.screeninfo from causing harm video: fbdev: make fb_videomode const video/console: Add new BIOS date for GPD pocket to dmi quirk table fbcon: remove restriction on margin color video: ARM CLCD: constify amba_id video: fm2fb: constify zorro_device_id video: fbdev: annotate fb_fix_screeninfo with const and __initconst omapfb: constify omap_video_timings structures video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path fbdev: i810: make fb_ops const fbdev: matrox: make fb_ops const video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe() video: fbdev: Enable Xilinx FB for ZynqMP video: fbdev: Fix multiple style issues in xilinxfb video: fbdev: udlfb: constify usb_device_id. ... commit 939ae58960bb5ce0c51776aec38877a401c03bcf Merge: e75f801 4cb30b0 Author: Linus Torvalds Date: Thu Sep 14 13:28:30 2017 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add support for the watchdog on Meson8 and Meson8m2 - add support for MediaTek MT7623 and MT7622 SoC - add support for the r8a77995 wdt - explicitly request exclusive reset control for asm9260_wdt, zx2967_wdt, rt2880_wdt and mt7621_wdt - improvements to asm9260_wdt, aspeed_wdt, renesas_wdt and cadence_wdt - add support for reading freq via CCF + suspend/resume support for of_xilinx_wdt - constify watchdog_ops and various device-id structures - revert of commit 1fccb73011ea ("iTCO_wdt: all versions count down twice") (Bug 196509) * git://www.linux-watchdog.org/linux-watchdog: (40 commits) watchdog: mei_wdt: constify mei_cl_device_id watchdog: sp805: constify amba_id watchdog: ziirave: constify i2c_device_id watchdog: sc1200: constify pnp_device_id dt-bindings: watchdog: renesas-wdt: Add support for the r8a77995 wdt watchdog: renesas_wdt: update copyright dates watchdog: renesas_wdt: make 'clk' a variable local to probe() watchdog: renesas_wdt: consistently use RuntimePM for clock management watchdog: aspeed: Support configuration of external signal properties dt-bindings: watchdog: aspeed: External reset signal properties drivers/watchdog: Add optional ASPEED device tree properties drivers/watchdog: ASPEED reference dev tree properties for config watchdog: da9063_wdt: Simplify by removing unneeded struct... watchdog: bcm7038: Check the return value from clk_prepare_enable() watchdog: qcom: Check for platform_get_resource() failure watchdog: of_xilinx_wdt: Add suspend/resume support watchdog: of_xilinx_wdt: Add support for reading freq via CCF dt-bindings: watchdog: mediatek: add support for MediaTek MT7623 and MT7622 SoC watchdog: max77620_wdt: constify platform_device_id watchdog: pcwd_usb: constify usb_device_id ... commit e75f801f1febabfa3cf3dcb3a1a05bf3c243d41e Merge: ba76853 6faadbb Author: Linus Torvalds Date: Thu Sep 14 13:10:48 2017 -0700 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi update from Jean Delvare: "Mark all struct dmi_system_id instances const" * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: dmi: Mark all struct dmi_system_id instances const commit ba768535b467bb2d342a1581450394f1148dc8ae Merge: 7a95bdb 79d2c8b Author: Linus Torvalds Date: Thu Sep 14 13:01:09 2017 -0700 Merge tag 'pinctrl-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "This slew of fixes for pin control was noticed and patched up early, so to get the annoyance out of the way for -rc1 it would make sense to send them already. - Fix a build include in the Uniphier driver to keep pace with ongoing refactorings. - Fix a slew of minor semantic and syntactic issues as well as stricting up Kconfig for the new Spreadtrum driver. - Fix the GPIO interrupt set-up on the Marvell 37xx Armada as fallout for dynamically allocating irq descriptors from the core. (Also tagged for stable.) - Fix AMD register suspend/resume state spool/unspooling so that wakeup works as it should. (Also tagged for stable.)" * tag 'pinctrl-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl/amd: save pin registers over suspend/resume pinctrl: armada-37xx: Fix gpio interrupt setup pinctrl: sprd: fix off by one bugs pinctrl: sprd: check for allocation failure pinctrl: sprd: Restrict PINCTRL_SPRD to ARCH_SPRD or COMPILE_TEST pinctrl: sprd: fix build errors and dependencies pinctrl: sprd: make three local functions static pinctrl: uniphier: include instead of commit 7a95bdb092c66b6473aa2fc848862ae557ab08f7 Merge: 11a19c7 5f48f0b Author: Linus Torvalds Date: Thu Sep 14 12:25:34 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "A few leftovers" * emailed patches from Andrew Morton : mm, page_owner: skip unnecessary stack_trace entries arm64: stacktrace: avoid listing stacktrace functions in stacktrace mm: treewide: remove GFP_TEMPORARY allocation flag IB/mlx4: fix sprintf format warning fscache: fix fscache_objlist_show format processing lib/test_bitmap.c: use ULL suffix for 64-bit constants procfs: remove unused variable drivers/media/cec/cec-adap.c: fix build with gcc-4.4.4 idr: remove WARN_ON_ONCE() when trying to replace negative ID commit 0b08273c8ab7e688832120c4817b1adfdc56e231 Author: Markus Elfring Date: Thu Aug 17 21:35:16 2017 +0200 orangefs: Adjust three 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 affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Mike Marshall fs/orangefs/acl.c | 2 +- fs/orangefs/xattr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 5e273a0e06ee5a50bb9cd40026177feca060c101 Author: Markus Elfring Date: Thu Aug 17 21:18:01 2017 +0200 orangefs: Use kcalloc() in orangefs_prepare_cdm_array() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 07a258531c7550f8bb481dfe2ec12bb876224487 Author: Markus Elfring Date: Thu Aug 17 21:00:07 2017 +0200 orangefs: Delete error messages for a failed memory allocation in five functions Omit an extra message 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: Mike Marshall fs/orangefs/devorangefs-req.c | 9 +++------ fs/orangefs/orangefs-bufmap.c | 10 ++-------- fs/orangefs/orangefs-debugfs.c | 1 - fs/orangefs/orangefs-mod.c | 1 - fs/orangefs/super.c | 4 +--- 5 files changed, 6 insertions(+), 19 deletions(-) commit 121744440582004a1751c688a2622e5dfeaae09d Author: Julia Lawall Date: Wed Aug 2 10:35:14 2017 +0200 orangefs: constify xattr_handler structure The xattr_handler structure is only stored in an array of const structures. Thus the xattr_handler structure itself can be const. Signed-off-by: Julia Lawall Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49e5571324a81ddbb0d06ff38f698534a2a47e33 Author: Jeff Layton Date: Wed Apr 12 08:06:02 2017 -0400 orangefs: don't call filemap_write_and_wait from fsync Orangefs doesn't do buffered writes yet, so there's no point in initiating and waiting for writeback. Signed-off-by: Jeff Layton Signed-off-by: Mike Marshall fs/orangefs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5f13e58767a53ebb54265e03c0c4a67650286263 Author: Dan Carpenter Date: Mon May 22 15:08:31 2017 +0300 orangefs: off by ones in xattr size checks A previous patch which claimed to remove off by ones actually introduced them. strlen() returns the length of the string not including the NUL character. We are using strcpy() to copy "name" into a buffer which is ORANGEFS_MAX_XATTR_NAMELEN characters long. We should make sure to leave space for the NUL, otherwise we're writing one character beyond the end of the buffer. Fixes: e675c5ec51fe ("orangefs: clean up oversize xattr validation") Signed-off-by: Dan Carpenter Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba5e79ea183a2b809a9bbd2f8d76dc69ca32a92b Author: Mike Marshall Date: Thu Aug 10 13:56:45 2017 -0400 orangefs: documentation clean up Signed-off-by: Mike Marshall Documentation/filesystems/orangefs.txt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4bef69000d93799b6b3983c45c81b3cb2cceaa99 Author: Mike Marshall Date: Thu Aug 10 13:50:50 2017 -0400 orangefs: react properly to posix_acl_update_mode's aftermath. posix_acl_update_mode checks to see if the permissions described by the ACL can be encoded into the object's mode. If so, it sets "acl" to NULL and "mode" to the new desired value. Prior to this patch we failed to actually propagate the new mode back to the server. Signed-off-by: Mike Marshall fs/orangefs/acl.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit b5accbb0dfae36d8d36cd882096943c98d5ede15 Author: Jan Kara Date: Thu Jun 22 15:31:13 2017 +0200 orangefs: Don't clear SGID when inheriting ACLs When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the owning group of 'DIR0'). However when 'DIR0' also has some default ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on 'DIR1' to get cleared if user is not member of the owning group. Fix the problem by creating __orangefs_set_acl() function that does not call posix_acl_update_mode() and use it when inheriting ACLs. That prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: stable@vger.kernel.org CC: Mike Marshall CC: pvfs2-developers@beowulf-underground.org Signed-off-by: Jan Kara Signed-off-by: Mike Marshall fs/orangefs/acl.c | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 4cf97582b46f123a4b7cd88d999f1806c2eb4093 Author: Jean Delvare Date: Mon Sep 11 17:43:56 2017 +0200 drm/amdgpu: revert tile table update for oland Several users have complained that the tile table update broke Oland support. Despite several attempts to fix it, the root cause is still unknown at this point and no solution is available. As it is not acceptable to leave a known regression breaking a major functionality in the kernel for several releases, let's just reverse this optimization for now. It can be implemented again later if and only if the breakage is understood and fixed. As there were no complaints for Hainan so far, only the Oland part of the offending commit is reverted. Optimization is preserved on Hainan, so this commit isn't an actual revert of the original. This fixes bug #194761: https://bugzilla.kernel.org/show_bug.cgi?id=194761 Reviewed-by: Marek Olšák Signed-off-by: Jean Delvare Fixes: f8d9422ef80c ("drm/amdgpu: update tile table for oland/hainan") Cc: Flora Cui Cc: Junwei Zhang Cc: Alex Deucher Cc: Marek Olšák Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 189 +++++++++++++++++++++++++++++++++- 1 file changed, 188 insertions(+), 1 deletion(-) commit 23f4822207e04c5f78924fe0e5193c14ba720b4c Author: Colin Ian King Date: Thu Sep 14 17:01:25 2017 +0100 tg3: clean up redundant initialization of tnapi tnapi is being initialized and then immediately updated and hence the initialiation is redundant. Clean up the warning by moving the declaration and initialization to the inside of the for-loop. Cleans up clang scan-build warning: warning: Value stored to 'tnapi' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11a19c7b099f96d00a8dec52bfbb8475e89b6745 Author: Tim Chen Date: Fri Aug 25 09:13:55 2017 -0700 sched/wait: Introduce wakeup boomark in wake_up_page_bit Now that we have added breaks in the wait queue scan and allow bookmark on scan position, we put this logic in the wake_up_page_bit function. We can have very long page wait list in large system where multiple pages share the same wait list. We break the wake up walk here to allow other cpus a chance to access the list, and not to disable the interrupts when traversing the list for too long. This reduces the interrupt and rescheduling latency, and excessive page wait queue lock hold time. [ v2: Remove bookmark_wake_function ] Signed-off-by: Tim Chen Signed-off-by: Linus Torvalds include/linux/wait.h | 2 ++ kernel/sched/wait.c | 7 +++++++ mm/filemap.c | 22 +++++++++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) commit 2554db916586b228ce93e6f74a12fd7fe430a004 Author: Tim Chen Date: Fri Aug 25 09:13:54 2017 -0700 sched/wait: Break up long wake list walk We encountered workloads that have very long wake up list on large systems. A waker takes a long time to traverse the entire wake list and execute all the wake functions. We saw page wait list that are up to 3700+ entries long in tests of large 4 and 8 socket systems. It took 0.8 sec to traverse such list during wake up. Any other CPU that contends for the list spin lock will spin for a long time. It is a result of the numa balancing migration of hot pages that are shared by many threads. Multiple CPUs waking are queued up behind the lock, and the last one queued has to wait until all CPUs did all the wakeups. The page wait list is traversed with interrupt disabled, which caused various problems. This was the original cause that triggered the NMI watch dog timer in: https://patchwork.kernel.org/patch/9800303/ . Only extending the NMI watch dog timer there helped. This patch bookmarks the waker's scan position in wake list and break the wake up walk, to allow access to the list before the waker resume its walk down the rest of the wait list. It lowers the interrupt and rescheduling latency. This patch also provides a performance boost when combined with the next patch to break up page wakeup list walk. We saw 22% improvement in the will-it-scale file pread2 test on a Xeon Phi system running 256 threads. [ v2: Merged in Linus' changes to remove the bookmark_wake_function, and simply access to flags. ] Reported-by: Kan Liang Tested-by: Kan Liang Signed-off-by: Tim Chen Signed-off-by: Linus Torvalds include/linux/wait.h | 1 + kernel/sched/wait.c | 78 ++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 15 deletions(-) commit a5135676bbf18ab4caed9effd321bd126f9ee11f Author: Tobias Klauser Date: Thu Sep 14 13:22:25 2017 +0200 tls: make tls_sw_free_resources static Make the needlessly global function tls_sw_free_resources static to fix a gcc/sparse warning. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 488e32f1981e506976d666b3772d6ccc8b726fee Author: Ladi Prosek Date: Thu Sep 14 11:50:07 2017 +0200 KVM: trace events: update list of exit reasons Adding entries for exit reasons 23 - 27: KVM_EXIT_EPR KVM_EXIT_SYSTEM_EVENT KVM_EXIT_S390_STSI KVM_EXIT_IOAPIC_EOI KVM_EXIT_HYPERV Signed-off-by: Ladi Prosek Reviewed-by: Cornelia Huck Signed-off-by: Radim Krčmář include/trace/events/kvm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9a6e7c39810e4a8bc7fc95056cefb40583fe07ef Author: Wanpeng Li Date: Thu Sep 14 03:54:16 2017 -0700 KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously qemu-system-x86-8600 [004] d..1 7205.687530: kvm_entry: vcpu 2 qemu-system-x86-8600 [004] .... 7205.687532: kvm_exit: reason EXCEPTION_NMI rip 0xffffffffa921297d info ffffeb2c0e44e018 80000b0e qemu-system-x86-8600 [004] .... 7205.687532: kvm_page_fault: address ffffeb2c0e44e018 error_code 0 qemu-system-x86-8600 [004] .... 7205.687620: kvm_try_async_get_page: gva = 0xffffeb2c0e44e018, gfn = 0x427e4e qemu-system-x86-8600 [004] .N.. 7205.687628: kvm_async_pf_not_present: token 0x8b002 gva 0xffffeb2c0e44e018 kworker/4:2-7814 [004] .... 7205.687655: kvm_async_pf_completed: gva 0xffffeb2c0e44e018 address 0x7fcc30c4e000 qemu-system-x86-8600 [004] .... 7205.687703: kvm_async_pf_ready: token 0x8b002 gva 0xffffeb2c0e44e018 qemu-system-x86-8600 [004] d..1 7205.687711: kvm_entry: vcpu 2 After running some memory intensive workload in guest, I catch the kworker which completes the GUP too quickly, and queues an "Page Ready" #PF exception after the "Page not Present" exception before the next vmentry as the above trace which will result in #DF injected to guest. This patch fixes it by clearing the queue for "Page not Present" if "Page Ready" occurs before the next vmentry since the GUP has already got the required page and shadow page table has already been fixed by "Page Ready" handler. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Fixes: 7c90705bf2a3 ("KVM: Inject asynchronous page fault into a PV guest if page is swapped out.") [Changed indentation and added clearing of injected. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit aeb068c57214858b638d5ee627bb4a831f98771e Author: Pierre-Yves MORDRET Date: Thu Sep 14 16:28:37 2017 +0200 i2c: i2c-stm32f7: add driver This patch adds initial support for the STM32F7 I2C controller. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-stm32f7.c | 972 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 983 insertions(+) commit df8c847b53539cc1b05cf3bd8f446194aedfeafc Author: Pierre-Yves MORDRET Date: Thu Sep 14 16:28:36 2017 +0200 i2c: i2c-stm32f4: use generic definition of speed enum This patch uses a more generic definition of speed enum for i2c-stm32f4 driver. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Reviewed-by: Ludovic BARRE Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32.h | 20 ++++++++++++++++++++ drivers/i2c/busses/i2c-stm32f4.c | 18 +++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) commit edcd2ae8ebd4c6882f426e8430f28004ed22eb66 Author: Pierre-Yves MORDRET Date: Thu Sep 14 16:28:35 2017 +0200 dt-bindings: i2c-stm32: Document the STM32F7 I2C bindings This patch adds the documentation of device tree bindings for STM32F7 I2C Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Acked-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-stm32.txt | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 648d453dd421af252555cc0094eb6980b2717a85 Merge: a5f01f8 67f8a8c Author: Radim Krčmář Date: Thu Sep 14 17:21:10 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc Bug fixes for stable. commit a5f01f8e9756b40a56e351f98b3fae6d235b834f Author: Wanpeng Li Date: Wed Sep 13 04:04:01 2017 -0700 KVM: X86: Don't block vCPU if there is pending exception Don't block vCPU if there is pending exception. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 3 +++ 1 file changed, 3 insertions(+) commit 67034bb9dd5ecc0171bdacfbd31ebf7c2634df98 Author: Suravee Suthikulpanit Date: Tue Sep 12 10:42:42 2017 -0500 KVM: SVM: Add irqchip_split() checks before enabling AVIC SVM AVIC hardware accelerates guest write to APIC_EOI register (for edge-trigger interrupt), which means it does not trap to KVM. So, only enable SVM AVIC only in split irqchip mode. (e.g. launching qemu w/ option '-machine kernel_irqchip=split'). Suggested-by: Paolo Bonzini Signed-off-by: Suravee Suthikulpanit Fixes: 44a95dae1d22 ("KVM: x86: Detect and Initialize AVIC support") [Removed pr_debug - Radim.] Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6faadbbb7f9da70ce484f98f72223c20125a1009 Author: Christoph Hellwig Date: Thu Sep 14 11:59:30 2017 +0200 dmi: Mark all struct dmi_system_id instances const ... and __initconst if applicable. Based on similar work for an older kernel in the Grsecurity patch. [JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it] Signed-off-by: Christoph Hellwig Signed-off-by: Jean Delvare arch/x86/kernel/acpi/boot.c | 4 ++-- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/io_delay.c | 2 +- arch/x86/kernel/reboot.c | 2 +- arch/x86/pci/irq.c | 2 +- arch/x86/power/cpu.c | 2 +- drivers/acpi/acpi_video.c | 2 +- drivers/acpi/blacklist.c | 4 ++-- drivers/acpi/bus.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/osi.c | 2 +- drivers/acpi/pci_slot.c | 2 +- drivers/acpi/processor_pdc.c | 2 +- drivers/acpi/sleep.c | 2 +- drivers/acpi/thermal.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/cpufreq/powernow-k7.c | 2 +- drivers/firmware/google/gsmi.c | 2 +- drivers/firmware/google/memconsole-x86-legacy.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/applesmc.c | 2 +- drivers/hwmon/dell-smm-hwmon.c | 4 ++-- drivers/input/touchscreen/htcpen.c | 2 +- drivers/leds/leds-clevo-mail.c | 2 +- drivers/leds/leds-ss4200.c | 2 +- drivers/mfd/kempld-core.c | 2 +- drivers/net/ethernet/marvell/skge.c | 2 +- drivers/net/ethernet/via/via-rhine.c | 2 +- drivers/pci/pcie/portdrv_pci.c | 2 +- drivers/pci/quirks.c | 2 +- drivers/platform/chrome/chromeos_laptop.c | 2 +- drivers/platform/chrome/chromeos_pstore.c | 2 +- drivers/platform/chrome/cros_ec_lpc.c | 2 +- drivers/platform/x86/compal-laptop.c | 2 +- drivers/platform/x86/hdaps.c | 2 +- drivers/platform/x86/ibm_rtl.c | 2 +- drivers/platform/x86/intel_oaktrail.c | 2 +- drivers/platform/x86/mlx-platform.c | 2 +- drivers/platform/x86/msi-laptop.c | 2 +- drivers/platform/x86/samsung-laptop.c | 2 +- drivers/platform/x86/samsung-q10.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/platform/x86/toshiba-wmi.c | 2 +- drivers/pnp/pnpbios/core.c | 2 +- drivers/tty/serial/pch_uart.c | 2 +- drivers/video/backlight/kb3886_bl.c | 2 +- sound/soc/codecs/rt5645.c | 2 +- 48 files changed, 52 insertions(+), 52 deletions(-) commit ab5fe3ff38ff9653490910cc71dbbedc95a86e41 Author: Thomas Gleixner Date: Tue Sep 12 21:37:23 2017 +0200 watchdog/hardlockup: Clean up hotplug locking mess All watchdog thread related functions are delegated to the smpboot thread infrastructure, which handles serialization against CPU hotplug correctly. The sysctl interface is completely decoupled from anything which requires CPU hotplug protection. No need to protect the sysctl writes against cpu hotplug anymore. Remove it and add the now required protection to the powerpc arch_nmi_watchdog implementation. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170912194148.418497420@linutronix.de Signed-off-by: Ingo Molnar arch/powerpc/kernel/watchdog.c | 2 ++ kernel/watchdog.c | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) commit a33d44843d4574ec05bec39527d8a87b7af2072c Author: Thomas Gleixner Date: Tue Sep 12 21:37:22 2017 +0200 watchdog/hardlockup/perf: Simplify deferred event destroy Now that all functionality is properly serialized against CPU hotplug, remove the extra per cpu storage which holds the disabled events for cleanup. The core makes sure that cleanup happens before new events are created. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194148.340708074@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog_hld.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 146c9d0e9dfdb62ed6afd43cc263efafbbfd1dcf Author: Thomas Gleixner Date: Tue Sep 12 21:37:21 2017 +0200 watchdog/hardlockup/perf: Use new perf CPU enable mechanism Get rid of the hodgepodge which tries to be smart about perf being unavailable and error printout rate limiting. That's all not required simply because this is never invoked when the perf NMI watchdog is not functional. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194148.259651788@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 4 ++- kernel/watchdog_hld.c | 88 +++------------------------------------------------ 2 files changed, 8 insertions(+), 84 deletions(-) commit 2a1b8ee4f5665b4291e43e4a25d964c3eb2f4c32 Author: Thomas Gleixner Date: Tue Sep 12 21:37:20 2017 +0200 watchdog/hardlockup/perf: Implement CPU enable replacement watchdog_nmi_enable() is an unparseable mess, Provide a clean perf specific implementation, which will be used when the existing setup/teardown mess is replaced. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194148.180215498@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 2 ++ kernel/watchdog_hld.c | 11 +++++++++++ 2 files changed, 13 insertions(+) commit a994a3147e4c0c9c50a46e6cace7586254975e20 Author: Thomas Gleixner Date: Tue Sep 12 21:37:19 2017 +0200 watchdog/hardlockup/perf: Implement init time detection of perf Use the init time detection of the perf NMI watchdog to determine whether the perf NMI watchdog is functional. If not disable it permanentely. It won't come back magically at runtime. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194148.099799541@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 178b9f7a36d2c74a38274b66dd89f53611298a19 Author: Thomas Gleixner Date: Tue Sep 12 21:37:18 2017 +0200 watchdog/hardlockup/perf: Implement init time perf validation The watchdog tries to create perf events even after it figured out that perf is not functional or the requested event is not supported. That's braindead as this can be done once at init time and if not supported the NMI watchdog can be turned off unconditonally. Implement the perf hardlockup detector functionality for that. This creates a new event create function, which will replace the unholy mess of the existing one in later patches. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194148.019090547@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 8 ++++++-- kernel/watchdog_hld.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) commit 091549858ed881e5f3054374af4f5b1cac681d50 Author: Thomas Gleixner Date: Tue Sep 12 21:37:17 2017 +0200 watchdog/core: Get rid of the racy update loop Letting user space poke directly at variables which are used at run time is stupid and causes a lot of race conditions and other issues. Seperate the user variables and on change invoke the reconfiguration, which then stops the watchdogs, reevaluates the new user value and restarts the watchdogs with the new parameters. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.939985640@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 95 +++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 48 deletions(-) commit 6592ad2fcc8f15b4f99b36c1db7d9f65510c203b Author: Thomas Gleixner Date: Tue Sep 12 21:37:16 2017 +0200 watchdog/core, powerpc: Make watchdog_nmi_reconfigure() two stage Both the perf reconfiguration and the powerpc watchdog_nmi_reconfigure() need to be done in two steps. 1) Stop all NMIs 2) Read the new parameters and start NMIs Right now watchdog_nmi_reconfigure() is a combination of both. To allow a clean reconfiguration add a 'run' argument and split the functionality in powerpc. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170912194147.862865570@linutronix.de Signed-off-by: Ingo Molnar arch/powerpc/kernel/watchdog.c | 17 +++++++++-------- include/linux/nmi.h | 2 ++ kernel/watchdog.c | 31 ++++++++++++++++++++++--------- 3 files changed, 33 insertions(+), 17 deletions(-) commit 7feeb9cd4f5b34476ffb9e6d58d58c5416375b19 Author: Thomas Gleixner Date: Tue Sep 12 21:37:15 2017 +0200 watchdog/sysctl: Clean up sysctl variable name space Reflect that these variables are user interface related and remove the whitespace damage in the sysctl table while at it. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.783210221@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 16 ++++++++-------- kernel/sysctl.c | 16 ++++++++-------- kernel/watchdog.c | 41 ++++++++++++++++++++--------------------- 3 files changed, 36 insertions(+), 37 deletions(-) commit 51d4052b01ca555e0d1d5fe297b309beb6c64aa0 Author: Thomas Gleixner Date: Tue Sep 12 21:37:14 2017 +0200 watchdog/sysctl: Get rid of the #ifdeffery The sysctl of the nmi_watchdog file prevents writes by setting: min = max = 0 if none of the users is enabled. That involves ifdeffery and is competely non obvious. If none of the facilities is enabeld, then the file can simply be made read only. Move the ifdeffery into the header and use a constant for file permissions. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.706073616@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 6 ++++++ kernel/sysctl.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 3b371b5936e7777c819619c00ca60f196a8e13fa Author: Thomas Gleixner Date: Tue Sep 12 21:37:13 2017 +0200 watchdog/core: Clean up header mess Having the same #ifdef in various places does not make it more readable. Collect stuff into one place. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.627096864@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 60 ++++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 35 deletions(-) commit e8b62b2dd14f8f2427856ba24cb7db922bda9bfd Author: Thomas Gleixner Date: Tue Sep 12 21:37:12 2017 +0200 watchdog/core: Further simplify sysctl handling Use a single function to update sysctl changes. This is not a high frequency user space interface and it's root only. Preparatory patch to cleanup the sysctl variable handling. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.549114957@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit d57108d4f6791291e89d980e7f7a3566c32ab188 Author: Thomas Gleixner Date: Tue Sep 12 21:37:11 2017 +0200 watchdog/core: Get rid of the thread teardown/setup dance The lockup detector reconfiguration tears down all watchdog threads when the watchdog is disabled and sets them up again when its enabled. That's a pointless exercise. The watchdog threads are not consuming an insane amount of resources, so it's enough to set them up at init time and keep them in parked position when the watchdog is disabled and unpark them when it is reenabled. The smpboot thread infrastructure takes care of keeping the force parked threads in place even across cpu hotplug. Aside of that the code implements the park/unpark facility of smp hotplug threads on its own, which is even more pointless. We have functionality in the smpboot thread code to do so. Use the new thread management functions and get rid of the unholy mess. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.470370113@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 190 ++++++------------------------------------------------ 1 file changed, 19 insertions(+), 171 deletions(-) commit 2eb2527f847d1bd8d8fb9db1e8139db5d6eddb36 Author: Thomas Gleixner Date: Tue Sep 12 21:37:10 2017 +0200 watchdog/core: Create new thread handling infrastructure The lockup detector reconfiguration tears down all watchdog threads when the watchdog is disabled and sets them up again when its enabled. That's a pointless exercise. The watchdog threads are not consuming an insane amount of resources, so it's enough to set them up at init time and keep them in parked position when the watchdog is disabled and unpark them when it is reenabled. The smpboot thread infrastructure takes care of keeping the force parked threads in place even across cpu hotplug. Another horrible mechanism are the open coded park/unpark loops which are used for reconfiguration of the watchdog. The smpboot infrastructure allows exactly the same via smpboot_update_cpumask_thread_percpu(), which is cpu hotplug safe. Using that instead of the open coded loops allows to get rid of the hotplug locking mess in the watchdog code. Implement a clean infrastructure which allows to replace the open coded nonsense. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.377182587@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 0d85923c7a81719567311ba0eae8ecb2efd4c8a0 Author: Thomas Gleixner Date: Tue Sep 12 21:37:09 2017 +0200 smpboot/threads, watchdog/core: Avoid runtime allocation smpboot_update_cpumask_threads_percpu() allocates a temporary cpumask at runtime. This is suboptimal because the call site needs more code size for proper error handling than a statically allocated temporary mask requires data size. Add static temporary cpumask. The function is globaly serialized, so no further protection required. Remove the half baken error handling in the watchdog code and get rid of the export as there are no in tree modular users of that function. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.297288838@linutronix.de Signed-off-by: Ingo Molnar include/linux/smpboot.h | 4 ++-- kernel/smpboot.c | 22 +++++++--------------- kernel/watchdog.c | 21 +++++---------------- 3 files changed, 14 insertions(+), 33 deletions(-) commit 05ba3de74a3f499dcaa37b186220aaf174c95a4b Author: Thomas Gleixner Date: Tue Sep 12 21:37:08 2017 +0200 watchdog/core: Split out cpumask write function Split the write part of the cpumask proc handler out into a separate helper to avoid deep indentation. This also reduces the patch complexity in the following cleanups. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.218075991@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 368a7e2ce8ff0ddcdcb37eadb76530b033f6eb2d Author: Thomas Gleixner Date: Tue Sep 12 21:37:07 2017 +0200 watchdog/core: Clean up the #ifdef maze The #ifdef maze in this file is horrible, group stuff at least a bit so one can figure out what belongs to what. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.139629546@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 2b9d7f233b835663cbc7b6b3f88dd20f61118d1e Author: Thomas Gleixner Date: Tue Sep 12 21:37:06 2017 +0200 watchdog/core: Clean up stub functions Having stub functions which take a full page is not helping the readablility of code. Condense them and move the doubled #ifdef variant into the SYSFS section. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194147.045545271@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 68 ++++++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 46 deletions(-) commit 01f0a02701cbcf32d22cfc9d1ab9a3f0ff2ba68c Author: Thomas Gleixner Date: Tue Sep 12 21:37:05 2017 +0200 watchdog/core: Remove the park_in_progress obfuscation Commit: b94f51183b06 ("kernel/watchdog: prevent false hardlockup on overloaded system") tries to fix the following issue: proc_write() set_sample_period() <--- New sample period becoms visible <----- Broken starts proc_watchdog_update() watchdog_enable_all_cpus() watchdog_hrtimer_fn() update_watchdog_all_cpus() restart_timer(sample_period) watchdog_park_threads() thread->park() disable_nmi() <----- Broken ends The reason why this is broken is that the update of the watchdog threshold becomes immediately effective and visible for the hrtimer function which uses that value to rearm the timer. But the NMI/perf side still uses the old value up to the point where it is disabled. If the rate has been lowered then the NMI can run fast enough to 'detect' a hard lockup because the timer has not fired due to the longer period. The patch 'fixed' this by adding a variable: proc_write() set_sample_period() <----- Broken starts proc_watchdog_update() watchdog_enable_all_cpus() watchdog_hrtimer_fn() update_watchdog_all_cpus() restart_timer(sample_period) watchdog_park_threads() park_in_progress = 1 <----- Broken ends nmi_watchdog() if (park_in_progress) return; The only effect of this variable was to make the window where the breakage can hit small enough that it was not longer observable in testing. From a correctness point of view it is a pointless bandaid which merily papers over the root cause: the unsychronized update of the variable. Looking deeper into the related code pathes unearthed similar problems in the watchdog_start()/stop() functions. watchdog_start() perf_nmi_event_start() hrtimer_start() watchdog_stop() hrtimer_cancel() perf_nmi_event_stop() In both cases the call order is wrong because if the tasks gets preempted or the VM gets scheduled out long enough after the first call, then there is a chance that the next NMI will see a stale hrtimer interrupt count and trigger a false positive hard lockup splat. Get rid of park_in_progress so the code can be gradually deobfuscated and pruned from several layers of duct tape papering over the root cause, which has been either ignored or not understood at all. Once this is removed the underlying problem will be fixed by rewriting the proc interface to do a proper synchronized update. Address the start/stop() ordering problem as well by reverting the call order, so this part is at least correct now. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1709052038270.2393@nanos Signed-off-by: Ingo Molnar include/linux/nmi.h | 1 - kernel/watchdog.c | 37 +++++++++++++++++-------------------- kernel/watchdog_hld.c | 7 ++----- 3 files changed, 19 insertions(+), 26 deletions(-) commit 941154bd6937a710ae9193a3c733c0029e5ae7b8 Author: Thomas Gleixner Date: Tue Sep 12 21:37:04 2017 +0200 watchdog/hardlockup/perf: Prevent CPU hotplug deadlock The following deadlock is possible in the watchdog hotplug code: cpus_write_lock() ... takedown_cpu() smpboot_park_threads() smpboot_park_thread() kthread_park() ->park() := watchdog_disable() watchdog_nmi_disable() perf_event_release_kernel(); put_event() _free_event() ->destroy() := hw_perf_event_destroy() x86_release_hardware() release_ds_buffers() get_online_cpus() when a per cpu watchdog perf event is destroyed which drops the last reference to the PMU hardware. The cleanup code there invokes get_online_cpus() which instantly deadlocks because the hotplug percpu rwsem is write locked. To solve this add a deferring mechanism: cpus_write_lock() kthread_park() watchdog_nmi_disable(deferred) perf_event_disable(event); move_event_to_deferred(event); .... cpus_write_unlock() cleaup_deferred_events() perf_event_release_kernel() This is still properly serialized against concurrent hotplug via the cpu_add_remove_lock, which is held by the task which initiated the hotplug event. This is also used to handle event destruction when the watchdog threads are parked via other mechanisms than CPU hotplug. Analyzed-by: Peter Zijlstra Reported-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.884469246@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 6 ++++++ kernel/cpu.c | 6 ++++++ kernel/watchdog.c | 25 +++++++++++++++++++++++++ kernel/watchdog_hld.c | 34 ++++++++++++++++++++++++++++------ 4 files changed, 65 insertions(+), 6 deletions(-) commit 20d853fd0703b1d73c35a22024c0d4fcbcc57c8c Author: Thomas Gleixner Date: Tue Sep 12 21:37:03 2017 +0200 watchdog/hardlockup/perf: Remove broken self disable on failure The self disabling feature is broken vs. CPU hotplug locking: CPU 0 CPU 1 cpus_write_lock(); cpu_up(1) wait_for_completion() .... unpark_watchdog() ->unpark() perf_event_create() <- fails watchdog_enable &= ~NMI_WATCHDOG; .... cpus_write_unlock(); CPU 2 cpus_write_lock() cpu_down(2) wait_for_completion() wakeup(watchdog); watchdog() if (!(watchdog_enable & NMI_WATCHDOG)) watchdog_nmi_disable() perf_event_disable() .... cpus_read_lock(); stop_smpboot_threads() park_watchdog(); wait_for_completion(watchdog->parked); Result: End of hotplug and instantaneous full lockup of the machine. There is a similar problem with disabling the watchdog via the user space interface as the sysctl function fiddles with watchdog_enable directly. It's very debatable whether this is required at all. If the watchdog works nicely on N CPUs and it fails to enable on the N + 1 CPU either during hotplug or because the user space interface disabled it via sysctl cpumask and then some perf user grabbed the counter which is then unavailable for the watchdog when the sysctl cpumask gets changed back. There is no real justification for this. One of the reasons WHY this is done is the utter stupidity of the init code of the perf NMI watchdog. Instead of checking upfront at boot whether PERF is available and functional at all, it just does this check at run time over and over when user space fiddles with the sysctl. That's broken beyond repair along with the idiotic error code dependent warn level printks and the even more silly printk rate limiting. If the init code checks whether perf works at boot time, then this mess can be more or less avoided completely. Perf does not come magically into life at runtime. Brain usage while coding is overrated. Remove the cruft and add a temporary safe guard which gets removed later. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.806708429@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 15 --------------- kernel/watchdog_hld.c | 20 +++++++------------- 2 files changed, 7 insertions(+), 28 deletions(-) commit 7a3558200739e1378800a7a6d7f63c031115f7a4 Author: Thomas Gleixner Date: Tue Sep 12 21:37:02 2017 +0200 watchdog/core: Mark hardlockup_detector_disable() __init The function is only used by the KVM init code. Mark it __init to prevent creative abuse. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.727134632@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 946d197794b23202b8b46c43016747c72fe23393 Author: Thomas Gleixner Date: Tue Sep 12 21:37:01 2017 +0200 watchdog/core: Rename watchdog_proc_mutex Following patches will use the mutex for other purposes as well. Rename it as it is not longer a proc specific thing. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.647714850@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b7a349819d4b9b5db64e523351e66a79a758eaa5 Author: Thomas Gleixner Date: Tue Sep 12 21:37:00 2017 +0200 watchdog/core: Rework CPU hotplug locking The watchdog proc interface causes extensive recursive locking of the CPU hotplug percpu rwsem, which is deadlock prone. Replace the get/put_online_cpus() pairs with cpu_hotplug_disable()/enable() calls for now. Later patches will remove that requirement completely. Reported-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.568079057@linutronix.de Signed-off-by: Ingo Molnar kernel/watchdog.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5490125d77a43016b26f629d4b485e2c62172551 Author: Thomas Gleixner Date: Tue Sep 12 21:36:59 2017 +0200 watchdog/core: Remove broken suspend/resume interfaces This interface has several issues: - It's causing recursive locking of the hotplug lock. - It's complete overkill to teardown all threads and then recreate them The same can be achieved with the simple hardlockup_detector_perf_stop / restart() interfaces. The abuse from the busy looping poweroff() loop of PARISC has been solved as well. Remove the cruft. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.487537732@linutronix.de Signed-off-by: Ingo Molnar arch/powerpc/kernel/watchdog.c | 3 -- include/linux/nmi.h | 12 ------ kernel/watchdog.c | 89 +----------------------------------------- 3 files changed, 1 insertion(+), 103 deletions(-) commit 47bb4baf7df43ac8bbc51c24022466972ba29ef1 Author: Thomas Gleixner Date: Tue Sep 12 21:36:58 2017 +0200 parisc, watchdog/core: Use lockup_detector_stop() The broken lockup_detector_suspend/resume() interface is going away. Use the new lockup_detector_soft_poweroff() interface to stop the watchdog from the busy looping power off routine. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Helge Deller Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Cc: linux-parisc@vger.kernel.org Link: http://lkml.kernel.org/r/20170912194146.407385557@linutronix.de Signed-off-by: Ingo Molnar arch/parisc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6554fd8cf06db86f861bb24d7487b2873ca444c4 Author: Thomas Gleixner Date: Tue Sep 12 21:36:57 2017 +0200 watchdog/core: Provide interface to stop from poweroff() PARISC has a a busy looping power off routine. If the watchdog is enabled the watchdog timer will still fire, but the thread is not running, which causes the softlockup watchdog to trigger. Provide a interface which allows to turn the watchdog off. Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Helge Deller Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Ulrich Obergfell Cc: linux-parisc@vger.kernel.org Link: http://lkml.kernel.org/r/20170912194146.327343752@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 6 +++--- kernel/watchdog.c | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) commit 2406e3b166eee42777a6b0b38f52f924454474d7 Author: Peter Zijlstra Date: Tue Sep 12 21:36:56 2017 +0200 perf/x86/intel, watchdog/core: Sanitize PMU HT bug workaround The lockup_detector_suspend/resume() interface is broken in several ways especially as it results in recursive locking of the CPU hotplug lock. Use the new stop/restart interface in the perf NMI watchdog to temporarily disable and reenable the already active watchdog events. That's enough to handle it. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.247141871@linutronix.de Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d0b6e0a8ef24b1b07078ababe5d91bcdf4f4264a Author: Peter Zijlstra Date: Tue Sep 12 21:36:55 2017 +0200 watchdog/hardlockup: Provide interface to stop/restart perf events Provide an interface to stop and restart perf NMI watchdog events on all CPUs. This is only usable during init and especially for handling the perf HT bug on Intel machines. It's safe to use it this way as nothing can start/stop the NMI watchdog in parallel. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Reviewed-by: Don Zickus Cc: Andrew Morton Cc: Borislav Petkov Cc: Chris Metcalf Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Sebastian Siewior Cc: Ulrich Obergfell Link: http://lkml.kernel.org/r/20170912194146.167649596@linutronix.de Signed-off-by: Ingo Molnar include/linux/nmi.h | 4 ++++ kernel/watchdog_hld.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 5f48f0bd4e368425db4424b9afd1bd251d32367a Author: Prakash Gupta Date: Wed Sep 13 16:28:35 2017 -0700 mm, page_owner: skip unnecessary stack_trace entries The page_owner stacktrace always begin as follows: [] save_stack+0x40/0xc8 [] __set_page_owner+0x3c/0x6c These two entries do not provide any useful information and limits the available stacktrace depth. The page_owner stacktrace was skipping caller function from stack entries but this was missed with commit f2ca0b557107 ("mm/page_owner: use stackdepot to store stacktrace") Example page_owner entry after the patch: Page allocated via order 0, mask 0x8(ffffff80085fb714) PFN 654411 type Movable Block 639 type CMA Flags 0x0(ffffffbe5c7f12c0) [] post_alloc_hook+0x70/0x80 ... [] msm_comm_try_state+0x5f8/0x14f4 [] msm_vidc_open+0x5e4/0x7d0 [] msm_v4l2_open+0xa8/0x224 Link: http://lkml.kernel.org/r/1504078343-28754-2-git-send-email-guptap@codeaurora.org Fixes: f2ca0b557107 ("mm/page_owner: use stackdepot to store stacktrace") Signed-off-by: Prakash Gupta Acked-by: Vlastimil Babka Cc: Catalin Marinas Cc: Joonsoo Kim Cc: Michal Hocko Cc: Russell King Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb53c820c5b0f1a52804e32683aa7874db27392d Author: Prakash Gupta Date: Wed Sep 13 16:28:32 2017 -0700 arm64: stacktrace: avoid listing stacktrace functions in stacktrace The stacktraces always begin as follows: [] save_stack_trace_tsk+0x0/0x98 [] save_stack_trace+0x24/0x28 ... This is because the stack trace code includes the stack frames for itself. This is incorrect behaviour, and also leads to "skip" doing the wrong thing (which is the number of stack frames to avoid recording.) Perversely, it does the right thing when passed a non-current thread. Fix this by ensuring that we have a known constant number of frames above the main stack trace function, and always skip these. This was fixed for arch arm by commit 3683f44c42e9 ("ARM: stacktrace: avoid listing stacktrace functions in stacktrace") Link: http://lkml.kernel.org/r/1504078343-28754-1-git-send-email-guptap@codeaurora.org Signed-off-by: Prakash Gupta Cc: Russell King Cc: Michal Hocko Cc: Vlastimil Babka Cc: Will Deacon Cc: Catalin Marinas Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/kernel/stacktrace.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 0ee931c4e31a5efb134c76440405e9219f896e33 Author: Michal Hocko Date: Wed Sep 13 16:28:29 2017 -0700 mm: treewide: remove GFP_TEMPORARY allocation flag GFP_TEMPORARY was introduced by commit e12ba74d8ff3 ("Group short-lived and reclaimable kernel allocations") along with __GFP_RECLAIMABLE. It's primary motivation was to allow users to tell that an allocation is short lived and so the allocator can try to place such allocations close together and prevent long term fragmentation. As much as this sounds like a reasonable semantic it becomes much less clear when to use the highlevel GFP_TEMPORARY allocation flag. How long is temporary? Can the context holding that memory sleep? Can it take locks? It seems there is no good answer for those questions. The current implementation of GFP_TEMPORARY is basically GFP_KERNEL | __GFP_RECLAIMABLE which in itself is tricky because basically none of the existing caller provide a way to reclaim the allocated memory. So this is rather misleading and hard to evaluate for any benefits. I have checked some random users and none of them has added the flag with a specific justification. I suspect most of them just copied from other existing users and others just thought it might be a good idea to use without any measuring. This suggests that GFP_TEMPORARY just motivates for cargo cult usage without any reasoning. I believe that our gfp flags are quite complex already and especially those with highlevel semantic should be clearly defined to prevent from confusion and abuse. Therefore I propose dropping GFP_TEMPORARY and replace all existing users to simply use GFP_KERNEL. Please note that SLAB users with shrinkers will still get __GFP_RECLAIMABLE heuristic and so they will be placed properly for memory fragmentation prevention. I can see reasons we might want some gfp flag to reflect shorterm allocations but I propose starting from a clear semantic definition and only then add users with proper justification. This was been brought up before LSF this year by Matthew [1] and it turned out that GFP_TEMPORARY really doesn't have a clear semantic. It seems to be a heuristic without any measured advantage for most (if not all) its current users. The follow up discussion has revealed that opinions on what might be temporary allocation differ a lot between developers. So rather than trying to tweak existing users into a semantic which they haven't expected I propose to simply remove the flag and start from scratch if we really need a semantic for short term allocations. [1] http://lkml.kernel.org/r/20170118054945.GD18349@bombadil.infradead.org [akpm@linux-foundation.org: fix typo] [akpm@linux-foundation.org: coding-style fixes] [sfr@canb.auug.org.au: drm/i915: fix up] Link: http://lkml.kernel.org/r/20170816144703.378d4f4d@canb.auug.org.au Link: http://lkml.kernel.org/r/20170728091904.14627-1-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Stephen Rothwell Acked-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Matthew Wilcox Cc: Neil Brown Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/kernel/setup.c | 2 +- arch/arc/kernel/troubleshoot.c | 2 +- arch/powerpc/kernel/rtas.c | 4 ++-- arch/powerpc/platforms/pseries/suspend.c | 2 +- drivers/gpu/drm/drm_blend.c | 2 +- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 2 +- drivers/gpu/drm/drm_scdc_helper.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 6 +++--- drivers/gpu/drm/i915/selftests/i915_random.c | 2 +- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 10 +++++----- drivers/gpu/drm/i915/selftests/intel_uncore.c | 2 +- drivers/gpu/drm/lib/drm_random.c | 2 +- drivers/gpu/drm/msm/msm_gem_submit.c | 2 +- drivers/gpu/drm/selftests/test-drm_mm.c | 4 ++-- drivers/misc/cxl/pci.c | 2 +- drivers/xen/gntalloc.c | 2 +- fs/coredump.c | 2 +- fs/exec.c | 4 ++-- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 2 +- fs/overlayfs/namei.c | 12 ++++++------ fs/proc/base.c | 8 ++++---- fs/proc/task_mmu.c | 2 +- include/linux/gfp.h | 2 -- include/trace/events/mmflags.h | 1 - kernel/locking/test-ww_mutex.c | 2 +- kernel/trace/trace_events_filter.c | 2 +- lib/string_helpers.c | 4 ++-- mm/shmem.c | 2 +- mm/slub.c | 2 +- tools/perf/builtin-kmem.c | 1 - 36 files changed, 57 insertions(+), 61 deletions(-) commit d0dbf771309fecd73f4ac1566c1400cb12807ee2 Author: Arnd Bergmann Date: Wed Sep 13 16:28:26 2017 -0700 IB/mlx4: fix sprintf format warning gcc-7 points out that a negative port_num value would overflow the string buffer: drivers/infiniband/hw/mlx4/sysfs.c: In function 'mlx4_ib_device_register_sysfs': drivers/infiniband/hw/mlx4/sysfs.c:251:16: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] drivers/infiniband/hw/mlx4/sysfs.c:251:2: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10 drivers/infiniband/hw/mlx4/sysfs.c:303:17: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] drivers/infiniband/hw/mlx4/sysfs.c:303:3: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10 While we should be able to assume that port_num is positive here, making the buffer one byte longer has no downsides and avoids the warning. Fixes: c1e7e466120b ("IB/mlx4: Add iov directory in sysfs under the ib device") Link: http://lkml.kernel.org/r/20170714120720.906842-23-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: Leon Romanovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/hw/mlx4/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebfddb3d447f5267c76680ea4d242e6f9bcafa87 Author: Arnd Bergmann Date: Wed Sep 13 16:28:23 2017 -0700 fscache: fix fscache_objlist_show format processing gcc points out a minor bug in the handling of unknown cookie types, which could result in a string overflow when the integer is copied into a 3-byte string: fs/fscache/object-list.c: In function 'fscache_objlist_show': fs/fscache/object-list.c:265:19: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(_type, "%02u", cookie->def->type); ^~~~~~ fs/fscache/object-list.c:265:4: note: 'sprintf' output between 3 and 4 bytes into a destination of size 3 This is currently harmless as no code sets a type other than 0 or 1, but it makes sense to use snprintf() here to avoid overflowing the array if that changes. Link: http://lkml.kernel.org/r/20170714120720.906842-22-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fscache/object-list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8185f5708d2488393dc2acec21d19ac53d61b4a0 Author: Geert Uytterhoeven Date: Wed Sep 13 16:28:20 2017 -0700 lib/test_bitmap.c: use ULL suffix for 64-bit constants With gcc 4.1.2: lib/test_bitmap.c:189: warning: integer constant is too large for `long' type lib/test_bitmap.c:190: warning: integer constant is too large for `long' type lib/test_bitmap.c:194: warning: integer constant is too large for `long' type lib/test_bitmap.c:195: warning: integer constant is too large for `long' type Add the missing "ULL" suffix to fix this. Link: http://lkml.kernel.org/r/1505040523-31230-1-git-send-email-geert@linux-m68k.org Fixes: 60ef690018b262dd ("bitmap: introduce BITMAP_FROM_U64()") Signed-off-by: Geert Uytterhoeven Acked-by: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_bitmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6dec0dd4a627d15510c9435c4dbf4b9f4ffeeeb7 Author: Arnd Bergmann Date: Wed Sep 13 16:28:17 2017 -0700 procfs: remove unused variable In NOMMU configurations, we get a warning about a variable that has become unused: fs/proc/task_nommu.c: In function 'nommu_vma_show': fs/proc/task_nommu.c:148:28: error: unused variable 'priv' [-Werror=unused-variable] Link: http://lkml.kernel.org/r/20170911200231.3171415-1-arnd@arndb.de Fixes: 1240ea0dc3bb ("fs, proc: remove priv argument from is_stack") Signed-off-by: Arnd Bergmann Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_nommu.c | 1 - 1 file changed, 1 deletion(-) commit c848c49a62b37bfb426086e248810dbcb14b85ff Author: Andrew Morton Date: Wed Sep 13 16:28:14 2017 -0700 drivers/media/cec/cec-adap.c: fix build with gcc-4.4.4 gcc-4.4.4 has issues with initialization of anonymous unions: drivers/media/cec/cec-adap.c: In function 'cec_queue_msg_fh': drivers/media/cec/cec-adap.c:184: error: unknown field 'lost_msgs' specified in initializer work around this. Fixes: 6b2bbb08747a5 ("media: cec: rework the cec event handling") Acked-by: Geert Uytterhoeven Cc: Hans Verkuil Cc: Maxime Ripard Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/cec/cec-adap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a47f68d6a944113bdc8097db6f933c2e17c27bf9 Author: Eric Biggers Date: Wed Sep 13 16:28:11 2017 -0700 idr: remove WARN_ON_ONCE() when trying to replace negative ID IDR only supports non-negative IDs. There used to be a 'WARN_ON_ONCE(id < 0)' in idr_replace(), but it was intentionally removed by commit 2e1c9b286765 ("idr: remove WARN_ON_ONCE() on negative IDs"). Then it was added back by commit 0a835c4f090a ("Reimplement IDR and IDA using the radix tree"). However it seems that adding it back was a mistake, given that some users such as drm_gem_handle_delete() (DRM_IOCTL_GEM_CLOSE) pass in a value from userspace to idr_replace(), allowing the WARN_ON_ONCE to be triggered. drm_gem_handle_delete() actually just wants idr_replace() to return an error code if the ID is not allocated, including in the case where the ID is invalid (negative). So once again remove the bogus WARN_ON_ONCE(). This bug was found by syzkaller, which encountered the following warning: WARNING: CPU: 3 PID: 3008 at lib/idr.c:157 idr_replace+0x1d8/0x240 lib/idr.c:157 Kernel panic - not syncing: panic_on_warn set ... CPU: 3 PID: 3008 Comm: syzkaller218828 Not tainted 4.13.0-rc4-next-20170811 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:190 do_trap_no_signal arch/x86/kernel/traps.c:224 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:273 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:310 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:323 invalid_op+0x1e/0x30 arch/x86/entry/entry_64.S:930 RIP: 0010:idr_replace+0x1d8/0x240 lib/idr.c:157 RSP: 0018:ffff8800394bf9f8 EFLAGS: 00010297 RAX: ffff88003c6c60c0 RBX: 1ffff10007297f43 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800394bfa78 RBP: ffff8800394bfae0 R08: ffffffff82856487 R09: 0000000000000000 R10: ffff8800394bf9a8 R11: ffff88006c8bae28 R12: ffffffffffffffff R13: ffff8800394bfab8 R14: dffffc0000000000 R15: ffff8800394bfbc8 drm_gem_handle_delete+0x33/0xa0 drivers/gpu/drm/drm_gem.c:297 drm_gem_close_ioctl+0xa1/0xe0 drivers/gpu/drm/drm_gem.c:671 drm_ioctl_kernel+0x1e7/0x2e0 drivers/gpu/drm/drm_ioctl.c:729 drm_ioctl+0x72e/0xa50 drivers/gpu/drm/drm_ioctl.c:825 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 Here is a C reproducer: #include #include #include #include #include int main(void) { int cardfd = open("/dev/dri/card0", O_RDONLY); ioctl(cardfd, DRM_IOCTL_GEM_CLOSE, &(struct drm_gem_close) { .handle = -1 } ); } Link: http://lkml.kernel.org/r/20170906235306.20534-1-ebiggers3@gmail.com Fixes: 0a835c4f090a ("Reimplement IDR and IDA using the radix tree") Signed-off-by: Eric Biggers Acked-by: Tejun Heo Cc: Dmitry Vyukov Cc: Matthew Wilcox Cc: [v4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/idr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa5f7b51fc3080c2b195fa87c7eca7c05e56f673 Author: Dan Carpenter Date: Thu Sep 14 02:00:54 2017 +0300 sctp: potential read out of bounds in sctp_ulpevent_type_enabled() This code causes a static checker warning because Smatch doesn't trust anything that comes from skb->data. I've reviewed this code and I do think skb->data can be controlled by the user here. The sctp_event_subscribe struct has 13 __u8 fields and we want to see if ours is non-zero. sn_type can be any value in the 0-USHRT_MAX range. We're subtracting SCTP_SN_TYPE_BASE which is 1 << 15 so we could read either before the start of the struct or after the end. This is a very old bug and it's surprising that it would go undetected for so long but my theory is that it just doesn't have a big impact so it would be hard to notice. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller include/net/sctp/ulpevent.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0560ad576268228c60bf16ab01e0f931ed01707a Author: Thor Thayer Date: Mon Sep 11 16:17:20 2017 -0500 i2c: altera: Add Altera I2C Controller driver Add driver support for the Altera I2C Controller. The I2C controller is soft IP for use in FPGAs. Signed-off-by: Thor Thayer Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang MAINTAINERS | 5 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-altera.c | 511 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 527 insertions(+) commit 8f73681616a447fa08bf3538f56420657decf7b9 Author: Thor Thayer Date: Mon Sep 11 16:17:19 2017 -0500 dt-bindings: i2c: Add Altera I2C Controller Add the documentation to support the Altera synthesizable logic I2C Controller in FPGA. Signed-off-by: Thor Thayer Acked-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-altera.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 6fa9c623a03c560178e0dcec23f59dbfd29b21b9 Author: Sergei Shtylyov Date: Wed Sep 13 22:28:53 2017 +0300 MAINTAINERS: review Renesas DT bindings as well When adding myself as a reviewer for the Renesas Ethernet drivers I somehow forgot about the bindings -- I want to review them as well. Fixes: 8e6569af3a1b ("MAINTAINERS: add myself as Renesas Ethernet drivers reviewer") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 6d20e6b235aad0be463b23588093b079362bb2e4 Author: Dan Carpenter Date: Fri Aug 25 13:19:58 2017 +0300 um: return negative in tuntap_open_tramp() The intention is to return negative error codes. "pid" is already negative but we accidentally negate it again back to positive. Signed-off-by: Dan Carpenter Signed-off-by: Richard Weinberger arch/um/os-Linux/drivers/tuntap_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b24afbfe30b38d59cca7543a352b03848330d91 Author: Dan Carpenter Date: Fri Aug 25 13:36:15 2017 +0300 um: remove a stray tab Static checkers would urge us to add curly braces to this code, but actually the code works correctly. It just isn't indented right. Signed-off-by: Dan Carpenter Signed-off-by: Richard Weinberger arch/x86/um/os-Linux/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39940dbcaaf5ea3f0d621b715a8bd82169b2decf Author: Thomas Meyer Date: Sun Aug 20 13:26:05 2017 +0200 um: Use relative modversions with LD_SCRIPT_DYN When building a dynamic kernel image use relative symbols with MODVERSIONS. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/Kconfig.um | 1 + 1 file changed, 1 insertion(+) commit 883354afbc109c57f925ccc19840055193da0cc0 Author: Thomas Meyer Date: Sun Aug 20 13:26:04 2017 +0200 um: link vmlinux with -no-pie Debian's gcc defaults to pie. The global Makefile already defines the -fno-pie option. Link UML dynamic kernel image also with -no-pie to fix the build. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3488649dcd23b7a6e63895274ec69f80e92d4ed Author: Thomas Meyer Date: Sun Aug 13 14:51:12 2017 +0200 um: Fix CONFIG_GCOV for modules. Explicitly export symbols so modpost doesn't complain. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/kernel/gmon_syms.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cbb0006def57d96601b61f14b924a8f65835cbc5 Author: James Pack Date: Tue Aug 8 13:19:41 2017 -0700 Fix minor typos and grammar in UML start_up help Signed-off-by: James Pack Signed-off-by: Richard Weinberger arch/um/os-Linux/start_up.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a997960b267409d9ed68c99841ac71d82b010480 Author: Krzysztof Kozlowski Date: Thu Jul 20 07:01:10 2017 +0200 um: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig option INET_LRO. It is gone since commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Richard Weinberger arch/um/configs/i386_defconfig | 1 - arch/um/configs/x86_64_defconfig | 1 - 2 files changed, 2 deletions(-) commit ca558e185972d8ecd308760abf972f5d408bcff0 Author: Eric Dumazet Date: Wed Sep 13 11:16:45 2017 -0700 net_sched: gen_estimator: fix scaling error in bytes/packets samples Denys reported wrong rate estimations with HTB classes. It appears the bug was added in linux-4.10, since my tests where using intervals of one second only. HTB using 4 sec default rate estimators, reported rates were 4x higher. We need to properly scale the bytes/packets samples before integrating them in EWMA. Tested: echo 1 >/sys/module/sch_htb/parameters/htb_rate_est Setup HTB with one class with a rate/cail of 5Gbit Generate traffic on this class tc -s -d cl sh dev eth0 classid 7002:11 class htb 7002:11 parent 7002:1 prio 5 quantum 200000 rate 5Gbit ceil 5Gbit linklayer ethernet burst 80000b/1 mpu 0b cburst 80000b/1 mpu 0b level 0 rate_handle 1 Sent 1488215421648 bytes 982969243 pkt (dropped 0, overlimits 0 requeues 0) rate 5Gbit 412814pps backlog 136260b 2p requeues 0 TCP pkts/rtx 982969327/45 bytes 1488215557414/68130 lended: 22732826 borrowed: 0 giants: 0 tokens: -1684 ctokens: -1684 Fixes: 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators") Signed-off-by: Eric Dumazet Reported-by: Denys Fedoryshchenko Signed-off-by: David S. Miller net/core/gen_estimator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d371465e81fc740cfa67ef47fbf692350c6b0113 Merge: 255cd50 7dbd5b7 Author: David S. Miller Date: Wed Sep 13 13:29:13 2017 -0700 Merge branch 'nfp-card-init' Jakub Kicinski says: ==================== nfp: wait more carefully for card init The first patch is a small fix for flower offload, we need a whitelist of supported matches, otherwise the unsupported ones will be ignored. The second and the third patch are adding wait/polling to the probe path. We had reports of driver failing probe because it couldn't find the control process (NSP) on the card. Turns out the NSP will only announce its existence after it's fully initialized. Until now we assumed it will be reachable, just not processing commands (hence we wait for a NOOP command to execute successfully). v2: - fix a bad merge which resulted in a build warning and retest. ==================== Signed-off-by: David S. Miller commit 7dbd5b7517376c4395a9ed0b26cf6b4db80d8415 Author: Jakub Kicinski Date: Wed Sep 13 10:16:00 2017 -0700 nfp: wait for the NSP resource to appear on boot The control process (NSP) may take some time to complete its initialization. This is not a problem on most servers, but on very fast-booting machines it may not be ready for operation when driver probes the device. There is also a version of the flash in the wild where NSP tries to train the links as part of init. To wait for NSP initialization we should make sure its resource has already been added to the resource table. NSP adds itself there as last step of init. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 2 + .../ethernet/netronome/nfp/nfpcore/nfp_resource.c | 45 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) commit 4cbe94f2af25bf8f4d5dea56c770937d896342bf Author: Jakub Kicinski Date: Wed Sep 13 10:15:59 2017 -0700 nfp: wait for board state before talking to the NSP Board state informs us which low-level initialization stages the card has completed. We should wait for the card to be fully initialized before trying to communicate with it, not only before we configure passing traffic. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 43 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 23 ------------ 2 files changed, 43 insertions(+), 23 deletions(-) commit b95a2d831b815189618d18e3e89bcfa5072351a1 Author: Pieter Jansen van Vuuren Date: Wed Sep 13 10:15:58 2017 -0700 nfp: add whitelist of supported flow dissector Previously we did not check the flow dissector against a list of allowed and supported flow key dissectors. This patch introduces such a list and correctly rejects unsupported flow keys. Fixes: 43f84b72c50d ("nfp: add metadata to each flow offload") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6f602afda7275c24c20ba38b5b6cd4ed08561fff Author: Thomas Meyer Date: Sat Jul 29 17:03:23 2017 +0200 um: Fix FP register size for XSTATE/XSAVE Hard code max size. Taken from https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/common/x86-xstate.h Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger arch/um/include/asm/thread_info.h | 3 +++ arch/um/include/shared/os.h | 2 +- arch/um/kernel/process.c | 4 ++-- arch/um/os-Linux/skas/process.c | 17 ++++++++--------- arch/x86/um/os-Linux/registers.c | 18 ++++++++++++------ arch/x86/um/user-offsets.c | 2 +- 6 files changed, 27 insertions(+), 19 deletions(-) commit 89b68cd926633ff0df1e1a0ae29fcd80f68bdd96 Author: Uwe Kleine-König Date: Thu Aug 31 21:31:57 2017 +0200 UBI: Fix two typos in comments Signed-off-by: Uwe Kleine-König Signed-off-by: Richard Weinberger drivers/mtd/ubi/ubi-media.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2e43d192b53cb4a9e940d809d93cd8ea21616fb Author: Colin Ian King Date: Mon Jul 3 10:37:01 2017 +0100 ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate" Trivial fix to spelling mistake in ubi_err error message Signed-off-by: Colin Ian King Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62fc46217816642c57a5181a4117ae11da9813f Author: Ben Dooks Date: Wed Jul 26 10:53:50 2017 +0100 ubi: pr_err() strings should end with newlines In build.c, the following pr_err calls should be terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger drivers/mtd/ubi/block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a51b7ccf3bf57956c64076987a9ad1152e896e79 Author: Ben Dooks Date: Wed Jul 26 10:51:10 2017 +0100 ubi: pr_err() strings should end with newlines In ubi_attach_mtd_dev() the pr_err() calls should have their messgaes terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 278f31a70d2e40aa31bf465795bfce2ca8bb01b6 Author: Ben Dooks Date: Wed Jul 26 10:42:54 2017 +0100 ubi: pr_err() strings should end with newlines The ubi_init() function has a few error paths that use the pr_err() to output errors. These should have new lines on them as pr_err() does not automatically do this. This fixes issues where if multiple mtd fail to bind to ubi the console output starts wrapping around. Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 46c1e79fee417f151547aa46fae04ab06cb666f4 Merge: ec846ec b130a69 Author: Linus Torvalds Date: Wed Sep 13 12:24:20 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A handful of tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf stat: Wait for the correct child perf tools: Support running perf binaries with a dash in their name perf config: Check not only section->from_system_config but also item's perf ui progress: Fix progress update perf ui progress: Make sure we always define step value perf tools: Open perf.data with O_CLOEXEC flag tools lib api: Fix make DEBUG=1 build perf tests: Fix compile when libunwind's unwind.h is available tools include linux: Guard against redefinition of some macros commit ec846ecd6350857a8b8b9a6b78c763d45e0f09b8 Merge: b5df1b3 9469eb0 Author: Linus Torvalds Date: Wed Sep 13 12:22:32 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Three CPU hotplug related fixes and a debugging improvement" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Add debugfs knob for "sched_debug" sched/core: WARN() when migrating to an offline CPU sched/fair: Plug hole between hotplug and active_load_balance() sched/fair: Avoid newidle balance for !active CPUs commit b5df1b3a5637deae352d282b50d4b99d0e2b8d1d Merge: 9888e4d 1278f58 Author: Linus Torvalds Date: Wed Sep 13 11:56:16 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "The main changes are the PCID fixes from Andy, but there's also two hyperv fixes and two paravirt updates" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyper-v: Remove duplicated HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED definition x86/hyper-V: Allocate the IDT entry early in boot paravirt: Switch maintainer x86/paravirt: Remove no longer used paravirt functions x86/mm/64: Initialize CR4.PCIDE early x86/hibernate/64: Mask off CR3's PCID bits in the saved CR3 x86/mm: Get rid of VM_BUG_ON in switch_tlb_irqs_off() commit 9888e4d4831d72a64c4378878ada1a4d7539a790 Merge: 4791bcc 56ce2f2 Author: Linus Torvalds Date: Wed Sep 13 11:52:18 2017 -0700 Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixlet from Stafford Horne: "Fix warning for upcoming work to remove linux/vmalloc.h from asm-generic/io.h" * tag 'openrisc-for-linus' of git://github.com/openrisc/linux: openrisc: add forward declaration for struct vm_area_struct commit 4791bcccf8ce02c2bf6f9dfbc328a3a46d9e9569 Merge: 3882a73 0bf8bf5 Author: Linus Torvalds Date: Wed Sep 13 11:28:19 2017 -0700 Merge tag 'modules-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: "Summary of modules changes for the 4.14 merge window: - minor code cleanups and fixes - modpost: avoid building modules that have names that exceed the size of the name field in struct module" * tag 'modules-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: Remove const attribute from alias for MODULE_DEVICE_TABLE module: fix ddebug_remove_module() modpost: abort if module name is too long commit 3882a734c19b3cd7feb9e30e1dbd8ae54ac0905a Author: Linus Torvalds Date: Wed Sep 13 11:18:19 2017 -0700 Fix up MAINTAINERS file sorting Another merge window, another MAINTAINERS file disaster. People have serious problems with the alphabet and sorting, and poor Jérôme Glisse and Radim Krčmář get their names mangled by locale issues, turning them into some mangled mess (probably others do too, but those two stood out when sorting things again). And we now have two copies of the same 'AS3645A LED FLASH CONTROLLER DRIVER' in the tree and in the MAINTAINERS file, but that's a separate issue - the duplication is real, and I left them as two entries for the same name. This does not try to sort the actual section pattern entries, although I may end up doing that later. Signed-off-by: Linus Torvalds MAINTAINERS | 110 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 55 deletions(-) commit f60a2abfdbf298a4722dfef331c38447fa18c4e3 Merge: 561a8eb 73c950d Author: Linus Torvalds Date: Wed Sep 13 11:04:14 2017 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The diff is dominated by the Allwinner A10/A20 SoCs getting converted to the sunxi-ng framework. Otherwise, the heavy hitters are various drivers for SoCs like AT91, Amlogic, Renesas, and Rockchip. There are some other new clk drivers in here too but overall this is just a bunch of clk drivers for various different pieces of hardware and a collection of non-critical fixes for clk drivers. New Drivers: - Allwinner R40 SoCs - Renesas R-Car Gen3 USB 2.0 clock selector PHY - Atmel AT91 audio PLL - Uniphier PXs3 SoCs - ARC HSDK Board PLLs - AXS10X Board PLLs - STMicroelectronics STM32H743 SoCs Removed Drivers: - Non-compiling mb86s7x support Updates: - Allwinner A10/A20 SoCs converted to sunxi-ng framework - Allwinner H3 CPU clk fixes - Renesas R-Car D3 SoC - Renesas V2H and M3-W modules - Samsung Exynos5420/5422/5800 audio fixes - Rockchip fractional clk approximation fixes - Rockchip rk3126 SoC support within the rk3128 driver - Amlogic gxbb CEC32 and sd_emmc clks - Amlogic meson8b reset controller support - IDT VersaClock 5P49V5925/5P49V6901 support - Qualcomm MSM8996 SMMU clks - Various 'const' applications for struct clk_ops - si5351 PLL reset bugfix - Uniphier audio on LD11/LD20 and ethernet support on LD11/LD20/Pro4/PXs2 - Assorted Tegra clk driver fixes" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (120 commits) clk: si5351: fix PLL reset ASoC: atmel-classd: remove aclk clock ASoC: atmel-classd: remove aclk clock from DT binding clk: at91: clk-generated: make gclk determine audio_pll rate clk: at91: clk-generated: create function to find best_diff clk: at91: add audio pll clock drivers dt-bindings: clk: at91: add audio plls to the compatible list clk: at91: clk-generated: remove useless divisor loop clk: mb86s7x: Drop non-building driver clk: ti: check for null return in strrchr to avoid null dereferencing clk: Don't write error code into divider register clk: uniphier: add video input subsystem clock clk: uniphier: add audio system clock clk: stm32h7: Add stm32h743 clock driver clk: gate: expose clk_gate_ops::is_enabled clk: nxp: clk-lpc32xx: rename clk_gate_is_enabled() clk: uniphier: add PXs3 clock data clk: hi6220: change watchdog clock source clk: Kconfig: Name RK805 in Kconfig for COMMON_CLK_RK808 clk: cs2000: Add cs2000_set_saved_rate ... commit 561a8eb3e1d219f415597c76dae44b530b7f961a Merge: 2818d0d b4be271 Author: Linus Torvalds Date: Wed Sep 13 10:56:00 2017 -0700 Merge tag 'rtc-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem: - remove .open() and .release() RTC ops - constify i2c_device_id New driver: - Realtek RTD1295 - Android emulator (goldfish) RTC Drivers: - ds1307: Beginning of a huge cleanup - s35390a: handle invalid RTC time - sun6i: external oscillator gate support" * tag 'rtc-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (40 commits) rtc: ds1307: use octal permissions rtc: ds1307: fix braces rtc: ds1307: fix alignments and blank lines rtc: ds1307: use BIT rtc: ds1307: use u32 rtc: ds1307: use sizeof rtc: ds1307: remove regs member rtc: Add Realtek RTD1295 dt-bindings: rtc: Add Realtek RTD1295 rtc: sun6i: Add support for the external oscillator gate rtc: goldfish: Add RTC driver for Android emulator dt-bindings: Add device tree binding for Goldfish RTC driver rtc: ds1307: add basic support for ds1341 chip rtc: ds1307: remove member nvram_offset from struct ds1307 rtc: ds1307: factor out offset to struct chip_desc rtc: ds1307: factor out rtc_ops to struct chip_desc rtc: ds1307: factor out irq_handler to struct chip_desc rtc: ds1307: improve irq setup rtc: ds1307: constify struct chip_desc variables rtc: ds1307: improve trickle charger initialization ... commit 2818d0d759bc3d763d834097292006d2da3271df Merge: cc4238b fc27fe7 Author: Linus Torvalds Date: Wed Sep 13 10:50:06 2017 -0700 Merge tag 'sound-fix-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Most of the commits are trivial cleanup patches, while one commit is a significant fix for the race at ALSA sequencer that was spotted by syzkaller" * tag 'sound-fix-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Cancel pending autoload work at unbinding device ALSA: firewire: Use common error handling code in snd_motu_stream_start_duplex() ALSA: asihpi: Kill BUG_ON() usages ALSA: core: Use %pS printk format for direct addresses ALSA: ymfpci: Use common error handling code in snd_ymfpci_create() ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe() ALSA: 6fire: Use common error handling code in usb6fire_chip_probe() ALSA: usx2y: Use common error handling code in submit_urbs() ALSA: us122l: Use common error handling code in us122l_create_card() ALSA: hdspm: Use common error handling code in snd_hdspm_probe() ALSA: rme9652: Use common code in hdsp_get_iobox_version() ALSA: maestro3: Use common error handling code in two functions commit cc4238bd1639332a1126e2cf677b5656e28bdc02 Merge: 80a0d64 580b71e9 Author: Linus Torvalds Date: Wed Sep 13 10:47:14 2017 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A tiny update: one patch corrects a Kconfig problem with the shift of the SAS SMP code to BSG and the other removes a vestige of user space target mode" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_transport_sas: select BLK_DEV_BSGLIB scsi: Remove Scsi_Host.uspace_req_q commit 80a0d644d37296d7cac1a4956cb4e916770083e0 Merge: 20e52ee 157f377 Author: Linus Torvalds Date: Wed Sep 13 10:20:41 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Small collection of fixes that would be nice to have in -rc1. This contains: - NVMe pull request form Christoph, mostly with fixes for nvme-pci, host memory buffer in particular. - Error handling fixup for cgwb_create(), in case allocation of 'wb' fails. From Christophe Jaillet. - Ensure that trace_block_getrq() gets the 'dev' in an appropriate fashion, to avoid a potential NULL deref. From Greg Thelen. - Regression fix for dm-mq with blk-mq, fixing a problem with stacking IO schedulers. From me. - string.h fixup, fixing an issue with memcpy_and_pad(). This original change came in through an NVMe dependency, which is why I'm including it here. From Martin Wilck. - Fix potential int overflow in __blkdev_sectors_to_bio_pages(), from Mikulas. - MBR enable fix for sed-opal, from Scott" * 'for-linus' of git://git.kernel.dk/linux-block: block: directly insert blk-mq request from blk_insert_cloned_request() mm/backing-dev.c: fix an error handling path in 'cgwb_create()' string.h: un-fortify memcpy_and_pad nvme-pci: implement the HMB entry number and size limitations nvme-pci: propagate (some) errors from host memory buffer setup nvme-pci: use appropriate initial chunk size for HMB allocation nvme-pci: fix host memory buffer allocation fallback nvme: fix lightnvm check block: fix integer overflow in __blkdev_sectors_to_bio_pages() block: sed-opal: Set MBRDone on S3 resume path if TPER is MBREnabled block: tolerate tracing of NULL bio commit 20e52ee536a53d7c0f29ba82f108d6eff27140ba Merge: e7989f9 6fad4e6 Author: Linus Torvalds Date: Wed Sep 13 10:18:34 2017 -0700 Merge tag 'docs-4.14' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A cleanup from Mauro that needed to wait for the media pull, plus a handful of other fixes that wandered in" * tag 'docs-4.14' of git://git.lwn.net/linux: kokr/memory-barriers.txt: Apply atomic_t.txt change kokr/doc: Update memory-barriers.txt for read-to-write dependencies docs-rst: don't require adjustbox anymore docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6 docs-rst: conf.py: remove lscape from LaTeX preamble commit 92380b572d95caf48f8424746aeee63c5a2b1922 Author: Jason Gerecke Date: Thu Sep 7 17:47:38 2017 -0700 HID: wacom: generic: Clear ABS_MISC when tool leaves proximity The tool ID information sent in ABS_MISC is expected to be reset to 0 when a tool leaves proximity. Not doing this can cause problems if a tool is removed and then re-introduced. Kernel event filtering will prevent the (identical) ABS_MISC event from being sent when the tool re-enters proxmity. This can cause userspace to not properly set the tool ID. Fixes: f85c9dc678 ("HID: wacom: generic: Support tool ID and additional tool types") Cc: stable # v4.10 Signed-off-by: Ping Cheng Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 993f0d93f8538c15bd5c12a1a9fd74c777efea1b Author: Jason Gerecke Date: Thu Sep 7 17:44:12 2017 -0700 HID: wacom: generic: Send MSC_SERIAL and ABS_MISC when leaving prox The latest generation of pro devices (MobileStudio Pro, 2nd-gen Intuos Pro, Cintiq Pro) send a serial number of '0' whenever the pen is too far away for reliable communication. Userspace defines that a serial number of '0' is invalid, so we need to be careful not to actually forward this value. Additionally, since EMR ISDv4 devices do not support serial numbers or tool IDs, we'd like to not send these events if they aren't necessary. The existing code achieves these goals by adding a check for a non-zero serial number within the wacom_wac_pen_report function. The MSC_SERIAL and ABS_MISC events are only sent if the serial number is non-zero. This code fails, however when the pen for a pro device leaves proximity. When the pen leaves prox and the tablet sends a serial of 0, wacom_wac_pen_event dutifully clears the serial number. When wacom_wac_pen_report is called, it does not send either the MSC_SERIAL of the exiting tool nor an ABS_MISC event. This patch prevents the wacom_wac_pen_event function from clearing an already-set serial number. This ensures that we have the serial number handy when exiting proximity, but requires us to manually clear it afterwards to ensure the driver does not send stale data (e.g. when switching between AES pens that report a serial nubmer of 0 for the first few fully in-proximity packets). Fixes: f85c9dc678 ("HID: wacom: generic: Support tool ID and additional tool types") Cc: stable # v4.10 Signed-off-by: Ping Cheng Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit e7989f973ae1b90ec7c0b671c81f7f553affccbe Merge: c353f88 5b97eea Author: Linus Torvalds Date: Wed Sep 13 10:10:19 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "This fixes a regression (spotted by the Sandstorm.io folks) in the pid namespace handling introduced in 4.12. There's also a fix for honoring sync/dsync flags for pwritev2()" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: getattr cleanup fuse: honor iocb sync flags on write fuse: allow server to run in different pid_ns commit a2b4a79b88b24c49d98d45a06a014ffd22ada1a4 Author: Baruch Siach Date: Sun Sep 10 20:29:45 2017 +0300 spi: uapi: spidev: add missing ioctl header The SPI_IOC_MESSAGE() macro references _IOC_SIZEBITS. Add linux/ioctl.h to make sure this macro is defined. This fixes the following build failure of lcdproc with the musl libc: In file included from .../sysroot/usr/include/sys/ioctl.h:7:0, from hd44780-spi.c:31: hd44780-spi.c: In function 'spi_transfer': hd44780-spi.c:89:24: error: '_IOC_SIZEBITS' undeclared (first use in this function) status = ioctl(p->fd, SPI_IOC_MESSAGE(1), &xfer); ^ Signed-off-by: Baruch Siach Signed-off-by: Mark Brown Cc: stable@vger.kernel.org include/uapi/linux/spi/spidev.h | 1 + 1 file changed, 1 insertion(+) commit 8b5d729a3a8a07fe273af266e90bc52114dd69a6 Author: Christos Gkekas Date: Sun Sep 10 14:55:29 2017 +0100 spi: stm32: Fix logical error in stm32_spi_prepare_mbr() stm32_spi_prepare_mbr() is returning an error value when div is less than SPI_MBR_DIV_MIN *and* greater than SPI_MBR_DIV_MAX, which always evaluates to false. This should change to use *or*. Signed-off-by: Christos Gkekas Signed-off-by: Mark Brown drivers/spi/spi-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 659178f5d1bb5164480c35e5a749c4fe1dde5867 Author: Hsin-Yu Chao Date: Wed Sep 13 17:54:28 2017 +0800 ASoC: rt5514-spi: check irq status to schedule data copy 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. Fix that by checking the irq status bit and schedule data copy accordingly. Signed-off-by: Hsin-Yu Chao Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 17 +++++++++++++++-- sound/soc/codecs/rt5514-spi.h | 3 +++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 6fd6fd68c9e2f3a206a098ef57b1d5548f9d00d1 Author: Zachary Zhang Date: Wed Sep 13 18:21:39 2017 +0200 spi: armada-3700: Fix padding when sending not 4-byte aligned data In 4-byte transfer mode, extra padding/dummy bytes '0xff' would be sent in write operation if TX data is not 4-byte aligned since the SPI data register is always shifted out as whole 4 bytes. Fix this by using the header count feature that allows to transfer 0 to 4 bytes. Use it to actually send the first 1 to 3 bytes of data before the rest of the buffer that will hence be 4-byte aligned. Signed-off-by: Zachary Zhang Signed-off-by: Miquel Raynal Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 135 +++++++++++++----------------------------- 1 file changed, 41 insertions(+), 94 deletions(-) commit 747e1f60470b975363cbbfcde0c41a3166391be5 Author: Miquel Raynal Date: Wed Sep 13 18:21:38 2017 +0200 spi: armada-3700: Fix failing commands with quad-SPI A3700 SPI controller datasheet states that only the first line (IO0) is used to receive and send instructions, addresses and dummy bytes, unless for addresses during an RX operation in a quad SPI configuration (see p.821 of the Armada-3720-DB datasheet). Otherwise, some commands such as SPI NOR commands like READ_FROM_CACHE_DUAL_IO(0xeb) and READ_FROM_CACHE_DUAL_IO(0xbb) will fail because these commands must send address bytes through the four pins. Data transfer always use the four bytes with this setup. Thus, in quad SPI configuration, the A3700_SPI_ADDR_PIN bit must be set only in this case to inform the controller that it must use the number of pins indicated in the {A3700_SPI_DATA_PIN1,A3700_SPI_DATA_PIN0} field during the address cycles of an RX operation. Suggested-by: Ken Ma Signed-off-by: Miquel Raynal Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-armada-3700.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 255cd50f207ae8ec7b22663246c833407744e634 Author: Jiri Pirko Date: Wed Sep 13 17:32:37 2017 +0200 net: sched: fix use-after-free in tcf_action_destroy and tcf_del_walker Recent commit d7fb60b9cafb ("net_sched: get rid of tcfa_rcu") removed freeing in call_rcu, which changed already existing hard-to-hit race condition into 100% hit: [ 598.599825] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [ 598.607782] IP: tcf_action_destroy+0xc0/0x140 Or: [ 40.858924] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [ 40.862840] IP: tcf_generic_walker+0x534/0x820 Fix this by storing the ops and use them directly for module_put call. Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/act_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b2a05feff274e007abd7cda0d2cdae7fdf5cbb0a Author: Suravee Suthikulpanit Date: Tue Sep 12 10:42:41 2017 -0500 KVM: Add struct kvm_vcpu pointer parameter to get_enable_apicv() Modify struct kvm_x86_ops.arch.apicv_active() to take struct kvm_vcpu pointer as parameter in preparation to subsequent changes. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit dfa20099e26e35cd9e83d4d43172615c73c4e9f5 Author: Suravee Suthikulpanit Date: Tue Sep 12 10:42:40 2017 -0500 KVM: SVM: Refactor AVIC vcpu initialization into avic_init_vcpu() Preparing the base code for subsequent changes. This does not change existing logic. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 822f8565c93949fb2d31502d595c8bc45629c9b7 Author: Suresh Reddy Date: Wed Sep 13 11:12:42 2017 -0400 be2net: fix TSO6/GSO issue causing TX-stall on Lancer/BEx IPv6 TSO requests with extension hdrs are a problem to the Lancer and BEx chips. Workaround is to disable TSO6 feature for such packets. Also in Lancer chips, MSS less than 256 was resulting in TX stall. Fix this by disabling GSO when MSS less than 256. Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 8 ++++++++ drivers/net/ethernet/emulex/benet/be_main.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) commit 8320caeeffdefec3b58b9d4a7ed8e1079492fe7b Author: Adrian Salido Date: Fri Sep 8 10:55:27 2017 -0700 HID: i2c-hid: allocate hid buffers for real worst case The buffer allocation is not currently accounting for an extra byte for the report id. This can cause an out of bounds access in function i2c_hid_set_or_send_report() with reportID > 15. Cc: stable@vger.kernel.org Signed-off-by: Adrian Salido Reviewed-by: Benson Leung Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c353f88f3de485a059e5c003721e2dc276d02fad Merge: 6d8ef53 939ae4e Author: Linus Torvalds Date: Wed Sep 13 09:11:44 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "This fixes d_ino correctness in readdir, which brings overlayfs on par with normal filesystems regarding inode number semantics, as long as all layers are on the same filesystem. There are also some bug fixes, one in particular (random ioctl's shouldn't be able to modify lower layers) that touches some vfs code, but of course no-op for non-overlay fs" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix false positive ESTALE on lookup ovl: don't allow writing ioctl on lower layer ovl: fix relatime for directories vfs: add flags to d_real() ovl: cleanup d_real for negative ovl: constant d_ino for non-merge dirs ovl: constant d_ino across copy up ovl: fix readdir error value ovl: check snprintf return commit 5153723388c8691b886eb9ad28dde92c01f9b191 Author: Radim Krčmář Date: Wed Sep 13 15:13:46 2017 +0200 KVM: x86: fix clang build Clang resolves __builtin_constant_p() to false even if the expression is constant in the end. The only purpose of that expression was to differentiate a case where the following expression couldn't be checked at compile-time, so we can just remove the check. Clang handles the following two correctly. Turn it into BUG_ON if there are any more problems with this. Fixes: d6321d493319 ("KVM: x86: generalize guest_cpuid_has_ helpers") Reported-by: Dmitry Vyukov Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.h | 1 - 1 file changed, 1 deletion(-) commit 021086e383fa408a219f6c6541b37f495f59d576 Author: Christian Borntraeger Date: Wed Sep 13 14:17:22 2017 +0200 KVM: fix rcu warning on VM_CREATE errors commit 3898da947bba ("KVM: avoid using rcu_dereference_protected") can trigger the following lockdep/rcu splat if the VM_CREATE ioctl fails, for example if kvm_arch_init_vm fails: WARNING: suspicious RCU usage 4.13.0+ #105 Not tainted ----------------------------- ./include/linux/kvm_host.h:481 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 no locks held by qemu-system-s39/79. stack backtrace: CPU: 0 PID: 79 Comm: qemu-system-s39 Not tainted 4.13.0+ #105 Hardware name: IBM 2964 NC9 704 (KVM/Linux) Call Trace: ([<00000000001140b2>] show_stack+0xea/0xf0) [<00000000008a68a4>] dump_stack+0x94/0xd8 [<0000000000134c12>] kvm_dev_ioctl+0x372/0x7a0 [<000000000038f940>] do_vfs_ioctl+0xa8/0x6c8 [<0000000000390004>] SyS_ioctl+0xa4/0xb8 [<00000000008c7a8c>] system_call+0xc4/0x27c no locks held by qemu-system-s39/79. We have to reset the just created users_count back to 0 to tell the check to not trigger. Reported-by: Stefan Haberland Signed-off-by: Christian Borntraeger Fixes: 3898da947bba ("KVM: avoid using rcu_dereference_protected") Cc: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 1 + 1 file changed, 1 insertion(+) commit 2f173d2688559a6f85643d38a2ad6f45eb420c42 Author: Jan H. Schönherr Date: Wed Sep 6 18:34:06 2017 +0200 KVM: x86: Fix immediate_exit handling for uninitialized AP When user space sets kvm_run->immediate_exit, KVM is supposed to return quickly. However, when a vCPU is in KVM_MP_STATE_UNINITIALIZED, the value is not considered and the vCPU blocks. Fix that oversight. Fixes: 460df4c1fc7c008 ("KVM: race-free exit from KVM_RUN without POSIX signals") Signed-off-by: Jan H. Schönherr Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 ++++ 1 file changed, 4 insertions(+) commit a05950009f50ca971a1d616655d01628177bd2e3 Author: Jan H. Schönherr Date: Wed Sep 6 00:27:19 2017 +0200 KVM: x86: Fix handling of pending signal on uninitialized AP KVM API says that KVM_RUN will return with -EINTR when a signal is pending. However, if a vCPU is in KVM_MP_STATE_UNINITIALIZED, then the return value is unconditionally -EAGAIN. Copy over some code from vcpu_run(), so that the case of a pending signal results in the expected return value. Signed-off-by: Jan H. Schönherr Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 5 +++++ 1 file changed, 5 insertions(+) commit 49a8afca386ee1775519a4aa80f8e121bd227dd4 Author: Jan H. Schönherr Date: Tue Sep 5 23:58:44 2017 +0200 KVM: SVM: Add a missing 'break' statement Signed-off-by: Jan H. Schönherr Fixes: f6511935f424 ("KVM: SVM: Add checks for IO instructions") Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 1 + 1 file changed, 1 insertion(+) commit 673514aff5d797b0cdb3f09097ae0e253b5667c3 Author: Stefan Haberland Date: Tue Sep 12 17:22:42 2017 +0200 s390/dasd: fix race during dasd initialization Fix a panic in blk_mq_hctx_has_pending() that is caused by a racy call to blk_mq_run_hw_queues in a dasd function that might get called with the request queue not yet initialized during initialization. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fc3100d64f0ae383ae8d845989103da06d62763b Author: Pu Hou Date: Tue Sep 5 05:17:24 2017 +0200 s390/perf: fix bug when creating per-thread event A per-thread event could not be created correctly like below: perf record --per-thread -e rB0000 -- sleep 1 Error: The sys_perf_event_open() syscall returned with 19 (No such device) for event (rB0000). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? This bug was introduced by: commit c311c797998c1e70eade463dd60b843da4f1a203 Author: Alexey Dobriyan Date: Mon May 8 15:56:15 2017 -0700 cpumask: make "nr_cpumask_bits" unsigned If a per-thread event is not attached to any CPU, the cpu field in struct perf_event is -1. The above commit converts the CPU number to unsigned int, which result in an illegal CPU number. Fixes: c311c797998c ("cpumask: make "nr_cpumask_bits" unsigned") Cc: # v4.12+ Cc: Alexey Dobriyan Acked-by: Heiko Carstens Signed-off-by: Pu Hou Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 98152b83e065d5593c261b0cc58197666f94a34f Author: Joerg Roedel Date: Mon Aug 28 16:38:35 2017 +0200 KVM: x86: Remove .get_pkru() from kvm_x86_ops The commit 9dd21e104bc ('KVM: x86: simplify handling of PKRU') removed all users and providers of that call-back, but didn't remove it. Remove it now. Signed-off-by: Joerg Roedel Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 1 - 1 file changed, 1 deletion(-) commit 518417525f3652c12fb5fad6da4ade66c0072fa3 Author: Lucas Stach Date: Mon Sep 11 15:29:31 2017 +0200 etnaviv: fix gem object list corruption All manipulations of the gem_object list need to be protected by the list mutex, as GEM objects can be created and freed in parallel. This fixes a kernel memory corruption. CC: stable@vger.kernel.org Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a642e6bc49f59922e19ebd639e74f72753fc77b Author: Lucas Stach Date: Fri Sep 8 16:24:32 2017 +0200 etnaviv: fix submit error path If the gpu submit fails, bail out to avoid accessing a potentially unititalized fence. CC: stable@vger.kernel.org #4.12+ Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1278f58cdee63cfbb04e5624474a291c81a7a13b Author: Vitaly Kuznetsov Date: Mon Sep 11 17:06:20 2017 +0200 x86/hyper-v: Remove duplicated HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED definition Commits: 7dcf90e9e032 ("PCI: hv: Use vPCI protocol version 1.2") 628f54cc6451 ("x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls") added the same definition and they came in through different trees. Fix the duplication. Signed-off-by: Vitaly Kuznetsov Cc: Haiyang Zhang Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20170911150620.3998-1-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/uapi/asm/hyperv.h | 6 ------ 1 file changed, 6 deletions(-) commit 213ff44ae4eb5224010166db2f851e4eea068268 Author: K. Y. Srinivasan Date: Fri Sep 8 16:15:57 2017 -0700 x86/hyper-V: Allocate the IDT entry early in boot Allocate the hypervisor callback IDT entry early in the boot sequence. The previous code would allocate the entry as part of registering the handler when the vmbus driver loaded, and this caused a problem for the IDT cleanup that Thomas is working on for v4.15. Signed-off-by: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: apw@canonical.com Cc: devel@linuxdriverproject.org Cc: gregkh@linuxfoundation.org Cc: jasowang@redhat.com Cc: olaf@aepfle.de Link: http://lkml.kernel.org/r/20170908231557.2419-1-kys@exchange.microsoft.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mshyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30c1bbffe629985d86bf68796a224ea4eac2685b Author: Juergen Gross Date: Tue Sep 5 16:34:07 2017 +0200 paravirt: Switch maintainer Jeremy Fitzhardinge is stepping down as a paravirt maintainer. I'll replace him. While at it, update the file list to the actual pattern. Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: chrisw@sous-sol.org Cc: jeremy@goop.org Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170905143407.9227-1-jgross@suse.com Signed-off-by: Ingo Molnar MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87930019c713873a1c3b9bd55dde46e81f70c8f1 Author: Juergen Gross Date: Mon Sep 4 12:25:27 2017 +0200 x86/paravirt: Remove no longer used paravirt functions With removal of lguest some of the paravirt functions are no longer needed: ->read_cr4() ->store_idt() ->set_pmd_at() ->set_pud_at() ->pte_update() Remove them. Signed-off-by: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org 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/20170904102527.25409-1-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 3 +-- arch/x86/include/asm/paravirt.h | 37 ----------------------------------- arch/x86/include/asm/paravirt_types.h | 9 --------- arch/x86/include/asm/pgtable.h | 27 ++++--------------------- arch/x86/include/asm/special_insns.h | 10 +++++----- arch/x86/kernel/paravirt.c | 5 ----- arch/x86/kvm/vmx.c | 2 +- arch/x86/mm/pgtable.c | 7 +------ arch/x86/xen/enlighten_pv.c | 2 -- arch/x86/xen/mmu_pv.c | 2 -- 10 files changed, 12 insertions(+), 92 deletions(-) commit 23e9fcfef1f3d10675acce023592796851bcaf1a Author: Alexey Kodanev Date: Tue Sep 12 14:53:46 2017 +0300 vti: fix NULL dereference in xfrm_input() Can be reproduced with LTP tests: # icmp-uni-vti.sh -p ah -a sha256 -m tunnel -S fffffffe -k 1 -s 10 IPv4: RIP: 0010:xfrm_input+0x7f9/0x870 ... Call Trace: vti_input+0xaa/0x110 [ip_vti] ? skb_free_head+0x21/0x40 vti_rcv+0x33/0x40 [ip_vti] xfrm4_ah_rcv+0x33/0x60 ip_local_deliver_finish+0x94/0x1e0 ip_local_deliver+0x6f/0xe0 ? ip_route_input_noref+0x28/0x50 ... # icmp-uni-vti.sh -6 -p ah -a sha256 -m tunnel -S fffffffe -k 1 -s 10 IPv6: RIP: 0010:xfrm_input+0x7f9/0x870 ... Call Trace: xfrm6_rcv_tnl+0x3c/0x40 vti6_rcv+0xd5/0xe0 [ip6_vti] xfrm6_ah_rcv+0x33/0x60 ip6_input_finish+0xee/0x460 ip6_input+0x3f/0xb0 ip6_rcv_finish+0x45/0xa0 ipv6_rcv+0x34b/0x540 xfrm_input() invokes xfrm_rcv_cb() -> vti_rcv_cb(), the last callback might call skb_scrub_packet(), which in turn can reset secpath. Fix it by adding a check that skb->sp is not NULL. Fixes: 7e9e9202bccc ("xfrm: Clear RX SKB secpath xfrm_offload") Signed-off-by: Alexey Kodanev Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c7ad5ad297e644601747d6dbee978bf85e14f7bc Author: Andy Lutomirski Date: Sun Sep 10 17:48:27 2017 -0700 x86/mm/64: Initialize CR4.PCIDE early cpu_init() is weird: it's called rather late (after early identification and after most MMU state is initialized) on the boot CPU but is called extremely early (before identification) on secondary CPUs. It's called just late enough on the boot CPU that its CR4 value isn't propagated to mmu_cr4_features. Even if we put CR4.PCIDE into mmu_cr4_features, we'd hit two problems. First, we'd crash in the trampoline code. That's fixable, and I tried that. It turns out that mmu_cr4_features is totally ignored by secondary_start_64(), though, so even with the trampoline code fixed, it wouldn't help. This means that we don't currently have CR4.PCIDE reliably initialized before we start playing with cpu_tlbstate. This is very fragile and tends to cause boot failures if I make even small changes to the TLB handling code. Make it more robust: initialize CR4.PCIDE earlier on the boot CPU and propagate it to secondary CPUs in start_secondary(). ( Yes, this is ugly. I think we should have improved mmu_cr4_features to actually control CR4 during secondary bootup, but that would be fairly intrusive at this stage. ) Signed-off-by: Andy Lutomirski Reported-by: Sai Praneeth Prakhya Tested-by: Sai Praneeth Prakhya Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: 660da7c9228f ("x86/mm: Enable CR4.PCIDE on supported systems") Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 49 +++++++------------------------------------- arch/x86/kernel/setup.c | 5 ++++- arch/x86/kernel/smpboot.c | 8 +++++--- arch/x86/mm/init.c | 34 ++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 46 deletions(-) commit f34902c5c6c08024371202a680ce69f2d488776d Author: Andy Lutomirski Date: Thu Sep 7 22:06:58 2017 -0700 x86/hibernate/64: Mask off CR3's PCID bits in the saved CR3 Jiri reported a resume-from-hibernation failure triggered by PCID. The root cause appears to be rather odd. The hibernation asm restores a CR3 value that comes from the image header. If the image kernel has PCID on, it's entirely reasonable for this CR3 value to have one of the low 12 bits set. The restore code restores it with CR4.PCIDE=0, which means that those low 12 bits are accepted by the CPU but are either ignored or interpreted as a caching mode. This is odd, but still works. We blow up later when the image kernel restores CR4, though, since changing CR4.PCIDE with CR3[11:0] != 0 is illegal. Boom! FWIW, it's entirely unclear to me what's supposed to happen if a PAE kernel restores a non-PAE image or vice versa. Ditto for LA57. Reported-by: Jiri Kosina Tested-by: Jiri Kosina Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 660da7c9228f ("x86/mm: Enable CR4.PCIDE on supported systems") Link: http://lkml.kernel.org/r/18ca57090651a6341e97083883f9e814c4f14684.1504847163.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/power/hibernate_64.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit a376e7f99be7c1e15b2d986e49b2bec834904381 Author: Andy Lutomirski Date: Thu Sep 7 22:06:57 2017 -0700 x86/mm: Get rid of VM_BUG_ON in switch_tlb_irqs_off() If we hit the VM_BUG_ON(), we're detecting a genuinely bad situation, but we're very unlikely to get a useful call trace. Make it a warning instead. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Jiri Kosina Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3b4e06bbb382ca54a93218407c93925ff5871546.1504847163.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit b130a699c07155a1d6ef7d971a5f3bf0e3818d5a Merge: 6d8ef53 dfc9eec Author: Ingo Molnar Date: Wed Sep 13 09:25:10 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.14-20170912' 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 TUI progress bar when delta from new total from that of the previous update is greater than the progress "step" (screen width progress bar block)) (Jiri Olsa) - Make tools/lib/api make DEBUG=1 build use -D_FORTIFY_SOURCE=2 not to cripple debuginfo, just like tools/perf/ does (Jiri Olsa) - Avoid leaking the 'perf.data' file to workloads started from the 'perf record' command line by using the O_CLOEXEC open flag (Jiri Olsa) - Fix building when libunwind's 'unwind.h' file is present in the include path, clashing with tools/perf/util/unwind.h (Milian Wolff) - Check per .perfconfig section entry flag, not just per section (Taeung Song) - Support running perf binaries with a dash in their name, needed to run perf as an AppImage (Milian Wolff) - Wait for the right child by using waitpid() when running workloads from 'perf stat', also to fix using perf as an AppImage (Milian Wolff) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 47e0cd6b1dbbbff7591fe7eecc20bac5ca674351 Merge: 7846b12 3d138c14 Author: Dave Airlie Date: Wed Sep 13 14:34:11 2017 +1000 Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next A few fixes for 4.14. Nothing too major. commit 854426ef359c52bdf7087bc20c8d9105d075ca29 Author: Arnd Bergmann Date: Tue Sep 12 14:31:48 2017 +0200 w90p910_ether: include linux/interrupt.h A randconfig build caused a compile failure: drivers/net/ethernet/nuvoton/w90p910_ether.c: In function 'w90p910_ether_close': drivers/net/ethernet/nuvoton/w90p910_ether.c:580:2: error: implicit declaration of function 'free_irq'; did you mean 'free_uid'? [-Werror=implicit-function-declaration] Adding the correct include fixes the problem. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/nuvoton/w90p910_ether.c | 1 + 1 file changed, 1 insertion(+) commit f13ad104b4e886a03e75f130daf579ef9bf33dfc Author: Nikolay Aleksandrov Date: Tue Sep 12 15:10:05 2017 +0300 net: bonding: fix tlb_dynamic_lb default value Commit 8b426dc54cf4 ("bonding: remove hardcoded value") changed the default value for tlb_dynamic_lb which lead to either broken ALB mode (since tlb_dynamic_lb can be changed only in TLB) or setting TLB mode with tlb_dynamic_lb equal to 0. The first issue was recently fixed by setting tlb_dynamic_lb to 1 always when switching to ALB mode, but the default value is still wrong and we'll enter TLB mode with tlb_dynamic_lb equal to 0 if the mode is changed via netlink or sysfs. In order to restore the previous behaviour and default value simply remove the mode check around the default param initialization for tlb_dynamic_lb which will always set it to 1 as before. Fixes: 8b426dc54cf4 ("bonding: remove hardcoded value") Signed-off-by: Nikolay Aleksandrov Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 6c1cb4393cc7e7107e4e94a9a0744451296ca8a6 Author: Haishuang Yan Date: Tue Sep 12 17:47:57 2017 +0800 ip6_tunnel: fix ip6 tunnel lookup in collect_md mode In collect_md mode, if the tun dev is down, it still can call __ip6_tnl_rcv to receive on packets, and the rx statistics increase improperly. When the md tunnel is down, it's not neccessary to increase RX drops for the tunnel device, packets would be recieved on fallback tunnel, and the RX drops on fallback device will be increased as expected. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Cc: Alexei Starovoitov Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 833a8b405465e935a1ff7ab086b54a3ef90437ca Author: Haishuang Yan Date: Tue Sep 12 17:47:56 2017 +0800 ip_tunnel: fix ip tunnel lookup in collect_md mode In collect_md mode, if the tun dev is down, it still can call ip_tunnel_rcv to receive on packets, and the rx statistics increase improperly. When the md tunnel is down, it's not neccessary to increase RX drops for the tunnel device, packets would be recieved on fallback tunnel, and the RX drops on fallback device will be increased as expected. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Cc: Pravin B Shelar Signed-off-by: Haishuang Yan Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6399ebcccffa12e65bc15eda039d37673264ebce Author: Yuval Mintz Date: Tue Sep 12 08:50:53 2017 +0200 mlxsw: spectrum: Prevent mirred-related crash on removal When removing the offloading of mirred actions under matchall classifiers, mlxsw would find the destination port associated with the offloaded action and utilize it for undoing the configuration. Depending on the order by which ports are removed, it's possible that the destination port would get removed before the source port. In such a scenario, when actions would be flushed for the source port mlxsw would perform an illegal dereference as the destination port is no longer listed. Since the only item necessary for undoing the configuration on the destination side is the port-id and that in turn is already maintained by mlxsw on the source-port, simply stop trying to access the destination port and use the port-id directly instead. Fixes: 763b4b70af ("mlxsw: spectrum: Add support in matchall mirror TC offloading") Signed-off-by: Yuval Mintz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 63428fb6a134947d9efad721dc80e721b328a4e4 Merge: da8ab57 1697c4b Author: David S. Miller Date: Tue Sep 12 20:41:02 2017 -0700 Merge branch 'net_sched-fix-filter-chain-reference-counting' Cong Wang says: ==================== net_sched: fix filter chain reference counting This patchset fixes tc filter chain reference counting and nasty race conditions with RCU callbacks. Please see each patch for details. v3: Rebase on the latest -net Add code comment in patch 1 Improve comment and changelog for patch 2 Add patch 3 v2: Add patch 1 Get rid of more ugly code in patch 2 ==================== Signed-off-by: David S. Miller commit 1697c4bb5245649a23f06a144cc38c06715e1b65 Author: Cong Wang Date: Mon Sep 11 16:33:32 2017 -0700 net_sched: carefully handle tcf_block_put() As pointed out by Jiri, there is still a race condition between tcf_block_put() and tcf_chain_destroy() in a RCU callback. There is no way to make it correct without proper locking or synchronization, because both operate on a shared list. Locking is hard, because the only lock we can pick here is a spinlock, however, in tc_dump_tfilter() we iterate this list with a sleeping function called (tcf_chain_dump()), which makes using a lock to protect chain_list almost impossible. Jiri suggested the idea of holding a refcnt before flushing, this works because it guarantees us there would be no parallel tcf_chain_destroy() during the loop, therefore the race condition is gone. But we have to be very careful with proper synchronization with RCU callbacks. Suggested-by: Jiri Pirko Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit e2ef75445340ca7ec2c4558f84ae6c8c5d650fc8 Author: Cong Wang Date: Mon Sep 11 16:33:31 2017 -0700 net_sched: fix reference counting of tc filter chain This patch fixes the following ugliness of tc filter chain refcnt: a) tp proto should hold a refcnt to the chain too. This significantly simplifies the logic. b) Chain 0 is no longer special, it is created with refcnt=1 like any other chains. All the ugliness in tcf_chain_put() can be gone! c) No need to handle the flushing oddly, because block still holds chain 0, it can not be released, this guarantees block is the last user. d) The race condition with RCU callbacks is easier to handle with just a rcu_barrier(). Much easier to understand, nothing to hide. Thanks to the previous patch. Please see also the comments in code. e) Make the code understandable by humans, much less error-prone. Fixes: 744a4cf63e52 ("net: sched: fix use after free when tcf_chain_destroy is called multiple times") Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Cc: Jiri Pirko Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) commit d7fb60b9cafb982cb2e46a267646a8dfd4f2e5da Author: Cong Wang Date: Mon Sep 11 16:33:30 2017 -0700 net_sched: get rid of tcfa_rcu gen estimator has been rewritten in commit 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators"), the caller is no longer needed to wait for a grace period. So this patch gets rid of it. This also completely closes a race condition between action free path and filter chain add/remove path for the following patch. Because otherwise the nested RCU callback can't be caught by rcu_barrier(). Please see also the comments in code. Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: Eric Dumazet Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 2 -- net/sched/act_api.c | 17 ++++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) commit da8ab57863ed7e912d10b179b6bdc652f635bd19 Author: Eric Dumazet Date: Mon Sep 11 15:58:38 2017 -0700 tcp/dccp: remove reqsk_put() from inet_child_forget() Back in linux-4.4, I inadvertently put a call to reqsk_put() in inet_child_forget(), forgetting it could be called from two different points. In the case it is called from inet_csk_reqsk_queue_add(), we want to keep the reference on the request socket, since it is released later by the caller (tcp_v{4|6}_rcv()) This bug never showed up because atomic_dec_and_test() was not signaling the underflow, and SLAB_DESTROY_BY RCU semantic for request sockets prevented the request to be put in quarantine. Recent conversion of socket refcount from atomic_t to refcount_t finally exposed the bug. So move the reqsk_put() to inet_csk_listen_stop() to fix this. Thanks to Shankara Pailoor for using syzkaller and providing a nice set of .config and C repro. WARNING: CPU: 2 PID: 4277 at lib/refcount.c:186 refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:186 Kernel panic - not syncing: panic_on_warn set ... CPU: 2 PID: 4277 Comm: syz-executor0 Not tainted 4.13.0-rc7 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0xf7/0x1aa lib/dump_stack.c:52 panic+0x1ae/0x3a7 kernel/panic.c:180 __warn+0x1c4/0x1d9 kernel/panic.c:541 report_bug+0x211/0x2d0 lib/bug.c:183 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:190 do_trap_no_signal arch/x86/kernel/traps.c:224 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:273 do_error_trap+0x118/0x340 arch/x86/kernel/traps.c:310 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:323 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:846 RIP: 0010:refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:186 RSP: 0018:ffff88006e006b60 EFLAGS: 00010286 RAX: 0000000000000026 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000026 RSI: 1ffff1000dc00d2c RDI: ffffed000dc00d60 RBP: ffff88006e006bf0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000dc00d6d R13: 00000000ffffffff R14: 0000000000000001 R15: ffff88006ce9d340 refcount_dec_and_test+0x1a/0x20 lib/refcount.c:211 reqsk_put+0x71/0x2b0 include/net/request_sock.h:123 tcp_v4_rcv+0x259e/0x2e20 net/ipv4/tcp_ipv4.c:1729 ip_local_deliver_finish+0x2e2/0xba0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:248 [inline] ip_local_deliver+0x1ce/0x6d0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:477 [inline] ip_rcv_finish+0x8db/0x19c0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:248 [inline] ip_rcv+0xc3f/0x17d0 net/ipv4/ip_input.c:488 __netif_receive_skb_core+0x1fb7/0x31f0 net/core/dev.c:4298 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4336 process_backlog+0x1c5/0x6d0 net/core/dev.c:5102 napi_poll net/core/dev.c:5499 [inline] net_rx_action+0x6d3/0x14a0 net/core/dev.c:5565 __do_softirq+0x2cb/0xb2d kernel/softirq.c:284 do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:898 do_softirq.part.16+0x63/0x80 kernel/softirq.c:328 do_softirq kernel/softirq.c:176 [inline] __local_bh_enable_ip+0x84/0x90 kernel/softirq.c:181 local_bh_enable include/linux/bottom_half.h:31 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:705 [inline] ip_finish_output2+0x8ad/0x1360 net/ipv4/ip_output.c:231 ip_finish_output+0x74e/0xb80 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:237 [inline] ip_output+0x1cc/0x850 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:471 [inline] ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124 ip_queue_xmit+0x8c6/0x1810 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x1963/0x3320 net/ipv4/tcp_output.c:1123 tcp_send_ack.part.35+0x38c/0x620 net/ipv4/tcp_output.c:3575 tcp_send_ack+0x49/0x60 net/ipv4/tcp_output.c:3545 tcp_rcv_synsent_state_process net/ipv4/tcp_input.c:5795 [inline] tcp_rcv_state_process+0x4876/0x4b60 net/ipv4/tcp_input.c:5930 tcp_v4_do_rcv+0x58a/0x820 net/ipv4/tcp_ipv4.c:1483 sk_backlog_rcv include/net/sock.h:907 [inline] __release_sock+0x124/0x360 net/core/sock.c:2223 release_sock+0xa4/0x2a0 net/core/sock.c:2715 inet_wait_for_connect net/ipv4/af_inet.c:557 [inline] __inet_stream_connect+0x671/0xf00 net/ipv4/af_inet.c:643 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:682 SYSC_connect+0x204/0x470 net/socket.c:1628 SyS_connect+0x24/0x30 net/socket.c:1609 entry_SYSCALL_64_fastpath+0x18/0xad RIP: 0033:0x451e59 RSP: 002b:00007f474843fc08 EFLAGS: 00000216 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 0000000000451e59 RDX: 0000000000000010 RSI: 0000000020002000 RDI: 0000000000000007 RBP: 0000000000000046 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 R13: 00007ffc040a0f8f R14: 00007f47484409c0 R15: 0000000000000000 Fixes: ebb516af60e1 ("tcp/dccp: fix race at listener dismantle phase") Signed-off-by: Eric Dumazet Reported-by: Shankara Pailoor Tested-by: Shankara Pailoor Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5829e62ac17a40ab08c1b905565604a4b5fa7af6 Author: Christophe JAILLET Date: Mon Sep 11 21:56:20 2017 +0200 openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()' All other error handling paths in this function go through the 'error' label. This one should do the same. Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Christophe JAILLET Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c0827317f235865ae421293f8aecf6cb327a63e Author: Nisar Sayed Date: Mon Sep 11 17:43:11 2017 +0000 smsc95xx: Configure pause time to 0xffff when tx flow control enabled Configure pause time to 0xffff when tx flow control enabled Set pause time to 0xffff in the pause frame to indicate the partner to stop sending the packets. When RX buffer frees up, the device sends pause frame with pause time zero for partner to resume transmission. Fixes: 2f7ca802bdae ("Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver") Signed-off-by: Nisar Sayed Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6d8ef53e8b2fed8b0f91df0c6da7cc92747d934a Merge: cdb897e e6c6de1 Author: Linus Torvalds Date: Tue Sep 12 20:05:58 2017 -0700 Merge tag 'f2fs-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've mostly tuned f2fs to provide better user experience for Android. Especially, we've worked on atomic write feature again with SQLite community in order to support it officially. And we added or modified several facilities to analyze and enhance IO behaviors. Major changes include: - add app/fs io stat - add inode checksum feature - support project/journalled quota - enhance atomic write with new ioctl() which exposes feature set - enhance background gc/discard/fstrim flows with new gc_urgent mode - add F2FS_IOC_FS{GET,SET}XATTR - fix some quota flows" * tag 'f2fs-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (63 commits) f2fs: hurry up to issue discard after io interruption f2fs: fix to show correct discard_granularity in sysfs f2fs: detect dirty inode in evict_inode f2fs: clear radix tree dirty tag of pages whose dirty flag is cleared f2fs: speed up gc_urgent mode with SSR f2fs: better to wait for fstrim completion f2fs: avoid race in between read xattr & write xattr f2fs: make get_lock_data_page to handle encrypted inode f2fs: use generic terms used for encrypted block management f2fs: introduce f2fs_encrypted_file for clean-up Revert "f2fs: add a new function get_ssr_cost" f2fs: constify super_operations f2fs: fix to wake up all sleeping flusher f2fs: avoid race in between atomic_read & atomic_inc f2fs: remove unneeded parameter of change_curseg f2fs: update i_flags correctly f2fs: don't check inode's checksum if it was dirtied or writebacked f2fs: don't need to update inode checksum for recovery f2fs: trigger fdatasync for non-atomic_write file f2fs: fix to avoid race in between aio and gc ... commit cdb897e3279ad1677138d6bdf1cfaf1393718a08 Merge: b31ff3c 15b51bd Author: Linus Torvalds Date: Tue Sep 12 20:03:53 2017 -0700 Merge tag 'ceph-for-4.14-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The highlights include: - a large series of fixes and improvements to the snapshot-handling code (Zheng Yan) - individual read/write OSD requests passed down to libceph are now limited to 16M in size to avoid hitting OSD-side limits (Zheng Yan) - encode MStatfs v2 message to allow for more accurate space usage reporting (Douglas Fuller) - switch to the new writeback error tracking infrastructure (Jeff Layton)" * tag 'ceph-for-4.14-rc1' of git://github.com/ceph/ceph-client: (35 commits) ceph: stop on-going cached readdir if mds revokes FILE_SHARED cap ceph: wait on writeback after writing snapshot data ceph: fix capsnap dirty pages accounting ceph: ignore wbc->range_{start,end} when write back snapshot data ceph: fix "range cyclic" mode writepages ceph: cleanup local variables in ceph_writepages_start() ceph: optimize pagevec iterating in ceph_writepages_start() ceph: make writepage_nounlock() invalidate page that beyonds EOF ceph: properly get capsnap's size in get_oldest_context() ceph: remove stale check in ceph_invalidatepage() ceph: queue cap snap only when snap realm's context changes ceph: handle race between vmtruncate and queuing cap snap ceph: fix message order check in handle_cap_export() ceph: fix NULL pointer dereference in ceph_flush_snaps() ceph: adjust 36 checks for NULL pointers ceph: delete an unnecessary return statement in update_dentry_lease() ceph: ENOMEM pr_err in __get_or_create_frag() is redundant ceph: check negative offsets in ceph_llseek() ceph: more accurate statfs ceph: properly set snap follows for cap reconnect ... commit b31ff3cdf540110da4572e3e29bd172087af65cc Author: Richard Wareing Date: Wed Sep 13 09:09:35 2017 +1000 xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present If using a kernel with CONFIG_XFS_RT=y and we set the RHINHERIT flag on a directory in a filesystem that does not have a realtime device and create a new file in that directory, it gets marked as a real time file. When data is written and a fsync is issued, the filesystem attempts to flush a non-existent rt device during the fsync process. This results in a crash dereferencing a null buftarg pointer in xfs_blkdev_issue_flush(): BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: xfs_blkdev_issue_flush+0xd/0x20 ..... Call Trace: xfs_file_fsync+0x188/0x1c0 vfs_fsync_range+0x3b/0xa0 do_fsync+0x3d/0x70 SyS_fsync+0x10/0x20 do_syscall_64+0x4d/0xb0 entry_SYSCALL64_slow_path+0x25/0x25 Setting RT inode flags does not require special privileges so any unprivileged user can cause this oops to occur. To reproduce, confirm kernel is compiled with CONFIG_XFS_RT=y and run: # mkfs.xfs -f /dev/pmem0 # mount /dev/pmem0 /mnt/test # mkdir /mnt/test/foo # xfs_io -c 'chattr +t' /mnt/test/foo # xfs_io -f -c 'pwrite 0 5m' -c fsync /mnt/test/foo/bar Or just run xfstests with MKFS_OPTIONS="-d rtinherit=1" and wait. Kernels built with CONFIG_XFS_RT=n are not exposed to this bug. Fixes: f538d4da8d52 ("[XFS] write barrier support") Cc: Signed-off-by: Richard Wareing Signed-off-by: Dave Chinner Signed-off-by: Linus Torvalds fs/xfs/xfs_linux.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3d138c14c4174a2c80874a96935c87eee7c82ecf 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 bf2afee14e07de16d3cafc67edbfc2a3cc65e4bc Author: Ronnie Sahlberg Date: Fri Sep 8 10:37:35 2017 +1000 cifs: check rsp for NULL before dereferencing in SMB2_open In SMB2_open there are several paths where the SendReceive2 call will return an error before it sets rsp_iov.iov_base thus leaving iov_base uninitialized. Thus we need to check rsp before we dereference it in the call to get_rfc1002_length(). A report of this issue was previously reported in http://www.spinics.net/lists/linux-cifs/msg12846.html RH-bugzilla : 1476151 Version 2 : * Lets properly initialize rsp_iov before we use it. Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky . Signed-off-by: Steve French Reported-by: Xiaoli Feng CC: Stable fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52269718dc2cf2585d7a2828f31d46ef46e68000 Merge: ae71948 d35b099 Author: Linus Torvalds Date: Tue Sep 12 13:30:06 2017 -0700 Merge tag 'dma-mapping-4.14' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - removal of the old dma_alloc_noncoherent interface - remove unused flags to dma_declare_coherent_memory - restrict OF DMA configuration to specific physical busses - use the iommu mailing list for dma-mapping questions and patches * tag 'dma-mapping-4.14' of git://git.infradead.org/users/hch/dma-mapping: dma-coherent: fix dma_declare_coherent_memory() logic error ARM: imx: mx31moboard: Remove unused 'dma' variable dma-coherent: remove an unused variable MAINTAINERS: use the iommu list for the dma-mapping subsystem dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag of: restrict DMA configuration dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent i825xx: switch to switch to dma_alloc_attrs au1000_eth: switch to dma_alloc_attrs sgiseeq: switch to dma_alloc_attrs dma-mapping: reduce dma_mapping_error inline bloat commit ae71948f398eb2572148006bf34f0c6d934206cb Merge: 7f85565 c002075 Author: Linus Torvalds Date: Tue Sep 12 13:27:21 2017 -0700 Merge tag 'uuid-for-4.14' of git://git.infradead.org/users/hch/uuid Pull uuid updates from Christoph Hellwig: "Just a single conversion to the new UUID API for this merge window" * tag 'uuid-for-4.14' of git://git.infradead.org/users/hch/uuid: efi: switch to use new generic UUID API commit 7f85565a3f7194b966de71926471d69788b6b9c3 Merge: 680352b 0c3014f Author: Linus Torvalds Date: Tue Sep 12 13:21:00 2017 -0700 Merge tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "A relatively quiet period for SELinux, 11 patches with only two/three having any substantive changes. These noteworthy changes include another tweak to the NNP/nosuid handling, per-file labeling for cgroups, and an object class fix for AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or administrative updates (Stephen's email update explains the file explosion in the diffstat). Everything passes the selinux-testsuite" [ Also a couple of small patches from the security tree from Tetsuo Handa for Tomoyo and LSM cleanup. The separation of security policy updates wasn't all that clean - Linus ] * tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: constify nf_hook_ops selinux: allow per-file labeling for cgroupfs lsm_audit: update my email address selinux: update my email address MAINTAINERS: update the NetLabel and Labeled Networking information selinux: use GFP_NOWAIT in the AVC kmem_caches selinux: Generalize support for NNP/nosuid SELinux domain transitions selinux: genheaders should fail if too many permissions are defined selinux: update the selinux info in MAINTAINERS credits: update Paul Moore's info selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst LSM: Remove security_task_create() hook. commit 122d6a347329818419b032c5a1776e6b3866d9b9 Author: Cameron Gutman Date: Tue Sep 12 11:27:44 2017 -0700 Input: xpad - validate USB endpoint type during probe We should only see devices with interrupt endpoints. Ignore any other endpoints that we find, so we don't send try to send them interrupt URBs and trigger a WARN down in the USB stack. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: # c01b5e7464f0 Input: xpad - don't depend on endpoint order Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 680352bda57e3dbf21cddf6a5e23aff7e294fb31 Merge: 040b9d7 e2329b4 Author: Linus Torvalds Date: Tue Sep 12 11:34:39 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Two fixes: dead code removal, plus a SME memory encryption fix on 32-bit kernels that crashed Xen guests" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Remove unused and undefined __generic_processor_info() declaration x86/mm: Make the SME mask a u64 commit 040b9d7ccff40e1fbd48029e3c769db188a3ba2c Merge: e6328a7 4612335 Author: Linus Torvalds Date: Tue Sep 12 11:30:56 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Three fixes: - fix a suspend/resume cpusets bug - fix a !CONFIG_NUMA_BALANCING bug - fix a kerneldoc warning" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix nuisance kernel-doc warning sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs sched/fair: Fix wake_affine_llc() balancing rules commit e6328a7abe7f8fcd32e9d3bcbd14ff2161bf71c9 Merge: 33f82bd 770e961 Author: Linus Torvalds Date: Tue Sep 12 11:28:13 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling updates from Ingo Molnar: "Perf tooling updates and fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB perf stat: Only auto-merge events that are PMU aliases perf test: Add test case for PERF_SAMPLE_PHYS_ADDR perf script: Support physical address perf mem: Support physical address perf sort: Add sort option for physical address perf tools: Support new sample type for physical address perf vendor events powerpc: Remove duplicate events perf intel-pt: Fix syntax in documentation of config option perf test powerpc: Fix 'Object code reading' test perf trace: Support syscall name globbing perf syscalltbl: Support glob matching on syscall names perf report: Calculate the average cycles of iterations commit 33f82bda010224e908e23e59150b4d36904affe9 Merge: 8fac2f9 12ac1d0 Author: Linus Torvalds Date: Tue Sep 12 11:25:56 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "A sparse irq race/locking fix, and a MSI irq domains population fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Make sparse_irq_lock protect what it should protect genirq/msi: Fix populating multiple interrupts commit e6c6de18f010d9a7d592f4044d2c30213cb3a7bc Author: Chao Yu Date: Tue Sep 12 21:35:12 2017 +0800 f2fs: hurry up to issue discard after io interruption Once we encounter I/O interruption during issuing discards, we will delay long time before next round, but if system status is I/O idle during the time, it may loses opportunity to issue discards. So this patch changes to hurry up to issue discard after io interruption. Besides, this patch also fixes to issue discards accurately with assigned rate. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 80647e5f4c728ecea7d9190c6e7163755ff6835c Author: Chao Yu Date: Tue Sep 12 14:25:35 2017 +0800 f2fs: fix to show correct discard_granularity in sysfs Fix below incorrect display when reading discard_granularity sysfs node. $ cat /sys/fs/f2fs//discard_granularity $ 16 $ echo 32 > /sys/fs/f2fs//discard_granularity $ cat /sys/fs/f2fs//discard_granularity $ 16 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit ca7d802a7d8ee4c47dce9be86ef4b27e587086bb Author: Chao Yu Date: Tue Sep 12 14:04:05 2017 +0800 f2fs: detect dirty inode in evict_inode Add a bugon in f2fs_evict_inode to detect inconsistent status between inode cache and related node page cache. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit dfc9eec7716cc0a9f7eb743c703d74cd2d6085a0 Author: Milian Wolff Date: Tue Sep 12 17:25:23 2017 +0200 perf stat: Wait for the correct child When packaging the perf userland application into an AppImage, the wait() call in perf stat returned too early. It turned out that some other child process exited, but not the one perf stat launched: $ sudo strace -e fork,execve,clone,wait4 -f ./perf-x86_64.AppImage stat sleep 1 execve("./perf-git.3a73b7f9-x86_64.AppImage", ["./perf-git.3a73b7f9-x86_64.AppIm"..., "stat", "sleep", "1"], 0x7ffec1bbf050 /* 18 vars */) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6a6e7efe50) = 3912 strace: Process 3912 attached [pid 3912] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6a6e7efe50) = 3914 strace: Process 3914 attached [pid 3912] +++ exited with 0 +++ [pid 3911] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3912, si_uid=0, si_status=0, si_utime=0, si_stime=0} --- [pid 3914] clone(strace: Process 3915 attached child_stack=0x7f6a6d9fefb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f6a6d9ff9d0, tls=0x7f6a6d9ff700, child_tidptr=0x7f6a6d9ff9d0) = 3915 [pid 3911] execve("/tmp/.mount_perf-g6VYMpl/AppRun", ["./perf-git.3a73b7f9-x86_64.AppIm"..., "stat", "sleep", "1"], 0x14aab70 /* 21 vars */) = 0 [pid 3911] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4ae113c4d0) = 3916 strace: Process 3916 attached [pid 3911] wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3912 [pid 3916] execve("/usr/libexec/perf-core/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/tmp/./sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/home/milian/.bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/usr/lib/icecream/libexec/icecc/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/ssd2/milian/projects/compiled/other/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/home/milian/.bin/kf5/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/ssd2/milian/projects/compiled/kf5/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/home/milian/projects/compiled/other/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/home/milian/projects/compiled/kf5/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/usr/local/sbin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/usr/local/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */) = -1 ENOENT (No such file or directory) [pid 3916] execve("/usr/bin/sleep", ["sleep", "1"], 0x27d3650 /* 22 vars */ Performance counter stats for 'sleep 1': task-clock context-switches cpu-migrations page-faults cycles instructions branches branch-misses 0.000047194 seconds time elapsed [pid 3916] --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=3911, si_uid=0} --- [pid 3916] +++ killed by SIGTERM +++ [pid 3911] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3916, si_uid=0, si_status=SIGTERM, si_utime=0, si_stime=0} --- [pid 3915] --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=3914, si_uid=0} --- [pid 3911] +++ exited with 0 +++ [pid 3915] --- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=3914, si_uid=0} --- [pid 3915] +++ exited with 0 +++ +++ exited with 0 +++ This patch uses waitpid instead to ensure the call waits for the debuggee application launched by 'perf stat'. This fixes 'perf stat' when launched from an AppImage: $ ./perf-x86_64.AppImage stat sleep 1 Performance counter stats for 'sleep 1': 0.357235 task-clock (msec) # 0.000 CPUs utilized 1 context-switches # 0.003 M/sec 0 cpu-migrations # 0.000 K/sec 50 page-faults # 0.140 M/sec 1269602 cycles # 3.554 GHz 654278 instructions # 0.52 insn per cycle 129963 branches # 363.803 M/sec 7082 branch-misses # 5.45% of all branches 1.000633420 seconds time elapsed Signed-off-by: Milian Wolff Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170912152523.4497-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3192f1ed3dd3a6883d5ae31bf2ff69984ea0fd54 Author: Milian Wolff Date: Mon Sep 11 13:14:22 2017 +0200 perf tools: Support running perf binaries with a dash in their name Previously the part behind "perf-" was interpreted as an internal perf command. If the suffix could not be handled, the execution was stopped. This makes it impossible to launch perf binaries that got renamed to have the `perf-` prefix. This is e.g. the case for appimages (e.g. "perf-x86_64.AppImage"), but would also apply to all other scenarios where users symlink or rename perf themselves: Status quo with the broken behavior: $ ln -s ./perf ./perf-custom-suffix $ ./perf-custom-suffix list cannot handle custom-suffix internally$ Also note the missing newline at the end of the error message. With this patch applied, the above works properly: $ ./perf-custom-suffix list List of pre-defined events (to be used in -e): ... Signed-off-by: Milian Wolff Acked-by: David Ahern Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20170911111422.31903-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 9469eb01db891b55367ee7539f1b9f7f6fd2819d Author: Peter Zijlstra Date: Thu Sep 7 17:03:53 2017 +0200 sched/debug: Add debugfs knob for "sched_debug" I'm forever late for editing my kernel cmdline, add a runtime knob to disable the "sched_debug" thing. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170907150614.142924283@infradead.org Signed-off-by: Ingo Molnar kernel/sched/debug.c | 5 +++++ kernel/sched/sched.h | 2 ++ kernel/sched/topology.c | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) commit 4ff9083b8a9a80bdf4ebbbec22cda4cbfb60f7aa Author: Peter Zijlstra Date: Thu Sep 7 17:03:52 2017 +0200 sched/core: WARN() when migrating to an offline CPU Migrating tasks to offline CPUs is a pretty big fail, warn about it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170907150614.094206976@infradead.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit edd8e41d2e3cbd6ebe13ead30eb1adc6f48cbb33 Author: Peter Zijlstra Date: Thu Sep 7 17:03:51 2017 +0200 sched/fair: Plug hole between hotplug and active_load_balance() The load balancer applies cpu_active_mask to whatever sched_domains it finds, however in the case of active_balance there is a hole between setting rq->{active_balance,push_cpu} and running the stop_machine work doing the actual migration. The @push_cpu can go offline in this window, which would result in us moving a task onto a dead cpu, which is a fairly bad thing. Double check the active mask before the stop work does the migration. CPU0 CPU1 stop_machine(takedown_cpu) load_balance() cpu_stopper_thread() ... work = multi_cpu_stop stop_one_cpu_nowait( /* wait for CPU0 */ .func = active_load_balance_cpu_stop ); cpu_stopper_thread() work = multi_cpu_stop /* sync with CPU1 */ take_cpu_down() play_dead(); work = active_load_balance_cpu_stop set_task_cpu(p, CPU1); /* oops!! */ Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170907150614.044460912@infradead.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2800486ee34825d954f64c6f98037daea328f121 Author: Peter Zijlstra Date: Thu Sep 7 17:03:50 2017 +0200 sched/fair: Avoid newidle balance for !active CPUs On CPU hot unplug, when parking the last kthread we'll try and schedule into idle to kill the CPU. This last schedule can (and does) trigger newidle balance because at this point the sched domains are still up because of commit: 77d1dfda0e79 ("sched/topology, cpuset: Avoid spurious/wrong domain rebuilds") Obviously pulling tasks to an already offline CPU is a bad idea, and all balancing operations _should_ be subject to cpu_active_mask, make it so. Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: 77d1dfda0e79 ("sched/topology, cpuset: Avoid spurious/wrong domain rebuilds") Link: http://lkml.kernel.org/r/20170907150613.994135806@infradead.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cba225d6eeaf00bd8181a851fbaa7b8716337e0b Author: Taeung Song Date: Thu Sep 7 12:18:45 2017 +0900 perf config: Check not only section->from_system_config but also item's Currently section->from_system_config is being checked multiple times. item->from_system_config should be checked instead, when iterating thru the items in a section. Fix it. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504754325-9724-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a82bfd041d0ec41861a7adda4c078993f2f9c452 Author: Jiri Olsa Date: Fri Sep 8 14:05:08 2017 +0200 perf ui progress: Fix progress update We currently update the 'next' variable only with a single step value. But it's possible the 'adv' update is bigger than single 'step' value. This would leave 'next' value under counted and force unnecessary ui_progress__ops->update calls. Calculate the amount of steps we need for 'adv' update and increase the 'next' with that amounts of steps. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908120510.22515-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/progress.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4d286c89e412fc2eaa1b8988481d2f32b5e3826f Author: Jiri Olsa Date: Fri Sep 8 14:05:07 2017 +0200 perf ui progress: Make sure we always define step value Unlikely, but we could have ui_progress__init being called with total < 16, which would set the next and step variables to 0. That would force unnecessary ui_progress__ops->update calls because 'next' would never raise. Forcing the next and step values to be always > 0. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908120510.22515-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/progress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd6379ebb55ae53e77f17e22ce830bf3fe826736 Author: Jiri Olsa Date: Fri Sep 8 10:46:20 2017 +0200 perf tools: Open perf.data with O_CLOEXEC flag Do not carry the perf.data file descriptor into the workload process and close it when perf executes the workload. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908084621.31595-2-jolsa@kernel.org [ Add definitions for O_CLOEXEC for older systems ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 58b79186c34306f4a14e98119afc10744a42fa40 Author: Jiri Olsa Date: Fri Sep 8 10:46:19 2017 +0200 tools lib api: Fix make DEBUG=1 build Do not use -D_FORTIFY_SOURCE=2 for DEBUG build as it seems to mess up with debuginfo, which results in bad gdb experience. We already do that for tools/perf/. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908084621.31595-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit df90cc41d662ad5f700afc042df43e57ce1ed0a4 Author: Milian Wolff Date: Wed Sep 6 17:02:09 2017 +0200 perf tests: Fix compile when libunwind's unwind.h is available When cross compiling perf and I want to link against a self-compiled libunwind, I usually make the custom path where the libunwind headers exist visible by adding the libunwind prefix to the include path when compiling perf, i.e.: ~~~~~ $ ls $HOME/projects/compiled/other/include/ libunwind-coredump.h libunwind.h libunwind-x86_64.h libunwind-common.h libunwind-dynamic.h libunwind-ptrace.h unwind.h $ make EXTRA_CFLAGS="-I$HOME/projects/compiled/other/include/ ~~~~~~ Note the `unwind.h` header from libunwind which leads to compile errors when compiling tests/dwarf-unwind.c, since it shadows perf's util/unwind.h: ~~~~~ tests/dwarf-unwind.c:41:32: error: ‘struct unwind_entry’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] static int unwind_entry(struct unwind_entry *entry, void *arg) ^~~~~~~~~~~~ tests/dwarf-unwind.c: In function ‘unwind_entry’: tests/dwarf-unwind.c:44:22: error: dereferencing pointer to incomplete type ‘struct unwind_entry’ char *symbol = entry->sym ? entry->sym->name : NULL; ^~ tests/dwarf-unwind.c: In function ‘unwind_thread’: tests/dwarf-unwind.c:92:8: error: implicit declaration of function ‘unwind__get_entries’; did you mean ‘unwind_entry’? [-Werror=implicit-function-declaration] err = unwind__get_entries(unwind_entry, &cnt, thread, ^~~~~~~~~~~~~~~~~~~ unwind_entry tests/dwarf-unwind.c:92:8: error: nested extern declaration of ‘unwind__get_entries’ [-Werror=nested-externs] ~~~~~~ Fix this compile error by specificing an explicit include of perf's unwind.h in the util folder. Signed-off-by: Milian Wolff Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20170906150209.12579-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/dwarf-unwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 259d40775ee11dbeba022514815df08c57994ef3 Author: Arnaldo Carvalho de Melo Date: Tue Sep 5 10:52:02 2017 -0300 tools include linux: Guard against redefinition of some macros When cross building to android r15c (and older versions) on Fedora 26 we notice these: /opt/android-ndk-r15c/platforms/android-24/arch-arm/usr/include/sys/cdefs.h:332:0: note: this is the location of the previous definition For __aligned, __packed and __noreturn, so guard those with ifdefs to avoid drowning useful warnings in these. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-d7w3fa9c22dtmrwbedos6ie1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 939ae4efd51c627da270af74ef069db5124cb5b0 Author: Amir Goldstein Date: Mon Sep 11 16:30:15 2017 +0300 ovl: fix false positive ESTALE on lookup Commit b9ac5c274b8c ("ovl: hash overlay non-dir inodes by copy up origin") verifies that the origin lower inode stored in the overlayfs inode matched the inode of a copy up origin dentry found by lookup. There is a false positive result in that check when lower fs does not support file handles and copy up origin cannot be followed by file handle at lookup time. The false negative happens when finding an overlay inode in cache on a copied up overlay dentry lookup. The overlay inode still 'remembers' the copy up origin inode, but the copy up origin dentry is not available for verification. Relax the check in case copy up origin dentry is not available. Fixes: b9ac5c274b8c ("ovl: hash overlay non-dir inodes by copy up...") Cc: # v4.13 Reported-by: Jordi Pujol Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 77780f799e66cd261746a281dbbef1ee0c6997cd Author: Masahiro Yamada Date: Sat Sep 2 17:05:35 2017 +0900 kbuild: buildtar: do not print successful message if tar returns error The previous commit spotted that "Tarball successfully created ..." is displayed even if the "tar" command returns error code because it is followed by "| ${compress}". Let the build fail instead of printing the successful message since if the "tar" command fails, the output may not be what users expect. Avoid the use of the pipe. While we are here, refactor the script removing the use of sub-shell, ${compress}, ${file_ext}. Signed-off-by: Masahiro Yamada scripts/package/buildtar | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit dd965f1f0857e72eb6d4cfb28769ba01465ba01b Author: Masahiro Yamada Date: Sat Sep 2 17:05:34 2017 +0900 kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled $tmpdir/lib is created by "make modules_install". It does not exist if CONFIG_MODULES is disabled, then tar reports the following messages: tar: lib: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors Signed-off-by: Masahiro Yamada scripts/package/buildtar | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5b97eeacbd80a7bb60f2534eb43304f821e1ba06 Author: Miklos Szeredi Date: Tue Sep 12 16:57:54 2017 +0200 fuse: getattr cleanup The refreshed argument isn't used by any caller, get rid of it. Use a helper for just updating the inode (no need to fill in a kstat). Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 30 +++++++++++++----------------- fs/fuse/file.c | 8 ++++---- fs/fuse/fuse_i.h | 3 +-- 3 files changed, 18 insertions(+), 23 deletions(-) commit e1c0eecba1a4154c35c400f1cc9a035e6246bbcd Author: Miklos Szeredi Date: Tue Sep 12 16:57:53 2017 +0200 fuse: honor iocb sync flags on write If the IOCB_DSYNC flag is set a sync is not being performed by fuse_file_write_iter. Honor IOCB_DSYNC/IOCB_SYNC by setting O_DYSNC/O_SYNC respectively in the flags filed of the write request. We don't need to sync data or metadata, since fuse_perform_write() does write-through and the filesystem is responsible for updating file times. Original patch by Vitaly Zolotusky. Reported-by: Nate Clark Cc: Vitaly Zolotusky . Signed-off-by: Miklos Szeredi fs/fuse/cuse.c | 4 ++-- fs/fuse/file.c | 41 ++++++++++++++++++++++++----------------- fs/fuse/fuse_i.h | 5 ++--- 3 files changed, 28 insertions(+), 22 deletions(-) commit 5d6d3a301c4e749e04be6fcdcf4cb1ffa8bae524 Author: Miklos Szeredi Date: Tue Sep 12 16:57:53 2017 +0200 fuse: allow server to run in different pid_ns Commit 0b6e9ea041e6 ("fuse: Add support for pid namespaces") broke Sandstorm.io development tools, which have been sending FUSE file descriptors across PID namespace boundaries since early 2014. The above patch added a check that prevented I/O on the fuse device file descriptor if the pid namespace of the reader/writer was different from the pid namespace of the mounter. With this change passing the device file descriptor to a different pid namespace simply doesn't work. The check was added because pids are transferred to/from the fuse userspace server in the namespace registered at mount time. To fix this regression, remove the checks and do the following: 1) the pid in the request header (the pid of the task that initiated the filesystem operation) is translated to the reader's pid namespace. If a mapping doesn't exist for this pid, then a zero pid is used. Note: even if a mapping would exist between the initiator task's pid namespace and the reader's pid namespace the pid will be zero if either mapping from initator's to mounter's namespace or mapping from mounter's to reader's namespace doesn't exist. 2) The lk.pid value in setlk/setlkw requests and getlk reply is left alone. Userspace should not interpret this value anyway. Also allow the setlk/setlkw operations if the pid of the task cannot be represented in the mounter's namespace (pid being zero in that case). Reported-by: Kenton Varda Signed-off-by: Miklos Szeredi Fixes: 0b6e9ea041e6 ("fuse: Add support for pid namespaces") Cc: # v4.12+ Cc: Eric W. Biederman Cc: Seth Forshee fs/fuse/dev.c | 13 +++++++------ fs/fuse/file.c | 3 --- 2 files changed, 7 insertions(+), 9 deletions(-) commit 79d2c8bede2c93f9432d7da0bc2f76a195c90fc0 Author: Daniel Drake Date: Mon Sep 11 14:11:56 2017 +0800 pinctrl/amd: save pin registers over suspend/resume The touchpad in the Asus laptop models X505BA/BP and X542BA/BP is unresponsive after suspend/resume. The following error appears during resume: i2c_hid i2c-ELAN1300:00: failed to reset device. The problem here is that i2c_hid does not notice the interrupt being generated at this point, because the GPIO is no longer configured for interrupts. Fix this by saving pinctrl-amd pin registers during suspend and restoring them at resume time. Based on code from pinctrl-intel. Cc: stable@vger.kernel.org Signed-off-by: Daniel Drake Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 75 +++++++++++++++++++++++++++++++++++++++++++ drivers/pinctrl/pinctrl-amd.h | 1 + 2 files changed, 76 insertions(+) commit 8fac2f96ab86b0e14ec4e42851e21e9b518bdc55 Merge: 260d165 e558bdc Author: Linus Torvalds Date: Tue Sep 12 06:10:44 2017 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Low priority fixes and updates for ARM: - add some missing includes - efficiency improvements in system call entry code when tracing is enabled - ensure ARMv6+ is always built as EABI - export save_stack_trace_tsk() - fix fatal signal handling during mm fault - build translation table base address register from scratch - appropriately align the .data section to a word boundary where we rely on that data being word aligned" * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8691/1: Export save_stack_trace_tsk() ARM: 8692/1: mm: abort uaccess retries upon fatal signal ARM: 8690/1: lpae: build TTB control register value from scratch in v7_ttb_setup ARM: align .data section ARM: always enable AEABI for ARMv6+ ARM: avoid saving and restoring registers unnecessarily ARM: move PC value into r9 ARM: obtain thread info structure later ARM: use aliases for registers in entry-common ARM: 8689/1: scu: add missing errno include ARM: 8688/1: pm: add missing types include commit 260d16580db018e3faeb1992c70c13bf00e726b8 Merge: c971aa3 e443343 Author: Linus Torvalds Date: Tue Sep 12 06:01:59 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Martin Schwidefsky: "The second patch set for the 4.14 merge window: - Convert the dasd device driver to the blk-mq interface. - Provide three zcrypt interfaces for vfio_ap. These will be required for KVM guest access to the crypto cards attached via the AP bus. - A couple of memory management bug fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: blk-mq conversion s390/mm: use a single lock for the fields in mm_context_t s390/mm: fix race on mm->context.flush_mm s390/mm: fix local TLB flushing vs. detach of an mm address space s390/zcrypt: externalize AP queue interrupt control s390/zcrypt: externalize AP config info query s390/zcrypt: externalize test AP queue s390/mm: use VM_BUG_ON in crst_table_[upgrade|downgrade] commit fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57 Author: Takashi Iwai Date: Tue Sep 12 12:41:20 2017 +0200 ALSA: seq: Cancel pending autoload work at unbinding device ALSA sequencer core has a mechanism to load the enumerated devices automatically, and it's performed in an off-load work. This seems causing some race when a sequencer is removed while the pending autoload work is running. As syzkaller spotted, it may lead to some use-after-free: BUG: KASAN: use-after-free in snd_rawmidi_dev_seq_free+0x69/0x70 sound/core/rawmidi.c:1617 Write of size 8 at addr ffff88006c611d90 by task kworker/2:1/567 CPU: 2 PID: 567 Comm: kworker/2:1 Not tainted 4.13.0+ #29 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: events autoload_drivers Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x192/0x22c lib/dump_stack.c:52 print_address_description+0x78/0x280 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x230/0x340 mm/kasan/report.c:409 __asan_report_store8_noabort+0x1c/0x20 mm/kasan/report.c:435 snd_rawmidi_dev_seq_free+0x69/0x70 sound/core/rawmidi.c:1617 snd_seq_dev_release+0x4f/0x70 sound/core/seq_device.c:192 device_release+0x13f/0x210 drivers/base/core.c:814 kobject_cleanup lib/kobject.c:648 [inline] kobject_release lib/kobject.c:677 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x145/0x240 lib/kobject.c:694 put_device+0x25/0x30 drivers/base/core.c:1799 klist_devices_put+0x36/0x40 drivers/base/bus.c:827 klist_next+0x264/0x4a0 lib/klist.c:403 next_device drivers/base/bus.c:270 [inline] bus_for_each_dev+0x17e/0x210 drivers/base/bus.c:312 autoload_drivers+0x3b/0x50 sound/core/seq_device.c:117 process_one_work+0x9fb/0x1570 kernel/workqueue.c:2097 worker_thread+0x1e4/0x1350 kernel/workqueue.c:2231 kthread+0x324/0x3f0 kernel/kthread.c:231 ret_from_fork+0x25/0x30 arch/x86/entry/entry_64.S:425 The fix is simply to assure canceling the autoload work at removing the device. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/core/seq_device.c | 3 +++ 1 file changed, 3 insertions(+) commit a9a1a4833613b8a2e8dd79f860ea1871f17da02c Author: Gregory CLEMENT Date: Thu Sep 7 16:54:07 2017 +0200 pinctrl: armada-37xx: Fix gpio interrupt setup Since commit dc749a09ea5e ("gpiolib: allow gpio irqchip to map irqs dynamically"), the irqs for gpio are not statically allocated during in gpiochip_irqchip_add. This driver was based on this assumption for initializing the mask associated to each interrupt this led to a NULL pointer crash in the kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000 Mem abort info: Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000068 CM = 0, WnR = 1 [0000000000000000] user address but active_mm is swapper Internal error: Oops: 96000044 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-06657-g3b9f8ed25dbe #576 Hardware name: Marvell Armada 3720 Development Board DB-88F3720-DDR3 (DT) task: ffff80001d908000 task.stack: ffff000008068000 PC is at armada_37xx_pinctrl_probe+0x5f8/0x670 LR is at armada_37xx_pinctrl_probe+0x5e8/0x670 pc : [] lr : [] pstate: 60000045 sp : ffff00000806bb80 x29: ffff00000806bb80 x28: 0000000000000024 x27: 000000000000000c x26: 0000000000000001 x25: ffff80001efee760 x24: 0000000000000000 x23: ffff80001db6f570 x22: ffff80001db6f438 x21: 0000000000000000 x20: ffff80001d9f4810 x19: ffff80001db6f418 x18: 0000000000000000 x17: 0000000000000001 x16: 0000000000000019 x15: ffffffffffffffff x14: 0140000000000000 x13: 0000000000000000 x12: 0000000000000030 x11: 0101010101010101 x10: 0000000000000040 x9 : ffff000009923580 x8 : ffff80001d400248 x7 : ffff80001d400270 x6 : 0000000000000000 x5 : ffff80001d400248 x4 : ffff80001d400270 x3 : 0000000000000000 x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000000 Process swapper/0 (pid: 1, stack limit = 0xffff000008068000) Call trace: Exception stack(0xffff00000806ba40 to 0xffff00000806bb80) ba40: 0000000000000000 0000000000000001 0000000000000001 0000000000000000 ba60: ffff80001d400270 ffff80001d400248 0000000000000000 ffff80001d400270 ba80: ffff80001d400248 ffff000009923580 0000000000000040 0101010101010101 baa0: 0000000000000030 0000000000000000 0140000000000000 ffffffffffffffff bac0: 0000000000000019 0000000000000001 0000000000000000 ffff80001db6f418 bae0: ffff80001d9f4810 0000000000000000 ffff80001db6f438 ffff80001db6f570 bb00: 0000000000000000 ffff80001efee760 0000000000000001 000000000000000c bb20: 0000000000000024 ffff00000806bb80 ffff000008e25ccc ffff00000806bb80 bb40: ffff000008e25cdc 0000000060000045 ffff00000806bb60 ffff0000081189b8 bb60: ffffffffffffffff ffff00000811cf1c ffff00000806bb80 ffff000008e25cdc [] armada_37xx_pinctrl_probe+0x5f8/0x670 [] platform_drv_probe+0x58/0xb8 [] driver_probe_device+0x22c/0x2d8 [] __driver_attach+0xbc/0xc0 [] bus_for_each_dev+0x4c/0x98 [] driver_attach+0x20/0x28 [] bus_add_driver+0x1b8/0x228 [] driver_register+0x60/0xf8 [] __platform_driver_probe+0x74/0x130 [] armada_37xx_pinctrl_driver_init+0x20/0x28 [] do_one_initcall+0x38/0x128 [] kernel_init_freeable+0x188/0x22c [] kernel_init+0x10/0x100 [] ret_from_fork+0x10/0x18 Code: f9403fa2 12001341 1100075a 9ac12041 (b9000001) ---[ end trace 8b0f4e05e1603208 ]--- This patch moves the initialization of the mask field in the irq_startup function. However some callbacks such as irq_set_type and irq_set_wake could be called before irq_startup. For those functions the mask is computed at each call which is not a issue as these functions are not located in a hot path but are used sporadically for configuration. Fixes: dc749a09ea5e ("gpiolib: allow gpio irqchip to map irqs dynamically") Cc: Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 41 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit 4ce504c4eb5628073f35d38efe490554a12aee04 Author: Dan Carpenter Date: Thu Sep 7 14:12:05 2017 +0300 pinctrl: sprd: fix off by one bugs info->groups[] has info->ngroups elements so these comparisons should be >= instead of >. Fixes: 41d32cfce1ae ("pinctrl: sprd: Add Spreadtrum pin control driver") Signed-off-by: Dan Carpenter Reviewed-by: Baolin Wang Signed-off-by: Linus Walleij drivers/pinctrl/sprd/pinctrl-sprd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 41470c379b4f8d9a1513d930338fadfbccc287b6 Author: Dan Carpenter Date: Thu Sep 7 10:29:26 2017 +0300 pinctrl: sprd: check for allocation failure devm_pinctrl_get() could fail with ERR_PTR(-ENOMEM) so I have added a check for that. I also reversed the other IS_ERR() test because it was a little confusing to test one way and then the opposite a couple lines later. Fixes: 41d32cfce1ae ("pinctrl: sprd: Add Spreadtrum pin control driver") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/pinctrl/sprd/pinctrl-sprd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit baec7e687aa066f6fa257222a0def5ea9b5b1c40 Author: Geert Uytterhoeven Date: Wed Sep 6 18:08:05 2017 +0200 pinctrl: sprd: Restrict PINCTRL_SPRD to ARCH_SPRD or COMPILE_TEST The Spreadtrum pinctrl drivers are only useful when building for a Spreadtrum platform. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/pinctrl/sprd/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aaab90bbca3995ca312918fc92fc17e99aece098 Author: Randy Dunlap Date: Mon Sep 4 08:35:28 2017 -0700 pinctrl: sprd: fix build errors and dependencies Fix build errors when CONFIG_OF is not enabled. Also, the pinctrl-sprd-sc9860 driver uses functions from the pinctrl-sprd driver, so the former should depend on the latter driver. ../drivers/pinctrl/sprd/pinctrl-sprd.c: In function 'sprd_dt_node_to_map': ../drivers/pinctrl/sprd/pinctrl-sprd.c:290:2: error: implicit declaration of function 'pinconf_generic_parse_dt_config' [-Werror=implicit-function-declaration] ret = pinconf_generic_parse_dt_config(np, pctldev, &configs, ^ ../drivers/pinctrl/sprd/pinctrl-sprd.c: At top level: ../drivers/pinctrl/sprd/pinctrl-sprd.c:844:44: error: array type has incomplete element type static const struct pinconf_generic_params sprd_dt_params[] = { ^ Signed-off-by: Randy Dunlap Cc: Baolin Wang Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Linus Walleij drivers/pinctrl/sprd/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 045b5792dc48848742d3746efab436f4c66be115 Author: Colin Ian King Date: Mon Sep 4 11:53:22 2017 +0100 pinctrl: sprd: make three local functions static The functions sprd_pmx_get_function_count, sprd_pmx_get_function_name and sprd_pmx_get_function_groups are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: "symbol 'sprd_pmx_get_function_count' was not declared. Should it be static?" "symbol 'sprd_pmx_get_function_name' was not declared. Should it be static?" "symbol 'sprd_pmx_get_function_groups' was not declared. Should it be static?" Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/sprd/pinctrl-sprd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6d363bd1786cf42cf2eb7bb7bf1e0d69788bdb2f Author: Masahiro Yamada Date: Sun Sep 3 02:26:18 2017 +0900 pinctrl: uniphier: include instead of The #includes is here to use BUILD_BUG_ON_ZERO(). Thanks to commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into "), it is now possible to reduce the number of headers pulled in. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f16e666b9b7e07237ca0669df9b89ccf8dfc102c Author: Markus Elfring Date: Wed Sep 6 13:30:14 2017 +0200 ALSA: firewire: Use common error handling code in snd_motu_stream_start_duplex() 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: Takashi Iwai sound/firewire/motu/motu-stream.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b0e07da3f5c8d069d186a7983ff64eaebf2ea230 Author: Gerd Hoffmann Date: Mon Sep 11 11:39:50 2017 +0200 qxl: fix primary surface handling The atomic conversion of the qxl driver didn't got the primary surface handling completely right. It works in the common simple cases, but fails for example when changing the display resolution using xrandr or in multihead setups. The rules are simple: There is one primary surface. Before defining a new one you have to destroy the old one. This patch makes qxl_primary_atomic_update() destroy the primary surface before defining a new one. It fixes is_primary flag updates. It adds is_primary checks so we don't try to update the primary surface in case it already has the state we want it being in. Fixes: 3538e80a869b ("drm: qxl: Atomic phase 1: Implement mode_set_nofb") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102338 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196777 Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170911093950.22401-1-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_display.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 67f8a8c1151c9ef3d1285905d1e66ebb769ecdf7 Author: Paul Mackerras Date: Tue Sep 12 13:47:23 2017 +1000 KVM: PPC: Book3S HV: Fix bug causing host SLB to be restored incorrectly Aneesh Kumar reported seeing host crashes when running recent kernels on POWER8. The symptom was an oops like this: Unable to handle kernel paging request for data at address 0xf00000000786c620 Faulting instruction address: 0xc00000000030e1e4 Oops: Kernel access of bad area, sig: 11 [#1] LE SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: powernv_op_panel CPU: 24 PID: 6663 Comm: qemu-system-ppc Tainted: G W 4.13.0-rc7-43932-gfc36c59 #2 task: c000000fdeadfe80 task.stack: c000000fdeb68000 NIP: c00000000030e1e4 LR: c00000000030de6c CTR: c000000000103620 REGS: c000000fdeb6b450 TRAP: 0300 Tainted: G W (4.13.0-rc7-43932-gfc36c59) MSR: 9000000000009033 CR: 24044428 XER: 20000000 CFAR: c00000000030e134 DAR: f00000000786c620 DSISR: 40000000 SOFTE: 0 GPR00: 0000000000000000 c000000fdeb6b6d0 c0000000010bd000 000000000000e1b0 GPR04: c00000000115e168 c000001fffa6e4b0 c00000000115d000 c000001e1b180386 GPR08: f000000000000000 c000000f9a8913e0 f00000000786c600 00007fff587d0000 GPR12: c000000fdeb68000 c00000000fb0f000 0000000000000001 00007fff587cffff GPR16: 0000000000000000 c000000000000000 00000000003fffff c000000fdebfe1f8 GPR20: 0000000000000004 c000000fdeb6b8a8 0000000000000001 0008000000000040 GPR24: 07000000000000c0 00007fff587cffff c000000fdec20bf8 00007fff587d0000 GPR28: c000000fdeca9ac0 00007fff587d0000 00007fff587c0000 00007fff587d0000 NIP [c00000000030e1e4] __get_user_pages_fast+0x434/0x1070 LR [c00000000030de6c] __get_user_pages_fast+0xbc/0x1070 Call Trace: [c000000fdeb6b6d0] [c00000000139dab8] lock_classes+0x0/0x35fe50 (unreliable) [c000000fdeb6b7e0] [c00000000030ef38] get_user_pages_fast+0xf8/0x120 [c000000fdeb6b830] [c000000000112318] kvmppc_book3s_hv_page_fault+0x308/0xf30 [c000000fdeb6b960] [c00000000010e10c] kvmppc_vcpu_run_hv+0xfdc/0x1f00 [c000000fdeb6bb20] [c0000000000e915c] kvmppc_vcpu_run+0x2c/0x40 [c000000fdeb6bb40] [c0000000000e5650] kvm_arch_vcpu_ioctl_run+0x110/0x300 [c000000fdeb6bbe0] [c0000000000d6468] kvm_vcpu_ioctl+0x528/0x900 [c000000fdeb6bd40] [c0000000003bc04c] do_vfs_ioctl+0xcc/0x950 [c000000fdeb6bde0] [c0000000003bc930] SyS_ioctl+0x60/0x100 [c000000fdeb6be30] [c00000000000b96c] system_call+0x58/0x6c Instruction dump: 7ca81a14 2fa50000 41de0010 7cc8182a 68c60002 78c6ffe2 0b060000 3cc2000a 794a3664 390610d8 e9080000 7d485214 7d435378 790507e1 408202f0 ---[ end trace fad4a342d0414aa2 ]--- It turns out that what has happened is that the SLB entry for the vmmemap region hasn't been reloaded on exit from a guest, and it has the wrong page size. Then, when the host next accesses the vmemmap region, it gets a page fault. Commit a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with KVM", 2017-07-24) modified the guest exit code so that it now only clears out the SLB for hash guest. The code tests the radix flag and puts the result in a non-volatile CR field, CR2, and later branches based on CR2. Unfortunately, the kvmppc_save_tm function, which gets called between those two points, modifies all the user-visible registers in the case where the guest was in transactional or suspended state, except for a few which it restores (namely r1, r2, r9 and r13). Thus the hash/radix indication in CR2 gets corrupted. This fixes the problem by re-doing the comparison just before the result is needed. For good measure, this also adds comments next to the call sites of kvmppc_save_tm and kvmppc_restore_tm pointing out that non-volatile register state will be lost. Cc: stable@vger.kernel.org # v4.13 Fixes: a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with KVM") Tested-by: Aneesh Kumar K.V Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit cf5f6f3125241853462334b1bc696f3c3c492178 Author: Paul Mackerras Date: Mon Sep 11 16:05:30 2017 +1000 KVM: PPC: Book3S HV: Hold kvm->lock around call to kvmppc_update_lpcr Commit 468808bd35c4 ("KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9", 2017-01-30) added a call to kvmppc_update_lpcr() which doesn't hold the kvm->lock mutex around the call, as required. This adds the lock/unlock pair, and for good measure, includes the kvmppc_setup_partition_table() call in the locked region, since it is altering global state of the VM. This error appears not to have any fatal consequences for the host; the consequences would be that the VCPUs could end up running with different LPCR values, or an update to the LPCR value by userspace using the one_reg interface could get overwritten, or the update done by kvmhv_configure_mmu() could get overwritten. Cc: stable@vger.kernel.org # v4.10+ Fixes: 468808bd35c4 ("KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9") Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) commit d222af072380c4470295c07d84ecb15f4937e365 Author: Benjamin Herrenschmidt Date: Wed Sep 6 15:20:55 2017 +1000 KVM: PPC: Book3S HV: Don't access XIVE PIPR register using byte accesses The XIVE interrupt controller on POWER9 machines doesn't support byte accesses to any register in the thread management area other than the CPPR (current processor priority register). In particular, when reading the PIPR (pending interrupt priority register), we need to do a 32-bit or 64-bit load. Cc: stable@vger.kernel.org # v4.13 Fixes: 2c4fb78f78b6 ("KVM: PPC: Book3S HV: Workaround POWER9 DD1.0 bug causing IPB bit loss") Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rm_xive.c | 1 - arch/powerpc/kvm/book3s_xive.c | 1 - arch/powerpc/kvm/book3s_xive_template.c | 7 ++++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit c971aa3693e1b68086e62645c54a087616217b6f Merge: 8e7757d b32b5e1 Author: Linus Torvalds Date: Mon Sep 11 22:26:20 2017 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - fix resources release in error paths when registering thermal zone. (Christophe Jaillet) - introduce a new thermal driver for on-chip PVT (Process, Voltage and Temperature) monitoring unit implemented on UniPhier SoCs. This driver supports temperature monitoring and alert function. (Kunihiko Hayashi) - Add support for mt2712 chip in the mtk_thermal driver. (Louis Yu) - Add support for RK3328 SOC in rockchip_thermal driver. (Rocky Hao) - cleanup a couple of platform thermal drivers to constify thermal_zone_of_device_ops structures. (Julia Lawall) - a couple of fixes in int340x and intel_pch_thermal thermal driver. (Arvind Yadav, Sumeet Pawnikar, Brian Bian, Ed Swierk, Zhang Rui) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (27 commits) Thermal: int3406_thermal: fix thermal sysfs I/F thermal: mediatek: minor mtk_thermal.c cleanups thermal: mediatek: extend calibration data for mt2712 chip thermal: mediatek: add Mediatek thermal driver for mt2712 dt-bindings: thermal: Add binding document for Mediatek thermal controller thermal: intel_pch_thermal: Fix enable check on Broadwell-DE thermal: rockchip: Support the RK3328 SOC in thermal driver dt-bindings: rockchip-thermal: Support the RK3328 SoC compatible thermal: bcm2835: constify thermal_zone_of_device_ops structures thermal: exynos: constify thermal_zone_of_device_ops structures thermal: zx2967: constify thermal_zone_of_device_ops structures thermal: rcar_gen3_thermal: constify thermal_zone_of_device_ops structures thermal: qoriq: constify thermal_zone_of_device_ops structures thermal: hisilicon: constify thermal_zone_of_device_ops structures thermal: core: Fix resources release in error paths in thermal_zone_device_register() thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function thermal: core: Add some new helper functions to free resources thermal: int3400_thermal: process "thermal table changed" event thermal: uniphier: add UniPhier thermal driver dt-bindings: thermal: add binding documentation for UniPhier thermal monitor ... commit 8e7757d83d07cc77ee2661e9615a2f9f4ce540cd Merge: dd198ce 1bd5d6d Author: Linus Torvalds Date: Mon Sep 11 22:01:44 2017 -0700 Merge tag 'nfs-for-4.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Hightlights include: Stable bugfixes: - Fix mirror allocation in the writeback code to avoid a use after free - Fix the O_DSYNC writes to use the correct byte range - Fix 2 use after free issues in the I/O code Features: - Writeback fixes to split up the inode->i_lock in order to reduce contention - RPC client receive fixes to reduce the amount of time the xprt->transport_lock is held when receiving data from a socket into am XDR buffer. - Ditto fixes to reduce contention between call side users of the rdma rb_lock, and its use in rpcrdma_reply_handler. - Re-arrange rdma stats to reduce false cacheline sharing. - Various rdma cleanups and optimisations. - Refactor the NFSv4.1 exchange id code and clean up the code. - Const-ify all instances of struct rpc_xprt_ops Bugfixes: - Fix the NFSv2 'sec=' mount option. - NFSv4.1: don't use machine credentials for CLOSE when using 'sec=sys' - Fix the NFSv3 GRANT callback when the port changes on the server. - Fix livelock issues with COMMIT - NFSv4: Use correct inode in _nfs4_opendata_to_nfs4_state() when doing and NFSv4.1 open by filehandle" * tag 'nfs-for-4.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (69 commits) NFS: Count the bytes of skipped subrequests in nfs_lock_and_join_requests() NFS: Don't hold the group lock when calling nfs_release_request() NFS: Remove pnfs_generic_transfer_commit_list() NFS: nfs_lock_and_join_requests and nfs_scan_commit_list can deadlock NFS: Fix 2 use after free issues in the I/O code NFS: Sync the correct byte range during synchronous writes lockd: Delete an error message for a failed memory allocation in reclaimer() NFS: remove jiffies field from access cache NFS: flush data when locking a file to ensure cache coherence for mmap. SUNRPC: remove some dead code. NFS: don't expect errors from mempool_alloc(). xprtrdma: Use xprt_pin_rqst in rpcrdma_reply_handler xprtrdma: Re-arrange struct rx_stats NFS: Fix NFSv2 security settings NFSv4.1: don't use machine credentials for CLOSE when using 'sec=sys' SUNRPC: ECONNREFUSED should cause a rebind. NFS: Remove unused parameter gfp_flags from nfs_pageio_init() NFSv4: Fix up mirror allocation SUNRPC: Add a separate spinlock to protect the RPC request receive list SUNRPC: Cleanup xs_tcp_read_common() ... commit 0abd8e70d24b665dd00972d4a259e05528cbf4c6 Author: Daeho Jeong Date: Mon Sep 11 16:30:28 2017 +0900 f2fs: clear radix tree dirty tag of pages whose dirty flag is cleared On a senario like writing out the first dirty page of the inode as the inline data, we only cleared dirty flags of the pages, but didn't clear the dirty tags of those pages in the radix tree. If we don't clear the dirty tags of the pages in the radix tree, the inodes which contain the pages will be marked with I_DIRTY_PAGES again and again, and writepages() for the inodes will be invoked in every writeback period. As a result, nothing will be done in every writepages() for the inodes and it will just consume CPU time meaninglessly. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 7 +++++++ fs/f2fs/inline.c | 7 +++++++ 2 files changed, 14 insertions(+) commit bf4b49059718b2217339eb15c60f8753d5b0da99 Author: NeilBrown Date: Mon Sep 11 13:15:50 2017 +1000 NFS: various changes relating to reporting IO errors. 1/ remove 'start' and 'end' args from nfs_file_fsync_commit(). They aren't used. 2/ Make nfs_context_set_write_error() a "static inline" in internal.h so we can... 3/ Use nfs_context_set_write_error() instead of mapping_set_error() if nfs_pageio_add_request() fails before sending any request. NFS generally keeps errors in the open_context, not the mapping, so this is more consistent. 4/ If filemap_write_and_write_range() reports any error, still check ctx->error. The value in ctx->error is likely to be more useful. As part of this, NFS_CONTEXT_ERROR_WRITE is cleared slightly earlier, before nfs_file_fsync_commit() is called, rather than at the start of that function. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/file.c | 16 ++++++++++------ fs/nfs/internal.h | 7 +++++++ fs/nfs/pagelist.c | 4 ++-- fs/nfs/write.c | 7 ------- 4 files changed, 19 insertions(+), 15 deletions(-) commit 8224b2734ab1da4996b851e1e5d3047e7a0df499 Author: Chuck Lever Date: Mon Aug 21 15:00:49 2017 -0400 NFS: Add static NFS I/O tracepoints Tools like tcpdump and rpcdebug can be very useful. But there are plenty of environments where they are difficult or impossible to use. For example, we've had customers report I/O failures during workloads so heavy that collecting network traffic or enabling RPC debugging are themselves onerous. The kernel's static tracepoints are lightweight (less likely to introduce timing changes) and efficient (the trace data is compact). They also work in scenarios where capturing network traffic is not possible due to lack of hardware support (some InfiniBand HCAs) or where data or network privacy is a concern. Introduce tracepoints that show when an NFS READ, WRITE, or COMMIT is initiated, and when it completes. Record the arguments and results of each operation, which are not shown by existing sunrpc module's tracepoints. For instance, the recorded offset and count can be used to match an "initiate" event to a "done" event. If an NFS READ result returns fewer bytes than requested or zero, seeing the EOF flag can be probative. Seeing an NFS4ERR_BAD_STATEID result is also indication of a particular class of problems. The timing information attached to each event record can often be useful as well. Usage example: [root@manet tmp]# trace-cmd record -e nfs:*initiate* -e nfs:*done /sys/kernel/debug/tracing/events/nfs/*initiate*/filter /sys/kernel/debug/tracing/events/nfs/*done/filter Hit Ctrl^C to stop recording ^CKernel buffer statistics: Note: "entries" are the entries left in the kernel ring buffer and are not recorded in the trace data. They should all be zero. CPU: 0 entries: 0 overrun: 0 commit overrun: 0 bytes: 3680 oldest event ts: 78.367422 now ts: 100.124419 dropped events: 0 read events: 74 ... and so on. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust fs/nfs/nfstrace.h | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/read.c | 4 + fs/nfs/write.c | 7 ++ 3 files changed, 259 insertions(+) commit 70d2f7b1ea19b7e43e36ccc63496f45f9908134d Author: Trond Myklebust Date: Mon Sep 11 13:09:37 2017 -0400 pNFS: Use the standard I/O stateid when calling LAYOUTGET Instead of having a private method for copying the open/delegation stateid, use the same call that is used for standard I/O through the MDS. Note that this means we transmit the stateid with a zero seqid, avoiding issues with NFS4ERR_OLD_STATEID. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit dd198ce7141aa8dd9ffcc9549de422fb055508de Merge: 89fd915 076a9bc Author: Linus Torvalds Date: Mon Sep 11 18:34:47 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace updates from Eric Biederman: "Life has been busy and I have not gotten half as much done this round as I would have liked. I delayed it so that a minor conflict resolution with the mips tree could spend a little time in linux-next before I sent this pull request. This includes two long delayed user namespace changes from Kirill Tkhai. It also includes a very useful change from Serge Hallyn that allows the security capability attribute to be used inside of user namespaces. The practical effect of this is people can now untar tarballs and install rpms in user namespaces. It had been suggested to generalize this and encode some of the namespace information information in the xattr name. Upon close inspection that makes the things that should be hard easy and the things that should be easy more expensive. Then there is my bugfix/cleanup for signal injection that removes the magic encoding of the siginfo union member from the kernel internal si_code. The mips folks reported the case where I had used FPE_FIXME me is impossible so I have remove FPE_FIXME from mips, while at the same time including a return statement in that case to keep gcc from complaining about unitialized variables. I almost finished the work to get make copy_siginfo_to_user a trivial copy to user. The code is available at: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git neuter-copy_siginfo_to_user-v3 But I did not have time/energy to get the code posted and reviewed before the merge window opened. I was able to see that the security excuse for just copying fields that we know are initialized doesn't work in practice there are buggy initializations that don't initialize the proper fields in siginfo. So we still sometimes copy unitialized data to userspace" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: Introduce v3 namespaced file capabilities mips/signal: In force_fcr31_sig return in the impossible case signal: Remove kernel interal si_code magic fcntl: Don't use ambiguous SIG_POLL si_codes prctl: Allow local CAP_SYS_ADMIN changing exe_file security: Use user_namespace::level to avoid redundant iterations in cap_capable() userns,pidns: Verify the userns for new pid namespaces signal/testing: Don't look for __SI_FAULT in userspace signal/mips: Document a conflict with SI_USER with SIGFPE signal/sparc: Document a conflict with SI_USER with SIGFPE signal/ia64: Document a conflict with SI_USER with SIGFPE signal/alpha: Document a conflict with SI_USER for SIGTRAP commit b3a97a2a9a7b2d50bcf13d32857cd6f5695c6b65 Author: Jaegeuk Kim Date: Sat Sep 9 11:11:04 2017 -0700 f2fs: speed up gc_urgent mode with SSR This patch activates SSR in gc_urgent mode. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 15 +++++++++++++++ fs/f2fs/segment.h | 13 ------------- 3 files changed, 16 insertions(+), 13 deletions(-) commit 1eb1ef4a8e9f6a4d9c2c7a645aba21d2f8719728 Author: Jaegeuk Kim Date: Sat Sep 9 12:03:23 2017 -0700 f2fs: better to wait for fstrim completion In android, we'd better wait for fstrim completion instead of issuing the discard commands asynchronous. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 157f377beb710e84bd8bc7a3c4475c0674ebebd7 Author: Jens Axboe Date: Mon Sep 11 16:43:57 2017 -0600 block: directly insert blk-mq request from blk_insert_cloned_request() A NULL pointer crash was reported for the case of having the BFQ IO scheduler attached to the underlying blk-mq paths of a DM multipath device. The crash occured in blk_mq_sched_insert_request()'s call to e->type->ops.mq.insert_requests(). Paolo Valente correctly summarized why the crash occured with: "the call chain (dm_mq_queue_rq -> map_request -> setup_clone -> blk_rq_prep_clone) creates a cloned request without invoking e->type->ops.mq.prepare_request for the target elevator e. The cloned request is therefore not initialized for the scheduler, but it is however inserted into the scheduler by blk_mq_sched_insert_request." All said, a request-based DM multipath device's IO scheduler should be the only one used -- when the original requests are issued to the underlying paths as cloned requests they are inserted directly in the underlying dispatch queue(s) rather than through an additional elevator. But commit bd166ef18 ("blk-mq-sched: add framework for MQ capable IO schedulers") switched blk_insert_cloned_request() from using blk_mq_insert_request() to blk_mq_sched_insert_request(). Which incorrectly added elevator machinery into a call chain that isn't supposed to have any. To fix this introduce a blk-mq private blk_mq_request_bypass_insert() that blk_insert_cloned_request() calls to insert the request without involving any elevator that may be attached to the cloned request's request_queue. Fixes: bd166ef183c2 ("blk-mq-sched: add framework for MQ capable IO schedulers") Cc: stable@vger.kernel.org Reported-by: Bart Van Assche Tested-by: Mike Snitzer Signed-off-by: Jens Axboe block/blk-core.c | 7 ++++++- block/blk-mq.c | 16 ++++++++++++++++ block/blk-mq.h | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) commit be1c704329a51cbcf019f971c5d2023c0226d9cd Merge: 0b045bd 1359798 Author: Jens Axboe Date: Mon Sep 11 15:56:49 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Below are a few small fixes for the current merge window: - fix string.h compilation failures with the new memcpy_and_pad helper (Martin Wilck) - fix incorrect dereference of a PCI data structure in the lightnvm support code (me) - HMB fixes (Akinobu Mita and me)" commit 230cfd2dbc228a6992287d31c5d93bc6c2552024 Author: Josh Hunt Date: Sun Sep 10 15:48:50 2017 -0400 net/sched: fix pointer check in gen_handle Fixes sparse warning about pointer in gen_handle: net/sched/cls_rsvp.h:392:40: warning: Using plain integer as NULL pointer Fixes: 8113c095672f6 ("net_sched: use void pointer for filter handle") Signed-off-by: Josh Hunt Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_rsvp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33e34e735fd4227b49735f1fc059dc9646abd1c6 Author: David Lebrun Date: Sun Sep 10 14:22:01 2017 +0100 ipv6: sr: remove duplicate routing header type check As seg6_validate_srh() already checks that the Routing Header type is correct, it is not necessary to do it again in get_srh(). Fixes: 5829d70b ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200") Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_local.c | 4 ---- 1 file changed, 4 deletions(-) commit 96c5508e3012ed0984ab93821d64ac1ff3279c09 Author: Jesper Dangaard Brouer Date: Sun Sep 10 09:47:02 2017 +0200 xdp: implement xdp_redirect_map for generic XDP Using bpf_redirect_map is allowed for generic XDP programs, but the appropriate map lookup was never performed in xdp_do_generic_redirect(). Instead the map-index is directly used as the ifindex. For the xdp_redirect_map sample in SKB-mode '-S', this resulted in trying sending on ifindex 0 which isn't valid, resulting in getting SKB packets dropped. Thus, the reported performance numbers are wrong in commit 24251c264798 ("samples/bpf: add option for native and skb mode for redirect apps") for the 'xdp_redirect_map -S' case. Before commit 109980b894e9 ("bpf: don't select potentially stale ri->map from buggy xdp progs") it could crash the kernel. Like this commit also check that the map_owner owner is correct before dereferencing the map pointer. But make sure that this API misusage can be caught by a tracepoint. Thus, allowing userspace via tracepoints to detect misbehaving bpf_progs. Fixes: 6103aa96ec07 ("net: implement XDP_REDIRECT for xdp generic") Fixes: 24251c264798 ("samples/bpf: add option for native and skb mode for redirect apps") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 4 ++-- net/core/filter.c | 38 ++++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) commit 609320c8a22715b74b39796930c3542719f8ab62 Author: Yonghong Song Date: Thu Sep 7 18:36:15 2017 -0700 perf/bpf: fix a clang compilation issue clang does not support variable length array for structure member. It has the following error during compilation: kernel/trace/trace_syscalls.c:568:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported unsigned long args[sys_data->nb_args]; ^ The fix is to use a fixed array length instead. Reported-by: Nick Desaulniers Signed-off-by: Yonghong Song Signed-off-by: David S. Miller include/linux/syscalls.h | 2 ++ kernel/trace/trace_syscalls.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit c6644d07eff6588b2dedf881279fb0d1c7783970 Author: Kosuke Tatsukawa Date: Wed Sep 6 22:47:59 2017 +0000 net: bonding: Fix transmit load balancing in balance-alb mode if specified by sysfs Commit cbf5ecb30560 ("net: bonding: Fix transmit load balancing in balance-alb mode") tried to fix transmit dynamic load balancing in balance-alb mode, which wasn't working after commit 8b426dc54cf4 ("bonding: remove hardcoded value"). It turned out that my previous patch only fixed the case when balance-alb was specified as bonding module parameter, and not when balance-alb mode was set using /sys/class/net/*/bonding/mode (the most common usage). In the latter case, tlb_dynamic_lb was set up according to the default mode of the bonding interface, which happens to be balance-rr. This additional patch addresses this issue by setting up tlb_dynamic_lb to 1 if "mode" is set to balance-alb through the sysfs interface. I didn't add code to change tlb_balance_lb back to the default value for other modes, because "mode" is usually set up only once during initialization, and it's not worthwhile to change the static variable bonding_defaults in bond_main.c to a global variable just for this purpose. Commit 8b426dc54cf4 also changes the value of tlb_dynamic_lb for balance-tlb mode if it is set up using the sysfs interface. I didn't change that behavior, because the value of tlb_balance_lb can be changed using the sysfs interface for balance-tlb, and I didn't like changing the default value back and forth for balance-tlb. As for balance-alb, /sys/class/net/*/bonding/tlb_balance_lb cannot be written to. However, I think balance-alb with tlb_dynamic_lb set to 0 is not an intended usage, so there is little use making it writable at this moment. Fixes: 8b426dc54cf4 ("bonding: remove hardcoded value") Reported-by: Reinis Rozitis Signed-off-by: Kosuke Tatsukawa Cc: stable@vger.kernel.org # v4.12+ Acked-by: Nikolay Aleksandrov Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_options.c | 3 +++ 1 file changed, 3 insertions(+) commit 39467fc1054a91efa697162a94e5b0e1a4b7b580 Author: Dmitry Torokhov Date: Thu Aug 31 18:23:11 2017 -0700 Input: ucb1400_ts - fix suspend and resume handling Instead of stopping the touchscreen we were starting it in suspend, and disabling it in resume. Fixes: c899afedf168 ("Input: ucb1400_ts - convert to threaded IRQ") Reported-by: Anton Volkov Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ucb1400_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47014752829ed1b52fa6f876b381774ae530503c Author: Luca Ceresoli Date: Thu Sep 7 14:28:28 2017 -0700 Input: edt-ft5x06 - fix access to non-existing register reg_addr->reg_report_rate is supposed to exist in M06, not M09. The driver is written to skip avoids access to non-existing registers when the register address is NO_REGISTER (0xff). But reg_addr->reg_report_rate is initialized to 0x00 by devm_kzalloc() (in edt_ft5x06_ts_probe()) and not changed thereafter. So the checks do not work and an access to register 0x00 is done. Fix by setting reg_addr->reg_report_rate to NO_REGISTER. Also fix the only place where reg_report_rate is checked against zero instead of NO_REGISTER. Signed-off-by: Luca Ceresoli Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4f1b461dd1dcb8f9333855cf7fa882fb9f068b16 Author: Colin Ian King Date: Thu Sep 7 14:27:26 2017 -0700 Input: elantech - make arrays debounce_packet static, reduces object code size Don't populate the arrays debounce_packet on the stack, instead make them static. Makes the object code smaller by over 870 bytes: Before: text data bss dec hex filename 30553 9152 0 39705 9b19 drivers/input/mouse/elantech.o After: text data bss dec hex filename 29521 9312 0 38833 97b1 drivers/input/mouse/elantech.o Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 023c437a7a032320cd881b6d1c477a56d95582fe Author: Colin Ian King Date: Thu Sep 7 14:27:12 2017 -0700 Input: surface3_spi - make const array header static, reduces object code size Don't populate the const array header on the stack, instead make it static. Makes the object code smaller by over 180 bytes: Before: text data bss dec hex filename 6003 1536 0 7539 1d73 surface3_spi.o After: text data bss dec hex filename 5726 1632 0 7358 1cbe surface3_spi.o Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/surface3_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a54feea1765a79ac8446bd6f5ce163fc94a8a95 Author: Sergei A. Trusov Date: Wed Sep 6 17:29:24 2017 -0700 Input: goodix - add support for capacitive home button On some x86 tablets with a Goodix touchscreen, the Windows logo on the front is a capacitive home button. Touching this button results in a touch with bit 4 of the first byte set, while only the lower 4 bits (0-3) are used to indicate the number of touches. Report a KEY_LEFTMETA press when this happens. Note that the hardware might support more than one button, in which case the "id" byte of coor_data would identify the button in question. This is not implemented as we don't have access to hardware with multiple buttons. Signed-off-by: Sergei A. Trusov Acked-by: Bastien Nocera Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8f2bb1de73344dbedd4195016b782bee7bf3598f Author: Stephen Hemminger Date: Wed Sep 6 13:53:06 2017 -0700 hv_netvsc: avoid unnecessary wakeups on subchannel creation Only need to wakeup the initiator after all sub-channels are opened. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8195b1396ec86dddbba443c74b2188b423556c74 Author: Stephen Hemminger Date: Wed Sep 6 13:53:05 2017 -0700 hv_netvsc: fix deadlock on hotplug When a virtual device is added dynamically (via host console), then the vmbus sends an offer message for the primary channel. The processing of this message for networking causes the network device to then initialize the sub channels. The problem is that setting up the sub channels needs to wait until the subsequent subchannel offers have been processed. These offers come in on the same ring buffer and work queue as where the primary offer is being processed; leading to a deadlock. This did not happen in older kernels, because the sub channel waiting logic was broken (it wasn't really waiting). The solution is to do the sub channel setup in its own work queue context that is scheduled by the primary channel setup; and then happens later. Fixes: 732e49850c5e ("netvsc: fix race on sub channel creation") Reported-by: Dexuan Cui Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 + drivers/net/hyperv/netvsc.c | 3 + drivers/net/hyperv/netvsc_drv.c | 11 +--- drivers/net/hyperv/rndis_filter.c | 122 ++++++++++++++++++++++++++------------ 4 files changed, 94 insertions(+), 45 deletions(-) commit 0b045bd1c1c2819b33f4522e3efa4666d1ecf1a4 Author: Christophe JAILLET Date: Mon Sep 11 21:43:23 2017 +0200 mm/backing-dev.c: fix an error handling path in 'cgwb_create()' If the 'kmalloc' fails, we must go through the existing error handling path. Signed-off-by: Christophe JAILLET Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks") Reviewed-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 89fd915c402113528750353ad6de9ea68a787e5c Merge: 66c9457 04c3c98 Author: Linus Torvalds Date: Mon Sep 11 13:10:57 2017 -0700 Merge tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm from Dan Williams: "A rework of media error handling in the BTT driver and other updates. It has appeared in a few -next releases and collected some late- breaking build-error and warning fixups as a result. Summary: - Media error handling support in the Block Translation Table (BTT) driver is reworked to address sleeping-while-atomic locking and memory-allocation-context conflicts. - The dax_device lookup overhead for xfs and ext4 is moved out of the iomap hot-path to a mount-time lookup. - A new 'ecc_unit_size' sysfs attribute is added to advertise the read-modify-write boundary property of a persistent memory range. - Preparatory fix-ups for arm and powerpc pmem support are included along with other miscellaneous fixes" * tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (26 commits) libnvdimm, btt: fix format string warnings libnvdimm, btt: clean up warning and error messages ext4: fix null pointer dereference on sbi libnvdimm, nfit: move the check on nd_reserved2 to the endpoint dax: fix FS_DAX=n BLOCK=y compilation libnvdimm: fix integer overflow static analysis warning libnvdimm, nd_blk: remove mmio_flush_range() libnvdimm, btt: rework error clearing libnvdimm: fix potential deadlock while clearing errors libnvdimm, btt: cache sector_size in arena_info libnvdimm, btt: ensure that flags were also unchanged during a map_read libnvdimm, btt: refactor map entry operations with macros libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path libnvdimm, nfit: export an 'ecc_unit_size' sysfs attribute ext4: perform dax_device lookup at mount ext2: perform dax_device lookup at mount xfs: perform dax_device lookup at mount dax: introduce a fs_dax_get_by_bdev() helper libnvdimm, btt: check memory allocation failure libnvdimm, label: fix index block size calculation ... commit 66c9457df3926efff65529dab1a8c742df756790 Merge: 669bf77 7755daf Author: Linus Torvalds Date: Mon Sep 11 13:04:32 2017 -0700 Merge tag 'pwm/for-4.14-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 a new driver for the PWM controller found on SoCs of the ZTX ZX family. Support for an old SH-Mobile SoC has been dropped and the Rockchip and MediaTek drivers gain support for more generations. Other than that there are a bunch of coding style fixes, minor bug fixes and cleanup as well as documentation patches" * tag 'pwm/for-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (32 commits) pwm: pwm-samsung: fix suspend/resume support pwm: samsung: Remove redundant checks from pwm_samsung_config() pwm: mediatek: Disable clock on PWM configuration failure dt-bindings: pwm: Add MT2712/MT7622 information pwm: mediatek: Fix clock control issue pwm: mediatek: Fix PWM source clock selection pwm: mediatek: Fix Kconfig description pwm: tegra: Explicitly request exclusive reset control pwm: hibvt: Explicitly request exclusive reset control pwm: tiehrpwm: Set driver data before runtime PM enable pwm: tiehrpwm: Miscellaneous coding style fixups pwm: tiecap: Set driver data before runtime PM enable pwm: tiecap: Miscellaneous coding style fixups dt-bindings: pwm: tiecap: Add TI 66AK2G SoC specific compatible pwm: tiehrpwm: fix clock imbalance in probe error path pwm: tiehrpwm: Fix runtime PM imbalance at unbind pwm: Kconfig: Enable pwm-tiecap to be built for Keystone pwm: Add ZTE ZX PWM device driver dt-bindings: pwm: Add bindings doc for ZTE ZX PWM controller pwm: bcm2835: Support for polarity setting via DT ... commit 669bf77a543b4a30d82a376bb9fc0c02da513303 Merge: f007cad e860d2c Author: Linus Torvalds Date: Mon Sep 11 12:45:47 2017 -0700 Merge branch 'bt-fix' (bluetooth fixes from Marcel) Pull bluetooth fix from Marcel Holtmann: "All of our mgmt-tester, l2cap-test and rfcomm-tester unit tests are passing with this patch" * emailed patch from Marcel Holtmann : Bluetooth: Properly check L2CAP config option output buffer length commit 4400081b631af69abc63cea3352680e3d85e0c39 Author: Arkadi Sharshevsky Date: Mon Sep 11 09:42:26 2017 +0200 mlxsw: spectrum: Fix EEPROM access in case of SFP/SFP+ The current code does not handle correctly the access to the upper page in case of SFP/SFP+ EEPROM. In that case the offset should be local and the I2C address should be changed. Fixes: 2ea109039cd3 ("mlxsw: spectrum: Add support for access cable info via ethtool") Reported-by: Florian Klink Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 1359798f9d4082eb04575efdd19512fbd9c28464 Author: Martin Wilck Date: Wed Sep 6 14:36:57 2017 +0200 string.h: un-fortify memcpy_and_pad The way I'd implemented the new helper memcpy_and_pad with __FORTIFY_INLINE caused compiler warnings for certain kernel configurations. This helper is only used in a single place at this time, and thus doesn't benefit much from fortification. So simplify the code by dropping fortification support for now. Fixes: 01f33c336e2d "string.h: add memcpy_and_pad()" Signed-off-by: Martin Wilck Acked-by: Arnd Bergmann Signed-off-by: Christoph Hellwig include/linux/string.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 044a9df1a7cbb89f48fcc0e9e39997989342966b Author: Christoph Hellwig Date: Mon Sep 11 12:09:28 2017 -0400 nvme-pci: implement the HMB entry number and size limitations Adds support for the new Host Memory Buffer Minimum Descriptor Entry Size and Host Memory Maximum Descriptors Entries field that were added in TP 4002 HMB Enhancements. These allow the controller to advertise limits for the usual number of segments in the host memory buffer, as well as a minimum usable per-segment size. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/nvme.h | 3 +++ drivers/nvme/host/pci.c | 6 +++++- include/linux/nvme.h | 4 +++- 4 files changed, 13 insertions(+), 2 deletions(-) commit 9620cfba97a8b88ae91f0e275e8ff110b578bb6e Author: Christoph Hellwig Date: Wed Sep 6 12:19:57 2017 +0200 nvme-pci: propagate (some) errors from host memory buffer setup We want to catch command execution errors when resetting the device, so propagate errors from the Set Features when setting up the host memory buffer. We keep ignoring memory allocation failures, as the spec clearly says that the controller must work without a host memory buffer. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Cc: stable@vger.kernel.org drivers/nvme/host/pci.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 30f92d62e5b41a94de2d0bbd677a6ea2fcfed74f Author: Akinobu Mita Date: Wed Sep 6 12:15:31 2017 +0200 nvme-pci: use appropriate initial chunk size for HMB allocation The initial chunk size for host memory buffer allocation is currently PAGE_SIZE << MAX_ORDER. MAX_ORDER order allocation is usually failed without CONFIG_DMA_CMA. So the HMB allocation is retried with chunk size PAGE_SIZE << (MAX_ORDER - 1) in general, but there is no problem if the retry allocation works correctly. Signed-off-by: Akinobu Mita [hch: rebased] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Cc: stable@vger.kernel.org drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92dc689563170b90ba844b8a2eb95e8a5eda2e83 Author: Christoph Hellwig Date: Mon Sep 11 12:08:43 2017 -0400 nvme-pci: fix host memory buffer allocation fallback nvme_alloc_host_mem currently contains two loops that are interwinded, and the outer retry loop turns out to be broken. Fix this by untangling the two. Based on a report an initial patch from Akinobu Mita. Signed-off-by: Christoph Hellwig Reported-by: Akinobu Mita Tested-by: Akinobu Mita Reviewed-by: Keith Busch Cc: stable@vger.kernel.org drivers/nvme/host/pci.c | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) commit 608cc4b14aeadcf3e4dc325fc211b7052e74b50c Author: Christoph Hellwig Date: Wed Sep 6 11:45:24 2017 +0200 nvme: fix lightnvm check nvme_nvm_ns_supported assumes every device is a pci_dev, which leads to reading an incorrect field, or possible even a dereference of unallocated memory for fabrics controllers. Fix this by introducing a quirk for lighnvm capable devices instead. Signed-off-by: Christoph Hellwig Reviewed-by: Matias Bjørling Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 9 +++++---- drivers/nvme/host/lightnvm.c | 26 -------------------------- drivers/nvme/host/nvme.h | 10 +++++----- drivers/nvme/host/pci.c | 4 ++++ 4 files changed, 14 insertions(+), 35 deletions(-) commit 09c2c359be546df45be0b158ea1d3cc8ea83c876 Author: Mikulas Patocka Date: Mon Sep 11 09:46:49 2017 -0600 block: fix integer overflow in __blkdev_sectors_to_bio_pages() Fix possible integer overflow in __blkdev_sectors_to_bio_pages if sector_t is 32-bit. Signed-off-by: Mikulas Patocka Fixes: 615d22a51c04 ("block: Fix __blkdev_issue_zeroout loop") Reviewed-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbec491b12b52888d120e5be8f15886b3216eb19 Author: Scott Bauer Date: Fri Sep 1 08:53:35 2017 -0600 block: sed-opal: Set MBRDone on S3 resume path if TPER is MBREnabled Users who are booting off their Opal enabled drives are having issues when they have a shadow MBR set up after s3/resume cycle. When the Drive has a shadow MBR setup the MBRDone flag is set to false upon power loss (S3/S4/S5). When the MBRDone flag is false I/O to LBA 0 -> LBA_END_MBR are remapped to the shadow mbr of the drive. If the drive contains useful data in the 0 -> end_mbr range upon s3 resume the user can never get to that data as the drive will keep remapping it to the MBR. To fix this when we unlock on S3 resume, we need to tell the drive that we're done with the shadow mbr (even though we didnt use it) by setting true to MBRDone. This way the drive will stop the remapping and the user can access their data. Acked-by Jon Derrick: Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe block/opal_proto.h | 1 + block/sed-opal.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit f8e9ec16611baa8db77a7d46facd2ba7aa525955 Author: Greg Thelen Date: Thu Sep 7 17:36:36 2017 -0700 block: tolerate tracing of NULL bio __get_request() can call trace_block_getrq() with bio=NULL which causes block_get_rq::TP_fast_assign() to deref a NULL pointer and panic. Syzkaller fuzzer panics with linux-next (1d53d908b79d7870d89063062584eead4cf83448): kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 2983 Comm: syzkaller401111 Not tainted 4.13.0-rc7-next-20170901+ #13 task: ffff8801cf1da000 task.stack: ffff8801ce440000 RIP: 0010:perf_trace_block_get_rq+0x697/0x970 include/trace/events/block.h:384 RSP: 0018:ffff8801ce4473f0 EFLAGS: 00010246 RAX: ffff8801cf1da000 RBX: 1ffff10039c88e84 RCX: 1ffffd1ffff84d27 RDX: dffffc0000000001 RSI: 1ffff1003b643e7a RDI: ffffe8ffffc26938 RBP: ffff8801ce447530 R08: 1ffff1003b643e6c R09: ffffe8ffffc26964 R10: 0000000000000002 R11: fffff91ffff84d2d R12: ffffe8ffffc1f890 R13: ffffe8ffffc26930 R14: ffffffff85cad9e0 R15: 0000000000000000 FS: 0000000002641880(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000043e670 CR3: 00000001d1d7a000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: trace_block_getrq include/trace/events/block.h:423 [inline] __get_request block/blk-core.c:1283 [inline] get_request+0x1518/0x23b0 block/blk-core.c:1355 blk_old_get_request block/blk-core.c:1402 [inline] blk_get_request+0x1d8/0x3c0 block/blk-core.c:1427 sg_scsi_ioctl+0x117/0x750 block/scsi_ioctl.c:451 sg_ioctl+0x192d/0x2ed0 drivers/scsi/sg.c:1070 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 block_get_rq::TP_fast_assign() has multiple redundant ->dev assignments. Only one of them is NULL tolerant. Favor the NULL tolerant one. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Greg Thelen Signed-off-by: Jens Axboe include/trace/events/block.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c3ca015fab6df124c933b91902f3f2a3473f9da5 Author: Mikulas Patocka Date: Thu Aug 31 21:47:43 2017 -0400 dax: remove the pmem_dax_ops->flush abstraction Commit abebfbe2f731 ("dm: add ->flush() dax operation support") is buggy. A DM device may be composed of multiple underlying devices and all of them need to be flushed. That commit just routes the flush request to the first device and ignores the other devices. It could be fixed by adding more complex logic to the device mapper. But there is only one implementation of the method pmem_dax_ops->flush - that is pmem_dax_flush() - and it calls arch_wb_cache_pmem(). Consequently, we don't need the pmem_dax_ops->flush abstraction at all, we can call arch_wb_cache_pmem() directly from dax_flush() because dax_dev->ops->flush can't ever reach anything different from arch_wb_cache_pmem(). It should be also pointed out that for some uses of persistent memory it is needed to flush only a very small amount of data (such as 1 cacheline), and it would be overkill if we go through that device mapper machinery for a single flushed cache line. Fix this by removing the pmem_dax_ops->flush abstraction and call arch_wb_cache_pmem() directly from dax_flush(). Also, remove the device mapper code that forwards the flushes. Fixes: abebfbe2f731 ("dm: add ->flush() dax operation support") Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Reviewed-by: Dan Williams Signed-off-by: Mike Snitzer drivers/dax/super.c | 21 ++++++++++++++------- drivers/md/dm-linear.c | 15 --------------- drivers/md/dm-stripe.c | 20 -------------------- drivers/md/dm.c | 19 ------------------- drivers/nvdimm/pmem.c | 7 ------- fs/dax.c | 4 ++-- include/linux/dax.h | 5 +---- include/linux/device-mapper.h | 3 --- 8 files changed, 17 insertions(+), 77 deletions(-) commit b5e8ad92c3ac0b073bbf08ffd1a6a31d3449caae Author: Arnd Bergmann Date: Tue Aug 15 17:11:59 2017 +0200 dm integrity: use init_completion instead of COMPLETION_INITIALIZER_ONSTACK The new lockdep support for completions causeed the stack usage in dm-integrity to explode, in case of write_journal from 504 bytes to 1120 (using arm gcc-7.1.1): drivers/md/dm-integrity.c: In function 'write_journal': drivers/md/dm-integrity.c:827:1: error: the frame size of 1120 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The problem is that not only the size of 'struct completion' grows significantly, but we end up having multiple copies of it on the stack when we assign it from a local variable after the initial declaration. COMPLETION_INITIALIZER_ONSTACK() is the right thing to use when we want to declare and initialize a completion on the stack. However, this driver doesn't do that and instead initializes the completion just before it is used. In this case, init_completion() does the same thing more efficiently, and drops the stack usage for the function above down to 496 bytes. While the other functions in this file are not bad enough to cause a warning, they benefit equally from the change, so I do the change across the entire file. In the one place where we reuse a completion, I picked the cheaper reinit_completion() over init_completion(). Fixes: cd8084f91c02 ("locking/lockdep: Apply crossrelease to completions") Signed-off-by: Arnd Bergmann Acked-by: Mikulas Patocka Acked-by: Mike Snitzer Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7c373d660420f74c3e16d148629b810f3a36ac9e Author: Bhumika Goyal Date: Sun Aug 6 22:54:00 2017 +0530 dm integrity: make blk_integrity_profile structure const Make this structure const as it is only stored in the profile field of a blk_integrity structure. This field is of type const, so make structure as const. Signed-off-by: Bhumika Goyal Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e326f7b7375392d06f9cfbc27a7c63181f69d7 Author: Hyunchul Lee Date: Mon Jul 31 16:22:20 2017 +0900 dm integrity: do not check integrity for failed read operations Even though read operations fail, dm_integrity_map_continue() calls integrity_metadata() to check integrity. In this case, just complete these. This also makes it so read I/O errors do not generate integrity warnings in the kernel log. Cc: stable@vger.kernel.org Signed-off-by: Hyunchul Lee Acked-by: Milan Broz Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 228bb5b26038a7d58b7c11af1297f34b534b59cd Author: Josef Bacik Date: Fri Jul 28 10:42:25 2017 -0400 dm log writes: fix >512b sectorsize support 512b sectors vs device's physical sectorsize was not maintained consistently and as such the support for >512b sector devices has bugs. The log metadata expects native sectorsize but 512b sectors were being stored. Also, device's sectorsize was assumed when assigning the bi_sector for blocks that were being logged. Fix this up by adding two helpers to convert between bio and dev sectors, and use these in the appropriate places to fix the problem and make it clear which units go where. Doing so allows dm-log-writes use with 4k devices. Signed-off-by: Josef Bacik Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit 0c79c62021d23f0b5c942cf59d43a7ce6c24cd1b Author: Josef Bacik Date: Fri Jul 28 10:42:24 2017 -0400 dm log writes: don't use all the cpu while waiting to log blocks The check to see if the logging kthread needs to go to sleep is wrong, it checks lc->pending_blocks, which will be non-0 if there are any blocks that are pending, whether they are ready to be logged or not. What we really want is to go to sleep until it's time to log blocks, so change this check so we do actually go to sleep in between flushes. Signed-off-by: Josef Bacik Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67a63387b1417b5954eedb15f638f1f0bee3da49 Author: Steffen Klassert Date: Mon Sep 4 10:59:55 2017 +0200 xfrm: Fix negative device refcount on offload failure. Reset the offload device at the xfrm_state if the device was not able to offload the state. Otherwise we drop the device refcount twice. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Reported-by: Shannon Nelson Signed-off-by: Steffen Klassert net/xfrm/xfrm_device.c | 1 + 1 file changed, 1 insertion(+) commit c5d4d7d83165ae863954b113c7f403d8b58febed Author: Steffen Klassert Date: Mon Sep 4 10:28:02 2017 +0200 xfrm: Fix deletion of offloaded SAs on failure. When we off load a SA, it gets pushed to the NIC before we can add it. In case of a failure, we don't delete this SA from the NIC. Fix this by calling xfrm_dev_state_delete on failure. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Reported-by: Shannon Nelson Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+) commit e2329b4252f373c244e75928be38bf1dd45b35da Author: Dou Liyang Date: Mon Sep 11 11:43:23 2017 +0800 x86/cpu: Remove unused and undefined __generic_processor_info() declaration The following revert: 2b85b3d22920 ("x86/acpi: Restore the order of CPU IDs") ... got rid of __generic_processor_info(), but forgot to remove its declaration in mpspec.h. Remove the declaration and update the comments as well. Signed-off-by: Dou Liyang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1505101403-29100-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mpspec.h | 1 - arch/x86/kernel/apic/apic.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 46123355af729514e6fa8b8a9dd1e645e61a6466 Author: Randy Dunlap Date: Sun Sep 10 09:55:05 2017 -0700 sched/fair: Fix nuisance kernel-doc warning Work around kernel-doc warning ('*' in Sphinx doc means "emphasis"): ../kernel/sched/fair.c:7584: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Randy Dunlap Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f18b30f9-6251-6d86-9d44-16501e386891@infradead.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f007cad159e99fa2acd3b2e9364fbb32ad28b971 Author: Linus Torvalds Date: Sun Sep 10 21:19:06 2017 -0700 Revert "firmware: add sanity check on shutdown/suspend" This reverts commit 81f95076281fdd3bc382e004ba1bce8e82fccbce. It causes random failures of firmware loading at resume time (well, random for me, it seems to be more reliable for others) because the firmware disabling is not actually synchronous with any particular resume event, and at least the btusb driver that uses a workqueue to load the firmware at resume seems to occasionally hit the "firmware loading is disabled" logic because the firmware loader hasn't gotten the resume event yet. Some kind of sanity check for not trying to load firmware when it's not possible might be a good thing, but this commit was not it. Greg seems to have silently suffered the same issue, and pointed to the likely culprit, and Gabriel C verified the revert fixed it for him too. Reported-by: Linus Torvalds Pointed-at-by: Greg Kroah-Hartman Tested-by: Gabriel C Cc: Luis R. Rodriguez Signed-off-by: Linus Torvalds .../driver-api/firmware/request_firmware.rst | 11 --- drivers/base/firmware_class.c | 99 ---------------------- 2 files changed, 110 deletions(-) commit 64414e5f9896805c2e80583345e9b1745be73aa9 Merge: e90937e 8a19434 Author: Linus Torvalds Date: Sun Sep 10 21:07:39 2017 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "Only two changes. One removes unused code, the other makes local clock code arguments consistent with generic clock code" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: remove dead code m68k: allow NULL clock for clk_get_rate commit e90937e756938f03d37d4cae7c82316a3a425944 Merge: ae46654 b884026 Author: Linus Torvalds Date: Sun Sep 10 20:54:48 2017 -0700 Merge tag 'armsoc-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM/arm64 Devicetree updates from Olof Johansson: "As usual, device tree updates is the bulk of our material in this merge window. This time around, 559 patches affecting both 32- and 64-bit platforms. Changes are too many to list individually, but some of the larger ones: New platform/SoC support: - Automotive: + Renesas R-Car D3 (R8A77995) + TI DT76x + MediaTek mt2712e - Communication-oriented: + Qualcomm IPQ8074 + Broadcom Stingray + Marvell Armada 8080 - Set top box: + Uniphier PXs3 Besides some vendor reference boards for the SoC above, there are also several new boards/machines: - TI AM335x Moxa UC-8100-ME-T open platform - TI AM57xx Beaglebone X15 Rev C - Microchip/Atmel sama5d27 SoM1 EK - Broadcom Raspberry Pi Zero W - Gemini-based D-Link DIR-685 router - Freescale i.MX6: + Toradex Apalis module + Apalis and Ixora carrier boards + Engicam GEAM6UL Starter Kit - Freescale i.MX53-based Beckhoff CX9020 Embedded PC - Mediatek mt7623-based BananaPi R2 - Several Allwinner-based single-board computers: + Cubietruck plus + Bananapi M3, M2M and M64 + NanoPi A64 + A64-OLinuXino + Pine64 - Rockchip RK3328 Pine64/Rock64 board support - Rockchip RK3399 boards: + RK3399 Sapphire module on Excavator carrier (RK3399 reference design) + Theobroma Systems RK3399-Q7 SoM - ZTE ZX296718 PCBOX Board" * tag 'armsoc-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (559 commits) ARM: dts: at91: at91sam9g45: add AC97 arm64: dts: marvell: mcbin: enable more networking ports arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node arm64: dts: marvell: add TX interrupts for PPv2.2 arm64: dts: uniphier: add PXs3 SoC support ARM: dts: uniphier: add pinctrl groups of ethernet phy mode ARM: dts: uniphier: fix size of sdctrl nodes ARM: dts: uniphier: add AIDET nodes arm64: dts: uniphier: fix size of sdctrl node arm64: dts: uniphier: add AIDET nodes Revert "ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Beelink X2" arm64: dts: uniphier: add reset controller node of analog amplifier arm64: dts: marvell: add Device Tree files for Armada-8KP arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM dt-bindings: add rk3399-q7 SoM ARM: dts: rockchip: enable usb for rv1108-evb ARM: dts: rockchip: add usb nodes for rv1108 SoCs dt-bindings: update grf-binding for rv1108 SoCs ARM: dts: aspeed-g4: fix AHB window size of the SMC controllers ... commit ae46654bcff303b33facbbd04a3ad9c21d303f9b Merge: 7f1b9be a48a7b6 Author: Linus Torvalds Date: Sun Sep 10 20:40:00 2017 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "This branch contains platform-related driver updates for ARM and ARM64. Among them: - Reset driver updates: + New API for dealing with arrays of resets + Make unimplemented {de,}assert return success on shared resets + MSDKv1 driver + Removal of obsolete Gemini reset driver + Misc updates for sunxi and Uniphier - SoC drivers: + Platform SoC driver registration on Tegra + Shuffle of Qualcomm drivers into a submenu + Allwinner A64 support for SRAM + Renesas R-Car R3 support + Power domains for Rockchip RK3366 - Misc updates and smaller fixes for TEE and memory driver subsystems" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits) firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set soc/tegra: fuse: Add missing semi-colon soc/tegra: Restrict SoC device registration to Tegra drivers: soc: sunxi: add support for A64 and its SRAM C drivers: soc: sunxi: add support for remapping func value to reg value drivers: soc: sunxi: fix error processing on base address when claiming dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C bus: sunxi-rsb: Enable by default for ARM64 soc/tegra: Register SoC device firmware: tegra: set drvdata earlier memory: Convert to using %pOF instead of full_name soc: Convert to using %pOF instead of full_name bus: Convert to using %pOF instead of full_name firmware: Convert to using %pOF instead of full_name soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC soc: mediatek: add header files required for MT7622 SCPSYS dt-binding soc: mediatek: reduce code duplication of scpsys_probe across all SoCs dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC reset: uniphier: add analog amplifiers reset control reset: uniphier: add video input subsystem reset control ... commit 7f1b9be13a7dbe8e51ea541bbcd6c47adae39c71 Merge: d719518 e9e3969 Author: Linus Torvalds Date: Sun Sep 10 20:35:46 2017 -0700 Merge tag 'armsoc-platforms' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM/arm64 SoC platform updates from Olof Johansson: "This branch contains platform updates for 32- and 64-bit ARM, including defconfig updates to enable new options, drivers and platforms. There are also a few fixes and cleanups for some existing vendors. Some of the things worth highlighting here are: - Enabling new crypt drivers on arm64 defconfig - QCOM IPQ8074 clocks and pinctrl drivers on arm64 defconfig - Debug support enabled for Renesas r8a7743 - Various config updates for Renesas platforms (sound, USB, other drivers) - Platform support (including SMP) for TI dra762 - OMAP cleanups: Move to use generic 8250 debug_ll, removal of stale DMA code" * tag 'armsoc-platforms' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (109 commits) ARM: multi_v7_defconfig: make eSDHC driver built-in arm64: defconfig: enable rockchip graphics MAINTAINERS: Update Cavium ThunderX2 entry ARM: config: aspeed: Add I2C, VUART, LPC Snoop ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G ARM: s3c24xx: Fix NAND ECC mode for mini2440 board ARM: davinci_all_defconfig: enable tinydrm and ST7586 arm64: defconfig: Enable QCOM IPQ8074 clock and pinctrl ARM: defconfig: tegra: Enable ChipIdea UDC driver ARM: configs: Add Tegra I2S interfaces to multi_v7_defconfig ARM: tegra: Add Tegra I2S interfaces to defconfig ARM: tegra: Update default configuration for v4.13-rc1 MAINTAINERS: update ARM/ZTE entry soc: versatile: remove unnecessary static in realview_soc_probe() ARM: Convert to using %pOF instead of full_name ARM: hisi: Fix typo in comment ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL arm64: defconfig: add CONFIG_BRCMSTB_THERMAL arm64: defconfig: add recently added crypto drivers as modules arm64: defconfig: enable CONFIG_UNIPHIER_WATCHDOG ... commit 56ce2f25ab0d8830d914e626bc88e45b42e11661 Author: Tobias Klauser Date: Fri Sep 8 10:25:08 2017 +0200 openrisc: add forward declaration for struct vm_area_struct After removing linux/vmalloc.h from asm-generic/io.h, the following warning occurs on openrisc: In file included from arch/openrisc/include/asm/io.h:33:0, from include/linux/io.h:25, from drivers/tty/serial/earlycon.c:19: arch/openrisc/include/asm/pgtable.h:424:2: warning: 'struct vm_area_struct' declared inside parameter list unsigned long address, pte_t *pte) ^ arch/openrisc/include/asm/pgtable.h:424:2: warning: its scope is only this definition or declaration, which is probably not what you want Reported-by: kbuild test robot Cc: Arnd Bergmann Signed-off-by: Tobias Klauser Signed-off-by: Stafford Horne arch/openrisc/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) commit d719518d9ce9132bad8a06e8029aeead328f66a3 Merge: 4c2b5e0 b6fe108 Author: Linus Torvalds Date: Sun Sep 10 09:57:23 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next Pull sparc updates from David Miller: 1) Use register window state adjustment instructions when available, from Anthony Yznaga. 2) Add VCC console concentrator driver, from Jag Raman. 3) Add 16GB hugepage support, from Nitin Gupta. 4) Support cpu 'poke' hypercall, from Vijay Kumar. 5) Add M7/M8 optimized memcpy/memset/copy_{to,from}_user, from Babu Moger. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (33 commits) sparc64: Handle additional cases of no fault loads sparc64: speed up etrap/rtrap on NG2 and later processors sparc64: vcc: make ktermios const sparc: leon: grpci1: constify of_device_id sparc: leon: grpci2: constify of_device_id sparc64: vcc: Check for IS_ERR() instead of NULL sparc64: Cleanup hugepage table walk functions sparc64: Add 16GB hugepage support sparc64: Support huge PUD case in get_user_pages sparc64: vcc: Add install & cleanup TTY operations sparc64: vcc: Add break_ctl TTY operation sparc64: vcc: Add chars_in_buffer TTY operation sparc64: vcc: Add write & write_room TTY operations sparc64: vcc: Add hangup TTY operation sparc64: vcc: Add open & close TTY operations sparc64: vcc: Enable LDC event processing engine sparc64: vcc: Add RX & TX timer for delayed LDC operation sparc64: vcc: Create sysfs attribute group sparc64: vcc: Enable VCC port probe and removal sparc64: vcc: TTY driver initialization and cleanup ... commit 4c2b5e0fab602b468ce4d8c4d78c99f2caa79a3e Author: Geert Uytterhoeven Date: Sun Sep 10 15:20:03 2017 +0200 m68k: Add braces to __pmd(x) initializer to kill compiler warning With gcc 4.1.2: include/linux/swapops.h: In function ‘swp_entry_to_pmd’: include/linux/swapops.h:294: warning: missing braces around initializer include/linux/swapops.h:294: warning: (near initialization for ‘(anonymous).pmd’) Due to a GCC zero initializer bug (#53119), the standard "(pmd_t){ 0 }" initializer is not accepted by all GCC versions. In addition, on m68k pmd_t is an array instead of a single value, so we need "(pmd_t){ { 0 }, }" instead of "(pmd_t){ 0 }". Based on commit 9157259d16a8 ("mm: add pmd_t initializer __pmd() to work around a GCC bug.") for sparc32. Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds arch/m68k/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7898f79654698dcea5a0876785796de67d527ee7 Author: Andy Lutomirski Date: Sun Sep 10 08:52:58 2017 -0700 x86/mm/64: Fix an incorrect warning with CONFIG_DEBUG_VM=y, !PCID I've been staring at the word PCID too long. Fixes: f13c8e8c58ba ("x86/mm: Reinitialize TLB state on hotplug and resume") Reported-by: Dan Carpenter Signed-off-by: Andy Lutomirski Signed-off-by: Linus Torvalds arch/x86/mm/tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6fe1089667a7afcc2cf92cdaec590c7b8381715 Author: Rob Gardner Date: Fri Sep 8 16:34:21 2017 -0600 sparc64: Handle additional cases of no fault loads Load instructions using ASI_PNF or other no-fault ASIs should not cause a SIGSEGV or SIGBUS. A garden variety unmapped address follows the TSB miss path, and when no valid mapping is found in the process page tables, the miss handler checks to see if the access was via a no-fault ASI. It then fixes up the target register with a zero, and skips the no-fault load instruction. But different paths are taken for data access exceptions and alignment traps, and these do not respect the no-fault ASI. We add checks in these paths for the no-fault ASI, and fix up the target register and TPC just like in the TSB miss case. Signed-off-by: Rob Gardner Acked-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/kernel/traps_64.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit a7159a87a3836f61a97882e671d2d66bbb96c62e Author: Anthony Yznaga Date: Fri Aug 18 12:40:36 2017 -0700 sparc64: speed up etrap/rtrap on NG2 and later processors For many sun4v processor types, reading or writing a privileged register has a latency of 40 to 70 cycles. Use a combination of the low-latency allclean, otherw, normalw, and nop instructions in etrap and rtrap to replace 2 rdpr and 5 wrpr instructions and improve etrap/rtrap performance. allclean, otherw, and normalw are available on NG2 and later processors. The average ticks to execute the flush windows trap ("ta 0x3") with and without this patch on select platforms: CPU Not patched Patched % Latency Reduction NG2 1762 1558 -11.58 NG4 3619 3204 -11.47 M7 3015 2624 -12.97 SPARC64-X 829 770 -7.12 Signed-off-by: Anthony Yznaga Signed-off-by: David S. Miller arch/sparc/include/asm/trap_block.h | 2 ++ arch/sparc/kernel/etrap_64.S | 26 ++++++++++++++++++++++---- arch/sparc/kernel/rtrap_64.S | 13 +++++++++++-- arch/sparc/kernel/setup_64.c | 5 +++++ arch/sparc/kernel/vmlinux.lds.S | 5 +++++ 5 files changed, 45 insertions(+), 6 deletions(-) commit e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 Author: Ben Seri Date: Sat Sep 9 23:15:59 2017 +0200 Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri Signed-off-by: Marcel Holtmann Signed-off-by: Linus Torvalds net/bluetooth/l2cap_core.c | 80 +++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 37 deletions(-) commit 4dfc2788033d30dfccfd4268e06dd73ce2c654ed Merge: a59e57d 47b59d8 Author: Linus Torvalds Date: Sat Sep 9 15:03:24 2017 -0700 Merge tag 'iommu-updates-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: "Slightly more changes than usual this time: - KDump Kernel IOMMU take-over code for AMD IOMMU. The code now tries to preserve the mappings of the kernel so that master aborts for devices are avoided. Master aborts cause some devices to fail in the kdump kernel, so this code makes the dump more likely to succeed when AMD IOMMU is enabled. - common flush queue implementation for IOVA code users. The code is still optional, but AMD and Intel IOMMU drivers had their own implementation which is now unified. - finish support for iommu-groups. All drivers implement this feature now so that IOMMU core code can rely on it. - finish support for 'struct iommu_device' in iommu drivers. All drivers now use the interface. - new functions in the IOMMU-API for explicit IO/TLB flushing. This will help to reduce the number of IO/TLB flushes when IOMMU drivers support this interface. - support for mt2712 in the Mediatek IOMMU driver - new IOMMU driver for QCOM hardware - system PM support for ARM-SMMU - shutdown method for ARM-SMMU-v3 - some constification patches - various other small improvements and fixes" * tag 'iommu-updates-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (87 commits) iommu/vt-d: Don't be too aggressive when clearing one context entry iommu: Introduce Interface for IOMMU TLB Flushing iommu/s390: Constify iommu_ops iommu/vt-d: Avoid calling virt_to_phys() on null pointer iommu/vt-d: IOMMU Page Request needs to check if address is canonical. arm/tegra: Call bus_set_iommu() after iommu_device_register() iommu/exynos: Constify iommu_ops iommu/ipmmu-vmsa: Make ipmmu_gather_ops const iommu/ipmmu-vmsa: Rereserving a free context before setting up a pagetable iommu/amd: Rename a few flush functions iommu/amd: Check if domain is NULL in get_domain() and return -EBUSY iommu/mediatek: Fix a build warning of BIT(32) in ARM iommu/mediatek: Fix a build fail of m4u_type iommu: qcom: annotate PM functions as __maybe_unused iommu/pamu: Fix PAMU boot crash memory: mtk-smi: Degrade SMI init to module_init iommu/mediatek: Enlarge the validate PA range for 4GB mode iommu/mediatek: Disable iommu clock when system suspend iommu/mediatek: Move pgtable allocation into domain_alloc iommu/mediatek: Merge 2 M4U HWs into one iommu domain ... commit a59e57da49f7c3f3de8cf4b7568a0c6c82f5b242 Merge: 0ce5c79 d1f936d7 Author: Linus Torvalds Date: Sat Sep 9 14:48:21 2017 -0700 Merge tag 'for-linus-20170904' of git://git.infradead.org/linux-mtd Pull MTD updates from Boris Brezillon: "General updates: - Constify pci_device_id in various drivers - Constify device_type - Remove pad control code from the Gemini driver - Use %pOF to print OF node full_name - Various fixes in the physmap_of driver - Remove unused vars in mtdswap - Check devm_kzalloc() return value in the spear_smi driver - Check clk_prepare_enable() return code in the st_spi_fsm driver - Create per MTD device debugfs enties NAND updates, from Boris Brezillon: - Fix memory leaks in the core - Remove unused NAND locking support - Rename nand.h into rawnand.h (preparing support for spi NANDs) - Use NAND_MAX_ID_LEN where appropriate - Fix support for 20nm Hynix chips - Fix support for Samsung and Hynix SLC NANDs - Various cleanup, improvements and fixes in the qcom driver - Fixes for bugs detected by various static code analysis tools - Fix mxc ooblayout definition - Add a new part_parsers to tmio and sharpsl platform data in order to define a custom list of partition parsers - Request the reset line in exclusive mode in the sunxi driver - Fix a build error in the orion-nand driver when compiled for ARMv4 - Allow 64-bit mvebu platforms to select the PXA3XX driver SPI NOR updates, from Cyrille Pitchen and Marek Vasut: - add support to the JEDEC JESD216B specification (SFDP tables). - add support to the Intel Denverton SPI flash controller. - fix error recovery for Spansion/Cypress SPI NOR memories. - fix 4-byte address management for the Aspeed SPI controller. - add support to some Microchip SST26 memory parts - remove unneeded pinctrl header Write a message for tag:" * tag 'for-linus-20170904' of git://git.infradead.org/linux-mtd: (74 commits) mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized mtd: nand: make Samsung SLC NAND usable again mtd: nand: tmio: Register partitions using the parsers mfd: tmio: Add partition parsers platform data mtd: nand: sharpsl: Register partitions using the parsers mtd: nand: sharpsl: Add partition parsers platform data mtd: nand: qcom: Support for IPQ8074 QPIC NAND controller mtd: nand: qcom: support for IPQ4019 QPIC NAND controller dt-bindings: qcom_nandc: IPQ8074 QPIC NAND documentation dt-bindings: qcom_nandc: IPQ4019 QPIC NAND documentation dt-bindings: qcom_nandc: fix the ipq806x device tree example mtd: nand: qcom: support for different DEV_CMD register offsets mtd: nand: qcom: QPIC data descriptors handling mtd: nand: qcom: enable BAM or ADM mode mtd: nand: qcom: erased codeword detection configuration mtd: nand: qcom: support for read location registers mtd: nand: qcom: support for passing flags in DMA helper functions mtd: nand: qcom: add BAM DMA descriptor handling mtd: nand: qcom: allocate BAM transaction mtd: nand: qcom: DMA mapping support for register read buffer ... commit 0ce5c79f384b9f730cf03a1e464673ae906e7c89 Merge: 7151202 5d01fd3 Author: Linus Torvalds Date: Sat Sep 9 14:44:39 2017 -0700 Merge tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset changes from Sebastian Reichel: "New chip/feature support: - bq27xxx: support updating battery config from DT - bq24190: support loading battery charge info from DT - LTC2941: add LTC2942/LTC2944 support - max17042: add ACPI support - max1721x: new driver Misc: - Move bq27xxx w1 driver from w1 into power-supply subsystem - Introduce power_supply_set_input_current_limit_from_supplier - constify stuff - some minor fixes" * tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits) power: supply: bq27xxx: enable writing capacity values for bq27421 power: supply: bq24190_charger: Get input_current_limit from our supplier power: supply: bq24190_charger: Export 5V boost converter as regulator power: supply: bq24190_charger: Add power_supply_battery_info support power: supply: bq24190_charger: Add property system-minimum-microvolt power: supply: bq24190_charger: Enable devicetree config dt-bindings: power: supply: Add docs for TI BQ24190 battery charger power: supply: bq27xxx: Remove duplicate chip data arrays power: supply: bq27xxx: Enable data memory update for certain chips power: supply: bq27xxx: Add chip IDs for previously shadowed chips power: supply: bq27xxx: Create single chip data table power: supply: bq24190_charger: Add ti,bq24192i to devicetree table power: supply: bq24190_charger: Add input_current_limit property power: supply: Add power_supply_set_input_current_limit_from_supplier helper power: supply: max17042_battery: Fix compiler warning power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies() power: supply: make device_attribute const power: supply: max17042_battery: Fix ACPI interrupt issues power: supply: max17042_battery: Add support for ACPI enumeration power: supply: lp8788: Make several arrays static const * const ... commit 7151202b64c8c5eb163e41fa0adcb8239eea64aa Merge: d7efc35 ed43d09 Author: Linus Torvalds Date: Sat Sep 9 14:34:38 2017 -0700 Merge tag 'rpmsg-v4.14' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This extends the Qualcomm GLINK implementation to support the additional features used for communicating with modem and DSP coprocessors in modern Qualcomm platforms. In addition to this there's support for placing virtio RPMSG buffers in non-System RAM" * tag 'rpmsg-v4.14' of git://github.com/andersson/remoteproc: (29 commits) rpmsg: glink: initialize ret to zero to ensure error status check is correct rpmsg: glink: fix null pointer dereference on a null intent dt-bindings: soc: qcom: Extend GLINK to cover SMEM remoteproc: qcom: adsp: Allow defining GLINK edge rpmsg: glink: Export symbols from common code rpmsg: glink: Release idr lock before returning on error rpmsg: glink: Handle remote rx done command rpmsg: glink: Request for intents when unavailable rpmsg: glink: Use the intents passed by remote rpmsg: glink: Receive and store the remote intent buffers rpmsg: glink: Add announce_create ops and preallocate intents rpmsg: glink: Add rx done command rpmsg: glink: Make RX FIFO peak accessor to take an offset rpmsg: glink: Use the local intents when receiving data rpmsg: glink: Add support for TX intents rpmsg: glink: Fix idr_lock from mutex to spinlock rpmsg: glink: Add support for transport version negotiation rpmsg: glink: Introduce glink smem based transport rpmsg: glink: Do a mbox_free_channel in remove rpmsg: glink: Return -EAGAIN when there is no FIFO space ... commit 1f4f554a72be0d8c164c2f5bc6ba939a1c624fb4 Author: Dan Carpenter Date: Sat Sep 9 11:58:03 2017 +0300 net: qualcomm: rmnet: Fix a double free There is a typo here so we accidentally free "skb" instead of "skbn". It leads to a double free and a leak. After discussing with Subash, it's better to just move the check before the allocation and avoid the need to free. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Dan Carpenter Acked-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d7efc352abb8903ccb8600e1148f59dd9164317e Merge: 8c1d70b 7c89717 Author: Linus Torvalds Date: Sat Sep 9 14:30:50 2017 -0700 Merge tag 'rproc-v4.14' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds and improves remoteproc support for TI DA8xx/OMAP-L13x DSP, TI Keystone 66AK2G DSP and iMX6SX/7D Cortex M4 coprocessors. It introduces the Qualcomm restart notifier and a few fixes" * tag 'rproc-v4.14' of git://github.com/andersson/remoteproc: remoteproc: Introduce rproc handle accessor for children remoteproc: qcom: Make ssr_notifiers local remoteproc: Stop subdevices in reverse order remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver remoteproc: dt: Provide bindings for iMX6SX/7D Remote Processor Controller driver remoteproc: qcom: Use PTR_ERR_OR_ZERO remoteproc: st: explicitly request exclusive reset control remoteproc: qcom: explicitly request exclusive reset control remoteproc/keystone: explicitly request exclusive reset control remoteproc/keystone: Add support for Keystone 66AK2G SOCs remoteproc/davinci: Add device tree support for OMAP-L138 DSP dt-bindings: remoteproc: Add bindings for Davinci DSP processors remoteproc/davinci: Add support to parse internal memories remoteproc/davinci: Switch to platform_get_resource_byname() remoteproc: make device_type const soc: qcom: GLINK SSR notifier remoteproc: qcom: Add support for SSR notifications remoteproc: Merge __rproc_boot() with rproc_boot() commit 8c1d70b2de517e7b44dcac24416e60c9662db507 Merge: d2d8f51 417fb50 Author: Linus Torvalds Date: Sat Sep 9 14:28:45 2017 -0700 Merge tag 'vfio-v4.14-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Base MSI remapping on either IOMMU domain or IRQ domain support (Robin Murphy) - Prioritize hardware MSI regions over software defined regions (Robin Murphy) - Fix no-iommu reference counting (Eric Auger) - Stall removing last device from group for container cleanup (Alex Williamson) - Constify amba_id (Arvind Yadav) * tag 'vfio-v4.14-rc1' of git://github.com/awilliam/linux-vfio: vfio: platform: constify amba_id vfio: Stall vfio_del_group_dev() for container group detach vfio: fix noiommu vfio_iommu_group_get reference count vfio/type1: Give hardware MSI regions precedence vfio/type1: Cope with hardware MSI reserved regions commit d2d8f51e28fec278e9632cdd029facf813f579a3 Merge: ad9a19d 8ce906c Author: Linus Torvalds Date: Sat Sep 9 14:18:40 2017 -0700 Merge branch 'i2c/for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - new drivers for Spreadtrum I2C, Intel Cherry Trail Whiskey Cove SMBUS - quite some driver updates - cleanups for the i2c-mux subsystem - some subsystem-wide constification - further cleanup of include/linux/i2c * 'i2c/for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (50 commits) i2c: sprd: Fix undefined reference errors i2c: nomadik: constify amba_id i2c: versatile: Make i2c_algo_bit_data const i2c: busses: make i2c_adapter_quirks const i2c: busses: make i2c_adapter const i2c: busses: make i2c_algorithm const i2c: Add Spreadtrum I2C controller driver dt-bindings: i2c: Add Spreadtrum I2C controller documentation i2c-cht-wc: make cht_wc_i2c_adap_driver static MAINTAINERS: Add entry for drivers/i2c/busses/i2c-cht-wc.c i2c: aspeed: Retain delay/setup/hold values when configuring bus frequency dt-bindings: i2c: eeprom: Document vendor to be used and deprecated ones i2c: i801: Restore the presence state of P2SB PCI device after reading BAR MAINTAINERS: drop entry for Blackfin I2C and Sonic's email blackfin: merge the two TWI header files i2c: davinci: Preserve return value of devm_clk_get i2c: mediatek: Add i2c compatible for MediaTek MT7622 dt-bindings: i2c: Add MediaTek MT7622 i2c binding dt-bindings: i2c: modify information formats i2c: mux: i2c-arb-gpio-challenge: allow compiling w/o OF support ... commit 1bd5d6d08ea7ed0794c8a3908383d6d6fc202cdd Author: Trond Myklebust Date: Sat Sep 9 16:43:09 2017 -0400 NFS: Count the bytes of skipped subrequests in nfs_lock_and_join_requests() If we skip a subrequest due to a zero refcount, we should still count the byte range that it covered so that we accurately reconstruct the original request size. Signed-off-by: Trond Myklebust fs/nfs/write.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ad9a19d003703ae06a6e8efc64cf26a939d9e84d Merge: 66ba772 26fb225 Author: Linus Torvalds Date: Sat Sep 9 13:31:49 2017 -0700 Merge tag 'nfsd-4.14' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "More RDMA work and some op-structure constification from Chuck Lever, and a small cleanup to our xdr encoding" * tag 'nfsd-4.14' of git://linux-nfs.org/~bfields/linux: svcrdma: Estimate Send Queue depth properly rdma core: Add rdma_rw_mr_payload() svcrdma: Limit RQ depth svcrdma: Populate tail iovec when receiving nfsd: Incoming xdr_bufs may have content in tail buffer svcrdma: Clean up svc_rdma_build_read_chunk() sunrpc: Const-ify struct sv_serv_ops nfsd: Const-ify NFSv4 encoding and decoding ops arrays sunrpc: Const-ify instances of struct svc_xprt_ops nfsd4: individual encoders no longer see error cases nfsd4: skip encoder in trivial error cases nfsd4: define ->op_release for compound ops nfsd4: opdesc will be useful outside nfs4proc.c nfsd4: move some nfsd4 op definitions to xdr4.h commit 66ba772ee3119849fcdd8ac9766c6c25ede4a982 Merge: 126e76f db95c87 Author: Linus Torvalds Date: Sat Sep 9 13:27:51 2017 -0700 Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The changes range through all types: cleanups, core chagnes, sanity checks, fixes, other user visible changes, detailed list below: - deprecated: user transaction ioctl - mount option ssd does not change allocation alignments - degraded read-write mount is allowed if all the raid profile constraints are met, now based on more accurate check - defrag: do not reset compression afterwards; the NOCOMPRESS flag can be now overriden by defrag - prep work for better extent reference tracking (related to the qgroup slowness with balance) - prep work for compression heuristics - memory allocation reductions (may help latencies on a loaded system) - better accounting for io waiting states - error handling improvements (removed BUGs) - added more sanity checks for shared refs - fix readdir vs pagefault deadlock under some circumstances - fix for 'no-hole' mode, certain combination of compressed and inline extents - send: fix emission of invalid clone operations - fixup file mode if setting acls fail - more fixes from fuzzing - oher cleanups" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (104 commits) btrfs: submit superblock io with REQ_META and REQ_PRIO btrfs: remove unnecessary memory barrier in btrfs_direct_IO btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent btrfs: pass fs_info to btrfs_del_root instead of tree_root Btrfs: add one more sanity check for shared ref type Btrfs: remove BUG_ON in __add_tree_block Btrfs: remove BUG() in add_data_reference Btrfs: remove BUG() in print_extent_item Btrfs: remove BUG() in btrfs_extent_inline_ref_size Btrfs: convert to use btrfs_get_extent_inline_ref_type Btrfs: add a helper to retrive extent inline ref type btrfs: scrub: simplify scrub worker initialization btrfs: scrub: clean up division in scrub_find_csum btrfs: scrub: clean up division in __scrub_mark_bitmap btrfs: scrub: use bool for flush_all_writes btrfs: preserve i_mode if __btrfs_set_acl() fails btrfs: Remove extraneous chunk_objectid variable btrfs: Remove chunk_objectid argument from btrfs_make_block_group btrfs: Remove extra parentheses from condition in copy_items() ... commit 126e76ffbf78d9e948b641aadb265d16c57f5a3d Merge: fbd0141 175206c Author: Linus Torvalds Date: Sat Sep 9 12:49:01 2017 -0700 Merge branch 'for-4.14/block-postmerge' of git://git.kernel.dk/linux-block Pull followup block layer updates from Jens Axboe: "I ended up splitting the main pull request for this series into two, mainly because of clashes between NVMe fixes that went into 4.13 after the for-4.14 branches were split off. This pull request is mostly NVMe, but not exclusively. In detail, it contains: - Two pull request for NVMe changes from Christoph. Nothing new on the feature front, basically just fixes all over the map for the core bits, transport, rdma, etc. - Series from Bart, cleaning up various bits in the BFQ scheduler. - Series of bcache fixes, which has been lingering for a release or two. Coly sent this in, but patches from various people in this area. - Set of patches for BFQ from Paolo himself, updating both documentation and fixing some corner cases in performance. - Series from Omar, attempting to now get the 4k loop support correct. Our confidence level is higher this time. - Series from Shaohua for loop as well, improving O_DIRECT performance and fixing a use-after-free" * 'for-4.14/block-postmerge' of git://git.kernel.dk/linux-block: (74 commits) bcache: initialize dirty stripes in flash_dev_run() loop: set physical block size to logical block size bcache: fix bch_hprint crash and improve output bcache: Update continue_at() documentation bcache: silence static checker warning bcache: fix for gc and write-back race bcache: increase the number of open buckets bcache: Correct return value for sysfs attach errors bcache: correct cache_dirty_target in __update_writeback_rate() bcache: gc does not work when triggering by manual command bcache: Don't reinvent the wheel but use existing llist API bcache: do not subtract sectors_to_gc for bypassed IO bcache: fix sequential large write IO bypass bcache: Fix leak of bdev reference block/loop: remove unused field block/loop: fix use after free bfq: Use icq_to_bic() consistently bfq: Suppress compiler warnings about comparisons bfq: Check kstrtoul() return value bfq: Declare local functions static ... commit 8b77484f2b3d8f1096a2231d513fc589e4857a73 Author: Trond Myklebust Date: Sat Sep 9 15:31:28 2017 -0400 NFS: Don't hold the group lock when calling nfs_release_request() That can deadlock if this is the last reference since nfs_page_group_destroy() calls nfs_page_group_sync_on_bit(). Note that even if the page was removed from the subpage list, the req->wb_head could still be pointing to the old head. Signed-off-by: Trond Myklebust fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cb30b044a8f06e6e6418ae12c3c00bb02679dac Author: Arvind Yadav Date: Sat Aug 26 11:41:06 2017 +0530 watchdog: mei_wdt: constify mei_cl_device_id mei_cl_device_id are not supposed to change at runtime. All functions working with mei_cl_device_id provided by work with const mei_cl_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mei_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05ce42fff3afb2904647f6a88c6dc613b5a2793a Author: Arvind Yadav Date: Wed Aug 23 22:04:08 2017 +0530 watchdog: sp805: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp805_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c82befe4023afd75006676c4bd708dbe98d668 Author: Arvind Yadav Date: Mon Aug 21 22:18:38 2017 +0530 watchdog: ziirave: 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 Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ziirave_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39ad808996dd84f2961e241cb1396b391c6cd039 Author: Arvind Yadav Date: Wed Aug 16 10:27:03 2017 +0530 watchdog: sc1200: 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 Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sc1200wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82f6817fd6409e2253372e7c7b8c1e573390b579 Author: Geert Uytterhoeven Date: Thu Aug 17 13:14:25 2017 +0200 dt-bindings: watchdog: renesas-wdt: Add support for the r8a77995 wdt Document support for the Watchdog Timer (WDT) Controller in the Renesas R-Car D3 (r8a77995) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/renesas-wdt.txt | 1 + 1 file changed, 1 insertion(+) commit 1f185596e7981ea1e606ae8c47b141be729e95ae Author: Wolfram Sang Date: Wed Jul 26 23:54:39 2017 +0200 watchdog: renesas_wdt: update copyright dates Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c22b6d33605d4b24e2491fdb743a285e8588738 Author: Wolfram Sang Date: Wed Jul 26 23:54:38 2017 +0200 watchdog: renesas_wdt: make 'clk' a variable local to probe() It is not needed outside probe() anymore. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3be42941dd9df9b7c5062fc98c416a15bf4bbc0f Author: Wolfram Sang Date: Wed Jul 26 23:54:37 2017 +0200 watchdog: renesas_wdt: consistently use RuntimePM for clock management On Renesas R-Car archs, RuntimePM does all the clock handling. So, use it consistently to enable/disable the clocks. Also make sure that clocks are really enabled around clk_get_rate(). clk_summary looks proper now: clock enable_cnt prepare_cnt rate ... Before this commit: At boot: rwdt 1 1 32768 0 0 WDT running: rwdt 2 2 32768 0 0 After this commit: At boot: rwdt 0 1 32768 0 0 WDT running rwdt 1 1 32768 0 0 Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 012c04601f9dc6a268ebff87a890b339af6d25bf Author: Andrew Jeffery Date: Wed Aug 2 14:15:29 2017 +0930 watchdog: aspeed: Support configuration of external signal properties Add support for configuring the drive strength and polarity on the AST2500, and the pulse duration on both the AST2400 and AST2500. Signed-off-by: Andrew Jeffery Tested-by: Matt Spinler Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 105 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 3 deletions(-) commit e654f19165483adfc30eeabe69a1efc23182bf0e Author: Andrew Jeffery Date: Wed Aug 2 14:15:28 2017 +0930 dt-bindings: watchdog: aspeed: External reset signal properties For the AST2500 and compatible watchdog controllers the external reset signal can be configured for push-pull or open-drain drive types, and in the case of push-pull driving, active low or high. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ffbb29d62d6bcca3eff88111b58e4865506e95bf Author: Christopher Bostic Date: Mon Jul 17 14:25:38 2017 -0500 drivers/watchdog: Add optional ASPEED device tree properties Describe device tree optional properties: * aspeed,reset-type = "cpu|soc|system|none" One of three different, mutually exclusive, values "cpu" : ARM CPU reset on signal "soc" : 'System on chip' reset "system" : Full system reset The value can also be set to "none" which indicates that no reset of any kind is to be done via this watchdog. This assumes another watchdog on the chip is to take care of resets. * aspeed,external-signal - Generate external signal (WDT1 and WDT2 only) * aspeed,alt-boot - Boot from alternate block on signal Signed-off-by: Christopher Bostic Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/aspeed-wdt.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit b7f0b8ad25f3f19f7830b3ce5b8fa6f7fe7ae5d5 Author: Christopher Bostic Date: Mon Jul 17 14:25:39 2017 -0500 drivers/watchdog: ASPEED reference dev tree properties for config Reference the system device tree when configuring the watchdog engines. If property 'aspeed,reset_type' is present then set reset behavior based on the specified value. This can be one of three different mutually exclusive values * cpu - Reset CPU only on watchdog timeout * soc - Reset System on Chip * system - Full system reset No reset can also be specified by indicating: * none - No reset, assumes another watchdog is responsible for this. Add optional property 'aspeed,external-signal'. If present then configure to generate external signal on watchdog timeout. Signed-off-by: Christopher Bostic Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit a1f2a82072ea298ae91505c213f6d299ddb5e446 Author: fzuuzf@googlemail.com Date: Tue Jul 25 13:25:58 2017 +0200 watchdog: da9063_wdt: Simplify by removing unneeded struct... ...da9063_watchdog, which contained nothing but struct watchdog_device and a struct da9063 pointer. Assign the struct da9063 pointer directly to the struct watchdog_device's driver_data field instead of creating struct da9063_watchdog and assigning it's address there. Spares a pointer's size data memory and an indirection level in the callbacks. Signed-off-by: Karsten Wiese Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/da9063_wdt.c | 67 +++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 37 deletions(-) commit dd0a18ca4cbdce00bc2b2e0510793205af27c7c5 Author: Fabio Estevam Date: Sat Jul 22 17:22:59 2017 -0300 watchdog: bcm7038: 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 Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm7038_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 15210ad18fcbd7f53f40e26e4391710d271c2daf Author: Fabio Estevam Date: Sat Jul 22 13:04:33 2017 -0300 watchdog: qcom: Check for platform_get_resource() failure platform_get_resource() may fail, so we should better check its return value and propagate an error in case it fails. This avoids a NULL pointer dereference a bit later in the code. Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/qcom-wdt.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f671c6b6288fd673e8b8b8acf1070100ba8188a Author: Michal Simek Date: Mon Aug 7 13:24:23 2017 +0200 watchdog: of_xilinx_wdt: Add suspend/resume support Add suspend/resume support to driver. Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/of_xilinx_wdt.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit b6bc41645547f4e1a1bd882db7fa2b8596197d88 Author: Maulik Jodhani Date: Mon Aug 7 13:24:22 2017 +0200 watchdog: of_xilinx_wdt: Add support for reading freq via CCF Improve CLK handling in the code to read freq via CCF. Also disable CLK asap and add clk handling code to start and stop. Signed-off-by: Maulik Jodhani Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/of_xilinx_wdt.c | 45 ++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 13 deletions(-) commit e8a7fc711c9aa801cf0e733109e40548b16875a3 Author: Sean Wang Date: Tue Aug 15 00:41:38 2017 +0800 dt-bindings: watchdog: mediatek: add support for MediaTek MT7623 and MT7622 SoC This updates dt-binding documentation for MediaTek MT7622 and MT7623 SoC. For the both SoCs supported all rely on the fallback binding of the case with "mediatek,mt6589-wdt". Signed-off-by: Sean Wang Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 2 ++ 1 file changed, 2 insertions(+) commit e8c7ebfdb4308d26efda8214da8bfbbd9cc31414 Author: Arvind Yadav Date: Sun Aug 13 16:58:28 2017 +0530 watchdog: max77620_wdt: 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: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/max77620_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc53e1c2bba50563da8fae057e75a6377b9db696 Author: Arvind Yadav Date: Sat Aug 12 14:09:45 2017 +0530 watchdog: pcwd_usb: 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 Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pcwd_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3a7f6f67fc7ec5bb47a6ad6b947d66759e6d9e4 Author: Michal Simek Date: Fri Aug 4 09:39:17 2017 +0200 watchdog: cadence_wdt: Show information when driver is probed Showing message that driver is loaded is common across drivers. This change also fixes checkpatch (--strict) warning "Alignment should match open parenthesis". Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db202f4d5c24c0ed44501c1d382e4e971c6d67c7 Author: Michal Simek Date: Fri Aug 4 09:39:16 2017 +0200 watchdog: cadence_wdt: Enable access to module parameters Give read access to module parameters to all and write access to root. This change also improves driver error path testing. Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04c3c982fcc0151ed3574d7ae4f1e62278054d72 Author: Randy Dunlap Date: Fri Sep 8 09:36:57 2017 -0700 libnvdimm, btt: fix format string warnings Fix format warnings (seen on i386) in nvdimm/btt.c: ../drivers/nvdimm/btt.c: In function ‘btt_map_init’: ../drivers/nvdimm/btt.c:430:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] dev_WARN_ONCE(to_dev(arena), size < 512, ^ ../drivers/nvdimm/btt.c: In function ‘btt_log_init’: ../drivers/nvdimm/btt.c:474:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] dev_WARN_ONCE(to_dev(arena), size < 512, ^ Fixes: 86652d2eb347 ("libnvdimm, btt: clean up warning and error messages") Reported-by: Arnd Bergmann Reported-by: kbuild test robot Cc: Vishal Verma Signed-off-by: Randy Dunlap Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 323edb2e27e8e02b0ce25e7caa8288a90a438b99 Author: Julia Lawall Date: Thu Aug 3 23:21:31 2017 +0200 watchdog: constify watchdog_ops and watchdog_info structures These watchdog_ops and watchdog_info structures are only stored in the ops and info fields of a watchdog_device structure, respectively, which are const. Thus make the watchdog_ops and watchdog_info structures const as well. Done with the help of Coccinelle. The rules for the watchdog_ops case are as follows: // @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Linus Walleij Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/diag288_wdt.c | 2 +- drivers/watchdog/mt7621_wdt.c | 2 +- drivers/watchdog/rt2880_wdt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d94fa4655ed79784388cb49c17c5e9967ddfb4b9 Author: Wolfram Sang Date: Mon Jul 17 19:12:24 2017 +0200 watchdog: asm9260_wdt: don't round closest with get_timeleft We should never return more time left than there actually is. So, switch to a plain divider instead of DIV_ROUND_CLOSEST. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/asm9260_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03a196f25f5652a3deffc1b8eade8a3c1c39282c Author: Wolfram Sang Date: Wed Jul 19 10:27:55 2017 +0200 watchdog: renesas_wdt: add another divider option If we set RWTCSRB to 0, we can gain 4096 as another divider value. This is supported by all R-Car Gen2 and Gen3 devices which we aim to support. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 82f64cd20848511f516bd28147a6432497dfb080 Author: Wolfram Sang Date: Wed Jul 19 10:27:54 2017 +0200 watchdog: renesas_wdt: apply better precision The error margin of the clks_per_second variable was too large and caused offsets when used with clock frequencies which left a remainder after applying the dividers. Now we always calculate directly using the clock rate and the divider using some helper macros. That also means that DIV_ROUND_UP moves from probe to the multiplication macro. In probe, we don't need to ensure anymore that 'clks_per_sec' would go too fast but rather ensure that the lower limit is really at least 1 to certainly get a full cycle. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 1c1b2434017206b612764fad1820b6dd48cb9e92 Author: Wolfram Sang Date: Wed Jul 19 10:27:53 2017 +0200 watchdog: renesas_wdt: don't round closest with get_timeleft We should never return more time left than there actually is. So, switch to a plain divider instead of DIV_ROUND_CLOSEST. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b51247c8029660a9c49ad48bf38f364479c96215 Author: Wolfram Sang Date: Wed Jul 19 10:27:52 2017 +0200 watchdog: renesas_wdt: check rate also for upper limit When checking the clock rate, ensure also that counting all 16 bits takes at least one second to match the granularity of the framework. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6159dd4b085ad839ab02c1ba230535c53ef60d4 Author: Wolfram Sang Date: Wed Jul 19 10:27:51 2017 +0200 watchdog: renesas_wdt: avoid (theoretical) type overflow Because the smallest clock divider we can select is 1, 'clks_per_sec' must be the same type as 'rate'. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0bade0215ca4337caa00cd72e88bd71a45396b00 Author: Philipp Zabel Date: Wed Jul 19 17:26:38 2017 +0200 watchdog: mt7621: 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: linux-watchdog@vger.kernel.org Signed-off-by: Philipp Zabel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mt7621_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a248e5e9a7c511ff95c53cc2085920c8f29206aa Author: Philipp Zabel Date: Wed Jul 19 17:26:39 2017 +0200 watchdog: rt2880: 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: linux-watchdog@vger.kernel.org Signed-off-by: Philipp Zabel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/rt2880_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39055bbb446d6858017a1f454327c2b0d432261b Author: Philipp Zabel Date: Wed Jul 19 17:26:40 2017 +0200 watchdog: zx2967: 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: linux-watchdog@vger.kernel.org Signed-off-by: Philipp Zabel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/zx2967_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcc6da076a38f53d6df374fe5c9f1325eea25a00 Author: Philipp Zabel Date: Wed Jul 19 17:26:37 2017 +0200 watchdog: asm9260: 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: linux-watchdog@vger.kernel.org Signed-off-by: Philipp Zabel Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/asm9260_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43a64e81b2ac449938ba52a202e3edd23f57ec49 Author: Martin Blumenstingl Date: Wed Jul 12 00:14:38 2017 +0200 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2 The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b. Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Guenter Roeck Acked-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 6 +++++- drivers/watchdog/meson_wdt.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 08b10b57d69bb37d6e70a8db71844527a9f1f41c Author: Colin Ian King Date: Tue Jul 11 16:23:34 2017 +0100 watchdog: w83627hf: make const array chip_name static Don't populate array chip_name on the stack but instead make it static. Makes the object code smaller by 40 bytes: Before: text data bss dec hex filename 5641 2840 384 8865 22a1 drivers/watchdog/w83627hf_wdt.o After: text data bss dec hex filename 5545 2896 384 8825 2279 drivers/watchdog/w83627hf_wdt.o Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/w83627hf_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9215fc79521a05debba3ba67668caeb65d204cc7 Author: Gustavo A. R. Silva Date: Fri Jul 7 19:33:30 2017 -0500 watchdog: coh901327_wdt: constify watchdog_ops structure Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/coh901327_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7b16e75d40e579a58e31f751ac5bb44d2dfbeed Author: Gustavo A. R. Silva Date: Fri Jul 7 19:28:57 2017 -0500 watchdog: stm32_iwdg: constify watchdog_ops structure Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/stm32_iwdg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2211a8dce791f49a783959e8e81503e6ad67c70a Author: Gustavo A. R. Silva Date: Fri Jul 7 19:23:21 2017 -0500 watchdog: it87_wdt: constify watchdog_ops structure Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/it87_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5870ac753bce54ad0550851c65ebba1d7da890ef Author: Gustavo A. R. Silva Date: Fri Jul 7 19:18:40 2017 -0500 watchdog: ts72xx_wdt: constify watchdog_ops structure Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ts72xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbd01410e89a66f346ba1b3c0161e1198449b746 Merge: fbf4432 9beb8be Author: Linus Torvalds Date: Sat Sep 9 11:05:20 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "The iwlwifi firmware compat fix is in here as well as some other stuff: 1) Fix request socket leak introduced by BPF deadlock fix, from Eric Dumazet. 2) Fix VLAN handling with TXQs in mac80211, from Johannes Berg. 3) Missing __qdisc_drop conversions in prio and qfq schedulers, from Gao Feng. 4) Use after free in netlink nlk groups handling, from Xin Long. 5) Handle MTU update properly in ipv6 gre tunnels, from Xin Long. 6) Fix leak of ipv6 fib tables on netns teardown, from Sabrina Dubroca with follow-on fix from Eric Dumazet. 7) Need RCU and preemption disabled during generic XDP data patch, from John Fastabend" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits) bpf: make error reporting in bpf_warn_invalid_xdp_action more clear Revert "mdio_bus: Remove unneeded gpiod NULL check" bpf: devmap, use cond_resched instead of cpu_relax bpf: add support for sockmap detach programs net: rcu lock and preempt disable missing around generic xdp bpf: don't select potentially stale ri->map from buggy xdp progs net: tulip: Constify tulip_tbl net: ethernet: ti: netcp_core: no need in netif_napi_del davicom: Display proper debug level up to 6 net: phy: sfp: rename dt properties to match the binding dt-binding: net: sfp binding documentation dt-bindings: add SFF vendor prefix dt-bindings: net: don't confuse with generic PHY property ip6_tunnel: fix setting hop_limit value for ipv6 tunnel ip_tunnel: fix setting ttl and tos value in collect_md mode ipv6: fix typo in fib6_net_exit() tcp: fix a request socket leak sctp: fix missing wake ups in some situations netfilter: xt_hashlimit: fix build error caused by 64bit division netfilter: xt_hashlimit: alloc hashtable with right size ... commit fbf4432ff71b7a25bef993a5312906946d27f446 Merge: c054be1 0cfb6ae Author: Linus Torvalds Date: Sat Sep 9 10:30:07 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - most of the rest of MM - a small number of misc things - lib/ updates - checkpatch - autofs updates - ipc/ updates * emailed patches from Andrew Morton : (126 commits) ipc: optimize semget/shmget/msgget for lots of keys ipc/sem: play nicer with large nsops allocations ipc/sem: drop sem_checkid helper ipc: convert kern_ipc_perm.refcount from atomic_t to refcount_t ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t ipc: convert ipc_namespace.count from atomic_t to refcount_t kcov: support compat processes sh: defconfig: cleanup from old Kconfig options mn10300: defconfig: cleanup from old Kconfig options m32r: defconfig: cleanup from old Kconfig options drivers/pps: use surrounding "if PPS" to remove numerous dependency checks drivers/pps: aesthetic tweaks to PPS-related content cpumask: make cpumask_next() out-of-line kmod: move #ifdef CONFIG_MODULES wrapper to Makefile kmod: split off umh headers into its own file MAINTAINERS: clarify kmod is just a kernel module loader kmod: split out umh code into its own file test_kmod: flip INT checks to be consistent test_kmod: remove paranoid UINT_MAX check on uint range processing vfat: deduplicate hex2bin() ... commit c054be10ffdbd5507a1fd738067d76acfb4808fd Author: Linus Torvalds Date: Sat Sep 9 10:00:15 2017 -0700 remove gperf left-overs from build system I removed all the gperf use, but not the Makefile rules. Sam Ravnborg says I get bonus points for cleaning this up. I'll hold him to it. Requested-by: Sam Ravnborg Signed-off-by: Linus Torvalds scripts/Makefile.lib | 9 --------- 1 file changed, 9 deletions(-) commit 5d2a9d9dac902f438daa1334540398aec6c8dcfa Author: Trond Myklebust Date: Sat Sep 9 12:40:38 2017 -0400 NFS: Remove pnfs_generic_transfer_commit_list() It's pretty much a duplicate of nfs_scan_commit_list() that also clears the PG_COMMIT_TO_DS flag. Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 43 ++----------------------------------------- fs/nfs/write.c | 2 ++ 2 files changed, 4 insertions(+), 41 deletions(-) commit 137da553dba62dfc64fb8f4ccb5be769acbf615e Author: Trond Myklebust Date: Sat Sep 9 12:28:01 2017 -0400 NFS: nfs_lock_and_join_requests and nfs_scan_commit_list can deadlock Since the commit list is not ordered, it is possible for nfs_scan_commit_list to hold a request that nfs_lock_and_join_requests() is waiting for, while at the same time trying to grab a request that nfs_lock_and_join_requests already holds. Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 16 +++++++++++----- fs/nfs/write.c | 15 +++++++++++---- 2 files changed, 22 insertions(+), 9 deletions(-) commit fc61e83a29308601e6e8a0759e24fc8fe2122692 Author: Wim Van Sebroeck Date: Sat Sep 9 17:41:24 2017 +0200 watchdog: Revert "iTCO_wdt: all versions count down twice" This reverts commit 1fccb73011ea8a5fa0c6d357c33fa29c695139ea. Reported as Bug 196509 - iTCO_wdt regression reboot before timeout expire Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.txt | 2 +- drivers/watchdog/iTCO_wdt.c | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) commit e558bdc21ae1f0db520eccd84015e17d8a589973 Merge: 746a272 9a3dc31 Author: Russell King Date: Sat Sep 9 16:34:41 2017 +0100 Merge branches 'fixes' and 'misc' into for-linus commit 9a3dc3186fc3795e076a4122da9e0258651a9631 Author: Dustin Brown Date: Mon Aug 7 19:44:01 2017 +0100 ARM: 8691/1: Export save_stack_trace_tsk() The kernel watchdog is a great debugging tool for finding tasks that consume a disproportionate amount of CPU time in contiguous chunks. One can imagine building a similar watchdog for arbitrary driver threads using save_stack_trace_tsk() and print_stack_trace(). However, this is not viable for dynamically loaded driver modules on ARM platforms because save_stack_trace_tsk() is not exported for those architectures. Export save_stack_trace_tsk() for the ARM architecture to align with x86 and support various debugging use cases such as arbitrary driver thread watchdog timers. Signed-off-by: Dustin Brown Signed-off-by: Russell King arch/arm/kernel/stacktrace.c | 1 + 1 file changed, 1 insertion(+) commit 9beb8bedb05c5f3a353dba62b8fa7cbbb9ec685e Author: Daniel Borkmann Date: Sat Sep 9 01:40:35 2017 +0200 bpf: make error reporting in bpf_warn_invalid_xdp_action more clear Differ between illegal XDP action code and just driver unsupported one to provide better feedback when we throw a one-time warning here. Reason is that with 814abfabef3c ("xdp: add bpf_redirect helper function") not all drivers support the new XDP return code yet and thus they will fall into their 'default' case when checking for return codes after program return, which then triggers a bpf_warn_invalid_xdp_action() stating that the return code is illegal, but from XDP perspective it's not. I decided not to place something like a XDP_ACT_MAX define into uapi i) given we don't have this either for all other program types, ii) future action codes could have further encoding there, which would render such define unsuitable and we wouldn't be able to rip it out again, and iii) we rarely add new action codes. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 4 ++-- net/core/filter.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit a010a2f6540ecc39f8701c6f7d35e22992c03fb6 Author: Florian Fainelli Date: Fri Sep 8 15:38:07 2017 -0700 Revert "mdio_bus: Remove unneeded gpiod NULL check" This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus: Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB checks for NULL descriptors, so it's safe to drop them, but it is not when CONFIG_GPIOLIB is disabled in the kernel. If we do call gpiod_set_value_cansleep() on a GPIO descriptor we will issue warnings coming from the inline stubs declared in include/linux/gpio/consumer.h. Fixes: 95b80bf3db03 ("mdio_bus: Remove unneeded gpiod NULL check") Reported-by: Woojung Huh Signed-off-by: Florian Fainelli Signed-off-by: Linus Walleij Acked-by: Linus Walleij Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a7bc57749f231dcd5fdbc7b653bc260064caf0b9 Merge: 109980b 374fb01 Author: David S. Miller Date: Fri Sep 8 21:11:01 2017 -0700 Merge branch 'xdp-bpf-fixes' John Fastabend says: ==================== net: Fixes for XDP/BPF The following fixes, UAPI updates, and small improvement, i. XDP needs to be called inside RCU with preempt disabled. ii. Not strictly a bug fix but we have an attach command in the sockmap UAPI already to avoid having a single kernel released with only the attach and not the detach I'm pushing this into net branch. Its early in the RC cycle so I think this is OK (not ideal but better than supporting a UAPI with a missing detach forever). iii. Final patch replace cpu_relax with cond_resched in devmap. ==================== Signed-off-by: David S. Miller commit 374fb014fc5b15e420faa00af036868a635eadd3 Author: John Fastabend Date: Fri Sep 8 14:01:10 2017 -0700 bpf: devmap, use cond_resched instead of cpu_relax Be a bit more friendly about waiting for flush bits to complete. Replace the cpu_relax() with a cond_resched(). Suggested-by: Daniel Borkmann Acked-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a67da2a71c64daeb456f6f3e87b5c7cecdc5ffa Author: John Fastabend Date: Fri Sep 8 14:00:49 2017 -0700 bpf: add support for sockmap detach programs The bpf map sockmap supports adding programs via attach commands. This patch adds the detach command to keep the API symmetric and allow users to remove previously added programs. Otherwise the user would have to delete the map and re-add it to get in this state. This also adds a series of additional tests to capture detach operation and also attaching/detaching invalid prog types. API note: socks will run (or not run) programs depending on the state of the map at the time the sock is added. We do not for example walk the map and remove programs from previously attached socks. Acked-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 8 +++--- kernel/bpf/sockmap.c | 2 +- kernel/bpf/syscall.c | 27 ++++++++++------- tools/testing/selftests/bpf/test_maps.c | 51 ++++++++++++++++++++++++++++++++- 4 files changed, 72 insertions(+), 16 deletions(-) commit bbbe211c295ffb309247adb7b871dda60d92d2d5 Author: John Fastabend Date: Fri Sep 8 14:00:30 2017 -0700 net: rcu lock and preempt disable missing around generic xdp do_xdp_generic must be called inside rcu critical section with preempt disabled to ensure BPF programs are valid and per-cpu variables used for redirect operations are consistent. This patch ensures this is true and fixes the splat below. The netif_receive_skb_internal() code path is now broken into two rcu critical sections. I decided it was better to limit the preempt_enable/disable block to just the xdp static key portion and the fallout is more rcu_read_lock/unlock calls. Seems like the best option to me. [ 607.596901] ============================= [ 607.596906] WARNING: suspicious RCU usage [ 607.596912] 4.13.0-rc4+ #570 Not tainted [ 607.596917] ----------------------------- [ 607.596923] net/core/dev.c:3948 suspicious rcu_dereference_check() usage! [ 607.596927] [ 607.596927] other info that might help us debug this: [ 607.596927] [ 607.596933] [ 607.596933] rcu_scheduler_active = 2, debug_locks = 1 [ 607.596938] 2 locks held by pool/14624: [ 607.596943] #0: (rcu_read_lock_bh){......}, at: [] ip_finish_output2+0x14d/0x890 [ 607.596973] #1: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x14a/0xfd0 [ 607.597000] [ 607.597000] stack backtrace: [ 607.597006] CPU: 5 PID: 14624 Comm: pool Not tainted 4.13.0-rc4+ #570 [ 607.597011] Hardware name: Dell Inc. Precision Tower 5810/0HHV7N, BIOS A17 03/01/2017 [ 607.597016] Call Trace: [ 607.597027] dump_stack+0x67/0x92 [ 607.597040] lockdep_rcu_suspicious+0xdd/0x110 [ 607.597054] do_xdp_generic+0x313/0xa50 [ 607.597068] ? time_hardirqs_on+0x5b/0x150 [ 607.597076] ? mark_held_locks+0x6b/0xc0 [ 607.597088] ? netdev_pick_tx+0x150/0x150 [ 607.597117] netif_rx_internal+0x205/0x3f0 [ 607.597127] ? do_xdp_generic+0xa50/0xa50 [ 607.597144] ? lock_downgrade+0x2b0/0x2b0 [ 607.597158] ? __lock_is_held+0x93/0x100 [ 607.597187] netif_rx+0x119/0x190 [ 607.597202] loopback_xmit+0xfd/0x1b0 [ 607.597214] dev_hard_start_xmit+0x127/0x4e0 Fixes: d445516966dc ("net: xdp: support xdp generic on virtual devices") Fixes: b5cdae3291f7 ("net: Generic XDP") Acked-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/dev.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 109980b894e9dae66c37c3d804a415aa68b19c7e Author: Daniel Borkmann Date: Fri Sep 8 00:14:51 2017 +0200 bpf: don't select potentially stale ri->map from buggy xdp progs We can potentially run into a couple of issues with the XDP bpf_redirect_map() helper. The ri->map in the per CPU storage can become stale in several ways, mostly due to misuse, where we can then trigger a use after free on the map: i) prog A is calling bpf_redirect_map(), returning XDP_REDIRECT and running on a driver not supporting XDP_REDIRECT yet. The ri->map on that CPU becomes stale when the XDP program is unloaded on the driver, and a prog B loaded on a different driver which supports XDP_REDIRECT return code. prog B would have to omit calling to bpf_redirect_map() and just return XDP_REDIRECT, which would then access the freed map in xdp_do_redirect() since not cleared for that CPU. ii) prog A is calling bpf_redirect_map(), returning a code other than XDP_REDIRECT. prog A is then detached, which triggers release of the map. prog B is attached which, similarly as in i), would just return XDP_REDIRECT without having called bpf_redirect_map() and thus be accessing the freed map in xdp_do_redirect() since not cleared for that CPU. iii) prog A is attached to generic XDP, calling the bpf_redirect_map() helper and returning XDP_REDIRECT. xdp_do_generic_redirect() is currently not handling ri->map (will be fixed by Jesper), so it's not being reset. Later loading a e.g. native prog B which would, say, call bpf_xdp_redirect() and then returns XDP_REDIRECT would find in xdp_do_redirect() that a map was set and uses that causing use after free on map access. Fix thus needs to avoid accessing stale ri->map pointers, naive way would be to call a BPF function from drivers that just resets it to NULL for all XDP return codes but XDP_REDIRECT and including XDP_REDIRECT for drivers not supporting it yet (and let ri->map being handled in xdp_do_generic_redirect()). There is a less intrusive way w/o letting drivers call a reset for each BPF run. The verifier knows we're calling into bpf_xdp_redirect_map() helper, so it can do a small insn rewrite transparent to the prog itself in the sense that it fills R4 with a pointer to the own bpf_prog. We have that pointer at verification time anyway and R4 is allowed to be used as per calling convention we scratch R0 to R5 anyway, so they become inaccessible and program cannot read them prior to a write. Then, the helper would store the prog pointer in the current CPUs struct redirect_info. Later in xdp_do_*_redirect() we check whether the redirect_info's prog pointer is the same as passed xdp_prog pointer, and if that's the case then all good, since the prog holds a ref on the map anyway, so it is always valid at that point in time and must have a reference count of at least 1. If in the unlikely case they are not equal, it means we got a stale pointer, so we clear and bail out right there. Also do reset map and the owning prog in bpf_xdp_redirect(), so that bpf_xdp_redirect_map() and bpf_xdp_redirect() won't get mixed up, only the last call should take precedence. A tc bpf_redirect() doesn't use map anywhere yet, so no need to clear it there since never accessed in that layer. Note that in case the prog is released, and thus the map as well we're still under RCU read critical section at that time and have preemption disabled as well. Once we commit with the __dev_map_insert_ctx() from xdp_do_redirect_map() and set the map to ri->map_to_flush, we still wait for a xdp_do_flush_map() to finish in devmap dismantle time once flush_needed bit is set, so that is fine. Fixes: 97f91a7cf04f ("bpf: add bpf_redirect_map helper routine") Reported-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 16 ++++++++++++++++ net/core/filter.c | 21 +++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 9a486c9dc515f7daa05a344621031ee09645c522 Author: Kees Cook Date: Thu Sep 7 12:35:14 2017 -0700 net: tulip: Constify tulip_tbl It looks like all users of tulip_tbl are reads, so mark this table as read-only. $ git grep tulip_tbl # edited to avoid line-wraps... interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ... interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs&~RxPollInt, ... interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ... interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs | TimerInt, pnic.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); tulip.h: extern struct tulip_chip_table tulip_tbl[]; tulip_core.c:struct tulip_chip_table tulip_tbl[] = { tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR5); tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer, tulip_core.c:const char *chip_name = tulip_tbl[chip_idx].chip_name; tulip_core.c:if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) tulip_core.c:ioaddr = pci_iomap(..., tulip_tbl[chip_idx].io_size); tulip_core.c:tp->flags = tulip_tbl[chip_idx].flags; tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer, tulip_core.c:INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task); Cc: "David S. Miller" Cc: Jarod Wilson Cc: "Gustavo A. R. Silva" 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/tulip.h | 2 +- drivers/net/ethernet/dec/tulip/tulip_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e333ac1f1db09e37425c90bb6cf3dec721a6d71d Author: Ivan Khoronzhuk Date: Thu Sep 7 18:32:30 2017 +0300 net: ethernet: ti: netcp_core: no need in netif_napi_del Don't remove rx_napi specifically just before free_netdev(), it's supposed to be done in it and is confusing w/o tx_napi deletion. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 1 - 1 file changed, 1 deletion(-) commit 0fdbedc7ddfc22e5a6e9596dd01b0dd922bf142c Author: Mathieu Malaterre Date: Thu Sep 7 13:24:20 2017 +0200 davicom: Display proper debug level up to 6 This will make it explicit some messages are of the form: dm9000_dbg(db, 5, ... Signed-off-by: Mathieu Malaterre Signed-off-by: David S. Miller drivers/net/ethernet/davicom/dm9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25ee079371640573bbb22ab04ca5fe7a6e9842cf Author: Baruch Siach Date: Thu Sep 7 12:25:50 2017 +0300 net: phy: sfp: rename dt properties to match the binding Make the Rx rate select control gpio property name match the documented binding. This would make the addition of 'rate-select1-gpios' for SFP+ support more natural. Also, make the MOD-DEF0 gpio property name match the documentation. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ef3714000ad86e8b8fbdaa3abc4d468a8e98a79 Author: Baruch Siach Date: Thu Sep 7 12:25:49 2017 +0300 dt-binding: net: sfp binding documentation Add device-tree binding documentation SFP transceivers. Support for SFP transceivers has been recently introduced (drivers/net/phy/sfp.c). Signed-off-by: Baruch Siach Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/sff,sfp.txt | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 165da3585743076c2a9de6f12b0b31df846d7c01 Author: Baruch Siach Date: Thu Sep 7 12:25:48 2017 +0300 dt-bindings: add SFF vendor prefix Acked-by: Rob Herring Signed-off-by: Baruch Siach Signed-off-by: David S. Miller Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit c43593d81ab59b8ad24ee5545e098e30f742d461 Author: Baruch Siach Date: Thu Sep 7 11:09:59 2017 +0300 dt-bindings: net: don't confuse with generic PHY property This complements commit 9a94b3a4bd (dt-binding: phy: don't confuse with Ethernet phy properties). The generic PHY 'phys' property sometime appears in the same node with the Ethernet PHY 'phy' or 'phy-handle' properties. Add a warning in ethernet.txt to reduce confusion. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 18e1173d5f3615c8c2680853ba87830ad8a0febc Author: Haishuang Yan Date: Thu Sep 7 14:08:35 2017 +0800 ip6_tunnel: fix setting hop_limit value for ipv6 tunnel Similar to vxlan/geneve tunnel, if hop_limit is zero, it should fall back to ip6_dst_hoplimt(). Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 1 + 1 file changed, 1 insertion(+) commit 0f693f1995cf002432b70f43ce73f79bf8d0b6c9 Author: Haishuang Yan Date: Thu Sep 7 14:08:34 2017 +0800 ip_tunnel: fix setting ttl and tos value in collect_md mode ttl and tos variables are declared and assigned, but are not used in iptunnel_xmit() function. Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel") Cc: Alexei Starovoitov Signed-off-by: Haishuang Yan Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87bf54bb43ddd385d2538b777324bf737f243042 Author: Sean Purcell Date: Wed Aug 9 19:42:36 2017 -0700 squashfs: Add zstd support Add zstd compression and decompression support to SquashFS. zstd is a great fit for SquashFS because it can compress at ratios approaching xz, while decompressing twice as fast as zlib. For SquashFS in particular, it can decompress as fast as lzo and lz4. It also has the flexibility to turn down the compression ratio for faster compression times. The compression benchmark is run on the file tree from the SquashFS archive found in ubuntu-16.10-desktop-amd64.iso [1]. It uses `mksquashfs` with the default block size (128 KB) and and various compression algorithms/levels. xz and zstd are also benchmarked with 256 KB blocks. The decompression benchmark times how long it takes to `tar` the file tree into `/dev/null`. See the benchmark file in the upstream zstd source repository located under `contrib/linux-kernel/squashfs-benchmark.sh` [2] for details. I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor, 16 GB of RAM, and a SSD. | Method | Ratio | Compression MB/s | Decompression MB/s | |----------------|-------|------------------|--------------------| | gzip | 2.92 | 15 | 128 | | lzo | 2.64 | 9.5 | 217 | | lz4 | 2.12 | 94 | 218 | | xz | 3.43 | 5.5 | 35 | | xz 256 KB | 3.53 | 5.4 | 40 | | zstd 1 | 2.71 | 96 | 210 | | zstd 5 | 2.93 | 69 | 198 | | zstd 10 | 3.01 | 41 | 225 | | zstd 15 | 3.13 | 11.4 | 224 | | zstd 16 256 KB | 3.24 | 8.1 | 210 | This patch was written by Sean Purcell , but I will be taking over the submission process. [1] http://releases.ubuntu.com/16.10/ [2] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/squashfs-benchmark.sh zstd source repository: https://github.com/facebook/zstd Signed-off-by: Sean Purcell Signed-off-by: Nick Terrell Signed-off-by: Chris Mason Acked-by: Phillip Lougher fs/squashfs/Kconfig | 14 +++++ fs/squashfs/Makefile | 1 + fs/squashfs/decompressor.c | 7 +++ fs/squashfs/decompressor.h | 4 ++ fs/squashfs/squashfs_fs.h | 1 + fs/squashfs/zstd_wrapper.c | 151 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 178 insertions(+) commit 196639ebbe63a037fe9a80669140bd292d8bcd80 Author: Trond Myklebust Date: Fri Sep 8 21:28:11 2017 -0400 NFS: Fix 2 use after free issues in the I/O code The writeback code wants to send a commit after processing the pages, which is why we want to delay releasing the struct path until after that's done. Also, the layout code expects that we do not free the inode before we've put the layout segments in pnfs_writehdr_free() and pnfs_readhdr_free() Fixes: 919e3bd9a875 ("NFS: Ensure we commit after writeback is complete") Fixes: 4714fb51fd03 ("nfs: remove pgio_header refcount, related cleanup") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust fs/nfs/internal.h | 1 - fs/nfs/pagelist.c | 26 ++++++++++++-------------- fs/nfs/pnfs.c | 2 -- 3 files changed, 12 insertions(+), 17 deletions(-) commit 0cfb6aee70bddbef6ec796b255f588ce0e126766 Author: Guillaume Knispel Date: Fri Sep 8 16:17:55 2017 -0700 ipc: optimize semget/shmget/msgget for lots of keys ipc_findkey() used to scan all objects to look for the wanted key. This is slow when using a high number of keys. This change adds an rhashtable of kern_ipc_perm objects in ipc_ids, so that one lookup cease to be O(n). This change gives a 865% improvement of benchmark reaim.jobs_per_min on a 56 threads Intel(R) Xeon(R) CPU E5-2695 v3 @ 2.30GHz with 256G memory [1] Other (more micro) benchmark results, by the author: On an i5 laptop, the following loop executed right after a reboot took, without and with this change: for (int i = 0, k=0x424242; i < KEYS; ++i) semget(k++, 1, IPC_CREAT | 0600); total total max single max single KEYS without with call without call with 1 3.5 4.9 µs 3.5 4.9 10 7.6 8.6 µs 3.7 4.7 32 16.2 15.9 µs 4.3 5.3 100 72.9 41.8 µs 3.7 4.7 1000 5,630.0 502.0 µs * * 10000 1,340,000.0 7,240.0 µs * * 31900 17,600,000.0 22,200.0 µs * * *: unreliable measure: high variance The duration for a lookup-only usage was obtained by the same loop once the keys are present: total total max single max single KEYS without with call without call with 1 2.1 2.5 µs 2.1 2.5 10 4.5 4.8 µs 2.2 2.3 32 13.0 10.8 µs 2.3 2.8 100 82.9 25.1 µs * 2.3 1000 5,780.0 217.0 µs * * 10000 1,470,000.0 2,520.0 µs * * 31900 17,400,000.0 7,810.0 µs * * Finally, executing each semget() in a new process gave, when still summing only the durations of these syscalls: creation: total total KEYS without with 1 3.7 5.0 µs 10 32.9 36.7 µs 32 125.0 109.0 µs 100 523.0 353.0 µs 1000 20,300.0 3,280.0 µs 10000 2,470,000.0 46,700.0 µs 31900 27,800,000.0 219,000.0 µs lookup-only: total total KEYS without with 1 2.5 2.7 µs 10 25.4 24.4 µs 32 106.0 72.6 µs 100 591.0 352.0 µs 1000 22,400.0 2,250.0 µs 10000 2,510,000.0 25,700.0 µs 31900 28,200,000.0 115,000.0 µs [1] http://lkml.kernel.org/r/20170814060507.GE23258@yexl-desktop Link: http://lkml.kernel.org/r/20170815194954.ck32ta2z35yuzpwp@debix Signed-off-by: Guillaume Knispel Reviewed-by: Marc Pardo Cc: Davidlohr Bueso Cc: Kees Cook Cc: Manfred Spraul Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: "Peter Zijlstra (Intel)" Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: Serge Hallyn Cc: Andrey Vagin Cc: Guillaume Knispel Cc: Marc Pardo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc.h | 3 ++ include/linux/ipc_namespace.h | 3 ++ ipc/msg.c | 10 +++-- ipc/namespace.c | 20 +++++++-- ipc/sem.c | 11 +++-- ipc/shm.c | 12 ++--- ipc/util.c | 100 ++++++++++++++++++++++++++++++++---------- ipc/util.h | 21 +++++---- 8 files changed, 130 insertions(+), 50 deletions(-) commit e4243b8062c13b8cb3d91695dc353cb9e6a0da25 Author: Davidlohr Bueso Date: Fri Sep 8 16:17:52 2017 -0700 ipc/sem: play nicer with large nsops allocations Replacing semop()'s kmalloc for kvmalloc was originally proposed by Manfred on the premise that it can be called for large (than order-1) sizes. For example, while Oracle recommends setting SEMOPM to a _minimum_ of 100, some distros[1] encourage the setting to be a factor of the amount of db tasks (PROCESSES), which can get fishy for large systems (easily going beyond 1000). [1] An Example of Semaphore Settings https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/sect-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores-An_Example_of_Semaphore_Settings.html So let's just convert this to kvmalloc, just like the rest of the allocations we do in ipc. While the fallback vmalloc obviously involves more overhead, this by far the uncommon path, and it's better for the user than just erroring out with kmalloc. Link: http://lkml.kernel.org/r/20170803184136.13855-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8419e64a0b734a1f98a07fc7c489495bebc6e33a Author: Davidlohr Bueso Date: Fri Sep 8 16:17:49 2017 -0700 ipc/sem: drop sem_checkid helper ... 'tis not used. Link: http://lkml.kernel.org/r/20170803184136.13855-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 2 -- 1 file changed, 2 deletions(-) commit 9405c03ee778cd3e353e55fff6e16dfdd9609c02 Author: Elena Reshetova Date: Fri Sep 8 16:17:45 2017 -0700 ipc: convert kern_ipc_perm.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. Link: http://lkml.kernel.org/r/1499417992-3238-4-git-send-email-elena.reshetova@intel.com Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Cc: "Eric W. Biederman" Cc: Ingo Molnar Cc: Alexey Dobriyan Cc: Serge Hallyn Cc: Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc.h | 3 ++- ipc/util.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit f74370b86ec1e0ee8a56ba838efe78e21d8dba23 Author: Elena Reshetova Date: Fri Sep 8 16:17:42 2017 -0700 ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Link: http://lkml.kernel.org/r/1499417992-3238-3-git-send-email-elena.reshetova@intel.com Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Cc: "Eric W. Biederman" Cc: Ingo Molnar Cc: Alexey Dobriyan Cc: Serge Hallyn Cc: Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2e0602c36ed9fe042714694dd5a889ecd8cb556 Author: Elena Reshetova Date: Fri Sep 8 16:17:38 2017 -0700 ipc: convert ipc_namespace.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Link: http://lkml.kernel.org/r/1499417992-3238-2-git-send-email-elena.reshetova@intel.com Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Cc: "Eric W. Biederman" Cc: Ingo Molnar Cc: Alexey Dobriyan Cc: Serge Hallyn Cc: Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc_namespace.h | 5 +++-- ipc/msgutil.c | 2 +- ipc/namespace.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 7483e5d420d9d5aa1732c5efb0da59e095a8b24e Author: Dmitry Vyukov Date: Fri Sep 8 16:17:35 2017 -0700 kcov: support compat processes Support compat processes in KCOV by providing compat_ioctl callback. Compat mode uses the same ioctl callback: we have 2 commands that do not use the argument and 1 that already checks that the arg does not overflow INT_MAX. This allows to use KCOV-guided fuzzing in compat processes. Link: http://lkml.kernel.org/r/20170823100553.55812-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 1 + 1 file changed, 1 insertion(+) commit 229cf16d3c8ac2e9b082c223fd0e619dc8f62cc1 Author: Krzysztof Kozlowski Date: Fri Sep 8 16:17:31 2017 -0700 sh: defconfig: cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); - MTD_CONCAT: commit f53fdebcc3e1 ("mtd: drop MTD_CONCAT from Kconfig entirely"); - MTD_PARTITIONS: commit 6a8a98b22b10 ("mtd: kill CONFIG_MTD_PARTITIONS"); - MTD_CHAR: commit 660685d9d1b4 ("mtd: merge mtdchar module with mtdcore"); - NETDEV_1000 and NETDEV_10000: commit f860b0522f65 ("drivers/net: Kconfig and Makefile cleanup"); NET_ETHERNET should be replaced with just ETHERNET but that is separate change; - HID_SUPPORT: commit 1f41a6a99476 ("HID: Fix the generic Kconfig options"); - RCU_CPU_STALL_DETECTOR: commit a00e0d714fbd ("rcu: Remove conditional compilation for RCU CPU stall warnings"); - SYSCTL_SYSCALL_CHECK: commit 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks"); - VIDEO_OUTPUT_CONTROL: commit f167a64e9d67 ("video / output: Drop display output class support"); - MISC_DEVICES: commit 7c5763b8453a ("drivers: misc: Remove MISC_DEVICES config option"); - AUTOFS_FS: commit 561c5cf9236a ("staging: Remove autofs3"); - IP_NF_QUEUE: commit 3dd6664fac7e ("netfilter: remove unused "config IP_NF_QUEUE""); - USB_DEVICE_CLASS: commit 007bab91324e ("USB: remove CONFIG_USB_DEVICE_CLASS"); - USB_LIBUSUAL: commit f61870ee6f8c ("usb: remove libusual"); - DISPLAY_SUPPORT: commit 5a6b5e02d673 ("fbdev: remove display subsystem"); - IP_NF_TARGET_ULOG: commit d4da843e6fad ("netfilter: kill remnants of ulog targets"); - IP6_NF_QUEUE: commit d16cf20e2f2f ("netfilter: remove ip_queue support"); - IP6_NF_TARGET_LOG: commit 6939c33a757b ("netfilter: merge ipt_LOG and ip6_LOG into xt_LOG"); Link: http://lkml.kernel.org/r/1500526846-4072-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/configs/ap325rxa_defconfig | 10 ---------- arch/sh/configs/apsh4a3a_defconfig | 9 --------- arch/sh/configs/apsh4ad0a_defconfig | 6 ------ arch/sh/configs/cayman_defconfig | 4 ---- arch/sh/configs/dreamcast_defconfig | 6 ------ arch/sh/configs/ecovec24-romimage_defconfig | 7 ------- arch/sh/configs/ecovec24_defconfig | 9 --------- arch/sh/configs/edosk7705_defconfig | 2 -- arch/sh/configs/edosk7760_defconfig | 11 ----------- arch/sh/configs/espt_defconfig | 10 ---------- arch/sh/configs/hp6xx_defconfig | 4 ---- arch/sh/configs/kfr2r09-romimage_defconfig | 5 ----- arch/sh/configs/kfr2r09_defconfig | 7 ------- arch/sh/configs/landisk_defconfig | 4 ---- arch/sh/configs/lboxre2_defconfig | 3 --- arch/sh/configs/magicpanelr2_defconfig | 9 --------- arch/sh/configs/microdev_defconfig | 3 --- arch/sh/configs/migor_defconfig | 8 -------- arch/sh/configs/polaris_defconfig | 9 --------- arch/sh/configs/r7780mp_defconfig | 4 ---- arch/sh/configs/r7785rp_defconfig | 3 --- arch/sh/configs/rsk7201_defconfig | 8 -------- arch/sh/configs/rsk7203_defconfig | 10 ---------- arch/sh/configs/rsk7264_defconfig | 3 --- arch/sh/configs/rsk7269_defconfig | 4 ---- arch/sh/configs/rts7751r2d1_defconfig | 5 ----- arch/sh/configs/rts7751r2dplus_defconfig | 8 -------- arch/sh/configs/sdk7780_defconfig | 9 --------- arch/sh/configs/sdk7786_defconfig | 9 --------- arch/sh/configs/se7206_defconfig | 8 -------- arch/sh/configs/se7343_defconfig | 9 --------- arch/sh/configs/se7619_defconfig | 5 ----- arch/sh/configs/se7705_defconfig | 5 ----- arch/sh/configs/se7712_defconfig | 7 ------- arch/sh/configs/se7721_defconfig | 6 ------ arch/sh/configs/se7722_defconfig | 3 --- arch/sh/configs/se7724_defconfig | 9 --------- arch/sh/configs/se7750_defconfig | 5 ----- arch/sh/configs/se7751_defconfig | 5 ----- arch/sh/configs/se7780_defconfig | 7 ------- arch/sh/configs/secureedge5410_defconfig | 9 --------- arch/sh/configs/sh03_defconfig | 4 ---- arch/sh/configs/sh2007_defconfig | 8 -------- arch/sh/configs/sh7710voipgw_defconfig | 5 ----- arch/sh/configs/sh7724_generic_defconfig | 3 --- arch/sh/configs/sh7757lcr_defconfig | 4 ---- arch/sh/configs/sh7763rdp_defconfig | 9 --------- arch/sh/configs/sh7770_generic_defconfig | 3 --- arch/sh/configs/sh7785lcr_32bit_defconfig | 10 ---------- arch/sh/configs/sh7785lcr_defconfig | 9 --------- arch/sh/configs/shmin_defconfig | 4 ---- arch/sh/configs/shx3_defconfig | 6 ------ arch/sh/configs/titan_defconfig | 8 -------- arch/sh/configs/ul2_defconfig | 9 --------- arch/sh/configs/urquell_defconfig | 9 --------- 55 files changed, 358 deletions(-) commit 6facfb1964aa63d3e4140eccc2a9fed99f7b384f Author: Krzysztof Kozlowski Date: Fri Sep 8 16:17:28 2017 -0700 mn10300: defconfig: cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); - MTD_PARTITIONS: commit 6a8a98b22b10 ("mtd: kill CONFIG_MTD_PARTITIONS"); - MTD_CHAR: commit 660685d9d1b4 ("mtd: merge mtdchar module with mtdcore"); - NETDEV_1000 and NETDEV_10000: commit f860b0522f65 ("drivers/net: Kconfig and Makefile cleanup"); NET_ETHERNET should be replaced with just ETHERNET but that is separate change; - HID_SUPPORT: commit 1f41a6a99476 ("HID: Fix the generic Kconfig options"); - RCU_CPU_STALL_DETECTOR: commit a00e0d714fbd ("rcu: Remove conditional compilation for RCU CPU stall warnings"); Link: http://lkml.kernel.org/r/1500526786-3789-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/configs/asb2303_defconfig | 6 ------ arch/mn10300/configs/asb2364_defconfig | 8 -------- 2 files changed, 14 deletions(-) commit 4ed2d967204d97bed3b49c259c239d01885db1a4 Author: Krzysztof Kozlowski Date: Fri Sep 8 16:17:25 2017 -0700 m32r: defconfig: cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - EXPERIMENTAL is gone since v3.9; - IP_NF_QUEUE: commit 3dd6664fac7e ("netfilter: remove unused "config IP_NF_QUEUE""); - IP_NF_TARGET_ULOG: commit d4da843e6fad ("netfilter: kill remnants of ulog targets"); - VIDEO_OUTPUT_CONTROL: commit f167a64e9d67 ("video / output: Drop display output class support"); - MTD_PARTITIONS: commit 6a8a98b22b10 ("mtd: kill CONFIG_MTD_PARTITIONS"); - MTD_CHAR: commit 660685d9d1b4 ("mtd: merge mtdchar module with mtdcore"); - MTD_CONCAT: commit f53fdebcc3e1 ("mtd: drop MTD_CONCAT from Kconfig entirely"); Link: http://lkml.kernel.org/r/1500527065-4575-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/configs/m32104ut_defconfig | 4 ---- arch/m32r/configs/m32700ut.smp_defconfig | 3 --- arch/m32r/configs/m32700ut.up_defconfig | 3 --- arch/m32r/configs/mappi.nommu_defconfig | 2 -- arch/m32r/configs/mappi.smp_defconfig | 4 ---- arch/m32r/configs/mappi.up_defconfig | 4 ---- arch/m32r/configs/mappi2.opsp_defconfig | 2 -- arch/m32r/configs/mappi2.vdec2_defconfig | 2 -- arch/m32r/configs/mappi3.smp_defconfig | 4 ---- arch/m32r/configs/oaks32r_defconfig | 2 -- arch/m32r/configs/opsput_defconfig | 2 -- arch/m32r/configs/usrv_defconfig | 5 ----- 12 files changed, 37 deletions(-) commit ab4f5260585e7e295eb68717131da11eaf40b239 Author: Robert P. J. Day Date: Fri Sep 8 16:17:22 2017 -0700 drivers/pps: use surrounding "if PPS" to remove numerous dependency checks Adding high-level "if PPS" makes lower-level dependency tests superfluous. Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1708261050500.8156@localhost.localdomain Signed-off-by: Robert P. J. Day Acked-by: Rodolfo Giometti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pps/Kconfig | 7 +++++-- drivers/pps/clients/Kconfig | 7 ++----- drivers/pps/generators/Kconfig | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) commit a2d818030135c293f878fbb772cf40e7a14c5acc Author: Robert P. J. Day Date: Fri Sep 8 16:17:19 2017 -0700 drivers/pps: aesthetic tweaks to PPS-related content Collection of aesthetic adjustments to various PPS-related files, directories and Documentation, some quite minor just for the sake of consistency, including: * Updated example of pps device tree node (courtesy Rodolfo G.) * "PPS-API" -> "PPS API" * "pps_source_info_s" -> "pps_source_info" * "ktimer driver" -> "pps-ktimer driver" * "ppstest /dev/pps0" -> "ppstest /dev/pps1" to match example * Add missing PPS-related entries to MAINTAINERS file * Other trivialities Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1708261048220.8106@localhost.localdomain Signed-off-by: Robert P. J. Day Acked-by: Rodolfo Giometti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/pps/pps-gpio.txt | 8 +++- Documentation/pps/pps.txt | 44 +++++++++++----------- MAINTAINERS | 3 ++ include/linux/pps-gpio.h | 2 +- include/linux/pps_kernel.h | 16 ++++---- include/uapi/linux/pps.h | 4 +- kernel/time/timekeeping.c | 2 +- 7 files changed, 43 insertions(+), 36 deletions(-) commit f22ef333c32cc683922d7e3361a83ebc31b2ac6d Author: Alexey Dobriyan Date: Fri Sep 8 16:17:15 2017 -0700 cpumask: make cpumask_next() out-of-line Every for_each_XXX_cpu() invocation calls cpumask_next() which is an inline function: static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) { /* -1 is a legal arg here. */ if (n != -1) cpumask_check(n); return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n + 1); } However! find_next_bit() is regular out-of-line function which means "nr_cpu_ids" load and increment happen at the caller resulting in a lot of bloat x86_64 defconfig: add/remove: 3/0 grow/shrink: 8/373 up/down: 155/-5668 (-5513) x86_64 allyesconfig-ish: add/remove: 3/1 grow/shrink: 57/634 up/down: 3515/-28177 (-24662) !!! Some archs redefine find_next_bit() but it is OK: m68k inline but SMP is not supported arm out-of-line unicore32 out-of-line Function call will happen anyway, so move load and increment into callee. Link: http://lkml.kernel.org/r/20170824230010.GA1593@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpumask.h | 15 +-------------- lib/cpumask.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) commit 0ce2c2029312ed78e37b56b08fa0f59ba97ef50b Author: Luis R. Rodriguez Date: Fri Sep 8 16:17:12 2017 -0700 kmod: move #ifdef CONFIG_MODULES wrapper to Makefile The entire file is now conditionally compiled only when CONFIG_MODULES is enabled, and this this is a bool. Just move this conditional to the Makefile as its easier to read this way. Link: http://lkml.kernel.org/r/20170810180618.22457-5-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: Dmitry Torokhov Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Guenter Roeck Cc: "Eric W. Biederman" Cc: Matt Redfearn Cc: Dan Carpenter Cc: Colin Ian King Cc: Daniel Mentz Cc: David Binderman Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/Makefile | 3 ++- kernel/kmod.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) commit c1f3fa2a4fde2818623b42e3f749bd478be5dec7 Author: Luis R. Rodriguez Date: Fri Sep 8 16:17:08 2017 -0700 kmod: split off umh headers into its own file In the future usermode helper users do not need to carry in all the of kmod headers declarations. Since kmod.h still includes umh.h this change has no functional changes, each umh user can be cleaned up separately later and with time. Link: http://lkml.kernel.org/r/20170810180618.22457-4-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: Dmitry Torokhov Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Guenter Roeck Cc: "Eric W. Biederman" Cc: Matt Redfearn Cc: Dan Carpenter Cc: Colin Ian King Cc: Daniel Mentz Cc: David Binderman Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1 + include/linux/kmod.h | 60 +-------------------------------------------- include/linux/umh.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 59 deletions(-) commit 00653d3aba6461ac9c882b8756b0666fd828a4a5 Author: Luis R. Rodriguez Date: Fri Sep 8 16:17:04 2017 -0700 MAINTAINERS: clarify kmod is just a kernel module loader This should make it clearer what the kmod code is now that the umh code is split out separately. Link: http://lkml.kernel.org/r/20170810180618.22457-3-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: Dmitry Torokhov Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Guenter Roeck Cc: "Eric W. Biederman" Cc: Matt Redfearn Cc: Dan Carpenter Cc: Colin Ian King Cc: Daniel Mentz Cc: David Binderman Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 235586939d7fe4833ada9e988f92af543ee6851f Author: Luis R. Rodriguez Date: Fri Sep 8 16:17:00 2017 -0700 kmod: split out umh code into its own file Patch series "kmod: few code cleanups to split out umh code" The usermode helper has a provenance from the old usb code which first required a usermode helper. Eventually this was shoved into kmod.c and the kernel's modprobe calls was converted over eventually to share the same code. Over time the list of usermode helpers in the kernel has grown -- so kmod is just but one user of the API. This series is a simple logical cleanup which acknowledges the code evolution of the usermode helper and shoves the UMH API into its own dedicated file. This way users of the API can later just include umh.h instead of kmod.h. Note despite the diff state the first patch really is just a code shove, no functional changes are done there. I did use git format-patch -M to generate the patch, but in the end the split was not enough for git to consider it a rename hence the large diffstat. I've put this through 0-day and it gives me their machine compilation blessings with all tests as OK. This patch (of 4): There's a slew of usermode helper users and kmod is just one of them. Split out the usermode helper code into its own file to keep the logic and focus split up. This change provides no functional changes. Link: http://lkml.kernel.org/r/20170810180618.22457-2-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Kees Cook Cc: Dmitry Torokhov Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Guenter Roeck Cc: "Eric W. Biederman" Cc: Matt Redfearn Cc: Dan Carpenter Cc: Colin Ian King Cc: Daniel Mentz Cc: David Binderman Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 6 + kernel/Makefile | 2 +- kernel/kmod.c | 560 +------------------------------------------------------ kernel/umh.c | 568 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 577 insertions(+), 559 deletions(-) commit 52c270d358b636d332114ac31e572970c5d0c4df Author: Dan Carpenter Date: Fri Sep 8 16:16:57 2017 -0700 test_kmod: flip INT checks to be consistent Most checks will check for min and then max, except the int check. Flip the checks to be consistent with the other code. [mcgrof@kernel.org: massaged commit log] Link: http://lkml.kernel.org/r/20170802211707.28020-3-mcgrof@kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Luis R. Rodriguez Cc: Dmitry Torokhov Cc: Kees Cook Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Eric W. Biederman Cc: Shuah Khan Cc: Colin Ian King Cc: David Binderman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f520409cfd3844660cedef8dc560ed0443e7f192 Author: Dan Carpenter Date: Fri Sep 8 16:16:53 2017 -0700 test_kmod: remove paranoid UINT_MAX check on uint range processing The UINT_MAX comparison is not needed because "max" is already an unsigned int, and we expect developer C code max value input to have a sensible 0 - UINT_MAX range. Note that if it so happens to be UINT_MAX + 1 it would lead to an issue, but we expect the developer to know this. [mcgrof@kernel.org: massaged commit log] Link: http://lkml.kernel.org/r/20170802211707.28020-2-mcgrof@kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Luis R. Rodriguez Cc: Dmitry Torokhov Cc: Kees Cook Cc: Jessica Yu Cc: Rusty Russell Cc: Michal Marek Cc: Petr Mladek Cc: Miroslav Benes Cc: Josh Poimboeuf Cc: Eric W. Biederman Cc: Shuah Khan Cc: Colin Ian King Cc: David Binderman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5680db4b661426d2d7315619a173b810e2dcf386 Author: OGAWA Hirofumi Date: Fri Sep 8 16:16:50 2017 -0700 vfat: deduplicate hex2bin() We may use hex2bin() instead of custom approach. Link: http://lkml.kernel.org/r/87zibktpil.fsf@devron Signed-off-by: Andy Shevchenko Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/namei_vfat.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit b9fa2ad1edbaffc837a943fd206f53c36443e7b5 Author: Tomohiro Kusumi Date: Fri Sep 8 16:16:47 2017 -0700 autofs: use unsigned int/long instead of uint/ulong for ioctl args The standard types unsigned int and unsigned long should be used for .compat_ioctl. autofs is the only fs using uing/ulong for this, and these are even the only uint/ulong in the entire autofs code. Drop unneeded long cast in return value of autofs_dev_ioctl_compat(). It's already long. Link: http://lkml.kernel.org/r/150285069709.4670.3884827966280147529.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7ed1da84b3d88ce080ee89a26e8885c9509d1d2d Author: Tomohiro Kusumi Date: Fri Sep 8 16:16:43 2017 -0700 autofs: drop wrong comment This comment was correct when it was added in 8d7b48e0 ("autofs4: add miscellaneous device for ioctls") in 2008, but not after 4e44b685 "Get rid of path_lookup in autofs4" in 2009 which introduced find_autofs_mount(). Link: http://lkml.kernel.org/r/150285069148.4670.17959501481201077445.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 5 ----- 1 file changed, 5 deletions(-) commit 718b303b49893d8f9dd469f710d76f77673bd35d Author: Tomohiro Kusumi Date: Fri Sep 8 16:16:40 2017 -0700 autofs: use AUTOFS_DEV_IOCTL_SIZE Use a macro which defines misc-dev ioctl parameter size (excluding a path beyond &path[0]) since it's been used to initialize and copy this structure ever since it first appeared in 8d7b48e0 in 2008. (or simply get rid of this if this is just unnecessary abstraction when all it needs is sizeof(struct autofs_dev_ioctl)) Edit: raven@themaw.net That's a good point but I'd prefer to keep the macro define. End edit: raven@themaw.net Link: http://lkml.kernel.org/r/150285068577.4670.2599968823770600622.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ed837d0901750e5e654d3949d6064c87a78e33d9 Author: Tomohiro Kusumi Date: Fri Sep 8 16:16:37 2017 -0700 autofs: non functional header inclusion cleanup Having header includes before any macro (without any dependency) simply looks normal. No reason to have these macros in between. Link: http://lkml.kernel.org/r/150285068011.4670.10271483982093996996.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1f28c5d055032e7e8ee5e48198dca7e125d0eec6 Author: Tomohiro Kusumi Date: Fri Sep 8 16:16:34 2017 -0700 autofs: remove unused AUTOFS_IOC_EXPIRE_DIRECT/INDIRECT These are not used by either kernel or userspace, although AUTOFS_IOC_EXPIRE_DIRECT once seems to have been used by userspace in around 2006-2008, which was technically just an alias of the existing ioctl AUTOFS_IOC_EXPIRE_MULTI. ioctls for autofs are already complicated enough that they could be removed unless these are staying here to be able to compile userspace code of certain period of time from a decade ago. Edit: raven@themaw.net Yes, this is indeed very old and anything that still uses must be updated becuase it will be using broken functionality. End edit: raven@themaw.net Link: http://lkml.kernel.org/r/150285067347.4670.11494624644273072003.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/auto_fs4.h | 2 -- 1 file changed, 2 deletions(-) commit 3dd8f7c3b78b9556582fd64bf5c9986723f9dca1 Author: Ian Kent Date: Fri Sep 8 16:16:30 2017 -0700 autofs: make dev ioctl version and ismountpoint user accessible Some of the autofs miscellaneous device ioctls need to be accessable to user space applications without CAP_SYS_ADMIN to get information about autofs mounts. Link: http://lkml.kernel.org/r/150216642517.11652.2338933266137331637.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 12 ++++++++---- include/uapi/linux/auto_dev-ioctl.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) commit e54c7bcbf14a25dc3a913b4c808b52121c522e9b Author: Ian Kent Date: Fri Sep 8 16:16:27 2017 -0700 autofs: make disc device user accessible The autofs miscellanous device ioctls that shouldn't require CAP_SYS_ADMIN need to be accessible to user space applications in order to be able to get information about autofs mounts. The module checks capabilities so the miscelaneous device should be fine with broad permissions. Link: http://lkml.kernel.org/r/150216641928.11652.7388977863125547969.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42f46148217865a545e129612075f3d828a2c4e4 Author: Ian Kent Date: Fri Sep 8 16:16:24 2017 -0700 autofs: fix AT_NO_AUTOMOUNT not being honored The fstatat(2) and statx() calls can pass the flag AT_NO_AUTOMOUNT which is meant to clear the LOOKUP_AUTOMOUNT flag and prevent triggering of an automount by the call. But this flag is unconditionally cleared for all stat family system calls except statx(). stat family system calls have always triggered mount requests for the negative dentry case in follow_automount() which is intended but prevents the fstatat(2) and statx() AT_NO_AUTOMOUNT case from being handled. In order to handle the AT_NO_AUTOMOUNT for both system calls the negative dentry case in follow_automount() needs to be changed to return ENOENT when the LOOKUP_AUTOMOUNT flag is clear (and the other required flags are clear). AFAICT this change doesn't have any noticable side effects and may, in some use cases (although I didn't see it in testing) prevent unnecessary callbacks to the automount daemon. It's also possible that a stat family call has been made with a path that is in the process of being mounted by some other process. But stat family calls should return the automount state of the path as it is "now" so it shouldn't wait for mount completion. This is the same semantic as the positive dentry case already handled. Link: http://lkml.kernel.org/r/150216641255.11652.4204561328197919771.stgit@pluto.themaw.net Fixes: deccf497d804a4c5fca ("Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx()") Signed-off-by: Ian Kent Cc: David Howells Cc: Colin Walters Cc: Ondrej Holy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/namei.c | 15 ++++++++++++--- include/linux/fs.h | 3 +-- 2 files changed, 13 insertions(+), 5 deletions(-) commit 33d72f3822d7ff8a9e45bd7413c811085cb87aa5 Author: Daniel Micay Date: Fri Sep 8 16:16:20 2017 -0700 init/main.c: extract early boot entropy from the passed cmdline Feed the boot command-line as to the /dev/random entropy pool Existing Android bootloaders usually pass data which may not be known by an external attacker on the kernel command-line. It may also be the case on other embedded systems. Sample command-line from a Google Pixel running CopperheadOS.... console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=sailfish user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff buildvariant=user veritykeyid=id:dfcb9db0089e5b3b4090a592415c28e1cb4545ab androidboot.bootdevice=624000.ufshc androidboot.verifiedbootstate=yellow androidboot.veritymode=enforcing androidboot.keymaster=1 androidboot.serialno=FA6CE0305299 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_samsung_ea8064tg_1080p_cmd:1:none:cfg:single_dsi androidboot.slot_suffix=_b fpsimd.fpsimd_settings=0 app_setting.use_app_setting=0 kernelflag=0x00000000 debugflag=0x00000000 androidboot.hardware.revision=PVT radioflag=0x00000000 radioflagex1=0x00000000 radioflagex2=0x00000000 cpumask=0x00000000 androidboot.hardware.ddr=4096MB,Hynix,LPDDR4 androidboot.ddrinfo=00000006 androidboot.ddrsize=4GB androidboot.hardware.color=GRA00 androidboot.hardware.ufs=32GB,Samsung androidboot.msm.hw_ver_id=268824801 androidboot.qf.st=2 androidboot.cid=11111111 androidboot.mid=G-2PW4100 androidboot.bootloader=8996-012001-1704121145 androidboot.oem_unlock_support=1 androidboot.fp_src=1 androidboot.htc.hrdump=detected androidboot.ramdump.opt=mem@2g:2g,mem@4g:2g androidboot.bootreason=reboot androidboot.ramdump_enable=0 ro root=/dev/dm-0 dm="system none ro,0 1 android-verity /dev/sda34" rootwait skip_initramfs init=/init androidboot.wificountrycode=US androidboot.boottime=1BLL:85,1BLE:669,2BLL:0,2BLE:1777,SW:6,KL:8136 Among other things, it contains a value unique to the device (androidboot.serialno=FA6CE0305299), unique to the OS builds for the device variant (veritykeyid=id:dfcb9db0089e5b3b4090a592415c28e1cb4545ab) and timings from the bootloader stages in milliseconds (androidboot.boottime=1BLL:85,1BLE:669,2BLL:0,2BLE:1777,SW:6,KL:8136). [tytso@mit.edu: changelog tweak] [labbott@redhat.com: line-wrapped command line] Link: http://lkml.kernel.org/r/20170816231458.2299-3-labbott@redhat.com Signed-off-by: Daniel Micay Signed-off-by: Laura Abbott Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Laura Abbott Cc: Nick Kralevich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 121388a31362b0d3176dc1190ac8064b98a61b20 Author: Laura Abbott Date: Fri Sep 8 16:16:17 2017 -0700 init: move stack canary initialization after setup_arch Patch series "Command line randomness", v3. A series to add the kernel command line as a source of randomness. This patch (of 2): Stack canary intialization involves getting a random number. Getting this random number may involve accessing caches or other architectural specific features which are not available until after the architecture is setup. Move the stack canary initialization later to accommodate this. Link: http://lkml.kernel.org/r/20170816231458.2299-2-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Laura Abbott Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Daniel Micay Cc: Nick Kralevich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9367bb730e4d9d85a8911a08a3542ec2aa873d37 Author: Markus Elfring Date: Fri Sep 8 16:16:14 2017 -0700 binfmt_flat: delete two error messages for a failed memory allocation in decompress_exec() Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/f92aac79-b05e-321a-1a19-d38c7159ee9c@users.sourceforge.net Signed-off-by: Markus Elfring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_flat.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0547fa5851c921eb1f64286f6b2ae7ab5df24e6e Author: Jean Delvare Date: Fri Sep 8 16:16:11 2017 -0700 checkpatch: add 6 missing types to --list-types Unlike all other types, LONG_LINE, LONG_LINE_COMMENT and LONG_LINE_STRING are passed to WARN() through a variable. This causes the parser in list_types() to miss them and consequently they are not present in the output of --list-types. Additionally, types TYPO_SPELLING, FSF_MAILING_ADDRESS and AVOID_BUG are passed with a variable level, causing the parser to miss them too. So modify the regex to also catch these special cases. Link: http://lkml.kernel.org/r/20170902175610.7e4a7c9d@endymion Fixes: 3beb42eced39 ("checkpatch: add --list-types to show message types to show or ignore") Signed-off-by: Jean Delvare Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0675a8fbd71c1a0b605ce82adea37131452f1070 Author: Jean Delvare Date: Fri Sep 8 16:16:07 2017 -0700 checkpatch: rename variables to avoid confusion The variable name "$msg_type" is sometimes used to set the message type, and sometimes used to set the message level. This works but is kind of confusing. Use "$msg_level" in the latter case instead, to make the code clearer. Link: http://lkml.kernel.org/r/20170902175345.175db33a@endymion Signed-off-by: Jean Delvare Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit ab1ecabf4fdbd80b9d4ab7eacfd318c517b3f8f4 Author: Jean Delvare Date: Fri Sep 8 16:16:04 2017 -0700 checkpatch: fix typo in comment Link: http://lkml.kernel.org/r/20170902175249.15bb77f2@endymion Signed-off-by: Jean Delvare 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 63b7c73ec86b8c73560d22c7552bc6f47f0b8da9 Author: Joe Perches Date: Fri Sep 8 16:16:01 2017 -0700 checkpatch: add --strict check for ifs with unnecessary parentheses An if statement test like if ((foo == bar) && (baz != qux)) can arguably be better written without the parentheses as if (foo == bar && baz != qux) Add a test to find these cases. Link: http://lkml.kernel.org/r/dcd0561ddd0fa43c51a420d53b550d738bf42001.1502734458.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit afdb05e9d61905220f09268535235288e6ba3a16 Author: Takashi Iwai Date: Fri Sep 8 16:15:58 2017 -0700 lib/oid_registry.c: X.509: fix the buffer overflow in the utility function for OID string The sprint_oid() utility function doesn't properly check the buffer size that it causes that the warning in vsnprintf() be triggered. For example on v4.1 kernel: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2357 at lib/vsprintf.c:1867 vsnprintf+0x5a7/0x5c0() ... We can trigger this issue by injecting maliciously crafted x509 cert in DER format. Just using hex editor to change the length of OID to over the length of the SEQUENCE container. For example: 0:d=0 hl=4 l= 980 cons: SEQUENCE 4:d=1 hl=4 l= 700 cons: SEQUENCE 8:d=2 hl=2 l= 3 cons: cont [ 0 ] 10:d=3 hl=2 l= 1 prim: INTEGER :02 13:d=2 hl=2 l= 9 prim: INTEGER :9B47FAF791E7D1E3 24:d=2 hl=2 l= 13 cons: SEQUENCE 26:d=3 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption 37:d=3 hl=2 l= 0 prim: NULL 39:d=2 hl=2 l= 121 cons: SEQUENCE 41:d=3 hl=2 l= 22 cons: SET 43:d=4 hl=2 l= 20 cons: SEQUENCE <=== the SEQ length is 20 45:d=5 hl=2 l= 3 prim: OBJECT :organizationName <=== the original length is 3, change the length of OID to over the length of SEQUENCE Pawel Wieczorkiewicz reported this problem and Takashi Iwai provided patch to fix it by checking the bufsize in sprint_oid(). Link: http://lkml.kernel.org/r/20170903021646.2080-1-jlee@suse.com Signed-off-by: Takashi Iwai Signed-off-by: "Lee, Chun-Yi" Reported-by: Pawel Wieczorkiewicz Cc: David Howells Cc: Rusty Russell Cc: Pawel Wieczorkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/oid_registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc9ae2247ac92fd4d962507bafa3afffff6660ff Author: Eric Dumazet Date: Fri Sep 8 16:15:54 2017 -0700 radix-tree: must check __radix_tree_preload() return value __radix_tree_preload() only disables preemption if no error is returned. So we really need to make sure callers always check the return value. idr_preload() contract is to always disable preemption, so we need to add a missing preempt_disable() if an error happened. Similarly, ida_pre_get() only needs to call preempt_enable() in the case no error happened. Link: http://lkml.kernel.org/r/1504637190.15310.62.camel@edumazet-glaptop3.roam.corp.google.com Fixes: 0a835c4f090a ("Reimplement IDR and IDA using the radix tree") Fixes: 7ad3d4d85c7a ("ida: Move ida_bitmap to a percpu variable") Signed-off-by: Eric Dumazet Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7c61bd6983b185272315722787cceacf5f5d2e7d Author: Baoquan He Date: Fri Sep 8 16:15:51 2017 -0700 lib/cmdline.c: remove meaningless comment One line of code was commented out by c++ style comment for debugging, but forgot removing it. Clean it up. Link: http://lkml.kernel.org/r/1503312113-11843-1-git-send-email-bhe@redhat.com Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/cmdline.c | 1 - 1 file changed, 1 deletion(-) commit da436528267ab45fb44ee52a28ebac85b8e24c3d Author: Dan Carpenter Date: Fri Sep 8 16:15:48 2017 -0700 lib/string.c: check for kmalloc() failure This is mostly to keep the number of static checker warnings down so we can spot new bugs instead of them being drowned in noise. This function doesn't return normal kernel error codes but instead the return value is used to display exactly which memory failed. I chose -1 as hopefully that's a helpful thing to print. Link: http://lkml.kernel.org/r/20170817115420.uikisjvfmtrqkzjn@mwanda Signed-off-by: Dan Carpenter Cc: Matthew Wilcox Cc: Stephen Rothwell Cc: Kees Cook Cc: Bjorn Helgaas Cc: Mauro Carvalho Chehab Cc: Heikki Krogerus Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/string.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 895a60728f83684e738cce34d7d4e64631505ae4 Author: Davidlohr Bueso Date: Fri Sep 8 16:15:45 2017 -0700 lib/rhashtable: fix comment on locks_mul default value As of commit 4cf0b354d92 ("rhashtable: avoid large lock-array allocations"), the default value for the locks multiplier was reduced from 128 to 32. Update the header file to reflect this. Link: http://lkml.kernel.org/r/20170815215401.30745-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Florian Westphal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rhashtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60ef690018b262ddcd0d51edf10e40710deb9c9f Author: Yury Norov Date: Fri Sep 8 16:15:41 2017 -0700 bitmap: introduce BITMAP_FROM_U64() The macro is the compile-time analogue of bitmap_from_u64() with the same purpose: convert the 64-bit number to the properly ordered pair of 32-bit parts, suitable for filling the bitmap in 32-bit BE environment. Use it to make test_bitmap_parselist() correct for 32-bit BE ABIs. Tested on BE mips/qemu. [akpm@linux-foundation.org: tweak code comment] Link: http://lkml.kernel.org/r/20170810172916.24144-1-ynorov@caviumnetworks.com Signed-off-by: Yury Norov Cc: Noam Camus Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitmap.h | 32 ++++++++++++++++++++++++++++++++ lib/test_bitmap.c | 47 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 64 insertions(+), 15 deletions(-) commit 6df0d464dbcc1a55d10ded413beda167cb3c71b0 Author: Yury Norov Date: Fri Sep 8 16:15:38 2017 -0700 lib/test_bitmap.c: add test for bitmap_parselist() Do some basic checks for bitmap_parselist(). [akpm@linux-foundation.org: fix printk warning] Link: http://lkml.kernel.org/r/20170807225438.16161-2-ynorov@caviumnetworks.com Signed-off-by: Yury Norov Cc: Noam Camus Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_bitmap.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 0a5ce0831d04382aa9e2420e33dff958ddade542 Author: Yury Norov Date: Fri Sep 8 16:15:34 2017 -0700 lib/bitmap.c: make bitmap_parselist() thread-safe and much faster Current implementation of bitmap_parselist() uses a static variable to save local state while setting bits in the bitmap. It is obviously wrong if we assume execution in multiprocessor environment. Fortunately, it's possible to rewrite this portion of code to avoid using the static variable. It is also possible to set bits in the mask per-range with bitmap_set(), not per-bit, as it is implemented now, with set_bit(); which is way faster. The important side effect of this change is that setting bits in this function from now is not per-bit atomic and less memory-ordered. This is because set_bit() guarantees the order of memory accesses, while bitmap_set() does not. I think that it is the advantage of the new approach, because the bitmap_parselist() is intended to initialise bit arrays, and user should protect the whole bitmap during initialisation if needed. So protecting individual bits looks expensive and useless. Also, other range-oriented functions in lib/bitmap.c don't worry much about atomicity. With all that, setting 2k bits in map with the pattern like 0-2047:128/256 becomes ~50 times faster after applying the patch in my testing environment (arm64 hosted on qemu). The second patch of the series adds the test for bitmap_parselist(). It's not intended to cover all tricky cases, just to make sure that I didn't screw up during rework. Link: http://lkml.kernel.org/r/20170807225438.16161-1-ynorov@caviumnetworks.com Signed-off-by: Yury Norov Cc: Noam Camus Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/bitmap.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit e4dace3615526fd66c86dd535ee4bc9e8c706e37 Author: Florian Fainelli Date: Fri Sep 8 16:15:31 2017 -0700 lib: add test module for CONFIG_DEBUG_VIRTUAL Add a test module that allows testing that CONFIG_DEBUG_VIRTUAL works correctly, at least that it can catch invalid calls to virt_to_phys() against the non-linear kernel virtual address map. Link: http://lkml.kernel.org/r/20170808164035.26725-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli Cc: "Luis R. Rodriguez" Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 11 +++++++++++ lib/Makefile | 1 + lib/test_debug_virtual.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) commit 9888a588ea96ba2804f955bbc2667346719da887 Author: Andy Shevchenko Date: Fri Sep 8 16:15:28 2017 -0700 lib/hexdump.c: return -EINVAL in case of error in hex2bin() In some cases caller would like to use error code directly without shadowing. -EINVAL feels a rightful code to return in case of error in hex2bin(). Link: http://lkml.kernel.org/r/20170731135510.68023-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Arnd Bergmann Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/hexdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f0f1a45f95e85a8ac28c4d62bf2a84db0799efab Author: Davidlohr Bueso Date: Fri Sep 8 16:15:25 2017 -0700 block/cfq: cache rightmost rb_node For the same reasons we already cache the leftmost pointer, apply the same optimization for rb_last() calls. Users must explicitly do this as rb_root_cached only deals with the smallest node. [dave@stgolabs.net: brain fart #1] Link: http://lkml.kernel.org/r/20170731155955.GD21328@linux-80c1.suse Link: http://lkml.kernel.org/r/20170719014603.19029-18-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/cfq-iosched.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit fa90b2fd300f38cc7b3e416974116c83f3953465 Author: Davidlohr Bueso Date: Fri Sep 8 16:15:21 2017 -0700 mem/memcg: cache rightmost node Such that we can optimize __mem_cgroup_largest_soft_limit_node(). The only overhead is the extra footprint for the cached pointer, but this should not be an issue for mem_cgroup_tree_per_node. [dave@stgolabs.net: brain fart #2] Link: http://lkml.kernel.org/r/20170731160114.GE21328@linux-80c1.suse Link: http://lkml.kernel.org/r/20170719014603.19029-17-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit b2ac2ea6296e7dd779168eb085b09d0fab9d1294 Author: Davidlohr Bueso Date: Fri Sep 8 16:15:18 2017 -0700 fs/epoll: use faster rb_first_cached() ... such that we can avoid the tree walks to get the node with the smallest key. Semantically the same, as the previously used rb_first(), but O(1). The main overhead is the extra footprint for the cached rb_node pointer, which should not matter for epoll. Link: http://lkml.kernel.org/r/20170719014603.19029-15-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 410bd5ecb276593e7ec1552014083215d4a43c3a Author: Davidlohr Bueso Date: Fri Sep 8 16:15:15 2017 -0700 procfs: use faster rb_first_cached() ... such that we can avoid the tree walks to get the node with the smallest key. Semantically the same, as the previously used rb_first(), but O(1). The main overhead is the extra footprint for the cached rb_node pointer, which should not matter for procfs. Link: http://lkml.kernel.org/r/20170719014603.19029-14-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 26 ++++++++++++++------------ fs/proc/internal.h | 2 +- fs/proc/proc_net.c | 2 +- fs/proc/root.c | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) commit f2686bb48618718c7141f117e2d607594e959bfc Author: Davidlohr Bueso Date: Fri Sep 8 16:15:12 2017 -0700 lib/interval-tree: correct comment wrt generic flavor interval_tree.h _is_ the generic flavor. Link: http://lkml.kernel.org/r/20170719014603.19029-13-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/interval_tree_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f808c13fd3738948e10196496959871130612b61 Author: Davidlohr Bueso Date: Fri Sep 8 16:15:08 2017 -0700 lib/interval_tree: fast overlap detection Allow interval trees to quickly check for overlaps to avoid unnecesary tree lookups in interval_tree_iter_first(). As of this patch, all interval tree flavors will require using a 'rb_root_cached' such that we can have the leftmost node easily available. While most users will make use of this feature, those with special functions (in addition to the generic insert, delete, search calls) will avoid using the cached option as they can do funky things with insertions -- for example, vma_interval_tree_insert_after(). [jglisse@redhat.com: fix deadlock from typo vm_lock_anon_vma()] Link: http://lkml.kernel.org/r/20170808225719.20723-1-jglisse@redhat.com Link: http://lkml.kernel.org/r/20170719014603.19029-12-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Jérôme Glisse Acked-by: Christian König Acked-by: Peter Zijlstra (Intel) Acked-by: Doug Ledford Acked-by: Michael S. Tsirkin Cc: David Airlie Cc: Jason Wang Cc: Christian Benvenuti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- drivers/gpu/drm/drm_mm.c | 19 +++++---- drivers/gpu/drm/drm_vma_manager.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 6 +-- drivers/gpu/drm/radeon/radeon.h | 2 +- drivers/gpu/drm/radeon/radeon_mn.c | 8 ++-- drivers/gpu/drm/radeon/radeon_vm.c | 7 ++-- drivers/infiniband/core/umem_rbtree.c | 4 +- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/hw/hfi1/mmu_rb.c | 10 ++--- drivers/infiniband/hw/usnic/usnic_uiom.c | 6 +-- drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +- .../infiniband/hw/usnic/usnic_uiom_interval_tree.c | 15 +++---- .../infiniband/hw/usnic/usnic_uiom_interval_tree.h | 12 +++--- drivers/vhost/vhost.c | 2 +- drivers/vhost/vhost.h | 2 +- fs/hugetlbfs/inode.c | 6 +-- fs/inode.c | 2 +- include/drm/drm_mm.h | 2 +- include/linux/fs.h | 4 +- include/linux/interval_tree.h | 8 ++-- include/linux/interval_tree_generic.h | 46 +++++++++++++++++----- include/linux/mm.h | 17 ++++---- include/linux/rmap.h | 4 +- include/rdma/ib_umem_odp.h | 11 ++++-- include/rdma/ib_verbs.h | 2 +- lib/interval_tree_test.c | 4 +- mm/interval_tree.c | 10 ++--- mm/memory.c | 4 +- mm/mmap.c | 10 ++--- mm/rmap.c | 4 +- 33 files changed, 145 insertions(+), 105 deletions(-) commit 09663c86e24953556ff8696efa023557901f2b66 Author: Davidlohr Bueso Date: Fri Sep 8 16:15:05 2017 -0700 block/cfq: replace cfq_rb_root leftmost caching ... with the generic rbtree flavor instead. No changes in semantics whatsoever. Link: http://lkml.kernel.org/r/20170719014603.19029-11-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Jan Kara Acked-by: Peter Zijlstra (Intel) Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/cfq-iosched.c | 70 +++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 50 deletions(-) commit a23ba907d5e65d6aeea3e59c82fda9cd206a7aad Author: Davidlohr Bueso Date: Fri Sep 8 16:15:01 2017 -0700 locking/rtmutex: replace top-waiter and pi_waiters leftmost caching ... with the generic rbtree flavor instead. No changes in semantics whatsoever. Link: http://lkml.kernel.org/r/20170719014603.19029-10-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/init_task.h | 5 ++--- include/linux/rtmutex.h | 11 +++++------ include/linux/sched.h | 3 +-- kernel/fork.c | 3 +-- kernel/locking/rtmutex-debug.c | 2 +- kernel/locking/rtmutex.c | 35 +++++++++++------------------------ kernel/locking/rtmutex_common.h | 12 ++++++------ 7 files changed, 27 insertions(+), 44 deletions(-) commit 2161573ecd6931565936cb66793b2d2bf805c088 Author: Davidlohr Bueso Date: Fri Sep 8 16:14:58 2017 -0700 sched/deadline: replace earliest dl and rq leftmost caching ... with the generic rbtree flavor instead. No changes in semantics whatsoever. Link: http://lkml.kernel.org/r/20170719014603.19029-9-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sched/deadline.c | 50 +++++++++++++++++++------------------------------ kernel/sched/sched.h | 6 ++---- 2 files changed, 21 insertions(+), 35 deletions(-) commit bfb068892d30dcf0a32b89302fe293347adeaaaa Author: Davidlohr Bueso Date: Fri Sep 8 16:14:55 2017 -0700 sched/fair: replace cfs_rq->rb_leftmost ... with the generic rbtree flavor instead. No changes in semantics whatsoever. Link: http://lkml.kernel.org/r/20170719014603.19029-8-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sched/debug.c | 2 +- kernel/sched/fair.c | 39 +++++++++++++-------------------------- kernel/sched/sched.h | 3 +-- 3 files changed, 15 insertions(+), 29 deletions(-) commit b10d43f9898e0b56f6cf2375093dbd2c5db54486 Author: Davidlohr Bueso Date: Fri Sep 8 16:14:52 2017 -0700 lib/rbtree_test.c: support rb_root_cached We can work with a single rb_root_cached root to test both cached and non-cached rbtrees. In addition, also add a test to measure latencies between rb_first and its fast counterpart. Link: http://lkml.kernel.org/r/20170719014603.19029-7-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rbtree_test.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 137 insertions(+), 19 deletions(-) commit 977bd8d5e1e61dc877c468e8937a4ab3094e53eb Author: Davidlohr Bueso Date: Fri Sep 8 16:14:49 2017 -0700 lib/rbtree_test.c: add (inorder) traversal test This adds a second test for regular rb-tree testing in that there is no need to repeat it for the augmented flavor. Link: http://lkml.kernel.org/r/20170719014603.19029-6-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rbtree_test.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 223f8911eace60c787f8767c25148b80ece9732a Author: Davidlohr Bueso Date: Fri Sep 8 16:14:46 2017 -0700 lib/rbtree_test.c: make input module parameters Allows for more flexible debugging. Link: http://lkml.kernel.org/r/20170719014603.19029-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rbtree_test.c | 55 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 21 deletions(-) commit 35dc67d7d922b2c9a1adb006c7a0f370eeb5c114 Author: Davidlohr Bueso Date: Fri Sep 8 16:14:42 2017 -0700 rbtree: add some additional comments for rebalancing cases While overall the code is very nicely commented, it might not be immediately obvious from the diagrams what is going on. Add a very brief summary of each case. Opposite cases where the node is the left child are left untouched. Link: http://lkml.kernel.org/r/20170719014603.19029-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rbtree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2aadf7fc7df9e70c99786ffb8452ccdd83d49e59 Author: Davidlohr Bueso Date: Fri Sep 8 16:14:39 2017 -0700 rbtree: optimize root-check during rebalancing loop The only times the nil-parent (root node) condition is true is when the node is the first in the tree, or after fixing rbtree rule #4 and the case 1 rebalancing made the node the root. Such conditions do not apply most of the time: (i) The common case in an rbtree is to have more than a single node, so this is only true for the first rb_insert(). (ii) While there is a chance only one first rotation is needed, cases where the node's uncle is black (cases 2,3) are more common as we can have the following scenarios during the rotation looping: case1 only, case1+1, case2+3, case1+2+3, case3 only, etc. This patch, therefore, adds an unlikely() optimization to this conditional. When profiling with CONFIG_PROFILE_ANNOTATED_BRANCHES, a kernel build shows that the incorrect rate is less than 15%, and for workloads that involve insert mostly trees overtime tend to have less than 2% incorrect rate. Link: http://lkml.kernel.org/r/20170719014603.19029-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rbtree.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit cd9e61ed1eebbcd5dfad59475d41ec58d9b64b6a Author: Davidlohr Bueso Date: Fri Sep 8 16:14:36 2017 -0700 rbtree: cache leftmost node internally Patch series "rbtree: Cache leftmost node internally", v4. A series to extending rbtrees to internally cache the leftmost node such that we can have fast overlap check optimization for all interval tree users[1]. The benefits of this series are that: (i) Unify users that do internal leftmost node caching. (ii) Optimize all interval tree users. (iii) Convert at least two new users (epoll and procfs) to the new interface. This patch (of 16): Red-black tree semantics imply that nodes with smaller or greater (or equal for duplicates) keys always be to the left and right, respectively. For the kernel this is extremely evident when considering our rb_first() semantics. Enabling lookups for the smallest node in the tree in O(1) can save a good chunk of cycles in not having to walk down the tree each time. To this end there are a few core users that explicitly do this, such as the scheduler and rtmutexes. There is also the desire for interval trees to have this optimization allowing faster overlap checking. This patch introduces a new 'struct rb_root_cached' which is just the root with a cached pointer to the leftmost node. The reason why the regular rb_root was not extended instead of adding a new structure was that this allows the user to have the choice between memory footprint and actual tree performance. The new wrappers on top of the regular rb_root calls are: - rb_first_cached(cached_root) -- which is a fast replacement for rb_first. - rb_insert_color_cached(node, cached_root, new) - rb_erase_cached(node, cached_root) In addition, augmented cached interfaces are also added for basic insertion and deletion operations; which becomes important for the interval tree changes. With the exception of the inserts, which adds a bool for updating the new leftmost, the interfaces are kept the same. To this end, porting rb users to the cached version becomes really trivial, and keeping current rbtree semantics for users that don't care about the optimization requires zero overhead. Link: http://lkml.kernel.org/r/20170719014603.19029-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Jan Kara Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/rbtree.txt | 33 +++++++++++++++++++++++++++++++++ include/linux/rbtree.h | 21 +++++++++++++++++++++ include/linux/rbtree_augmented.h | 33 ++++++++++++++++++++++++++++++--- lib/rbtree.c | 34 +++++++++++++++++++++++++++++----- 4 files changed, 113 insertions(+), 8 deletions(-) commit c32ee3d9abd284b4fcaacc250b101f93829c7bae Author: Matthias Kaehlcke Date: Fri Sep 8 16:14:33 2017 -0700 bitops: avoid integer overflow in GENMASK(_ULL) GENMASK(_ULL) performs a left-shift of ~0UL(L), which technically results in an integer overflow. clang raises a warning if the overflow occurs in a preprocessor expression. Clear the low-order bits through a substraction instead of the left-shift to avoid the overflow. (akpm: no change in .text size in my testing) Link: http://lkml.kernel.org/r/20170803212020.24939-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitops.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e9ef073a0796e46c24f037237291efe56fc28ad9 Author: Babu Moger Date: Fri Sep 8 16:14:29 2017 -0700 include: warn for inconsistent endian config definition We have seen some generic code use config parameter CONFIG_CPU_BIG_ENDIAN to decide the endianness. Here are the few examples. include/asm-generic/qrwlock.h drivers/of/base.c drivers/of/fdt.c drivers/tty/serial/earlycon.c drivers/tty/serial/serial_core.c Display warning if CPU_BIG_ENDIAN is not defined on big endian architecture and also warn if it defined on little endian architectures. Here is our original discussion https://lkml.org/lkml/2017/5/24/620 Link: http://lkml.kernel.org/r/1499358861-179979-4-git-send-email-babu.moger@oracle.com Signed-off-by: Babu Moger Suggested-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Cc: "James E.J. Bottomley" Cc: Alexander Viro Cc: David S. Miller Cc: Greg KH Cc: Helge Deller Cc: Ingo Molnar Cc: Jonas Bonn Cc: Max Filippov Cc: Michael Ellerman (powerpc) Cc: Michal Simek Cc: Peter Zijlstra Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/byteorder/big_endian.h | 4 ++++ include/linux/byteorder/little_endian.h | 4 ++++ 2 files changed, 8 insertions(+) commit 206d3642d8eea06ba23ff1d60b1452f9f57d0fe5 Author: Babu Moger Date: Fri Sep 8 16:14:25 2017 -0700 arch/microblaze: add choice for endianness and update Makefile microblaze architectures can be configured for either little or big endian formats. Add a choice option for the user to select the correct endian format(default to big endian). Also update the Makefile so toolchain can compile for the format it is configured for. Link: http://lkml.kernel.org/r/1499358861-179979-3-git-send-email-babu.moger@oracle.com Signed-off-by: Babu Moger Signed-off-by: Arnd Bergmann Cc: Michal Simek Cc: "James E.J. Bottomley" Cc: Alexander Viro Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Greg KH Cc: Helge Deller Cc: Ingo Molnar Cc: Jonas Bonn Cc: Max Filippov Cc: Michael Ellerman (powerpc) Cc: Peter Zijlstra Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/microblaze/Kconfig | 16 ++++++++++++++++ arch/microblaze/Makefile | 2 ++ 2 files changed, 18 insertions(+) commit 4c97a0c8fee302fe64feed21e6f7ed25e3e651b8 Author: Babu Moger Date: Fri Sep 8 16:14:22 2017 -0700 arch: define CPU_BIG_ENDIAN for all fixed big endian archs Patch series "Define CPU_BIG_ENDIAN or warn for inconsistencies", v3. While working on enabling queued rwlock on SPARC, found this following code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN to clear a byte. static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) { return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Problem is many of the fixed big endian architectures don't define CPU_BIG_ENDIAN and clears the wrong byte. Define CPU_BIG_ENDIAN for all the fixed big endian architecture to fix it. Also found few more references of this config parameter in drivers/of/base.c drivers/of/fdt.c drivers/tty/serial/earlycon.c drivers/tty/serial/serial_core.c Be aware that this may cause regressions if someone has worked-around problems in the above code already. Remove the work-around. Here is our original discussion https://lkml.org/lkml/2017/5/24/620 Link: http://lkml.kernel.org/r/1499358861-179979-2-git-send-email-babu.moger@oracle.com Signed-off-by: Babu Moger Suggested-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Acked-by: David S. Miller Acked-by: Stafford Horne Cc: Yoshinori Sato Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Alexander Viro Cc: Michal Simek Cc: Michael Ellerman (powerpc) Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Max Filippov Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/Kconfig | 3 +++ arch/h8300/Kconfig | 3 +++ arch/m68k/Kconfig | 3 +++ arch/openrisc/Kconfig | 3 +++ arch/parisc/Kconfig | 3 +++ arch/sparc/Kconfig | 3 +++ 6 files changed, 18 insertions(+) commit 9b130ad5bb8255ee8534d92d67e12b2a4887eacb Author: Alexey Dobriyan Date: Fri Sep 8 16:14:18 2017 -0700 treewide: make "nr_cpu_ids" unsigned First, number of CPUs can't be negative number. Second, different signnnedness leads to suboptimal code in the following cases: 1) kmalloc(nr_cpu_ids * sizeof(X)); "int" has to be sign extended to size_t. 2) while (loff_t *pos < nr_cpu_ids) MOVSXD is 1 byte longed than the same MOV. Other cases exist as well. Basically compiler is told that nr_cpu_ids can't be negative which can't be deduced if it is "int". Code savings on allyesconfig kernel: -3KB add/remove: 0/0 grow/shrink: 25/264 up/down: 261/-3631 (-3370) function old new delta coretemp_cpu_online 450 512 +62 rcu_init_one 1234 1272 +38 pci_device_probe 374 399 +25 ... pgdat_reclaimable_pages 628 556 -72 select_fallback_rq 446 369 -77 task_numa_find_cpu 1923 1807 -116 Link: http://lkml.kernel.org/r/20170819114959.GA30580@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/kernel/smp.c | 2 +- arch/powerpc/kernel/paca.c | 2 +- arch/powerpc/kernel/setup-common.c | 2 +- arch/powerpc/sysdev/xive/native.c | 4 ++-- arch/tile/kernel/setup.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- drivers/base/cpu.c | 4 ++-- drivers/scsi/scsi_debug.c | 2 +- include/linux/cpumask.h | 6 +++--- kernel/rcu/tree.c | 2 +- kernel/rcu/tree_plugin.h | 2 +- kernel/sched/topology.c | 2 +- kernel/smp.c | 2 +- kernel/trace/trace_functions_graph.c | 2 +- mm/slub.c | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) commit ac036f9570a2d318b7d8dbbdbf0e269d7cc68cef Author: Matthew Wilcox Date: Fri Sep 8 16:14:15 2017 -0700 vga: optimise console scrolling Where possible, call memset16(), memmove() or memcpy() instead of using open-coded loops. I don't like the calling convention that uses a byte count instead of a count of u16s, but it's a little late to change that. Reduces code size of fbcon.o by almost 400 bytes on my laptop build. [akpm@linux-foundation.org: fix build] Link: http://lkml.kernel.org/r/20170720184539.31609-9-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Ralf Baechle Cc: David Miller Cc: Sam Ravnborg Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Minchan Kim Cc: Richard Henderson Cc: Russell King Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/vga.h | 7 +++++++ arch/powerpc/include/asm/vga.h | 8 ++++++++ arch/sparc/include/asm/vga.h | 25 +++++++++++++++++++++++++ include/linux/vt_buffer.h | 13 +++++++++++++ 4 files changed, 53 insertions(+) commit 1caffba9db4aa27c3e7ebc05668afca1f991ab8d Author: Matthew Wilcox Date: Fri Sep 8 16:14:11 2017 -0700 drivers/scsi/sym53c8xx_2/sym_hipd.c: convert to use memset32 memset32() can be used to initialise these three arrays. Minor code footprint reduction. Link: http://lkml.kernel.org/r/20170720184539.31609-8-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "H. Peter Anvin" Cc: David Miller Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Minchan Kim Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/scsi/sym53c8xx_2/sym_hipd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 48ad1abef40226ce809e5b7d3a5898754c4b9a9a Author: Matthew Wilcox Date: Fri Sep 8 16:14:07 2017 -0700 drivers/block/zram/zram_drv.c: convert to using memset_l zram was the motivation for creating memset_l(). Minchan Kim sees a 7% performance improvement on x86 with 100MB of non-zero deduplicatable data: perf stat -r 10 dd if=/dev/zram0 of=/dev/null vanilla: 0.232050465 seconds time elapsed ( +- 0.51% ) memset_l: 0.217219387 seconds time elapsed ( +- 0.07% ) Link: http://lkml.kernel.org/r/20170720184539.31609-7-willy@infradead.org Signed-off-by: Matthew Wilcox Tested-by: Minchan Kim Cc: Sergey Senozhatsky Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 92ce4c3ea7c44e61ca2b6ef3e5682bfcea851d87 Author: Matthew Wilcox Date: Fri Sep 8 16:14:04 2017 -0700 alpha: add support for memset16 Alpha already had an optimised fill-memory-with-16-bit-quantity assembler routine called memsetw(). It has a slightly different calling convention from memset16() in that it takes a byte count, not a count of words. That's the same convention used by ARM's __memset routines, so rename Alpha's routine to match and add a memset16() wrapper around it. Then convert Alpha's scr_memsetw() to call memset16() instead of memsetw(). Link: http://lkml.kernel.org/r/20170720184539.31609-6-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ingo Molnar Cc: Michael Ellerman Cc: Minchan Kim Cc: Ralf Baechle Cc: Russell King Cc: Sam Ravnborg Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/string.h | 15 ++++++++------- arch/alpha/include/asm/vga.h | 2 +- arch/alpha/lib/memset.S | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) commit fd1d362600e2d2edb6262d8e05661424c1a315bf Author: Matthew Wilcox Date: Fri Sep 8 16:14:00 2017 -0700 ARM: implement memset32 & memset64 Reuse the existing optimised memset implementation to implement an optimised memset32 and memset64. Link: http://lkml.kernel.org/r/20170720184539.31609-5-willy@infradead.org Signed-off-by: Matthew Wilcox Reviewed-by: Russell King Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Minchan Kim Cc: Ralf Baechle Cc: Richard Henderson Cc: Sam Ravnborg Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/string.h | 14 ++++++++++++++ arch/arm/kernel/armksyms.c | 2 ++ arch/arm/lib/memset.S | 24 ++++++++++++++++++------ 3 files changed, 34 insertions(+), 6 deletions(-) commit 4c51248533adcfb01ba704ce5993ecbad5cc4c99 Author: Matthew Wilcox Date: Fri Sep 8 16:13:56 2017 -0700 x86: implement memset16, memset32 & memset64 These are single instructions on x86. There's no 64-bit instruction for x86-32, but we don't yet have any user for memset64() on 32-bit architectures, so don't bother to implement it. Link: http://lkml.kernel.org/r/20170720184539.31609-4-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: Minchan Kim Cc: Michael Ellerman Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/string_32.h | 24 ++++++++++++++++++++++++ arch/x86/include/asm/string_64.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 03270c13c5ffaa6ac76fe70d0b6929313ca73d86 Author: Matthew Wilcox Date: Fri Sep 8 16:13:52 2017 -0700 lib/string.c: add testcases for memset16/32/64 [akpm@linux-foundation.org: minor tweaks] Link: http://lkml.kernel.org/r/20170720184539.31609-3-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Minchan Kim Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig | 3 ++ lib/string.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) commit 3b3c4babd898715926d24ae10aa64778ace33aae Author: Matthew Wilcox Date: Fri Sep 8 16:13:48 2017 -0700 lib/string.c: add multibyte memset functions Patch series "Multibyte memset variations", v4. A relatively common idiom we're missing is a function to fill an area of memory with a pattern which is larger than a single byte. I first noticed this with a zram patch which wanted to fill a page with an 'unsigned long' value. There turn out to be quite a few places in the kernel which can benefit from using an optimised function rather than a loop; sometimes text size, sometimes speed, and sometimes both. The optimised PowerPC version (not included here) improves performance by about 30% on POWER8 on just the raw memset_l(). Most of the extra lines of code come from the three testcases I added. This patch (of 8): memset16(), memset32() and memset64() are like memset(), but allow the caller to fill the destination with a value larger than a single byte. memset_l() and memset_p() allow the caller to use unsigned long and pointer values respectively. Link: http://lkml.kernel.org/r/20170720184539.31609-2-willy@infradead.org Signed-off-by: Matthew Wilcox Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Miller Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Minchan Kim Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Sergey Senozhatsky Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/string.h | 30 +++++++++++++++++++++++ lib/string.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) commit 604df322363e5770735df85368f83cac4a955a24 Author: Masahiro Yamada Date: Fri Sep 8 16:13:45 2017 -0700 linux/kernel.h: move DIV_ROUND_DOWN_ULL() macro This macro is useful to avoid link error on 32-bit systems. We have the same definition in two drivers, so move it to include/linux/kernel.h While we are here, refactor DIV_ROUND_UP_ULL() by using DIV_ROUND_DOWN_ULL(). Link: http://lkml.kernel.org/r/1500945156-12907-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Mark Brown Cc: Cyrille Pitchen Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Liam Girdwood Cc: Boris Brezillon Cc: Marek Vasut Cc: Brian Norris Cc: Richard Weinberger Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/mtd/nand/denali.c | 3 --- include/linux/kernel.h | 7 +++++-- sound/soc/codecs/pcm512x.c | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) commit 14038302944a1ceda62a104c137d24a62604d98e Author: David Rientjes Date: Fri Sep 8 16:13:41 2017 -0700 fs, proc: unconditional cond_resched when reading smaps If there are large numbers of hugepages to iterate while reading /proc/pid/smaps, the page walk never does cond_resched(). On archs without split pmd locks, there can be significant and observable contention on mm->page_table_lock which cause lengthy delays without rescheduling. Always reschedule in smaps_pte_range() if necessary since the pagewalk iteration can be expensive. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708211405520.131071@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Minchan Kim Cc: Hugh Dickins Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 855d97657d4d335970622f0d95ca4966d3f77ee7 Author: Alexey Dobriyan Date: Fri Sep 8 16:13:38 2017 -0700 proc: uninline proc_create() Save some code from ~320 invocations all clearing last argument. add/remove: 3/0 grow/shrink: 0/158 up/down: 45/-702 (-657) function old new delta proc_create - 17 +17 __ksymtab_proc_create - 16 +16 __kstrtab_proc_create - 12 +12 yam_init_driver 301 298 -3 ... cifs_proc_init 249 228 -21 via_fb_pci_probe 2304 2280 -24 Link: http://lkml.kernel.org/r/20170819094702.GA27864@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/generic.c | 8 ++++++++ include/linux/proc_fs.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 1240ea0dc3bb7066299689c82ebe2861c90a0254 Author: Michal Hocko Date: Fri Sep 8 16:13:35 2017 -0700 fs, proc: remove priv argument from is_stack Commit b18cb64ead40 ("fs/proc: Stop trying to report thread stacks") removed the priv parameter user in is_stack so the argument is redundant. Drop it. [arnd@arndb.de: remove unused variable] Link: http://lkml.kernel.org/r/20170801120150.1520051-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170728075833.7241-1-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 8 +++----- fs/proc/task_nommu.c | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) commit 149728e91349f269d6fc82b4ca2552645dfa7d2c Author: Anshuman Khandual Date: Fri Sep 8 16:13:32 2017 -0700 mm/mempolicy.c: remove BUG_ON() checks for VMA inside mpol_misplaced() VMA and its address bounds checks are too late in this function. They must have been verified earlier in the page fault sequence. Hence just remove them. Link: http://lkml.kernel.org/r/20170901130137.7617-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Suggested-by: Vlastimil Babka Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 5 ----- 1 file changed, 5 deletions(-) commit b6b1fd2a6bedd533aeed83924d7be0e944fded9f Author: David Rientjes Date: Fri Sep 8 16:13:29 2017 -0700 mm/swapfile.c: fix swapon frontswap_map memory leak on error Free frontswap_map if an error is encountered before enable_swap_info(). Signed-off-by: David Rientjes Reviewed-by: "Huang, Ying" Cc: Darrick J. Wong Cc: Hugh Dickins Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 1 + 1 file changed, 1 insertion(+) commit 8606a1a94da5c4e49c0fb28af62d2e75c6747716 Author: Darrick J. Wong Date: Fri Sep 8 16:13:25 2017 -0700 mm: kvfree the swap cluster info if the swap file is unsatisfactory If initializing a small swap file fails because the swap file has a problem (holes, etc.) then we need to free the cluster info as part of cleanup. Unfortunately a previous patch changed the code to use kvzalloc but did not change all the vfree calls to use kvfree. Found by running generic/357 from xfstests. Link: http://lkml.kernel.org/r/20170831233515.GR3775@magnolia Fixes: 54f180d3c181 ("mm, swap: use kvzalloc to allocate some swap data structures") Signed-off-by: Darrick J. Wong Reviewed-by: "Huang, Ying" Acked-by: David Rientjes Cc: Hugh Dickins Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f19360f015d338a80bec4d56c2e4fc01680ffd8f Author: Tetsuo Handa Date: Fri Sep 8 16:13:22 2017 -0700 mm/page_alloc.c: apply gfp_allowed_mask before the first allocation attempt We are by error initializing alloc_flags before gfp_allowed_mask is applied. This could cause problems after pm_restrict_gfp_mask() is called during suspend operation. Apply gfp_allowed_mask before initializing alloc_flags so that the first allocation attempt uses correct flags. Link: http://lkml.kernel.org/r/201709020016.ADJ21342.OFLJHOOSMFVtFQ@I-love.SAKURA.ne.jp Fixes: 83d4ca8148fd9092 ("mm, page_alloc: move __GFP_HARDWALL modifications out of the fastpath") Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66559a691a5b4a3d79852a82c8c2f8532077b301 Author: Cyrill Gorcunov Date: Fri Sep 8 16:13:19 2017 -0700 tools/testing/selftests/kcmp/kcmp_test.c: add KCMP_EPOLL_TFD testing KCMP's KCMP_EPOLL_TFD mode merged in commit 0791e3644e5ef2 ("kcmp: add KCMP_EPOLL_TFD mode to compare epoll target files") we've had no selftest for it yet (except in criu development list). Thus add it. Link: http://lkml.kernel.org/r/20170901151620.GK1898@uranus.lan Signed-off-by: Cyrill Gorcunov Cc: Andrey Vagin Cc: Pavel Emelyanov Cc: Michael Kerrisk Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/kcmp/kcmp_test.c | 60 ++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) commit b4ccec41af82b5a5518c6534444412961894f07c Author: Michal Hocko Date: Fri Sep 8 16:13:15 2017 -0700 mm/sparse.c: fix typo in online_mem_sections online_mem_sections() accidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users of pfn_to_online_page would get confused on the the rest of the pfn range in the block. All we need to fix this is to use iterator (pfn) rather than start_pfn. Link: http://lkml.kernel.org/r/20170904112210.3401-1-mhocko@kernel.org Fixes: 2d070eab2e82 ("mm: consider zone which is not fully populated to have holes") Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Anshuman Khandual Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de0c799bba2610a8e1e9a50d76a28614520a4cd4 Author: Laurent Dufour Date: Fri Sep 8 16:13:12 2017 -0700 mm/memory.c: fix mem_cgroup_oom_disable() call missing Seen while reading the code, in handle_mm_fault(), in the case arch_vma_access_permitted() is failing the call to mem_cgroup_oom_disable() is not made. To fix that, move the call to mem_cgroup_oom_enable() after calling arch_vma_access_permitted() as it should not have entered the memcg OOM. Link: http://lkml.kernel.org/r/1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com Fixes: bae473a423f6 ("mm: introduce fault_env") Signed-off-by: Laurent Dufour Acked-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 475d0487a2adb1718892856078861d430d81fc55 Author: Roman Gushchin Date: Fri Sep 8 16:13:09 2017 -0700 mm: memcontrol: use per-cpu stocks for socket memory uncharging We've noticed a quite noticeable performance overhead on some hosts with significant network traffic when socket memory accounting is enabled. Perf top shows that socket memory uncharging path is hot: 2.13% [kernel] [k] page_counter_cancel 1.14% [kernel] [k] __sk_mem_reduce_allocated 1.14% [kernel] [k] _raw_spin_lock 0.87% [kernel] [k] _raw_spin_lock_irqsave 0.84% [kernel] [k] tcp_ack 0.84% [kernel] [k] ixgbe_poll 0.83% < workload > 0.82% [kernel] [k] enqueue_entity 0.68% [kernel] [k] __fget 0.68% [kernel] [k] tcp_delack_timer_handler 0.67% [kernel] [k] __schedule 0.60% < workload > 0.59% [kernel] [k] __inet6_lookup_established 0.55% [kernel] [k] __switch_to 0.55% [kernel] [k] menu_select 0.54% libc-2.20.so [.] __memcpy_avx_unaligned To address this issue, the existing per-cpu stock infrastructure can be used. refill_stock() can be called from mem_cgroup_uncharge_skmem() to move charge to a per-cpu stock instead of calling atomic page_counter_uncharge(). To prevent the uncontrolled growth of per-cpu stocks, refill_stock() will explicitly drain the cached charge, if the cached value exceeds CHARGE_BATCH. This allows significantly optimize the load: 1.21% [kernel] [k] _raw_spin_lock 1.01% [kernel] [k] ixgbe_poll 0.92% [kernel] [k] _raw_spin_lock_irqsave 0.90% [kernel] [k] enqueue_entity 0.86% [kernel] [k] tcp_ack 0.85% < workload > 0.74% perf-11120.map [.] 0x000000000061bf24 0.73% [kernel] [k] __schedule 0.67% [kernel] [k] __fget 0.63% [kernel] [k] __inet6_lookup_established 0.62% [kernel] [k] menu_select 0.59% < workload > 0.59% [kernel] [k] __switch_to 0.57% libc-2.20.so [.] __memcpy_avx_unaligned Link: http://lkml.kernel.org/r/20170829100150.4580-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3a77d214807c32f900618cee0432feb4f7f99c65 Author: Shakeel Butt Date: Fri Sep 8 16:13:05 2017 -0700 mm: fadvise: avoid fadvise for fs without backing device The fadvise() manpage is silent on fadvise()'s effect on memory-based filesystems (shmem, hugetlbfs & ramfs) and pseudo file systems (procfs, sysfs, kernfs). The current implementaion of fadvise is mostly a noop for such filesystems except for FADV_DONTNEED which will trigger expensive remote LRU cache draining. This patch makes the noop of fadvise() on such file systems very explicit. However this change has two side effects for ramfs and one for tmpfs. First fadvise(FADV_DONTNEED) could remove the unmapped clean zero'ed pages of ramfs (allocated through read, readahead & read fault) and tmpfs (allocated through read fault). Also fadvise(FADV_WILLNEED) could create such clean zero'ed pages for ramfs. This change removes those possibilities. One of our generic libraries does fadvise(FADV_DONTNEED). Recently we observed high latency in fadvise() and noticed that the users have started using tmpfs files and the latency was due to expensive remote LRU cache draining. For normal tmpfs files (have data written on them), fadvise(FADV_DONTNEED) will always trigger the unneeded remote cache draining. Link: http://lkml.kernel.org/r/20170818011023.181465-1-shakeelb@google.com Signed-off-by: Shakeel Butt Cc: Mel Gorman Cc: Johannes Weiner Cc: Hillf Danton Cc: Vlastimil Babka Cc: Hugh Dickins Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/fadvise.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3eb95feac113d8ebad5b7b5189a65efcbd95a749 Author: Matthias Kaehlcke Date: Fri Sep 8 16:13:02 2017 -0700 mm/zsmalloc.c: change stat type parameter to int zs_stat_inc/dec/get() uses enum zs_stat_type for the stat type, however some callers pass an enum fullness_group value. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warnings Link: http://lkml.kernel.org/r/20170731175000.56538-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Doug Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9472f23c9eeba3b32e65a62fe2a9b3e827888afa Author: Joonsoo Kim Date: Fri Sep 8 16:12:59 2017 -0700 mm/mlock.c: use page_zone() instead of page_zone_id() page_zone_id() is a specialized function to compare the zone for the pages that are within the section range. If the section of the pages are different, page_zone_id() can be different even if their zone is the same. This wrong usage doesn't cause any actual problem since __munlock_pagevec_fill() would be called again with failed index. However, it's better to use more appropriate function here. Link: http://lkml.kernel.org/r/1503559211-10259-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 638032224ed762a29baca1fc37f1168efc2554ae Author: Kemi Wang Date: Fri Sep 8 16:12:55 2017 -0700 mm: consider the number in local CPUs when reading NUMA stats To avoid deviation, the per cpu number of NUMA stats in vm_numa_stat_diff[] is included when a user *reads* the NUMA stats. Since NUMA stats does not be read by users frequently, and kernel does not need it to make a decision, it will not be a problem to make the readers more expensive. Link: http://lkml.kernel.org/r/1503568801-21305-4-git-send-email-kemi.wang@intel.com Signed-off-by: Kemi Wang Reported-by: Jesper Dangaard Brouer Acked-by: Mel Gorman Cc: Aaron Lu Cc: Andi Kleen Cc: Christopher Lameter Cc: Dave Hansen Cc: Johannes Weiner Cc: Michal Hocko Cc: Tim Chen Cc: Ying Huang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmstat.h | 6 +++++- mm/vmstat.c | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit 1d90ca897cb05cf38bd62f36756d219e02913b7d Author: Kemi Wang Date: Fri Sep 8 16:12:52 2017 -0700 mm: update NUMA counter threshold size There is significant overhead in cache bouncing caused by zone counters (NUMA associated counters) update in parallel in multi-threaded page allocation (suggested by Dave Hansen). This patch updates NUMA counter threshold to a fixed size of MAX_U16 - 2, as a small threshold greatly increases the update frequency of the global counter from local per cpu counter(suggested by Ying Huang). The rationality is that these statistics counters don't affect the kernel's decision, unlike other VM counters, so it's not a problem to use a large threshold. With this patchset, we see 31.3% drop of CPU cycles(537-->369) for per single page allocation and reclaim on Jesper's page_bench03 benchmark. Benchmark provided by Jesper D Brouer(increase loop times to 10000000): https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/ bench Threshold CPU cycles Throughput(88 threads) 32 799 241760478 64 640 301628829 125 537 358906028 <==> system by default (base) 256 468 412397590 512 428 450550704 4096 399 482520943 20000 394 489009617 30000 395 488017817 65533 369(-31.3%) 521661345(+45.3%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics Link: http://lkml.kernel.org/r/1503568801-21305-3-git-send-email-kemi.wang@intel.com Signed-off-by: Kemi Wang Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Acked-by: Mel Gorman Cc: Aaron Lu Cc: Andi Kleen Cc: Christopher Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 3 +-- mm/vmstat.c | 28 ++++++++++------------------ 2 files changed, 11 insertions(+), 20 deletions(-) commit 3a321d2a3dde812142e06ab5c2f062ed860182a5 Author: Kemi Wang Date: Fri Sep 8 16:12:48 2017 -0700 mm: change the call sites of numa statistics items Patch series "Separate NUMA statistics from zone statistics", v2. Each page allocation updates a set of per-zone statistics with a call to zone_statistics(). As discussed in 2017 MM summit, these are a substantial source of overhead in the page allocator and are very rarely consumed. This significant overhead in cache bouncing caused by zone counters (NUMA associated counters) update in parallel in multi-threaded page allocation (pointed out by Dave Hansen). A link to the MM summit slides: http://people.netfilter.org/hawk/presentations/MM-summit2017/MM-summit2017-JesperBrouer.pdf To mitigate this overhead, this patchset separates NUMA statistics from zone statistics framework, and update NUMA counter threshold to a fixed size of MAX_U16 - 2, as a small threshold greatly increases the update frequency of the global counter from local per cpu counter (suggested by Ying Huang). The rationality is that these statistics counters don't need to be read often, unlike other VM counters, so it's not a problem to use a large threshold and make readers more expensive. With this patchset, we see 31.3% drop of CPU cycles(537-->369, see below) for per single page allocation and reclaim on Jesper's page_bench03 benchmark. Meanwhile, this patchset keeps the same style of virtual memory statistics with little end-user-visible effects (only move the numa stats to show behind zone page stats, see the first patch for details). I did an experiment of single page allocation and reclaim concurrently using Jesper's page_bench03 benchmark on a 2-Socket Broadwell-based server (88 processors with 126G memory) with different size of threshold of pcp counter. Benchmark provided by Jesper D Brouer(increase loop times to 10000000): https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/bench Threshold CPU cycles Throughput(88 threads) 32 799 241760478 64 640 301628829 125 537 358906028 <==> system by default 256 468 412397590 512 428 450550704 4096 399 482520943 20000 394 489009617 30000 395 488017817 65533 369(-31.3%) 521661345(+45.3%) <==> with this patchset N/A 342(-36.3%) 562900157(+56.8%) <==> disable zone_statistics This patch (of 3): In this patch, NUMA statistics is separated from zone statistics framework, all the call sites of NUMA stats are changed to use numa-stats-specific functions, it does not have any functionality change except that the number of NUMA stats is shown behind zone page stats when users *read* the zone info. E.g. cat /proc/zoneinfo ***Base*** ***With this patch*** nr_free_pages 3976 nr_free_pages 3976 nr_zone_inactive_anon 0 nr_zone_inactive_anon 0 nr_zone_active_anon 0 nr_zone_active_anon 0 nr_zone_inactive_file 0 nr_zone_inactive_file 0 nr_zone_active_file 0 nr_zone_active_file 0 nr_zone_unevictable 0 nr_zone_unevictable 0 nr_zone_write_pending 0 nr_zone_write_pending 0 nr_mlock 0 nr_mlock 0 nr_page_table_pages 0 nr_page_table_pages 0 nr_kernel_stack 0 nr_kernel_stack 0 nr_bounce 0 nr_bounce 0 nr_zspages 0 nr_zspages 0 numa_hit 0 *nr_free_cma 0* numa_miss 0 numa_hit 0 numa_foreign 0 numa_miss 0 numa_interleave 0 numa_foreign 0 numa_local 0 numa_interleave 0 numa_other 0 numa_local 0 *nr_free_cma 0* numa_other 0 ... ... vm stats threshold: 10 vm stats threshold: 10 ... ... The next patch updates the numa stats counter size and threshold. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1503568801-21305-2-git-send-email-kemi.wang@intel.com Signed-off-by: Kemi Wang Reported-by: Jesper Dangaard Brouer Acked-by: Mel Gorman Cc: Michal Hocko Cc: Johannes Weiner Cc: Christopher Lameter Cc: Dave Hansen Cc: Andi Kleen Cc: Ying Huang Cc: Aaron Lu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 22 ++++--- include/linux/mmzone.h | 25 +++++--- include/linux/vmstat.h | 29 ++++++++- mm/page_alloc.c | 10 +-- mm/vmstat.c | 161 +++++++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 220 insertions(+), 27 deletions(-) commit fde26bed588918a11831841b219f74b20b32b080 Author: Anshuman Khandual Date: Fri Sep 8 16:12:45 2017 -0700 mm/memory.c: remove reduntant check for write access Flags argument has been copied into vmf.flags and it is not changed in between. Hence a single write access check can be used for both PUD and PMD. Link: http://lkml.kernel.org/r/20170823082839.1812-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 656710a60e3693911bee3a355d2f2bbae3faba33 Author: Andrea Arcangeli Date: Fri Sep 8 16:12:42 2017 -0700 userfaultfd: non-cooperative: closing the uffd without triggering SIGBUS This is an enhancement to avoid a non cooperative userfaultfd manager having to unregister all regions before it can close the uffd after all userfaultfd activity completed. The UFFDIO_UNREGISTER would serialize against the handle_userfault by taking the mmap_sem for writing, but we can simply repeat the page fault if we detect the uffd was closed and so the regular page fault paths should takeover. Link: http://lkml.kernel.org/r/20170823181227.19926-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Mike Rapoport Cc: Mike Kravetz Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 98c70baad4067cf3bfb90c26b3b01cb3eab621e2 Author: Laurent Dufour Date: Fri Sep 8 16:12:39 2017 -0700 mm: remove useless vma parameter to offset_il_node While reading the code I found that offset_il_node() has a vm_area_struct pointer parameter which is unused. Link: http://lkml.kernel.org/r/1502899755-23146-1-git-send-email-ldufour@linux.vnet.ibm.com Signed-off-by: Laurent Dufour Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit de540a9763efcd5b6339158ac2e5932fb3e691b9 Author: Jérôme Glisse Date: Fri Sep 8 16:12:35 2017 -0700 mm/hmm: fix build when HMM is disabled Combinatorial Kconfig is painfull. Withi this patch all below combination build. 1) 2) CONFIG_HMM_MIRROR=y 3) CONFIG_DEVICE_PRIVATE=y 4) CONFIG_DEVICE_PUBLIC=y 5) CONFIG_HMM_MIRROR=y CONFIG_DEVICE_PUBLIC=y 6) CONFIG_HMM_MIRROR=y CONFIG_DEVICE_PRIVATE=y 7) CONFIG_DEVICE_PRIVATE=y CONFIG_DEVICE_PUBLIC=y 8) CONFIG_HMM_MIRROR=y CONFIG_DEVICE_PRIVATE=y CONFIG_DEVICE_PUBLIC=y Link: http://lkml.kernel.org/r/20170826002149.20919-1-jglisse@redhat.com Reported-by: Randy Dunlap Signed-off-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6b368cd4a44ce95b33f1d31f2f932e6ae707f319 Author: Jérôme Glisse Date: Fri Sep 8 16:12:32 2017 -0700 mm/hmm: avoid bloating arch that do not make use of HMM This moves all new code including new page migration helper behind kernel Kconfig option so that there is no codee bloat for arch or user that do not want to use HMM or any of its associated features. arm allyesconfig (without all the patchset, then with and this patch): text data bss dec hex filename 83721896 46511131 27582964 157815991 96814b7 ../without/vmlinux 83722364 46511131 27582964 157816459 968168b vmlinux [jglisse@redhat.com: struct hmm is only use by HMM mirror functionality] Link: http://lkml.kernel.org/r/20170825213133.27286-1-jglisse@redhat.com [sfr@canb.auug.org.au: fix build (arm multi_v7_defconfig)] Link: http://lkml.kernel.org/r/20170828181849.323ab81b@canb.auug.org.au Link: http://lkml.kernel.org/r/20170818032858.7447-1-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Stephen Rothwell Cc: Dan Williams Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 9 ++++++--- include/linux/memremap.h | 22 +++++++--------------- include/linux/migrate.h | 13 +++++++++++++ include/linux/mm.h | 26 +++++++++++++++++--------- mm/Kconfig | 4 ++++ mm/Makefile | 3 ++- mm/hmm.c | 7 +++---- mm/migrate.c | 2 ++ 8 files changed, 54 insertions(+), 32 deletions(-) commit d3df0a423397c9a1ae05c3857e8c04240dd85e68 Author: Jérôme Glisse Date: Fri Sep 8 16:12:28 2017 -0700 mm/hmm: add new helper to hotplug CDM memory region Unlike unaddressable memory, coherent device memory has a real resource associated with it on the system (as CPU can address it). Add a new helper to hotplug such memory within the HMM framework. Link: http://lkml.kernel.org/r/20170817000548.32038-20-jglisse@redhat.com Signed-off-by: Jérôme Glisse Reviewed-by: Balbir Singh Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 3 ++ mm/hmm.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 86 insertions(+), 5 deletions(-) commit df6ad69838fc9dcdbee0dcf2fc2c6f1113f8d609 Author: Jérôme Glisse Date: Fri Sep 8 16:12:24 2017 -0700 mm/device-public-memory: device memory cache coherent with CPU Platform with advance system bus (like CAPI or CCIX) allow device memory to be accessible from CPU in a cache coherent fashion. Add a new type of ZONE_DEVICE to represent such memory. The use case are the same as for the un-addressable device memory but without all the corners cases. Link: http://lkml.kernel.org/r/20170817000548.32038-19-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Aneesh Kumar Cc: Paul E. McKenney Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Ross Zwisler Cc: Balbir Singh Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 2 +- include/linux/hmm.h | 4 ++-- include/linux/ioport.h | 1 + include/linux/memremap.h | 21 ++++++++++++++++++ include/linux/mm.h | 20 ++++++++++------- kernel/memremap.c | 8 +++---- mm/Kconfig | 11 ++++++++++ mm/gup.c | 7 ++++++ mm/hmm.c | 4 ++-- mm/madvise.c | 2 +- mm/memcontrol.c | 12 +++++----- mm/memory.c | 46 +++++++++++++++++++++++++++++++++----- mm/migrate.c | 57 ++++++++++++++++++++++++++++++++---------------- mm/swap.c | 11 ++++++++++ 14 files changed, 159 insertions(+), 47 deletions(-) commit 8315ada7f095bfa2cae0cd1e915b95bf6226897d Author: Jérôme Glisse Date: Fri Sep 8 16:12:21 2017 -0700 mm/migrate: allow migrate_vma() to alloc new page on empty entry This allows callers of migrate_vma() to allocate new page for empty CPU page table entry (pte_none or back by zero page). This is only for anonymous memory and it won't allow new page to be instanced if the userfaultfd is armed. This is useful to device driver that want to migrate a range of virtual address and would rather allocate new memory than having to fault later on. Link: http://lkml.kernel.org/r/20170817000548.32038-18-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 9 +++ mm/migrate.c | 205 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 205 insertions(+), 9 deletions(-) commit a5430dda8a3a1cdd532e37270e6f36436241b6e7 Author: Jérôme Glisse Date: Fri Sep 8 16:12:17 2017 -0700 mm/migrate: support un-addressable ZONE_DEVICE page in migration Allow to unmap and restore special swap entry of un-addressable ZONE_DEVICE memory. Link: http://lkml.kernel.org/r/20170817000548.32038-17-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 10 +++- mm/migrate.c | 149 +++++++++++++++++++++++++++++++++++++++--------- mm/page_vma_mapped.c | 10 ++++ mm/rmap.c | 26 +++++++++ 4 files changed, 165 insertions(+), 30 deletions(-) commit 8c3328f1f36a5efe817ad4e06497af601936a460 Author: Jérôme Glisse Date: Fri Sep 8 16:12:13 2017 -0700 mm/migrate: migrate_vma() unmap page from vma while collecting pages Common case for migration of virtual address range is page are map only once inside the vma in which migration is taking place. Because we already walk the CPU page table for that range we can directly do the unmap there and setup special migration swap entry. Link: http://lkml.kernel.org/r/20170817000548.32038-16-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 112 insertions(+), 29 deletions(-) commit 8763cb45ab967a92a5ee49e9c544c0f0ea90e2d6 Author: Jérôme Glisse Date: Fri Sep 8 16:12:09 2017 -0700 mm/migrate: new memory migration helper for use with device memory This patch add a new memory migration helpers, which migrate memory backing a range of virtual address of a process to different memory (which can be allocated through special allocator). It differs from numa migration by working on a range of virtual address and thus by doing migration in chunk that can be large enough to use DMA engine or special copy offloading engine. Expected users are any one with heterogeneous memory where different memory have different characteristics (latency, bandwidth, ...). As an example IBM platform with CAPI bus can make use of this feature to migrate between regular memory and CAPI device memory. New CPU architecture with a pool of high performance memory not manage as cache but presented as regular memory (while being faster and with lower latency than DDR) will also be prime user of this patch. Migration to private device memory will be useful for device that have large pool of such like GPU, NVidia plans to use HMM for that. Link: http://lkml.kernel.org/r/20170817000548.32038-15-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 104 ++++++++++ mm/migrate.c | 492 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 596 insertions(+) commit 2916ecc0f9d435d849c98f4da50e453124c87531 Author: Jérôme Glisse Date: Fri Sep 8 16:12:06 2017 -0700 mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY Introduce a new migration mode that allow to offload the copy to a device DMA engine. This changes the workflow of migration and not all address_space migratepage callback can support this. This is intended to be use by migrate_vma() which itself is use for thing like HMM (see include/linux/hmm.h). No additional per-filesystem migratepage testing is needed. I disables MIGRATE_SYNC_NO_COPY in all problematic migratepage() callback and i added comment in those to explain why (part of this patch). The commit message is unclear it should say that any callback that wish to support this new mode need to be aware of the difference in the migration flow from other mode. Some of these callbacks do extra locking while copying (aio, zsmalloc, balloon, ...) and for DMA to be effective you want to copy multiple pages in one DMA operations. But in the problematic case you can not easily hold the extra lock accross multiple call to this callback. Usual flow is: For each page { 1 - lock page 2 - call migratepage() callback 3 - (extra locking in some migratepage() callback) 4 - migrate page state (freeze refcount, update page cache, buffer head, ...) 5 - copy page 6 - (unlock any extra lock of migratepage() callback) 7 - return from migratepage() callback 8 - unlock page } The new mode MIGRATE_SYNC_NO_COPY: 1 - lock multiple pages For each page { 2 - call migratepage() callback 3 - abort in all problematic migratepage() callback 4 - migrate page state (freeze refcount, update page cache, buffer head, ...) } // finished all calls to migratepage() callback 5 - DMA copy multiple pages 6 - unlock all the pages To support MIGRATE_SYNC_NO_COPY in the problematic case we would need a new callback migratepages() (for instance) that deals with multiple pages in one transaction. Because the problematic cases are not important for current usage I did not wanted to complexify this patchset even more for no good reason. Link: http://lkml.kernel.org/r/20170817000548.32038-14-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/aio.c | 8 +++++++ fs/f2fs/data.c | 5 ++++- fs/hugetlbfs/inode.c | 5 ++++- fs/ubifs/file.c | 5 ++++- include/linux/migrate.h | 5 +++++ include/linux/migrate_mode.h | 5 +++++ mm/balloon_compaction.c | 8 +++++++ mm/migrate.c | 52 ++++++++++++++++++++++++++++++++++---------- mm/zsmalloc.c | 8 +++++++ 9 files changed, 86 insertions(+), 15 deletions(-) commit 858b54dabf4363daa3a97b9a722130a8e7cea8c9 Author: Jérôme Glisse Date: Fri Sep 8 16:12:02 2017 -0700 mm/hmm/devmem: dummy HMM device for ZONE_DEVICE memory This introduce a dummy HMM device class so device driver can use it to create hmm_device for the sole purpose of registering device memory. It is useful to device driver that want to manage multiple physical device memory under same struct device umbrella. Link: http://lkml.kernel.org/r/20170817000548.32038-13-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 22 ++++++++++++++- mm/hmm.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) commit 4ef589dc9b10cdcae75a2b2b0e9b2c5e8a92c378 Author: Jérôme Glisse Date: Fri Sep 8 16:11:58 2017 -0700 mm/hmm/devmem: device memory hotplug using ZONE_DEVICE This introduce a simple struct and associated helpers for device driver to use when hotpluging un-addressable device memory as ZONE_DEVICE. It will find a unuse physical address range and trigger memory hotplug for it which allocates and initialize struct page for the device memory. Device driver should use this helper during device initialization to hotplug the device memory. It should only need to remove the memory once the device is going offline (shutdown or hotremove). There should not be any userspace API to hotplug memory expect maybe for host device driver to allow to add more memory to a guest device driver. Device's memory is manage by the device driver and HMM only provides helpers to that effect. Link: http://lkml.kernel.org/r/20170817000548.32038-12-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Signed-off-by: Balbir Singh Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 155 +++++++++++++++++++++ mm/hmm.c | 379 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 533 insertions(+), 1 deletion(-) commit c733a82874a79261866a4178edbb608847df4879 Author: Jérôme Glisse Date: Fri Sep 8 16:11:54 2017 -0700 mm/memcontrol: support MEMORY_DEVICE_PRIVATE HMM pages (private or public device pages) are ZONE_DEVICE page and thus need special handling when it comes to lru or refcount. This patch make sure that memcontrol properly handle those when it face them. Those pages are use like regular pages in a process address space either as anonymous page or as file back page. So from memcg point of view we want to handle them like regular page for now at least. Link: http://lkml.kernel.org/r/20170817000548.32038-11-jglisse@redhat.com Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 1 + mm/memcontrol.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 4 deletions(-) commit a9d5adeeb4b2c73c8972180b28d0e05e7d718d06 Author: Jérôme Glisse Date: Fri Sep 8 16:11:50 2017 -0700 mm/memcontrol: allow to uncharge page without using page->lru field HMM pages (private or public device pages) are ZONE_DEVICE page and thus you can not use page->lru fields of those pages. This patch re-arrange the uncharge to allow single page to be uncharge without modifying the lru field of the struct page. There is no change to memcontrol logic, it is the same as it was before this patch. Link: http://lkml.kernel.org/r/20170817000548.32038-10-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 168 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 92 insertions(+), 76 deletions(-) commit 7b2d55d2c8961ae9d456d3133f4ae2f0fbd3e14f Author: Jérôme Glisse Date: Fri Sep 8 16:11:46 2017 -0700 mm/ZONE_DEVICE: special case put_page() for device private pages A ZONE_DEVICE page that reach a refcount of 1 is free ie no longer have any user. For device private pages this is important to catch and thus we need to special case put_page() for this. Link: http://lkml.kernel.org/r/20170817000548.32038-9-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Dan Williams Cc: Ross Zwisler Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memremap.h | 13 +++++++++++++ include/linux/mm.h | 31 ++++++++++++++++++++++--------- kernel/memremap.c | 25 ++++++++++++++++++++++++- mm/hmm.c | 8 ++++++++ 4 files changed, 67 insertions(+), 10 deletions(-) commit 5042db43cc26f51eed51c56192e2c2317e44315f Author: Jérôme Glisse Date: Fri Sep 8 16:11:43 2017 -0700 mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory HMM (heterogeneous memory management) need struct page to support migration from system main memory to device memory. Reasons for HMM and migration to device memory is explained with HMM core patch. This patch deals with device memory that is un-addressable memory (ie CPU can not access it). Hence we do not want those struct page to be manage like regular memory. That is why we extend ZONE_DEVICE to support different types of memory. A persistent memory type is define for existing user of ZONE_DEVICE and a new device un-addressable type is added for the un-addressable memory type. There is a clear separation between what is expected from each memory type and existing user of ZONE_DEVICE are un-affected by new requirement and new use of the un-addressable type. All specific code path are protect with test against the memory type. Because memory is un-addressable we use a new special swap type for when a page is migrated to device memory (this reduces the number of maximum swap file). The main two additions beside memory type to ZONE_DEVICE is two callbacks. First one, page_free() is call whenever page refcount reach 1 (which means the page is free as ZONE_DEVICE page never reach a refcount of 0). This allow device driver to manage its memory and associated struct page. The second callback page_fault() happens when there is a CPU access to an address that is back by a device page (which are un-addressable by the CPU). This callback is responsible to migrate the page back to system main memory. Device driver can not block migration back to system memory, HMM make sure that such page can not be pin into device memory. If device is in some error condition and can not migrate memory back then a CPU page fault to device memory should end with SIGBUS. [arnd@arndb.de: fix warning] Link: http://lkml.kernel.org/r/20170823133213.712917-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20170817000548.32038-8-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Arnd Bergmann Acked-by: Dan Williams Cc: Ross Zwisler Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 7 +++++ include/linux/ioport.h | 1 + include/linux/memremap.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mm.h | 12 ++++++++ include/linux/swap.h | 24 ++++++++++++++-- include/linux/swapops.h | 68 ++++++++++++++++++++++++++++++++++++++++++++ kernel/memremap.c | 34 ++++++++++++++++++++++ mm/Kconfig | 11 +++++++- mm/memory.c | 61 ++++++++++++++++++++++++++++++++++++++++ mm/memory_hotplug.c | 10 +++++-- mm/mprotect.c | 14 ++++++++++ 11 files changed, 309 insertions(+), 6 deletions(-) commit 3072e413e305e353cd4654f8a57d953b66e85bf3 Author: Michal Hocko Date: Fri Sep 8 16:11:39 2017 -0700 mm/memory_hotplug: introduce add_pages There are new users of memory hotplug emerging. Some of them require different subset of arch_add_memory. There are some which only require allocation of struct pages without mapping those pages to the kernel address space. We currently have __add_pages for that purpose. But this is rather lowlevel and not very suitable for the code outside of the memory hotplug. E.g. x86_64 wants to update max_pfn which should be done by the caller. Introduce add_pages() which should care about those details if they are needed. Each architecture should define its implementation and select CONFIG_ARCH_HAS_ADD_PAGES. All others use the currently existing __add_pages. Link: http://lkml.kernel.org/r/20170817000548.32038-7-jglisse@redhat.com Signed-off-by: Michal Hocko Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 4 ++++ arch/x86/mm/init_64.c | 22 +++++++++++++++------- include/linux/memory_hotplug.h | 11 +++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) commit 74eee180b935fcb9b83a56dd7648fb75caf38f0e Author: Jérôme Glisse Date: Fri Sep 8 16:11:35 2017 -0700 mm/hmm/mirror: device page fault handler This handles page fault on behalf of device driver, unlike handle_mm_fault() it does not trigger migration back to system memory for device memory. Link: http://lkml.kernel.org/r/20170817000548.32038-6-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 27 ++++++ mm/hmm.c | 256 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 271 insertions(+), 12 deletions(-) commit da4c3c735ea4dcc2a0b0ff0bd4803c336361b6f5 Author: Jérôme Glisse Date: Fri Sep 8 16:11:31 2017 -0700 mm/hmm/mirror: helper to snapshot CPU page table This does not use existing page table walker because we want to share same code for our page fault handler. Link: http://lkml.kernel.org/r/20170817000548.32038-5-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 55 +++++++++- mm/hmm.c | 285 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 338 insertions(+), 2 deletions(-) commit c0b124054f9e42eb6da545a10fe9122a7d7c3f72 Author: Jérôme Glisse Date: Fri Sep 8 16:11:27 2017 -0700 mm/hmm/mirror: mirror process address space on device with HMM helpers This is a heterogeneous memory management (HMM) process address space mirroring. In a nutshell this provide an API to mirror process address space on a device. This boils down to keeping CPU and device page table synchronize (we assume that both device and CPU are cache coherent like PCIe device can be). This patch provide a simple API for device driver to achieve address space mirroring thus avoiding each device driver to grow its own CPU page table walker and its own CPU page table synchronization mechanism. This is useful for NVidia GPU >= Pascal, Mellanox IB >= mlx5 and more hardware in the future. [jglisse@redhat.com: fix hmm for "mmu_notifier kill invalidate_page callback"] Link: http://lkml.kernel.org/r/20170830231955.GD9445@redhat.com Link: http://lkml.kernel.org/r/20170817000548.32038-4-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 110 +++++++++++++++++++++++++++++++++++++ mm/Kconfig | 12 +++++ mm/hmm.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 260 insertions(+), 15 deletions(-) commit 133ff0eac95b7dc6edf89dc51bd139a0630bbae7 Author: Jérôme Glisse Date: Fri Sep 8 16:11:23 2017 -0700 mm/hmm: heterogeneous memory management (HMM for short) HMM provides 3 separate types of functionality: - Mirroring: synchronize CPU page table and device page table - Device memory: allocating struct page for device memory - Migration: migrating regular memory to device memory This patch introduces some common helpers and definitions to all of those 3 functionality. Link: http://lkml.kernel.org/r/20170817000548.32038-3-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Evgeny Baskakov Signed-off-by: John Hubbard Signed-off-by: Mark Hairgrove Signed-off-by: Sherry Cheung Signed-off-by: Subhash Gutti Cc: Aneesh Kumar Cc: Balbir Singh Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 152 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mm_types.h | 6 ++ kernel/fork.c | 3 + mm/Kconfig | 13 ++++ mm/Makefile | 2 +- mm/hmm.c | 74 +++++++++++++++++++++++ 6 files changed, 249 insertions(+), 1 deletion(-) commit bffc33ec539699f045a9254144de3d4eace05f07 Author: Jérôme Glisse Date: Fri Sep 8 16:11:19 2017 -0700 hmm: heterogeneous memory management documentation Patch series "HMM (Heterogeneous Memory Management)", v25. Heterogeneous Memory Management (HMM) (description and justification) Today device driver expose dedicated memory allocation API through their device file, often relying on a combination of IOCTL and mmap calls. The device can only access and use memory allocated through this API. This effectively split the program address space into object allocated for the device and useable by the device and other regular memory (malloc, mmap of a file, share memory, â) only accessible by CPU (or in a very limited way by a device by pinning memory). Allowing different isolated component of a program to use a device thus require duplication of the input data structure using device memory allocator. This is reasonable for simple data structure (array, grid, image, â) but this get extremely complex with advance data structure (list, tree, graph, â) that rely on a web of memory pointers. This is becoming a serious limitation on the kind of work load that can be offloaded to device like GPU. New industry standard like C++, OpenCL or CUDA are pushing to remove this barrier. This require a shared address space between GPU device and CPU so that GPU can access any memory of a process (while still obeying memory protection like read only). This kind of feature is also appearing in various other operating systems. HMM is a set of helpers to facilitate several aspects of address space sharing and device memory management. Unlike existing sharing mechanism that rely on pining pages use by a device, HMM relies on mmu_notifier to propagate CPU page table update to device page table. Duplicating CPU page table is only one aspect necessary for efficiently using device like GPU. GPU local memory have bandwidth in the TeraBytes/ second range but they are connected to main memory through a system bus like PCIE that is limited to 32GigaBytes/second (PCIE 4.0 16x). Thus it is necessary to allow migration of process memory from main system memory to device memory. Issue is that on platform that only have PCIE the device memory is not accessible by the CPU with the same properties as main memory (cache coherency, atomic operations, ...). To allow migration from main memory to device memory HMM provides a set of helper to hotplug device memory as a new type of ZONE_DEVICE memory which is un-addressable by CPU but still has struct page representing it. This allow most of the core kernel logic that deals with a process memory to stay oblivious of the peculiarity of device memory. When page backing an address of a process is migrated to device memory the CPU page table entry is set to a new specific swap entry. CPU access to such address triggers a migration back to system memory, just like if the page was swap on disk. HMM also blocks any one from pinning a ZONE_DEVICE page so that it can always be migrated back to system memory if CPU access it. Conversely HMM does not migrate to device memory any page that is pin in system memory. To allow efficient migration between device memory and main memory a new migrate_vma() helpers is added with this patchset. It allows to leverage device DMA engine to perform the copy operation. This feature will be use by upstream driver like nouveau mlx5 and probably other in the future (amdgpu is next suspect in line). We are actively working on nouveau and mlx5 support. To test this patchset we also worked with NVidia close source driver team, they have more resources than us to test this kind of infrastructure and also a bigger and better userspace eco-system with various real industry workload they can be use to test and profile HMM. The expected workload is a program builds a data set on the CPU (from disk, from network, from sensors, â). Program uses GPU API (OpenCL, CUDA, ...) to give hint on memory placement for the input data and also for the output buffer. Program call GPU API to schedule a GPU job, this happens using device driver specific ioctl. All this is hidden from programmer point of view in case of C++ compiler that transparently offload some part of a program to GPU. Program can keep doing other stuff on the CPU while the GPU is crunching numbers. It is expected that CPU will not access the same data set as the GPU while GPU is working on it, but this is not mandatory. In fact we expect some small memory object to be actively access by both GPU and CPU concurrently as synchronization channel and/or for monitoring purposes. Such object will stay in system memory and should not be bottlenecked by system bus bandwidth (rare write and read access from both CPU and GPU). As we are relying on device driver API, HMM does not introduce any new syscall nor does it modify any existing ones. It does not change any POSIX semantics or behaviors. For instance the child after a fork of a process that is using HMM will not be impacted in anyway, nor is there any data hazard between child COW or parent COW of memory that was migrated to device prior to fork. HMM assume a numbers of hardware features. Device must allow device page table to be updated at any time (ie device job must be preemptable). Device page table must provides memory protection such as read only. Device must track write access (dirty bit). Device must have a minimum granularity that match PAGE_SIZE (ie 4k). Reviewer (just hint): Patch 1 HMM documentation Patch 2 introduce core infrastructure and definition of HMM, pretty small patch and easy to review Patch 3 introduce the mirror functionality of HMM, it relies on mmu_notifier and thus someone familiar with that part would be in better position to review Patch 4 is an helper to snapshot CPU page table while synchronizing with concurrent page table update. Understanding mmu_notifier makes review easier. Patch 5 is mostly a wrapper around handle_mm_fault() Patch 6 add new add_pages() helper to avoid modifying each arch memory hot plug function Patch 7 add a new memory type for ZONE_DEVICE and also add all the logic in various core mm to support this new type. Dan Williams and any core mm contributor are best people to review each half of this patchset Patch 8 special case HMM ZONE_DEVICE pages inside put_page() Kirill and Dan Williams are best person to review this Patch 9 allow to uncharge a page from memory group without using the lru list field of struct page (best reviewer: Johannes Weiner or Vladimir Davydov or Michal Hocko) Patch 10 Add support to uncharge ZONE_DEVICE page from a memory cgroup (best reviewer: Johannes Weiner or Vladimir Davydov or Michal Hocko) Patch 11 add helper to hotplug un-addressable device memory as new type of ZONE_DEVICE memory (new type introducted in patch 3 of this serie). This is boiler plate code around memory hotplug and it also pick a free range of physical address for the device memory. Note that the physical address do not point to anything (at least as far as the kernel knows). Patch 12 introduce a new hmm_device class as an helper for device driver that want to expose multiple device memory under a common fake device driver. This is usefull for multi-gpu configuration. Anyone familiar with device driver infrastructure can review this. Boiler plate code really. Patch 13 add a new migrate mode. Any one familiar with page migration is welcome to review. Patch 14 introduce a new migration helper (migrate_vma()) that allow to migrate a range of virtual address of a process using device DMA engine to perform the copy. It is not limited to do copy from and to device but can also do copy between any kind of source and destination memory. Again anyone familiar with migration code should be able to verify the logic. Patch 15 optimize the new migrate_vma() by unmapping pages while we are collecting them. This can be review by any mm folks. Patch 16 add unaddressable memory migration to helper introduced in patch 7, this can be review by anyone familiar with migration code Patch 17 add a feature that allow device to allocate non-present page on the GPU when migrating a range of address to device memory. This is an helper for device driver to avoid having to first allocate system memory before migration to device memory Patch 18 add a new kind of ZONE_DEVICE memory for cache coherent device memory (CDM) Patch 19 add an helper to hotplug CDM memory Previous patchset posting : v1 http://lwn.net/Articles/597289/ v2 https://lkml.org/lkml/2014/6/12/559 v3 https://lkml.org/lkml/2014/6/13/633 v4 https://lkml.org/lkml/2014/8/29/423 v5 https://lkml.org/lkml/2014/11/3/759 v6 http://lwn.net/Articles/619737/ v7 http://lwn.net/Articles/627316/ v8 https://lwn.net/Articles/645515/ v9 https://lwn.net/Articles/651553/ v10 https://lwn.net/Articles/654430/ v11 http://www.gossamer-threads.com/lists/linux/kernel/2286424 v12 http://www.kernelhub.org/?msg=972982&p=2 v13 https://lwn.net/Articles/706856/ v14 https://lkml.org/lkml/2016/12/8/344 v15 http://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1304107.html v16 http://www.spinics.net/lists/linux-mm/msg119814.html v17 https://lkml.org/lkml/2017/1/27/847 v18 https://lkml.org/lkml/2017/3/16/596 v19 https://lkml.org/lkml/2017/4/5/831 v20 https://lwn.net/Articles/720715/ v21 https://lkml.org/lkml/2017/4/24/747 v22 http://lkml.iu.edu/hypermail/linux/kernel/1705.2/05176.html v23 https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1404788.html v24 https://lwn.net/Articles/726691/ This patch (of 19): This adds documentation for HMM (Heterogeneous Memory Management). It presents the motivation behind it, the features necessary for it to be useful and and gives an overview of how this is implemented. Link: http://lkml.kernel.org/r/20170817000548.32038-2-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: John Hubbard Cc: Dan Williams Cc: David Nellans Cc: Balbir Singh Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Evgeny Baskakov Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Michal Hocko Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Vladimir Davydov Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/hmm.txt | 384 +++++++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 391 insertions(+) commit 8135d8926c08e553e39b0b040c6d01f0daef0676 Author: Naoya Horiguchi Date: Fri Sep 8 16:11:15 2017 -0700 mm: memory_hotplug: memory hotremove supports thp migration This patch enables thp migration for memory hotremove. Link: http://lkml.kernel.org/r/20170717193955.20207-11-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 15 ++++++++++++++- mm/memory_hotplug.c | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) commit e8db67eb0ded3797085f032c84b5d8248f412de3 Author: Naoya Horiguchi Date: Fri Sep 8 16:11:12 2017 -0700 mm: migrate: move_pages() supports thp migration This patch enables thp migration for move_pages(2). Link: http://lkml.kernel.org/r/20170717193955.20207-10-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) commit c8633798497ce894c22ab083eb884c8294c537b2 Author: Naoya Horiguchi Date: Fri Sep 8 16:11:08 2017 -0700 mm: mempolicy: mbind and migrate_pages support thp migration This patch enables thp migration for mbind(2) and migrate_pages(2). Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 108 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 79 insertions(+), 29 deletions(-) commit ab6e3d0939bb332d72444a532f0f72e0dfde7b7b Author: Naoya Horiguchi Date: Fri Sep 8 16:11:04 2017 -0700 mm: soft-dirty: keep soft-dirty bits over thp migration Soft dirty bit is designed to keep tracked over page migration. This patch makes it work in the same manner for thp migration too. Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 17 +++++++++++++++++ fs/proc/task_mmu.c | 27 ++++++++++++++++----------- include/asm-generic/pgtable.h | 34 +++++++++++++++++++++++++++++++++- include/linux/swapops.h | 2 ++ mm/huge_memory.c | 27 ++++++++++++++++++++++++--- 5 files changed, 92 insertions(+), 15 deletions(-) commit 84c3fc4e9c563d8fb91cfdf5948da48fe1af34d3 Author: Zi Yan Date: Fri Sep 8 16:11:01 2017 -0700 mm: thp: check pmd migration entry in common path When THP migration is being used, memory management code needs to handle pmd migration entries properly. This patch uses !pmd_present() or is_swap_pmd() (depending on whether pmd_none() needs separate code or not) to check pmd migration entries at the places where a pmd entry is present. Since pmd-related code uses split_huge_page(), split_huge_pmd(), pmd_trans_huge(), pmd_trans_unstable(), or pmd_none_or_trans_huge_or_clear_bad(), this patch: 1. adds pmd migration entry split code in split_huge_pmd(), 2. takes care of pmd migration entries whenever pmd_trans_huge() is present, 3. makes pmd_none_or_trans_huge_or_clear_bad() pmd migration entry aware. Since split_huge_page() uses split_huge_pmd() and pmd_trans_unstable() is equivalent to pmd_none_or_trans_huge_or_clear_bad(), we do not change them. Until this commit, a pmd entry should be: 1. pointing to a pte page, 2. is_swap_pmd(), 3. pmd_trans_huge(), 4. pmd_devmap(), or 5. pmd_none(). Signed-off-by: Zi Yan Cc: Kirill A. Shutemov Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Mel Gorman Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 32 +++++++++++++-------- include/asm-generic/pgtable.h | 18 +++++++++++- include/linux/huge_mm.h | 14 ++++++++-- mm/gup.c | 22 +++++++++++++-- mm/huge_memory.c | 65 +++++++++++++++++++++++++++++++++++++++---- mm/memcontrol.c | 5 ++++ mm/memory.c | 12 ++++++-- mm/mprotect.c | 4 +-- mm/mremap.c | 2 +- 9 files changed, 147 insertions(+), 27 deletions(-) commit 616b8371539a6c487404c3b8fb04078016dab4ba Author: Zi Yan Date: Fri Sep 8 16:10:57 2017 -0700 mm: thp: enable thp migration in generic path Add thp migration's core code, including conversions between a PMD entry and a swap entry, setting PMD migration entry, removing PMD migration entry, and waiting on PMD migration entries. This patch makes it possible to support thp migration. If you fail to allocate a destination page as a thp, you just split the source thp as we do now, and then enter the normal page migration. If you succeed to allocate destination thp, you enter thp migration. Subsequent patches actually enable thp migration for each caller of page migration by allowing its get_new_page() callback to allocate thps. [zi.yan@cs.rutgers.edu: fix gcc-4.9.0 -Wmissing-braces warning] Link: http://lkml.kernel.org/r/A0ABA698-7486-46C3-B209-E95A9048B22C@cs.rutgers.edu [akpm@linux-foundation.org: fix x86_64 allnoconfig warning] Signed-off-by: Zi Yan Acked-by: Kirill A. Shutemov Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Mel Gorman Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable_64.h | 2 + include/linux/swapops.h | 73 ++++++++++++++++++++++++++++++++-- mm/huge_memory.c | 84 ++++++++++++++++++++++++++++++++++++--- mm/migrate.c | 32 ++++++++++++++- mm/page_vma_mapped.c | 18 +++++++-- mm/pgtable-generic.c | 3 +- mm/rmap.c | 13 ++++++ 7 files changed, 212 insertions(+), 13 deletions(-) commit 9c670ea37947a82cb6d4df69139f7e46ed71a0ac Author: Naoya Horiguchi Date: Fri Sep 8 16:10:53 2017 -0700 mm: thp: introduce CONFIG_ARCH_ENABLE_THP_MIGRATION Introduce CONFIG_ARCH_ENABLE_THP_MIGRATION to limit thp migration functionality to x86_64, which should be safer at the first step. Link: http://lkml.kernel.org/r/20170717193955.20207-5-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Reviewed-by: Anshuman Khandual Cc: "H. Peter Anvin" Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 4 ++++ include/linux/huge_mm.h | 10 ++++++++++ mm/Kconfig | 3 +++ 3 files changed, 17 insertions(+) commit b5ff8161e37cef3265e186ecded23324e4dc2973 Author: Naoya Horiguchi Date: Fri Sep 8 16:10:49 2017 -0700 mm: thp: introduce separate TTU flag for thp freezing TTU_MIGRATION is used to convert pte into migration entry until thp split completes. This behavior conflicts with thp migration added later patches, so let's introduce a new TTU flag specifically for freezing. try_to_unmap() is used both for thp split (via freeze_page()) and page migration (via __unmap_and_move()). In freeze_page(), ttu_flag given for head page is like below (assuming anonymous thp): (TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS | TTU_RMAP_LOCKED | \ TTU_MIGRATION | TTU_SPLIT_HUGE_PMD) and ttu_flag given for tail pages is: (TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS | TTU_RMAP_LOCKED | \ TTU_MIGRATION) __unmap_and_move() calls try_to_unmap() with ttu_flag: (TTU_MIGRATION | TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS) Now I'm trying to insert a branch for thp migration at the top of try_to_unmap_one() like below static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, unsigned long address, void *arg) { ... /* PMD-mapped THP migration entry */ if (!pvmw.pte && (flags & TTU_MIGRATION)) { if (!PageAnon(page)) continue; set_pmd_migration_entry(&pvmw, page); continue; } ... } so try_to_unmap() for tail pages called by thp split can go into thp migration code path (which converts *pmd* into migration entry), while the expectation is to freeze thp (which converts *pte* into migration entry.) I detected this failure as a "bad page state" error in a testcase where split_huge_page() is called from queue_pages_pte_range(). Link: http://lkml.kernel.org/r/20170717193955.20207-4-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Acked-by: Kirill A. Shutemov Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: Ingo Molnar Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 3 ++- mm/huge_memory.c | 2 +- mm/rmap.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit eee4818baac0f2b37848fdf90e4b16430dc536ac Author: Naoya Horiguchi Date: Fri Sep 8 16:10:46 2017 -0700 mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1 _PAGE_PSE is used to distinguish between a truly non-present (_PAGE_PRESENT=0) PMD, and a PMD which is undergoing a THP split and should be treated as present. But _PAGE_SWP_SOFT_DIRTY currently uses the _PAGE_PSE bit, which would cause confusion between one of those PMDs undergoing a THP split, and a soft-dirty PMD. Dropping _PAGE_PSE check in pmd_present() does not work well, because it can hurt optimization of tlb handling in thp split. Thus, we need to move the bit. In the current kernel, bits 1-4 are not used in non-present format since commit 00839ee3b299 ("x86/mm: Move swap offset/type up in PTE to work around erratum"). So let's move _PAGE_SWP_SOFT_DIRTY to bit 1. Bit 7 is used as reserved (always clear), so please don't use it for other purpose. Link: http://lkml.kernel.org/r/20170717193955.20207-3-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Acked-by: Dave Hansen Cc: "H. Peter Anvin" Cc: Anshuman Khandual Cc: David Nellans Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable_64.h | 12 +++++++++--- arch/x86/include/asm/pgtable_types.h | 10 +++++----- 2 files changed, 14 insertions(+), 8 deletions(-) commit 88aaa2a1d7326bdb6fd2a6bd7264008a343272cd Author: Naoya Horiguchi Date: Fri Sep 8 16:10:42 2017 -0700 mm: mempolicy: add queue_pages_required() Patch series "mm: page migration enhancement for thp", v9. Motivations: 1. THP migration becomes important in the upcoming heterogeneous memory systems. As David Nellans from NVIDIA pointed out from other threads (http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1349227.html), future GPUs or other accelerators will have their memory managed by operating systems. Moving data into and out of these memory nodes efficiently is critical to applications that use GPUs or other accelerators. Existing page migration only supports base pages, which has a very low memory bandwidth utilization. My experiments (see below) show THP migration can migrate pages more efficiently. 2. Base page migration vs THP migration throughput. Here are cross-socket page migration results from calling move_pages() syscall: In x86_64, a Intel two-socket E5-2640v3 box, - single 4KB base page migration takes 62.47 us, using 0.06 GB/s BW, - single 2MB THP migration takes 658.54 us, using 2.97 GB/s BW, - 512 4KB base page migration takes 1987.38 us, using 0.98 GB/s BW. In ppc64, a two-socket Power8 box, - single 64KB base page migration takes 49.3 us, using 1.24 GB/s BW, - single 16MB THP migration takes 2202.17 us, using 7.10 GB/s BW, - 256 64KB base page migration takes 2543.65 us, using 6.14 GB/s BW. THP migration can give us 3x and 1.15x throughput over base page migration in x86_64 and ppc64 respectivley. You can test it out by using the code here: https://github.com/x-y-z/thp-migration-bench 3. Existing page migration splits THP before migration and cannot guarantee the migrated pages are still contiguous. Contiguity is always what GPUs and accelerators look for. Without THP migration, khugepaged needs to do extra work to reassemble the migrated pages back to THPs. This patch (of 10): Introduce a separate check routine related to MPOL_MF_INVERT flag. This patch just does cleanup, no behavioral change. Link: http://lkml.kernel.org/r/20170717193955.20207-2-zi.yan@sent.com Signed-off-by: Naoya Horiguchi Signed-off-by: Zi Yan Cc: Kirill A. Shutemov Cc: Minchan Kim Cc: Vlastimil Babka Cc: Mel Gorman Cc: Anshuman Khandual Cc: Dave Hansen Cc: David Nellans Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andrea Arcangeli Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 32a805baf0fb70b6dbedefcd7249ac7f580f9e3b Author: Eric Dumazet Date: Fri Sep 8 15:48:47 2017 -0700 ipv6: fix typo in fib6_net_exit() IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ. Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns destruction") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f3b359f1004bd34b7b0bad70b93e3c7af92a37b Author: Eric Dumazet Date: Fri Sep 8 12:44:47 2017 -0700 tcp: fix a request socket leak While the cited commit fixed a possible deadlock, it added a leak of the request socket, since reqsk_put() must be called if the BPF filter decided the ACK packet must be dropped. Fixes: d624d276d1dd ("tcp: fix possible deadlock in TCP stack vs BPF filter") Signed-off-by: Eric Dumazet Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 6 +++--- net/ipv6/tcp_ipv6.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0e271fd59fe9e6d8c932309e7a42a4519c5aac6f Merge: ee89252 00ebbeb Author: Linus Torvalds Date: Fri Sep 8 16:04:50 2017 -0700 Merge tag 'platform-drivers-x86-v4.14-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Several fixes from static analysis and message noise reduction. Correct WMI core and related drivers to evaluate instance number 0x0 in accordance with the documentation. Add intel-telemetry support for Gemini Lake. Various individual driver fixes noted below. dell-wmi: - Update dell_wmi_check_descriptor_buffer() to new model intel-vbtn: - reduce unnecessary messages for normal users - match power button on press rather than release intel-hid: - reduce unnecessary messages for normal users thinkpad_acpi: - Fix warning about deprecated hwmon_device_register wmi: - Fix check for method instance number ideapad-laptop: - Expose conservation mode switch intel_pmc_core: - Make the driver PCH family agnostic peaq-wmi: - Evaluate wmi method with instance number 0x0 - silence a static checker warning mxm-wmi: - Evaluate wmi method with instance number 0x0 asus-wmi: - Evaluate wmi method with instance number 0x0 intel_scu_ipc: - make intel_scu_ipc_pdata_t const intel_mid_powerbtn: - make mid_pb_ddata const - fix error return code in mid_pb_probe() hp-wmi: - Remove unused macro helper - Correctly determine method id in WMI calls dell-wmi: - Fix driver interface version query intel_telemetry: - remove redundant macro definition - Add GLK PSS Event Table alienware-wmi: - fix format string overflow warning ibm_rtl: - remove unnecessary static in ibm_rtl_write() msi-wmi: - remove unnecessary static in msi_wmi_notify()" * tag 'platform-drivers-x86-v4.14-1' of git://git.infradead.org/linux-platform-drivers-x86: (23 commits) platform/x86: dell-wmi: Update dell_wmi_check_descriptor_buffer() to new model platform/x86: intel-vbtn: reduce unnecessary messages for normal users platform/x86: intel-hid: reduce unnecessary messages for normal users platform/x86: thinkpad_acpi: Fix warning about deprecated hwmon_device_register platform/x86: wmi: Fix check for method instance number platform/x86: ideapad-laptop: Expose conservation mode switch platform/x86: intel_pmc_core: Make the driver PCH family agnostic platform/x86: peaq-wmi: Evaluate wmi method with instance number 0x0 platform/x86: mxm-wmi: Evaluate wmi method with instance number 0x0 platform/x86: asus-wmi: Evaluate wmi method with instance number 0x0 platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const platform/x86: intel_mid_powerbtn: make mid_pb_ddata const platform/x86: intel_mid_powerbtn: fix error return code in mid_pb_probe() platform/x86: hp-wmi: Remove unused macro helper platform/x86: hp-wmi: Correctly determine method id in WMI calls platform/x86: intel-vbtn: match power button on press rather than release platform/x86: dell-wmi: Fix driver interface version query platform/x86: intel_telemetry: remove redundant macro definition platform/x86: intel_telemetry: Add GLK PSS Event Table platform/x86: alienware-wmi: fix format string overflow warning ... commit ee89252b9edf08a8be3a4f5db53c56d39c872822 Merge: 0d519f2 1ee55a8 Author: Linus Torvalds Date: Fri Sep 8 16:02:18 2017 -0700 Merge tag 'arc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - Support for HSDK board hosting a Quad core HS38x4 based SoC running @1GHz (and some prerrquisite changes such as ability to scoot the kernel code/data from start of memory map etc) - Quite a few updates for EZChip (Mellanox) platform - Fixes to fault/exception printing * tag 'arc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (26 commits) ARC: Re-enable MMU upon Machine Check exception ARC: Show fault information passed to show_kernel_fault_diag() ARC: [plat-hsdk] initial port for HSDK board ARC: mm: Decouple RAM base address from kernel link address ARCv2: IOC: Tighten up the contraints (specifically base / size alignment) ARC: [plat-axs103] refactor the DT fudging code ARC: [plat-axs103] use clk driver #2: Add core pll node to DT to manage cpu clk ARC: [plat-axs103] use clk driver #1: Get rid of platform specific cpu clk setting ARCv2: SLC: provide a line based flush routine for debugging ARC: Hardcode ARCH_DMA_MINALIGN to max line length we may have ARC: [plat-eznps] handle extra aux regs #2: kernel/entry exit ARC: [plat-eznps] handle extra aux regs #1: save/restore on context switch ARC: [plat-eznps] avoid toggling of DPC register ARC: [plat-eznps] Update the init sequence of aux regs per cpu. ARC: [plat-eznps] new command line argument for HW scheduler at MTM ARC: set boot print log level to PR_INFO ARC: [plat-eznps] Handle user memory error same in simulation and silicon ARC: [plat-eznps] use schd.wft instruction instead of sleep at idle task ARC: create cpu specific version of arch_cpu_idle() ARC: [plat-eznps] spinlock aware for MTM ... commit 0d519f2d1ed1f11e49abc88cfcf6cf13b83ba14c Merge: 0756b7f cf2d804 Author: Linus Torvalds Date: Fri Sep 8 15:47:43 2017 -0700 Merge tag 'pci-v4.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - add enhanced Downstream Port Containment support, which prints more details about Root Port Programmed I/O errors (Dongdong Liu) - add Layerscape ls1088a and ls2088a support (Hou Zhiqiang) - add MediaTek MT2712 and MT7622 support (Ryder Lee) - add MediaTek MT2712 and MT7622 MSI support (Honghui Zhang) - add Qualcom IPQ8074 support (Varadarajan Narayanan) - add R-Car r8a7743/5 device tree support (Biju Das) - add Rockchip per-lane PHY support for better power management (Shawn Lin) - fix IRQ mapping for hot-added devices by replacing the pci_fixup_irqs() boot-time design with a host bridge hook called at probe-time (Lorenzo Pieralisi, Matthew Minter) - fix race when enabling two devices that results in upstream bridge not being enabled correctly (Srinath Mannam) - fix pciehp power fault infinite loop (Keith Busch) - fix SHPC bridge MSI hotplug events by enabling bus mastering (Aleksandr Bezzubikov) - fix a VFIO issue by correcting PCIe capability sizes (Alex Williamson) - fix an INTD issue on Xilinx and possibly other drivers by unifying INTx IRQ domain support (Paul Burton) - avoid IOMMU stalls by marking AMD Stoney GPU ATS as broken (Joerg Roedel) - allow APM X-Gene device assignment to guests by adding an ACS quirk (Feng Kan) - fix driver crashes by disabling Extended Tags on Broadcom HT2100 (Extended Tags support is required for PCIe Receivers but not Requesters, and we now enable them by default when Requesters support them) (Sinan Kaya) - fix MSIs for devices that use phantom RIDs for DMA by assuming MSIs use the real Requester ID (not a phantom RID) (Robin Murphy) - prevent assignment of Intel VMD children to guests (which may be supported eventually, but isn't yet) by not associating an IOMMU with them (Jon Derrick) - fix Intel VMD suspend/resume by releasing IRQs on suspend (Scott Bauer) - fix a Function-Level Reset issue with Intel 750 NVMe by waiting longer (up to 60sec instead of 1sec) for device to become ready (Sinan Kaya) - fix a Function-Level Reset issue on iProc Stingray by working around hardware defects in the CRS implementation (Oza Pawandeep) - fix an issue with Intel NVMe P3700 after an iProc reset by adding a delay during shutdown (Oza Pawandeep) - fix a Microsoft Hyper-V lockdep issue by polling instead of blocking in compose_msi_msg() (Stephen Hemminger) - fix a wireless LAN driver timeout by clearing DesignWare MSI interrupt status after it is handled, not before (Faiz Abbas) - fix DesignWare ATU enable checking (Jisheng Zhang) - reduce Layerscape dependencies on the bootloader by doing more initialization in the driver (Hou Zhiqiang) - improve Intel VMD performance allowing allocation of more IRQ vectors than present CPUs (Keith Busch) - improve endpoint framework support for initial DMA mask, different BAR sizes, configurable page sizes, MSI, test driver, etc (Kishon Vijay Abraham I, Stan Drozd) - rework CRS support to add periodic messages while we poll during enumeration and after Function-Level Reset and prepare for possible other uses of CRS (Sinan Kaya) - clean up Root Port AER handling by removing unnecessary code and moving error handler methods to struct pcie_port_service_driver (Christoph Hellwig) - clean up error handling paths in various drivers (Bjorn Andersson, Fabio Estevam, Gustavo A. R. Silva, Harunobu Kurokawa, Jeffy Chen, Lorenzo Pieralisi, Sergei Shtylyov) - clean up SR-IOV resource handling by disabling VF decoding before updating the corresponding resource structs (Gavin Shan) - clean up DesignWare-based drivers by unifying quirks to update Class Code and Interrupt Pin and related handling of write-protected registers (Hou Zhiqiang) - clean up by adding empty generic pcibios_align_resource() and pcibios_fixup_bus() and removing empty arch-specific implementations (Palmer Dabbelt) - request exclusive reset control for several drivers to allow cleanup elsewhere (Philipp Zabel) - constify various structures (Arvind Yadav, Bhumika Goyal) - convert from full_name() to %pOF (Rob Herring) - remove unused variables from iProc, HiSi, Altera, Keystone (Shawn Lin) * tag 'pci-v4.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (170 commits) PCI: xgene: Clean up whitespace PCI: xgene: Define XGENE_PCI_EXP_CAP and use generic PCI_EXP_RTCTL offset PCI: xgene: Fix platform_get_irq() error handling PCI: xilinx-nwl: Fix platform_get_irq() error handling PCI: rockchip: Fix platform_get_irq() error handling PCI: altera: Fix platform_get_irq() error handling PCI: spear13xx: Fix platform_get_irq() error handling PCI: artpec6: Fix platform_get_irq() error handling PCI: armada8k: Fix platform_get_irq() error handling PCI: dra7xx: Fix platform_get_irq() error handling PCI: exynos: Fix platform_get_irq() error handling PCI: iproc: Clean up whitespace PCI: iproc: Rename PCI_EXP_CAP to IPROC_PCI_EXP_CAP PCI: iproc: Add 500ms delay during device shutdown PCI: Fix typos and whitespace errors PCI: Remove unused "res" variable from pci_resource_io() PCI: Correct kernel-doc of pci_vpd_srdt_size(), pci_vpd_srdt_tag() PCI/AER: Reformat AER register definitions iommu/vt-d: Prevent VMD child devices from being remapping targets x86/PCI: Use is_vmd() rather than relying on the domain number ... commit 0756b7fbb696d2cb18785da9cab13ec164017f64 Merge: 6d62189 5f54c8b Author: Linus Torvalds Date: Fri Sep 8 15:18:36 2017 -0700 Merge tag 'kvm-4.14-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.14 Common: - improve heuristic for boosting preempted spinlocks by ignoring VCPUs in user mode ARM: - fix for decoding external abort types from guests - added support for migrating the active priority of interrupts when running a GICv2 guest on a GICv3 host - minor cleanup PPC: - expose storage keys to userspace - merge kvm-ppc-fixes with a fix that missed 4.13 because of vacations - fixes s390: - merge of kvm/master to avoid conflicts with additional sthyi fixes - wire up the no-dat enhancements in KVM - multiple epoch facility (z14 feature) - Configuration z/Architecture Mode - more sthyi fixes - gdb server range checking fix - small code cleanups x86: - emulate Hyper-V TSC frequency MSRs - add nested INVPCID - emulate EPTP switching VMFUNC - support Virtual GIF - support 5 level page tables - speedup nested VM exits by packing byte operations - speedup MMIO by using hardware provided physical address - a lot of fixes and cleanups, especially nested" * tag 'kvm-4.14-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (67 commits) KVM: arm/arm64: Support uaccess of GICC_APRn KVM: arm/arm64: Extract GICv3 max APRn index calculation KVM: arm/arm64: vITS: Drop its_ite->lpi field KVM: arm/arm64: vgic: constify seq_operations and file_operations KVM: arm/arm64: Fix guest external abort matching KVM: PPC: Book3S HV: Fix memory leak in kvm_vm_ioctl_get_htab_fd KVM: s390: vsie: cleanup mcck reinjection KVM: s390: use WARN_ON_ONCE only for checking KVM: s390: guestdbg: fix range check KVM: PPC: Book3S HV: Report storage key support to userspace KVM: PPC: Book3S HV: Fix case where HDEC is treated as 32-bit on POWER9 KVM: PPC: Book3S HV: Fix invalid use of register expression KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation KVM: PPC: Book3S HV: Fix setting of storage key in H_ENTER KVM: PPC: e500mc: Fix a NULL dereference KVM: PPC: e500: Fix some NULL dereferences on error KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list KVM: s390: we are always in czam mode KVM: s390: expose no-DAT to guest and migration support KVM: s390: sthyi: remove invalid guest write access ... commit 6d6218976df142ba5594371f8dbd56650151c56f Merge: 42c8e86 369130b Author: Linus Torvalds Date: Fri Sep 8 15:11:20 2017 -0700 Merge tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - TAP13 framework API and converting tests to TAP13 continues. A few more tests are converted and kselftest common RUN_TESTS in lib.mk is enhanced to print TAP13 to cover test shell scripts that won't be able to use kselftest API. - Several fixes to existing tests to not fail in unsupported cases. This has been an ongoing work based on the feedback from stable release kselftest users. - A new watchdog test and much needed cleanups to the existing tests from Eugeniu Rosca. - Changes to kselftest common lib.mk framework to make RUN_TESTS a function to be called from individual test make files to run stress and destructive sub-tests. * tag 'linux-kselftest-4.14-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (41 commits) selftests: Enhance kselftest_harness.h to print which assert failed selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format selftests: change lib.mk RUN_TESTS to take test list as an argument selftests: lib.mk: suppress "cd" output from run_tests target selftests: kselftest framework: change skip exit code to 0 selftests/timers: make loop consistent with array size selftests: timers: remove rtctest_setdate from run_destructive_tests selftests: timers: Fix run_destructive_tests target to handle skipped tests kselftests: timers: leap-a-day: Change default arguments to help test runs selftests: timers: drop support for !KTEST case rtc: rtctest: Improve support detection selftests/cpu-hotplug: Skip test when there is only one online cpu selftests/cpu-hotplug: exit with failure when test occured unexpected behaviors selftests: futex: convert test to use ksft TAP13 framework selftests: capabilities: convert error output to TAP13 ksft framework selftests: memfd: Align STACK_SIZE for ARM AArch64 system selftests: warn if failure is due to lack of executable bit selftests: kselftest framework: add error counter selftests: capabilities: convert the test to use TAP13 ksft framework selftests: capabilities: fix to run Non-root +ia, sgidroot => i test ... commit 42c8e86c9c3e15ac653c31d57b2f985579c2991d Merge: 3aea311 170b3b1 Author: Linus Torvalds Date: Fri Sep 8 15:08:14 2017 -0700 Merge tag 'trace-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "Nothing new in development for this release. These are mostly fixes that were found during development of changes for the next merge window and fixes that were sent to me late in the last cycle" * tag 'trace-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Apply trace_clock changes to instance max buffer tracing: Fix clear of RECORDED_TGID flag when disabling trace event tracing: Add barrier to trace_printk() buffer nesting modification ftrace: Fix memleak when unregistering dynamic ops when tracing disabled ftrace: Fix selftest goto location on error ftrace: Zero out ftrace hashes when a module is removed tracing: Only have rmmod clear buffers that its events were active in ftrace: Fix debug preempt config name in stack_tracer_{en,dis}able commit 3aea311c1b4002bd730a09530f80f2f2ad3bf495 Author: Linus Torvalds Date: Fri Sep 8 14:32:34 2017 -0700 genksyms: fix gperf removal conversion I had stupidly missed one special use of 'is_reserved_word()' when I converted the code to avoid gperf. I had changed that function to return the token ID directly rather than a pointer to the token descriptor structure, but that meant that the test for "is this a reserved word" changed from checking the return value against NULL, to checking that it wasn't negative. And while I had converted the main token parser over, I missed the special case of the typeof phrase handling. And since our dependency chain for genksyms does not include the genksyms program itself changing, my kernel rebuild didn't show the problem. Fixes: bb3290d91695 ("Remove gperf usage from toolchain") Reported-by: Masahiro Yamada Signed-off-by: Linus Torvalds scripts/genksyms/lex.l | 2 +- scripts/genksyms/lex.lex.c_shipped | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 108074611015bccfaf9ef50710edfd6929e55cd3 Merge: 91aac56 90c4ae4 Author: David S. Miller Date: Fri Sep 8 11:35:55 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) Fix SCTP connection setup when IPVS module is loaded and any scheduler is registered, from Xin Long. 2) Don't create a SCTP connection from SCTP ABORT packets, also from Xin Long. 3) WARN_ON() and drop packet, instead of BUG_ON() races when calling nf_nat_setup_info(). This is specifically a longstanding problem when br_netfilter with conntrack support is in place, patch from Florian Westphal. 4) Avoid softlock splats via iptables-restore, also from Florian. 5) Revert NAT hashtable conversion to rhashtable, semantics of rhlist are different from our simple NAT hashtable, this has been causing problems in the recent Linux kernel releases. From Florian. 6) Add per-bucket spinlock for NAT hashtable, so at least we restore one of the benefits we got from the previous rhashtable conversion. 7) Fix incorrect hashtable size in memory allocation in xt_hashlimit, from Zhizhou Tian. 8) Fix build/link problems with hashlimit and 32-bit arches, to address recent fallout from a new hashlimit mode, from Vishwanath Pai. ==================== Signed-off-by: David S. Miller commit 015a9e66b9b8c1f28097ed09bf9350708e26249a Author: Linus Torvalds Date: Fri Sep 8 10:17:20 2017 -0700 RDMA/netlink: clean up message validity array initializer The fix in the parent made me look at that function, and react to how illogical and illegible the array initializer was. Use named array indexes to make it clearer what is going on, and make the initializer not depend silently on the exact index numbers. [ The initializer now also shows an odd inconsistency in the naming: note the IWCM vs IWPM.. - Linus ] Cc: Leon Romanovsky Cc: Doug Ledford Signed-off-by: Linus Torvalds drivers/infiniband/core/netlink.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 91aac5637fc0f1db54edcccfc96a00879ec86411 Merge: 7906b00 f957dd3 Author: David S. Miller Date: Fri Sep 8 10:09:57 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.14 Few fixes to regressions introduced in the last one or two releases. The iwlwifi fix is for a regression reported by Linus. rtlwifi * fix two antenna selection related bugs iwlwifi * fix regression with older firmwares brcmfmac * workaround firmware crash for bcm4345 ==================== Signed-off-by: David S. Miller commit 7906b00f5cd1cd484fced7fcda892176e3202c8a Author: Marcelo Ricardo Leitner Date: Fri Sep 8 11:35:21 2017 -0300 sctp: fix missing wake ups in some situations Commit fb586f25300f ("sctp: delay calls to sk_data_ready() as much as possible") minimized the number of wake ups that are triggered in case the association receives a packet with multiple data chunks on it and/or when io_events are enabled and then commit 0970f5b36659 ("sctp: signal sk_data_ready earlier on data chunks reception") moved the wake up to as soon as possible. It thus relies on the state machine running later to clean the flag that the event was already generated. The issue is that there are 2 call paths that calls sctp_ulpq_tail_event() outside of the state machine, causing the flag to linger and possibly omitting a needed wake up in the sequence. One of the call paths is when enabling SCTP_SENDER_DRY_EVENTS via setsockopt(SCTP_EVENTS), as noticed by Harald Welte. The other is when partial reliability triggers removal of chunks from the send queue when the application calls sendmsg(). This commit fixes it by not setting the flag in case the socket is not owned by the user, as it won't be cleaned later. This works for user-initiated calls and also for rx path processing. Fixes: fb586f25300f ("sctp: delay calls to sk_data_ready() as much as possible") Reported-by: Harald Welte Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/ulpqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8b2c7e7a3cb2093bf3257c146c5822437fdf3124 Author: Leon Romanovsky Date: Fri Sep 8 13:02:26 2017 +0300 RDAM/netlink: Fix out-of-bound access while checking message validity The netlink message sent with type == 0, which doesn't have any client behind it, caused to the overflow in max_num_ops array. Fix it by declaring zero number of ops for the first client. Fixes: c9901724a2f1 ("RDMA/netlink: Remove netlink clients infrastructure") Signed-off-by: Leon Romanovsky Signed-off-by: Linus Torvalds drivers/infiniband/core/netlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 90c4ae4e2c1da9f1eaf846136861af43d4c1ff34 Author: Vishwanath Pai Date: Fri Sep 8 01:38:58 2017 -0400 netfilter: xt_hashlimit: fix build error caused by 64bit division 64bit division causes build/link errors on 32bit architectures. It prints out error messages like: ERROR: "__aeabi_uldivmod" [net/netfilter/xt_hashlimit.ko] undefined! The value of avg passed through by userspace in BYTE mode cannot exceed U32_MAX. Which means 64bit division in user2rate_bytes is unnecessary. To fix this I have changed the type of param 'user' to u32. Since anything greater than U32_MAX is an invalid input we error out in hashlimit_mt_check_common() when this is the case. Changes in v2: Making return type as u32 would cause an overflow for small values of 'user' (for example 2, 3 etc). To avoid this I bumped up 'r' to u64 again as well as the return type. This is OK since the variable that stores the result is u64. We still avoid 64bit division here since 'user' is u32. Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode") Signed-off-by: Vishwanath Pai Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 05d0eae7c1cf6bf7b19c02b3a97ff457b3317323 Author: Zhizhou Tian Date: Fri Sep 8 11:00:16 2017 +0800 netfilter: xt_hashlimit: alloc hashtable with right size struct xt_byteslimit_htable used hlist_head, but memory allocation is done through sizeof(struct list_head). Signed-off-by: Zhizhou Tian Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74585d4f84379528347630253c42518c5002d2f9 Author: Florian Westphal Date: Wed Sep 6 14:47:57 2017 +0200 netfilter: core: remove erroneous warn_on kernel test robot reported: WARNING: CPU: 0 PID: 1244 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0x49/0xcd [..] After allowing batching in nf_unregister_net_hooks its possible that an earlier call to __nf_hook_entries_try_shrink already compacted the list. If this happens we don't need to do anything. Fixes: d3ad2c17b4047 ("netfilter: core: batch nf_unregister_net_hooks synchronize_net calls") Reported-by: kernel test robot Signed-off-by: Florian Westphal Acked-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8073e960a03bf7b5d5ebfc5ff18ac475e1688f46 Author: Florian Westphal Date: Wed Sep 6 14:39:52 2017 +0200 netfilter: nat: use keyed locks no need to serialize on a single lock, we can partition the table and add/delete in parallel to different slots. This restores one of the advantages that got lost with the rhlist revert. Cc: Ivan Babrou Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit e1bf1687740ce1a3598a1c5e452b852ff2190682 Author: Florian Westphal Date: Wed Sep 6 14:39:51 2017 +0200 netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" This reverts commit 870190a9ec9075205c0fa795a09fa931694a3ff1. It was not a good idea. The custom hash table was a much better fit for this purpose. A fast lookup is not essential, in fact for most cases there is no lookup at all because original tuple is not taken and can be used as-is. What needs to be fast is insertion and deletion. rhlist removal however requires a rhlist walk. We can have thousands of entries in such a list if source port/addresses are reused for multiple flows, if this happens removal requests are so expensive that deletions of a few thousand flows can take several seconds(!). The advantages that we got from rhashtable are: 1) table auto-sizing 2) multiple locks 1) would be nice to have, but it is not essential as we have at most one lookup per new flow, so even a million flows in the bysource table are not a problem compared to current deletion cost. 2) is easy to add to custom hash table. I tried to add hlist_node to rhlist to speed up rhltable_remove but this isn't doable without changing semantics. rhltable_remove_fast will check that the to-be-deleted object is part of the table and that requires a list walk that we want to avoid. Furthermore, using hlist_node increases size of struct rhlist_head, which in turn increases nf_conn size. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196821 Reported-by: Ivan Babrou Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 3 +- include/net/netfilter/nf_nat.h | 1 - net/netfilter/nf_nat_core.c | 130 ++++++++++++++--------------------- 3 files changed, 54 insertions(+), 80 deletions(-) commit a5d7a714569199f909cd60ff7074107bf15c7db4 Author: Florian Westphal Date: Fri Sep 1 22:41:03 2017 +0200 netfilter: xtables: add scheduling opportunity in get_counters There are reports about spurious softlockups during iptables-restore, a backtrace i saw points at get_counters -- it uses a sequence lock and also has unbounded restart loop. Signed-off-by: Florian Westphal Acked-by: Eric Dumazet 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 insertions(+) commit 75c2631468e8af554057246b2413e738dd96af3d Author: Florian Westphal Date: Thu Aug 31 13:45:24 2017 +0200 netfilter: nf_nat: don't bug when mapping already exists It seems preferrable to limp along if we have a conflicting mapping, its certainly better than a BUG(). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ba1cc08d9488c94cb8d94f545305688b72a2a300 Author: Sabrina Dubroca Date: Fri Sep 8 10:26:19 2017 +0200 ipv6: fix memory leak with multiple tables during netns destruction fib6_net_exit only frees the main and local tables. If another table was created with fib6_alloc_table, we leak it when the netns is destroyed. Fix this in the same way ip_fib_net_exit cleans up tables, by walking through the whole hashtable of fib6_table's. We can get rid of the special cases for local and main, since they're also part of the hashtable. Reproducer: ip netns add x ip -net x -6 rule add from 6003:1::/64 table 100 ip netns del x Reported-by: Jianlin Shi Fixes: 58f09b78b730 ("[NETNS][IPV6] ip6_fib - make it per network namespace") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 6fad4e69e835932ed5a79c13c5bd4772dd96101d Author: SeongJae Park Date: Wed Sep 6 17:25:31 2017 +0900 kokr/memory-barriers.txt: Apply atomic_t.txt change This commit applies memory-barriers.txt part of upstream change, commit 706eeb3e9c6f ("Documentation/locking/atomic: Add documents for new atomic_t APIs") to Korean translation. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet .../translations/ko_KR/memory-barriers.txt | 94 ++-------------------- 1 file changed, 7 insertions(+), 87 deletions(-) commit 53e31538165790200443e74c797960944fe20054 Author: SeongJae Park Date: Wed Sep 6 17:25:30 2017 +0900 kokr/doc: Update memory-barriers.txt for read-to-write dependencies This commit applies upstream change, commit 66ce3a4dcb9f ("doc: Update memory-barriers.txt for read-to-write dependencies") to Korean translation. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet .../translations/ko_KR/memory-barriers.txt | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 54d6d73f50966751d346a4beb2b7892e793ad649 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:28:28 2017 -0300 docs-rst: don't require adjustbox anymore Only the media PDF book was requiring adjustbox, in order to scale big tables. That worked pretty good with Sphinx versions 1.4 and 1.5, but Spinx 1.6 changed the way tables are produced, by introducing some weird macros before tabulary. That causes adjustbox to fail. So, it can't be used anymore, and its usage was removed from the media book. So, let's remove it from conf.py and sphinx-pre-install. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 --- scripts/sphinx-pre-install | 1 - 2 files changed, 4 deletions(-) commit 9fdcd6afd8990889aeebcfa93ef79b402cdeb8a3 Author: Mauro Carvalho Chehab Date: Sun Sep 3 16:12:46 2017 -0300 docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6 Sphinx 1.5 added a new way to change backward colors for note boxes, but kept backward compatibility with 1.4. On Sphinx 1.6, the old way stopped working, in favor of a new less hackish way. Unfortunately, this is currently too buggy to be used, and the old way doesn't work anymore. So, we have no option but to stick with boring notice boxes. One example of such bug is the notice that it is inside struct v4l2_plane, at the "bytesused" field. At least, add a notice about how to use, as maybe some day the bug will vanish. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 62 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 19 deletions(-) commit c4b326e1a6b40ee403d37acd1363ade36e9b6fbe Author: Mauro Carvalho Chehab Date: Sun Sep 3 16:12:45 2017 -0300 docs-rst: conf.py: remove lscape from LaTeX preamble Only the media book used this extension in the past, but it is not required anymore. Cleanup patch only. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 --- 1 file changed, 3 deletions(-) commit bfaa1ce809bbcd12b1399409ab1dbf0cdaba6e27 Author: Colin Ian King Date: Fri Sep 8 15:13:33 2017 +0100 drm/amdkfd: check for null dev to avoid a null pointer dereference The call to kfd_device_by_id can potentially return null, so check that dev is null and return with -EINVAL to avoid a null pointer dereference. Detected by CoverityScan CID#1454629 ("Dereference null return value") Fixes: 5d71dbc3a588 ("drm/amdkfd: Implement image tiling mode support v2") Signed-off-by: Colin Ian King Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 ++ 1 file changed, 2 insertions(+) commit b917c6d18c031cfce11ec35139033845f205b1d0 Author: Jan Glauber Date: Thu Sep 7 13:24:17 2017 +0200 mmc: cavium: Fix use-after-free in of_platform_device_destroy KASAN reported the following: [ 19.338655] ================================================================== [ 19.345946] BUG: KASAN: use-after-free in of_platform_device_destroy+0x88/0x100 [ 19.345966] Read of size 8 at addr fffffe01aa6f1468 by task systemd-udevd/264 [ 19.345983] CPU: 1 PID: 264 Comm: systemd-udevd Not tainted 4.13.0-jang+ #737 [ 19.345989] Hardware name: Cavium ThunderX CN81XX board (DT) [ 19.345995] Call trace: [ 19.346013] [] dump_backtrace+0x0/0x368 [ 19.346026] [] show_stack+0x24/0x30 [ 19.346040] [] dump_stack+0xa4/0xc8 [ 19.346057] [] print_address_description+0x68/0x258 [ 19.346070] [] kasan_report+0x238/0x2f8 [ 19.346082] [] __asan_load8+0x88/0xb8 [ 19.346098] [] of_platform_device_destroy+0x88/0x100 [ 19.346131] [] thunder_mmc_probe+0x314/0x550 [thunderx_mmc] [ 19.346147] [] pci_device_probe+0x158/0x1f8 [ 19.346162] [] driver_probe_device+0x394/0x5f8 [ 19.346174] [] __driver_attach+0x154/0x158 [ 19.346185] [] bus_for_each_dev+0xdc/0x140 [ 19.346196] [] driver_attach+0x38/0x48 [ 19.346207] [] bus_add_driver+0x290/0x3c8 [ 19.346219] [] driver_register+0xbc/0x1a0 [ 19.346232] [] __pci_register_driver+0xc4/0xd8 [ 19.346260] [] thunder_mmc_driver_init+0x24/0x10000 [thunderx_mmc] [ 19.346273] [] do_one_initcall+0x98/0x1c0 [ 19.346289] [] do_init_module+0xe0/0x2cc [ 19.346303] [] load_module+0x3238/0x35c0 [ 19.346318] [] SyS_finit_module+0x190/0x1a0 [ 19.346329] [] __sys_trace_return+0x0/0x4 This is caused by: platform_device_register() -> platform_device_unregister(to_platform_device(dev)) freeing struct device -> of_node_clear_flag(dev->of_node, ...) writing to the freed device The issue is solved by increasing the reference count before calling of_platform_device_destroy() so freeing the device is postponed after the call. Fixes: 8fb83b142823 ("mmc: cavium: Fix probing race with regulator") Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-thunderx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b4f146f5faf85d21f5cd414531c3ced9c1b61e3c Author: Wolfram Sang Date: Tue Sep 5 20:27:50 2017 +0200 mmc: host: fix typo after MMC_DEBUG move MMC_DEBUG was moved and one letter got strangely capitalized. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01f5bbd17a8066b58dba9b5049fad504bce67322 Author: Adrian Hunter Date: Thu Sep 7 10:40:35 2017 +0300 mmc: block: Fix incorrectly initialized requests mmc_init_request() depends on card->bouncesz so it must be calculated before blk_init_allocated_queue() starts allocating requests. Reported-by: Seraphime Kirkovski Fixes: 304419d8a7e9 ("mmc: core: Allocate per-request data using the..") Signed-off-by: Adrian Hunter Tested-by: Seraphime Kirkovski Cc: Signed-off-by: Ulf Hansson Tested-by: Pavel Machek drivers/mmc/core/queue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e443343e509aac82e7281020f25bf8fa0dd46ab7 Author: Stefan Haberland Date: Mon May 22 10:59:11 2017 +0200 s390/dasd: blk-mq conversion Use new blk-mq interfaces. Use multiple queues and also use the block layer complete helper that finish the IO on the CPU that initiated it. Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 331 ++++++++++++++++++++------------------- drivers/s390/block/dasd_devmap.c | 8 +- drivers/s390/block/dasd_int.h | 19 ++- 3 files changed, 193 insertions(+), 165 deletions(-) commit cac72b990d34f4c70208998a86f910ba38253c94 Author: Lyude Date: Sat Jul 22 21:15:09 2017 -0400 HID: rmi: Make sure the HID device is opened on resume So it looks like that suspend/resume has actually always been broken on hid-rmi. The fact it worked was a rather silly coincidence that was relying on the HID device to already be opened upon resume. This means that so long as anything was reading the /dev/input/eventX node for for an RMI device, it would suspend and resume correctly. As well, if nothing happened to be keeping the HID device away it would shut off, then the RMI driver would get confused on resume when it stopped responding and explode. So, call hid_hw_open() in rmi_post_resume() so we make sure that the device is alive before we try talking to it. This fixes RMI device suspend/resume over HID. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196851 [jkosina@suse.cz: removed useless hunk that was zero-initializing 'ret'] Signed-off-by: Lyude Cc: Andrew Duggan Cc: stable@vger.kernel.org Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-rmi.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5f54c8b2d4fad95d1f8ecbe023ebe6038e6d3760 Merge: 78809a6 edd0360 Author: Radim Krčmář Date: Fri Sep 8 14:40:43 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc This fix was intended for 4.13, but didn't get in because both maintainers were on vacation. Paul Mackerras: "It adds mutual exclusion between list_add_rcu and list_del_rcu calls on the kvm->arch.spapr_tce_tables list. Without this, userspace could potentially trigger corruption of the list and cause a host crash or worse." commit 68913a018f6082f8f90abb8ff9114435ef45dff7 Author: Xin Long Date: Sun Aug 20 13:38:08 2017 +0800 netfilter: ipvs: do not create conn for ABORT packet in sctp_conn_schedule There's no reason for ipvs to create a conn for an ABORT packet even if sysctl_sloppy_sctp is set. This patch is to accept it without creating a conn, just as ipvs does for tcp's RST packet. Signed-off-by: Xin Long Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_proto_sctp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cc4a018669f2fb18c10010f1a7ab3f6fb688cef Author: Xin Long Date: Sun Aug 20 13:38:07 2017 +0800 netfilter: ipvs: fix the issue that sctp_conn_schedule drops non-INIT packet Commit 5e26b1b3abce ("ipvs: support scheduling inverse and icmp SCTP packets") changed to check packet type early. It introduced a side effect: if it's not a INIT packet, ports will be set as NULL, and the packet will be dropped later. It caused that sctp couldn't create connection when ipvs module is loaded and any scheduler is registered on server. Li Shuang reproduced it by running the cmds on sctp server: # ipvsadm -A -t 1.1.1.1:80 -s rr # ipvsadm -D -t 1.1.1.1:80 then the server could't work any more. This patch is to return 1 when it's not an INIT packet. It means ipvs will accept it without creating a conn for it, just like what it does for tcp. Fixes: 5e26b1b3abce ("ipvs: support scheduling inverse and icmp SCTP packets") Reported-by: Li Shuang Signed-off-by: Xin Long Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_proto_sctp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f957dd3c8db2781c8a334b166800788feb618625 Author: Ian W MORRISON Date: Thu Aug 31 08:51:03 2017 +1000 brcmfmac: feature check for multi-scheduled scan fails on bcm4345 devices The firmware feature check introduced for multi-scheduled scan is also failing for bcm4345 devices resulting in a firmware crash. The reason for this crash has not yet been root cause so this patch avoids the feature check for those device as a short-term fix. Fixes: 9fe929aaace6 ("brcmfmac: add firmware feature detection for gscan feature") Cc: # v4.13 Signed-off-by: Ian W MORRISON Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f90472c00ddf1e64c2865f71cced297bd5f80a2 Author: Sara Sharon Date: Mon Sep 4 20:27:04 2017 +0300 iwlwifi: mvm: fix reorder buffer for 9000 devices The condition to check if reorder buffer ran out of space is faulty, as it takes into account only the NSSN. In case the head SN was too far behind the reorder buffer should move forward, regardless of the NSSN status. This caused the driver to release packets out of order in some scenarios. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d460f1fb83a44833a09c8eaa34b30ce553cab8c5 Author: Luca Coelho Date: Sat Sep 2 11:25:40 2017 +0300 iwlwifi: mvm: set status before calling iwl_mvm_send_cmd_status() We always must set the status to what we consider success before calling iwl_mvm_send_cmd_status() (also iwl_mvm_send_cmd_pdu_status() which calls it). Fix a few places where initialization is missing. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 3f497de997c7ed34ad8a90b64f1ca53a41d428b4 Author: Luca Coelho Date: Sat Sep 2 11:05:22 2017 +0300 iwlwifi: mvm: initialize status in iwl_mvm_add_int_sta_common() We always need to initialize the status argument to the success case before calling iwl_mvm_send_cmd_status() or iwl_mvm_send_cmd_pdu_status() (which calls the former) otherwise we may get an uninitialized value back. In this case, we use ADD_STA_SUCCESS as success. Fixes: 732d06e9d9cf ("iwlwifi: mvm: add station before allocating a queue") Reported by: Dan Carpenter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e7d91bcf7725b9fcd9cbfc5fa0e0f84f19e6de Author: Luca Coelho Date: Fri Sep 1 18:57:35 2017 +0300 iwlwifi: mvm: handle FIF_ALLMULTI when setting multicast addresses We were ignoring the FIF_ALLMULTI flag when setting the multicast addresses with MCAST_FILTER_CMD. Check if this flag is set and enable pass_all accordingly. We also need to set the count to 0 if pass_all is enable so we don't pass addresses to the firmware when not needed (as doing so causes an assert). This fixes https://bugzilla.kernel.org/show_bug.cgi?id=196741 Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 97bce57bd7f96e1218751996f549a6e61f18cc8c Author: Luca Coelho Date: Fri Sep 1 17:59:15 2017 +0300 iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD The MCAST_FILTER_CMD can get quite large when we have many mcast addresses to set (we support up to 255). So the command should be send as NOCOPY to prevent a warning caused by too-long commands: WARNING: CPU: 0 PID: 9700 at /root/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1550 iwl_pcie_enqueue_hcmd+0x8c7/0xb40 [iwlwifi] Command MCAST_FILTER_CMD (0x1d0) is too large (328 bytes) This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196743 Cc: stable@vger.kernel.org Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8458e48ac7ad86a5ab7f3d1a8cacd9205a9a97ce Author: Avraham Stern Date: Sun Sep 3 16:04:38 2017 +0300 iwlwifi: mvm: wake the correct mac80211 queue iwl_mvm_start_mac_queues() takes a bitmap of the queues to wake. When deferred tx is purged, set the bit of the hw_queue so the correct queue will be waken up. Fixes: 7e39a00d5931 ("iwlwifi: mvm: start mac queues when deferred tx frames are purged") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd800e41a3de5c7e56b2fd27088bdaf5e228d227 Author: Naftali Goldstein Date: Mon Aug 28 11:51:05 2017 +0300 iwlwifi: mvm: change state when queueing agg start work Add a new state to enum iwl_mvm_agg_state, which is used between queueing the work that starts tx aggregations and actually starting that work (changing to state IWL_AGG_STARTING). This solves a race where ieee80211_start_tx_ba_session is called a second time, before the work queued by the first run has a chance to change the agg_state. In this case the second call to ieee80211_start_tx_ba_session returns an error, and the fallback is to abort the ba session start. Fixes: 482e48440a0e ("iwlwifi: mvm: change open and close criteria of a BA session") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 ++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) commit 0fe8bed6e37c259b85d123ef9667f972305c9d6b Author: Avraham Stern Date: Thu Aug 31 16:27:06 2017 +0300 iwlwifi: mvm: send all non-bufferable frames on the probe queue AP interfaces now send all non-bufferable frames using the broadcast station. Thus allow them to use the probe queue and don't warn about it. Fixes: eb045e6e0389 ("iwlwifi: mvm: Avoid deferring non bufferable frames") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6110d9e5bdd15c4e60fb67f330fbf74681e7daf7 Author: David Spinadel Date: Tue Aug 29 13:56:02 2017 +0300 iwlwifi: mvm: Flush non STA TX queues When starting wowlan mac80211 requests flush w/o vif and we ignore this request. As a result some packets stay stuck in the queue and it may end up with a queue hang. Allow the driver to flush queues even if station isn't specified. Signed-off-by: David Spinadel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 44 ++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 59cd827f26019ac790b2f34cbad478037f51c570 Author: Matt Chen Date: Mon Aug 28 14:57:54 2017 +0800 iwlwifi: mvm: fix wowlan resume failed to load INIT ucode If we set disconnect on wowlan and run suspend/resume, will run into: ...snipped iwlwifi 0000:01:00.0: Failed to load firmware chunk! iwlwifi 0000:01:00.0: Could not load the [0] uCode section iwlwifi 0000:01:00.0: Failed to start INIT ucode: -110 iwlwifi 0000:01:00.0: Failed to run INIT ucode: -110 iwlwifi 0000:01:00.0: Failed to start RT ucode: -110 It is because we still keep IWL_MVM_STATUS_IN_HW_RESTART in __iwl_mvm_resume. When mac80211 starts the device as __iwl_mvm_mac_start(), we will miss iwl_mvm_restart_cleanup(mvm). Signed-off-by: Matt Chen Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5969d1bb3082b41eba8fd2c826559abe38ccb6df Merge: 572c01b bb3290d Author: Linus Torvalds Date: Thu Sep 7 21:39:15 2017 -0700 Merge branch 'gperf-removal' Remove our use of 'gperf' for generating perfect hashes from some of our build tools. This removal was prompted by Masahiro Yamada sending out a patch that removes all our pre-generated files, and when I tested it, I noticed that the gperf version I have (3.1) apparently generates code that no longer works with out code-base because the function interfaces generated by gperf have changed. We really don't care that much, and the gperf people changed their interfaces in ways that makes it annoying to work with them. Tools that make it hard to use them should not be used, and the kernel is not at all interested in some autoconf mess. So remove the gperf dependency entirely. It turns out that if you ignore the pre-generated files, the use of gperf apparently saved us a whopping fifteen lines of code. It obviously wasn't worth it, considering that the pre-generated files are about 500 lines. I sent this out as a patch about three weeks ago, and got absolutely zero responses. So let's see if anybody notices now that I merge it. Because there might be serious bugs here, but it WorksForMe(tm). * gperf-removal: Remove gperf usage from toolchain commit 572c01ba19ef150e98aea0b45ca17d43356521b5 Merge: cef5d0f 2441500 Author: Linus Torvalds Date: Thu Sep 7 21:11:05 2017 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas, megaraid_sas, zfcp and a host of minor updates. The major driver change here is the elimination of the block based cciss driver in favour of the SCSI based hpsa driver (which now drives all the legacy cases cciss used to be required for). Plus a reset handler clean up and the redo of the SAS SMP handler to use bsg lib" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits) scsi: scsi-mq: Always unprepare before requeuing a request scsi: Show .retries and .jiffies_at_alloc in debugfs scsi: Improve requeuing behavior scsi: Call scsi_initialize_rq() for filesystem requests scsi: qla2xxx: Reset the logo flag, after target re-login. scsi: qla2xxx: Fix slow mem alloc behind lock scsi: qla2xxx: Clear fc4f_nvme flag scsi: qla2xxx: add missing includes for qla_isr scsi: qla2xxx: Fix an integer overflow in sysfs code scsi: aacraid: report -ENOMEM to upper layer from aac_convert_sgraw2() scsi: aacraid: get rid of one level of indentation scsi: aacraid: fix indentation errors scsi: storvsc: fix memory leak on ring buffer busy scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough scsi: smartpqi: remove the smp_handler stub scsi: hpsa: remove the smp_handler stub scsi: bsg-lib: pass the release callback through bsg_setup_queue scsi: Rework handling of scsi_device.vpd_pg8[03] scsi: Rework the code for caching Vital Product Data (VPD) scsi: rcu: Introduce rcu_swap_protected() ... commit cef5d0f952a03d42051141742632078d488b0c6b Merge: 0fb02e71 077a1cc Author: Linus Torvalds Date: Thu Sep 7 21:00:52 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Do not allow use of freed init data and code even when boot consoles are forced to stay. Also check for the init memory more precisely. - Some code clean up by starting contributors. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: Clean up do_syslog() error handling printk/console: Enhance the check for consoles using init memory printk/console: Always disable boot consoles that use init memory before it is freed printk: Modify operators of printed_len and text_len commit 27161f13e3c3241944846ac24942a85cceda0a2c Author: Yunlei He Date: Thu Sep 7 10:40:54 2017 +0800 f2fs: avoid race in between read xattr & write xattr Thread A: Thread B: -f2fs_getxattr -lookup_all_xattrs -xnid = F2FS_I(inode)->i_xattr_nid; -f2fs_setxattr -__f2fs_setxattr -write_all_xattrs -truncate_xattr_node ... ... -write_checkpoint ... ... -alloc_nid <- nid reuse -get_node_page -f2fs_bug_on <- nid != node_footer->nid It's need a rw_sem to avoid the race Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 1 + fs/f2fs/xattr.c | 6 ++++++ 3 files changed, 8 insertions(+) commit 13ba41e346170e594b7ce582561b3efa5b85f18f Author: Jaegeuk Kim Date: Wed Sep 6 21:04:44 2017 -0700 f2fs: make get_lock_data_page to handle encrypted inode This patch refactors get_lock_data_page() to handle encryption case directly. In order to do that, it introduces common f2fs_submit_page_read(). Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 109 +++++++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 58 deletions(-) commit 0fb02e718f5fd88b175387bc2a9313b27609f0da Merge: 828f425 196a508 Author: Linus Torvalds Date: Thu Sep 7 20:48:25 2017 -0700 Merge tag 'audit-pr-20170907' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "A small pull request for audit this time, only four patches and only two with any real code changes. Those two changes are the removal of a pointless SELinux AVC initialization audit event and a fix to improve the audit timestamp overhead. The other two patches are comment cleanup and administrative updates, nothing very exciting. Everything passes our tests" * tag 'audit-pr-20170907' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: update the function comments selinux: remove AVC init audit log message audit: update the audit info in MAINTAINERS audit: Reduce overhead using a coarse clock commit 828f4257d1d33aed0f9ef82982dcb8ace8b7fe86 Merge: 44ccba3 fe8993b Author: Linus Torvalds Date: Thu Sep 7 20:35:29 2017 -0700 Merge tag 'secureexec-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull secureexec update from Kees Cook: "This series has the ultimate goal of providing a sane stack rlimit when running set*id processes. To do this, the bprm_secureexec LSM hook is collapsed into the bprm_set_creds hook so the secureexec-ness of an exec can be determined early enough to make decisions about rlimits and the resulting memory layouts. Other logic acting on the secureexec-ness of an exec is similarly consolidated. Capabilities needed some special handling, but the refactoring removed other special handling, so that was a wash" * tag 'secureexec-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Consolidate pdeath_signal clearing exec: Use sane stack rlimit under secureexec exec: Consolidate dumpability logic smack: Remove redundant pdeath_signal clearing exec: Use secureexec for clearing pdeath_signal exec: Use secureexec for setting dumpability LSM: drop bprm_secureexec hook commoncap: Move cap_elevated calculation into bprm_set_creds commoncap: Refactor to remove bprm_secureexec hook smack: Refactor to remove bprm_secureexec hook selinux: Refactor to remove bprm_secureexec hook apparmor: Refactor to remove bprm_secureexec hook binfmt: Introduce secureexec flag exec: Correct comments about "point of no return" exec: Rename bprm->cred_prepared to called_set_creds commit 44ccba3f7b230af1bd7ebe173cbf5803df1df486 Merge: 21d236b ad05e6c Author: Linus Torvalds Date: Thu Sep 7 20:30:19 2017 -0700 Merge tag 'gcc-plugins-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc plugins update from Kees Cook: "This finishes the porting work on randstruct, and introduces a new option to structleak, both noted below: - For the randstruct plugin, enable automatic randomization of structures that are entirely function pointers (along with a couple designated initializer fixes). - For the structleak plugin, provide an option to perform zeroing initialization of all otherwise uninitialized stack variables that are passed by reference (Ard Biesheuvel)" * tag 'gcc-plugins-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: structleak: add option to init all vars used as byref args randstruct: Enable function pointer struct detection drivers/net/wan/z85230.c: Use designated initializers drm/amd/powerplay: rv: Use designated initializers commit b32b5e14b4e0d40e06f094d2593b447e00acdf37 Merge: 9d9ca1f 7a34879 9ef08d7 28e6c99 Author: Zhang Rui Date: Fri Sep 8 11:20:04 2017 +0800 Merge branches 'thermal-core', 'thermal-soc', 'thermal-intel' and 'const-thermal-zone-structure' into next commit 7a348799d5d9087bbc2e60767f5e6da9f70cc7ca Merge: 6760f3f eda519d 86da439 Author: Zhang Rui Date: Fri Sep 8 11:17:53 2017 +0800 Merge branches 'mediatek-mt2712', 'rockchip-rk3328' and 'uniphier-thermal' into thermal-soc commit 126f760ca94dae77425695f9f9238b731de86e32 Author: Håkon Bugge Date: Wed Sep 6 18:35:51 2017 +0200 rds: Fix incorrect statistics counting In rds_send_xmit() there is logic to batch the sends. However, if another thread has acquired the lock and has incremented the send_gen, it is considered a race and we yield. The code incrementing the s_send_lock_queue_raced statistics counter did not count this event correctly. This commit counts the race condition correctly. Changes from v1: - Removed check for *someone_on_xmit()* - Fixed incorrect indentation Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit eef5a7cc2a571eb2176c8b9260d4ccfc9f6be127 Author: Arnd Bergmann Date: Wed Sep 6 15:38:58 2017 +0200 isdn: isdnloop: fix logic error in isdnloop_sendbuf gcc-7 found an ancient bug in the loop driver, leading to a condition that is always false, meaning we ignore the contents of 'card->flags' here: drivers/isdn/isdnloop/isdnloop.c:412:37: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context] This changes the braces in the expression to ensure we actually compare the flag bits, rather than comparing a constant. As Joe Perches pointed out, an earlier patch of mine incorrectly assumed this was a false-positive warning. Cc: Joe Perches Link: https://patchwork.kernel.org/patch/9840289/ Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/isdn/isdnloop/isdnloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca2c1418efe9f7fe37aa1f355efdf4eb293673ce Author: Paolo Abeni Date: Wed Sep 6 14:44:36 2017 +0200 udp: drop head states only when all skb references are gone After commit 0ddf3fb2c43d ("udp: preserve skb->dst if required for IP options processing") we clear the skb head state as soon as the skb carrying them is first processed. Since the same skb can be processed several times when MSG_PEEK is used, we can end up lacking the required head states, and eventually oopsing. Fix this clearing the skb head state only when processing the last skb reference. Reported-by: Eric Dumazet Fixes: 0ddf3fb2c43d ("udp: preserve skb->dst if required for IP options processing") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/linux/skbuff.h | 2 +- net/core/skbuff.c | 9 +++------ net/ipv4/udp.c | 5 ++++- 3 files changed, 8 insertions(+), 8 deletions(-) commit 5c25f30c93fdc5bf25e62101aeaae7a4f9b421b3 Author: Xin Long Date: Tue Sep 5 17:26:33 2017 +0800 ip6_gre: update mtu properly in ip6gre_err Now when probessing ICMPV6_PKT_TOOBIG, ip6gre_err only subtracts the offset of gre header from mtu info. The expected mtu of gre device should also subtract gre header. Otherwise, the next packets still can't be sent out. Jianlin found this issue when using the topo: client(ip6gre)<---->(nic1)route(nic2)<----->(ip6gre)server and reducing nic2's mtu, then both tcp and sctp's performance with big size data became 0. This patch is to fix it by also subtracting grehdr (tun->tun_hlen) from mtu info when updating gre device's mtu in ip6gre_err(). It also needs to subtract ETH_HLEN if gre dev'type is ARPHRD_ETHER. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 21d236bf2bde518844b5675ec4980f4b2fd13e1a Merge: 8dc5b3a c71b02e Author: Linus Torvalds Date: Thu Sep 7 19:58:56 2017 -0700 Merge tag 'pstore-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore update from Kees Cook: "Make pstore permissions more versatile by removing CAP_SYSLOG requirement and defining more restrictive root directory DAC permissions default (0750, which can be adjust after boot unlike the CAP_SYSLOG check). Suggested by Nick Kralevich" * tag 'pstore-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Revert "pstore: Honor dmesg_restrict sysctl on dmesg dumps" pstore: Make default pstorefs root dir perms 0750 commit 80532384af4ccb6d6cc965fa9232aaa2c456362c Author: Jiri Pirko Date: Wed Sep 6 13:14:19 2017 +0200 net: sched: fix memleak for chain zero There's a memleak happening for chain 0. The thing is, chain 0 needs to be always present, not created on demand. Therefore tcf_block_get upon creation of block calls the tcf_chain_create function directly. The chain is created with refcnt == 1, which is not correct in this case and causes the memleak. So move the refcnt increment into tcf_chain_get function even for the case when chain needs to be created. Reported-by: Jakub Kicinski Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters") Signed-off-by: Jiri Pirko Tested-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/cls_api.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8dc5b3a6cb2fc5d4f751bda56a378589202a118b Merge: 2500e28 76e7527 Author: Linus Torvalds Date: Thu Sep 7 16:06:14 2017 -0700 Merge tag '4.14-smb3-xattr-enable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs update from Steve French: "Enable xattr support for smb3 and also a bugfix" * tag '4.14-smb3-xattr-enable' of git://git.samba.org/sfrench/cifs-2.6: cifs: Check for timeout on Negotiate stage cifs: Add support for writing attributes on SMB2+ cifs: Add support for reading attributes on SMB2+ commit 2500e287bca1beb313aa298f2d36be1257cbb483 Merge: ae8ac6b 2a8a986 Author: Linus Torvalds Date: Thu Sep 7 15:51:11 2017 -0700 Merge git://git.kvack.org/~bcrl/aio-next Pull aio fix from Ben LaHaise: "Improve aio-nr counting on large SMP systems. It has been in linux-next for quite some time" * git://git.kvack.org/~bcrl/aio-next: fs: aio: fix the increment of aio-nr and counting against aio-max-nr commit ae8ac6b7dbfd67f883050421fd195c153d02f5f3 Merge: 460352c 6c83fd5 Author: Linus Torvalds Date: Thu Sep 7 15:19:35 2017 -0700 Merge branch 'quota_scaling' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota scaling updates from Jan Kara: "This contains changes to make the quota subsystem more scalable. Reportedly it improves number of files created per second on ext4 filesystem on fast storage by about a factor of 2x" * 'quota_scaling' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (28 commits) quota: Add lock annotations to struct members quota: Reduce contention on dq_data_lock fs: Provide __inode_get_bytes() quota: Inline dquot_[re]claim_reserved_space() into callsite quota: Inline inode_{incr,decr}_space() into callsites quota: Inline functions into their callsites ext4: Disable dirty list tracking of dquots when journalling quotas quota: Allow disabling tracking of dirty dquots in a list quota: Remove dq_wait_unused from dquot quota: Move locking into clear_dquot_dirty() quota: Do not dirty bad dquots quota: Fix possible corruption of dqi_flags quota: Propagate ->quota_read errors from v2_read_file_info() quota: Fix error codes in v2_read_file_info() quota: Push dqio_sem down to ->read_file_info() quota: Push dqio_sem down to ->write_file_info() quota: Push dqio_sem down to ->get_next_id() quota: Push dqio_sem down to ->release_dqblk() quota: Remove locking for writing to the old quota format quota: Do not acquire dqio_sem for dquot overwrites in v2 format ... commit 460352c2f18e18accc993a9127a03e903ed8e0ed Merge: 74fee4e c9ea9df Author: Linus Torvalds Date: Thu Sep 7 14:53:17 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF, reiserfs, quota, fsnotify cleanups from Jan Kara: "Several UDF, reiserfs, quota and fsnotify cleanups. Note that there is also a patch updating MAINTAINERS entry for notification subsystem to point to me as a maintainer since current entries are stale" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: make dnotify_fsnotify_ops const isofs: Delete an unnecessary variable initialisation in isofs_read_inode() isofs: Adjust four checks for null pointers isofs: Delete an error message for a failed memory allocation in isofs_read_inode() quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() fs-udf: Delete an error message for a failed memory allocation in two functions fs-udf: Improve six size determinations fs-udf: Adjust two checks for null pointers reiserfs: fix spelling mistake: "tranasction" -> "transaction" MAINTAINERS: Update entries for notification subsystem uapi/linux/quota.h: Do not include linux/errno.h commit 74fee4e88fd196c712abfdae89acfa272abf10f8 Merge: 7d95565 8402446 Author: Linus Torvalds Date: Thu Sep 7 14:43:33 2017 -0700 Merge tag 'devicetree-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: "There's a few orphans in the conversion to %pOF printf specifiers included here that no one else picked up. Summary: - Convert more DT code to use of_property_read_* API. - Improve DT overlay support when adding multiple overlays - Convert printk's to %pOF format specifiers. Most went via subsystem trees, but picked up the remaining orphans - Correct unittests to use preferred "okay" for "status" property value - Add a KASLR seed property - Vendor prefixes for Mellanox, Theobroma System, Adaptrum, Moxa - Fix modalias buffer handling - Clean-up of include paths for building dtbs - Add bindings for amc6821, isl1208, tsl2x7x, srf02, and srf10 devices - Add nvmem bindings for MediaTek MT7623 and MT7622 SoC - Add compatible string for Allwinner H5 Mali-450 GPU - Fix links to old OpenFirmware docs with new mirror on devicetree.org - Remove status property from binding doc examples" * tag 'devicetree-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (45 commits) devicetree: Adjust status "ok" -> "okay" under drivers/of/ dt-bindings: Remove "status" from examples dt-bindings: pinctrl: sh-pfc: Use generic node name dt-bindings: Add vendor Mellanox dt-binding: net/phy: fix interrupts description virt: Convert to using %pOF instead of full_name macintosh: Convert to using %pOF instead of full_name ide: pmac: Convert to using %pOF instead of full_name microblaze: Convert to using %pOF instead of full_name dt-bindings: usb: musb: Grammar s/the/to/, s/is/are/ of: Use PLATFORM_DEVID_NONE definition of/device: Fix of_device_get_modalias() buffer handling of/device: Prevent buffer overflow in of_device_modalias() dt-bindings: add amc6821, isl1208 trivial bindings dt-bindings: add vendor prefix for Theobroma Systems of: search scripts/dtc/include-prefixes path for both CPP and DTC of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP of: remove drivers/of/testcase-data from include search path for CPP of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered iio: srf08: add device tree binding for srf02 and srf10 ... commit 7d955656121f547ff9a708ed7ee4c86a08bf628a Merge: 5f9cc57 426ca2c Author: Linus Torvalds Date: Thu Sep 7 14:37:25 2017 -0700 Merge tag 'drm-intel-next-fixes-2017-09-07' of git://anongit.freedesktop.org/git/drm-intel Pull i916 drm fixes from Rodrigo Vivi: "Since Dave is on paternity leave we are sending drm/i915 fixes for v4.14-rc1 directly to you as he had asked us to do. The most critical ones are the GPU reset fix for gen2-4 and GVT fix for a regression that is blocking gvt init to work on your tree. The rest is general fixes for patches coming from drm-next" Acked-by: Dave Airlie * tag 'drm-intel-next-fixes-2017-09-07' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Re-enable GTT following a device reset drm/i915: Annotate user relocs with __user drm/i915: Silence sparse by using gfp_t drm/i915: Add __rcu to radix tree slot pointer drm/i915: Fix the missing PPAT cache attributes on CNL drm/i915/gvt: Remove one duplicated MMIO drm/i915: Fix enum pipe vs. enum transcoder for the PCH transcoder drm/i915: Make i2c lock ops static drm/i915: Make i9xx_load_ycbcr_conversion_matrix() static drm/i915/edp: Increase T12 panel delay to 900 ms to fix DP AUX CH timeouts drm/i915: Ignore duplicate VMA stored within the per-object handle LUT drm/i915: Skip fence alignemnt check for the CCS plane drm/i915: Treat fb->offsets[] as a raw byte offset instead of a linear offset drm/i915: Always wake the device to flush the GTT drm/i915: Recreate vmapping even when the object is pinned drm/i915: Quietly cancel FBC activation if CRTC is turned off before worker commit 5f9cc57036165bbd96f3a432fd2569c812503a92 Merge: cd7b34f 1591caf Author: Linus Torvalds Date: Thu Sep 7 14:33:13 2017 -0700 Merge tag 'leds_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "LED class drivers improvements: leds-pca955x: - add Device Tree support and bindings - use devm_led_classdev_register() - add GPIO support - prevent crippled LED class device name - check for I2C errors leds-gpio: - add optional retain-state-shutdown DT property - allow LED to retain state at shutdown leds-tlc591xx: - merge conditional tests - add missing of_node_put leds-powernv: - delete an error message for a failed memory allocation in powernv_led_create() leds-is31fl32xx.c - convert to using custom %pOF printf format specifier Constify attribute_group structures in: - leds-blinkm - leds-lm3533 Make several arrays static const in: - leds-aat1290 - leds-lp5521 - leds-lp5562 - leds-lp8501" * tag 'leds_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: pca955x: check for I2C errors leds: gpio: Allow LED to retain state at shutdown dt-bindings: leds: gpio: Add optional retain-state-shutdown property leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create() leds: lp8501: make several arrays static const leds: lp5562: make several arrays static const leds: lp5521: make several arrays static const leds: aat1290: make array max_mm_current_percent static const leds: pca955x: Prevent crippled LED device name leds: lm3533: constify attribute_group structure dt-bindings: leds: add pca955x leds: pca955x: add GPIO support leds: pca955x: use devm_led_classdev_register leds: pca955x: add device tree support leds: Convert to using %pOF instead of full_name leds: blinkm: constify attribute_group structures. leds: tlc591xx: add missing of_node_put leds: tlc591xx: merge conditional tests commit cd7b34fe1c2d93c54b368c295de88612c0b7120b Merge: 75c7271 41bd031 Author: Linus Torvalds Date: Thu Sep 7 14:03:05 2017 -0700 Merge tag 'dmaengine-4.14-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This one features the usual updates to the drivers and one good part of removing DA_SG from core as it has no users. Summary: - Remove DMA_SG support as we have no users for this feature - New driver for Altera / Intel mSGDMA IP core - Support for memset in dmatest and qcom_hidma driver - Update for non cyclic mode in k3dma, bunch of update in bam_dma, bcm sba-raid - Constify device ids across drivers" * tag 'dmaengine-4.14-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (52 commits) dmaengine: sun6i: support V3s SoC variant dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk dmaengine: rcar-dmac: document R8A77970 bindings dmaengine: xilinx_dma: Fix error code format specifier dmaengine: altera: Use macros instead of structs to describe the registers dmaengine: ti-dma-crossbar: Fix dra7 reserve function dmaengine: pl330: constify amba_id dmaengine: pl08x: constify amba_id dmaengine: bcm-sba-raid: Remove redundant SBA_REQUEST_STATE_COMPLETED dmaengine: bcm-sba-raid: Explicitly ACK mailbox message after sending dmaengine: bcm-sba-raid: Add debugfs support dmaengine: bcm-sba-raid: Remove redundant SBA_REQUEST_STATE_RECEIVED dmaengine: bcm-sba-raid: Re-factor sba_process_deferred_requests() dmaengine: bcm-sba-raid: Pre-ack async tx descriptor dmaengine: bcm-sba-raid: Peek mbox when we have no free requests dmaengine: bcm-sba-raid: Alloc resources before registering DMA device dmaengine: bcm-sba-raid: Improve sba_issue_pending() run duration dmaengine: bcm-sba-raid: Increase number of free sba_request dmaengine: bcm-sba-raid: Allow arbitrary number free sba_request dmaengine: bcm-sba-raid: Remove reqs_free_count from sba_device ... commit 75c727155ce1239c1417ba32a48c796de0d762d4 Merge: 968c61f 2606706 Author: Linus Torvalds Date: Thu Sep 7 13:55:16 2017 -0700 Merge tag 'backlight-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Fix-ups: - Constification; pwm_bl - Use new GPIO API; gpio_backlight - Remove unused functionality; gpio_backlight Bug Fixes: - Fix artificial MAXREG limit; lm3630a_bl" * tag 'backlight-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: gpio_backlight: Delete pdata inversion backlight: gpio_backlight: Convert to use GPIO descriptor backlight: pwm_bl: Make of_device_ids const backlight: lm3630a: Bump REG_MAX value to 0x50 instead of 0x1F commit 968c61f7da3cf6d58a49587cfe00d899ca72c1ad Merge: 9d71941 b01e934 Author: Linus Torvalds Date: Thu Sep 7 13:51:13 2017 -0700 Merge tag 'mfd-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers - RK805 Power Management IC (PMIC) - ROHM BD9571MWV-M MFD Power Management IC (PMIC) - Texas Instruments TPS68470 Power Management IC (PMIC) & LEDs New Device Support: - Add support for HiSilicon Hi6421v530 to hi6421-pmic-core - Add support for X-Powers AXP806 to axp20x - Add support for X-Powers AXP813 to axp20x - Add support for Intel Sunrise Point LPSS to intel-lpss-pci New Functionality: - Amend API to provide register layout; atmel-smc Fix-ups: - DT re-work; omap, nokia - Header file location change {I2C => MFD}; dm355evm_msp, tps65010 - Fix chip ID formatting issue(s); rk808 - Optionally register touchscreen devices; da9052-core - Documentation improvements; twl-core - Constification; rtsx_pcr, ab8500-core, da9055-i2c, da9052-spi - Drop unnecessary static declaration; max8925-i2c - Kconfig changes (missing deps and remove module support) - Slim down oversized licence statement; hi6421-pmic-core - Use managed resources (devm_*); lp87565 - Supply proper error checking/handling; t7l66xb Bug Fixes: - Fix counter duplication issue; da9052-core - Fix potential NULL deference issue; max8998 - Leave SPI-NOR write-protection bit alone; lpc_ich - Ensure device is put into reset during suspend; intel-lpss - Correct register offset variable size; omap-usb-tll" * tag 'mfd-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (61 commits) mfd: intel_soc_pmic: Differentiate between Bay and Cherry Trail CRC variants mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHT dt-bindings: mfd: Add bindings for ZII RAVE devices mfd: omap-usb-tll: Fix register offsets mfd: da9052: Constify spi_device_id mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend mfd: da9055: Constify i2c_device_id mfd: intel-lpss: Add missing PCI ID for Intel Sunrise Point LPSS devices mfd: t7l66xb: Handle return value of clk_prepare_enable mfd: Add ROHM BD9571MWV-M PMIC DT bindings mfd: intel_soc_pmic_chtwc: Turn Kconfig option into a bool mfd: lp87565: Convert to use devm_mfd_add_devices() mfd: Add support for TPS68470 device mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/Broadwell mfd: syscon: atmel-smc: Add helper to retrieve register layout mfd: axp20x: Use correct platform device ID for many PEK dt-bindings: mfd: axp20x: Introduce bindings for AXP813 mfd: axp20x: Add support for AXP813 PMIC dt-bindings: mfd: axp20x: Add AXP806 to supported list of chips mfd: Add ROHM BD9571MWV-M MFD PMIC driver ... commit 9d71941d39fb876271df72394518a98ae079e5a3 Merge: dfd9e6d a6cbfa1 Author: Linus Torvalds Date: Thu Sep 7 13:39:21 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new GPIO bit-banging driver implementing PS/2 protocol - a new power key driver for Rockchip RK805 PMIC - bunch of patches constifying various device ID structures - Elan I2C touchpad driver now supports devices with 2 buttons - other assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (76 commits) Input: byd - make array seq static, reduces object code size Input: xilinx_ps2 - fix multiline comment style Input: pxa27x_keypad - handle return value of clk_prepare_enable Input: tegra-kbc - handle return value of clk_prepare_enable Input: PS/2 gpio bit banging driver for serio bus Input: xen-kbdfront - enable auto repeat for xen keyboard frontend driver Input: ambakmi - constify amba_id Input: atmel_mxt_ts - add support for reset line Input: atmel_mxt_ts - use more managed resources Input: wacom_w8001 - constify serio_device_id Input: tsc40 - constify serio_device_id Input: touchwin - constify serio_device_id Input: touchright - constify serio_device_id Input: touchit213 - constify serio_device_id Input: penmount - constify serio_device_id Input: mtouch - constify serio_device_id Input: inexio - constify serio_device_id Input: hampshire - constify serio_device_id Input: gunze - constify serio_device_id Input: fujitsu_ts - constify serio_device_id ... commit 23e4c67ae13da7549a54f4e8c0014f48b2ef5204 Author: Arnd Bergmann Date: Wed Sep 6 23:45:34 2017 +0200 ata: avoid gcc-7 warning in ata_timing_quantize gcc-7 warns about the result of a constant multiplication used as a boolean: drivers/ata/libata-core.c: In function 'ata_timing_quantize': drivers/ata/libata-core.c:3164:30: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] This slightly rearranges the macro to simplify the code and avoid the warning at the same time. Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit dfd9e6d231e157d2066825ed17852cce822c1f46 Merge: c0da4fa 1da92af Author: Linus Torvalds Date: Thu Sep 7 13:23:37 2017 -0700 Merge tag 'mailbox-v4.14' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: "Just behavorial changes to a controller driver: the Broadcom's Flexrm mailbox driver has been modifified to support debugfs and TX-Done mechanism by ACK. Nothing for the core mailbox stack" * tag 'mailbox-v4.14' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: bcm-flexrm-mailbox: Use txdone_ack instead of txdone_poll mailbox: bcm-flexrm-mailbox: Use bitmap instead of IDA mailbox: bcm-flexrm-mailbox: Fix mask used in CMPL_START_ADDR_VALUE() mailbox: bcm-flexrm-mailbox: Add debugfs support mailbox: bcm-flexrm-mailbox: Set IRQ affinity hint for FlexRM ring IRQs commit c0da4fa0d1a54495d6055c009ac46b76d1da2c86 Merge: d969443 1efdf17 Author: Linus Torvalds Date: Thu Sep 7 12:53:14 2017 -0700 Merge tag 'media/v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "Brazil's Independence Day pull request :-) This is one of the biggest media pull requests, with 625 patches affecting almost all parts of media (RC, DVB, V4L2, CEC, docs). This contains: - A lot of new drivers: * DVB frontends: mxl5xx, stv0910, stv6111; * camera flash: as3645a led driver; * HDMI receiver: adv748X; * camera sensor: Omnivision 6650 5M driver (ov6650); * HDMI CEC: ao-cec meson driver; * V4L2: Qualcom camss driver; * Remote controller: gpio-ir-tx, pwm-ir-tx and zx-irdec drivers. - The DDbridge DVB driver got a massive update, with makes it in sync with modern hardware from that vendor; - There's an important milestone on this series: the DVB documentation was written in 2003, but only started to be updated in 2007. It also used to contain several gaps from the time it was kept out of tree, mentioning error codes and device nodes that never existed upstream. On this series, it received a massive update: all non-deprecated digital TV APIs are now in sync with the current implementation; - Some DVB APIs that aren't used by any upstream driver got removed; - Other parts of the media documentation algo got updated, fixing some bugs on its PDF output and making it compatible with Sphinx version 1.6. As the number of hacks required to build PDF output reduced, I hope we'll have less troubles as newer versions of our documentation toolchain are released (famous last words); - As usual, lots of driver cleanups and improvements" * tag 'media/v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (624 commits) media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency media: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay" media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space media: Revert "[media] lirc_dev: remove superfluous get/put_device() calls" media: add qcom_camss.rst to v4l-drivers rst file media: dvb headers: make checkpatch happier media: dvb uapi: move frontend legacy API to another part of the book media: pixfmt-srggb12p.rst: better format the table for PDF output media: docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation media: index.rst: don't write "Contents:" on PDF output media: pixfmt*.rst: replace a two dots by a comma media: vidioc-g-fmt.rst: adjust table format media: vivid.rst: add a blank line to correct ReST format media: v4l2 uapi book: get rid of driver programming's chapter media: format.rst: use the right markup for important notes media: docs-rst: cardlists: change their format to flat-tables media: em28xx-cardlist.rst: update to reflect last changes media: v4l2-event.rst: adjust table to fit on PDF output media: docs: don't show ToC for each part on PDF output ... commit d969443064abf2f51510559a5b01325eaabfcb1d Merge: 3645e6d ee5f38a Author: Linus Torvalds Date: Thu Sep 7 12:44:53 2017 -0700 Merge tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We have touched quite a lot of files but with fewer changes at this cycle; as you can see, most of changes are trivial fixes, especially constification patches. Among the massive attacks by constification gangs, we had a few core changes (mostly for ASoC core), as well the fixes and the updates by major vendors. Some highlights: ALSA core: - Fix possible races in control API user-TLV codes - Small cleanup of PCM core ASoC: - Continued work for componentization; still half-baked, but we're certainly progressing - Use of devres for jack detection GPIOs, rather as a cleanup - Jack detection support for Qualcomm MSM8916 - Support for Allwinner H3, Cirrus Logic CS43130, Intel Kabylake systems with RT5663, Realtek RT274, TI TLV320AIC32x6 and Wolfson WM8523" * tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (512 commits) ALSA: hda/ca0132 - Fix memory leak at error path ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe ASoC: cs43130: Fix unused compiler warnings for PM runtime ASoC: cs43130: Fix possible Oops with invalid dev_id ASoC: cs43130: fix spelling mistake: "irq_occurrance" -> "irq_occurrence" ALSA: atmel: Remove leftovers of AVR32 removal ALSA: atmel: convert AC97c driver to GPIO descriptor API ALSA: hda/realtek - Enable jack detection function for Intel ALC700 ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins ASoC: add missing compile rule for max98371 ASoC: add missing compile rule for sirf-audio-codec ASoC: add missing compile rule for max98371 ASoC: cs43130: Add devicetree bindings for CS43130 ASoC: cs43130: Add support for CS43130 codec ASoC: make clock direction configurable in asoc-simple ALSA: ctxfi: Remove null check before kfree ASoC: max98927: Changed device property read function ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path ASoC: max98927: Added PM suspend and resume function ... commit 3645e6d0dc80be4376f87acc9ee527768387c909 Merge: 15d8ffc e8a27f8 Author: Linus Torvalds Date: Thu Sep 7 12:41:48 2017 -0700 Merge tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD updates from Shaohua Li: "This update mainly fixes bugs: - Make raid5 ppl support several ppl from Pawel - Several raid5-cache bug fixes from Song - Bitmap fixes from Neil and Me - One raid1/10 regression fix since 4.12 from Me - Other small fixes and cleanup" * tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/bitmap: disable bitmap_resize for file-backed bitmaps. raid5-ppl: Recovery support for multiple partial parity logs md: Runtime support for multiple ppls md/raid0: attach correct cgroup info in bio lib/raid6: align AVX512 constants to 512 bits, not bytes raid5: remove raid5_build_block md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show md: replace seq_release_private with seq_release md: notify about new spare disk in the container md/raid1/10: reset bio allocated from mempool md/raid5: release/flush io in raid5_do_work() md/bitmap: copy correct data for bitmap super commit 175206cf9ab63161dec74d9cd7f9992e062491f5 Author: Tang Junhui Date: Thu Sep 7 01:28:53 2017 +0800 bcache: initialize dirty stripes in flash_dev_run() bcache uses a Proportion-Differentiation Controller algorithm to control writeback rate to cached devices. In the PD controller algorithm, dirty stripes of thin flash device should not be counted in, because flash only volumes never write back dirty data. Currently dirty stripe counter for thin flash device is not initialized when the thin flash device starts. Which means the following calculation in PD controller will reference an undefined dirty stripes number, and all cached devices attached to the same cache set where the thin flash device lies on may have an inaccurate writeback rate. This patch calles bch_sectors_dirty_init() in flash_dev_run(), to correctly initialize dirty stripe counter when the thin flash device starts to run. This patch also does following parameter data type change, -void bch_sectors_dirty_init(struct cached_dev *dc); +void bch_sectors_dirty_init(struct bcache_device *); to call this function conveniently in flash_dev_run(). (Commit log is composed by Coly Li) Signed-off-by: Tang Junhui Reviewed-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 3 ++- drivers/md/bcache/writeback.c | 8 ++++---- drivers/md/bcache/writeback.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit 15d8ffc96464f6571ecf22043c45fad659f11bdd Merge: a0725ab c16a854 Author: Linus Torvalds Date: Thu Sep 7 12:24:50 2017 -0700 Merge tag 'mmc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Continue to refactor the mmc block code to prepare for blkmq - Move mmc block debugfs into block module - Next step for eMMC CMDQ by adding a new mmc host interface for it - Move Kconfig option MMC_DEBUG from core to host - Some additional minor improvements MMC host: - Declare structs as const when applicable - Explicitly request exclusive reset control when applicable - Improve some error paths and other various cleanups - sdhci: Preparations to support SDHCI OMAP - sdhci: Improve some PM related code - sdhci: Re-factoring and modernizations - sdhci-xenon: Add runtime PM and system sleep support - sdhci-xenon: Add support for eMMC HS400 Enhanced Strobe - sdhci-cadence: Add system sleep support - sdhci-of-at91: Improve system sleep support - dw_mmc: Add support for Hisilicon hi3660 - sunxi: Add support for A83T eMMC - sunxi: Add support for DDR52 mode - meson-gx: Add support for UHS-I SD-cards - meson-gx: Cleanups and improvements - tmio: Fix CMD12 (STOP) handling - tmio: Cleanups and improvements - renesas_sdhi: Add r8a7743/5 support - renesas-sdhi: Add support for R-Car Gen3 SDHI DMAC - renesas_sdhi: Cleanups and improvements" * tag 'mmc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (145 commits) mmc: renesas_sdhi: Add r8a7743/5 support mmc: meson-gx: fix __ffsdi2 undefined on arm32 mmc: sdhci-xenon: add runtime pm support and reimplement standby mmc: core: Move mmc_start_areq() declaration mmc: mmci: stop building qcom dml as module mmc: sunxi: Reset the device at probe time clk: sunxi-ng: Provide a default reset hook mmc: meson-gx: rework tuning function mmc: meson-gx: change default tx phase mmc: meson-gx: implement voltage switch callback mmc: meson-gx: use CCF to handle the clock phases mmc: meson-gx: implement card_busy callback mmc: meson-gx: simplify interrupt handler mmc: meson-gx: work around clk-stop issue mmc: meson-gx: fix dual data rate mode frequencies mmc: meson-gx: rework clock init function mmc: meson-gx: rework clk_set function mmc: meson-gx: rework set_ios function mmc: meson-gx: cfg init overwrite values mmc: meson-gx: initialize sane clk default before clock register ... commit 2441500a41a9b17ff657626eb81972f62bc8cc5a Merge: a45a1f36 e6f7754 Author: James Bottomley Date: Thu Sep 7 12:12:43 2017 -0700 Merge branch 'fixes' into misc commit 86652d2eb347080a991968c9d68708dc010ac56c Author: Vishal Verma Date: Tue Sep 5 14:35:39 2017 -0600 libnvdimm, btt: clean up warning and error messages Convert all WARN* style messages to dev_WARN, and for errors in the IO paths, use dev_err_ratelimited. Also remove some BUG_ONs in the IO path and replace them with the above - no need to crash the machine in case of an unaligned IO. Cc: Dan Williams Signed-off-by: Vishal Verma Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 58 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 22 deletions(-) commit a0725ab0c7536076d5477264420ef420ebb64501 Merge: 3ee31b8 ef13ecb Author: Linus Torvalds Date: Thu Sep 7 11:59:42 2017 -0700 Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: "This is the first pull request for 4.14, containing most of the code changes. It's a quiet series this round, which I think we needed after the churn of the last few series. This contains: - Fix for a registration race in loop, from Anton Volkov. - Overflow complaint fix from Arnd for DAC960. - Series of drbd changes from the usual suspects. - Conversion of the stec/skd driver to blk-mq. From Bart. - A few BFQ improvements/fixes from Paolo. - CFQ improvement from Ritesh, allowing idling for group idle. - A few fixes found by Dan's smatch, courtesy of Dan. - A warning fixup for a race between changing the IO scheduler and device remova. From David Jeffery. - A few nbd fixes from Josef. - Support for cgroup info in blktrace, from Shaohua. - Also from Shaohua, new features in the null_blk driver to allow it to actually hold data, among other things. - Various corner cases and error handling fixes from Weiping Zhang. - Improvements to the IO stats tracking for blk-mq from me. Can drastically improve performance for fast devices and/or big machines. - Series from Christoph removing bi_bdev as being needed for IO submission, in preparation for nvme multipathing code. - Series from Bart, including various cleanups and fixes for switch fall through case complaints" * 'for-4.14/block' of git://git.kernel.dk/linux-block: (162 commits) kernfs: checking for IS_ERR() instead of NULL drbd: remove BIOSET_NEED_RESCUER flag from drbd_{md_,}io_bio_set drbd: Fix allyesconfig build, fix recent commit drbd: switch from kmalloc() to kmalloc_array() drbd: abort drbd_start_resync if there is no connection drbd: move global variables to drbd namespace and make some static drbd: rename "usermode_helper" to "drbd_usermode_helper" drbd: fix race between handshake and admin disconnect/down drbd: fix potential deadlock when trying to detach during handshake drbd: A single dot should be put into a sequence. drbd: fix rmmod cleanup, remove _all_ debugfs entries drbd: Use setup_timer() instead of init_timer() to simplify the code. drbd: fix potential get_ldev/put_ldev refcount imbalance during attach drbd: new disk-option disable-write-same drbd: Fix resource role for newly created resources in events2 drbd: mark symbols static where possible drbd: Send P_NEG_ACK upon write error in protocol != C drbd: add explicit plugging when submitting batches drbd: change list_for_each_safe to while(list_first_entry_or_null) drbd: introduce drbd_recv_header_maybe_unplug ... commit cf2d804110d3c20dc6865ade514c44179de34855 Merge: 27e8739 0fc690a Author: Bjorn Helgaas Date: Thu Sep 7 13:24:41 2017 -0500 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: Disable VF decoding before pcibios_sriov_disable() updates resources PCI: Add ACS quirk for APM X-Gene devices PCI: Mark AMD Stoney GPU ATS as broken Conflicts: drivers/pci/quirks.c commit 27e87395ae3497ebb63942150e43999c93a83ed0 Merge: 9198407 96291d5 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:20 2017 -0500 Merge branch 'pci/trivial' into next * pci/trivial: PCI: Fix typos and whitespace errors PCI: Remove unused "res" variable from pci_resource_io() PCI: Correct kernel-doc of pci_vpd_srdt_size(), pci_vpd_srdt_tag() commit 9198407e23ec89f0e1562f439771aeea83345d0d Merge: d872694 c775697 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:19 2017 -0500 Merge branch 'pci/resource' into next * pci/resource: microblaze/PCI: Remove pcibios_setup_bus_{self/devices} dead code ARC: Remove empty kernel/pcibios.c PCI: Add a generic weak pcibios_align_resource() PCI: Add a generic weak pcibios_fixup_bus() commit d872694bac212f76ca13fd20a85e5c1bdb53a945 Merge: 79ab592 ab4b8a4 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:18 2017 -0500 Merge branch 'pci/pm' into next * pci/pm: PCI/PM: Expand description of pci_set_power_state() commit 79ab592c700e969d32770dcd1ae39ac64c328812 Merge: 33db87d 235b2c7 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:18 2017 -0500 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Assume MSIs use real Requester ID, not an alias commit 33db87de6ab7ba9a3cca5b57033621ad154c1d0a Merge: d4fdf84 ea5311c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:16 2017 -0500 Merge branch 'pci/misc' into next * pci/misc: PCI: Fix PCIe capability sizes PCI: Convert to using %pOF instead of full_name() PCI: Constify endpoint pci_epf_type device_type PCI: Constify bin_attribute structures PCI: Constify hotplug pci_device_id structures PCI: Constify hotplug attribute_group structures PCI: Constify label attribute_group structures PCI: Constify sysfs attribute_group structures commit d4fdf844c9c3debc080aea1be8b71d9d0aaa01dc Merge: cf5f9cc 606799c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:16 2017 -0500 Merge branch 'pci/irq-fixups' into next * pci/irq-fixups: PCI: Inline and remove pcibios_update_irq() PCI: Remove unused pci_fixup_irqs() function sparc/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks unicore32/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks tile/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks m68k/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks sh/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks sh/PCI: Remove __init optimisations from IRQ mapping functions/data MIPS: PCI: Fix pcibios_scan_bus() NULL check code path commit cf5f9cc8e4e5e8e0ecc35f1c904d98f889be2c0f Merge: c5efc22 7612b3b Author: Bjorn Helgaas Date: Thu Sep 7 13:24:15 2017 -0500 Merge branch 'pci/hotplug' into next * pci/hotplug: PCI: pciehp: Report power fault only once until we clear it PCI: shpchp: Enable bridge bus mastering if MSI is enabled commit c5efc2209505916b6dbcd7ebe9412707b02dbc2f Merge: 18f2067 e78e661 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:14 2017 -0500 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: Warn periodically while waiting for non-CRS ("device ready") status PCI: Wait up to 60 seconds for device to become ready after FLR PCI: Factor out pci_bus_wait_crs() PCI: Add pci_bus_crs_vendor_id() to detect CRS response data PCI: Always check for non-CRS response before timeout PCI: Avoid race while enabling upstream bridges PCI: Mark Broadcom HT2100 Root Port Extended Tags as broken commit 18f20670e098ddb86bb331b493fd74ff8168ef7c Merge: f190132 9e16b8d Author: Bjorn Helgaas Date: Thu Sep 7 13:24:13 2017 -0500 Merge branch 'pci/dpc' into next * pci/dpc: PCI/DPC: Add local struct device pointers PCI/DPC: Add eDPC support commit f19013248ea2cd79ff73be982396d950e3870d25 Merge: 3a749ea 8fc614c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:12 2017 -0500 Merge branch 'pci/aer' into next * pci/aer: PCI/AER: Reformat AER register definitions PCI/portdrv: Move error handler methods to struct pcie_port_service_driver commit 3a749ea1c0271cbadf234befe307f14267325836 Merge: 99fd1b9 e475842 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:11 2017 -0500 Merge branch 'pci/endpoint' into next * pci/endpoint: tools: PCI: Add a missing option help line misc: pci_endpoint_test: Enable/Disable MSI using module param misc: pci_endpoint_test: Avoid using hard-coded BAR sizes misc: pci_endpoint_test: Add support to not enable MSI interrupts misc: pci_endpoint_test: Add support to provide aligned buffer addresses misc: pci_endpoint_test: Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR PCI: designware-ep: Do not disable BARs during initialization PCI: dra7xx: Reset all BARs during initialization PCI: dwc: designware: Provide page_size to pci_epc_mem PCI: endpoint: Remove the ->remove() callback PCI: endpoint: Add support to poll early for host commands PCI: endpoint: Add support to use _any_ BAR to map PCI_ENDPOINT_TEST regs PCI: endpoint: Do not reset *command* inadvertently PCI: endpoint: Add "volatile" to pci_epf_test_reg PCI: endpoint: Add support for configurable page size PCI: endpoint: Make ->remove() callback optional PCI: endpoint: Add an API to get matching "pci_epf_device_id" PCI: endpoint: Use of_dma_configure() to set initial DMA mask commit 99fd1b958cd36dc13fa441d63c4e93a39e17fb65 Merge: dd422a6 5fd4bf6 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:11 2017 -0500 Merge branch 'pci/host-xilinx' into next * pci/host-xilinx: PCI: xilinx-nwl: Fix platform_get_irq() error handling PCI: xilinx: Allow build on MIPS platforms PCI: xilinx: Don't enable config completion interrupts PCI: xilinx: Unify INTx & MSI interrupt decode PCI: xilinx-nwl: Translate INTx range to hwirqs 0-3 PCI: xilinx: Translate INTx range to hwirqs 0-3 commit dd422a6f558cfb50d56d93a84adac149b2eaae7e Merge: e9e256d fca4848 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:10 2017 -0500 Merge branch 'pci/host-xgene' into next * pci/host-xgene: PCI: xgene: Clean up whitespace PCI: xgene: Define XGENE_PCI_EXP_CAP and use generic PCI_EXP_RTCTL offset PCI: xgene: Fix platform_get_irq() error handling commit e9e256dff423e0d23b4d45ef925a3d203cfd0994 Merge: 08d20f9 5823e33 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:09 2017 -0500 Merge branch 'pci/host-vmd' into next * pci/host-vmd: iommu/vt-d: Prevent VMD child devices from being remapping targets x86/PCI: Use is_vmd() rather than relying on the domain number x86/PCI: Move VMD quirk to x86 fixups MAINTAINERS: Add Jonathan Derrick as VMD maintainer PCI: vmd: Remove IRQ affinity so we can allocate more IRQs PCI: vmd: Free up IRQs on suspend path PCI: vmd: Assign vector zero to all bridges PCI: vmd: Reserve IRQ pre-vector for better affinity commit 08d20f9f1e11a64979768d69af7871df2e43f794 Merge: f90742c 4b9cc2c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:08 2017 -0500 Merge branch 'pci/host-tegra' into next * pci/host-tegra: PCI: tegra: Explicitly request exclusive reset control commit f90742cbfb51901307c30a3e99df314da79f73a5 Merge: 68e8fa4 343ce0c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:07 2017 -0500 Merge branch 'pci/host-spear13xx' into next * pci/host-spear13xx: PCI: spear13xx: Fix platform_get_irq() error handling commit 68e8fa46d185894b6d1fe7f2f71a8a83b442c633 Merge: 3d499a9 81edd47 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:07 2017 -0500 Merge branch 'pci/host-rockchip' into next * pci/host-rockchip: PCI: rockchip: Fix platform_get_irq() error handling PCI: rockchip: Umap IO space if probe fails PCI: rockchip: Remove IRQ domain if probe fails PCI: rockchip: Disable vpcie0v9 if resume_noirq fails PCI: rockchip: Clean up PHY if driver probe or resume fails PCI: rockchip: Factor out rockchip_pcie_deinit_phys() PCI: rockchip: Factor out rockchip_pcie_disable_clocks() PCI: rockchip: Factor out rockchip_pcie_enable_clocks() PCI: rockchip: Factor out rockchip_pcie_setup_irq() PCI: rockchip: Use gpiod_set_value_cansleep() to allow reset via expanders PCI: rockchip: Use PCI_NUM_INTX PCI: rockchip: Explicitly request exclusive reset control dt-bindings: phy-rockchip-pcie: Convert to per-lane PHY model dt-bindings: PCI: rockchip: Convert to per-lane PHY model arm64: dts: rockchip: convert PCIe to use per-lane PHYs for rk3339 PCI: rockchip: Idle inactive PHY(s) phy: rockchip-pcie: Reconstruct driver to support per-lane PHYs PCI: rockchip: Add per-lane PHY support PCI: rockchip: Factor out rockchip_pcie_get_phys() PCI: rockchip: Control optional 12v power supply dt-bindings: PCI: rockchip: Add vpcie12v-supply for Rockchip PCIe controller commit 3d499a955a30ef1bb9b2176ecb1d3a6be8e3ef9c Merge: cb9d4f0 c31c83c Author: Bjorn Helgaas Date: Thu Sep 7 13:24:05 2017 -0500 Merge branch 'pci/host-rcar' into next * pci/host-rcar: PCI: rcar: Add device tree support for r8a7743/5 PCI: rcar: Fix memory leak when no PCIe card is inserted PCI: rcar: Fix error exit path commit cb9d4f00312c27f5562e5ff99d391a6b61102345 Merge: 73646b7 5d76117 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:05 2017 -0500 Merge branch 'pci/host-qcom' into next * pci/host-qcom: PCI: qcom: Add support for IPQ8074 PCIe controller dt-bindings: PCI: qcom: Add support for IPQ8074 PCI: qcom: Use block IP version for operations PCI: qcom: Explicitly request exclusive reset control PCI: qcom: Use gpiod_set_value_cansleep() to allow reset via expanders commit 73646b7fb551a92ad4d2a05bea6fb40b1ae8ae01 Merge: a2efd68 c353951 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:04 2017 -0500 Merge branch 'pci/host-mvebu' into next * pci/host-mvebu: PCI: mvebu: Remove unneeded gpiod NULL check commit a2efd681208375d1fa2da3dc8e064d5afa1e57b7 Merge: 9857f12 d84c246 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:03 2017 -0500 Merge branch 'pci/host-mediatek' into next * pci/host-mediatek: PCI: mediatek: Use PCI_NUM_INTX PCI: mediatek: Add MSI support for MT2712 and MT7622 PCI: mediatek: Use bus->sysdata to get host private data dt-bindings: PCI: Add support for MT2712 and MT7622 PCI: mediatek: Add controller support for MT2712 and MT7622 dt-bindings: PCI: Cleanup MediaTek binding text dt-bindings: PCI: Rename MediaTek binding PCI: mediatek: Switch to use platform_get_resource_byname() PCI: mediatek: Add a structure to abstract the controller generations PCI: mediatek: Rename port->index and mtk_pcie_parse_ports() PCI: mediatek: Use readl_poll_timeout() to wait for Gen2 training PCI: mediatek: Explicitly request exclusive reset control commit 9857f12565792ff077c473e626f00b21286a7f5d Merge: 0964c40 03fc613 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:02 2017 -0500 Merge branch 'pci/host-layerscape' into next * pci/host-layerscape: PCI: layerscape: Add support for ls1088a PCI: layerscape: Add support for ls2088a PCI: artpec6: Stop enabling writes to DBI read-only registers PCI: layerscape: Remove unnecessary class code fixup PCI: dwc: Enable write permission for Class Code, Interrupt Pin updates PCI: dwc: Add accessors for write permission of DBI read-only registers PCI: layerscape: Disable outbound windows configured by bootloader PCI: layerscape: Refactor ls1021_pcie_host_init() PCI: layerscape: Move generic init functions earlier in file PCI: layerscape: Add class code and multifunction fixups for ls1021a PCI: layerscape: Move STRFMR1 access out from the DBI write-enable bracket PCI: layerscape: Call dw_pcie_setup_rc() from ls_pcie_host_init() commit 0964c40f3acd468b29524c0c106c5560cde9ff5f Merge: 8f5b3f5 db2af31 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:01 2017 -0500 Merge branch 'pci/host-kirin' into next * pci/host-kirin: PCI: kirin: Constify dw_pcie_host_ops structure commit 8f5b3f5b40d1d4e33570ea74a2023695c37c06b2 Merge: 352948c da4c4be Author: Bjorn Helgaas Date: Thu Sep 7 13:24:01 2017 -0500 Merge branch 'pci/host-keystone' into next * pci/host-keystone: PCI: keystone: Use PCI_NUM_INTX PCI: keystone: Remove duplicate MAX_*_IRQS defs PCI: keystone-dw: Remove unused ks_pcie, pci variables commit 352948c414d92784a2edb762554d1c682ebd4661 Merge: 8a21881 ef685b3 Author: Bjorn Helgaas Date: Thu Sep 7 13:24:00 2017 -0500 Merge branch 'pci/host-iproc' into next * pci/host-iproc: PCI: iproc: Clean up whitespace PCI: iproc: Rename PCI_EXP_CAP to IPROC_PCI_EXP_CAP PCI: iproc: Add 500ms delay during device shutdown PCI: iproc: Work around Stingray CRS defects PCI: iproc: Factor out memory-mapped config access address calculation PCI: iproc: Remove unused struct iproc_pcie *pcie commit 8a21881ac4ef04a3568f077b2ab3a84c0aa32c47 Merge: b7c1947 7c18058 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:59 2017 -0500 Merge branch 'pci/host-imx6' into next * pci/host-imx6: PCI: imx6: Explicitly request exclusive reset control commit b7c19476bd80183f105c6aa22d2bbad1ecd26a2e Merge: 6238e05 80bfeeb Author: Bjorn Helgaas Date: Thu Sep 7 13:23:59 2017 -0500 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Do not sleep in compose_msi_msg() commit 6238e057d4056015f757956b0046fca8a64d8cfa Merge: 7362662 5a47516 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:58 2017 -0500 Merge branch 'pci/host-hisi' into next * pci/host-hisi: PCI: hisi: Constify dw_pcie_host_ops structure PCI: hisi: Remove unused variable driver commit 736266296e892ed9e8594a922cd8bb9c369b7b84 Merge: 0dd9636f 341d329 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:57 2017 -0500 Merge branch 'pci/host-faraday' into next * pci/host-faraday: PCI: faraday: Use PCI_NUM_INTX PCI: faraday: Fix of_irq_get() error check commit 0dd9636f97daa346b514402782a782c979b0a454 Merge: 5138620 1df5a48 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:56 2017 -0500 Merge branch 'pci/host-exynos' into next * pci/host-exynos: PCI: exynos: Fix platform_get_irq() error handling commit 51386202a5948a024bdabb4318f7da362d514988 Merge: ee75520 2f3ec75 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:55 2017 -0500 Merge branch 'pci/host-dra7xx' into next * pci/host-dra7xx: PCI: dra7xx: Fix platform_get_irq() error handling PCI: dra7xx: Propagate platform_get_irq() errors in dra7xx_pcie_probe() PCI: dra7xx: Use PCI_NUM_INTX commit ee75520eb20cf3c9101742ecb219064ad4c3fec9 Merge: 199a025 8c93409 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:55 2017 -0500 Merge branch 'pci/host-designware' into next * pci/host-designware: PCI: dwc: Clear MSI interrupt status after it is handled, not before PCI: qcom: Allow ->post_init() to fail PCI: qcom: Don't unroll init if ->init() fails PCI: dwc: designware: Handle ->host_init() failures PCI: dwc: designware: Test PCIE_ATU_ENABLE bit specifically PCI: dwc: designware: Make dw_pcie_prog_*_atu_unroll() static commit 199a0253e39dc62f419de1d00a7c7a16f4b0f720 Merge: 9627804 16df7cd Author: Bjorn Helgaas Date: Thu Sep 7 13:23:54 2017 -0500 Merge branch 'pci/host-artpec6' into next * pci/host-artpec6: PCI: artpec6: Fix platform_get_irq() error handling commit 9627804be4c17149e2c78c96b8307d27eb8992dc Merge: a89d7e4 0fe5f1c Author: Bjorn Helgaas Date: Thu Sep 7 13:23:53 2017 -0500 Merge branch 'pci/host-armada' into next * pci/host-armada: PCI: armada8k: Fix platform_get_irq() error handling PCI: armada8k: Check the return value from clk_prepare_enable() commit a89d7e43e1ab04d075469c79bb52383b6280609f Merge: 741e223 ef75369 Author: Bjorn Helgaas Date: Thu Sep 7 13:23:53 2017 -0500 Merge branch 'pci/host-altera' into next * pci/host-altera: PCI: altera: Fix platform_get_irq() error handling PCI: altera: Use size=4 IRQ domain for legacy INTx PCI: altera: Remove unused num_of_vectors variable commit 741e2237be94405f03db1ff627a39ef0c086d50d Merge: 37deba4 0d2977a Author: Bjorn Helgaas Date: Thu Sep 7 13:23:52 2017 -0500 Merge branch 'pci/host-aardvark' into next * pci/host-aardvark: PCI: aardvark: Use PCI_NUM_INTX commit 37deba4525956a7106727446ceec3536acd0d1f3 Merge: 16f73eb 0d58e6c Author: Bjorn Helgaas Date: Thu Sep 7 13:23:51 2017 -0500 Merge branch 'pci/irq-intx' into next * pci/irq-intx: PCI: Add pci_irqd_intx_xlate() PCI: Move enum pci_interrupt_pin to linux/pci.h commit 3ee31b89d9b12c01aa03dda7a923ef07a800eedd Merge: bac65d9 d785d9e Author: Linus Torvalds Date: Thu Sep 7 10:24:21 2017 -0700 Merge tag 'for-linus-4.14b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - the new pvcalls backend for routing socket calls from a guest to dom0 - some cleanups of Xen code - a fix for wrong usage of {get,put}_cpu() * tag 'for-linus-4.14b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (27 commits) xen/mmu: set MMU_NORMAL_PT_UPDATE in remap_area_mfn_pte_fn xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init() xen/pvcalls: use WARN_ON(1) instead of __WARN() xen: remove not used trace functions xen: remove unused function xen_set_domain_pte() xen: remove tests for pvh mode in pure pv paths xen-platform: constify pci_device_id. xen: cleanup xen.h xen: introduce a Kconfig option to enable the pvcalls backend xen/pvcalls: implement write xen/pvcalls: implement read xen/pvcalls: implement the ioworker functions xen/pvcalls: disconnect and module_exit xen/pvcalls: implement release command xen/pvcalls: implement poll command xen/pvcalls: implement accept command xen/pvcalls: implement listen command xen/pvcalls: implement bind command xen/pvcalls: implement connect command ... commit bac65d9d87b383471d8d29128319508d71b74180 Merge: f92e3da 265601f Author: Linus Torvalds Date: Thu Sep 7 10:15:40 2017 -0700 Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Nothing really major this release, despite quite a lot of activity. Just lots of things all over the place. Some things of note include: - Access via perf to a new type of PMU (IMC) on Power9, which can count both core events as well as nest unit events (Memory controller etc). - Optimisations to the radix MMU TLB flushing, mostly to avoid unnecessary Page Walk Cache (PWC) flushes when the structure of the tree is not changing. - Reworks/cleanups of do_page_fault() to modernise it and bring it closer to other architectures where possible. - Rework of our page table walking so that THP updates only need to send IPIs to CPUs where the affected mm has run, rather than all CPUs. - The size of our vmalloc area is increased to 56T on 64-bit hash MMU systems. This avoids problems with the percpu allocator on systems with very sparse NUMA layouts. - STRICT_KERNEL_RWX support on PPC32. - A new sched domain topology for Power9, to capture the fact that pairs of cores may share an L2 cache. - Power9 support for VAS, which is a new mechanism for accessing coprocessors, and initial support for using it with the NX compression accelerator. - Major work on the instruction emulation support, adding support for many new instructions, and reworking it so it can be used to implement the emulation needed to fixup alignment faults. - Support for guests under PowerVM to use the Power9 XIVE interrupt controller. And probably that many things again that are almost as interesting, but I had to keep the list short. Plus the usual fixes and cleanups as always. Thanks to: Alexey Kardashevskiy, Alistair Popple, Andreas Schwab, Aneesh Kumar K.V, Anju T Sudhakar, Arvind Yadav, Balbir Singh, Benjamin Herrenschmidt, Bhumika Goyal, Breno Leitao, Bryant G. Ly, Christophe Leroy, Cédric Le Goater, Dan Carpenter, Dou Liyang, Frederic Barrat, Gautham R. Shenoy, Geliang Tang, Geoff Levand, Hannes Reinecke, Haren Myneni, Ivan Mikhaylov, John Allen, Julia Lawall, LABBE Corentin, Laurentiu Tudor, Madhavan Srinivasan, Markus Elfring, Masahiro Yamada, Matt Brown, Michael Neuling, Murilo Opsfelder Araujo, Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Rashmica Gupta, Rob Herring, Rui Teng, Sam Bobroff, Santosh Sivaraj, Scott Wood, Shilpasri G Bhat, Sukadev Bhattiprolu, Suraj Jitindar Singh, Tobin C. Harding, Victor Aoqui" * tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (321 commits) powerpc/xive: Fix section __init warning powerpc: Fix kernel crash in emulation of vector loads and stores powerpc/xive: improve debugging macros powerpc/xive: add XIVE Exploitation Mode to CAS powerpc/xive: introduce H_INT_ESB hcall powerpc/xive: add the HW IRQ number under xive_irq_data powerpc/xive: introduce xive_esb_write() powerpc/xive: rename xive_poke_esb() in xive_esb_read() powerpc/xive: guest exploitation of the XIVE interrupt controller powerpc/xive: introduce a common routine xive_queue_page_alloc() powerpc/sstep: Avoid used uninitialized error axonram: Return directly after a failed kzalloc() in axon_ram_probe() axonram: Improve a size determination in axon_ram_probe() axonram: Delete an error message for a failed memory allocation in axon_ram_probe() powerpc/powernv/npu: Move tlb flush before launching ATSD powerpc/macintosh: constify wf_sensor_ops structures powerpc/iommu: Use permission-specific DEVICE_ATTR variants powerpc/eeh: Delete an error out of memory message at init time powerpc/mm: Use seq_putc() in two functions macintosh: Convert to using %pOF instead of full_name ... commit f92e3da18b7d5941468040af962c201235148301 Merge: 57e88b4 6de47a5 Author: Linus Torvalds Date: Thu Sep 7 09:42:35 2017 -0700 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Transparently fall back to other poweroff method(s) if EFI poweroff fails (and returns) - Use separate PE/COFF section headers for the RX and RW parts of the ARM stub loader so that the firmware can use strict mapping permissions - Add support for requesting the firmware to wipe RAM at warm reboot - Increase the size of the random seed obtained from UEFI so CRNG fast init can complete earlier - Update the EFI framebuffer address if it points to a BAR that gets moved by the PCI resource allocation code - Enable "reset attack mitigation" of TPM environments: this is enabled if the kernel is configured with CONFIG_RESET_ATTACK_MITIGATION=y. - Clang related fixes - Misc cleanups, constification, refactoring, etc" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/bgrt: Use efi_mem_type() efi: Move efi_mem_type() to common code efi/reboot: Make function pointer orig_pm_power_off static efi/random: Increase size of firmware supplied randomness efi/libstub: Enable reset attack mitigation firmware/efi/esrt: Constify attribute_group structures firmware/efi: Constify attribute_group structures firmware/dcdbas: Constify attribute_group structures arm/efi: Split zImage code and data into separate PE/COFF sections arm/efi: Replace open coded constants with symbolic ones arm/efi: Remove pointless dummy .reloc section arm/efi: Remove forbidden values from the PE/COFF header drivers/fbdev/efifb: Allow BAR to be moved instead of claiming it efi/reboot: Fall back to original power-off method if EFI_RESET_SHUTDOWN returns efi/arm/arm64: Add missing assignment of efi.config_table efi/libstub/arm64: Set -fpie when building the EFI stub efi/libstub/arm64: Force 'hidden' visibility for section markers efi/libstub/arm64: Use hidden attribute for struct screen_info reference efi/arm: Don't mark ACPI reclaim memory as MEMBLOCK_NOMAP commit 0f2be423f1fa70df4e3b91224bcdded76675308c Merge: 8e0deed bde59c4 Author: David S. Miller Date: Thu Sep 7 09:40:58 2017 -0700 Merge tag 'mac80211-for-davem-2017-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Back from a long absence, so we have a number of things: * a remain-on-channel fix from Avi * hwsim TX power fix from Beni * null-PTR dereference with iTXQ in some rare configurations (Chunho) * 40 MHz custom regdomain fixes (Emmanuel) * look at right place in HT/VHT capability parsing (Igor) * complete A-MPDU teardown properly (Ilan) * Mesh ID Element ordering fix (Liad) * avoid tracing warning in ht_dbg() (Sharon) * fix print of assoc/reassoc (Simon) * fix encrypted VLAN with iTXQ (myself) * fix calling context of TX queue wake (myself) * fix a deadlock with ath10k aggregation (myself) ==================== Signed-off-by: David S. Miller commit 2eabc84d2f8e4f36d3719eeb6a330e10c46c8da7 Author: Luca Coelho Date: Thu Sep 7 10:51:52 2017 +0300 iwlwifi: mvm: only send LEDS_CMD when the FW supports it The LEDS_CMD command is only supported in some newer FW versions (e.g. iwlwifi-8000C-31.ucode), so we can't send it to older versions (such as iwlwifi-8000C-27.ucode). To fix this, check for a new bit in the FW capabilities TLV that tells when the command is supported. Note that the current version of -31.ucode in linux-firmware.git (31.532993.0) does not have this capability bit set, so the LED won't work, even though this version should support it. But we will update this firmware soon, so it won't be a problem anymore. Fixes: 7089ae634c50 ("iwlwifi: mvm: use firmware LED command where applicable") Reported-by: Linus Torvalds Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/led.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 78809a68490d84eb632a215be2121d4b44c86954 Merge: 082d390 43f6b0c Author: Radim Krčmář Date: Thu Sep 7 18:29:01 2017 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc KVM/PPC update for 4.14 There are various minor fixes and cleanups. The only new feature is that we now export information about storage key support to userspace, so it can advertise it to the guest. I have pulled in Michael Ellerman's topic/ppc-kvm branch from the powerpc tree to get a couple of fixes that touch both KVM PPC code and other PPC code. That's why there is some arch/powerpc stuff in the diffstat that isn't arch/powerpc/kvm. commit 2a8a98673c13cb2a61a6476153acf8344adfa992 Author: Mauricio Faria de Oliveira Date: Wed Jul 5 10:53:16 2017 -0300 fs: aio: fix the increment of aio-nr and counting against aio-max-nr Currently, aio-nr is incremented in steps of 'num_possible_cpus() * 8' for io_setup(nr_events, ..) with 'nr_events < num_possible_cpus() * 4': ioctx_alloc() ... nr_events = max(nr_events, num_possible_cpus() * 4); nr_events *= 2; ... ctx->max_reqs = nr_events; ... aio_nr += ctx->max_reqs; .... This limits the number of aio contexts actually available to much less than aio-max-nr, and is increasingly worse with greater number of CPUs. For example, with 64 CPUs, only 256 aio contexts are actually available (with aio-max-nr = 65536) because the increment is 512 in that scenario. Note: 65536 [max aio contexts] / (64*4*2) [increment per aio context] is 128, but make it 256 (double) as counting against 'aio-max-nr * 2': ioctx_alloc() ... if (aio_nr + nr_events > (aio_max_nr * 2UL) || ... goto err_ctx; ... This patch uses the original value of nr_events (from userspace) to increment aio-nr and count against aio-max-nr, which resolves those. Signed-off-by: Mauricio Faria de Oliveira Reported-by: Lekshmi C. Pillai Tested-by: Lekshmi C. Pillai Tested-by: Paul Nguyen Reviewed-by: Jeff Moyer Signed-off-by: Benjamin LaHaise fs/aio.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 57e88b43b81301d9b28f124a5576ac43a1cf9e8d Merge: 3b9f8ed 773b79f Author: Linus Torvalds Date: Thu Sep 7 09:25:15 2017 -0700 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 include various Hyper-V optimizations such as faster hypercalls and faster/better TLB flushes - and there's also some Intel-MID cleanups" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tracing/hyper-v: Trace hyperv_mmu_flush_tlb_others() x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls x86/platform/intel-mid: Make several arrays static, to make code smaller MAINTAINERS: Add missed file for Hyper-V x86/hyper-v: Use hypercall for remote TLB flush hyper-v: Globalize vp_index x86/hyper-v: Implement rep hypercalls hyper-v: Use fast hypercall for HVCALL_SIGNAL_EVENT x86/hyper-v: Introduce fast hypercall implementation x86/hyper-v: Make hv_do_hypercall() inline x86/hyper-v: Include hyperv/ only when CONFIG_HYPERV is set x86/platform/intel-mid: Make 'bt_sfi_data' const x86/platform/intel-mid: Make IRQ allocation a bit more flexible x86/platform/intel-mid: Group timers callbacks together commit 082d3900a446283a6ec15917a1682db2cdf17621 Merge: 6e0ff1b 9b87e7a Author: Radim Krčmář Date: Thu Sep 7 18:22:04 2017 +0200 Merge tag 'kvm-arm-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Changes for v4.14 Two minor cleanups and improvements, a fix for decoding external abort types from guests, and added support for migrating the active priority of interrupts when running a GICv2 guest on a GICv3 host. commit e973b1a5999e57da677ab50da5f5479fdc0f0c31 Author: tarangg@amazon.com Date: Thu Sep 7 09:29:23 2017 -0400 NFS: Sync the correct byte range during synchronous writes Since commit 18290650b1c8 ("NFS: Move buffered I/O locking into nfs_file_write()") nfs_file_write() has not flushed the correct byte range during synchronous writes. generic_write_sync() expects that iocb->ki_pos points to the right edge of the range rather than the left edge. To replicate the problem, open a file with O_DSYNC, have the client write at increasing offsets, and then print the successful offsets. Block port 2049 partway through that sequence, and observe that the client application indicates successful writes in advance of what the server received. Fixes: 18290650b1c8 ("NFS: Move buffered I/O locking into nfs_file_write()") Signed-off-by: Jacob Strauss Signed-off-by: Tarang Gupta Tested-by: Tarang Gupta Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Trond Myklebust fs/nfs/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e0ff1b4dbe2dcd31d903f691b2bb887206405f1 Merge: 712b12d c95c895 Author: Radim Krčmář Date: Thu Sep 7 16:46:46 2017 +0200 Merge tag 'kvm-s390-next-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: Fixes and features for 4.14 - merge of topic branch tlb-flushing from the s390 tree to get the no-dat base features - merge of kvm/master to avoid conflicts with additional sthyi fixes - wire up the no-dat enhancements in KVM - multiple epoch facility (z14 feature) - Configuration z/Architecture Mode - more sthyi fixes - gdb server range checking fix - small code cleanups commit fca4848bbc8c016f64e5a1c827e91dbe1d3be2e9 Author: Bjorn Helgaas Date: Tue Sep 5 13:09:05 2017 -0500 PCI: xgene: Clean up whitespace Use tabs (not spaces) for indentation. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 582ffae852400264b189da7dca9a5212dd3dab01 Author: Bjorn Helgaas Date: Tue Sep 5 12:58:03 2017 -0500 PCI: xgene: Define XGENE_PCI_EXP_CAP and use generic PCI_EXP_RTCTL offset Apparently the PCIe capability is at address 0x40 in config space of X-Gene v1 Root Ports. Add a definition of that and use the generic PCI_EXP_RTCTL offset into the capability. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7aca96aa48d59b08763452cf1881b7411876c59 Author: Fabio Estevam Date: Thu Aug 31 14:52:06 2017 -0300 PCI: xgene: Fix platform_get_irq() error handling When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Duc Dang drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e6f4fc06f6411adf98bbbe7fcd79442cd2b2a75 Author: Ricard Wanderlof Date: Thu Sep 7 15:31:38 2017 +0200 ASoC: adau17x1: Workaround for noise bug in ADC The ADC in the ADAU1361 (and possibly other Analog Devices codecs) exhibits a cyclic variation in the noise floor (in our test setup between -87 and -93 dB), a new value being attained within this range whenever a new capture stream is started. The cycle repeats after about 10 or 11 restarts. The workaround recommended by the manufacturer is to toggle the ADOSR bit in the Converter Control 0 register each time a new capture stream is started. I have verified that the patch fixes this problem on the ADAU1361, and according to the manufacturer toggling the bit in question in this manner will at least have no detrimental effect on other chips served by this driver. Signed-off-by: Ricard Wanderlof Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/adau17x1.c | 24 +++++++++++++++++++++++- sound/soc/codecs/adau17x1.h | 2 ++ 2 files changed, 25 insertions(+), 1 deletion(-) commit 6d622692836950b3c943776f84c4557ff6c02f3b Author: Larry Finger Date: Mon Sep 4 12:51:34 2017 -0500 rtlwifi: btcoexist: Fix antenna selection code In commit 87d8a9f35202 ("rtlwifi: btcoex: call bind to setup btcoex"), the code turns on a call to exhalbtc_bind_bt_coex_withadapter(). This routine contains a bug that causes incorrect antenna selection for those HP laptops with only one antenna and an incorrectly programmed EFUSE. These boxes are the ones that need the ant_sel module parameter. Fixes: 87d8a9f35202 ("rtlwifi: btcoex: call bind to setup btcoex") Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Cc: Stable # 4.13+ Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit a33fcba6ec01efcca33b1afad91057020f247f15 Author: Larry Finger Date: Mon Sep 4 12:51:33 2017 -0500 rtlwifi: btcoexist: Fix breakage of ant_sel for rtl8723be In commit bcd37f4a0831 ("rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done"), there is an additional error when the module parameter ant_sel is used to select the auxilary antenna. The error is that the antenna selection is not checked when writing the antenna selection register. Fixes: bcd37f4a0831 ("rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done") Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Cc: Stable # 4.12+ Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 23e9f4ef99dd313fc8d19c326f6518459a402d71 Author: Hans de Goede Date: Thu Sep 7 13:18:33 2017 +0200 video/console: Update BIOS dates list for GPD win console rotation DMI quirk Recently produced GPD win devices have a new BIOS, research into the changes in this BIOS has found a ChangeLog which also lists 2 previously unknown BIOS dates. Signed-off-by: Hans de Goede [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbcon_dmi_quirks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21d9bb4a05bac50fb4f850517af4030baecd00f6 Author: Borislav Petkov Date: Thu Sep 7 11:38:37 2017 +0200 x86/mm: Make the SME mask a u64 The SME encryption mask is for masking 64-bit pagetable entries. It being an unsigned long works fine on X86_64 but on 32-bit builds in truncates bits leading to Xen guests crashing very early. And regardless, the whole SME mask handling shouldnt've leaked into 32-bit because SME is X86_64-only feature. So, first make the mask u64. And then, add trivial 32-bit versions of the __sme_* macros so that nothing happens there. Reported-and-tested-by: Boris Ostrovsky Tested-by: Brijesh Singh Signed-off-by: Borislav Petkov Acked-by: Tom Lendacky Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Fixes: 21729f81ce8a ("x86/mm: Provide general kernel support for memory encryption") Link: http://lkml.kernel.org/r/20170907093837.76zojtkgebwtqc74@pd.tnic Signed-off-by: Ingo Molnar arch/x86/include/asm/mem_encrypt.h | 4 ++-- arch/x86/mm/mem_encrypt.c | 2 +- include/linux/mem_encrypt.h | 13 +++++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) commit 50e76632339d4655859523a39249dd95ee5e93e7 Author: Peter Zijlstra Date: Thu Sep 7 11:13:38 2017 +0200 sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs Cpusets vs. suspend-resume is _completely_ broken. And it got noticed because it now resulted in non-cpuset usage breaking too. On suspend cpuset_cpu_inactive() doesn't call into cpuset_update_active_cpus() because it doesn't want to move tasks about, there is no need, all tasks are frozen and won't run again until after we've resumed everything. But this means that when we finally do call into cpuset_update_active_cpus() after resuming the last frozen cpu in cpuset_cpu_active(), the top_cpuset will not have any difference with the cpu_active_mask and this it will not in fact do _anything_. So the cpuset configuration will not be restored. This was largely hidden because we would unconditionally create identity domains and mobile users would not in fact use cpusets much. And servers what do use cpusets tend to not suspend-resume much. An addition problem is that we'd not in fact wait for the cpuset work to finish before resuming the tasks, allowing spurious migrations outside of the specified domains. Fix the rebuild by introducing cpuset_force_rebuild() and fix the ordering with cpuset_wait_for_hotplug(). Reported-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Fixes: deb7aa308ea2 ("cpuset: reorganize CPU / memory hotplug handling") Link: http://lkml.kernel.org/r/20170907091338.orwxrqkbfkki3c24@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/linux/cpuset.h | 6 ++++++ kernel/cgroup/cpuset.c | 16 +++++++++++++++- kernel/power/process.c | 5 ++++- kernel/sched/core.c | 7 +++---- 4 files changed, 28 insertions(+), 6 deletions(-) commit 2a0d85d9add77bb7a4ddd61557ffb21ca5370d15 Author: Takashi Iwai Date: Thu Sep 7 10:51:54 2017 +0200 ALSA: asihpi: Kill BUG_ON() usages BUG_ON() is the worst choice for a trivial sanity check. Either it should be removed or replaced with a softer one like WARN_ON() if still really needed. Signed-off-by: Takashi Iwai sound/pci/asihpi/asihpi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c8445589450582a3d948779c0fc5106604ce89a1 Author: Helge Deller Date: Wed Sep 6 22:28:01 2017 +0200 ALSA: core: Use %pS printk format for direct addresses The debug functions 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 Signed-off-by: Takashi Iwai sound/core/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba2186e40c9565b0a3ecd9e51ac1195cc501c182 Author: Markus Elfring Date: Wed Sep 6 21:12:51 2017 +0200 ALSA: ymfpci: Use common error handling code in snd_ymfpci_create() * 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. * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix a few source code places. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai sound/pci/ymfpci/ymfpci_main.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 1f5ca8ec58eaa9d42a2474ecae335ead3f845ba1 Author: Markus Elfring Date: Wed Sep 6 20:45:11 2017 +0200 ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_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. * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix a few source code places. [ This also fixed a potential use-after-free at error path of snd_opl3_hwdep_new(), too -- tiwai ] Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai sound/pci/ymfpci/ymfpci.c | 62 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 32 deletions(-) commit f804fff1361c9da30efc21721dc0ae5934413c4b Author: Markus Elfring Date: Wed Sep 6 16:26:29 2017 +0200 ALSA: 6fire: Use common error handling code in usb6fire_chip_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: Takashi Iwai sound/usb/6fire/chip.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit d2d977087970526ac7c8b08a492081ea2e1f6c29 Author: Markus Elfring Date: Wed Sep 6 15:00:08 2017 +0200 ALSA: usx2y: Use common error handling code in submit_urbs() 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: Takashi Iwai sound/usb/usx2y/usb_stream.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 80753cdfef2a16a71d7c6b5aafe9700a2650913c Author: Markus Elfring Date: Wed Sep 6 14:45:09 2017 +0200 ALSA: us122l: Use common error handling code in us122l_create_card() 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: Takashi Iwai sound/usb/usx2y/us122l.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e35e9ddfab7e6017b38b8b75cd13756530b3b2b6 Author: Markus Elfring Date: Tue Sep 5 22:22:21 2017 +0200 ALSA: hdspm: Use common error handling code in snd_hdspm_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: Takashi Iwai sound/pci/rme9652/hdspm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 99dcad32376effb70bf466c70595edbbcbecd6d7 Author: Markus Elfring Date: Tue Sep 5 22:08:30 2017 +0200 ALSA: rme9652: Use common code in hdsp_get_iobox_version() Add a jump target so that a bit of common code 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: Takashi Iwai sound/pci/rme9652/hdsp.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 468778a09c8a0c0b495064745ece2c73f4b4d389 Author: Markus Elfring Date: Wed Sep 6 08:18:30 2017 +0200 ALSA: maestro3: Use common error handling code in two functions Add jump targets so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai sound/pci/maestro3.c | 57 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit 12ac1d0f6c3e95732d144ffa65c8b20fbd9aa462 Author: Thomas Gleixner Date: Tue Sep 5 10:12:20 2017 +0200 genirq: Make sparse_irq_lock protect what it should protect for_each_active_irq() iterates the sparse irq allocation bitmap. The caller must hold sparse_irq_lock. Several code pathes expect that an active bit in the sparse bitmap also has a valid interrupt descriptor. Unfortunately that's not true. The (de)allocation is a two step process, which holds the sparse_irq_lock only across the queue/remove from the radix tree and the set/clear in the allocation bitmap. If a iteration locks sparse_irq_lock between the two steps, then it might see an active bit but the corresponding irq descriptor is NULL. If that is dereferenced unconditionally, then the kernel oopses. Of course, all iterator sites could be audited and fixed, but.... There is no reason why the sparse_irq_lock needs to be dropped between the two steps, in fact the code becomes simpler when the mutex is held across both and the semantics become more straight forward, so future problems of missing NULL pointer checks in the iteration are avoided and all existing sites are fixed in one go. Expand the lock held sections so both operations are covered and the bitmap and the radixtree are in sync. Fixes: a05a900a51c7 ("genirq: Make sparse_lock a mutex") Reported-and-tested-by: Huang Ying Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org kernel/irq/irqdesc.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit a731ebe6f17bff9e7ca12ef227f9da4d5bdf8425 Author: Peter Zijlstra Date: Wed Sep 6 12:51:31 2017 +0200 sched/fair: Fix wake_affine_llc() balancing rules Chris Wilson reported that the SMT balance rules got the +1 on the wrong side, resulting in a bias towards the current LLC; which the load-balancer would then try and undo. Reported-by: Chris Wilson Tested-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: 90001d67be2f ("sched/fair: Fix wake_affine() for !NUMA_BALANCING") Link: http://lkml.kernel.org/r/20170906105131.gqjmaextmn3u6tj2@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b9f8ed25dbe5f858b1331588929f2a766aef55f Merge: 608c1d3 795ef78 Author: Linus Torvalds Date: Wed Sep 6 22:41:21 2017 -0700 Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "Except for the ahci fix that fixes a boot issue, nothing major in this pull request. Some new platform controller support and device specific changes" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: zpodd: make arrays cdb static, reduces object code size ahci: don't use MSI for devices with the silly Intel NVMe remapping scheme dt-bindings: ata: add DT bindings for MediaTek SATA controller ata: mediatek: add support for MediaTek SATA controller pata_octeon_cf: use of_property_read_{bool|u32}() cs5536: add support for IDE controller variant ata: sata_gemini: Introduce explicit IDE pin control ata: sata_gemini: Retire custom pin control ata: ahci_platform: Add shutdown handler ata: sata_gemini: explicitly request exclusive reset control ata: Drop unnecessary static ata: Convert to using %pOF instead of full_name commit 608c1d3c17e9e0e87dae69b9bb78f0556006ee6e Merge: 9954d48 b8d1b8e Author: Linus Torvalds Date: Wed Sep 6 22:25:25 2017 -0700 Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Several notable changes this cycle: - Thread mode was merged. This will be used for cgroup2 support for CPU and possibly other controllers. Unfortunately, CPU controller cgroup2 support didn't make this pull request but most contentions have been resolved and the support is likely to be merged before the next merge window. - cgroup.stat now shows the number of descendant cgroups. - cpuset now can enable the easier-to-configure v2 behavior on v1 hierarchy" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (21 commits) cpuset: Allow v2 behavior in v1 cgroup cgroup: Add mount flag to enable cpuset to use v2 behavior in v1 cgroup cgroup: remove unneeded checks cgroup: misc changes cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy cgroup: re-use the parent pointer in cgroup_destroy_locked() cgroup: add cgroup.stat interface with basic hierarchy stats cgroup: implement hierarchy limits cgroup: keep track of number of descent cgroups cgroup: add comment to cgroup_enable_threaded() cgroup: remove unnecessary empty check when enabling threaded mode cgroup: update debug controller to print out thread mode information cgroup: implement cgroup v2 thread support cgroup: implement CSS_TASK_ITER_THREADED cgroup: introduce cgroup->dom_cgrp and threaded css_set handling cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS cgroup: reorganize cgroup.procs / task write path cgroup: replace css_set walking populated test with testing cgrp->nr_populated_csets cgroup: distinguish local and children populated states cgroup: remove now unused list_head @pending in cgroup_apply_cftypes() ... commit 9954d4892a813155cf808b1c29df50886b5672cf Merge: a7cbfd0 fbf1c41 Author: Linus Torvalds Date: Wed Sep 6 21:59:31 2017 -0700 Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Nothing major. I introduced a flag collsion bug during v4.13 cycle which is fixed in this pull request. Fortunately, the flag is for debugging / verification and the bug isn't critical" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fix flag collision workqueue: Use TASK_IDLE workqueue: fix path to documentation workqueue: doc change for ST behavior on NUMA systems commit a7cbfd05f427f8f1164bc53866971e89a0cbe103 Merge: d34fc1a 5e81ee3 Author: Linus Torvalds Date: Wed Sep 6 21:33:12 2017 -0700 Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu updates from Tejun Heo: "A lot of changes for percpu this time around. percpu inherited the same area allocator from the original pre-virtual-address-mapped implementation. This was from the time when percpu allocator wasn't used all that much and the implementation was focused on simplicity, with the unfortunate computational complexity of O(number of areas allocated from the chunk) per alloc / free. With the increase in percpu usage, we're hitting cases where the lack of scalability is hurting. The most prominent one right now is bpf perpcu map creation / destruction which may allocate and free a lot of entries consecutively and it's likely that the problem will become more prominent in the future. To address the issue, Dennis replaced the area allocator with hinted bitmap allocator which is more consistent. While the new allocator does perform a bit worse in some cases, it outperforms the old allocator way more than an order of magnitude in other more common scenarios while staying mostly flat in CPU overhead and completely flat in memory consumption" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (27 commits) percpu: update header to contain bitmap allocator explanation. percpu: update pcpu_find_block_fit to use an iterator percpu: use metadata blocks to update the chunk contig hint percpu: update free path to take advantage of contig hints percpu: update alloc path to only scan if contig hints are broken percpu: keep track of the best offset for contig hints percpu: skip chunks if the alloc does not fit in the contig hint percpu: add first_bit to keep track of the first free in the bitmap percpu: introduce bitmap metadata blocks percpu: replace area map allocator with bitmap percpu: generalize bitmap (un)populated iterators percpu: increase minimum percpu allocation size and align first regions percpu: introduce nr_empty_pop_pages to help empty page accounting percpu: change the number of pages marked in the first_chunk pop bitmap percpu: combine percpu address checks percpu: modify base_addr to be region specific percpu: setup_first_chunk rename schunk/dchunk to chunk percpu: end chunk area maps page aligned for the populated bitmap percpu: unify allocation of schunk and dchunk percpu: setup_first_chunk remove dyn_size and consolidate logic ... commit 8e0deed92406d93ae0365cb8a6134db5721e7aca Author: Kleber Sacilotto de Souza Date: Wed Sep 6 11:08:06 2017 +0200 tipc: remove unnecessary call to dev_net() The net device is already stored in the 'net' variable, so no need to call dev_net() again. Signed-off-by: Kleber Sacilotto de Souza Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f773608026ee1e75e2256e3ad625c222ff6f9305 Author: Xin Long Date: Wed Sep 6 11:53:29 2017 +0800 netlink: access nlk groups safely in netlink bind and getname Now there is no lock protecting nlk ngroups/groups' accessing in netlink bind and getname. It's safe from nlk groups' setting in netlink_release, but not from netlink_realloc_groups called by netlink_setsockopt. netlink_lock_table is needed in both netlink bind and getname when accessing nlk groups. Acked-by: Florian Westphal Signed-off-by: Xin Long Signed-off-by: David S. Miller net/netlink/af_netlink.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit be82485fbcbb1cf11b13e7356231c72fdf21241c Author: Xin Long Date: Wed Sep 6 11:47:12 2017 +0800 netlink: fix an use-after-free issue for nlk groups ChunYu found a netlink use-after-free issue by syzkaller: [28448.842981] BUG: KASAN: use-after-free in __nla_put+0x37/0x40 at addr ffff8807185e2378 [28448.969918] Call Trace: [...] [28449.117207] __nla_put+0x37/0x40 [28449.132027] nla_put+0xf5/0x130 [28449.146261] sk_diag_fill.isra.4.constprop.5+0x5a0/0x750 [netlink_diag] [28449.176608] __netlink_diag_dump+0x25a/0x700 [netlink_diag] [28449.202215] netlink_diag_dump+0x176/0x240 [netlink_diag] [28449.226834] netlink_dump+0x488/0xbb0 [28449.298014] __netlink_dump_start+0x4e8/0x760 [28449.317924] netlink_diag_handler_dump+0x261/0x340 [netlink_diag] [28449.413414] sock_diag_rcv_msg+0x207/0x390 [28449.432409] netlink_rcv_skb+0x149/0x380 [28449.467647] sock_diag_rcv+0x2d/0x40 [28449.484362] netlink_unicast+0x562/0x7b0 [28449.564790] netlink_sendmsg+0xaa8/0xe60 [28449.661510] sock_sendmsg+0xcf/0x110 [28449.865631] __sys_sendmsg+0xf3/0x240 [28450.000964] SyS_sendmsg+0x32/0x50 [28450.016969] do_syscall_64+0x25c/0x6c0 [28450.154439] entry_SYSCALL64_slow_path+0x25/0x25 It was caused by no protection between nlk groups' free in netlink_release and nlk groups' accessing in sk_diag_dump_groups. The similar issue also exists in netlink_seq_show(). This patch is to defer nlk groups' free in deferred_put_nlk_sk. Reported-by: ChunYu Wang Acked-by: Florian Westphal Signed-off-by: Xin Long Signed-off-by: David S. Miller net/netlink/af_netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39ad1297a2084e0724da73d9eda2ceb9573a5d6c Author: Gao Feng Date: Mon Sep 4 14:21:12 2017 +0800 sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq The commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock is released) made a big change of tc for performance. There are two points left in sch_prio and sch_qfq which are not changed with that commit. Now enhance them now with __qdisc_drop. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/sched/sch_prio.c | 2 +- net/sched/sch_qfq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9a94b3a4bdfdb404f1846099e880c52e144f06c0 Author: Baruch Siach Date: Sun Sep 3 17:32:16 2017 +0300 dt-binding: phy: don't confuse with Ethernet phy properties The generic PHY 'phys' property sometime appears in the same node with the Ethernet PHY 'phy' or 'phy-handle' properties. Add a warning in phy-bindings.txt to reduce confusion. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller Documentation/devicetree/bindings/phy/phy-bindings.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d34fc1adf01ff87026da85fb972dc259dc347540 Merge: 1c9fe44 d2cd9ed Author: Linus Torvalds Date: Wed Sep 6 20:49:49 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - various misc bits - DAX updates - OCFS2 - most of MM * emailed patches from Andrew Morton : (119 commits) mm,fork: introduce MADV_WIPEONFORK x86,mpx: make mpx depend on x86-64 to free up VMA flag mm: add /proc/pid/smaps_rollup mm: hugetlb: clear target sub-page last when clearing huge page mm: oom: let oom_reap_task and exit_mmap run concurrently swap: choose swap device according to numa node mm: replace TIF_MEMDIE checks by tsk_is_oom_victim mm, oom: do not rely on TIF_MEMDIE for memory reserves access z3fold: use per-cpu unbuddied lists mm, swap: don't use VMA based swap readahead if HDD is used as swap mm, swap: add sysfs interface for VMA based swap readahead mm, swap: VMA based swap readahead mm, swap: fix swap readahead marking mm, swap: add swap readahead hit statistics mm/vmalloc.c: don't reinvent the wheel but use existing llist API mm/vmstat.c: fix wrong comment selftests/memfd: add memfd_create hugetlbfs selftest mm/shmem: add hugetlbfs support to memfd_create() mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas() ... commit 1c9fe4409ce3e9c78b1ed96ee8ed699d4f03bf33 Author: Andy Lutomirski Date: Wed Sep 6 19:54:54 2017 -0700 x86/mm: Document how CR4.PCIDE restore works While debugging a problem, I thought that using cr4_set_bits_and_update_boot() to restore CR4.PCIDE would be helpful. It turns out to be counterproductive. Add a comment documenting how this works. Signed-off-by: Andy Lutomirski Signed-off-by: Linus Torvalds arch/x86/kernel/cpu/common.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 72c0098d92cedb11c7e0151e84918840a4e96b31 Author: Andy Lutomirski Date: Wed Sep 6 19:54:53 2017 -0700 x86/mm: Reinitialize TLB state on hotplug and resume When Linux brings a CPU down and back up, it switches to init_mm and then loads swapper_pg_dir into CR3. With PCID enabled, this has the side effect of masking off the ASID bits in CR3. This can result in some confusion in the TLB handling code. If we bring a CPU down and back up with any ASID other than 0, we end up with the wrong ASID active on the CPU after resume. This could cause our internal state to become corrupt, although major corruption is unlikely because init_mm doesn't have any user pages. More obviously, if CONFIG_DEBUG_VM=y, we'll trip over an assertion in the next context switch. The result of *that* is a failure to resume from suspend with probability 1 - 1/6^(cpus-1). Fix it by reinitializing cpu_tlbstate on resume and CPU bringup. Reported-by: Linus Torvalds Reported-by: Jiri Kosina Fixes: 10af6235e0d3 ("x86/mm: Implement PCID based optimization: try to preserve old TLB entries using PCID") Signed-off-by: Andy Lutomirski Signed-off-by: Linus Torvalds arch/x86/include/asm/tlbflush.h | 2 ++ arch/x86/kernel/cpu/common.c | 2 ++ arch/x86/mm/tlb.c | 44 +++++++++++++++++++++++++++++++++++++++++ arch/x86/power/cpu.c | 1 + 4 files changed, 49 insertions(+) commit 170b3b1050e28d1ba0700e262f0899ffa4fccc52 Author: Baohong Liu Date: Tue Sep 5 16:57:19 2017 -0500 tracing: Apply trace_clock changes to instance max buffer Currently trace_clock timestamps are applied to both regular and max buffers only for global trace. For instance trace, trace_clock timestamps are applied only to regular buffer. But, regular and max buffers can be swapped, for example, following a snapshot. So, for instance trace, bad timestamps can be seen following a snapshot. Let's apply trace_clock timestamps to instance max buffer as well. Link: http://lkml.kernel.org/r/ebdb168d0be042dcdf51f81e696b17fabe3609c1.1504642143.git.tom.zanussi@linux.intel.com Cc: stable@vger.kernel.org Fixes: 277ba0446 ("tracing: Add interface to allow multiple trace buffers") Signed-off-by: Baohong Liu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 Author: Rik van Riel Date: Wed Sep 6 16:25:15 2017 -0700 mm,fork: introduce MADV_WIPEONFORK Introduce MADV_WIPEONFORK semantics, which result in a VMA being empty in the child process after fork. This differs from MADV_DONTFORK in one important way. If a child process accesses memory that was MADV_WIPEONFORK, it will get zeroes. The address ranges are still valid, they are just empty. If a child process accesses memory that was MADV_DONTFORK, it will get a segmentation fault, since those address ranges are no longer valid in the child after fork. Since MADV_DONTFORK also seems to be used to allow very large programs to fork in systems with strict memory overcommit restrictions, changing the semantics of MADV_DONTFORK might break existing programs. MADV_WIPEONFORK only works on private, anonymous VMAs. The use case is libraries that store or cache information, and want to know that they need to regenerate it in the child process after fork. Examples of this would be: - systemd/pulseaudio API checks (fail after fork) (replacing a getpid check, which is too slow without a PID cache) - PKCS#11 API reinitialization check (mandated by specification) - glibc's upcoming PRNG (reseed after fork) - OpenSSL PRNG (reseed after fork) The security benefits of a forking server having a re-inialized PRNG in every child process are pretty obvious. However, due to libraries having all kinds of internal state, and programs getting compiled with many different versions of each library, it is unreasonable to expect calling programs to re-initialize everything manually after fork. A further complication is the proliferation of clone flags, programs bypassing glibc's functions to call clone directly, and programs calling unshare, causing the glibc pthread_atfork hook to not get called. It would be better to have the kernel take care of this automatically. The patch also adds MADV_KEEPONFORK, to undo the effects of a prior MADV_WIPEONFORK. This is similar to the OpenBSD minherit syscall with MAP_INHERIT_ZERO: https://man.openbsd.org/minherit.2 [akpm@linux-foundation.org: numerically order arch/parisc/include/uapi/asm/mman.h #defines] Link: http://lkml.kernel.org/r/20170811212829.29186-3-riel@redhat.com Signed-off-by: Rik van Riel Reported-by: Florian Weimer Reported-by: Colm MacCártaigh Reviewed-by: Mike Kravetz Cc: "H. Peter Anvin" Cc: "Kirill A. Shutemov" Cc: Andy Lutomirski Cc: Dave Hansen Cc: Ingo Molnar Cc: Helge Deller Cc: Kees Cook Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Will Drewry Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 3 +++ arch/mips/include/uapi/asm/mman.h | 3 +++ arch/parisc/include/uapi/asm/mman.h | 3 +++ arch/xtensa/include/uapi/asm/mman.h | 3 +++ fs/proc/task_mmu.c | 1 + include/linux/mm.h | 2 +- include/trace/events/mmflags.h | 8 +------- include/uapi/asm-generic/mman-common.h | 3 +++ kernel/fork.c | 10 ++++++++-- mm/madvise.c | 13 +++++++++++++ 10 files changed, 39 insertions(+), 10 deletions(-) commit df3735c5b40fad8d0d28eb8ab065fe955b3347ee Author: Rik van Riel Date: Wed Sep 6 16:25:11 2017 -0700 x86,mpx: make mpx depend on x86-64 to free up VMA flag Patch series "mm,fork,security: introduce MADV_WIPEONFORK", v4. If a child process accesses memory that was MADV_WIPEONFORK, it will get zeroes. The address ranges are still valid, they are just empty. If a child process accesses memory that was MADV_DONTFORK, it will get a segmentation fault, since those address ranges are no longer valid in the child after fork. Since MADV_DONTFORK also seems to be used to allow very large programs to fork in systems with strict memory overcommit restrictions, changing the semantics of MADV_DONTFORK might break existing programs. The use case is libraries that store or cache information, and want to know that they need to regenerate it in the child process after fork. Examples of this would be: - systemd/pulseaudio API checks (fail after fork) (replacing a getpid check, which is too slow without a PID cache) - PKCS#11 API reinitialization check (mandated by specification) - glibc's upcoming PRNG (reseed after fork) - OpenSSL PRNG (reseed after fork) The security benefits of a forking server having a re-inialized PRNG in every child process are pretty obvious. However, due to libraries having all kinds of internal state, and programs getting compiled with many different versions of each library, it is unreasonable to expect calling programs to re-initialize everything manually after fork. A further complication is the proliferation of clone flags, programs bypassing glibc's functions to call clone directly, and programs calling unshare, causing the glibc pthread_atfork hook to not get called. It would be better to have the kernel take care of this automatically. The patchset also adds MADV_KEEPONFORK, to undo the effects of a prior MADV_WIPEONFORK. This is similar to the OpenBSD minherit syscall with MAP_INHERIT_ZERO: https://man.openbsd.org/minherit.2 This patch (of 2): MPX only seems to be available on 64 bit CPUs, starting with Skylake and Goldmont. Move VM_MPX into the 64 bit only portion of vma->vm_flags, in order to free up a VMA flag. Link: http://lkml.kernel.org/r/20170811212829.29186-2-riel@redhat.com Signed-off-by: Rik van Riel Acked-by: Dave Hansen Cc: Mike Kravetz Cc: Florian Weimer Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox Cc: Colm MacCártaigh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 4 +++- include/linux/mm.h | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 493b0e9d945fa9dfe96be93ae41b4ca4b6fdb317 Author: Daniel Colascione Date: Wed Sep 6 16:25:08 2017 -0700 mm: add /proc/pid/smaps_rollup /proc/pid/smaps_rollup is a new proc file that improves the performance of user programs that determine aggregate memory statistics (e.g., total PSS) of a process. Android regularly "samples" the memory usage of various processes in order to balance its memory pool sizes. This sampling process involves opening /proc/pid/smaps and summing certain fields. For very large processes, sampling memory use this way can take several hundred milliseconds, due mostly to the overhead of the seq_printf calls in task_mmu.c. smaps_rollup improves the situation. It contains most of the fields of /proc/pid/smaps, but instead of a set of fields for each VMA, smaps_rollup instead contains one synthetic smaps-format entry representing the whole process. In the single smaps_rollup synthetic entry, each field is the summation of the corresponding field in all of the real-smaps VMAs. Using a common format for smaps_rollup and smaps allows userspace parsers to repurpose parsers meant for use with non-rollup smaps for smaps_rollup, and it allows userspace to switch between smaps_rollup and smaps at runtime (say, based on the availability of smaps_rollup in a given kernel) with minimal fuss. By using smaps_rollup instead of smaps, a caller can avoid the significant overhead of formatting, reading, and parsing each of a large process's potentially very numerous memory mappings. For sampling system_server's PSS in Android, we measured a 12x speedup, representing a savings of several hundred milliseconds. One alternative to a new per-process proc file would have been including PSS information in /proc/pid/status. We considered this option but thought that PSS would be too expensive (by a few orders of magnitude) to collect relative to what's already emitted as part of /proc/pid/status, and slowing every user of /proc/pid/status for the sake of readers that happen to want PSS feels wrong. The code itself works by reusing the existing VMA-walking framework we use for regular smaps generation and keeping the mem_size_stats structure around between VMA walks instead of using a fresh one for each VMA. In this way, summation happens automatically. We let seq_file walk over the VMAs just as it does for regular smaps and just emit nothing to the seq_file until we hit the last VMA. Benchmarks: using smaps: iterations:1000 pid:1163 pss:220023808 0m29.46s real 0m08.28s user 0m20.98s system using smaps_rollup: iterations:1000 pid:1163 pss:220702720 0m04.39s real 0m00.03s user 0m04.31s system We're using the PSS samples we collect asynchronously for system-management tasks like fine-tuning oom_adj_score, memory use tracking for debugging, application-level memory-use attribution, and deciding whether we want to kill large processes during system idle maintenance windows. Android has been using PSS for these purposes for a long time; as the average process VMA count has increased and and devices become more efficiency-conscious, PSS-collection inefficiency has started to matter more. IMHO, it'd be a lot safer to optimize the existing PSS-collection model, which has been fine-tuned over the years, instead of changing the memory tracking approach entirely to work around smaps-generation inefficiency. Tim said: : There are two main reasons why Android gathers PSS information: : : 1. Android devices can show the user the amount of memory used per : application via the settings app. This is a less important use case. : : 2. We log PSS to help identify leaks in applications. We have found : an enormous number of bugs (in the Android platform, in Google's own : apps, and in third-party applications) using this data. : : To do this, system_server (the main process in Android userspace) will : sample the PSS of a process three seconds after it changes state (for : example, app is launched and becomes the foreground application) and about : every ten minutes after that. The net result is that PSS collection is : regularly running on at least one process in the system (usually a few : times a minute while the screen is on, less when screen is off due to : suspend). PSS of a process is an incredibly useful stat to track, and we : aren't going to get rid of it. We've looked at some very hacky approaches : using RSS ("take the RSS of the target process, subtract the RSS of the : zygote process that is the parent of all Android apps") to reduce the : accounting time, but it regularly overestimated the memory used by 20+ : percent. Accordingly, I don't think that there's a good alternative to : using PSS. : : We started looking into PSS collection performance after we noticed random : frequency spikes while a phone's screen was off; occasionally, one of the : CPU clusters would ramp to a high frequency because there was 200-300ms of : constant CPU work from a single thread in the main Android userspace : process. The work causing the spike (which is reasonable governor : behavior given the amount of CPU time needed) was always PSS collection. : As a result, Android is burning more power than we should be on PSS : collection. : : The other issue (and why I'm less sure about improving smaps as a : long-term solution) is that the number of VMAs per process has increased : significantly from release to release. After trying to figure out why we : were seeing these 200-300ms PSS collection times on Android O but had not : noticed it in previous versions, we found that the number of VMAs in the : main system process increased by 50% from Android N to Android O (from : ~1800 to ~2700) and varying increases in every userspace process. Android : M to N also had an increase in the number of VMAs, although not as much. : I'm not sure why this is increasing so much over time, but thinking about : ASLR and ways to make ASLR better, I expect that this will continue to : increase going forward. I would not be surprised if we hit 5000 VMAs on : the main Android process (system_server) by 2020. : : If we assume that the number of VMAs is going to increase over time, then : doing anything we can do to reduce the overhead of each VMA during PSS : collection seems like the right way to go, and that means outputting an : aggregate statistic (to avoid whatever overhead there is per line in : writing smaps and in reading each line from userspace). Link: http://lkml.kernel.org/r/20170812022148.178293-1-dancol@google.com Signed-off-by: Daniel Colascione Cc: Tim Murray Cc: Joel Fernandes Cc: Al Viro Cc: Randy Dunlap Cc: Minchan Kim Cc: Michal Hocko Cc: Sonny Rao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/testing/procfs-smaps_rollup | 31 ++++ fs/proc/base.c | 2 + fs/proc/internal.h | 3 + fs/proc/task_mmu.c | 196 ++++++++++++++++++-------- 4 files changed, 170 insertions(+), 62 deletions(-) commit c79b57e462b5d2f47afa5f175cf1828f16e18612 Author: Huang Ying Date: Wed Sep 6 16:25:04 2017 -0700 mm: hugetlb: clear target sub-page last when clearing huge page Huge page helps to reduce TLB miss rate, but it has higher cache footprint, sometimes this may cause some issue. For example, when clearing huge page on x86_64 platform, the cache footprint is 2M. But on a Xeon E5 v3 2699 CPU, there are 18 cores, 36 threads, and only 45M LLC (last level cache). That is, in average, there are 2.5M LLC for each core and 1.25M LLC for each thread. If the cache pressure is heavy when clearing the huge page, and we clear the huge page from the begin to the end, it is possible that the begin of huge page is evicted from the cache after we finishing clearing the end of the huge page. And it is possible for the application to access the begin of the huge page after clearing the huge page. To help the above situation, in this patch, when we clear a huge page, the order to clear sub-pages is changed. In quite some situation, we can get the address that the application will access after we clear the huge page, for example, in a page fault handler. Instead of clearing the huge page from begin to end, we will clear the sub-pages farthest from the the sub-page to access firstly, and clear the sub-page to access last. This will make the sub-page to access most cache-hot and sub-pages around it more cache-hot too. If we cannot know the address the application will access, the begin of the huge page is assumed to be the the address the application will access. With this patch, the throughput increases ~28.3% in vm-scalability anon-w-seq test case with 72 processes on a 2 socket Xeon E5 v3 2699 system (36 cores, 72 threads). The test case creates 72 processes, each process mmap a big anonymous memory area and writes to it from the begin to the end. For each process, other processes could be seen as other workload which generates heavy cache pressure. At the same time, the cache miss rate reduced from ~33.4% to ~31.7%, the IPC (instruction per cycle) increased from 0.56 to 0.74, and the time spent in user space is reduced ~7.9% Christopher Lameter suggests to clear bytes inside a sub-page from end to begin too. But tests show no visible performance difference in the tests. May because the size of page is small compared with the cache size. Thanks Andi Kleen to propose to use address to access to determine the order of sub-pages to clear. The hugetlbfs access address could be improved, will do that in another patch. [ying.huang@intel.com: improve readability of clear_huge_page()] Link: http://lkml.kernel.org/r/20170830051842.1397-1-ying.huang@intel.com Link: http://lkml.kernel.org/r/20170815014618.15842-1-ying.huang@intel.com Suggested-by: Andi Kleen Signed-off-by: "Huang, Ying" Acked-by: Jan Kara Reviewed-by: Michal Hocko Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Nadia Yvette Chambers Cc: Matthew Wilcox Cc: Hugh Dickins Cc: Minchan Kim Cc: Shaohua Li Cc: Christopher Lameter Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/huge_memory.c | 4 ++-- mm/memory.c | 42 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-) commit 212925802454672e6cd2949a727f5e2c1377bf06 Author: Andrea Arcangeli Date: Wed Sep 6 16:25:00 2017 -0700 mm: oom: let oom_reap_task and exit_mmap run concurrently This is purely required because exit_aio() may block and exit_mmap() may never start, if the oom_reap_task cannot start running on a mm with mm_users == 0. At the same time if the OOM reaper doesn't wait at all for the memory of the current OOM candidate to be freed by exit_mmap->unmap_vmas, it would generate a spurious OOM kill. If it wasn't because of the exit_aio or similar blocking functions in the last mmput, it would be enough to change the oom_reap_task() in the case it finds mm_users == 0, to wait for a timeout or to wait for __mmput to set MMF_OOM_SKIP itself, but it's not just exit_mmap the problem here so the concurrency of exit_mmap and oom_reap_task is apparently warranted. It's a non standard runtime, exit_mmap() runs without mmap_sem, and oom_reap_task runs with the mmap_sem for reading as usual (kind of MADV_DONTNEED). The race between the two is solved with a combination of tsk_is_oom_victim() (serialized by task_lock) and MMF_OOM_SKIP (serialized by a dummy down_write/up_write cycle on the same lines of the ksm_exit method). If the oom_reap_task() may be running concurrently during exit_mmap, exit_mmap will wait it to finish in down_write (before taking down mm structures that would make the oom_reap_task fail with use after free). If exit_mmap comes first, oom_reap_task() will skip the mm if MMF_OOM_SKIP is already set and in turn all memory is already freed and furthermore the mm data structures may already have been taken down by free_pgtables. [aarcange@redhat.com: incremental one liner] Link: http://lkml.kernel.org/r/20170726164319.GC29716@redhat.com [rientjes@google.com: remove unused mmput_async] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708141733130.50317@chino.kir.corp.google.com [aarcange@redhat.com: microoptimization] Link: http://lkml.kernel.org/r/20170817171240.GB5066@redhat.com Link: http://lkml.kernel.org/r/20170726162912.GA29716@redhat.com Fixes: 26db62f179d1 ("oom: keep mm of the killed task available") Signed-off-by: Andrea Arcangeli Signed-off-by: David Rientjes Reported-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: Hugh Dickins Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched/mm.h | 6 ------ kernel/fork.c | 17 ----------------- mm/mmap.c | 18 ++++++++++++++++++ mm/oom_kill.c | 15 +++++---------- 4 files changed, 23 insertions(+), 33 deletions(-) commit a2468cc9bfdff6139f59ca896671e5819ff5f94a Author: Aaron Lu Date: Wed Sep 6 16:24:57 2017 -0700 swap: choose swap device according to numa node If the system has more than one swap device and swap device has the node information, we can make use of this information to decide which swap device to use in get_swap_pages() to get better performance. The current code uses a priority based list, swap_avail_list, to decide which swap device to use and if multiple swap devices share the same priority, they are used round robin. This patch changes the previous single global swap_avail_list into a per-numa-node list, i.e. for each numa node, it sees its own priority based list of available swap devices. Swap device's priority can be promoted on its matching node's swap_avail_list. The current swap device's priority is set as: user can set a >=0 value, or the system will pick one starting from -1 then downwards. The priority value in the swap_avail_list is the negated value of the swap device's due to plist being sorted from low to high. The new policy doesn't change the semantics for priority >=0 cases, the previous starting from -1 then downwards now becomes starting from -2 then downwards and -1 is reserved as the promoted value. Take 4-node EX machine as an example, suppose 4 swap devices are available, each sit on a different node: swapA on node 0 swapB on node 1 swapC on node 2 swapD on node 3 After they are all swapped on in the sequence of ABCD. Current behaviour: their priorities will be: swapA: -1 swapB: -2 swapC: -3 swapD: -4 And their position in the global swap_avail_list will be: swapA -> swapB -> swapC -> swapD prio:1 prio:2 prio:3 prio:4 New behaviour: their priorities will be(note that -1 is skipped): swapA: -2 swapB: -3 swapC: -4 swapD: -5 And their positions in the 4 swap_avail_lists[nid] will be: swap_avail_lists[0]: /* node 0's available swap device list */ swapA -> swapB -> swapC -> swapD prio:1 prio:3 prio:4 prio:5 swap_avali_lists[1]: /* node 1's available swap device list */ swapB -> swapA -> swapC -> swapD prio:1 prio:2 prio:4 prio:5 swap_avail_lists[2]: /* node 2's available swap device list */ swapC -> swapA -> swapB -> swapD prio:1 prio:2 prio:3 prio:5 swap_avail_lists[3]: /* node 3's available swap device list */ swapD -> swapA -> swapB -> swapC prio:1 prio:2 prio:3 prio:4 To see the effect of the patch, a test that starts N process, each mmap a region of anonymous memory and then continually write to it at random position to trigger both swap in and out is used. On a 2 node Skylake EP machine with 64GiB memory, two 170GB SSD drives are used as swap devices with each attached to a different node, the result is: runtime=30m/processes=32/total test size=128G/each process mmap region=4G kernel throughput vanilla 13306 auto-binding 15169 +14% runtime=30m/processes=64/total test size=128G/each process mmap region=2G kernel throughput vanilla 11885 auto-binding 14879 +25% [aaron.lu@intel.com: v2] Link: http://lkml.kernel.org/r/20170814053130.GD2369@aaronlu.sh.intel.com Link: http://lkml.kernel.org/r/20170816024439.GA10925@aaronlu.sh.intel.com [akpm@linux-foundation.org: use kmalloc_array()] Link: http://lkml.kernel.org/r/20170814053130.GD2369@aaronlu.sh.intel.com Link: http://lkml.kernel.org/r/20170816024439.GA10925@aaronlu.sh.intel.com Signed-off-by: Aaron Lu Cc: "Chen, Tim C" Cc: Huang Ying Cc: Andi Kleen Cc: Michal Hocko Cc: Minchan Kim Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/swap_numa.txt | 69 ++++++++++++++++++++++++ include/linux/swap.h | 2 +- mm/swapfile.c | 120 ++++++++++++++++++++++++++++++++--------- 3 files changed, 164 insertions(+), 27 deletions(-) commit da99ecf117fce6570bd3989263d68ee0007e1249 Author: Michal Hocko Date: Wed Sep 6 16:24:53 2017 -0700 mm: replace TIF_MEMDIE checks by tsk_is_oom_victim TIF_MEMDIE is set only to the tasks whick were either directly selected by the OOM killer or passed through mark_oom_victim from the allocator path. tsk_is_oom_victim is more generic and allows to identify all tasks (threads) which share the mm with the oom victim. Please note that the freezer still needs to check TIF_MEMDIE because we cannot thaw tasks which do not participage in oom_victims counting otherwise a !TIF_MEMDIE task could interfere after oom_disbale returns. Link: http://lkml.kernel.org/r/20170810075019.28998-3-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Mel Gorman Cc: Tetsuo Handa Cc: David Rientjes Cc: Johannes Weiner Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/cgroup/cpuset.c | 9 +++++---- mm/memcontrol.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit cd04ae1e2dc8e3651b8c427ec1b9500c6eed7b90 Author: Michal Hocko Date: Wed Sep 6 16:24:50 2017 -0700 mm, oom: do not rely on TIF_MEMDIE for memory reserves access For ages we have been relying on TIF_MEMDIE thread flag to mark OOM victims and then, among other things, to give these threads full access to memory reserves. There are few shortcomings of this implementation, though. First of all and the most serious one is that the full access to memory reserves is quite dangerous because we leave no safety room for the system to operate and potentially do last emergency steps to move on. Secondly this flag is per task_struct while the OOM killer operates on mm_struct granularity so all processes sharing the given mm are killed. Giving the full access to all these task_structs could lead to a quick memory reserves depletion. We have tried to reduce this risk by giving TIF_MEMDIE only to the main thread and the currently allocating task but that doesn't really solve this problem while it surely opens up a room for corner cases - e.g. GFP_NO{FS,IO} requests might loop inside the allocator without access to memory reserves because a particular thread was not the group leader. Now that we have the oom reaper and that all oom victims are reapable after 1b51e65eab64 ("oom, oom_reaper: allow to reap mm shared by the kthreads") we can be more conservative and grant only partial access to memory reserves because there are reasonable chances of the parallel memory freeing. We still want some access to reserves because we do not want other consumers to eat up the victim's freed memory. oom victims will still contend with __GFP_HIGH users but those shouldn't be so aggressive to starve oom victims completely. Introduce ALLOC_OOM flag and give all tsk_is_oom_victim tasks access to the half of the reserves. This makes the access to reserves independent on which task has passed through mark_oom_victim. Also drop any usage of TIF_MEMDIE from the page allocator proper and replace it by tsk_is_oom_victim as well which will make page_alloc.c completely TIF_MEMDIE free finally. CONFIG_MMU=n doesn't have oom reaper so let's stick to the original ALLOC_NO_WATERMARKS approach. There is a demand to make the oom killer memcg aware which will imply many tasks killed at once. This change will allow such a usecase without worrying about complete memory reserves depletion. Link: http://lkml.kernel.org/r/20170810075019.28998-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Cc: Tetsuo Handa Cc: David Rientjes Cc: Johannes Weiner Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 11 +++++++++ mm/oom_kill.c | 9 ++++--- mm/page_alloc.c | 76 ++++++++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 73 insertions(+), 23 deletions(-) commit d30561c56f4114f7d6595a40498ba364ffa6e28e Author: Vitaly Wool Date: Wed Sep 6 16:24:47 2017 -0700 z3fold: use per-cpu unbuddied lists It's been noted that z3fold doesn't scale well when it's run in a large number of threads on many cores, which can be easily reproduced with fio 'randrw' test with --numjobs=32. E.g. the result for 1 cluster (4 cores) is: Run status group 0 (all jobs): READ: io=244785MB, aggrb=496883KB/s, minb=15527KB/s, ... WRITE: io=246735MB, aggrb=500841KB/s, minb=15651KB/s, ... While for 8 cores (2 clusters) the result is: Run status group 0 (all jobs): READ: io=244785MB, aggrb=265942KB/s, minb=8310KB/s, ... WRITE: io=246735MB, aggrb=268060KB/s, minb=8376KB/s, ... The bottleneck here is the pool lock which many threads become waiting upon. To reduce that spin lock contention, z3fold can operate only on the lists local to the current CPU whenever possible. Due to the nature of z3fold unbuddied list handling (it only takes the first entry off the list on a hot path), if the z3fold pool is big enough and balanced well enough, limiting search to only local unbuddied list doesn't lead to a significant compression ratio degrade (2.57x vs 2.65x in our measurements). This patch also introduces two worker threads: one for async in-page object layout optimization and one for releasing freed pages. This is done to speed up z3fold_free() which is often on a hot path. The fio results for 8-core case are now the following: Run status group 0 (all jobs): READ: io=244785MB, aggrb=1568.3MB/s, minb=50182KB/s, ... WRITE: io=246735MB, aggrb=1580.8MB/s, minb=50582KB/s, ... So we're in for almost 6x performance increase. Link: http://lkml.kernel.org/r/20170806181443.f9b65018f8bde25ef990f9e8@gmail.com Signed-off-by: Vitaly Wool Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 479 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 344 insertions(+), 135 deletions(-) commit 81a0298bdfab0203d360df7c9bf690d1d457f999 Author: Huang Ying Date: Wed Sep 6 16:24:43 2017 -0700 mm, swap: don't use VMA based swap readahead if HDD is used as swap VMA based swap readahead will readahead the virtual pages that is continuous in the virtual address space. While the original swap readahead will readahead the swap slots that is continuous in the swap device. Although VMA based swap readahead is more correct for the swap slots to be readahead, it will trigger more small random readings, which may cause the performance of HDD (hard disk) to degrade heavily, and may finally exceed the benefit. To avoid the issue, in this patch, if the HDD is used as swap, the VMA based swap readahead will be disabled, and the original swap readahead will be used instead. Link: http://lkml.kernel.org/r/20170807054038.1843-6-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 11 ++++++----- mm/swapfile.c | 8 +++++++- 2 files changed, 13 insertions(+), 6 deletions(-) commit d9bfcfdc41e8e5d80f7591f95a09ccce7cb8ad05 Author: Huang Ying Date: Wed Sep 6 16:24:40 2017 -0700 mm, swap: add sysfs interface for VMA based swap readahead The sysfs interface to control the VMA based swap readahead is added as follow, /sys/kernel/mm/swap/vma_ra_enabled Enable the VMA based swap readahead algorithm, or use the original global swap readahead algorithm. /sys/kernel/mm/swap/vma_ra_max_order Set the max order of the readahead window size for the VMA based swap readahead algorithm. The corresponding ABI documentation is added too. Link: http://lkml.kernel.org/r/20170807054038.1843-5-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/testing/sysfs-kernel-mm-swap | 26 +++++++++ mm/swap_state.c | 80 ++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) commit ec560175c0b6fce86994bdf036754d48122c5c87 Author: Huang Ying Date: Wed Sep 6 16:24:36 2017 -0700 mm, swap: VMA based swap readahead The swap readahead is an important mechanism to reduce the swap in latency. Although pure sequential memory access pattern isn't very popular for anonymous memory, the space locality is still considered valid. In the original swap readahead implementation, the consecutive blocks in swap device are readahead based on the global space locality estimation. But the consecutive blocks in swap device just reflect the order of page reclaiming, don't necessarily reflect the access pattern in virtual memory. And the different tasks in the system may have different access patterns, which makes the global space locality estimation incorrect. In this patch, when page fault occurs, the virtual pages near the fault address will be readahead instead of the swap slots near the fault swap slot in swap device. This avoid to readahead the unrelated swap slots. At the same time, the swap readahead is changed to work on per-VMA from globally. So that the different access patterns of the different VMAs could be distinguished, and the different readahead policy could be applied accordingly. The original core readahead detection and scaling algorithm is reused, because it is an effect algorithm to detect the space locality. The test and result is as follow, Common test condition ===================== Test Machine: Xeon E5 v3 (2 sockets, 72 threads, 32G RAM) Swap device: NVMe disk Micro-benchmark with combined access pattern ============================================ vm-scalability, sequential swap test case, 4 processes to eat 50G virtual memory space, repeat the sequential memory writing until 300 seconds. The first round writing will trigger swap out, the following rounds will trigger sequential swap in and out. At the same time, run vm-scalability random swap test case in background, 8 processes to eat 30G virtual memory space, repeat the random memory write until 300 seconds. This will trigger random swap-in in the background. This is a combined workload with sequential and random memory accessing at the same time. The result (for sequential workload) is as follow, Base Optimized ---- --------- throughput 345413 KB/s 414029 KB/s (+19.9%) latency.average 97.14 us 61.06 us (-37.1%) latency.50th 2 us 1 us latency.60th 2 us 1 us latency.70th 98 us 2 us latency.80th 160 us 2 us latency.90th 260 us 217 us latency.95th 346 us 369 us latency.99th 1.34 ms 1.09 ms ra_hit% 52.69% 99.98% The original swap readahead algorithm is confused by the background random access workload, so readahead hit rate is lower. The VMA-base readahead algorithm works much better. Linpack ======= The test memory size is bigger than RAM to trigger swapping. Base Optimized ---- --------- elapsed_time 393.49 s 329.88 s (-16.2%) ra_hit% 86.21% 98.82% The score of base and optimized kernel hasn't visible changes. But the elapsed time reduced and readahead hit rate improved, so the optimized kernel runs better for startup and tear down stages. And the absolute value of readahead hit rate is high, shows that the space locality is still valid in some practical workloads. Link: http://lkml.kernel.org/r/20170807054038.1843-4-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 1 + include/linux/swap.h | 57 ++++++++++++- mm/memory.c | 23 +++-- mm/shmem.c | 2 +- mm/swap_state.c | 215 +++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 273 insertions(+), 25 deletions(-) commit c4fa63092f216737b60c789968371d9960a598e5 Author: Huang Ying Date: Wed Sep 6 16:24:33 2017 -0700 mm, swap: fix swap readahead marking In the original implementation, it is possible that the existing pages in the swap cache (not newly readahead) could be marked as the readahead pages. This will cause the statistics of swap readahead be wrong and influence the swap readahead algorithm too. This is fixed via marking a page as the readahead page only if it is newly allocated and read from the disk. When testing with linpack, after the fixing the swap readahead hit rate increased from ~66% to ~86%. Link: http://lkml.kernel.org/r/20170807054038.1843-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit cbc65df240c104bf540af1ad58595bf1eaa5ee10 Author: Huang Ying Date: Wed Sep 6 16:24:29 2017 -0700 mm, swap: add swap readahead hit statistics Patch series "mm, swap: VMA based swap readahead", v4. The swap readahead is an important mechanism to reduce the swap in latency. Although pure sequential memory access pattern isn't very popular for anonymous memory, the space locality is still considered valid. In the original swap readahead implementation, the consecutive blocks in swap device are readahead based on the global space locality estimation. But the consecutive blocks in swap device just reflect the order of page reclaiming, don't necessarily reflect the access pattern in virtual memory space. And the different tasks in the system may have different access patterns, which makes the global space locality estimation incorrect. In this patchset, when page fault occurs, the virtual pages near the fault address will be readahead instead of the swap slots near the fault swap slot in swap device. This avoid to readahead the unrelated swap slots. At the same time, the swap readahead is changed to work on per-VMA from globally. So that the different access patterns of the different VMAs could be distinguished, and the different readahead policy could be applied accordingly. The original core readahead detection and scaling algorithm is reused, because it is an effect algorithm to detect the space locality. In addition to the swap readahead changes, some new sysfs interface is added to show the efficiency of the readahead algorithm and some other swap statistics. This new implementation will incur more small random read, on SSD, the improved correctness of estimation and readahead target should beat the potential increased overhead, this is also illustrated in the test results below. But on HDD, the overhead may beat the benefit, so the original implementation will be used by default. The test and result is as follow, Common test condition ===================== Test Machine: Xeon E5 v3 (2 sockets, 72 threads, 32G RAM) Swap device: NVMe disk Micro-benchmark with combined access pattern ============================================ vm-scalability, sequential swap test case, 4 processes to eat 50G virtual memory space, repeat the sequential memory writing until 300 seconds. The first round writing will trigger swap out, the following rounds will trigger sequential swap in and out. At the same time, run vm-scalability random swap test case in background, 8 processes to eat 30G virtual memory space, repeat the random memory write until 300 seconds. This will trigger random swap-in in the background. This is a combined workload with sequential and random memory accessing at the same time. The result (for sequential workload) is as follow, Base Optimized ---- --------- throughput 345413 KB/s 414029 KB/s (+19.9%) latency.average 97.14 us 61.06 us (-37.1%) latency.50th 2 us 1 us latency.60th 2 us 1 us latency.70th 98 us 2 us latency.80th 160 us 2 us latency.90th 260 us 217 us latency.95th 346 us 369 us latency.99th 1.34 ms 1.09 ms ra_hit% 52.69% 99.98% The original swap readahead algorithm is confused by the background random access workload, so readahead hit rate is lower. The VMA-base readahead algorithm works much better. Linpack ======= The test memory size is bigger than RAM to trigger swapping. Base Optimized ---- --------- elapsed_time 393.49 s 329.88 s (-16.2%) ra_hit% 86.21% 98.82% The score of base and optimized kernel hasn't visible changes. But the elapsed time reduced and readahead hit rate improved, so the optimized kernel runs better for startup and tear down stages. And the absolute value of readahead hit rate is high, shows that the space locality is still valid in some practical workloads. This patch (of 5): The statistics for total readahead pages and total readahead hits are recorded and exported via the following sysfs interface. /sys/kernel/mm/swap/ra_hits /sys/kernel/mm/swap/ra_total With them, the efficiency of the swap readahead could be measured, so that the swap readahead algorithm and parameters could be tuned accordingly. [akpm@linux-foundation.org: don't display swap stats if CONFIG_SWAP=n] Link: http://lkml.kernel.org/r/20170807054038.1843-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Rik van Riel Cc: Shaohua Li Cc: Hugh Dickins Cc: Fengguang Wu Cc: Tim Chen Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vm_event_item.h | 4 ++++ mm/swap_state.c | 9 +++++++-- mm/vmstat.c | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) commit 894e58c1475a03cd8260be7f28444cc298239432 Author: Byungchul Park Date: Wed Sep 6 16:24:26 2017 -0700 mm/vmalloc.c: don't reinvent the wheel but use existing llist API Although llist provides proper APIs, they are not used. Make them used. Link: http://lkml.kernel.org/r/1502095374-16112-1-git-send-email-byungchul.park@lge.com Signed-off-by: Byungchul Park Cc: zijun_hu Cc: Michal Hocko Cc: Vlastimil Babka Cc: Joel Fernandes Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f113e64121ba9f4791332248b315d9f57ee33a6b Author: SeongJae Park Date: Wed Sep 6 16:24:23 2017 -0700 mm/vmstat.c: fix wrong comment Comment for pagetypeinfo_showblockcount() is mistakenly duplicated from pagetypeinfo_show_free()'s comment. This commit fixes it. Link: http://lkml.kernel.org/r/20170809185816.11244-1-sj38.park@gmail.com Fixes: 467c996c1e19 ("Print out statistics in relation to fragmentation avoidance to /proc/pagetypeinfo") Signed-off-by: SeongJae Park Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f522a4856600ac579765b729178f2b3b6a69129 Author: Mike Kravetz Date: Wed Sep 6 16:24:19 2017 -0700 selftests/memfd: add memfd_create hugetlbfs selftest With the addition of hugetlbfs support in memfd_create, the memfd selftests should verify correct functionality with hugetlbfs. Instead of writing a separate memfd hugetlbfs test, modify the memfd_test program to take an optional argument 'hugetlbfs'. If the hugetlbfs argument is specified, basic memfd_create functionality will be exercised on hugetlbfs. If hugetlbfs is not specified, the current functionality of the test is unchanged. Note that many of the tests in memfd_test test file sealing operations. hugetlbfs does not support file sealing, therefore for hugetlbfs all sealing related tests are skipped. In order to test on hugetlbfs, there needs to be preallocated huge pages. A new script (run_tests) is added. This script will first run the existing memfd_create tests. It will then, attempt to allocate the required number of huge pages before running the hugetlbfs test. At the end of testing, it will release any huge pages allocated for testing purposes. Link: http://lkml.kernel.org/r/1502495772-24736-3-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Cc: Michal Hocko Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/memfd/Makefile | 2 +- tools/testing/selftests/memfd/memfd_test.c | 372 ++++++++++++++++++++++------- tools/testing/selftests/memfd/run_tests.sh | 69 ++++++ 3 files changed, 357 insertions(+), 86 deletions(-) commit 749df87bd7bee5a79cef073f5d032ddb2b211de8 Author: Mike Kravetz Date: Wed Sep 6 16:24:16 2017 -0700 mm/shmem: add hugetlbfs support to memfd_create() This patch came out of discussions in this e-mail thread: http://lkml.kernel.org/r/1499357846-7481-1-git-send-email-mike.kravetz%40oracle.com The Oracle JVM team is developing a new garbage collection model. This new model requires multiple mappings of the same anonymous memory. One straight forward way to accomplish this is with memfd_create. They can use the returned fd to create multiple mappings of the same memory. The JVM today has an option to use (static hugetlb) huge pages. If this option is specified, they would like to use the same garbage collection model requiring multiple mappings to the same memory. Using hugetlbfs, it is possible to explicitly mount a filesystem and specify file paths in order to get an fd that can be used for multiple mappings. However, this introduces additional system admin work and coordination. Ideally they would like to get a hugetlbfs fd without requiring explicit mounting of a filesystem. Today, mmap and shmget can make use of hugetlbfs without explicitly mounting a filesystem. The patch adds this functionality to memfd_create. Add a new flag MFD_HUGETLB to memfd_create() that will specify the file to be created resides in the hugetlbfs filesystem. This is the generic hugetlbfs filesystem not associated with any specific mount point. As with other system calls that request hugetlbfs backed pages, there is the ability to encode huge page size in the flag arguments. hugetlbfs does not support sealing operations, therefore specifying MFD_ALLOW_SEALING with MFD_HUGETLB will result in EINVAL. Of course, the memfd_man page would need updating if this type of functionality moves forward. Link: http://lkml.kernel.org/r/1502149672-7759-2-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/memfd.h | 24 ++++++++++++++++++++++++ mm/shmem.c | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 6 deletions(-) commit ab1b597ee0e4208a1db227bb7b2c9512c8234b48 Author: Dan Williams Date: Wed Sep 6 16:24:13 2017 -0700 mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups devm_memremap_pages() records mapped ranges in pgmap_radix with an entry per section's worth of memory (128MB). The key for each of those entries is a section number. This leads to false positives when devm_memremap_pages() is passed a section-unaligned range as lookups in the misalignment fail to return NULL. We can close this hole by using the pfn as the key for entries in the tree. The number of entries required to describe a remapped range is reduced by leveraging multi-order entries. In practice this approach usually yields just one entry in the tree if the size and starting address are of the same power-of-2 alignment. Previously we always needed nr_entries = mapping_size / 128MB. Link: https://lists.01.org/pipermail/linux-nvdimm/2016-August/006666.html Link: http://lkml.kernel.org/r/150215410565.39310.13767886055248249438.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Toshi Kani Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 52 ++++++++++++++++++++++++++++++++++++++-------------- mm/Kconfig | 1 + 2 files changed, 39 insertions(+), 14 deletions(-) commit c568da282bbc8f09c4b49201177fa259fe184c47 Author: Wei Yang Date: Wed Sep 6 16:24:09 2017 -0700 mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas() In pcpu_get_vm_areas(), it checks each range is not overlapped. To make sure it is, only (N^2)/2 comparison is necessary, while current code does N^2 times. By starting from the next range, it achieves the goal and the continue could be removed. Also, - the overlap check of two ranges could be done with one clause - one typo in comment is fixed. Link: http://lkml.kernel.org/r/20170803063822.48702-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Tejun Heo Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 88d6ac40c1c6b2334046d3f89f1911a3c8febd4c Author: Wen Yang Date: Wed Sep 6 16:24:06 2017 -0700 mm/vmstat: fix divide error at __fragmentation_index When order is -1 or too big, *1UL << order* will be 0, which will cause a divide error. Although it seems that all callers of __fragmentation_index() will only do so with a valid order, the patch can make it more robust. Should prevent reoccurrences of https://bugzilla.kernel.org/show_bug.cgi?id=196555 Link: http://lkml.kernel.org/r/1501751520-2598-1-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Wen Yang Reviewed-by: Jiang Biao Suggested-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 3 +++ 1 file changed, 3 insertions(+) commit 79b63f12abcbbd2caf7064b294af648a87de07ff Author: Michal Hocko Date: Wed Sep 6 16:24:03 2017 -0700 mm, hugetlb: do not allocate non-migrateable gigantic pages from movable zones alloc_gigantic_page doesn't consider movability of the gigantic hugetlb when scanning eligible ranges for the allocation. As 1GB hugetlb pages are not movable currently this can break the movable zone assumption that all allocations are migrateable and as such break memory hotplug. Reorganize the code and use the standard zonelist allocations scheme that we use for standard hugetbl pages. htlb_alloc_mask will ensure that only migratable hugetlb pages will ever see a movable zone. Link: http://lkml.kernel.org/r/20170803083549.21407-1-mhocko@kernel.org Fixes: 944d9fec8d7a ("hugetlb: add support for gigantic page allocation at runtime") Signed-off-by: Michal Hocko Reviewed-by: Mike Kravetz Cc: Luiz Capitulino Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit a36985d31a65d5c0559fb582719e32eaf0ccec3b Author: Andrea Arcangeli Date: Wed Sep 6 16:23:59 2017 -0700 userfaultfd: provide pid in userfault msg - add feat union No ABI change, but this will make it more explicit to software that ptid is only available if requested by passing UFFD_FEATURE_THREAD_ID to UFFDIO_API. The fact it's a union will also self document it shouldn't be taken for granted there's a tpid there. Link: http://lkml.kernel.org/r/20170802165145.22628-7-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Alexey Perevalov Cc: Maxime Coquelin Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- include/uapi/linux/userfaultfd.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9d4ac934829ac58c5109c49e6dfe677300e5e652 Author: Alexey Perevalov Date: Wed Sep 6 16:23:56 2017 -0700 userfaultfd: provide pid in userfault msg It could be useful for calculating downtime during postcopy live migration per vCPU. Side observer or application itself will be informed about proper task's sleep during userfaultfd processing. Process's thread id is being provided when user requeste it by setting UFFD_FEATURE_THREAD_ID bit into uffdio_api.features. Link: http://lkml.kernel.org/r/20170802165145.22628-6-aarcange@redhat.com Signed-off-by: Alexey Perevalov Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Maxime Coquelin Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 8 ++++++-- include/uapi/linux/userfaultfd.h | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) commit 2376dd7ceddae67432db055ff3f2b7f4122a919d Author: Andrea Arcangeli Date: Wed Sep 6 16:23:53 2017 -0700 userfaultfd: call userfaultfd_unmap_prep only if __split_vma succeeds A __split_vma is not a worthy event to report, and it's definitely not a unmap so it would be incorrect to report unmap for the whole region to the userfaultfd manager if a __split_vma fails. So only call userfaultfd_unmap_prep after the __vma_splitting is over and do_munmap cannot fail anymore. Also add unlikely because it's better to optimize for the vast majority of apps that aren't using userfaultfd in a non cooperative way. Ideally we should also find a way to eliminate the branch entirely if CONFIG_USERFAULTFD=n, but it would complicate things so stick to unlikely for now. Link: http://lkml.kernel.org/r/20170802165145.22628-5-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Alexey Perevalov Cc: Maxime Coquelin Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit d312cb1e4884c606bafe6499fade2f91ccc2e944 Author: Andrea Arcangeli Date: Wed Sep 6 16:23:49 2017 -0700 userfaultfd: selftest: explicit failure if the SIGBUS test failed Showing zero in the output isn't very self explanatory as a successful result. Show a more explicit error output if the test fails. Link: http://lkml.kernel.org/r/20170802165145.22628-4-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Alexey Perevalov Cc: Maxime Coquelin Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 67e803281d1ce26daee4f1c0a489cad27b2a583c Author: Andrea Arcangeli Date: Wed Sep 6 16:23:46 2017 -0700 userfaultfd: selftest: exercise UFFDIO_COPY/ZEROPAGE -EEXIST This will retry the UFFDIO_COPY/ZEROPAGE to verify it returns -EEXIST at the first invocation and then later every 10 seconds. In the filebacked MAP_SHARED case this also verifies the -EEXIST triggered in the filesystem pagecache insertion, if the offset in the file was not a hole. shmem MAP_SHARED tries to index the newly allocated pagecache in the radix tree before checking the pagetable so it doesn't need any assistance to exercise that case. hugetlbfs checks the pmd to be not none before trying to index the hugetlbfs page in the radix tree, so it requires to run UFFDIO_COPY into an alias mapping (the alternative would be to use MADV_DONTNEED to only zap the pagetables, but that doesn't work on hugetlbfs). [akpm@linux-foundation.org: fix uffdio_zeropage(), per Mike Kravetz] Link: http://lkml.kernel.org/r/20170802165145.22628-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: Alexey Perevalov Cc: Maxime Coquelin Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 148 +++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 8 deletions(-) commit 81aac3a15ef3e85952daebd199df9c8f1eb24f84 Author: Prakash Sangappa Date: Wed Sep 6 16:23:43 2017 -0700 userfaultfd: selftest: add tests for UFFD_FEATURE_SIGBUS feature Add tests for UFFD_FEATURE_SIGBUS feature. The tests will verify signal delivery instead of userfault events. Also, test use of UFFDIO_COPY to allocate memory and retry accessing monitored area after signal delivery. Also fix a bug in uffd_poll_thread() where 'uffd' is leaked. Link: http://lkml.kernel.org/r/1501552446-748335-3-git-send-email-prakash.sangappa@oracle.com Signed-off-by: Prakash Sangappa Cc: Shuah Khan Cc: Andrea Arcangeli Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 127 ++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 3 deletions(-) commit 2d6d6f5a09a96cc1fec7ed992b825e05f64cb50e Author: Prakash Sangappa Date: Wed Sep 6 16:23:39 2017 -0700 mm: userfaultfd: add feature to request for a signal delivery In some cases, userfaultfd mechanism should just deliver a SIGBUS signal to the faulting process, instead of the page-fault event. Dealing with page-fault event using a monitor thread can be an overhead in these cases. For example applications like the database could use the signaling mechanism for robustness purpose. Database uses hugetlbfs for performance reason. Files on hugetlbfs filesystem are created and huge pages allocated using fallocate() API. Pages are deallocated/freed using fallocate() hole punching support. These files are mmapped and accessed by many processes as shared memory. The database keeps track of which offsets in the hugetlbfs file have pages allocated. Any access to mapped address over holes in the file, which can occur due to bugs in the application, is considered invalid and expect the process to simply receive a SIGBUS. However, currently when a hole in the file is accessed via the mapped address, kernel/mm attempts to automatically allocate a page at page fault time, resulting in implicitly filling the hole in the file. This may not be the desired behavior for applications like the database that want to explicitly manage page allocations of hugetlbfs files. Using userfaultfd mechanism with this support to get a signal, database application can prevent pages from being allocated implicitly when processes access mapped address over holes in the file. This patch adds UFFD_FEATURE_SIGBUS feature to userfaultfd mechnism to request for a SIGBUS signal. See following for previous discussion about the database requirement leading to this proposal as suggested by Andrea. http://www.spinics.net/lists/linux-mm/msg129224.html Link: http://lkml.kernel.org/r/1501552446-748335-2-git-send-email-prakash.sangappa@oracle.com Signed-off-by: Prakash Sangappa Reviewed-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Cc: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 3 +++ include/uapi/linux/userfaultfd.h | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit c41f012ade0b95b0a6e25c7150673e0554736165 Author: Michal Hocko Date: Wed Sep 6 16:23:36 2017 -0700 mm: rename global_page_state to global_zone_page_state global_page_state is error prone as a recent bug report pointed out [1]. It only returns proper values for zone based counters as the enum it gets suggests. We already have global_node_page_state so let's rename global_page_state to global_zone_page_state to be more explicit here. All existing users seems to be correct: $ git grep "global_page_state(NR_" | sed 's@.*(\(NR_[A-Z_]*\)).*@\1@' | sort | uniq -c 2 NR_BOUNCE 2 NR_FREE_CMA_PAGES 11 NR_FREE_PAGES 1 NR_KERNEL_STACK_KB 1 NR_MLOCK 2 NR_PAGETABLE This patch shouldn't introduce any functional change. [1] http://lkml.kernel.org/r/201707260628.v6Q6SmaS030814@www262.sakura.ne.jp Link: http://lkml.kernel.org/r/20170801134256.5400-2-hannes@cmpxchg.org Signed-off-by: Michal Hocko Signed-off-by: Johannes Weiner Cc: Tetsuo Handa Cc: Josef Bacik Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 10 +++++----- include/linux/swap.h | 4 ++-- include/linux/vmstat.h | 4 ++-- mm/mmap.c | 6 +++--- mm/nommu.c | 4 ++-- mm/page-writeback.c | 4 ++-- mm/page_alloc.c | 12 ++++++------ mm/util.c | 2 +- mm/vmstat.c | 4 ++-- 9 files changed, 25 insertions(+), 25 deletions(-) commit 4da243ac1cf6aeb30b7c555d56208982d66d6d33 Author: Mike Kravetz Date: Wed Sep 6 16:23:33 2017 -0700 mm: shm: use new hugetlb size encoding definitions Use the common definitions from hugetlb_encode.h header file for encoding hugetlb size definitions in shmget system call flags. In addition, move these definitions from the internal (kernel) to user (uapi) header file. Link: http://lkml.kernel.org/r/1501527386-10736-4-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Suggested-by: Matthew Wilcox Acked-by: Michal Hocko Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Davidlohr Bueso Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/shm.h | 17 ----------------- include/uapi/linux/shm.h | 31 +++++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 19 deletions(-) commit aafd4562dfee81a40ba21b5ea3cf5e06664bc7f6 Author: Mike Kravetz Date: Wed Sep 6 16:23:29 2017 -0700 mm: arch: consolidate mmap hugetlb size encodings A non-default huge page size can be encoded in the flags argument of the mmap system call. The definitions for these encodings are in arch specific header files. However, all architectures use the same values. Consolidate all the definitions in the primary user header file (uapi/linux/mman.h). Include definitions for all known huge page sizes. Use the generic encoding definitions in hugetlb_encode.h as the basis for these definitions. Link: http://lkml.kernel.org/r/1501527386-10736-3-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Davidlohr Bueso Cc: Matthew Wilcox Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 11 ----------- arch/mips/include/uapi/asm/mman.h | 11 ----------- arch/parisc/include/uapi/asm/mman.h | 11 ----------- arch/powerpc/include/uapi/asm/mman.h | 16 ---------------- arch/x86/include/uapi/asm/mman.h | 3 --- arch/xtensa/include/uapi/asm/mman.h | 11 ----------- include/uapi/asm-generic/mman-common.h | 11 ----------- include/uapi/linux/mman.h | 22 ++++++++++++++++++++++ 8 files changed, 22 insertions(+), 74 deletions(-) commit e652f694598273c5d749687032d1534a30e6a3a5 Author: Mike Kravetz Date: Wed Sep 6 16:23:25 2017 -0700 mm: hugetlb: define system call hugetlb size encodings in single file Patch series "Consolidate system call hugetlb page size encodings". These patches are the result of discussions in https://lkml.org/lkml/2017/3/8/548. The following changes are made in the patch set: 1) Put all the log2 encoded huge page size definitions in a common header file. The idea is have a set of definitions that can be use as the basis for system call specific definitions such as MAP_HUGE_* and SHM_HUGE_*. 2) Remove MAP_HUGE_* definitions in arch specific files. All these definitions are the same. Consolidate all definitions in the primary user header file (uapi/linux/mman.h). 3) Remove SHM_HUGE_* definitions intended for user space from kernel header file, and add to user (uapi/linux/shm.h) header file. Add definitions for all known huge page size encodings as in mmap. This patch (of 3): If hugetlb pages are requested in mmap or shmget system calls, a huge page size other than default can be requested. This is accomplished by encoding the log2 of the huge page size in the upper bits of the flag argument. asm-generic and arch specific headers all define the same values for these encodings. Put common definitions in a single header file. The primary uapi header files for mmap and shm will use these definitions as a basis for definitions specific to those system calls. Link: http://lkml.kernel.org/r/1501527386-10736-2-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: Andi Kleen Cc: Michael Kerrisk Cc: Davidlohr Bueso Cc: Anshuman Khandual Cc: Aneesh Kumar K.V Cc: Andrea Arcangeli Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/asm-generic/hugetlb_encode.h | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit a446d6f9ce545248c62ab9694d05ac6f68563706 Author: Jeff Layton Date: Wed Sep 6 16:23:22 2017 -0700 include/linux/fs.h: remove unneeded forward definition of mm_struct Link: http://lkml.kernel.org/r/20170525102927.6163-1-jlayton@redhat.com Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 2 -- 1 file changed, 2 deletions(-) commit de23abd15175fb170270d485f267caebe86fb0b4 Author: Jeff Layton Date: Wed Sep 6 16:23:19 2017 -0700 fs/sync.c: remove unnecessary NULL f_mapping check in sync_file_range fsync codepath assumes that f_mapping can never be NULL, but sync_file_range has a check for that. Remove the one from sync_file_range as I don't see how you'd ever get a NULL pointer in here. Link: http://lkml.kernel.org/r/20170525110509.9434-1-jlayton@redhat.com Signed-off-by: Jeff Layton Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/sync.c | 5 ----- 1 file changed, 5 deletions(-) commit 824f973904a1108806fa0fbe15dc93ee9ecd9e0a Author: Mike Rapoport Date: Wed Sep 6 16:23:16 2017 -0700 userfaultfd: selftest: enable testing of UFFDIO_ZEROPAGE for shmem Link: http://lkml.kernel.org/r/1497939652-16528-8-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce53e8e6f2cb02d69f0a1d7954e10d3231bc75f5 Author: Mike Rapoport Date: Wed Sep 6 16:23:12 2017 -0700 userfaultfd: report UFFDIO_ZEROPAGE as available for shmem VMAs Now when shmem VMAs can be filled with zero page via userfaultfd we can report that UFFDIO_ZEROPAGE is available for those VMAs Link: http://lkml.kernel.org/r/1497939652-16528-7-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8fb44e5403ca86e33411dfa12dd298ed5ab1c3f7 Author: Mike Rapoport Date: Wed Sep 6 16:23:09 2017 -0700 userfaultfd: shmem: wire up shmem_mfill_zeropage_pte For shmem VMAs we can use shmem_mfill_zeropage_pte for UFFDIO_ZEROPAGE Link: http://lkml.kernel.org/r/1497939652-16528-6-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3217d3c79b5d7aabf62daa4db8cf757abedc9f28 Author: Mike Rapoport Date: Wed Sep 6 16:23:06 2017 -0700 userfaultfd: mcopy_atomic: introduce mfill_atomic_pte helper Shuffle the code a bit to improve readability. Link: http://lkml.kernel.org/r/1497939652-16528-5-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/userfaultfd.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit 8d10396342063c79e92c4e46215370ab7b988569 Author: Mike Rapoport Date: Wed Sep 6 16:23:02 2017 -0700 userfaultfd: shmem: add shmem_mfill_zeropage_pte for userfaultfd support shmem_mfill_zeropage_pte is the low level routine that implements the userfaultfd UFFDIO_ZEROPAGE command. Since for shmem mappings zero pages are always allocated and accounted, the new method is a slight extension of the existing shmem_mcopy_atomic_pte. Link: http://lkml.kernel.org/r/1497939652-16528-4-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/shmem_fs.h | 6 +++++ mm/shmem.c | 62 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 17 deletions(-) commit 0f0796945614b7523987f7eea32407421af4b1ee Author: Mike Rapoport Date: Wed Sep 6 16:22:59 2017 -0700 shmem: introduce shmem_inode_acct_block The shmem_acct_block and the update of used_blocks are following one another in all the places they are used. Combine these two into a helper function. Link: http://lkml.kernel.org/r/1497939652-16528-3-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Hillf Danton Cc: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 102 ++++++++++++++++++++++++++++--------------------------------- 1 file changed, 46 insertions(+), 56 deletions(-) commit b1cc94ab2f2ba31fcb2c59df0b9cf03f6d720553 Author: Mike Rapoport Date: Wed Sep 6 16:22:56 2017 -0700 shmem: shmem_charge: verify max_block is not exceeded before inode update Patch series "userfaultfd: enable zeropage support for shmem". These patches enable support for UFFDIO_ZEROPAGE for shared memory. The first two patches are not strictly related to userfaultfd, they are just minor refactoring to reduce amount of code duplication. This patch (of 7): Currently we update inode and shmem_inode_info before verifying that used_blocks will not exceed max_blocks. In case it will, we undo the update. Let's switch the order and move the verification of the blocks count before the inode and shmem_inode_info update. Link: http://lkml.kernel.org/r/1497939652-16528-2-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: "Kirill A. Shutemov" Cc: Hillf Danton Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit fe490cc0fe9e6ee48cc48bb5dc463bc5f0f1428f Author: Huang Ying Date: Wed Sep 6 16:22:52 2017 -0700 mm, THP, swap: add THP swapping out fallback counting When swapping out THP (Transparent Huge Page), instead of swapping out the THP as a whole, sometimes we have to fallback to split the THP into normal pages before swapping, because no free swap clusters are available, or cgroup limit is exceeded, etc. To count the number of the fallback, a new VM event THP_SWPOUT_FALLBACK is added, and counted when we fallback to split the THP. Link: http://lkml.kernel.org/r/20170724051840.2309-13-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: Rik van Riel Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Michal Hocko Cc: Dan Williams Cc: Jens Axboe Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vm_event_item.h | 1 + mm/vmscan.c | 3 +++ mm/vmstat.c | 1 + 3 files changed, 5 insertions(+) commit bd4c82c22c367e068acb1ec9ec02be2fac3e09e2 Author: Huang Ying Date: Wed Sep 6 16:22:49 2017 -0700 mm, THP, swap: delay splitting THP after swapped out In this patch, splitting transparent huge page (THP) during swapping out is delayed from after adding the THP into the swap cache to after swapping out finishes. After the patch, more operations for the anonymous THP reclaiming, such as writing the THP to the swap device, removing the THP from the swap cache could be batched. So that the performance of anonymous THP swapping out could be improved. This is the second step for the THP swap support. The plan is to delay splitting the THP step by step and avoid splitting the THP finally. With the patchset, the swap out throughput improves 42% (from about 5.81GB/s to about 8.25GB/s) in the vm-scalability swap-w-seq test case with 16 processes. At the same time, the IPI (reflect TLB flushing) reduced about 78.9%. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. To test the sequential swapping out, the test case creates 8 processes, which sequentially allocate and write to the anonymous pages until the RAM and part of the swap device is used up. Link: http://lkml.kernel.org/r/20170724051840.2309-12-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: Rik van Riel Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Michal Hocko Cc: Dan Williams Cc: Jens Axboe Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 95 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 43 deletions(-) commit d6810d730022016d9c0f389452b86b035dba1492 Author: Huang Ying Date: Wed Sep 6 16:22:45 2017 -0700 memcg, THP, swap: make mem_cgroup_swapout() support THP This patch makes mem_cgroup_swapout() works for the transparent huge page (THP). Which will move the memory cgroup charge from memory to swap for a THP. This will be used for the THP swap support. Where a THP may be swapped out as a whole to a set of (HPAGE_PMD_NR) continuous swap slots on the swap device. Link: http://lkml.kernel.org/r/20170724051840.2309-11-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Michal Hocko Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Hugh Dickins Cc: Jens Axboe Cc: Rik van Riel Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Shaohua Li Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit abe2895b76047bf5430990f2584cd91f76692218 Author: Huang Ying Date: Wed Sep 6 16:22:41 2017 -0700 memcg, THP, swap: avoid to duplicated charge THP in swap cache For a THP (Transparent Huge Page), tail_page->mem_cgroup is NULL. So to check whether the page is charged already, we need to check the head page. This is not an issue before because it is impossible for a THP to be in the swap cache before. But after we add delaying splitting THP after swapped out support, it is possible now. Link: http://lkml.kernel.org/r/20170724051840.2309-10-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Michal Hocko Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Hugh Dickins Cc: Jens Axboe Cc: Rik van Riel Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Shaohua Li Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e14a57b2416b7c94189b95baffd673cf5e0d0a3 Author: Huang Ying Date: Wed Sep 6 16:22:37 2017 -0700 memcg, THP, swap: support move mem cgroup charge for THP swapped out PTE mapped THP (Transparent Huge Page) will be ignored when moving memory cgroup charge. But for THP which is in the swap cache, the memory cgroup charge for the swap of a tail-page may be moved in current implementation. That isn't correct, because the swap charge for all sub-pages of a THP should be moved together. Following the processing of the PTE mapped THP, the mem cgroup charge moving for the swap entry for a tail-page of a THP is ignored too. Link: http://lkml.kernel.org/r/20170724051840.2309-9-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Michal Hocko Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Hugh Dickins Cc: Jens Axboe Cc: Rik van Riel Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Shaohua Li Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 59807685a7e77e8c8fe5925613968841538d53d7 Author: Huang Ying Date: Wed Sep 6 16:22:34 2017 -0700 mm, THP, swap: support splitting THP for THP swap out After adding swapping out support for THP (Transparent Huge Page), it is possible that a THP in swap cache (partly swapped out) need to be split. To split such a THP, the swap cluster backing the THP need to be split too, that is, the CLUSTER_FLAG_HUGE flag need to be cleared for the swap cluster. The patch implemented this. And because the THP swap writing needs the THP keeps as huge page during writing. The PageWriteback flag is checked before splitting. Link: http://lkml.kernel.org/r/20170724051840.2309-8-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: Rik van Riel Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Jens Axboe Cc: Michal Hocko Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 9 +++++++++ mm/huge_memory.c | 10 +++++++++- mm/swapfile.c | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) commit 225311a46411c37e20e73d99f4382f141e12f6f9 Author: Huang Ying Date: Wed Sep 6 16:22:30 2017 -0700 mm: test code to write THP to swap device as a whole To support delay splitting THP (Transparent Huge Page) after swapped out, we need to enhance swap writing code to support to write a THP as a whole. This will improve swap write IO performance. As Ming Lei pointed out, this should be based on multipage bvec support, which hasn't been merged yet. So this patch is only for testing the functionality of the other patches in the series. And will be reimplemented after multipage bvec support is merged. Link: http://lkml.kernel.org/r/20170724051840.2309-7-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Dan Williams Cc: Hugh Dickins Cc: Jens Axboe Cc: Johannes Weiner Cc: Michal Hocko Cc: Minchan Kim Cc: Rik van Riel Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Shaohua Li Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bio.h | 8 ++++++++ include/linux/page-flags.h | 4 ++-- include/linux/vm_event_item.h | 1 + mm/page_io.c | 21 ++++++++++++++++----- mm/vmstat.c | 1 + 5 files changed, 28 insertions(+), 7 deletions(-) commit 98cc093cba1e925eb34963dedb5f1684f1bdb2f4 Author: Huang Ying Date: Wed Sep 6 16:22:27 2017 -0700 block, THP: make block_device_operations.rw_page support THP The .rw_page in struct block_device_operations is used by the swap subsystem to read/write the page contents from/into the corresponding swap slot in the swap device. To support the THP (Transparent Huge Page) swap optimization, the .rw_page is enhanced to support to read/write THP if possible. Link: http://lkml.kernel.org/r/20170724051840.2309-6-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Johannes Weiner Cc: Minchan Kim Cc: Dan Williams Cc: Vishal L Verma Cc: Jens Axboe Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Michal Hocko Cc: Rik van Riel Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/brd.c | 6 +++++- drivers/block/zram/zram_drv.c | 2 ++ drivers/nvdimm/btt.c | 4 +++- drivers/nvdimm/pmem.c | 41 ++++++++++++++++++++++++++++++----------- 4 files changed, 40 insertions(+), 13 deletions(-) commit f0eea189e8e969b66e03bac8a7d92888ba267854 Author: Huang Ying Date: Wed Sep 6 16:22:23 2017 -0700 mm, THP, swap: don't allocate huge cluster for file backed swap device It's hard to write a whole transparent huge page (THP) to a file backed swap device during swapping out and the file backed swap device isn't very popular. So the huge cluster allocation for the file backed swap device is disabled. Link: http://lkml.kernel.org/r/20170724051840.2309-5-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: Rik van Riel Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Dan Williams Cc: Jens Axboe Cc: Michal Hocko Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ba3c4ce6def4915093be80585ff69f780630f32f Author: Huang Ying Date: Wed Sep 6 16:22:19 2017 -0700 mm, THP, swap: make reuse_swap_page() works for THP swapped out After supporting to delay THP (Transparent Huge Page) splitting after swapped out, it is possible that some page table mappings of the THP are turned into swap entries. So reuse_swap_page() need to check the swap count in addition to the map count as before. This patch done that. In the huge PMD write protect fault handler, in addition to the page map count, the swap count need to be checked too, so the page lock need to be acquired too when calling reuse_swap_page() in addition to the page table lock. [ying.huang@intel.com: silence a compiler warning] Link: http://lkml.kernel.org/r/87bmnzizjy.fsf@yhuang-dev.intel.com Link: http://lkml.kernel.org/r/20170724051840.2309-4-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: Rik van Riel Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Jens Axboe Cc: Michal Hocko Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 +- mm/huge_memory.c | 16 +++++++- mm/memory.c | 6 +-- mm/swapfile.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 113 insertions(+), 15 deletions(-) commit e07098294adfd03d582af7626752255e3d170393 Author: Huang Ying Date: Wed Sep 6 16:22:16 2017 -0700 mm, THP, swap: support to reclaim swap space for THP swapped out The normal swap slot reclaiming can be done when the swap count reaches SWAP_HAS_CACHE. But for the swap slot which is backing a THP, all swap slots backing one THP must be reclaimed together, because the swap slot may be used again when the THP is swapped out again later. So the swap slots backing one THP can be reclaimed together when the swap count for all swap slots for the THP reached SWAP_HAS_CACHE. In the patch, the functions to check whether the swap count for all swap slots backing one THP reached SWAP_HAS_CACHE are implemented and used when checking whether a swap slot can be reclaimed. To make it easier to determine whether a swap slot is backing a THP, a new swap cluster flag named CLUSTER_FLAG_HUGE is added to mark a swap cluster which is backing a THP (Transparent Huge Page). Because THP swap in as a whole isn't supported now. After deleting the THP from the swap cache (for example, swapping out finished), the CLUSTER_FLAG_HUGE flag will be cleared. So that, the normal pages inside THP can be swapped in individually. [ying.huang@intel.com: fix swap_page_trans_huge_swapped on HDD] Link: http://lkml.kernel.org/r/874ltsm0bi.fsf@yhuang-dev.intel.com Link: http://lkml.kernel.org/r/20170724051840.2309-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Rik van Riel Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Dan Williams Cc: Jens Axboe Cc: Michal Hocko Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 1 + mm/swapfile.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 72 insertions(+), 7 deletions(-) commit a3aea839e42ef8d76bb58091ab7f5a45a85ea299 Author: Huang Ying Date: Wed Sep 6 16:22:12 2017 -0700 mm, THP, swap: support to clear swap cache flag for THP swapped out Patch series "mm, THP, swap: Delay splitting THP after swapped out", v3. This is the second step of THP (Transparent Huge Page) swap optimization. In the first step, the splitting huge page is delayed from almost the first step of swapping out to after allocating the swap space for the THP and adding the THP into the swap cache. In the second step, the splitting is delayed further to after the swapping out finished. The plan is to delay splitting THP step by step, finally avoid splitting THP for the THP swapping out and swap out/in the THP as a whole. In the patchset, more operations for the anonymous THP reclaiming, such as TLB flushing, writing the THP to the swap device, removing the THP from the swap cache are batched. So that the performance of anonymous THP swapping out are improved. During the development, the following scenarios/code paths have been checked, - swap out/in - swap off - write protect page fault - madvise_free - process exit - split huge page With the patchset, the swap out throughput improves 42% (from about 5.81GB/s to about 8.25GB/s) in the vm-scalability swap-w-seq test case with 16 processes. At the same time, the IPI (reflect TLB flushing) reduced about 78.9%. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. To test the sequential swapping out, the test case creates 8 processes, which sequentially allocate and write to the anonymous pages until the RAM and part of the swap device is used up. Below is the part of the cover letter for the first step patchset of THP swap optimization which applies to all steps. ========================= Recently, the performance of the storage devices improved so fast that we cannot saturate the disk bandwidth with single logical CPU when do page swap out even on a high-end server machine. Because the performance of the storage device improved faster than that of single logical CPU. And it seems that the trend will not change in the near future. On the other hand, the THP becomes more and more popular because of increased memory size. So it becomes necessary to optimize THP swap performance. The advantages of the THP swap support include: - Batch the swap operations for the THP to reduce TLB flushing and lock acquiring/releasing, including allocating/freeing the swap space, adding/deleting to/from the swap cache, and writing/reading the swap space, etc. This will help improve the performance of the THP swap. - The THP swap space read/write will be 2M sequential IO. It is particularly helpful for the swap read, which are usually 4k random IO. This will improve the performance of the THP swap too. - It will help the memory fragmentation, especially when the THP is heavily used by the applications. The 2M continuous pages will be free up after THP swapping out. - It will improve the THP utilization on the system with the swap turned on. Because the speed for khugepaged to collapse the normal pages into the THP is quite slow. After the THP is split during the swapping out, it will take quite long time for the normal pages to collapse back into the THP after being swapped in. The high THP utilization helps the efficiency of the page based memory management too. There are some concerns regarding THP swap in, mainly because possible enlarged read/write IO size (for swap in/out) may put more overhead on the storage device. To deal with that, the THP swap in should be turned on only when necessary. For example, it can be selected via "always/never/madvise" logic, to be turned on globally, turned off globally, or turned on only for VMA with MADV_HUGEPAGE, etc. This patch (of 12): Previously, swapcache_free_cluster() is used only in the error path of shrink_page_list() to free the swap cluster just allocated if the THP (Transparent Huge Page) is failed to be split. In this patch, it is enhanced to clear the swap cache flag (SWAP_HAS_CACHE) for the swap cluster that holds the contents of THP swapped out. This will be used in delaying splitting THP after swapping out support. Because there is no THP swapping in as a whole support yet, after clearing the swap cache flag, the swap cluster backing the THP swapped out will be split. So that the swap slots in the swap cluster can be swapped in as normal pages later. Link: http://lkml.kernel.org/r/20170724051840.2309-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Rik van Riel Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Shaohua Li Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Dan Williams Cc: Jens Axboe Cc: Michal Hocko Cc: Ross Zwisler [for brd.c, zram_drv.c, pmem.c] Cc: Vishal L Verma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 04fecbf51b3cb79a628d50b65797c4866342b8d2 Author: Matthias Kaehlcke Date: Wed Sep 6 16:22:09 2017 -0700 mm: memcontrol: use int for event/state parameter in several functions Several functions use an enum type as parameter for an event/state, but are called in some locations with an argument of a different enum type. Adjust the interface of these functions to reality by changing the parameter to int. This fixes a ton of enum-conversion warnings that are generated when building the kernel with clang. [mka@chromium.org: also change parameter type of inc/dec/mod_memcg_page_state()] Link: http://lkml.kernel.org/r/20170728213442.93823-1-mka@chromium.org Link: http://lkml.kernel.org/r/20170727211004.34435-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Doug Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 52 ++++++++++++++++++++++++++++------------------ mm/memcontrol.c | 4 +++- 2 files changed, 35 insertions(+), 21 deletions(-) commit 67e5ed969944d7c6d93f658a188240cf60c49f71 Author: Arvind Yadav Date: Wed Sep 6 16:22:06 2017 -0700 mm/hugetlb.c: constify attribute_group structures attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Link: http://lkml.kernel.org/r/1501157260-3922-1-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8aa95a21bc51205112b3a416810666616287b49b Author: Arvind Yadav Date: Wed Sep 6 16:22:03 2017 -0700 mm/huge_memory.c: constify attribute_group structures attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Link: http://lkml.kernel.org/r/1501157240-3876-1-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd147cbb6a337673cc267358a602d23f085325f6 Author: Arvind Yadav Date: Wed Sep 6 16:21:59 2017 -0700 mm/page_idle.c: constify attribute_group structures attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Link: http://lkml.kernel.org/r/1501157221-3832-1-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fdaaa2329d15559de8446a8d3d4d72635704eab Author: Arvind Yadav Date: Wed Sep 6 16:21:56 2017 -0700 mm/slub.c: constify attribute_group structures attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Link: http://lkml.kernel.org/r/1501157186-3749-1-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f907c26a9166a1f4076940b9146d54bd1043db77 Author: Arvind Yadav Date: Wed Sep 6 16:21:53 2017 -0700 mm/ksm.c: constify attribute_group structures attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Link: http://lkml.kernel.org/r/1501157167-3706-2-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f3975f3584eee2da88b11f06f66e2d39fd30d0 Author: Roman Gushchin Date: Wed Sep 6 16:21:50 2017 -0700 cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction") Commit fa06235b8eb0 ("cgroup: reset css on destruction") caused css_reset callback to be called from the offlining path. Although it solves the problem mentioned in the commit description ("For instance, memory cgroup needs to reset memory.low, otherwise pages charged to a dead cgroup might never get reclaimed."), generally speaking, it's not correct. An offline cgroup can still be a resource domain, and we shouldn't grant it more resources than it had before deletion. For instance, if an offline memory cgroup has dirty pages, we should still imply i/o limits during writeback. The css_reset callback is designed to return the cgroup state into the original state, that means reset all limits and counters. It's spomething different from the offlining, and we shouldn't use it from the offlining path. Instead, we should adjust necessary settings from the per-controller css_offline callbacks (e.g. reset memory.low). Link: http://lkml.kernel.org/r/20170727130428.28856-2-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Acked-by: Johannes Weiner Cc: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/cgroup/cgroup.c | 3 --- 1 file changed, 3 deletions(-) commit 63677c745d63ba75ef97a7728c85168ddd6c0040 Author: Roman Gushchin Date: Wed Sep 6 16:21:47 2017 -0700 mm, memcg: reset memory.low during memcg offlining A removed memory cgroup with a defined memory.low and some belonging pagecache has very low chances to be freed. If a cgroup has been removed, there is likely no memory pressure inside the cgroup, and the pagecache is protected from the external pressure by the defined low limit. The cgroup will be freed only after the reclaim of all belonging pages. And it will not happen until there are any reclaimable memory in the system. That means, there is a good chance, that a cold pagecache will reside in the memory for an undefined amount of time, wasting system resources. This problem was fixed earlier by fa06235b8eb0 ("cgroup: reset css on destruction"), but it's not a best way to do it, as we can't really reset all limits/counters during cgroup offlining. Link: http://lkml.kernel.org/r/20170727130428.28856-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 ++ 1 file changed, 2 insertions(+) commit 397162ffa2ed1cadffe05c324c6ddc53647f9c62 Author: Jan Kara Date: Wed Sep 6 16:21:43 2017 -0700 mm: remove nr_pages argument from pagevec_lookup{,_range}() 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/20170726114704.7626-11-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 5 ++--- fs/ext4/file.c | 2 +- fs/ext4/inode.c | 5 ++--- fs/fscache/page.c | 2 +- fs/hugetlbfs/inode.c | 3 +-- fs/nilfs2/page.c | 2 +- include/linux/pagevec.h | 7 +++---- mm/swap.c | 5 ++--- 8 files changed, 13 insertions(+), 18 deletions(-) commit f7b68046873724129798c405e1a4e326b409c08f Author: Jan Kara Date: Wed Sep 6 16:21:40 2017 -0700 mm: use find_get_pages_range() in filemap_range_has_page() We want only pages from given range in filemap_range_has_page(), furthermore we want at most a single page. So use find_get_pages_range() instead of pagevec_lookup() and remove unnecessary code. Link: http://lkml.kernel.org/r/20170726114704.7626-10-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 8338141f0f51325de5fd096e4179d01dac6f3655 Author: Jan Kara Date: Wed Sep 6 16:21:37 2017 -0700 fs: use pagevec_lookup_range() in page_cache_seek_hole_data() We want only pages from given range in page_cache_seek_hole_data(). Use pagevec_lookup_range() instead of pagevec_lookup() and remove unnecessary code. Note that the check for getting less pages than desired can be removed because index gets updated by pagevec_lookup_range(). Link: http://lkml.kernel.org/r/20170726114704.7626-9-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 48f2301c07b299f5bcd64563d90215a8ba73e154 Author: Jan Kara Date: Wed Sep 6 16:21:33 2017 -0700 hugetlbfs: use pagevec_lookup_range() in remove_inode_hugepages() We want only pages from given range in remove_inode_hugepages(). Use pagevec_lookup_range() instead of pagevec_lookup(). Link: http://lkml.kernel.org/r/20170726114704.7626-8-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Mike Kravetz Cc: Nadia Yvette Chambers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 2b85a6171d1370903d65cc8b84cefca26a16b5e4 Author: Jan Kara Date: Wed Sep 6 16:21:30 2017 -0700 ext4: use pagevec_lookup_range() in writeback code Both occurences of pagevec_lookup() actually want only pages from a given range. Use pagevec_lookup_range() for the lookup. Link: http://lkml.kernel.org/r/20170726114704.7626-7-jack@suse.cz Signed-off-by: Jan Kara Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/inode.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit dec0da7b608253b004daea1da5bd82b3b292ba0f Author: Jan Kara Date: Wed Sep 6 16:21:27 2017 -0700 ext4: use pagevec_lookup_range() in ext4_find_unwritten_pgoff() Use pagevec_lookup_range() in ext4_find_unwritten_pgoff() since we are interested only in pages in the given range. Simplify the logic as a result of not getting pages out of range and index getting automatically advanced. Link: http://lkml.kernel.org/r/20170726114704.7626-6-jack@suse.cz Signed-off-by: Jan Kara Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/file.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c10f778ddfc161f5c58a8d6de4ad92235ea2eeba Author: Jan Kara Date: Wed Sep 6 16:21:24 2017 -0700 fs: fix performance regression in clean_bdev_aliases() Commit e64855c6cfaa ("fs: Add helper to clean bdev aliases under a bh and use it") added a wrapper for clean_bdev_aliases() that invalidates bdev aliases underlying a single buffer head. However this has caused a performance regression for bonnie++ benchmark on ext4 filesystem when delayed allocation is turned off (ext3 mode) - average of 3 runs: Hmean SeqOut Char 164787.55 ( 0.00%) 107189.06 (-34.95%) Hmean SeqOut Block 219883.89 ( 0.00%) 168870.32 (-23.20%) The reason for this regression is that clean_bdev_aliases() is slower when called for a single block because pagevec_lookup() it uses will end up iterating through the radix tree until it finds a page (which may take a while) but we are only interested whether there's a page at a particular index. Fix the problem by using pagevec_lookup_range() instead which avoids the needless iteration. Fixes: e64855c6cfaa ("fs: Add helper to clean bdev aliases under a bh and use it") Link: http://lkml.kernel.org/r/20170726114704.7626-5-jack@suse.cz Signed-off-by: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b947cee4b96306037e166ff1ea5156c0ecdd7d91 Author: Jan Kara Date: Wed Sep 6 16:21:21 2017 -0700 mm: implement find_get_pages_range() Implement a variant of find_get_pages() that stops iterating at given index. This may be substantial performance gain if the mapping is sparse. See following commit for details. Furthermore 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() function. Link: http://lkml.kernel.org/r/20170726114704.7626-4-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 12 ++++++++++-- include/linux/pagevec.h | 13 +++++++++++-- mm/filemap.c | 42 ++++++++++++++++++++++++++++++------------ mm/swap.c | 22 ++++++++++++++-------- 4 files changed, 65 insertions(+), 24 deletions(-) commit d72dc8a25afc71ce90ee92bdd77550e9beb85d4d Author: Jan Kara Date: Wed Sep 6 16:21:18 2017 -0700 mm: make pagevec_lookup() update index Make pagevec_lookup() (and underlying find_get_pages()) update index to the next page where iteration should continue. Most callers want this and also pagevec_lookup_tag() already does this. Link: http://lkml.kernel.org/r/20170726114704.7626-3-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 10 ++++------ fs/ext4/file.c | 4 +--- fs/ext4/inode.c | 8 ++------ fs/fscache/page.c | 5 ++--- fs/hugetlbfs/inode.c | 17 ++++++++--------- fs/nilfs2/page.c | 3 +-- fs/ramfs/file-nommu.c | 2 +- include/linux/pagemap.h | 2 +- include/linux/pagevec.h | 2 +- mm/filemap.c | 11 ++++++++--- mm/swap.c | 5 +++-- 11 files changed, 32 insertions(+), 37 deletions(-) commit 26b433d0da062d6e19d75350c0171d3cf8ff560d Author: Jan Kara Date: Wed Sep 6 16:21:15 2017 -0700 fscache: remove unused ->now_uncached callback Patch series "Ranged pagevec lookup", v2. In this series I make pagevec_lookup() update the index (to be consistent with pagevec_lookup_tag() and also as a preparation for ranged lookups), provide ranged variant of pagevec_lookup() and use it in places where it makes sense. This not only removes some common code but is also a measurable performance win for some use cases (see patch 4/10) where radix tree is sparse and searching & grabing of a page after the end of the range has measurable overhead. This patch (of 10): The callback doesn't ever get called. Remove it. Link: http://lkml.kernel.org/r/20170726114704.7626-2-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/caching/netfs-api.txt | 2 -- fs/9p/cache.c | 29 ----------------- fs/afs/cache.c | 43 ------------------------- fs/ceph/cache.c | 31 ------------------ fs/cifs/cache.c | 31 ------------------ fs/nfs/fscache-index.c | 40 ----------------------- include/linux/fscache.h | 9 ------ 7 files changed, 185 deletions(-) commit db73ee0d463799223244e96e7b7eea73b4a6ec31 Author: Michal Hocko Date: Wed Sep 6 16:21:11 2017 -0700 mm, vmscan: do not loop on too_many_isolated for ever Tetsuo Handa has reported[1][2][3] that direct reclaimers might get stuck in too_many_isolated loop basically for ever because the last few pages on the LRU lists are isolated by the kswapd which is stuck on fs locks when doing the pageout or slab reclaim. This in turn means that there is nobody to actually trigger the oom killer and the system is basically unusable. too_many_isolated has been introduced by commit 35cd78156c49 ("vmscan: throttle direct reclaim when too many pages are isolated already") to prevent from pre-mature oom killer invocations because back then no reclaim progress could indeed trigger the OOM killer too early. But since the oom detection rework in commit 0a0337e0d1d1 ("mm, oom: rework oom detection") the allocation/reclaim retry loop considers all the reclaimable pages and throttles the allocation at that layer so we can loosen the direct reclaim throttling. Make shrink_inactive_list loop over too_many_isolated bounded and returns immediately when the situation hasn't resolved after the first sleep. Replace congestion_wait by a simple schedule_timeout_interruptible because we are not really waiting on the IO congestion in this path. Please note that this patch can theoretically cause the OOM killer to trigger earlier while there are many pages isolated for the reclaim which makes progress only very slowly. This would be obvious from the oom report as the number of isolated pages are printed there. If we ever hit this should_reclaim_retry should consider those numbers in the evaluation in one way or another. [1] http://lkml.kernel.org/r/201602092349.ACG81273.OSVtMJQHLOFOFF@I-love.SAKURA.ne.jp [2] http://lkml.kernel.org/r/201702212335.DJB30777.JOFMHSFtVLQOOF@I-love.SAKURA.ne.jp [3] http://lkml.kernel.org/r/201706300914.CEH95859.FMQOLVFHJFtOOS@I-love.SAKURA.ne.jp [mhocko@suse.com: switch to uninterruptible sleep] Link: http://lkml.kernel.org/r/20170724065048.GB25221@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20170710074842.23175-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Tested-by: Tetsuo Handa Acked-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Rik van Riel Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 77ff465799c60294e248000cd22ae8171da3304c Author: Hui Zhu Date: Wed Sep 6 16:21:08 2017 -0700 zsmalloc: zs_page_migrate: skip unnecessary loops but not return -EBUSY if zspage is not inuse Getting -EBUSY from zs_page_migrate will make migration slow (retry) or fail (zs_page_putback will schedule_work free_work, but it cannot ensure the success). I noticed this issue because my Kernel patched (https://lkml.org/lkml/2014/5/28/113) that will remove retry in __alloc_contig_migrate_range. This retry will handle the -EBUSY because it will re-isolate the page and re-call migrate_pages. Without it will make cma_alloc fail at once with -EBUSY. According to the review from Minchan Kim in https://lkml.org/lkml/2014/5/28/113, I update the patch to skip unnecessary loops but not return -EBUSY if zspage is not inuse. Following is what I got with highalloc-performance in a vbox with 2 cpu 1G memory 512 zram as swap. And the swappiness is set to 100. ori ne orig new Minor Faults 50805113 50830235 Major Faults 43918 56530 Swap Ins 42087 55680 Swap Outs 89718 104700 Allocation stalls 0 0 DMA allocs 57787 52364 DMA32 allocs 47964599 48043563 Normal allocs 0 0 Movable allocs 0 0 Direct pages scanned 45493 23167 Kswapd pages scanned 1565222 1725078 Kswapd pages reclaimed 1342222 1503037 Direct pages reclaimed 45615 25186 Kswapd efficiency 85% 87% Kswapd velocity 1897.101 1949.042 Direct efficiency 100% 108% Direct velocity 55.139 26.175 Percentage direct scans 2% 1% Zone normal velocity 1952.240 1975.217 Zone dma32 velocity 0.000 0.000 Zone dma velocity 0.000 0.000 Page writes by reclaim 89764.000 105233.000 Page writes file 46 533 Page writes anon 89718 104700 Page reclaim immediate 21457 3699 Sector Reads 3259688 3441368 Sector Writes 3667252 3754836 Page rescued immediate 0 0 Slabs scanned 1042872 1160855 Direct inode steals 8042 10089 Kswapd inode steals 54295 29170 Kswapd skipped wait 0 0 THP fault alloc 175 154 THP collapse alloc 226 289 THP splits 0 0 THP fault fallback 11 14 THP collapse fail 3 2 Compaction stalls 536 646 Compaction success 322 358 Compaction failures 214 288 Page migrate success 119608 111063 Page migrate failure 2723 2593 Compaction pages isolated 250179 232652 Compaction migrate scanned 9131832 9942306 Compaction free scanned 2093272 2613998 Compaction cost 192 189 NUMA alloc hit 47124555 47193990 NUMA alloc miss 0 0 NUMA interleave hit 0 0 NUMA alloc local 47124555 47193990 NUMA base PTE updates 0 0 NUMA huge PMD updates 0 0 NUMA page range updates 0 0 NUMA hint faults 0 0 NUMA hint local faults 0 0 NUMA hint local percent 100 100 NUMA pages migrated 0 0 AutoNUMA cost 0% 0% [akpm@linux-foundation.org: remove newline, per Minchan] Link: http://lkml.kernel.org/r/1500889535-19648-1-git-send-email-zhuhui@xiaomi.com Signed-off-by: Hui Zhu Acked-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4647706ebeee6e50f7b9f922b095f4ec94d581c3 Author: Mel Gorman Date: Wed Sep 6 16:21:05 2017 -0700 mm: always flush VMA ranges affected by zap_page_range Nadav Amit report zap_page_range only specifies that the caller protect the VMA list but does not specify whether it is held for read or write with callers using either. madvise holds mmap_sem for read meaning that a parallel zap operation can unmap PTEs which are then potentially skipped by madvise which potentially returns with stale TLB entries present. While the API could be extended, it would be a difficult API to use. This patch causes zap_page_range() to always consider flushing the full affected range. For small ranges or sparsely populated mappings, this may result in one additional spurious TLB flush. For larger ranges, it is possible that the TLB has already been flushed and the overhead is negligible. Either way, this approach is safer overall and avoids stale entries being present when madvise returns. This can be illustrated with the following program provided by Nadav Amit and slightly modified. With the patch applied, it has an exit code of 0 indicating a stale TLB entry did not leak to userspace. ---8<--- volatile int sync_step = 0; volatile char *p; static inline unsigned long rdtsc() { unsigned long hi, lo; __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); return lo | (hi << 32); } static inline void wait_rdtsc(unsigned long cycles) { unsigned long tsc = rdtsc(); while (rdtsc() - tsc < cycles); } void *big_madvise_thread(void *ign) { sync_step = 1; while (sync_step != 2); madvise((void*)p, PAGE_SIZE * N_PAGES, MADV_DONTNEED); } int main(void) { pthread_t aux_thread; p = mmap(0, PAGE_SIZE * N_PAGES, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); memset((void*)p, 8, PAGE_SIZE * N_PAGES); pthread_create(&aux_thread, NULL, big_madvise_thread, NULL); while (sync_step != 1); *p = 8; // Cache in TLB sync_step = 2; wait_rdtsc(100000); madvise((void*)p, PAGE_SIZE, MADV_DONTNEED); printf("data: %d (%s)\n", *p, (*p == 8 ? "stale, broken" : "cleared, fine")); return *p == 8 ? -1 : 0; } ---8<--- Link: http://lkml.kernel.org/r/20170725101230.5v7gvnjmcnkzzql3@techsingularity.net Signed-off-by: Mel Gorman Reported-by: Nadav Amit Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 9b19df292c666b57c407fed2496827c6aba05be2 Author: Punit Agrawal Date: Wed Sep 6 16:21:01 2017 -0700 mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour When walking the page tables to resolve an address that points to !p*d_present() entry, huge_pte_offset() returns inconsistent values depending on the level of page table (PUD or PMD). It returns NULL in the case of a PUD entry while in the case of a PMD entry, it returns a pointer to the page table entry. A similar inconsitency exists when handling swap entries - returns NULL for a PUD entry while a pointer to the pte_t is retured for the PMD entry. Update huge_pte_offset() to make the behaviour consistent - return a pointer to the pte_t for hugepage or swap entries. Only return NULL in instances where we have a p*d_none() entry and the size parameter doesn't match the hugepage size at this level of the page table. Document the behaviour to clarify the expected behaviour of this function. This is to set clear semantics for architecture specific implementations of huge_pte_offset(). Discussions on the arm64 implementation of huge_pte_offset() (http://www.spinics.net/lists/linux-mm/msg133699.html) showed that there is benefit from returning a pte_t* in the case of p*d_none(). The fault handling code in hugetlb_fault() can handle p*d_none() entries and saves an extra round trip to huge_pte_alloc(). Other callers of huge_pte_offset() should be ok as well. [punit.agrawal@arm.com: v2] Link: http://lkml.kernel.org/r/20170725154114.24131-2-punit.agrawal@arm.com Signed-off-by: Punit Agrawal Reviewed-by: Catalin Marinas Reviewed-by: Mike Kravetz Reviewed-by: Catalin Marinas Acked-by: Michal Hocko Cc: Naoya Horiguchi Cc: Steve Capper Cc: Will Deacon Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 09180ca4b3bc7b1ffdbae62a75f716dfc0685861 Author: Oliver O'Halloran Date: Wed Sep 6 16:20:58 2017 -0700 mm/gup: make __gup_device_* require THP These functions are the only bits of generic code that use {pud,pmd}_pfn() without checking for CONFIG_TRANSPARENT_HUGEPAGE. This works fine on x86, the only arch with devmap support, since the *_pfn() functions are always defined there, but this isn't true for every architecture. Link: http://lkml.kernel.org/r/20170626063833.11094-1-oohall@gmail.com Signed-off-by: Oliver O'Halloran Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dba58d3b8c5045ad89c1c95d33d01451e3964db7 Author: Mike Kravetz Date: Wed Sep 6 16:20:55 2017 -0700 mm/mremap: fail map duplication attempts for private mappings mremap will attempt to create a 'duplicate' mapping if old_size == 0 is specified. In the case of private mappings, mremap will actually create a fresh separate private mapping unrelated to the original. This does not fit with the design semantics of mremap as the intention is to create a new mapping based on the original. Therefore, return EINVAL in the case where an attempt is made to duplicate a private mapping. Also, print a warning message (once) if such an attempt is made. Link: http://lkml.kernel.org/r/cb9d9f6a-7095-582f-15a5-62643d65c736@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Cc: Andrea Arcangeli Cc: Aaron Lu Cc: "Kirill A . Shutemov" Cc: Vlastimil Babka Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mremap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 10903027948d768d9639b31e9a555802e2dabafc Author: Vlastimil Babka Date: Wed Sep 6 16:20:51 2017 -0700 mm, page_owner: don't grab zone->lock for init_pages_in_zone() init_pages_in_zone() is run under zone->lock, which means a long lock time and disabled interrupts on large machines. This is currently not an issue since it runs early in boot, but a later patch will change that. However, like other pfn scanners, we don't actually need zone->lock even when other cpus are running. The only potentially dangerous operation here is reading bogus buddy page owner due to race, and we already know how to handle that. The worst that can happen is that we skip some early allocated pages, which should not affect the debugging power of page_owner noticeably. Link: http://lkml.kernel.org/r/20170720134029.25268-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Mel Gorman Cc: Yang Shi Cc: Laura Abbott Cc: Vinayak Menon Cc: zhong jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 0fc542b7dd90a7080fc1a8c846d13a4ddad509ba Author: Vlastimil Babka Date: Wed Sep 6 16:20:48 2017 -0700 mm, page_ext: periodically reschedule during page_ext_init() page_ext_init() can take long on large machines, so add a cond_resched() point after each section is processed. This will allow moving the init to a later point at boot without triggering lockup reports. Link: http://lkml.kernel.org/r/20170720134029.25268-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Mel Gorman Cc: Yang Shi Cc: Laura Abbott Cc: Vinayak Menon Cc: zhong jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_ext.c | 1 + 1 file changed, 1 insertion(+) commit dab4ead1a9d88361c85a8209c7e23a8fd124e8d7 Author: Vlastimil Babka Date: Wed Sep 6 16:20:44 2017 -0700 mm, page_owner: make init_pages_in_zone() faster In init_pages_in_zone() we currently use the generic set_page_owner() function to initialize page_owner info for early allocated pages. This means we needlessly do lookup_page_ext() twice for each page, and more importantly save_stack(), which has to unwind the stack and find the corresponding stack depot handle. Because the stack is always the same for the initialization, unwind it once in init_pages_in_zone() and reuse the handle. Also avoid the repeated lookup_page_ext(). This can significantly reduce boot times with page_owner=on on large machines, especially for kernels built without frame pointer, where the stack unwinding is noticeably slower. [vbabka@suse.cz: don't duplicate code of __set_page_owner(), per Michal Hocko] [akpm@linux-foundation.org: coding-style fixes] [vbabka@suse.cz: create statically allocated fake stack trace for early allocated pages, per Michal] Link: http://lkml.kernel.org/r/45813564-2342-fc8d-d31a-f4b68a724325@suse.cz Link: http://lkml.kernel.org/r/20170720134029.25268-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Mel Gorman Cc: Yang Shi Cc: Laura Abbott Cc: Vinayak Menon Cc: zhong jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit b95046b0472f7a805fa28fbcfc7205a76ff7a7d0 Author: Michal Hocko Date: Wed Sep 6 16:20:41 2017 -0700 mm, sparse, page_ext: drop ugly N_HIGH_MEMORY branches for allocations Commit f52407ce2dea ("memory hotplug: alloc page from other node in memory online") has introduced N_HIGH_MEMORY checks to only use NUMA aware allocations when there is some memory present because the respective node might not have any memory yet at the time and so it could fail or even OOM. Things have changed since then though. Zonelists are now always initialized before we do any allocations even for hotplug (see 959ecc48fc75 ("mm/memory_hotplug.c: fix building of node hotplug zonelist")). Therefore these checks are not really needed. In fact caller of the allocator should never care about whether the node is populated because that might change at any time. Link: http://lkml.kernel.org/r/20170721143915.14161-10-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Shaohua Li Cc: Joonsoo Kim Cc: Johannes Weiner Cc: Mel Gorman Cc: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_ext.c | 5 +---- mm/sparse-vmemmap.c | 11 +++-------- mm/sparse.c | 10 +++------- 3 files changed, 7 insertions(+), 19 deletions(-) commit b93e0f329e24f3615aa551fd9b99a75fb7c9195f Author: Michal Hocko Date: Wed Sep 6 16:20:37 2017 -0700 mm, memory_hotplug: get rid of zonelists_mutex zonelists_mutex was introduced by commit 4eaf3f64397c ("mem-hotplug: fix potential race while building zonelist for new populated zone") to protect zonelist building from races. This is no longer needed though because both memory online and offline are fully serialized. New users have grown since then. Notably setup_per_zone_wmarks wants to prevent from races between memory hotplug, khugepaged setup and manual min_free_kbytes update via sysctl (see cfd3da1e49bb ("mm: Serialize access to min_free_kbytes"). Let's add a private lock for that purpose. This will not prevent from seeing halfway through memory hotplug operation but that shouldn't be a big deal becuse memory hotplug will update watermarks explicitly so we will eventually get a full picture. The lock just makes sure we won't race when updating watermarks leading to weird results. Also __build_all_zonelists manipulates global data so add a private lock for it as well. This doesn't seem to be necessary today but it is more robust to have a lock there. While we are at it make sure we document that memory online/offline depends on a full serialization either via mem_hotplug_begin() or device_lock. Link: http://lkml.kernel.org/r/20170721143915.14161-9-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Cc: Toshi Kani Cc: Vlastimil Babka Cc: Haicheng Li Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 1 - mm/memory_hotplug.c | 12 ++---------- mm/page_alloc.c | 18 +++++++++--------- 3 files changed, 11 insertions(+), 20 deletions(-) commit 11cd8638c37f6c400cc472cc52b6eccb505aba6e Author: Michal Hocko Date: Wed Sep 6 16:20:34 2017 -0700 mm, page_alloc: remove stop_machine from build_all_zonelists build_all_zonelists has been (ab)using stop_machine to make sure that zonelists do not change while somebody is looking at them. This is is just a gross hack because a) it complicates the context from which we can call build_all_zonelists (see 3f906ba23689 ("mm/memory-hotplug: switch locking to a percpu rwsem")) and b) is is not really necessary especially after "mm, page_alloc: simplify zonelist initialization" and c) it doesn't really provide the protection it claims (see below). Updates of the zonelists happen very seldom, basically only when a zone becomes populated during memory online or when it loses all the memory during offline. A racing iteration over zonelists could either miss a zone or try to work on one zone twice. Both of these are something we can live with occasionally because there will always be at least one zone visible so we are not likely to fail allocation too easily for example. Please note that the original stop_machine approach doesn't really provide a better exclusion because the iteration might be interrupted half way (unless the whole iteration is preempt disabled which is not the case in most cases) so the some zones could still be seen twice or a zone missed. I have run the pathological online/offline of the single memblock in the movable zone while stressing the same small node with some memory pressure. Node 1, zone DMA pages free 0 min 0 low 0 high 0 spanned 0 present 0 managed 0 protection: (0, 943, 943, 943) Node 1, zone DMA32 pages free 227310 min 8294 low 10367 high 12440 spanned 262112 present 262112 managed 241436 protection: (0, 0, 0, 0) Node 1, zone Normal pages free 0 min 0 low 0 high 0 spanned 0 present 0 managed 0 protection: (0, 0, 0, 1024) Node 1, zone Movable pages free 32722 min 85 low 117 high 149 spanned 32768 present 32768 managed 32768 protection: (0, 0, 0, 0) root@test1:/sys/devices/system/node/node1# while true do echo offline > memory34/state echo online_movable > memory34/state done root@test1:/mnt/data/test/linux-3.7-rc5# numactl --preferred=1 make -j4 and it survived without any unexpected behavior. While this is not really a great testing coverage it should exercise the allocation path quite a lot. Link: http://lkml.kernel.org/r/20170721143915.14161-8-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Cc: Toshi Kani Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9d3be21bf9c0b849a13e6b51e9c2ce7ccdf50851 Author: Michal Hocko Date: Wed Sep 6 16:20:30 2017 -0700 mm, page_alloc: simplify zonelist initialization build_zonelists gradually builds zonelists from the nearest to the most distant node. As we do not know how many populated zones we will have in each node we rely on the _zoneref to terminate initialized part of the zonelist by a NULL zone. While this is functionally correct it is quite suboptimal because we cannot allow updaters to race with zonelists users because they could see an empty zonelist and fail the allocation or hit the OOM killer in the worst case. We can do much better, though. We can store the node ordering into an already existing node_order array and then give this array to build_zonelists_in_node_order and do the whole initialization at once. zonelists consumers still might see halfway initialized state but that should be much more tolerateable because the list will not be empty and they would either see some zone twice or skip over some zone(s) in the worst case which shouldn't lead to immediate failures. While at it let's simplify build_zonelists_node which is rather confusing now. It gets an index into the zoneref array and returns the updated index for the next iteration. Let's rename the function to build_zonerefs_node to better reflect its purpose and give it zoneref array to update. The function doesn't the index anymore. It just returns the number of added zones so that the caller can advance the zonered array start for the next update. This patch alone doesn't introduce any functional change yet, though, it is merely a preparatory work for later changes. Link: http://lkml.kernel.org/r/20170721143915.14161-7-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Cc: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 81 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) commit 34ad1296571f7a004a761e3afc18e79428a726a8 Author: Michal Hocko Date: Wed Sep 6 16:20:27 2017 -0700 mm, memory_hotplug: remove explicit build_all_zonelists from try_online_node try_online_node calls hotadd_new_pgdat which already calls build_all_zonelists. So the additional call is redundant. Even though hotadd_new_pgdat will only initialize zonelists of the new node this is the right thing to do because such a node doesn't have any memory so other zonelists would ignore all the zones from this node anyway. Link: http://lkml.kernel.org/r/20170721143915.14161-6-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Toshi Kani Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 7 ------- 1 file changed, 7 deletions(-) commit 72675e131eb418c78980c1e683c0c25a25b61221 Author: Michal Hocko Date: Wed Sep 6 16:20:24 2017 -0700 mm, memory_hotplug: drop zone from build_all_zonelists build_all_zonelists gets a zone parameter to initialize zone's pagesets. There is only a single user which gives a non-NULL zone parameter and that one doesn't really need the rest of the build_all_zonelists (see commit 6dcd73d7011b ("memory-hotplug: allocate zone's pcp before onlining pages")). Therefore remove setup_zone_pageset from build_all_zonelists and call it from its only user directly. This will also remove a pointless zonlists rebuilding which is always good. Link: http://lkml.kernel.org/r/20170721143915.14161-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Cc: Toshi Kani Cc: Wen Congyang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 +- init/main.c | 2 +- mm/internal.h | 1 + mm/memory_hotplug.c | 10 +++++----- mm/page_alloc.c | 13 +++---------- 5 files changed, 11 insertions(+), 17 deletions(-) commit d9c9a0b9729c35c96ef7bee4ded56d9441bebd58 Author: Michal Hocko Date: Wed Sep 6 16:20:20 2017 -0700 mm, page_alloc: do not set_cpu_numa_mem on empty nodes initialization __build_all_zonelists reinitializes each online cpu local node for CONFIG_HAVE_MEMORYLESS_NODES. This makes sense because previously memory less nodes could gain some memory during memory hotplug and so the local node should be changed for CPUs close to such a node. It makes less sense to do that unconditionally for a newly creaded NUMA node which is still offline and without any memory. Let's also simplify the cpu loop and use for_each_online_cpu instead of an explicit cpu_online check for all possible cpus. Link: http://lkml.kernel.org/r/20170721143915.14161-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Shaohua Li Cc: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit afb6ebb3faeb382f7c8b4478f2a84cee37bb8610 Author: Michal Hocko Date: Wed Sep 6 16:20:17 2017 -0700 mm, page_alloc: remove boot pageset initialization from memory hotplug boot_pageset is a boot time hack which gets superseded by normal pagesets later in the boot process. It makes zero sense to reinitialize it again and again during memory hotplug. Link: http://lkml.kernel.org/r/20170721143915.14161-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Shaohua Li Cc: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit c9bff3eebc09be23fbc868f5e6731666d23cbea3 Author: Michal Hocko Date: Wed Sep 6 16:20:13 2017 -0700 mm, page_alloc: rip out ZONELIST_ORDER_ZONE Patch series "cleanup zonelists initialization", v1. This is aimed at cleaning up the zonelists initialization code we have but the primary motivation was bug report [2] which got resolved but the usage of stop_machine is just too ugly to live. Most patches are straightforward but 3 of them need a special consideration. Patch 1 removes zone ordered zonelists completely. I am CCing linux-api because this is a user visible change. As I argue in the patch description I do not think we have a strong usecase for it these days. I have kept sysctl in place and warn into the log if somebody tries to configure zone lists ordering. If somebody has a real usecase for it we can revert this patch but I do not expect anybody will actually notice runtime differences. This patch is not strictly needed for the rest but it made patch 6 easier to implement. Patch 7 removes stop_machine from build_all_zonelists without adding any special synchronization between iterators and updater which I _believe_ is acceptable as explained in the changelog. I hope I am not missing anything. Patch 8 then removes zonelists_mutex which is kind of ugly as well and not really needed AFAICS but a care should be taken when double checking my thinking. This patch (of 9): Supporting zone ordered zonelists costs us just a lot of code while the usefulness is arguable if existent at all. Mel has already made node ordering default on 64b systems. 32b systems are still using ZONELIST_ORDER_ZONE because it is considered better to fallback to a different NUMA node rather than consume precious lowmem zones. This argument is, however, weaken by the fact that the memory reclaim has been reworked to be node rather than zone oriented. This means that lowmem requests have to skip over all highmem pages on LRUs already and so zone ordering doesn't save the reclaim time much. So the only advantage of the zone ordering is under a light memory pressure when highmem requests do not ever hit into lowmem zones and the lowmem pressure doesn't need to reclaim. Considering that 32b NUMA systems are rather suboptimal already and it is generally advisable to use 64b kernel on such a HW I believe we should rather care about the code maintainability and just get rid of ZONELIST_ORDER_ZONE altogether. Keep systcl in place and warn if somebody tries to set zone ordering either from kernel command line or the sysctl. [mhocko@suse.com: reading vm.numa_zonelist_order will never terminate] Link: http://lkml.kernel.org/r/20170721143915.14161-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Shaohua Li Cc: Toshi Kani Cc: Abdul Haleem Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/sysctl/vm.txt | 4 +- Documentation/vm/numa | 7 +- include/linux/mmzone.h | 2 +- mm/page_alloc.c | 179 +++--------------------- 5 files changed, 28 insertions(+), 166 deletions(-) commit 5a47074f0279421778f97b1b1e75686696a5f42a Author: Minchan Kim Date: Wed Sep 6 16:20:10 2017 -0700 zram: add config and doc file for writeback feature This patch adds document and kconfig for using of writeback feature. Link: http://lkml.kernel.org/r/1498459987-24562-10-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/testing/sysfs-block-zram | 8 ++++++++ Documentation/blockdev/zram.txt | 11 +++++++++++ drivers/block/zram/Kconfig | 12 ++++++++++++ 3 files changed, 31 insertions(+) commit 8e654f8fbff52ac483fb69957222853d7e2fc588 Author: Minchan Kim Date: Wed Sep 6 16:20:07 2017 -0700 zram: read page from backing device This patch enables read IO from backing device. For the feature, it implements two IO read functions to transfer data from backing storage. One is asynchronous IO function and other is synchronous one. A reason I need synchrnous IO is due to partial write which need to complete read IO before the overwriting partial data. We can make the partial IO's case asynchronous, too but at the moment, I don't feel adding more complexity to support such rare use cases so want to go with simple. [xieyisheng1@huawei.com: read_from_bdev_async(): return 1 to avoid call page_endio() in zram_rw_page()] Link: http://lkml.kernel.org/r/1502707447-6944-1-git-send-email-xieyisheng1@huawei.com Link: http://lkml.kernel.org/r/1498459987-24562-9-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Signed-off-by: Yisheng Xie Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 123 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 5 deletions(-) commit db8ffbd4e7634cc537c8d32e73e7ce0f06248645 Author: Minchan Kim Date: Wed Sep 6 16:20:03 2017 -0700 zram: write incompressible pages to backing device This patch enables write IO to transfer data to backing device. For that, it implements write_to_bdev function which creates new bio and chaining with parent bio to make the parent bio asynchrnous. For rw_page which don't have parent bio, it submit owned bio and handle IO completion by zram_page_end_io. Also, this patch defines new flag ZRAM_WB to mark written page for later read IO. [xieyisheng1@huawei.com: fix typo in comment] Link: http://lkml.kernel.org/r/1502707447-6944-2-git-send-email-xieyisheng1@huawei.com Link: http://lkml.kernel.org/r/1498459987-24562-8-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Signed-off-by: Yisheng Xie Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 113 +++++++++++++++++++++++++++++++++++++----- drivers/block/zram/zram_drv.h | 3 +- 2 files changed, 103 insertions(+), 13 deletions(-) commit ae85a8075c5b025b9d503554ddc480a346a24536 Author: Minchan Kim Date: Wed Sep 6 16:20:00 2017 -0700 zram: identify asynchronous IO's return value For upcoming asynchronous IO like writeback, zram_rw_page should be aware of that whether requested IO was completed or submitted successfully, otherwise error. For the goal, zram_bvec_rw has three return values. -errno: returns error number 0: IO request is done synchronously 1: IO request is issued successfully. Link: http://lkml.kernel.org/r/1498459987-24562-7-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 1363d4662a0d28dfdb81ef426c88c9a8dbf7c338 Author: Minchan Kim Date: Wed Sep 6 16:19:57 2017 -0700 zram: add free space management in backing device With backing device, zram needs management of free space of backing device. This patch adds bitmap logic to manage free space which is very naive. However, it would be simple enough as considering uncompressible pages's frequenty in zram. Link: http://lkml.kernel.org/r/1498459987-24562-6-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 48 ++++++++++++++++++++++++++++++++++++++++++- drivers/block/zram/zram_drv.h | 3 +++ 2 files changed, 50 insertions(+), 1 deletion(-) commit 013bf95a83ec760a2afc37fabd6bf13a9cdae205 Author: Minchan Kim Date: Wed Sep 6 16:19:54 2017 -0700 zram: add interface to specif backing device For writeback feature, user should set up backing device before the zram working. This patch enables the interface via /sys/block/zramX/backing_dev. Currently, it supports block device only but it could be enhanced for file as well. Link: http://lkml.kernel.org/r/1498459987-24562-5-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 142 ++++++++++++++++++++++++++++++++++++++++++ drivers/block/zram/zram_drv.h | 5 ++ 2 files changed, 147 insertions(+) commit 693dc1ce25b8c8fa33f930d47cd8f926eeb90812 Author: Minchan Kim Date: Wed Sep 6 16:19:50 2017 -0700 zram: rename zram_decompress_page to __zram_bvec_read zram_decompress_page naming is not proper because it doesn't decompress if page was dedup hit or stored with compression. Use more abstract term and consistent with write path function __zram_bvec_write. Link: http://lkml.kernel.org/r/1498459987-24562-4-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 97ec7c8bd5d029b2c3e40355c1204197094e9ba1 Author: Minchan Kim Date: Wed Sep 6 16:19:47 2017 -0700 zram: inline zram_compress zram_compress does several things, compress, entry alloc and check limitation. I did for just readbility but it hurts modulization.:( So this patch removes zram_compress functions and inline it in __zram_bvec_write for upcoming patches. Link: http://lkml.kernel.org/r/1498459987-24562-3-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Juneho Choi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 64 +++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 42 deletions(-) commit 4ebbe7f7fc99260afd51759e35dbfdd6010dc697 Author: Minchan Kim Date: Wed Sep 6 16:19:44 2017 -0700 zram: clean up duplicated codes in __zram_bvec_write Patch series "writeback incompressible pages to storage", v1. zRam is useful for memory saving with compressible pages but sometime, workload can be changed and system has lots of incompressible pages which is very harmful for zram. This patch supports writeback feature of zram so admin can set up a block device and with it, zram can save the memory via writing out the incompressile pages once it found it's incompressible pages (1/4 comp ratio) instead of keeping the page in memory. [1-3] is just clean up and [4-8] is step by step feature enablement. [4-8] is logically not bisectable(ie, logical unit separation) although I tried to compiled out without breaking but I think it would be better to review. This patch (of 9): __zram_bvec_write has some of duplicated logic for zram meta data handling of same_page|compressed_page. This patch aims to clean it up without behavior change. [xieyisheng1@huawei.com: fix compr_data_size stat] Link: http://lkml.kernel.org/r/1502707447-6944-1-git-send-email-xieyisheng1@huawei.com Link: http://lkml.kernel.org/r/1496019048-27016-1-git-send-email-minchan@kernel.org Link: http://lkml.kernel.org/r/1498459987-24562-2-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Signed-off-by: Yisheng Xie Reviewed-by: Sergey Senozhatsky Cc: Juneho Choi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 56 ++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 33 deletions(-) commit c6f03e2903c9ecd8fd709a5b3fa8cf0a8ae0b3da Author: Michal Hocko Date: Wed Sep 6 16:19:40 2017 -0700 mm, memory_hotplug: remove zone restrictions Historically we have enforced that any kernel zone (e.g ZONE_NORMAL) has to precede the Movable zone in the physical memory range. The purpose of the movable zone is, however, not bound to any physical memory restriction. It merely defines a class of migrateable and reclaimable memory. There are users (e.g. CMA) who might want to reserve specific physical memory ranges for their own purpose. Moreover our pfn walkers have to be prepared for zones overlapping in the physical range already because we do support interleaving NUMA nodes and therefore zones can interleave as well. This means we can allow each memory block to be associated with a different zone. Loosen the current onlining semantic and allow explicit onlining type on any memblock. That means that online_{kernel,movable} will be allowed regardless of the physical address of the memblock as long as it is offline of course. This might result in moveble zone overlapping with other kernel zones. Default onlining then becomes a bit tricky but still sensible. echo online > memoryXY/state will online the given block to 1) the default zone if the given range is outside of any zone 2) the enclosing zone if such a zone doesn't interleave with any other zone 3) the default zone if more zones interleave for this range where default zone is movable zone only if movable_node is enabled otherwise it is a kernel zone. Here is an example of the semantic with (movable_node is not present but it work in an analogous way). We start with following memblocks, all of them offline: memory34/valid_zones:Normal Movable memory35/valid_zones:Normal Movable memory36/valid_zones:Normal Movable memory37/valid_zones:Normal Movable memory38/valid_zones:Normal Movable memory39/valid_zones:Normal Movable memory40/valid_zones:Normal Movable memory41/valid_zones:Normal Movable Now, we online block 34 in default mode and block 37 as movable root@test1:/sys/devices/system/node/node1# echo online > memory34/state root@test1:/sys/devices/system/node/node1# echo online_movable > memory37/state memory34/valid_zones:Normal memory35/valid_zones:Normal Movable memory36/valid_zones:Normal Movable memory37/valid_zones:Movable memory38/valid_zones:Normal Movable memory39/valid_zones:Normal Movable memory40/valid_zones:Normal Movable memory41/valid_zones:Normal Movable As we can see all other blocks can still be onlined both into Normal and Movable zones and the Normal is default because the Movable zone spans only block37 now. root@test1:/sys/devices/system/node/node1# echo online_movable > memory41/state memory34/valid_zones:Normal memory35/valid_zones:Normal Movable memory36/valid_zones:Normal Movable memory37/valid_zones:Movable memory38/valid_zones:Movable Normal memory39/valid_zones:Movable Normal memory40/valid_zones:Movable Normal memory41/valid_zones:Movable Now the default zone for blocks 37-41 has changed because movable zone spans that range. root@test1:/sys/devices/system/node/node1# echo online_kernel > memory39/state memory34/valid_zones:Normal memory35/valid_zones:Normal Movable memory36/valid_zones:Normal Movable memory37/valid_zones:Movable memory38/valid_zones:Normal Movable memory39/valid_zones:Normal memory40/valid_zones:Movable Normal memory41/valid_zones:Movable Note that the block 39 now belongs to the zone Normal and so block38 falls into Normal by default as well. For completness root@test1:/sys/devices/system/node/node1# for i in memory[34]? do echo online > $i/state 2>/dev/null done memory34/valid_zones:Normal memory35/valid_zones:Normal memory36/valid_zones:Normal memory37/valid_zones:Movable memory38/valid_zones:Normal memory39/valid_zones:Normal memory40/valid_zones:Movable memory41/valid_zones:Movable Implementation wise the change is quite straightforward. We can get rid of allow_online_pfn_range altogether. online_pages allows only offline nodes already. The original default_zone_for_pfn will become default_kernel_zone_for_pfn. New default_zone_for_pfn implements the above semantic. zone_for_pfn_range is slightly reorganized to implement kernel and movable online type explicitly and MMOP_ONLINE_KEEP becomes a catch all default behavior. Link: http://lkml.kernel.org/r/20170714121233.16861-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Joonsoo Kim Acked-by: Vlastimil Babka Acked-by: Reza Arbab Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Kani Toshimitsu Cc: Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Wei Yang Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 3 --- mm/memory_hotplug.c | 74 ++++++++++++++++----------------------------------- 2 files changed, 23 insertions(+), 54 deletions(-) commit e5e68930263377c6d4f6da0ff06f36b55d83a83f Author: Michal Hocko Date: Wed Sep 6 16:19:37 2017 -0700 mm, memory_hotplug: display allowed zones in the preferred ordering Prior to commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online") we used to allow to change the valid zone types of a memory block if it is adjacent to a different zone type. This fact was reflected in memoryNN/valid_zones by the ordering of printed zones. The first one was default (echo online > memoryNN/state) and the other one could be onlined explicitly by online_{movable,kernel}. This behavior was removed by the said patch and as such the ordering was not all that important. In most cases a kernel zone would be default anyway. The only exception is movable_node handled by "mm, memory_hotplug: support movable_node for hotpluggable nodes". Let's reintroduce this behavior again because later patch will remove the zone overlap restriction and so user will be allowed to online kernel resp. movable block regardless of its placement. Original behavior will then become significant again because it would be non-trivial for users to see what is the default zone to online into. Implementation is really simple. Pull out zone selection out of move_pfn_range into zone_for_pfn_range helper and use it in show_valid_zones to display the zone for default onlining and then both kernel and movable if they are allowed. Default online zone is not duplicated. Link: http://lkml.kernel.org/r/20170714121233.16861-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Andrea Arcangeli Cc: Reza Arbab Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Kani Toshimitsu Cc: Cc: Daniel Kiper Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 33 +++++++++++++------ include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 73 ++++++++++++++++++++++++------------------ 3 files changed, 65 insertions(+), 43 deletions(-) commit c11525830f92dea58353ace0f074ece5d9ef37c8 Author: Wei Yang Date: Wed Sep 6 16:19:33 2017 -0700 mm/memory_hotplug: just build zonelist for newly added node Commit 9adb62a5df9c ("mm/hotplug: correctly setup fallback zonelists when creating new pgdat") tries to build the correct zonelist for a newly added node, while it is not necessary to rebuild it for already exist nodes. In build_zonelists(), it will iterate on nodes with memory. For a newly added node, it will have memory until node_states_set_node() is called in online_pages(). This patch avoids rebuilding the zonelists for already existing nodes. build_zonelists_node() uses managed_zone(zone) checks, so it should not include empty zones anyway. So effectively we avoid some pointless work under stop_machine(). [akpm@linux-foundation.org: tweak comment text] [akpm@linux-foundation.org: coding-style tweak, per Vlastimil] Link: http://lkml.kernel.org/r/20170626035822.50155-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Jiang Liu Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 912d572d63b8cd19c303f357b627de492bd6bdef Author: Chris Wilson Date: Wed Sep 6 16:19:30 2017 -0700 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. Link: http://lkml.kernel.org/r/20170822135325.9191-2-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Michal Hocko Cc: Johannes Weiner Cc: Hillf Danton Cc: Minchan Kim Cc: Vlastimil Babka Cc: Mel Gorman Cc: Shaohua Li Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_shrinker.c | 24 ++++++++++++++++++------ 5 files changed, 24 insertions(+), 11 deletions(-) commit d460acb5bdffc19b492b70b8f416c24dc03c474e Author: Chris Wilson Date: Wed Sep 6 16:19:26 2017 -0700 mm: track actual nr_scanned during shrink_slab() Some shrinkers may only be able to free a bunch of objects at a time, and so free more than the requested nr_to_scan in one pass. Whilst other shrinkers may find themselves even unable to scan as many objects as they counted, and so underreport. Account for the extra freed/scanned objects against the total number of objects we intend to scan, otherwise we may end up penalising the slab far more than intended. Similarly, we want to add the underperforming scan to the deferred pass so that we try harder and harder in future passes. Link: http://lkml.kernel.org/r/20170822135325.9191-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Cc: Michal Hocko Cc: Johannes Weiner Cc: Hillf Danton Cc: Minchan Kim Cc: Vlastimil Babka Cc: Mel Gorman Cc: Shaohua Li Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Joonas Lahtinen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/shrinker.h | 7 +++++++ mm/vmscan.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit ce6fa91b93630396ca220c33dd38ffc62686d499 Author: Alexander Popov Date: Wed Sep 6 16:19:22 2017 -0700 mm/slub.c: add a naive detection of double free or corruption Add an assertion similar to "fasttop" check in GNU C Library allocator as a part of SLAB_FREELIST_HARDENED feature. An object added to a singly linked freelist should not point to itself. That helps to detect some double free errors (e.g. CVE-2017-2636) without slub_debug and KASAN. Link: http://lkml.kernel.org/r/1502468246-1262-1-git-send-email-alex.popov@linux.com Signed-off-by: Alexander Popov Acked-by: Christoph Lameter Cc: Kees Cook Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Paul E McKenney Cc: Ingo Molnar Cc: Tejun Heo Cc: Andy Lutomirski Cc: Nicolas Pitre Cc: Rik van Riel Cc: Tycho Andersen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2482ddec670fb83717d129012bc558777cb159f7 Author: Kees Cook Date: Wed Sep 6 16:19:18 2017 -0700 mm: add SLUB free list pointer obfuscation This SLUB free list pointer obfuscation code is modified from Brad Spengler/PaX Team's code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. This adds a per-cache random value to SLUB caches that is XORed with their freelist pointer address and value. This adds nearly zero overhead and frustrates the very common heap overflow exploitation method of overwriting freelist pointers. A recent example of the attack is written up here: http://cyseclabs.com/blog/cve-2016-6187-heap-off-by-one-exploit and there is a section dedicated to the technique the book "A Guide to Kernel Exploitation: Attacking the Core". This is based on patches by Daniel Micay, and refactored to minimize the use of #ifdef. With 200-count cycles of "hackbench -g 20 -l 1000" I saw the following run times: before: mean 10.11882499999999999995 variance .03320378329145728642 stdev .18221905304181911048 after: mean 10.12654000000000000014 variance .04700556623115577889 stdev .21680767106160192064 The difference gets lost in the noise, but if the above is to be taken literally, using CONFIG_FREELIST_HARDENED is 0.07% slower. Link: http://lkml.kernel.org/r/20170802180609.GA66807@beast Signed-off-by: Kees Cook Suggested-by: Daniel Micay Cc: Rik van Riel Cc: Tycho Andersen Cc: Alexander Popov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 4 ++++ init/Kconfig | 9 +++++++++ mm/slub.c | 42 +++++++++++++++++++++++++++++++++++++----- 3 files changed, 50 insertions(+), 5 deletions(-) commit ea37df54d2b7950d607800ee417a1d59b95068c2 Author: Alexander Potapenko Date: Wed Sep 6 16:19:15 2017 -0700 slub: tidy up initialization ordering - free_kmem_cache_nodes() frees the cache node before nulling out a reference to it - init_kmem_cache_nodes() publishes the cache node before initializing it Neither of these matter at runtime because the cache nodes cannot be looked up by any other thread. But it's neater and more consistent to reorder these. Link: http://lkml.kernel.org/r/20170707083408.40410-1-glider@google.com Signed-off-by: Alexander Potapenko 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, 2 insertions(+), 2 deletions(-) commit 964f14a0d350486d17cfd24b3b7dc4f7c4bdc4d3 Author: Jun Piao Date: Wed Sep 6 16:19:11 2017 -0700 ocfs2: clean up some dead code clean up some unused functions and parameters. Link: http://lkml.kernel.org/r/598A5E21.2080807@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/alloc.c | 22 ++++++++-------------- fs/ocfs2/alloc.h | 3 +-- fs/ocfs2/cluster/heartbeat.c | 42 ++++-------------------------------------- fs/ocfs2/dir.c | 2 +- fs/ocfs2/file.c | 7 ------- fs/ocfs2/journal.c | 1 - fs/ocfs2/move_extents.c | 2 +- fs/ocfs2/ocfs2.h | 4 +--- fs/ocfs2/refcounttree.c | 2 +- fs/ocfs2/suballoc.c | 2 +- fs/ocfs2/super.c | 1 - fs/ocfs2/xattr.c | 2 +- 12 files changed, 19 insertions(+), 71 deletions(-) commit 01ffb56bc1cb27f0d9fd50be096446a8d1ab6354 Author: Jan Kara Date: Wed Sep 6 16:19:08 2017 -0700 ocfs2: make ocfs2_set_acl() static The function is never called outside of fs/ocfs2/acl.c. Link: http://lkml.kernel.org/r/20170801141252.19675-2-jack@suse.cz Signed-off-by: Jan Kara Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/acl.c | 2 +- fs/ocfs2/acl.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) commit 6124c04c1344497e0cbfb505ddbd3b83090a4d51 Author: Masahiro Yamada Date: Wed Sep 6 16:19:05 2017 -0700 modpost: simplify sec_name() There is code duplication between sec_name() and sech_name(). Simplify sec_name() by re-using sech_name(). Also, move them up to remove the forward declaration of sec_name(). Link: http://lkml.kernel.org/r/1502248721-22009-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Cc: Nicholas Piggin Cc: Jessica Yu Cc: Chris Metcalf Cc: Heinrich Schuchardt Cc: Ingo Molnar Cc: Ard Biesheuvel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/mod/modpost.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 2f52074d35135ecf3fb719f3430d72c17ae07287 Author: Nicolas Iooss Date: Wed Sep 6 16:19:01 2017 -0700 dax: initialize variable pfn before using it dax_pmd_insert_mapping() contains the following code: pfn_t pfn; if (bdev_dax_pgoff(bdev, sector, size, &pgoff) != 0) goto fallback; /* ... */ fallback: trace_dax_pmd_insert_mapping_fallback(inode, vmf, length, pfn, ret); When the condition in the if statement fails, the function calls trace_dax_pmd_insert_mapping_fallback() with an uninitialized pfn value. This issue has been found while building the kernel with clang. The compiler reported: fs/dax.c:1280:6: error: variable 'pfn' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (bdev_dax_pgoff(bdev, sector, size, &pgoff) != 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/dax.c:1310:60: note: uninitialized use occurs here trace_dax_pmd_insert_mapping_fallback(inode, vmf, length, pfn, ret); ^~~ Link: http://lkml.kernel.org/r/20170903083000.587-1-nicolas.iooss_linux@m4x.org Signed-off-by: Nicolas Iooss Reviewed-by: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 917f34526c4123ccd93e4373719c645c85020a5a Author: Ross Zwisler Date: Wed Sep 6 16:18:58 2017 -0700 dax: use PG_PMD_COLOUR instead of open coding Use ~PG_PMD_COLOUR in dax_entry_waitqueue() instead of open coding an equivalent page offset mask. Link: http://lkml.kernel.org/r/20170822222436.18926-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: "Slusarz, Marcin" Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit a2e050f5a9a9bd2b632d67bd06d87088e6a02dae Author: Ross Zwisler Date: Wed Sep 6 16:18:54 2017 -0700 dax: explain how read(2)/write(2) addresses are validated Add a comment explaining how the user addresses provided to read(2) and write(2) are validated in the DAX I/O path. We call dax_copy_from_iter() or copy_to_iter() on these without calling access_ok() first in the DAX code, and there was a concern that the user might be able to read/write to arbitrary kernel addresses with this path. Link: http://lkml.kernel.org/r/20170816173615.10098-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Dan Williams Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 5 +++++ 1 file changed, 5 insertions(+) commit 527b19d0808e75fbba896beb2435c2b4d6bcd32a Author: Ross Zwisler Date: Wed Sep 6 16:18:51 2017 -0700 dax: move all DAX radix tree defs to fs/dax.c Now that we no longer insert struct page pointers in DAX radix trees the page cache code no longer needs to know anything about DAX exceptional entries. Move all the DAX exceptional entry definitions from dax.h to fs/dax.c. Link: http://lkml.kernel.org/r/20170724170616.25810-6-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Suggested-by: Jan Kara Reviewed-by: Jan Kara Cc: "Darrick J. Wong" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Steven Rostedt Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 34 ++++++++++++++++++++++++++++++++++ include/linux/dax.h | 41 ----------------------------------------- 2 files changed, 34 insertions(+), 41 deletions(-) commit d01ad197ac3b50a99ea668697acefe12e73c5fea Author: Ross Zwisler Date: Wed Sep 6 16:18:47 2017 -0700 dax: remove DAX code from page_cache_tree_insert() Now that we no longer insert struct page pointers in DAX radix trees we can remove the special casing for DAX in page_cache_tree_insert(). This also allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, removing it from dax.h. Link: http://lkml.kernel.org/r/20170724170616.25810-5-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Suggested-by: Jan Kara Reviewed-by: Jan Kara Cc: "Darrick J. Wong" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Steven Rostedt Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 2 +- include/linux/dax.h | 2 -- mm/filemap.c | 13 ++----------- 3 files changed, 3 insertions(+), 14 deletions(-) commit 91d25ba8a6b0d810dc844cebeedc53029118ce3e Author: Ross Zwisler Date: Wed Sep 6 16:18:43 2017 -0700 dax: use common 4k zero page for dax mmap reads When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has three major drawbacks: 1) It consumes memory unnecessarily. For every 4k page that is read via a DAX mmap() over a hole, we allocate a new page cache page. This means that if you read 1GiB worth of pages, you end up using 1GiB of zeroed memory. This is easily visible by looking at the overall memory consumption of the system or by looking at /proc/[pid]/smaps: 7f62e72b3000-7f63272b3000 rw-s 00000000 103:00 12 /root/dax/data Size: 1048576 kB Rss: 1048576 kB Pss: 1048576 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 1048576 kB Private_Dirty: 0 kB Referenced: 1048576 kB Anonymous: 0 kB LazyFree: 0 kB AnonHugePages: 0 kB ShmemPmdMapped: 0 kB Shared_Hugetlb: 0 kB Private_Hugetlb: 0 kB Swap: 0 kB SwapPss: 0 kB KernelPageSize: 4 kB MMUPageSize: 4 kB Locked: 0 kB 2) It is slower than using a common zero page because each page fault has more work to do. Instead of just inserting a common zero page we have to allocate a page cache page, zero it, and then insert it. Here are the average latencies of dax_load_hole() as measured by ftrace on a random test box: Old method, using zeroed page cache pages: 3.4 us New method, using the common 4k zero page: 0.8 us This was the average latency over 1 GiB of sequential reads done by this simple fio script: [global] size=1G filename=/root/dax/data fallocate=none [io] rw=read ioengine=mmap 3) The fact that we had to check for both DAX exceptional entries and for page cache pages in the radix tree made the DAX code more complex. Solve these issues by following the lead of the DAX PMD code and using a common 4k zero page instead. As with the PMD code we will now insert a DAX exceptional entry into the radix tree instead of a struct page pointer which allows us to remove all the special casing in the DAX code. Note that we do still pretty aggressively check for regular pages in the DAX radix tree, especially where we take action based on the bits set in the page. If we ever find a regular page in our radix tree now that most likely means that someone besides DAX is inserting pages (which has happened lots of times in the past), and we want to find that out early and fail loudly. This solution also removes the extra memory consumption. Here is that same /proc/[pid]/smaps after 1GiB of reading from a hole with the new code: 7f2054a74000-7f2094a74000 rw-s 00000000 103:00 12 /root/dax/data Size: 1048576 kB Rss: 0 kB Pss: 0 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB Referenced: 0 kB Anonymous: 0 kB LazyFree: 0 kB AnonHugePages: 0 kB ShmemPmdMapped: 0 kB Shared_Hugetlb: 0 kB Private_Hugetlb: 0 kB Swap: 0 kB SwapPss: 0 kB KernelPageSize: 4 kB MMUPageSize: 4 kB Locked: 0 kB Overall system memory consumption is similarly improved. Another major change is that we remove dax_pfn_mkwrite() from our fault flow, and instead rely on the page fault itself to make the PTE dirty and writeable. The following description from the patch adding the vm_insert_mixed_mkwrite() call explains this a little more: "To be able to use the common 4k zero page in DAX we need to have our PTE fault path look more like our PMD fault path where a PTE entry can be marked as dirty and writeable as it is first inserted rather than waiting for a follow-up dax_pfn_mkwrite() => finish_mkwrite_fault() call. Right now we can rely on having a dax_pfn_mkwrite() call because we can distinguish between these two cases in do_wp_page(): case 1: 4k zero page => writable DAX storage case 2: read-only DAX storage => writeable DAX storage This distinction is made by via vm_normal_page(). vm_normal_page() returns false for the common 4k zero page, though, just as it does for DAX ptes. Instead of special casing the DAX + 4k zero page case we will simplify our DAX PTE page fault sequence so that it matches our DAX PMD sequence, and get rid of the dax_pfn_mkwrite() helper. We will instead use dax_iomap_fault() to handle write-protection faults. This means that insert_pfn() needs to follow the lead of insert_pfn_pmd() and allow us to pass in a 'mkwrite' flag. If 'mkwrite' is set insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path" Link: http://lkml.kernel.org/r/20170724170616.25810-4-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: "Darrick J. Wong" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Steven Rostedt Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/dax.txt | 5 +- fs/dax.c | 243 ++++++++++++-------------------------- fs/ext2/file.c | 25 +--- fs/ext4/file.c | 32 +---- fs/xfs/xfs_file.c | 2 +- include/linux/dax.h | 12 +- include/trace/events/fs_dax.h | 2 - 7 files changed, 86 insertions(+), 235 deletions(-) commit e30331ff05f689f8f2faeb51664299c4d7841f15 Author: Ross Zwisler Date: Wed Sep 6 16:18:39 2017 -0700 dax: relocate some dax functions dax_load_hole() will soon need to call dax_insert_mapping_entry(), so it needs to be moved lower in dax.c so the definition exists. dax_wake_mapping_entry_waiter() will soon be removed from dax.h and be made static to dax.c, so we need to move its definition above all its callers. Link: http://lkml.kernel.org/r/20170724170616.25810-3-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: "Darrick J. Wong" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Steven Rostedt Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 138 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 69 insertions(+), 69 deletions(-) commit b2770da6425406cf3f6d3fddbf9086b1db0106a1 Author: Ross Zwisler Date: Wed Sep 6 16:18:35 2017 -0700 mm: add vm_insert_mixed_mkwrite() When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has three major drawbacks: 1) It consumes memory unnecessarily. For every 4k page that is read via a DAX mmap() over a hole, we allocate a new page cache page. This means that if you read 1GiB worth of pages, you end up using 1GiB of zeroed memory. 2) It is slower than using a common zero page because each page fault has more work to do. Instead of just inserting a common zero page we have to allocate a page cache page, zero it, and then insert it. 3) The fact that we had to check for both DAX exceptional entries and for page cache pages in the radix tree made the DAX code more complex. This series solves these issues by following the lead of the DAX PMD code and using a common 4k zero page instead. This reduces memory usage and decreases latencies for some workloads, and it simplifies the DAX code, removing over 100 lines in total. This patch (of 5): To be able to use the common 4k zero page in DAX we need to have our PTE fault path look more like our PMD fault path where a PTE entry can be marked as dirty and writeable as it is first inserted rather than waiting for a follow-up dax_pfn_mkwrite() => finish_mkwrite_fault() call. Right now we can rely on having a dax_pfn_mkwrite() call because we can distinguish between these two cases in do_wp_page(): case 1: 4k zero page => writable DAX storage case 2: read-only DAX storage => writeable DAX storage This distinction is made by via vm_normal_page(). vm_normal_page() returns false for the common 4k zero page, though, just as it does for DAX ptes. Instead of special casing the DAX + 4k zero page case we will simplify our DAX PTE page fault sequence so that it matches our DAX PMD sequence, and get rid of the dax_pfn_mkwrite() helper. We will instead use dax_iomap_fault() to handle write-protection faults. This means that insert_pfn() needs to follow the lead of insert_pfn_pmd() and allow us to pass in a 'mkwrite' flag. If 'mkwrite' is set insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path. Link: http://lkml.kernel.org/r/20170724170616.25810-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Acked-by: Kirill A. Shutemov Cc: "Darrick J. Wong" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 ++ mm/memory.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 45 insertions(+), 7 deletions(-) commit f0cd34061300dc501ace5261cb527a6deabe1000 Author: Dou Liyang Date: Wed Sep 6 16:18:32 2017 -0700 metag/numa: remove the unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node(). The parent_node() macro in METAG architecture is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1501076076-1974-4-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Cc: James Hogan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/metag/include/asm/topology.h | 1 - 1 file changed, 1 deletion(-) commit 80cee03bf1d626db0278271b505d7f5febb37bba Merge: aae3dbb 2d45a7e Author: Linus Torvalds Date: Wed Sep 6 15:17:17 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.14: API: - Defer scompress scratch buffer allocation to first use. - Add __crypto_xor that takes separte src and dst operands. - Add ahash multiple registration interface. - Revamped aead/skcipher algif code to fix async IO properly. Drivers: - Add non-SIMD fallback code path on ARM for SVE. - Add AMD Security Processor framework for ccp. - Add support for RSA in ccp. - Add XTS-AES-256 support for CCP version 5. - Add support for PRNG in sun4i-ss. - Add support for DPAA2 in caam. - Add ARTPEC crypto support. - Add Freescale RNGC hwrng support. - Add Microchip / Atmel ECC driver. - Add support for STM32 HASH module" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits) crypto: af_alg - get_page upon reassignment to TX SGL crypto: cavium/nitrox - Fix an error handling path in 'nitrox_probe()' crypto: inside-secure - fix an error handling path in safexcel_probe() crypto: rockchip - Don't dequeue the request when device is busy crypto: cavium - add release_firmware to all return case crypto: sahara - constify platform_device_id MAINTAINERS: Add ARTPEC crypto maintainer crypto: axis - add ARTPEC-6/7 crypto accelerator driver crypto: hash - add crypto_(un)register_ahashes() dt-bindings: crypto: add ARTPEC crypto crypto: algif_aead - fix comment regarding memory layout crypto: ccp - use dma_mapping_error to check map error lib/mpi: fix build with clang crypto: sahara - Remove leftover from previous used spinlock crypto: sahara - Fix dma unmap direction crypto: af_alg - consolidation of duplicate code crypto: caam - Remove unused dentry members crypto: ccp - select CONFIG_CRYPTO_RSA crypto: ccp - avoid uninitialized variable warning crypto: serpent - improve __serpent_setkey with UBSAN ... commit aae3dbb4776e7916b6cd442d00159bea27a695c1 Merge: ec3604c 66bed84 Author: Linus Torvalds Date: Wed Sep 6 14:45:08 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: 1) Support ipv6 checksum offload in sunvnet driver, from Shannon Nelson. 2) Move to RB-tree instead of custom AVL code in inetpeer, from Eric Dumazet. 3) Allow generic XDP to work on virtual devices, from John Fastabend. 4) Add bpf device maps and XDP_REDIRECT, which can be used to build arbitrary switching frameworks using XDP. From John Fastabend. 5) Remove UFO offloads from the tree, gave us little other than bugs. 6) Remove the IPSEC flow cache, from Florian Westphal. 7) Support ipv6 route offload in mlxsw driver. 8) Support VF representors in bnxt_en, from Sathya Perla. 9) Add support for forward error correction modes to ethtool, from Vidya Sagar Ravipati. 10) Add time filter for packet scheduler action dumping, from Jamal Hadi Salim. 11) Extend the zerocopy sendmsg() used by virtio and tap to regular sockets via MSG_ZEROCOPY. From Willem de Bruijn. 12) Significantly rework value tracking in the BPF verifier, from Edward Cree. 13) Add new jump instructions to eBPF, from Daniel Borkmann. 14) Rework rtnetlink plumbing so that operations can be run without taking the RTNL semaphore. From Florian Westphal. 15) Support XDP in tap driver, from Jason Wang. 16) Add 32-bit eBPF JIT for ARM, from Shubham Bansal. 17) Add Huawei hinic ethernet driver. 18) Allow to report MD5 keys in TCP inet_diag dumps, from Ivan Delalande. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1780 commits) i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq i40e: avoid NVM acquire deadlock during NVM update drivers: net: xgene: Remove return statement from void function drivers: net: xgene: Configure tx/rx delay for ACPI drivers: net: xgene: Read tx/rx delay for ACPI rocker: fix kcalloc parameter order rds: Fix non-atomic operation on shared flag variable net: sched: don't use GFP_KERNEL under spin lock vhost_net: correctly check tx avail during rx busy polling net: mdio-mux: add mdio_mux parameter to mdio_mux_init() rxrpc: Make service connection lookup always check for retry net: stmmac: Delete dead code for MDIO registration gianfar: Fix Tx flow control deactivation cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6 cxgb4: Fix pause frame count in t4_get_port_stats cxgb4: fix memory leak tun: rename generic_xdp to skb_xdp tun: reserve extra headroom only when XDP is set net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping net: dsa: bcm_sf2: Advertise number of egress queues ... commit ec3604c7a5aae8953545b0d05495357009a960e5 Merge: 066dea8 6d4b512 Author: Linus Torvalds Date: Wed Sep 6 14:11:03 2017 -0700 Merge tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull writeback error handling updates from Jeff Layton: "This pile continues the work from last cycle on better tracking writeback errors. In v4.13 we added some basic errseq_t infrastructure and converted a few filesystems to use it. This set continues refining that infrastructure, adds documentation, and converts most of the other filesystems to use it. The main exception at this point is the NFS client" * tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: ecryptfs: convert to file_write_and_wait in ->fsync mm: remove optimizations based on i_size in mapping writeback waits fs: convert a pile of fsync routines to errseq_t based reporting gfs2: convert to errseq_t based writeback error reporting for fsync fs: convert sync_file_range to use errseq_t based error-tracking mm: add file_fdatawait_range and file_write_and_wait fuse: convert to errseq_t based error tracking for fsync mm: consolidate dax / non-dax checks for writeback Documentation: add some docs for errseq_t errseq: rename __errseq_set to errseq_set commit 066dea8c30ae7d8e061145bcf5422ce0773582eb Merge: c7f396f 3953704 Author: Linus Torvalds Date: Wed Sep 6 13:43:26 2017 -0700 Merge tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "This pile just has a few file locking fixes from Ben Coddington. There are a couple of cleanup patches + an attempt to bring sanity to the l_pid value that is reported back to userland on an F_GETLK request. After a few gyrations, he came up with a way for filesystems to communicate to the VFS layer code whether the pid should be translated according to the namespace or presented as-is to userland" * tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: restore a warn for leaked locks on close fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks fs/locks: Use allocation rather than the stack in fcntl_getlk() commit c7f396f12fb3644ff325acb2384b64c8eea7a746 Merge: be6297e 1c24285 Author: Linus Torvalds Date: Wed Sep 6 13:39:23 2017 -0700 Merge tag 'dlm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set includes a bunch of minor code cleanups that have accumulated, probably from code analyzers people like to run. There is one nice fix that avoids some socket leaks by switching to use sock_create_lite()" * tag 'dlm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: use sock_create_lite inside tcp_accept_from_sock uapi linux/dlm_netlink.h: include linux/dlmconstants.h dlm: avoid double-free on error path in dlm_device_{register,unregister} dlm: constify kset_uevent_ops structure dlm: print log message when cluster name is not set dlm: Delete an unnecessary variable initialisation in dlm_ls_start() dlm: Improve a size determination in two functions dlm: Use kcalloc() in two functions dlm: Use kmalloc_array() in make_member_array() dlm: Delete an error message for a failed memory allocation in dlm_recover_waiters_pre() dlm: Improve a size determination in dlm_recover_waiters_pre() dlm: Use kcalloc() in dlm_scan_waiters() dlm: Improve a size determination in table_seq_start() dlm: Add spaces for better code readability dlm: Replace six seq_puts() calls by seq_putc() dlm: Make dismatch error message more clear dlm: Fix kernel memory disclosure commit 426ca2cb69cda59f32c251d1f3e111aee8c42814 Merge: bcd7726 d02fd5f Author: Rodrigo Vivi Date: Wed Sep 6 11:11:28 2017 -0700 Merge tag 'gvt-fixes-2017-09-06' of https://github.com/01org/gvt-linux into drm-intel-next-fixes gvt-fixes-2017-09-06 - regression fix for gvt init failure from Jianjun Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170906035924.2225krr6snv2duvq@zhen-hp.sh.intel.com commit be6297e9be118d89fa477a60ddfbf0e0b2dfacec Merge: 5791577 b5f5157 Author: Linus Torvalds Date: Wed Sep 6 12:59:41 2017 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Scalability improvements when allocating inodes, and some miscellaneous bug fixes and cleanups" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: avoid Y2038 overflow in recently_deleted() ext4: fix fault handling when mounted with -o dax,ro ext4: fix quota inconsistency during orphan cleanup for read-only mounts ext4: fix incorrect quotaoff if the quota feature is enabled ext4: remove useless test and assignment in strtohash functions ext4: backward compatibility support for Lustre ea_inode implementation ext4: remove timebomb in ext4_decode_extra_time() ext4: use sizeof(*ptr) ext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets ext4: reduce lock contention in __ext4_new_inode ext4: cleanup goto next group ext4: do not unnecessarily allocate buffer in recently_deleted() commit 5791577963426c5a2db51fff57e9fcd72061e2c3 Merge: 77d0ab6 6c37059 Author: Linus Torvalds Date: Wed Sep 6 12:19:23 2017 -0700 Merge tag 'xfs-4.14-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Darrick Wong: "Here are the changes for xfs for 4.14. Most of these are cleanups and fixes for bad behavior, as we're mostly focusing on improving reliablity this cycle (read: there's potentially a lot of stuff on the horizon for 4.15 so better to spend a few weeks killing other bugs now). Summary: - Write unmount record for a ro mount to avoid unnecessary log replay - Clean up orphaned inodes when mounting fs readonly - Resubmit inode log items when buffer writeback fails to avoid umount hang - Fix log recovery corruption problems when log headers wrap around the end - Avoid infinite loop searching for free inodes when inode counters are wrong - Evict inodes involved with log redo so that we don't leak them later - Fix a potential race between reclaim and inode cluster freeing - Refactor the inode joining code w.r.t. transaction rolling & deferred ops - Fix a bug where the log doesn't properly deal with dirty buffers that are about to become ordered buffers - Fix the extent swap code to deal with making dirty buffers ordered properly - Consolidate page fault handlers - Refactor the incore extent manipulation functions to use the iext abstractions instead of directly modifying with extent data - Disable crashy chattr +/-x until we fix it - Don't allow us to set S_DAX for v2 inodes - Various cleanups - Clarify some documentation - Fix a problem where fsync and a log commit race to send the disk a flush command, resulting in a small window where power fail data loss could occur - Simplify some rmap operations in the fcollapse code - Fix some use-after-free problems in async writeback" * tag 'xfs-4.14-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (44 commits) xfs: use kmem_free to free return value of kmem_zalloc xfs: open code end_buffer_async_write in xfs_finish_page_writeback xfs: don't set v3 xflags for v2 inodes xfs: fix compiler warnings fsmap: fix documentation of FMR_OF_LAST xfs: simplify the rmap code in xfs_bmse_merge xfs: remove unused flags arg from xfs_file_iomap_begin_delay xfs: fix incorrect log_flushed on fsync xfs: disable per-inode DAX flag xfs: replace xfs_qm_get_rtblks with a direct call to xfs_bmap_count_leaves xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent xfs: use xfs_iext_*_extent helpers in xfs_bmap_split_extent_at xfs: use xfs_iext_*_extent helpers in xfs_bmap_shift_extents xfs: move some code around inside xfs_bmap_shift_extents xfs: use xfs_iext_get_extent in xfs_bmap_first_unused xfs: switch xfs_bmap_local_to_extents to use xfs_iext_insert xfs: add a xfs_iext_update_extent helper xfs: consolidate the various page fault handlers iomap: return VM_FAULT_* codes from iomap_page_mkwrite xfs: relog dirty buffers during swapext bmbt owner change ... commit 77d0ab600af4bf5152bc98d0ac1edbc34c1e5fdf Merge: e7d0c41 309e8cd Author: Linus Torvalds Date: Wed Sep 6 11:42:31 2017 -0700 Merge tag 'gfs2-4.14.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We've got a whopping 29 GFS2 patches for this merge window, mainly because we held some back from the previous merge window until we could get them perfected and well tested. We have a couple patch sets, including my patch set for protecting glock gl_object and Andreas Gruenbacher's patch set to fix the long-standing shrink- slab hang, plus a bunch of assorted bugs and cleanups. Summary: - I fixed a bug whereby an IO error would lead to a double-brelse. - Andreas Gruenbacher made a minor cleanup to call his relatively new function, gfs2_holder_initialized, rather than doing it manually. This was just missed by a previous patch set. - Jan Kara fixed a bug whereby the SGID was being cleared when inheriting ACLs. - Andreas found a bug and fixed it in his previous patch, "Get rid of flush_delayed_work in gfs2_evict_inode". A call to flush_delayed_work was deleted from *gfs2_inode_lookup and added to gfs2_create_inode. - Wang Xibo found and fixed a list_add call in inode_go_lock that specified the parameters in the wrong order. - Coly Li submitted a patch to add the REQ_PRIO to some of GFS2's metadata reads that were accidentally missing them. - I submitted a 4-patch set to protect the glock gl_object field. GFS2 was setting and checking gl_object with no locking mechanism, so the value was occasionally stomped on, which caused file system corruption. - I submitted a small cleanup to function gfs2_clear_rgrpd. It was needlessly adding rgrp glocks to the lru list, then pulling them back off immediately. The rgrp glocks don't use the lru list anyway, so doing so was just a waste of time. - I submitted a patch that checks the GLOF_LRU flag on a glock before trying to remove it from the lru_list. This avoids a lot of unnecessary spin_lock contention. - I submitted a patch to delete GFS2's debugfs files only after we evict all the glocks. Before this patch, GFS2 would delete the debugfs files, and if unmount hung waiting for a glock, there was no way to debug the problem. Now, if a hang occurs during umount, we can examine the debugfs files to figure out why it's hung. - Andreas Gruenbacher submitted a patch to fix some trivial typos. - Andreas also submitted a five-part patch set to fix the longstanding hang involving the slab shrinker: dlm requires memory, calls the inode shrinker, which calls gfs2's evict, which calls back into DLM before it can evict an inode. - Abhi Das submitted a patch to forcibly flush the active items list to relieve memory pressure. This fixes a long-standing bug whereby GFS2 was getting hung permanently in balance_dirty_pages. - Thomas Tai submitted a patch to fix a slab corruption problem due to a residual pointer left in the lock_dlm lockstruct. - I submitted a patch to withdraw the file system if IO errors are encountered while writing to the journals or statfs system file which were previously not being sent back up. Before, some IO errors were sometimes not be detected for several hours, and at recovery time, the journal errors made journal replay impossible. - Andreas has a patch to fix an annoying format-truncation compiler warning so GFS2 compiles cleanly. - I have a patch that fixes a handful of sparse compiler warnings. - Andreas fixed up an useless gl_object warning caused by an earlier patch. - Arvind Yadav added a patch to properly constify our rhashtable params declare. - I added a patch to fix a regression caused by the non-recursive delete and truncate patch that caused file system blocks to not be properly freed. - Ernesto A. Fernández added a patch to fix a place where GFS2 would send back the wrong return code setting extended attributes. - Ernesto also added a patch to fix a case in which GFS2 was improperly setting an inode's i_mode, potentially granting access to the wrong users" * tag 'gfs2-4.14.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (29 commits) gfs2: preserve i_mode if __gfs2_set_acl() fails gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing GFS2: Fix non-recursive truncate bug gfs2: constify rhashtable_params GFS2: Fix gl_object warnings GFS2: Fix up some sparse warnings gfs2: Silence gcc format-truncation warning GFS2: Withdraw for IO errors writing to the journal or statfs gfs2: fix slab corruption during mounting and umounting gfs file system gfs2: forcibly flush ail to relieve memory pressure gfs2: Clean up waiting on glocks gfs2: Defer deleting inodes under memory pressure gfs2: gfs2_evict_inode: Put glocks asynchronously gfs2: Get rid of gfs2_set_nlink gfs2: gfs2_glock_get: Wait on freeing glocks gfs2: Fix trivial typos GFS2: Delete debugfs files only after we evict the glocks GFS2: Don't waste time locking lru_lock for non-lru glocks GFS2: Don't bother trying to add rgrps to the lru list GFS2: Clear gl_object when deleting an inode in gfs2_delete_inode ... commit 15b51bd6badbb373c723aa019cf530c8263efd7e Author: Yan, Zheng Date: Wed Sep 6 10:15:16 2017 +0800 ceph: stop on-going cached readdir if mds revokes FILE_SHARED cap If directory's FILE_SHARED cap get revoked, dentry in the directory can get spliced into other directory (Eg, other client move the dentry into directory B, then we do readdir on directory B). So we should stop on-going cached readdir. this can be achieved by marking dir not complete, because __dcache_readdir() checks dir completeness before emitting each dentry. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f275635ee0b6641151dfaf07b901d7c8d4d8e987 Author: Yan, Zheng Date: Fri Sep 1 17:03:16 2017 +0800 ceph: wait on writeback after writing snapshot data In sync mode, writepages() needs to write all dirty pages. But it can only write dirty pages associated with the oldest snapc. To write dirty pages associated with next snapc, it needs to wait until current writes complete. Without this wait, writepages() keeps looking up dirty pages, but the found dirty pages are not writeable. It wastes CPU time. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 7e1ee54a07b6f00f4b6dd9cd24505d3b76774ddc Author: Yan, Zheng Date: Sun Sep 3 10:09:11 2017 +0800 ceph: fix capsnap dirty pages accounting writepages_finish() calls ceph_put_wrbuffer_cap_refs() once for all pages, parameter snapc is set to req->r_snapc. So writepages() shouldn't write dirty pages associated with different snapc in one OSD request. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a2d927e35dd8dc4faf8fbc211533cf5f8840f5b Author: Yan, Zheng Date: Fri Sep 1 16:53:58 2017 +0800 ceph: ignore wbc->range_{start,end} when write back snapshot data writepages() needs to write dirty pages to OSD in strict order of snapshot context. It must first write dirty pages associated with the oldest snapshot context. In the write range case, dirty pages in the specified range can be associated with newer snapc. They are not writeable until we write all dirty pages associated with the oldest snapc. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 80 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 34 deletions(-) commit 590e9d9861f5f21fbbb0266e40e6a17bc5084dd0 Author: Yan, Zheng Date: Sun Sep 3 00:04:31 2017 +0800 ceph: fix "range cyclic" mode writepages In range cyclic mode, writepages() should first write dirty pages in range [writeback_index, (pgoff_t)-1], then write pages in range [0, writeback_index -1]. Besides, if writepages() encounters a page that beyond EOF, it should restart from the beginning. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 0e5ecac7168366500af1fa9a70fa9ce573f891f3 Author: Yan, Zheng Date: Thu Aug 31 19:20:40 2017 +0800 ceph: cleanup local variables in ceph_writepages_start() Remove two variables and define variables of same type together. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0713e5f24b7deb88579dc312cf818b1a0809f02e Author: Yan, Zheng Date: Thu Aug 31 16:55:48 2017 +0800 ceph: optimize pagevec iterating in ceph_writepages_start() ceph_writepages_start() supports writing non-continuous pages. If it encounters a non-dirty or non-writeable page in pagevec, it can continue to check the rest pages in pagevec. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 54 +++++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 05455e1177f76849e0a6450e8710dcb2c361f337 Author: Yan, Zheng Date: Sat Sep 2 10:50:48 2017 +0800 ceph: make writepage_nounlock() invalidate page that beyonds EOF Otherwise, the page left in state that page is associated with a snapc, but (PageDirty(page) || PageWriteback(page)) is false. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit 1f934b00e907527cddb83984d0783cc4a029952a Author: Yan, Zheng Date: Wed Aug 30 11:36:06 2017 +0800 ceph: properly get capsnap's size in get_oldest_context() capsnap's size is set by __ceph_finish_cap_snap(). If capsnap is under writing, its size is zero. In this case, get_oldest_context() should read i_size. Besides, ceph_writepages_start() should re-check capsnap's size after dirty pages get locked. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 137 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 57 deletions(-) commit b072d774664b690768bdf7e068ee95a161e5f107 Author: Yan, Zheng Date: Wed Aug 30 11:27:29 2017 +0800 ceph: remove stale check in ceph_invalidatepage() Both set_page_dirty and truncate_complete_page should be called for locked page, they can't race with each other. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 3ae0bebc49b3fb3c9fa9b62b95c5119a04aa7282 Author: Yan, Zheng Date: Mon Aug 28 16:36:53 2017 +0800 ceph: queue cap snap only when snap realm's context changes If we create capsnap when snap realm's context does not change, the new capsnap's snapc is equal to ci->i_head_snapc. Page writeback code can't differentiates dirty pages associated with the new capsnap from dirty pages associated with i_head_snapc. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/snap.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit c8fd0d37f81dd38e3f319f4938b45a5aaf0dfc58 Author: Yan, Zheng Date: Mon Aug 28 15:41:28 2017 +0800 ceph: handle race between vmtruncate and queuing cap snap It's possible that we create a cap snap while there is pending vmtruncate (truncate hasn't been processed by worker thread). We should truncate dirty pages beyond capsnap->size in that case. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit fa0aa3b839b922c7bb911dbe2435da2a4e59d82d Author: Yan, Zheng Date: Mon Aug 28 15:07:42 2017 +0800 ceph: fix message order check in handle_cap_export() If caps for importer mds exists, but cap id mismatch, client should have received corresponding import message. Because cap ID does not change as long as client holds the caps. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c858a0709f991171256db74f4329a1cb8e823764 Author: Yan, Zheng Date: Mon Aug 28 15:02:42 2017 +0800 ceph: fix NULL pointer dereference in ceph_flush_snaps() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d37b1d9943d5138b9b2630b7b7082629a82a1386 Author: Markus Elfring Date: Sun Aug 20 20:22:02 2017 +0200 ceph: adjust 36 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 Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 +- fs/ceph/cache.c | 2 +- fs/ceph/caps.c | 4 ++-- fs/ceph/debugfs.c | 2 +- fs/ceph/file.c | 2 +- fs/ceph/inode.c | 6 +++--- fs/ceph/mds_client.c | 22 +++++++++++----------- fs/ceph/mdsmap.c | 6 +++--- fs/ceph/super.c | 18 +++++++++--------- fs/ceph/xattr.c | 8 ++++---- 10 files changed, 36 insertions(+), 36 deletions(-) commit b529d1b382f77ec6221f9c5fffb17939e92629e4 Author: Markus Elfring Date: Sun Aug 20 20:08:25 2017 +0200 ceph: delete an unnecessary return statement in update_dentry_lease() The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 1 - 1 file changed, 1 deletion(-) commit 51308806ff09eadc41726380891a393042919dd2 Author: Markus Elfring Date: Sun Aug 20 20:00:09 2017 +0200 ceph: ENOMEM pr_err in __get_or_create_frag() is redundant 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: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 397f238994a5dae1b10e8a6efe9a2e2a95052cee Author: Luis Henriques Date: Fri Jul 28 11:56:40 2017 +0100 ceph: check negative offsets in ceph_llseek() When a user requests SEEK_HOLE or SEEK_DATA with a negative offset ceph_llseek should return -ENXIO. Currently -EINVAL is being returned for SEEK_DATA and 0 for SEEK_HOLE. Signed-off-by: Luis Henriques Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 06d74376c8af32f5b8d777a943aa4dc99165088b Author: Douglas Fuller Date: Wed Aug 16 10:19:27 2017 -0400 ceph: more accurate statfs Improve accuracy of statfs reporting for Ceph filesystems comprising exactly one data pool. In this case, the Ceph monitor can now report the space usage for the single data pool instead of the global data for the entire Ceph cluster. Include support for this message in mon_client and leverage it in ceph/super. Signed-off-by: Douglas Fuller Reviewed-by: Yan, Zheng Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/super.c | 9 ++++++++- include/linux/ceph/ceph_fs.h | 2 ++ include/linux/ceph/mon_client.h | 4 ++-- net/ceph/mon_client.c | 6 +++++- 4 files changed, 17 insertions(+), 4 deletions(-) commit 92776fd2c230f80be910cf33acd99682345209cd Author: Yan, Zheng Date: Wed Aug 16 21:42:39 2017 +0800 ceph: properly set snap follows for cap reconnect Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b178cf4304f26551cb05915eb6c6b1736617366b Author: Yan, Zheng Date: Wed Aug 16 17:27:05 2017 +0800 ceph: don't use CEPH_OSD_FLAG_ORDERSNAP Inode can be moved between snap realms. It's possible inode is moved into a snap realm whose seq number is smaller than old snap realm's. So there is no guarantee that seq number inode's snap context always increases. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c0a9c2d978360493054315196c51d8328fa7fae Author: Yan, Zheng Date: Wed Aug 16 17:24:58 2017 +0800 ceph: include snapc in debug message of write Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 4 ++-- fs/ceph/file.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) commit 24d063acc26fa7ccebc7aa05498fa3818e660df6 Author: Yan, Zheng Date: Tue Aug 15 11:37:32 2017 +0800 ceph: make sure flushsnap messages are sent in proper order Before sending new flushsnap message, check if there are old flushsnap messages that need to be re-sent. If there are, re-send old messages first. This guarantees ordering of flushsnap messages. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a5cd74ad388c1318554e24820b77ce335a27e0ef Author: Yan, Zheng Date: Mon Aug 14 10:50:50 2017 +0800 ceph: fix -EOLDSNAPC handling Need to drop cap reference before retry. Besides, it's better to redo file write checks for each retry because we re-lock inode. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 5d37ca1480a70f437e4c425ee5723c760cf6afac Author: Yan, Zheng Date: Wed Jul 26 12:48:08 2017 +0800 ceph: send LSSNAP request to auth mds of directory inode Snapdir inode has no capability. __choose_mds() should choose mds base on capabilities of snapdir's parent inode. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 6 ++++-- fs/ceph/mds_client.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) commit 8d45b911a9f106ec898ec531d5badba5df7c2748 Author: Yan, Zheng Date: Wed Jul 26 12:07:51 2017 +0800 ceph: don't fill readdir cache for LSSNAP reply Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 9a86962b35be06c8908028975e2261e4df0f79fd Author: Yan, Zheng Date: Wed Jul 26 11:17:29 2017 +0800 ceph: cleanup ceph_readdir_prepopulate() In LSSNAP case, req->r_dentry is already set to snapdir dentry. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 7 ------- 1 file changed, 7 deletions(-) commit b74fceae734dbd45f79b93bd262b03c39f538413 Author: Jeff Layton Date: Tue Jul 25 10:50:41 2017 -0400 ceph: use errseq_t for writeback error reporting Ensure that when writeback errors are marked that we report those to all file descriptions that were open at the time of the error. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95569713afc0b53ded1bba67834e0be24529a8c9 Author: Yan, Zheng Date: Mon Jul 24 17:59:39 2017 +0800 ceph: new cap message flags indicate if there is pending capsnap These flags tell mds if there is pending capsnap explicitly. Without this explicit notification, mds can only conclude if client has pending capsnap. The method mds use is inefficient and error-prone. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 5 ++++- include/linux/ceph/ceph_fs.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 3fb99d483e614bc3834784c7a686572c7970bb92 Author: Yanhu Cao Date: Fri Jul 21 17:20:10 2017 +0800 ceph: nuke startsync op startsync is a no-op, has been for years. Remove it. Link: http://tracker.ceph.com/issues/20604 Signed-off-by: Yanhu Cao Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 21 +++------------------ fs/ceph/file.c | 5 +---- include/linux/ceph/rados.h | 1 - net/ceph/osd_client.c | 5 ----- 4 files changed, 4 insertions(+), 28 deletions(-) commit 37f13252579389a659ae3ceec8c60f15bdf70f0c Author: Kefeng Wang Date: Thu Jul 13 15:46:35 2017 +0800 rbd: silence bogus uninitialized use warning in rbd_acquire_lock() drivers/block/rbd.c: In function 'rbd_acquire_lock': drivers/block/rbd.c:3602:44: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] Silence the warning, found it when built old kernel(3.10) with OBS(opensuse build service). Signed-off-by: Kefeng Wang Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4214fb158cc423ac31b841000e219855be055388 Author: Yan, Zheng Date: Tue Jul 11 18:49:44 2017 +0800 ceph: validate correctness of some mount options Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.c | 21 ++++++++++++++------- fs/ceph/super.h | 9 +++++++++ include/linux/ceph/libceph.h | 10 ---------- 3 files changed, 23 insertions(+), 17 deletions(-) commit 95cca2b44e54b00a3ed6ed7dc869717cd6807e81 Author: Yan, Zheng Date: Tue Jul 11 17:34:46 2017 +0800 ceph: limit osd write size OSD has a configurable limitation of max write size. OSD return error if write request size is larger than the limitation. For now, set max write size to CEPH_MSG_MAX_DATA_LEN. It should be small enough. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 4 +--- fs/ceph/file.c | 4 +++- fs/ceph/super.c | 5 ++++- fs/ceph/super.h | 3 +++ 4 files changed, 11 insertions(+), 5 deletions(-) commit aa187926b739fb391f153335c7552c7a10d60e82 Author: Yan, Zheng Date: Tue Jul 11 15:56:09 2017 +0800 ceph: limit osd read size to CEPH_MSG_MAX_DATA_LEN libceph returns -EIO when read size > CEPH_MSG_MAX_DATA_LEN. Link: http://tracker.ceph.com/issues/20528 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 10 +++------- fs/ceph/file.c | 3 +++ fs/ceph/super.c | 17 +++++++---------- fs/ceph/super.h | 3 ++- 4 files changed, 15 insertions(+), 18 deletions(-) commit 2ae409dc6a907e80f4cd32ad4482ef52441e3147 Author: Yan, Zheng Date: Tue Jul 11 16:20:05 2017 +0800 ceph: remove unused cap_release_safety mount option Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.c | 6 ------ fs/ceph/super.h | 1 - include/linux/ceph/libceph.h | 1 - 3 files changed, 8 deletions(-) commit bcd7726f7d4f3c7d9c7e6d0a833520c61dd9eb21 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ä (cherry picked from commit 0db8c961209153498fe7e279b8f0d3deb81808f0) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 389e0d3d3f7ea0dc37dddfa678cd7680f0347ed9 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 (cherry picked from commit 908a610557f4d8b46a0f82c01e31b30f5c998580) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf09375337077b692d21d062c30697c86f2872d3 Author: Omar Sandoval Date: Tue Sep 5 14:24:47 2017 -0700 loop: set physical block size to logical block size Commit 6c6b6f28b333 ("loop: set physical block size to PAGE_SIZE") caused mkfs.xfs to barf on ppc64 [1]. Always using PAGE_SIZE as the physical block size still makes the most sense semantically, but let's just lie and always set it to the same value as the logical block size (same goes for io_min). In the future we might want to at least bump up io_min to PAGE_SIZE but I'm sick of these stupid changes so let's play it safe. 1: https://marc.info/?l=linux-xfs&m=150459024723753&w=2 Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 58a69893a9bf6833a79dae801da78e1d4f46f0a2 Author: Markus Elfring Date: Wed Aug 16 22:35:24 2017 +0200 lockd: Delete an error message for a failed memory allocation in reclaimer() 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: Trond Myklebust fs/lockd/clntlock.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 03c6f7d64ac9c0a37cca91392ac4be8993a8f53d Author: NeilBrown Date: Wed Aug 16 12:47:27 2017 +1000 NFS: remove jiffies field from access cache This field hasn't been used since commit 57b691819ee2 ("NFS: Cache access checks more aggressively"). Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 ---- fs/nfs/nfs4proc.c | 1 - include/linux/nfs_fs.h | 1 - 3 files changed, 6 deletions(-) commit 779eafab06036fe1e06dea9bbd97cc4b12f0138f Author: NeilBrown Date: Fri Aug 18 17:12:52 2017 +1000 NFS: flush data when locking a file to ensure cache coherence for mmap. When a byte range lock (or flock) is taken out on an NFS file, the validity of the cached data is checked and the inode is marked NFS_INODE_INVALID_DATA. However the cached data isn't flushed from the page cache. This is sufficient for future read() requests or mmap() requests as they call nfs_revalidate_mapping() which performs the flush if necessary. However an existing mapping is not affected. Accessing data through that mapping will continue to return old data even though the inode is marked NFS_INODE_INVALID_DATA. This can easily be confirmed using the 'nfs' tool in git://github.com/okirch/twopence-nfs.git and running nfs coherence FILENAME on one client, and nfs coherence -r FILENAME on another client. It appears that prior to Linux 2.6.0 this worked correctly. However commit: http://git.kernel.org/cgit/linux/kernel/git/history/history.git/commit/?id=ca9268fe3ddd075714005adecd4afbd7f9ab87d0 removed the call to inode_invalidate_pages() from nfs_zap_caches(). I haven't tested this code, but inspection suggests that prior to this commit, file locking would invalidate all inode pages. This patch adds a call to nfs_revalidate_mapping() after a successful SETLK so that invalid data is flushed. With this patch the above test passes. To minimize impact (and possibly avoid a GETATTR call) this only happens if the mapping might be mapped into userspace. Cc: Olaf Kirch Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/file.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit f1ecbc21eb097ecf0b73793c44b0197584db9e2c Author: NeilBrown Date: Fri Aug 18 17:12:52 2017 +1000 SUNRPC: remove some dead code. RPC_TASK_NO_RETRANS_TIMEOUT is set when cl_noretranstimeo is set, which happens when RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT is set, which happens when NFS_CS_NO_RETRANS_TIMEOUT is set. This flag means "don't resend on a timeout, only resend if the connection gets broken for some reason". cl_discrtry is set when RPC_CLNT_CREATE_DISCRTRY is set, which happens when NFS_CS_DISCRTRY is set. This flag means "always disconnect before resending". NFS_CS_NO_RETRANS_TIMEOUT and NFS_CS_DISCRTRY are both only set in nfs4_init_client(), and it always sets both. So we will never have a situation where only one of the flags is set. So this code, which tests if timeout retransmits are allowed, and disconnection is required, will never run. So it makes sense to remove this code as it cannot be tested and could confuse people reading the code (like me). (alternately we could leave it there with a comment saying it is never actually used). Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 4 ---- 1 file changed, 4 deletions(-) commit 237f8306c30206d997e265ff46652e602a50824f Author: NeilBrown Date: Fri Aug 18 17:12:51 2017 +1000 NFS: don't expect errors from mempool_alloc(). Commit fbe77c30e9ab ("NFS: move rw_mode to nfs_pageio_header") reintroduced some pointless code that commit 518662e0fcb9 ("NFS: fix usage of mempools.") had recently removed. Remove it again. Cc: Benjamin Coddington Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/write.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 41bd0314fa3a458bee7ad768d079e681316332e7 Merge: 346ea25 3eeb515 Author: Vinod Koul Date: Wed Sep 6 21:55:10 2017 +0530 Merge branch 'topic/dmatest' into for-linus commit 346ea25e811b1e260fde7a446aa18833ca7e7b79 Merge: 05890d5 749d0d4 Author: Vinod Koul Date: Wed Sep 6 21:54:48 2017 +0530 Merge branch 'topic/qcom' into for-linus commit 05890d550c3b0a8b4daae36ec1bd9fe193a584f9 Merge: 918a21e 13efe1a Author: Vinod Koul Date: Wed Sep 6 21:54:41 2017 +0530 Merge branch 'topic/ppc4xx' into for-linus commit 918a21eeec371d174816288a5e57433cc72bb329 Merge: dccafbf c6c9304 Author: Vinod Koul Date: Wed Sep 6 21:54:31 2017 +0530 Merge branch 'topic/of' into for-linus commit dccafbf2d3e3e1f388f6f4a3076ca2ccbeeee487 Merge: f6cc35e aa1841b Author: Vinod Koul Date: Wed Sep 6 21:54:24 2017 +0530 Merge branch 'topic/k3dma' into for-linus commit f6cc35eefe81f332f7428b1d083f08c02a689fa7 Merge: 07e24b8 268e251 Author: Vinod Koul Date: Wed Sep 6 21:54:16 2017 +0530 Merge branch 'topic/ioat' into for-linus commit 07e24b85590690c1c91aec8395609cdeabbba4db Merge: a431cba ecbf9ef Author: Vinod Koul Date: Wed Sep 6 21:54:09 2017 +0530 Merge branch 'topic/bcm' into for-linus commit a431cbafcb2b0a1fcb46a90104034863c6583e47 Merge: a702e47 6084fc2 Author: Vinod Koul Date: Wed Sep 6 21:54:01 2017 +0530 Merge branch 'topic/altera' into for-linus commit 795ef788145ed2fa023efdf11e8d5d7bedc21462 Author: Colin Ian King Date: Wed Sep 6 09:56:29 2017 +0100 libata: zpodd: make arrays cdb static, reduces object code size Don't populate the arrays cdb on the stack, instead make them static. Makes the object code smaller by 230 bytes: Before: text data bss dec hex filename 3797 240 0 4037 fc5 drivers/ata/libata-zpodd.o After: text data bss dec hex filename 3407 400 0 3807 edf drivers/ata/libata-zpodd.o Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/libata-zpodd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f723fa4e69920f6a5dd5fa0d10ce90e2f14d189c Author: Christoph Hellwig Date: Tue Sep 5 18:46:47 2017 +0200 ahci: don't use MSI for devices with the silly Intel NVMe remapping scheme Intel AHCI controllers that also hide NVMe devices in their bar can't use MSI interrupts, so disable them. Reported-by: John Loy Tested-by: John Loy Signed-off-by: Christoph Hellwig Fixes: d684a90d38e2 ("ahci: per-port msix support") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Tejun Heo drivers/ata/ahci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9276717b9e297a62d1151a43d1cd286213f68eb7 Author: Michael Lyle Date: Wed Sep 6 14:26:02 2017 +0800 bcache: fix bch_hprint crash and improve output Most importantly, solve a crash where %llu was used to format signed numbers. This would cause a buffer overflow when reading sysfs writeback_rate_debug, as only 20 bytes were allocated for this and %llu writes 20 characters plus a null. Always use the units mechanism rather than having different output paths for simplicity. Also, correct problems with display output where 1.10 was a larger number than 1.09, by multiplying by 10 and then dividing by 1024 instead of dividing by 100. (Remainders of >= 1000 would print as .10). Minor changes: Always display the decimal point instead of trying to omit it based on number of digits shown. Decide what units to use based on 1000 as a threshold, not 1024 (in other words, always print at most 3 digits before the decimal point). Signed-off-by: Michael Lyle Reported-by: Dmitry Yu Okunev Acked-by: Kent Overstreet Reviewed-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/util.c | 50 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) commit 7b6a8570e02a20d0b6cadb9689e4b2e6217c390c Author: Dan Carpenter Date: Wed Sep 6 14:26:01 2017 +0800 bcache: Update continue_at() documentation continue_at() doesn't have a return statement anymore. Signed-off-by: Dan Carpenter Acked-by: Coly Li Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/md/bcache/closure.h | 4 ---- 1 file changed, 4 deletions(-) commit da22f0eea555baf9b0a84b52afe56db2052cfe8d Author: Dan Carpenter Date: Wed Sep 6 14:26:00 2017 +0800 bcache: silence static checker warning In olden times, closure_return() used to have a hidden return built in. We removed the hidden return but forgot to add a new return here. If "c" were NULL we would oops on the next line, but fortunately "c" is never NULL. Let's just remove the if statement. Signed-off-by: Dan Carpenter Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) commit 9baf30972b5568d8b5bc8b3c46a6ec5b58100463 Author: Tang Junhui Date: Wed Sep 6 14:25:59 2017 +0800 bcache: fix for gc and write-back race gc and write-back get raced (see the email "bcache get stucked" I sended before): gc thread write-back thread | |bch_writeback_thread() |bch_gc_thread() | | |==>read_dirty() |==>bch_btree_gc() | |==>btree_root() //get btree root | | //node write locker | |==>bch_btree_gc_root() | | |==>read_dirty_submit() | |==>write_dirty() | |==>continue_at(cl, | | write_dirty_finish, | | system_wq); | |==>write_dirty_finish()//excute | | //in system_wq | |==>bch_btree_insert() | |==>bch_btree_map_leaf_nodes() | |==>__bch_btree_map_nodes() | |==>btree_root //try to get btree | | //root node read | | //lock | |-----stuck here |==>bch_btree_set_root() |==>bch_journal_meta() |==>bch_journal() |==>journal_try_write() |==>journal_write_unlocked() //journal_full(&c->journal) | //condition satisfied |==>continue_at(cl, journal_write, system_wq); //try to excute | //journal_write in system_wq | //but work queue is excuting | //write_dirty_finish() |==>closure_sync(); //wait journal_write execute | //over and wake up gc, |-------------stuck here |==>release root node write locker This patch alloc a separate work-queue for write-back thread to avoid such race. (Commit log re-organized by Coly Li to pass checkpatch.pl checking) Signed-off-by: Tang Junhui Acked-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/super.c | 2 ++ drivers/md/bcache/writeback.c | 9 +++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) commit 89b1fc54c257104df007c5888e3705e52b973d45 Author: Tang Junhui Date: Wed Sep 6 14:25:58 2017 +0800 bcache: increase the number of open buckets In currently, we only alloc 6 open buckets for each cache set, but in usually, we always attach about 10 or so backend devices for each cache set, and the each bcache device are always accessed by about 10 or so threads in top application layer. So 6 open buckets are too few, It has led to that each of the same thread write data to different buckets, which would cause low efficiency write-back, and also cause buckets inefficient, and would be Very easy to run out of. I add debug message in bch_open_buckets_alloc() to print alloc bucket info, and test with ten bcache devices with a cache set, and each bcache device is accessed by ten threads. From the debug message, we can see that, after the modification, One bucket is more likely to assign to the same thread, and the data from the same thread are more likely to write the same bucket. Usually the same thread always write/read the same backend device, so it is good for write-back and also promote the usage efficiency of buckets. Signed-off-by: Tang Junhui Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 77fa100f27475d08a569b9d51c17722130f089e7 Author: Tony Asleson Date: Wed Sep 6 14:25:57 2017 +0800 bcache: Correct return value for sysfs attach errors If you encounter any errors in bch_cached_dev_attach it will return a negative error code. The variable 'v' which stores the result is unsigned, thus user space sees a very large value returned for bytes written which can cause incorrect user space behavior. Utilize 1 signed variable to use throughout the function to preserve error return capability. Signed-off-by: Tony Asleson Acked-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8394090a9129b40f9d90dcb7f4a49d60c727ca6 Author: Tang Junhui Date: Wed Sep 6 14:25:56 2017 +0800 bcache: correct cache_dirty_target in __update_writeback_rate() __update_write_rate() uses a Proportion-Differentiation Controller algorithm to control writeback rate. A dirty target number is used in this PD controller to control writeback rate. A larger target number will make the writeback rate smaller, on the versus, a smaller target number will make the writeback rate larger. bcache uses the following steps to calculate the target number, 1) cache_sectors = all-buckets-of-cache-set * buckets-size 2) cache_dirty_target = cache_sectors * cached-device-writeback_percent 3) target = cache_dirty_target * (sectors-of-cached-device/sectors-of-all-cached-devices-of-this-cache-set) The calculation at step 1) for cache_sectors is incorrect, which does not consider dirty blocks occupied by flash only volume. A flash only volume can be took as a bcache device without cached device. All data sectors allocated for it are persistent on cache device and marked dirty, they are not touched by bcache writeback and garbage collection code. So data blocks of flash only volume should be ignore when calculating cache_sectors of cache set. Current code does not subtract dirty sectors of flash only volume, which results a larger target number from the above 3 steps. And in sequence the cache device's writeback rate is smaller then a correct value, writeback speed is slower on all cached devices. This patch fixes the incorrect slower writeback rate by subtracting dirty sectors of flash only volumes in __update_writeback_rate(). (Commit log composed by Coly Li to pass checkpatch.pl checking) Signed-off-by: Tang Junhui Reviewed-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 3 ++- drivers/md/bcache/writeback.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit 0b43f49dc4d6d3789e936731dc16af94cb57d568 Author: Tang Junhui Date: Wed Sep 6 14:25:55 2017 +0800 bcache: gc does not work when triggering by manual command I try to execute the following command to trigger gc thread: [root@localhost internal]# echo 1 > trigger_gc But it does not work, I debug the code in gc_should_run(), It works only if in invalidating or sectors_to_gc < 0. So set sectors_to_gc to -1 to meet the condition when we trigger gc by manual command. (Code comments aded by Coly Li) Signed-off-by: Tang Junhui Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 09b3efec81def807fb225359e34a8e72866dd9c4 Author: Byungchul Park Date: Wed Sep 6 14:25:54 2017 +0800 bcache: Don't reinvent the wheel but use existing llist API Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park Acked-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/closure.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 69daf03adef5f7bc13e0ac86b4b8007df1767aab Author: Tang Junhui Date: Wed Sep 6 14:25:53 2017 +0800 bcache: do not subtract sectors_to_gc for bypassed IO Since bypassed IOs use no bucket, so do not subtract sectors_to_gc to trigger gc thread. Signed-off-by: tang.junhui Acked-by: Coly Li Reviewed-by: Eric Wheeler Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c81ffa32a214c84b08900fbc9d432187bd948eba Author: Tang Junhui Date: Wed Sep 6 14:25:52 2017 +0800 bcache: fix sequential large write IO bypass Sequential write IOs were tested with bs=1M by FIO in writeback cache mode, these IOs were expected to be bypassed, but actually they did not. We debug the code, and find in check_should_bypass(): if (!congested && mode == CACHE_MODE_WRITEBACK && op_is_write(bio_op(bio)) && (bio->bi_opf & REQ_SYNC)) goto rescale that means, If in writeback mode, a write IO with REQ_SYNC flag will not be bypassed though it is a sequential large IO, It's not a correct thing to do actually, so this patch remove these codes. Signed-off-by: tang.junhui Reviewed-by: Kent Overstreet Reviewed-by: Eric Wheeler Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 6 ------ 1 file changed, 6 deletions(-) commit 4b758df21ee7081ab41448d21d60367efaa625b3 Author: Jan Kara Date: Wed Sep 6 14:25:51 2017 +0800 bcache: Fix leak of bdev reference If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by: Jan Kara Acked-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 2 ++ 1 file changed, 2 insertions(+) commit bde59c475e0883e4c4294bcd9b9c7e08ae18c828 Author: Johannes Berg Date: Wed Sep 6 15:01:42 2017 +0200 mac80211: fix deadlock in driver-managed RX BA session start When an RX BA session is started by the driver, and it has to tell mac80211 about it, the corresponding bit in tid_rx_manage_offl gets set and the BA session work is scheduled. Upon testing this bit, it will call __ieee80211_start_rx_ba_session(), thus deadlocking as it already holds the ampdu_mlme.mtx, which that acquires again. Fix this by adding ___ieee80211_start_rx_ba_session(), a version of the function that requires the mutex already held. Cc: stable@vger.kernel.org Fixes: 699cb58c8a52 ("mac80211: manage RX BA session offload without SKB queue") Reported-by: Matteo Croce Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 32 +++++++++++++++++++++----------- net/mac80211/ht.c | 6 +++--- net/mac80211/ieee80211_i.h | 4 ++++ 3 files changed, 28 insertions(+), 14 deletions(-) commit 98e93e968e4947cd71c2eb69e323682daa453ee7 Author: Ilan peer Date: Wed Sep 6 17:32:40 2017 +0300 mac80211: Complete ampdu work schedule during session tear down Commit 7a7c0a6438b8 ("mac80211: fix TX aggregation start/stop callback race") added a cancellation of the ampdu work after the loop that stopped the Tx and Rx BA sessions. However, in some cases, e.g., during HW reconfig, the low level driver might call mac80211 APIs to complete the stopping of the BA sessions, which would queue the ampdu work to handle the actual completion. This work needs to be performed as otherwise mac80211 data structures would not be properly synced. Fix this by checking if BA session STOP_CB bit is set after the BA session cancellation and properly clean the session. Signed-off-by: Ilan Peer [Johannes: the work isn't flushed because that could do other things we don't want, and the locking situation isn't clear] Signed-off-by: Johannes Berg net/mac80211/ht.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 35eed7cb2cf1c58a225a0140729ba787fbb06c88 Merge: 56dfb70 1a41aa1 Author: Ralf Baechle Date: Wed Sep 6 13:36:09 2017 +0200 Merge tag 'spi-falcon-no-board-check' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into 4.14-features spi: Remove board check from the Falcon driver MIPS is removing this board check so support a cross tree merge. commit 56dfb7001a396ef6c7928adcb890043ff55e9977 Author: Matt Redfearn Date: Tue Aug 8 13:22:35 2017 +0100 MIPS: Refactor handling of stack pointer in get_frame_info Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. The code that was added violates code style rules with long lines caused by lots of nested conditionals. The added code interprets (inline) any known stack pointer manipulation instruction to find the stack frame size. Handling the microMIPS cases added quite a bit of complication to this function. Refactor is_sp_move_ins to perform the interpretation of the immediate as the instruction manipulating the stack pointer is found. This reduces the amount of indentation required in get_frame_info, and more closely matches the operation of is_ra_save_ins. Suggested-by: Maciej W. Rozycki Signed-off-by: Matt Redfearn Cc: Marcin Nowakowski Cc: Ingo Molnar Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16958/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 61 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 41885b02127c7ae169dc94542de4a8eed175495a Author: Matt Redfearn Date: Tue Aug 8 13:22:34 2017 +0100 MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems The stack unwinding code uses the mips_instuction union to decode the instructions it finds. That union uses the __BITFIELD_FIELD macro to reorder depending on endianness. The stack unwinding code always places 16bit instructions in halfword 1 of the union. This makes the union accesses correct for little endian systems. Similarly, 32bit instructions are reordered such that they are correct for little endian systems. This handling leaves unwinding the stack on big endian systems broken, as the mips_instruction union will then look for the fields in the wrong halfword. To fix this, use a logical shift to place the 16bit instruction into the correct position in the word field of the union. Use the same shifting to order the 2 halfwords of 32bit instuctions. Then replace accesses to the halfword with accesses to the shifted word. In the case of the ADDIUS5 instruction, switch to using the mm16_r5_format union member to avoid the need for a 16bit shift. Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Signed-off-by: Matt Redfearn Reviewed-by: James Hogan Cc: Marcin Nowakowski Cc: Ingo Molnar Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16956/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit cea8cd498f4f1c30ea27e3664b3c671e495c4fce Author: Matt Redfearn Date: Tue Aug 8 13:22:33 2017 +0100 MIPS: microMIPS: Fix decoding of swsp16 instruction When the immediate encoded in the instruction is accessed, it is sign extended due to being a signed value being assigned to a signed integer. The ISA specifies that this operation is an unsigned operation. The sign extension leads us to incorrectly decode: 801e9c8e: cbf1 sw ra,68(sp) As having an immediate of 1073741809. Since the instruction format does not specify signed/unsigned, and this is currently the only location to use this instuction format, change it to an unsigned immediate. Fixes: bb9bc4689b9c ("MIPS: Calculate microMIPS ra properly when unwinding the stack") Suggested-by: Paul Burton Signed-off-by: Matt Redfearn Reviewed-by: James Hogan Cc: Marcin Nowakowski Cc: Miodrag Dinic Cc: Ingo Molnar Cc: David Daney Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16957/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 2 +- arch/mips/kernel/process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a0ae2b08331a9882150618e0c81ea837e4a37ace Author: Matt Redfearn Date: Tue Aug 8 13:22:32 2017 +0100 MIPS: microMIPS: Fix decoding of addiusp instruction Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") added handling of microMIPS instructions to manipulate the stack pointer. Unfortunately the decoding of the addiusp instruction was incorrect, and performed a left shift by 2 bits to the raw immediate, rather than decoding the immediate and then performing the shift, as documented in the ISA. This led to incomplete stack traces, due to incorrect frame sizes being calculated. For example the instruction: 801faee0 : 801faee0: 4e25 addiu sp,sp,-952 As decoded by objdump, would be interpreted by the existing code as having manipulated the stack pointer by +1096. Fix this by changing the order of decoding the immediate and applying the left shift. Also change to accessing the instuction through the union to avoid the endianness problem of accesing halfword[0], which will fail on big endian systems. Cope with the special behaviour of immediates 0x0, 0x1, 0x1fe and 0x1ff by XORing with 0x100 again if mod(immediate) < 4. This logic was tested with the following test code: int main(int argc, char **argv) { unsigned int enc; int imm; for (enc = 0; enc < 512; ++enc) { int tmp = enc << 2; imm = -(signed short)(tmp | ((tmp & 0x100) ? 0xfe00 : 0)); unsigned short tmp = enc; tmp = (tmp ^ 0x100) - 0x100; if ((unsigned short)(tmp + 2) < 4) tmp ^= 0x100; imm = -(signed short)(tmp << 2); printf("%#x\t%d\t->\t(%#x\t%d)\t%#x\t%d\n", enc, enc, (short)tmp, (short)tmp, imm, imm); } return EXIT_SUCCESS; } Which generates the table: input encoding -> tmp (matching manual) frame size ----------------------------------------------------------------------- 0 0 -> (0x100 256) 0xfffffc00 -1024 0x1 1 -> (0x101 257) 0xfffffbfc -1028 0x2 2 -> (0x2 2) 0xfffffff8 -8 0x3 3 -> (0x3 3) 0xfffffff4 -12 ... 0xfe 254 -> (0xfe 254) 0xfffffc08 -1016 0xff 255 -> (0xff 255) 0xfffffc04 -1020 0x100 256 -> (0xffffff00 -256) 0x400 1024 0x101 257 -> (0xffffff01 -255) 0x3fc 1020 ... 0x1fc 508 -> (0xfffffffc -4) 0x10 16 0x1fd 509 -> (0xfffffffd -3) 0xc 12 0x1fe 510 -> (0xfffffefe -258) 0x408 1032 0x1ff 511 -> (0xfffffeff -257) 0x404 1028 Thanks to James Hogan for the test code & verifying the logic. Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Suggested-by: James Hogan Signed-off-by: Matt Redfearn Cc: Marcin Nowakowski Cc: Ingo Molnar Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16955/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b332fec0489295ee7a0aab4a89bd7257cd126f7f Author: Matt Redfearn Date: Tue Aug 8 13:22:31 2017 +0100 MIPS: microMIPS: Fix detection of addiusp instruction The addiusp instruction uses the pool16d opcode, with bit 0 of the immediate set. The test for the addiusp opcode erroneously did a logical and of the immediate with mm_addiusp_func, which has value 1, so this test always passes when the immediate is non-zero. Fix the test by replacing the logical and with a bitwise and. Fixes: 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.") Signed-off-by: Matt Redfearn Cc: Marcin Nowakowski Cc: Ingo Molnar Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16954/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11887ed172a6960673f130dad8f8fb42778f64d7 Author: Matt Redfearn Date: Tue Aug 8 13:22:30 2017 +0100 MIPS: Handle non word sized instructions when examining frame Commit 34c2f668d0f6b ("MIPS: microMIPS: Add unaligned access support.") added fairly broken support for handling 16bit microMIPS instructions in get_frame_info(). It adjusts the instruction pointer by 16bits in the case of a 16bit sp move instruction, but not any other 16bit instruction. Commit b6c7a324df37 ("MIPS: Fix get_frame_info() handling of microMIPS function size") goes some way to fixing get_frame_info() to iterate over microMIPS instuctions, but the instruction pointer is still manipulated using a postincrement, and is of union mips_instruction type. Since the union is sized to the largest member (a word), but microMIPS instructions are a mix of halfword and word sizes, the function does not always iterate correctly, ending up misaligned with the instruction stream and interpreting it incorrectly. Since the instruction modifying the stack pointer is usually the first in the function, that one is usually handled correctly. But the instruction which saves the return address to the sp is some variable number of instructions into the frame and is frequently missed due to not being on a word boundary, leading to incomplete walking of the stack. Fix this by incrementing the instruction pointer based on the size of the previously decoded instruction (& remove the hack introduced by commit 34c2f668d0f6b ("MIPS: microMIPS: Add unaligned access support.") which adjusts the instruction pointer in the case of a 16bit sp move instruction, but not any other). Fixes: 34c2f668d0f6b ("MIPS: microMIPS: Add unaligned access support.") Signed-off-by: Matt Redfearn Cc: Marcin Nowakowski Cc: James Hogan Cc: Ingo Molnar Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16953/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4e0854a74f08e6a9d847f2c2cfae7b07c931d125 Author: Emmanuel Grumbach Date: Wed Sep 6 13:45:40 2017 +0300 cfg80211: honor NL80211_RRF_NO_HT40{MINUS,PLUS} Honor the NL80211_RRF_NO_HT40{MINUS,PLUS} flags in reg_process_ht_flags_channel. Not doing so leads can lead to a firmware assert in iwlwifi for example. Fixes: b0d7aa59592b ("cfg80211: allow wiphy specific regdomain management") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/wireless/reg.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit a18097b7676bf5fb2677bf5e6cc24e721d7c2596 Author: Jonas Gorski Date: Tue Jul 18 12:17:29 2017 +0200 MIPS: ralink: allow NULL clock for clk_get_rate Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: 3f0a06b0368d ("MIPS: ralink: adds clkdev code") Reported-by: Mathias Kresin Signed-off-by: Jonas Gorski Cc: John Crispin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16778/ Signed-off-by: Ralf Baechle arch/mips/ralink/clk.c | 3 +++ 1 file changed, 3 insertions(+) commit 386787b1fcab2dd3d16ca3f46729aaafdef306e3 Author: Jonas Gorski Date: Tue Jul 18 12:17:28 2017 +0200 MIPS: Loongson 2F: allow NULL clock for clk_get_rate Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter, as some device drivers rely on this. Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: f8ede0f700f5 ("MIPS: Loongson 2F: Add CPU frequency scaling support") Reported-by: Mathias Kresin Signed-off-by: Jonas Gorski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16777/ Signed-off-by: Ralf Baechle arch/mips/loongson64/lemote-2f/clock.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b495faec231980b6c719994b24044ccc04ae06c Author: Jonas Gorski Date: Tue Jul 18 12:17:27 2017 +0200 MIPS: BCM63XX: allow NULL clock for clk_get_rate Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.") Reported-by: Mathias Kresin Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16776/ Signed-off-by: Ralf Baechle arch/mips/bcm63xx/clk.c | 3 +++ 1 file changed, 3 insertions(+) commit 585e0e9d02a690c29932b2fc0789835c7b91d448 Author: Jonas Gorski Date: Tue Jul 18 12:17:26 2017 +0200 MIPS: AR7: allow NULL clock for clk_get_rate Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: 780019ddf02f ("MIPS: AR7: Implement clock API") Signed-off-by: Jonas Gorski Reported-by: Mathias Kresin Cc: Paul Gortmaker Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16775/ Signed-off-by: Ralf Baechle arch/mips/ar7/clock.c | 3 +++ 1 file changed, 3 insertions(+) commit eebc6056d3d8af0f163a077621f79e459c656fa2 Author: Jonas Gorski Date: Sun Feb 19 23:37:07 2017 +0100 MIPS: BCM63XX: fix ENETDMA_6345_MAXBURST_REG offset The channels are only 0x40 bytes large, so 0x40 would be the next one's CHANCFG_REG. Also the position makes it clear that this was intended to be 0x04. So clearly a typo. Signed-off-by: Jonas Gorski Cc: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/15316/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 596a7a1d0989c621c3ae49be73a1d1f9de22eb5a Author: John Keeping Date: Wed Sep 6 10:35:40 2017 +0100 genirq/msi: Fix populating multiple interrupts On allocating the interrupts routed via a wire-to-MSI bridge, the allocator iterates over the MSI descriptors to build the hierarchy, but fails to use the descriptor interrupt number, and instead uses the base number, generating the wrong IRQ domain mappings. The fix is to use the MSI descriptor interrupt number when setting up the interrupt instead of the base interrupt for the allocation range. The only saving grace is that although the MSI descriptors are allocated in bulk, the wired interrupts are only allocated one by one (so desc->irq == virq) and the bug went unnoticed so far. Fixes: 2145ac9310b60 ("genirq/msi: Add msi_domain_populate_irqs") Signed-off-by: John Keeping Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170906103540.373864a2.john@metanate.com kernel/irq/msi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fcaa4a07d2a4b541e91da7a55d8b3331f96d1865 Author: Shrirang Bagul Date: Thu Aug 10 17:54:01 2017 +0800 HID: multitouch: Support ALPS PTP stick with pid 0x120A This patch adds ALPS PTP sticks with pid/device id 0x120A to the list of devices supported by hid-multitouch. Signed-off-by: Shrirang Bagul Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 4 ++++ 2 files changed, 5 insertions(+) commit 5b6b084728f78dadcdba7e48ecb88bc4dbfaa81a Author: Corey Minyard Date: Thu Aug 10 13:27:40 2017 -0500 mips: Save all registers when saving the frame The MIPS frame save code was just saving a few registers, enough to do a backtrace if every function set up a frame. However, this is not working if you are using DWARF unwinding, because most of the registers are wrong. This was causing kdump backtraces to be short or bogus. So save all the registers. Signed-off-by: Corey Minyard Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16989/ Signed-off-by: Ralf Baechle arch/mips/include/asm/stacktrace.h | 64 +++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 14 deletions(-) commit 866b6a89c6d1876fce25c152ef9f887b41ffcf7f Author: Corey Minyard Date: Thu Aug 10 13:27:39 2017 -0500 MIPS: Add DWARF unwinding to assembly This will allow kdump dumps to work correclty with MIPS and future DWARF unwinding of the stack to give accurate tracebacks. Signed-off-by: Corey Minyard Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16990/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 4 + arch/mips/include/asm/asm.h | 3 + arch/mips/include/asm/stackframe.h | 231 +++++++++++++++++++++---------------- arch/mips/kernel/genex.S | 13 ++- arch/mips/mm/tlbex-fault.S | 7 +- arch/mips/vdso/sigreturn.S | 10 -- 6 files changed, 151 insertions(+), 117 deletions(-) commit 56d859e11aad4016e1cf864d65a0954d83120571 Author: Pavel Tatashin Date: Fri Aug 25 18:06:04 2017 -0400 HID: multitouch: support buttons and trackpoint on Lenovo X1 Tab Gen2 On the 2nd generation Lenovo Tablet only clickpad is working; the trackpoint and three mouse buttons do not work. hid_multitouch must export all inputs in order to get trackpoint and buttons to function. Signed-off-by: Pavel Tatashin Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 9fef68686317bc9f85fb4e84e225d26ea2cb1cac Author: Corey Minyard Date: Thu Aug 10 13:27:38 2017 -0500 MIPS: Make SAVE_SOME more standard Modify the SAVE_SOME macro to look more like a standard function, doing the arithmetic for the frame on the SP register instead of copying it from K1, and by saving the stored EPC from the RA. This lets the get_frame_info() function process this function like any other. It also remove an instruction or two from the kernel entry, making it more efficient. unwind_stack_by_address() has special handling for the top of the interrupt stack, but without this change unwinding will still fail if you get an interrupt while handling an interrupt and try to do a traceback from the second interrupt. This change modifies the get_saved_sp macro to optionally store the fetched value right into sp and store the old SP value into K0. Then it's just a matter of subtracting the frame from SP and storing the old SP from K0. This required changing the DADDI workaround a bit, since K0 holds the SP, we had to use K1 for AT. But it eliminated some of the special handling for the DADDI workaround. Saving the RA register was moved up to before fetching the CP0_EPC register, so the CP0_EPC register could be stored into RA and the saved. This lets the traceback code know where RA is actually stored. Signed-off-by: Corey Minyard Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16991/ Signed-off-by: Ralf Baechle arch/mips/include/asm/stackframe.h | 51 +++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 14 deletions(-) commit d252f4a10fb9c8f7187c6c936ff530039f8cb799 Author: Jason Gerecke Date: Wed Aug 30 15:13:26 2017 -0700 HID: wacom: Correct coordinate system of touchring and pen twist The MobileStudio Pro, Cintiq Pro, and 2nd-gen Intuos Pro devices use a different coordinate system for their touchring and pen twist than prior devices. Prior devices had zero aligned to the tablet's left and would increase clockwise. Userspace expects data from the kernel to be in this old coordinate space, so adjustments are necessary. While the coordinate system for pen twist is formally defined by the HID standard, no such definition existed for the touchring at the time these tablets were introduced. Future tablets are expected to report touchring data using the same "zero-up clockwise-increasing" coordinate system defined for twist. Fixes: 50066a042d ("HID: wacom: generic: Add support for height, tilt, and twist usages") Fixes: 4922cd26f0 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Fixes: 60a2218698 ("HID: wacom: generic: add support for touchring") Cc: stable@vger.kernel.org # 4.10, 4.11 Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 73 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 5 deletions(-) commit b63c4c2718d641ba9bec888994f0cb0c23a1ef45 Author: Jason Gerecke Date: Wed Aug 30 15:13:25 2017 -0700 HID: wacom: Properly report negative values from Intuos Pro 2 Bluetooth The wacom driver's IRQ handler for Bluetooth reports from the 2nd-gen Intuos Pro does not correctly process negative numbers. Values for tilt and rotation (which can go negative) are instead interpreted as unsigned and so jump to very large values when the data should be negative. This commit properly casts the data to ensure we report negative numbers when necessary. Fixes: 4922cd2 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: stable@vger.kernel.org # v4.11 Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aee16625b193916d7616c37a1d20a703d9b3dd15 Author: Corey Minyard Date: Thu Aug 10 13:27:37 2017 -0500 MIPS: Fix issues in backtraces I saw two problems when doing backtraces: The compiler was putting a "fast return" at the top of some functions, before it set up the frame. The backtrace code would stop when it saw a jump instruction, so it would never get to the stack frame setup and would thus misinterpret it. To fix this, don't look for jump instructions until the frame setup has been seen. The assembly code here is: ffffffff80b885a0 : ffffffff80b885a0: c8a00003 bbit0 a1,0x0,ffffffff80b885b0 ffffffff80b885a4: 0000102d move v0,zero ffffffff80b885a8: 03e00008 jr ra ffffffff80b885ac: 00000000 nop ffffffff80b885b0: 67bdffd0 daddiu sp,sp,-48 ffffffff80b885b4: ffb00008 sd s0,8(sp) The second problem was the compiler was putting the last instruction of the frame save in the delay slot of the jump instruction. If it saved the RA in there, the backtrace could would miss it and misinterpret the frame. To fix this, make sure to process the instruction after the first jump seen. The assembly code for this is: ffffffff80806fd0 : ffffffff80806fd0: 67bdffd0 daddiu sp,sp,-48 ffffffff80806fd4: ffb30020 sd s3,32(sp) ffffffff80806fd8: 24130018 li s3,24 ffffffff80806fdc: ffb20018 sd s2,24(sp) ffffffff80806fe0: 3c12811c lui s2,0x811c ffffffff80806fe4: ffb10010 sd s1,16(sp) ffffffff80806fe8: 3c11811c lui s1,0x811c ffffffff80806fec: ffb00008 sd s0,8(sp) ffffffff80806ff0: 3c10811c lui s0,0x811c ffffffff80806ff4: 08201c03 j ffffffff8080700c ffffffff80806ff8: ffbf0028 sd ra,40(sp) Signed-off-by: Corey Minyard Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16992/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit e57f4e67a0c73ca1c3afb68928b917906bd82eaf Author: Hans de Goede Date: Tue Aug 22 08:37:52 2017 +0200 HID: multitouch: Fix system-control buttons not working Some laptops have system-control buttons (e.g. KEY_SLEEP) on the same interface as a hid-multitouch touch-pad. This commit fixes these buttons not working. Signed-off-by: Hans de Goede Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 1 + 1 file changed, 1 insertion(+) commit a3ae552b5259e6ffd8d124a9fa9923283af2828a Author: Nicholas Bishop Date: Mon Sep 4 15:40:42 2017 -0400 HID: add multi-input quirk for IDC6680 touchscreen The Ideacom 6680 touchscreen is found in the Dell Latitude 2100. It has two USB descriptors, the first of which has two input reports. The HID_QUIRK_MULTI_INPUT quirk is needed to keep the correct maximum value for ABS_X/ABS_Y (8191 instead of 65535). Signed-off-by: Nicholas Bishop Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 74aebed6dc13425233f2224668353cff7a112776 Author: Aaron Armstrong Skomra Date: Mon Aug 28 14:15:39 2017 -0700 HID: wacom: leds: Don't try to control the EKR's read-only LEDs Commit a50aac7193f1 introduces 'led.groups' and adds EKR support for these groups. However, unlike the other devices with LEDs, the EKR's LEDs are read-only and we shouldn't attempt to control them in wacom_led_control(). See bug: https://sourceforge.net/p/linuxwacom/bugs/342/ Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups") Cc: stable # 4.9 Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 3 +++ 1 file changed, 3 insertions(+) commit ce06760ba46b66dae50f2519ae76bd15e89b5710 Author: Ping Cheng Date: Thu Aug 31 15:50:03 2017 -0700 HID: wacom: bits shifted too much for 9th and 10th buttons Cintiq 12 has 10 expresskey buttons. The bit shift for the last two buttons were off by 5. Fixes: c7f0522 ("HID: wacom: Slim down wacom_intuos_pad processing") Signed-off-by: Ping Cheng Tested-by: Matthieu Robin Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed3266169972daaad9989144d96eb46a4bf42eac Author: Mathieu Malaterre Date: Tue Sep 5 18:38:59 2017 +0200 MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree The jz4740-rtc driver supports both jz4740 & jz4780, setup the compatible string to jz4780. Signed-off-by: Mathieu Malaterre Cc: Rob Herring Cc: Mark Rutland Cc: Linus Walleij Cc: Paul Cercueil Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17237/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/ingenic/jz4780.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c76a5ba29cb83eb26146c0f3f98a90e3c7752cd4 Author: Mathieu Malaterre Date: Tue Sep 5 18:38:58 2017 +0200 MIPS: Ci20: Enable RTC driver Update the Ci20's defconfig to enable the JZ4780's RTC driver. Signed-off-by: Mathieu Malaterre Cc: Rob Herring Cc: Mark Rutland Cc: Linus Walleij Cc: Paul Cercueil Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17236/ Signed-off-by: Ralf Baechle arch/mips/configs/ci20_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit f28a4b4ddf8e7181c6c0bc45603d65c4ab6b14f9 Author: Martin Schwidefsky Date: Thu Aug 17 18:17:49 2017 +0200 s390/mm: use a single lock for the fields in mm_context_t The three locks 'lock', 'pgtable_lock' and 'gmap_lock' in the mm_context_t can be reduced to a single lock. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu.h | 5 ----- arch/s390/include/asm/mmu_context.h | 2 -- arch/s390/mm/gmap.c | 8 ++++---- arch/s390/mm/pgalloc.c | 16 ++++++++-------- 4 files changed, 12 insertions(+), 19 deletions(-) commit 60f07c8ec5fae06c23e9fd7bab67dabce92b3414 Author: Martin Schwidefsky Date: Thu Aug 17 08:15:16 2017 +0200 s390/mm: fix race on mm->context.flush_mm The order in __tlb_flush_mm_lazy is to flush TLB first and then clear the mm->context.flush_mm bit. This can lead to missed flushes as the bit can be set anytime, the order needs to be the other way aronud. But this leads to a different race, __tlb_flush_mm_lazy may be called on two CPUs concurrently. If mm->context.flush_mm is cleared first then another CPU can bypass __tlb_flush_mm_lazy although the first CPU has not done the flush yet. In a virtualized environment the time until the flush is finally completed can be arbitrarily long. Add a spinlock to serialize __tlb_flush_mm_lazy and use the function in finish_arch_post_lock_switch as well. Cc: Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu.h | 2 ++ arch/s390/include/asm/mmu_context.h | 4 ++-- arch/s390/include/asm/tlbflush.h | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit b3e5dc45fd1ec2aa1de6b80008f9295eb17e0659 Author: Martin Schwidefsky Date: Wed Aug 16 14:10:01 2017 +0200 s390/mm: fix local TLB flushing vs. detach of an mm address space The local TLB flushing code keeps an additional mask in the mm.context, the cpu_attach_mask. At the time a global flush of an address space is done the cpu_attach_mask is copied to the mm_cpumask in order to avoid future global flushes in case the mm is used by a single CPU only after the flush. Trouble is that the reset of the mm_cpumask is racy against the detach of an mm address space by switch_mm. The current order is first the global TLB flush and then the copy of the cpu_attach_mask to the mm_cpumask. The order needs to be the other way around. Cc: Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 4 ++-- arch/s390/include/asm/tlbflush.h | 26 +++++--------------------- 2 files changed, 7 insertions(+), 23 deletions(-) commit 46fde9a9d204e322cf4fda391c30213633dcc17f Author: Harald Freudenberger Date: Wed Nov 9 15:00:23 2016 +0100 s390/zcrypt: externalize AP queue interrupt control KVM has a need to control the interrupts on real and virtualized AP queue devices. This fix provides a new function to control the interrupt facilities of an AP queue device. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ap.h | 36 ++++++++++++++++++++++++++++++++++++ drivers/s390/crypto/ap_asm.h | 9 ++++++--- drivers/s390/crypto/ap_queue.c | 24 +++++++++++++++++++++++- 3 files changed, 65 insertions(+), 4 deletions(-) commit 050349b5b71df52c24989037bd6515cb54c3ef35 Author: Harald Freudenberger Date: Tue Nov 8 11:54:28 2016 +0100 s390/zcrypt: externalize AP config info query KVM has a need to fetch the crypto configuration information as it is returned by the PQAP(QCI) instruction. This patch introduces a new API ap_query_configuration() which provides this info in a handy way for the caller. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ap.h | 26 ++++++++++++++++++++++++++ drivers/s390/crypto/ap_bus.c | 21 ++++++++++++++++----- drivers/s390/crypto/ap_bus.h | 11 ----------- 3 files changed, 42 insertions(+), 16 deletions(-) commit e7fc5146cfe4f1b10f2ed6c36b65248aa948abe8 Author: Tony Krowiak Date: Tue Nov 8 07:09:13 2016 +0100 s390/zcrypt: externalize test AP queue Under certain specified conditions, the Test AP Queue (TAPQ) subfunction of the Process Adjunct Processor Queue (PQAP) instruction will be intercepted by a guest VM. The guest VM must have a means for executing the intercepted instruction. The vfio_ap driver will provide an interface to execute the PQAP(TAPQ) instruction subfunction on behalf of a guest VM. The code for executing the AP instructions currently resides in the AP bus. This patch refactors the AP bus code to externalize access to the PQAP(TAPQ) instruction subfunction to make it available to the vfio_ap driver. Signed-off-by: Tony Krowiak Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ap.h | 64 ++++++++++++++++++++++++++++++++++++++++++ drivers/s390/crypto/ap_bus.c | 28 ++++++++++++++---- drivers/s390/crypto/ap_bus.h | 36 +----------------------- drivers/s390/crypto/ap_queue.c | 2 +- 4 files changed, 88 insertions(+), 42 deletions(-) commit 2fc4876ea8a9932e0d0bd84daf638186fcadd01f Author: Martin Schwidefsky Date: Thu Aug 31 13:18:22 2017 +0200 s390/mm: use VM_BUG_ON in crst_table_[upgrade|downgrade] The BUG_ON in crst_table_[upgrade|downgrade] is a debugging aid, replace it with VM_BUG_ON. Signed-off-by: Martin Schwidefsky arch/s390/mm/pgalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 184a09eb9a2fe425e49c9538f1604b05ed33cfef Author: Dennis Yang Date: Wed Sep 6 11:02:35 2017 +0800 md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list In release_stripe_plug(), if a stripe_head has its STRIPE_ON_UNPLUG_LIST set, it indicates that this stripe_head is already in the raid5_plug_cb list and release_stripe() would be called instead to drop a reference count. Otherwise, the STRIPE_ON_UNPLUG_LIST bit would be set for this stripe_head and it will get queued into the raid5_plug_cb list. Since break_stripe_batch_list() did not preserve STRIPE_ON_UNPLUG_LIST, A stripe could be re-added to plug list while it is still on that list in the following situation. If stripe_head A is added to another stripe_head B's batch list, in this case A will have its batch_head != NULL and be added into the plug list. After that, stripe_head B gets handled and called break_stripe_batch_list() to reset all the batched stripe_head(including A which is still on the plug list)'s state and reset their batch_head to NULL. Before the plug list gets processed, if there is another write request comes in and get stripe_head A, A will have its batch_head == NULL (cleared by calling break_stripe_batch_list() on B) and be added to plug list once again. Signed-off-by: Dennis Yang Cc: stable@vger.kernel.org (v4.1+) Signed-off-by: Shaohua Li drivers/md/raid5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b884026a2b80529fc7a4de729b92ee0ba555bfed Merge: e3e36ab c911171 Author: Olof Johansson Date: Tue Sep 5 20:41:43 2017 -0700 Merge branch 'next/dt64' into next/dt * next/dt64: (233 commits) arm64: dts: marvell: mcbin: enable more networking ports arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node arm64: dts: marvell: add TX interrupts for PPv2.2 arm64: dts: uniphier: add PXs3 SoC support arm64: dts: uniphier: fix size of sdctrl node arm64: dts: uniphier: add AIDET nodes arm64: dts: uniphier: add reset controller node of analog amplifier arm64: dts: marvell: add Device Tree files for Armada-8KP arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM dt-bindings: add rk3399-q7 SoM arm64: dts: rockchip: add rk3328-rock64 board arm64: dts: rockchip: add rk3328 pdm node ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names ARM64: dts: meson-gx: Add AO CEC nodes ARM64: dts: meson-gx: update AO clkc to new bindings arm64: dts: rockchip: add more rk3399 iommu nodes arm64: dts: rockchip: add rk3368 iommu nodes arm64: dts: rockchip: add rk3328 iommu nodes arm64: zynqmp: Add generic compatible string for I2C EEPROM ... commit e9e3969fe2d84e56b3ee5cd4f7e00f4516a885cb Merge: 826e08d 152b812 Author: Olof Johansson Date: Tue Sep 5 20:30:03 2017 -0700 Merge branch 'next/defconfig' into next/soc * next/defconfig: (45 commits) ARM: multi_v7_defconfig: make eSDHC driver built-in ARM: config: aspeed: Add I2C, VUART, LPC Snoop ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G ARM: davinci_all_defconfig: enable tinydrm and ST7586 ARM: defconfig: tegra: Enable ChipIdea UDC driver ARM: configs: Add Tegra I2S interfaces to multi_v7_defconfig ARM: tegra: Add Tegra I2S interfaces to defconfig ARM: tegra: Update default configuration for v4.13-rc1 ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL ARM: omap2plus_defconfig: Enable LP87565 ARM: omap2plus_defconfig: enable DP83867 phy driver ARM: configs: keystone: Enable D_CAN driver ARM: shmobile: Enable BQ32000 rtc in shmobile_defconfig ARM: configs: keystone: Enable MMC and regulators ARM: multi_v7_defconfig: Enable DMA for Renesas serial ports ARM: multi_v7_defconfig: Replace DRM_RCAR_HDMI by generic bridge options ARM: multi_v7_defconfig: Replace SND_SOC_RSRC_CARD by SND_SIMPLE_SCU_CARD ARM: shmobile: defconfig: Refresh ARM: shmobile: defconfig: Enable DMA for serial ports ARM: shmobile: defconfig: Replace DRM_RCAR_HDMI by generic bridge options ... commit 826e08d3531c6983eb6e8ee0c09bcf9022ae1227 Merge: 9ec8346 d303a86 Author: Olof Johansson Date: Tue Sep 5 20:29:54 2017 -0700 Merge branch 'next/arm64' into next/soc * next/arm64: arm64: defconfig: enable rockchip graphics arm64: defconfig: Enable QCOM IPQ8074 clock and pinctrl arm64: defconfig: add CONFIG_BRCMSTB_THERMAL arm64: defconfig: add recently added crypto drivers as modules arm64: defconfig: enable CONFIG_UNIPHIER_WATCHDOG arm64: defconfig: Enable CONFIG_WQ_POWER_EFFICIENT_DEFAULT arm64: defconfig: enable DMA driver for hi3660 arm64: defconfig: enable OP-TEE arm64: defconfig: enable support for serial port connected device arm64: defconfig: enable CONFIG_SYSCON_REBOOT_MODE arm64: defconfig: enable support hi6421v530 PMIC arm64: defconfig: enable Kirin PCIe arm64: defconfig: enable SCSI_HISI_SAS_PCI arm64: defconfig: Enable REGULATOR_AXP20X arm64: defconfig: Enable MFD_AXP20X_RSB arm64: select PINCTRL for ZTE platform arm64: defconfig: enable fine-grained task level IRQ time accounting arm64: defconfig: compile ak4613 and renesas sound as modules arm64: defconfig: enable nop-xceiv PHY driver commit 9ec83463d679a51560135ac8cf023567fbb6e4c0 Merge: a93fae7 2ad93fa Author: Olof Johansson Date: Tue Sep 5 20:29:46 2017 -0700 Merge branch 'next/cleanup' into next/soc * next/cleanup: soc: versatile: remove unnecessary static in realview_soc_probe() ARM: Convert to using %pOF instead of full_name ARM: hisi: Fix typo in comment ARM: OMAP4+: PRM: fix of_irq_get() result checks ARM: OMAP3+: PRM: fix of_irq_get() result check ARM: dts: dra72-evm-revc: workaround incorrect DP83867 RX_CTRL pin strap ARM: dts: dra71-evm: workaround incorrect DP83867 RX_CTRL pin strap ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe commit d4c759ee5faa51e0b0ee55d8a229ba5b80c4917e Author: Jaegeuk Kim Date: Tue Sep 5 17:04:35 2017 -0700 f2fs: use generic terms used for encrypted block management This patch renames functions regarding to buffer management via META_MAPPING used for encrypted blocks especially. We can actually use them in generic way. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 6 +++--- fs/f2fs/f2fs.h | 3 +-- fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 13 +++++++++---- fs/f2fs/segment.c | 3 +-- 5 files changed, 15 insertions(+), 12 deletions(-) commit 1958593e4fa9fa9e3e2d03b27e72af314c2891be Author: Jaegeuk Kim Date: Tue Sep 5 16:54:24 2017 -0700 f2fs: introduce f2fs_encrypted_file for clean-up This patch replaces (f2fs_encrypted_inode() && S_ISREG()) with f2fs_encrypted_file(), which gives no functional change. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 10 +++++----- fs/f2fs/f2fs.h | 5 +++++ fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 5 ++--- fs/f2fs/inline.c | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) commit 66bed8465a808400eb14562510e26c8818082cb8 Merge: 18fb0b4 3c8f3e9 Author: David S. Miller Date: Tue Sep 5 20:03:40 2017 -0700 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-09-05 This series contains fixes for i40e only. These two patches fix an issue where our nvmupdate tool does not work on RHEL 7.4 and newer kernels, in fact, the use of the nvmupdate tool on newer kernels can cause the cards to be non-functional unless these patches are applied. Anjali reworks the locking around accessing the NVM so that NVM acquire timeouts do not occur which was causing the failed firmware updates. Jake correctly updates the wb_desc when reading the NVM through the AdminQ. ==================== Signed-off-by: David S. Miller commit 18fb0b46d555dc42f52f69428dcd52f133877078 Merge: 39cebdb 6d9c153 Author: David S. Miller Date: Tue Sep 5 20:03:35 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 369130b63178e0e2f863a2da2a5ad0238ded6d9d Author: Mickaël Salaün Date: Mon Aug 7 01:23:37 2017 +0200 selftests: Enhance kselftest_harness.h to print which assert failed When a test process is not able to write to TH_LOG_STREAM, this step mechanism enable to print the assert number which triggered the failure. This can be enabled by setting _metadata->no_print to true at the beginning of the test sequence. Update the seccomp-bpf test to return 0 if a test succeeded. This feature is needed for the Landlock tests. Signed-off-by: Mickaël Salaün Cc: Andy Lutomirski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Link: https://lkml.kernel.org/r/CAGXu5j+D-FP8Kt9unNOqKrQJP4DYTpmgkJxWykZyrYiVPz3Y3Q@mail.gmail.com Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_harness.h | 39 +++++++++++++++++++++++---- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- 2 files changed, 35 insertions(+), 6 deletions(-) commit 3c8f3e96af3a6799841761923d000566645f0942 Author: Jacob Keller Date: Fri Sep 1 13:43:08 2017 -0700 i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq When introducing the functions to read the NVM through the AdminQ, we did not correctly mark the wb_desc. Fixes: 7073f46e443e ("i40e: Add AQ commands for NVM Update for X722", 2015-06-05) Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 1 + 1 file changed, 1 insertion(+) commit 09f79fd49d94cda5837e9bfd0cb222232b3b6d9f Author: Anjali Singhai Jain Date: Fri Sep 1 13:42:49 2017 -0700 i40e: avoid NVM acquire deadlock during NVM update X722 devices use the AdminQ to access the NVM, and this requires taking the AdminQ lock. Because of this, we lock the AdminQ during i40e_read_nvm(), which is also called in places where the lock is already held, such as the firmware update path which wants to lock once and then unlock when finished after performing several tasks. Although this should have only affected X722 devices, commit 96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices", 2016-12-02) added locking for all NVM reads, regardless of device family. This resulted in us accidentally causing NVM acquire timeouts on all devices, causing failed firmware updates which left the eeprom in a corrupt state. Create unsafe non-locked variants of i40e_read_nvm_word and i40e_read_nvm_buffer, __i40e_read_nvm_word and __i40e_read_nvm_buffer respectively. These variants will not take the NVM lock and are expected to only be called in places where the NVM lock is already held if needed. Since the only caller of i40e_read_nvm_buffer() was in such a path, remove it entirely in favor of the unsafe version. If necessary we can always add it back in the future. Additionally, we now need to hold the NVM lock in i40e_validate_checksum because the call to i40e_calc_nvm_checksum now assumes that the NVM lock is held. We can further move the call to read I40E_SR_SW_CHECKSUM_WORD up a bit so that we do not need to acquire the NVM lock twice. This should resolve firmware updates and also fix potential raise that could have caused the driver to report an invalid NVM checksum upon driver load. Reported-by: Stefan Assmann Fixes: 96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices", 2016-12-02) Signed-off-by: Anjali Singhai Jain Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 98 +++++++++++++++--------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 - 2 files changed, 60 insertions(+), 40 deletions(-) commit 9590d083c1bb1419b7992609d1a0a3e3517d3893 Author: Chuck Lever Date: Wed Aug 23 17:05:58 2017 -0400 xprtrdma: Use xprt_pin_rqst in rpcrdma_reply_handler Adopt the use of xprt_pin_rqst to eliminate contention between Call-side users of rb_lock and the use of rb_lock in rpcrdma_reply_handler. This replaces the mechanism introduced in 431af645cf66 ("xprtrdma: Fix client lock-up after application signal fires"). Use recv_lock to quickly find the completing rqst, pin it, then drop the lock. At that point invalidation and pull-up of the Reply XDR can be done. Both are often expensive operations. Finally, take recv_lock again to signal completion to the RPC layer. It also protects adjustment of "cwnd". This greatly reduces the amount of time a lock is held by the reply handler. Comparing lock_stat results shows a marked decrease in contention on rb_lock and recv_lock. Signed-off-by: Chuck Lever [trond.myklebust@primarydata.com: Remove call to rpcrdma_buffer_put() from the "out_norqst:" path in rpcrdma_reply_handler.] Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 2 ++ net/sunrpc/xprtrdma/rpc_rdma.c | 62 +++++++++++------------------------------ net/sunrpc/xprtrdma/transport.c | 1 - net/sunrpc/xprtrdma/verbs.c | 1 - net/sunrpc/xprtrdma/xprt_rdma.h | 30 -------------------- 5 files changed, 19 insertions(+), 77 deletions(-) commit 39cebdb77d55a193492a42170bf1c3d11e41e740 Merge: b1357cf f098003 Author: David S. Miller Date: Tue Sep 5 14:58:25 2017 -0700 Merge branch 'xgene-Misc-bug-fixes' Iyappan Subramanian says: ==================== drivers: net: xgene: Misc bug fixes This patch set fixes bugs related to handling the case for ACPI for, reading and programming tx/rx delay values. ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller commit f098003a7ee00c92e8ed7a8f8a49e4bd15f35bdd Author: Iyappan Subramanian Date: Tue Sep 5 11:16:32 2017 -0700 drivers: net: xgene: Remove return statement from void function commit 183db4 ("drivers: net: xgene: Correct probe sequence handling") changed the return type of xgene_enet_check_phy_handle() to void. This patch, removes the return statement from the last line. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 -- 1 file changed, 2 deletions(-) commit 5e338b36643210e0915a365892002af5211cc87b Author: Quan Nguyen Date: Tue Sep 5 11:16:31 2017 -0700 drivers: net: xgene: Configure tx/rx delay for ACPI This patch fixes configuring tx/rx delay values for ACPI. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9d7e72c088e3b18b5f6d028ad499d38a210d1928 Author: Iyappan Subramanian Date: Tue Sep 5 11:16:30 2017 -0700 drivers: net: xgene: Read tx/rx delay for ACPI This patch fixes reading tx/rx delay values for ACPI. Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1357cfb9dd1a511269b62d2c1c986865815335a Author: Zahari Doychev Date: Tue Sep 5 21:49:58 2017 +0200 rocker: fix kcalloc parameter order The function calls to kcalloc use wrong parameter order and incorrect flags values. GFP_KERNEL is used instead of flags now and the order is corrected. The change was done using the following coccinelle script: @@ expression E1,E2; type T; @@ -kcalloc(E1, E2, sizeof(T)) +kcalloc(E2, sizeof(T), GFP_KERNEL) Signed-off-by: Zahari Doychev Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f530f39f5ff97209cc6f1bf66e634685954ad741 Author: Håkon Bugge Date: Tue Sep 5 17:42:01 2017 +0200 rds: Fix non-atomic operation on shared flag variable The bits in m_flags in struct rds_message are used for a plurality of reasons, and from different contexts. To avoid any missing updates to m_flags, use the atomic set_bit() instead of the non-atomic equivalent. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Reviewed-by: Wei Lin Guay Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c8468dcf8303c68712f11c782d7d8724de07a73 Author: Jakub Kicinski Date: Tue Sep 5 08:31:23 2017 -0700 net: sched: don't use GFP_KERNEL under spin lock The new TC IDR code uses GFP_KERNEL under spin lock. Which leads to: [ 582.621091] BUG: sleeping function called from invalid context at ../mm/slab.h:416 [ 582.629721] in_atomic(): 1, irqs_disabled(): 0, pid: 3379, name: tc [ 582.636939] 2 locks held by tc/3379: [ 582.641049] #0: (rtnl_mutex){+.+.+.}, at: [] rtnetlink_rcv_msg+0x92e/0x1400 [ 582.650958] #1: (&(&tn->idrinfo->lock)->rlock){+.-.+.}, at: [] tcf_idr_create+0x2f0/0x8e0 [ 582.662217] Preemption disabled at: [ 582.662222] [] tcf_idr_create+0x2f0/0x8e0 [ 582.672592] CPU: 9 PID: 3379 Comm: tc Tainted: G W 4.13.0-rc7-debug-00648-g43503a79b9f0 #287 [ 582.683432] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.3.4 11/08/2016 [ 582.691937] Call Trace: ... [ 582.742460] kmem_cache_alloc+0x286/0x540 [ 582.747055] radix_tree_node_alloc.constprop.6+0x4a/0x450 [ 582.753209] idr_get_free_cmn+0x627/0xf80 ... [ 582.815525] idr_alloc_cmn+0x1a8/0x270 ... [ 582.833804] tcf_idr_create+0x31b/0x8e0 ... Try to preallocate the memory with idr_prealloc(GFP_KERNEL) (as suggested by Eric Dumazet), and change the allocation flags under spin lock. Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/act_api.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8b949bef9172ca69d918e93509a4ecb03d0355e0 Author: Jason Wang Date: Tue Sep 5 09:22:05 2017 +0800 vhost_net: correctly check tx avail during rx busy polling We check tx avail through vhost_enable_notify() in the past which is wrong since it only checks whether or not guest has filled more available buffer since last avail idx synchronization which was just done by vhost_vq_avail_empty() before. What we really want is checking pending buffers in the avail ring. Fix this by calling vhost_vq_avail_empty() instead. This issue could be noticed by doing netperf TCP_RR benchmark as client from guest (but not host). With this fix, TCP_RR from guest to localhost restores from 1375.91 trans per sec to 55235.28 trans per sec on my laptop (Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz). Fixes: 030881372460 ("vhost_net: basic polling support") Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/vhost/net.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5482a978b962abd23f17a004e46d255d11646c20 Author: Corentin Labbe Date: Mon Sep 4 18:30:14 2017 +0200 net: mdio-mux: add mdio_mux parameter to mdio_mux_init() mdio_mux_init() use the parameter dev for two distinct thing: 1) Have a device for all devm_ functions 2) Get device_node from it Since it is two distinct purpose, this patch add a parameter mdio_mux that is linked to task 2. This will also permit to register an of_node mdio-mux that lacks a direct owning device. For example a mdio-mux which is a subnode of a real device. Signed-off-by: Corentin Labbe Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-mux-bcm-iproc.c | 2 +- drivers/net/phy/mdio-mux-gpio.c | 2 +- drivers/net/phy/mdio-mux-mmioreg.c | 3 ++- drivers/net/phy/mdio-mux.c | 7 ++++--- include/linux/mdio-mux.h | 9 +++++++++ 5 files changed, 17 insertions(+), 6 deletions(-) commit fdade4f69e4ca29753963f858dc42c5f8faf1d0b Author: David Howells Date: Mon Sep 4 15:28:28 2017 +0100 rxrpc: Make service connection lookup always check for retry When an RxRPC service packet comes in, the target connection is looked up by an rb-tree search under RCU and a read-locked seqlock; the seqlock retry check is, however, currently skipped if we got a match, but probably shouldn't be in case the connection we found gets replaced whilst we're doing a search. Make the lookup procedure always go through need_seqretry(), even if the lookup was successful. This makes sure we always pick up on a write-lock event. On the other hand, since we don't take a ref on the object, but rely on RCU to prevent its destruction after dropping the seqlock, I'm not sure this is necessary. Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/conn_service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5e369aefdce4818c8264b81d3436eccf35af561e Author: Romain Perier Date: Mon Sep 4 10:41:36 2017 +0200 net: stmmac: Delete dead code for MDIO registration This code is no longer used, the logging function was changed by commit fbca164776e4 ("net: stmmac: Use the right logging function in stmmac_mdio_register"). It was previously showing information about the type of the IRQ, if it's polled, ignored or a normal interrupt. As we don't want information loss, I have moved this code to phy_attached_print(). Fixes: fbca164776e4 ("net: stmmac: Use the right logging function in stmmac_mdio_register") Signed-off-by: Romain Perier Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 16 ---------------- drivers/net/phy/phy_device.c | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 19 deletions(-) commit 5d621672bc1a1e5090c1ac5432a18c79e0e13e03 Author: Claudiu Manoil Date: Mon Sep 4 10:45:28 2017 +0300 gianfar: Fix Tx flow control deactivation The wrong register is checked for the Tx flow control bit, it should have been maccfg1 not maccfg2. This went unnoticed for so long probably because the impact is hardly visible, not to mention the tangled code from adjust_link(). First, link flow control (i.e. handling of Rx/Tx link level pause frames) is disabled by default (needs to be enabled via 'ethtool -A'). Secondly, maccfg2 always returns 0 for tx_flow_oldval (except for a few old boards), which results in Tx flow control remaining always on once activated. Fixes: 45b679c9a3ccd9e34f28e6ec677b812a860eb8eb ("gianfar: Implement PAUSE frame generation support") Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef18e3b9682b8e5187bccc3b3a052f2ead80201d Author: Ganesh Goudar Date: Mon Sep 4 11:25:34 2017 +0530 cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6 MPS_TX_INT_CAUSE[Bubble] is a normal condition for T6, hence ignore this interrupt for T6. Signed-off-by: Ganesh Goudar Signed-off-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 2de489f486219fd52e85b336f4feb9b3c4c09617 Author: Ganesh Goudar Date: Mon Sep 4 11:17:36 2017 +0530 cxgb4: Fix pause frame count in t4_get_port_stats MPS_STAT_CTL[CountPauseStatTx] and MPS_STAT_CTL[CountPauseStatRx] only control whether or not Pause Frames will be counted as part of the 64-Byte Tx/Rx Frame counters. These bits do not control whether Pause Frames are counted in the Total Tx/Rx Frames/Bytes counters. Signed-off-by: Ganesh Goudar Signed-off-by: Casey Leedom Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 128416acea9ffda4b6a0e08c8d549572e87533cd Author: Ganesh Goudar Date: Mon Sep 4 11:16:28 2017 +0530 cxgb4: fix memory leak do not reuse the loop counter which is used iterate over the ports, so that sched_tbl will be freed for all the ports. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1cfe6e9351c256ec6aebcf64223aa21dc7654257 Author: Jason Wang Date: Mon Sep 4 11:36:09 2017 +0800 tun: rename generic_xdp to skb_xdp Rename "generic_xdp" to "skb_xdp" to avoid confusing it with the generic XDP which will be done at netif_receive_skb(). Cc: Daniel Borkmann Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 7df13219d757054c49b62417479a3724621ca8ae Author: Jason Wang Date: Mon Sep 4 11:36:08 2017 +0800 tun: reserve extra headroom only when XDP is set We reserve headroom unconditionally which could cause unnecessary stress on socket memory accounting because of increased trusesize. Fix this by only reserve extra headroom when XDP is set. Cc: Jakub Kicinski Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 1efdf1776e2253b77413c997bed862410e4b6aaf Author: Arnd Bergmann Date: Tue Sep 5 09:13:20 2017 +0200 media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency We get a link error when V4L2_FLASH_LED_CLASS=m and AS3645A is built-in: drivers/leds/leds-as3645a.o: In function `as3645a_v4l2_setup': leds-as3645a.c:(.text+0x258): undefined reference to `v4l2_flash_init' leds-as3645a.c:(.text+0x284): undefined reference to `v4l2_flash_indicator_init' leds-as3645a.c:(.text+0x2a4): undefined reference to `v4l2_flash_release' drivers/leds/leds-as3645a.o: In function `as3645a_remove': leds-as3645a.c:(.text+0x784): undefined reference to `v4l2_flash_release' This adds the same Kconfig dependency that the other V4L2 flash drivers in drivers/leds use, to avoid that broken configuration. Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") Signed-off-by: Arnd Bergmann Acked-by: Jacek Anaszewski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/leds/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e7d0c41ecc2e372a81741a30894f556afec24315 Merge: 53ac64a 3689d3d Author: Linus Torvalds Date: Tue Sep 5 12:50:00 2017 -0700 Merge tag 'devprop-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "These introduce fwnode operations for all of the separate types of 'firmware nodes' that can be handled by the device properties framework, make the framework use const fwnode arguments all over, add a helper for the consolidated handling of node references and switch over the framework to the new UUID API. Specifics: - Introduce fwnode operations for all of the separate types of 'firmware nodes' that can be handled by the device properties framework and drop the type field from struct fwnode_handle (Sakari Ailus, Arnd Bergmann). - Make the device properties framework use const fwnode arguments where possible (Sakari Ailus). - Add a helper for the consolidated handling of node references to the device properties framework (Sakari Ailus). - Switch over the ACPI part of the device properties framework to the new UUID API (Andy Shevchenko)" * tag 'devprop-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: device property: Switch to use new generic UUID API device property: export irqchip_fwnode_ops device property: Introduce fwnode_property_get_reference_args device property: Constify fwnode property API device property: Constify argument to pset fwnode backend ACPI: Constify internal fwnode arguments ACPI: Constify acpi_bus helper functions, switch to macros ACPI: Prepare for constifying acpi_get_next_subnode() fwnode argument device property: Get rid of struct fwnode_handle type field ACPI: Use IS_ERR_OR_NULL() instead of non-NULL check in is_acpi_data_node() commit 53ac64aac9af8cd0e5456c8a9bb68c47b571b0a9 Merge: 4396440 298bd7f Author: Linus Torvalds Date: Tue Sep 5 12:45:03 2017 -0700 Merge tag 'acpi-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These include a usual ACPICA code update (this time to upstream revision 20170728), a fix for a boot crash on some systems with Thunderbolt devices connected at boot time, a rework of the handling of PCI bridges when setting up device wakeup, new support for Apple device properties, support for DMA configurations reported via ACPI on ARM64, APEI-related updates, ACPI EC driver updates and assorted minor modifications in several places. Specifics: - Update the ACPICA code in the kernel to upstream revision 20170728 including: * Alias operator handling update (Bob Moore). * Deferred resolution of reference package elements (Bob Moore). * Support for the _DMA method in walk resources (Bob Moore). * Tables handling update and support for deferred table verification (Lv Zheng). * Update of SMMU models for IORT (Robin Murphy). * Compiler and disassembler updates (Alex James, Erik Schmauss, Ganapatrao Kulkarni, James Morse). * Tools updates (Erik Schmauss, Lv Zheng). * Assorted minor fixes and cleanups (Bob Moore, Kees Cook, Lv Zheng, Shao Ming). - Rework the initialization of non-wakeup GPEs with method handlers in order to address a boot crash on some systems with Thunderbolt devices connected at boot time where we miss an early hotplug event due to a delay in GPE enabling (Rafael Wysocki). - Rework the handling of PCI bridges when setting up ACPI-based device wakeup in order to avoid disabling wakeup for bridges prematurely (Rafael Wysocki). - Consolidate Apple DMI checks throughout the tree, add support for Apple device properties to the device properties framework and use these properties for the handling of I2C and SPI devices on Apple systems (Lukas Wunner). - Add support for _DMA to the ACPI-based device properties lookup code and make it possible to use the information from there to configure DMA regions on ARM64 systems (Lorenzo Pieralisi). - Fix several issues in the APEI code, add support for exporting the BERT error region over sysfs and update APEI MAINTAINERS entry with reviewers information (Borislav Petkov, Dongjiu Geng, Loc Ho, Punit Agrawal, Tony Luck, Yazen Ghannam). - Fix a potential initialization ordering issue in the ACPI EC driver and clean it up somewhat (Lv Zheng). - Update the ACPI SPCR driver to extend the existing XGENE 8250 workaround in it to a new platform (m400) and to work around an Xgene UART clock issue (Graeme Gregory). - Add a new utility function to the ACPI core to support using ACPI OEM ID / OEM Table ID / Revision for system identification in blacklisting or similar and switch over the existing code already using this information to this new interface (Toshi Kani). - Fix an xpower PMIC issue related to GPADC reads that always return 0 without extra pin manipulations (Hans de Goede). - Add statements to print debug messages in a couple of places in the ACPI core for easier diagnostics (Rafael Wysocki). - Clean up the ACPI processor driver slightly (Colin Ian King, Hanjun Guo). - Clean up the ACPI x86 boot code somewhat (Andy Shevchenko). - Add a quirk for Dell OptiPlex 9020M to the ACPI backlight driver (Alex Hung). - Assorted fixes, cleanups and updates related to ACPI (Amitoj Kaur Chawla, Bhumika Goyal, Frank Rowand, Jean Delvare, Punit Agrawal, Ronald Tschalär, Sumeet Pawnikar)" * tag 'acpi-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (75 commits) ACPI / APEI: Suppress message if HEST not present intel_pstate: convert to use acpi_match_platform_list() ACPI / blacklist: add acpi_match_platform_list() ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources ACPI: make device_attribute const ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region ACPI: APEI: fix the wrong iteration of generic error status block ACPI / processor: make function acpi_processor_check_duplicates() static ACPI / EC: Clean up EC GPE mask flag ACPI: EC: Fix possible issues related to EC initialization order ACPI / PM: Add debug statements to acpi_pm_notify_handler() ACPI: Add debug statements to acpi_global_event_handler() ACPI / scan: Enable GPEs before scanning the namespace ACPICA: Make it possible to enable runtime GPEs earlier ACPICA: Dispatch active GPEs at init time ACPI: SPCR: work around clock issue on xgene UART ACPI: SPCR: extend XGENE 8250 workaround to m400 ACPI / LPSS: Don't abort ACPI scan on missing mem resource mailbox: pcc: Drop uninformative output during boot ACPI/IORT: Add IORT named component memory address limits ... commit 439644096c1a6afb9bd9953130f4444a856f76c5 Merge: b42a362 d97561f Author: Linus Torvalds Date: Tue Sep 5 12:19:08 2017 -0700 Merge tag 'pm-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "This time (again) cpufreq gets the majority of changes which mostly are driver updates (including a major consolidation of intel_pstate), some schedutil governor modifications and core cleanups. There also are some changes in the system suspend area, mostly related to diagnostics and debug messages plus some renames of things related to suspend-to-idle. One major change here is that suspend-to-idle is now going to be preferred over S3 on systems where the ACPI tables indicate to do so and provide requsite support (the Low Power Idle S0 _DSM in particular). The system sleep documentation and the tools related to it are updated too. The rest is a few cpuidle changes (nothing major), devfreq updates, generic power domains (genpd) framework updates and a few assorted modifications elsewhere. Specifics: - Drop the P-state selection algorithm based on a PID controller from intel_pstate and make it use the same P-state selection method (based on the CPU load) for all types of systems in the active mode (Rafael Wysocki, Srinivas Pandruvada). - Rework the cpufreq core and governors to make it possible to take cross-CPU utilization updates into account and modify the schedutil governor to actually do so (Viresh Kumar). - Clean up the handling of transition latency information in the cpufreq core and untangle it from the information on which drivers cannot do dynamic frequency switching (Viresh Kumar). - Add support for new SoCs (MT2701/MT7623 and MT7622) to the mediatek cpufreq driver and update its DT bindings (Sean Wang). - Modify the cpufreq dt-platdev driver to autimatically create cpufreq devices for the new (v2) Operating Performance Points (OPP) DT bindings and update its whitelist of supported systems (Viresh Kumar, Shubhrajyoti Datta, Marc Gonzalez, Khiem Nguyen, Finley Xiao). - Add support for Ux500 to the cpufreq-dt driver and drop the obsolete dbx500 cpufreq driver (Linus Walleij, Arnd Bergmann). - Add new SoC (R8A7795) support to the cpufreq rcar driver (Khiem Nguyen). - Fix and clean up assorted issues in the cpufreq drivers and core (Arvind Yadav, Christophe Jaillet, Colin Ian King, Gustavo Silva, Julia Lawall, Leonard Crestez, Rob Herring, Sudeep Holla). - Update the IO-wait boost handling in the schedutil governor to make it less aggressive (Joel Fernandes). - Rework system suspend diagnostics to make it print fewer messages to the kernel log by default, add a sysfs knob to allow more suspend-related messages to be printed and add Low Power S0 Idle constraints checks to the ACPI suspend-to-idle code (Rafael Wysocki, Srinivas Pandruvada). - Prefer suspend-to-idle over S3 on ACPI-based systems with the ACPI_FADT_LOW_POWER_S0 flag set and the Low Power Idle S0 _DSM interface present in the ACPI tables (Rafael Wysocki). - Update documentation related to system sleep and rename a number of items in the code to make it cleare that they are related to suspend-to-idle (Rafael Wysocki). - Export a variable allowing device drivers to check the target system sleep state from the core system suspend code (Florian Fainelli). - Clean up the cpuidle subsystem to handle the polling state on x86 in a more straightforward way and to use %pOF instead of full_name (Rafael Wysocki, Rob Herring). - Update the devfreq framework to fix and clean up a few minor issues (Chanwoo Choi, Rob Herring). - Extend diagnostics in the generic power domains (genpd) framework and clean it up slightly (Thara Gopinath, Rob Herring). - Fix and clean up a couple of issues in the operating performance points (OPP) framework (Viresh Kumar, Waldemar Rymarkiewicz). - Add support for RV1108 to the rockchip-io Adaptive Voltage Scaling (AVS) driver (David Wu). - Fix the usage of notifiers in CPU power management on some platforms (Alex Shi). - Update the pm-graph system suspend/hibernation and boot profiling utility (Todd Brandt). - Make it possible to run the cpupower utility without CPU0 (Prarit Bhargava)" * tag 'pm-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (87 commits) cpuidle: Make drivers initialize polling state cpuidle: Move polling state initialization code to separate file cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol cpufreq: imx6q: Fix imx6sx low frequency support cpufreq: speedstep-lib: make several arrays static, makes code smaller PM: docs: Delete the obsolete states.txt document PM: docs: Describe high-level PM strategies and sleep states PM / devfreq: Fix memory leak when fail to register device PM / devfreq: Add dependency on PM_OPP PM / devfreq: Move private devfreq_update_stats() into devfreq PM / devfreq: Convert to using %pOF instead of full_name PM / AVS: rockchip-io: add io selectors and supplies for RV1108 cpufreq: ti: Fix 'of_node_put' being called twice in error handling path cpufreq: dt-platdev: Drop few entries from whitelist cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2 ARM: ux500: don't select CPUFREQ_DT cpuidle: Convert to using %pOF instead of full_name cpufreq: Convert to using %pOF instead of full_name PM / Domains: Convert to using %pOF instead of full_name cpufreq: Cap the default transition delay value to 10 ms ... commit f9773b22a27a4234f436c9570afd62d905e00a13 Merge: 7af7a59 67af6f6 Author: Trond Myklebust Date: Tue Sep 5 15:16:04 2017 -0400 Merge tag 'nfs-rdma-for-4.14-1' of git://git.linux-nfs.org/projects/anna/linux-nfs into linux-next NFS-over-RDMA client updates for Linux 4.14 Bugfixes and cleanups: - Constify rpc_xprt_ops - Harden RPC call encoding and decoding - Clean up rpc call decoding to use xdr_streams - Remove unused variables from various structures - Refactor code to remove imul instructions - Rearrange rx_stats structure for better cacheline sharing commit 26fb2254dd33b02a522fac42745693f5969b7d4b Author: Chuck Lever Date: Mon Aug 28 15:06:22 2017 -0400 svcrdma: Estimate Send Queue depth properly The rdma_rw API adjusts max_send_wr upwards during the rdma_create_qp() call. If the ULP actually wants to take advantage of these extra resources, it must increase the size of its send completion queue (created before rdma_create_qp is called) and increase its send queue accounting limit. Use the new rdma_rw_mr_factor API to figure out the correct value to use for the Send Queue and Send Completion Queue depths. And, ensure that the chosen Send Queue depth for a newly created transport does not overrun the QP WR limit of the underlying device. Lastly, there's no longer a need to carry the Send Queue depth in struct svcxprt_rdma, since the value is used only in the svc_rdma_accept() path. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 0062818298662d0d05061949d12880146b5ebd65 Author: Chuck Lever Date: Mon Aug 28 15:06:14 2017 -0400 rdma core: Add rdma_rw_mr_payload() The amount of payload per MR depends on device capabilities and the memory registration mode in use. The new rdma_rw API hides both, making it difficult for ULPs to determine how large their transport send queues need to be. Expose the MR payload information via a new API. Signed-off-by: Chuck Lever Acked-by: Doug Ledford Signed-off-by: J. Bruce Fields drivers/infiniband/core/rw.c | 24 ++++++++++++++++++++++++ include/rdma/rw.h | 2 ++ 2 files changed, 26 insertions(+) commit 5a25bfd28c321e522dbe8083ad6219fa2a820610 Author: Chuck Lever Date: Mon Aug 28 15:06:06 2017 -0400 svcrdma: Limit RQ depth Ensure that the chosen Receive Queue depth for a newly created transport does not overrun the QP WR limit of the underlying device. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 193bcb7b3719a315814dce40fc8dcd1af786ea64 Author: Chuck Lever Date: Fri Aug 18 11:12:35 2017 -0400 svcrdma: Populate tail iovec when receiving So that NFS WRITE payloads can eventually be placed directly into a file's page cache, enable the RPC-over-RDMA transport to present these payloads in the xdr_buf's page list, while placing trailing content (such as a GETATTR operation) in the xdr_buf's tail. After this change, the RPC-over-RDMA's "copy tail" hack, added by commit a97c331f9aa9 ("svcrdma: Handle additional inline content"), is no longer needed and can be removed. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_rw.c | 108 ++++++-------------------------------- 1 file changed, 15 insertions(+), 93 deletions(-) commit eae03e2ac80a3476f0652cb0ee451d7b06d30564 Author: Chuck Lever Date: Fri Aug 18 11:12:27 2017 -0400 nfsd: Incoming xdr_bufs may have content in tail buffer Since the beginning, svcsock has built a received RPC Call message by populating the xdr_buf's head, then placing the remaining message bytes in the xdr_buf's page list. The xdr_buf's tail is never populated. This means that an NFSv4 COMPOUND containing an NFS WRITE operation plus trailing operations has a page list that contains the WRITE data payload followed by the trailing operations. NFSv4 XDR decoders will not look in the xdr_buf's tail, ever, because svcsock never put anything there. To support transports that can pass the write payload in the xdr_buf's pagelist and trailing content in the xdr_buf's tail, introduce logic in READ_BUF that switches to the xdr_buf's tail vec when the decoder runs out of content in rq_arg.pages. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 20 ++++++++++++++++++++ fs/nfsd/xdr4.h | 1 + 2 files changed, 21 insertions(+) commit 0828170f3d6a9d86d2cf5bcd00f1b1ff99f0c15e Merge: 7075a86 eebe53e Author: J. Bruce Fields Date: Tue Sep 5 15:11:47 2017 -0400 merge nfsd 4.13 bugfixes into nfsd for-4.14 branch commit 485a308f05d843034b6e82f688704c44888aecde Author: Jerome Brunet Date: Thu Aug 31 15:52:26 2017 +0200 ARM64: dts: meson-gxbb: nanopi-k2: enable sdr104 mode SDR104 seems to be OK on the nanopi-k2 SBC so enable it Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1429e20a5a9f578e0e3ddb551c8ea94e8d3ddb3 Author: Jerome Brunet Date: Thu Aug 31 15:52:25 2017 +0200 ARM64: dts: meson-gxbb: nanopi-k2: enable sdcard UHS modes Enable UHS modes, up to SDR50, on the nanopi-k2 SBC. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 +++ 1 file changed, 3 insertions(+) commit 0f553358241a3346b7eef133d631e5bc2f067a15 Author: Jerome Brunet Date: Thu Aug 31 15:52:24 2017 +0200 ARM64: dts: meson-gxbb: p20x: enable sdcard UHS modes Enable sdcard UHS modes, up to SDR50, on p20x based boards. While the s905 supports SDR104 mode, it appears that the PCB of p20x based boards can't cope with a rate as high as 200Mhz. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 3cde63ebc85cea63806d86a690d04457c0347703 Author: Jerome Brunet Date: Thu Aug 31 15:52:23 2017 +0200 ARM64: dts: meson-gxl: libretech-cc: enable high speed modes Enable sdcard UHS modes up to SDR50. Unfortunately, it seems the PCB of the libretech-cc cannot handle SDR104 at 200Mhz reliably. Also enable eMMC DDR52 mode. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 8a5085c420d272af04552b2d2213471247fa86f2 Author: Jerome Brunet Date: Thu Aug 31 15:52:22 2017 +0200 ARM64: dts: meson-gxl: libretech-cc: add card regulator settle times Changing the card voltage on the cc is not instantaneous, especially when switching from 3.3v to 1.8v. It take at least 30ms for the regulator to go from 3.3v to 1.8v. Add margin to that to make sure we don't upset the sdcard during the voltage switch Fixes: 61ff2af9b278 ("ARM64: dts: fixup libretech cc definition") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 3 +++ 1 file changed, 3 insertions(+) commit 42776561a1def5d96699574efd7c9cbbd2e0fbc4 Author: Jerome Brunet Date: Thu Aug 31 15:52:21 2017 +0200 ARM64: dts: meson-gxbb: nanopi-k2: add card regulator settle times Changing the card voltage on the nanopi-k2 is not instantaneous, especially when switching from 3.3v to 1.8v. It take at least 3ms for the regulator to go from 3.3v to 1.8v. Add margin to that to make sure we don't upset the sdcard during the voltage switch Fixes: 9bc7ffb08daf ("arm64: dts: amlogic: Add NanoPi K2") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 +++ 1 file changed, 3 insertions(+) commit 67e7607fcdf1fad10e9f183424e709c59713e45d Author: Jerome Brunet Date: Thu Aug 31 15:52:20 2017 +0200 ARM64: dts: meson: add mmc clk gate pins Add the pinctrl to switch mmc clk pins in gpio (pulled down) mode. This is necessary to be able to gate the clk outside of the SoC while keeping it running in the controller Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 11 +++++--- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 8 ++++-- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 9 ++++-- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 33 ++++++++++++++++++++++ .../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 6 ++-- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 6 ++-- .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 9 ++++-- .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 9 ++++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 33 ++++++++++++++++++++++ .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 6 ++-- 13 files changed, 126 insertions(+), 31 deletions(-) commit 673ccaaccf32a044d961c3bac3dd63452bdfa86c Author: Jerome Brunet Date: Thu Aug 31 15:52:19 2017 +0200 ARM64: dts: meson: remove cap-sd-highspeed from emmc nodes It does not make much sense to define cap-sd-highspeed in the emmc nodes Just remove it. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 1 - 11 files changed, 11 deletions(-) commit 50662499f9112ecced68d064846a2f1fd9640b66 Author: Jerome Brunet Date: Thu Aug 31 15:52:18 2017 +0200 ARM64: dts: meson-gx: Use correct mmc clock source 0 Now that the clock source 0 is properly described in the CCF, use it instead of assuming the default value (xtal) Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 +++--- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit b42a362e6d10c342004b183defcb9940331b6737 Merge: 70b8e9e de6c507 Author: Linus Torvalds Date: Tue Sep 5 11:54:41 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID update from Jiri Kosina: - Wacom driver fixes/updates (device name generation improvements, touch ring status support) from Jason Gerecke - T100 touchpad support from Hans de Goede - support for batteries driven by HID input reports, from Dmitry Torokhov - Arnd pointed out that driver_lock semaphore is superfluous, as driver core already provides all the necessary concurency protection. Removal patch from Binoy Jayan - logical minimum numbering improvements in sensor-hub driver, from Srinivas Pandruvada - support for Microsoft Win8 Wireless Radio Controls extensions from João Paulo Rechi Vita - assorted small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (28 commits) HID: prodikeys: constify snd_rawmidi_ops structures HID: sensor: constify platform_device_id HID: input: throttle battery uevents HID: usbmouse: constify usb_device_id and fix space before '[' error HID: usbkbd: constify usb_device_id and fix space before '[' error. HID: hid-sensor-hub: Force logical minimum to 1 for power and report state HID: wacom: Do not completely map WACOM_HID_WD_TOUCHRINGSTATUS usage HID: asus: Add T100CHI bluetooth keyboard dock touchpad support HID: ntrig: constify attribute_group structures. HID: logitech-hidpp: constify attribute_group structures. HID: sensor: constify attribute_group structures. HID: multitouch: constify attribute_group structures. HID: multitouch: use proper symbolic constant for 0xff310076 application HID: multitouch: Support Asus T304UA media keys HID: multitouch: Support HID_GD_WIRELESS_RADIO_CTLS HID: input: optionally use device id in battery name HID: input: map digitizer battery usage HID: Remove the semaphore driver_lock HID: wacom: add USB_HID dependency HID: add ALWAYS_POLL quirk for Logitech 0xc077 ... commit 9e776f225dcf741ff7e91d866be752d1660d2073 Merge: f1c2edd c837fc8 Author: David S. Miller Date: Tue Sep 5 11:53:34 2017 -0700 Merge branch 'dsa-tx-queues' Florian Fainelli says: ==================== net: dsa: Allow switch drivers to indicate number of TX queues This patch series extracts the parts of the patch set that are likely not to be controversial and actually bringing multi-queue support to DSA-created network devices. With these patches, we can now use sch_multiq as documented under Documentation/networking/multique.txt and let applications dedice the switch port output queue they want to use. Currently only Broadcom tags utilize that information. Resending based on David's feedback regarding the patches not in patchwork. Changes in v2: - use a proper define for the number of TX queues in bcm_sf2.c (Andrew) Changes from RFC: - dropped the ability to configure RX queues since we don't do anything with those just yet - dropped the patches that dealt with binding the DSA slave network devices queues with their master network devices queues this will be worked on separately. ==================== Signed-off-by: David S. Miller commit c837fc81d67fd807f7d675412e9bb2706f9ee6f9 Author: Florian Fainelli Date: Sun Sep 3 20:27:03 2017 -0700 net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping Even though TC2QOS mapping is for switch egress queues, we need to configure it correclty in order for the Broadcom tag ingress (CPU -> switch) queue selection to work correctly since there is a 1:1 mapping between switch egress queues and ingress queues. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 18118377391a266fbd0864b4c65f5c80f231c297 Author: Florian Fainelli Date: Sun Sep 3 20:27:02 2017 -0700 net: dsa: bcm_sf2: Advertise number of egress queues The switch supports 8 egress queues per port, so indicate that such that net/dsa/slave.c::dsa_slave_create can allocate the right number of TX queues. While at it use SF2_NUM_EGRESS_QUEUE as a define for the number of queues we support. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 5 ++++- drivers/net/dsa/bcm_sf2_regs.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 0f15b0986996a4d45090c0010728055c6aa2b458 Author: Florian Fainelli Date: Sun Sep 3 20:27:01 2017 -0700 net: dsa: tag_brcm: Set output queue from skb queue mapping We originally used skb->priority but that was not quite correct as this bitfield needs to contain the egress switch queue we intend to send this SKB to. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/tag_brcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55199df6d2af55be414f40856efcb527811001bb Author: Florian Fainelli Date: Sun Sep 3 20:27:00 2017 -0700 net: dsa: Allow switch drivers to indicate number of TX queues Let switch drivers indicate how many TX queues they support. Some switches, such as Broadcom Starfighter 2 are designed with 8 egress queues. Future changes will allow us to leverage the queue mapping and direct the transmission towards a particular queue. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 3 +++ net/dsa/slave.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit f1c2eddf4cb6a6c8ca5f6e728e7328b9c5bc3e8a Author: Ido Schimmel Date: Sun Sep 3 17:44:13 2017 +0300 bridge: switchdev: Use an helper to clear forward mark Instead of using ifdef in the C file. Signed-off-by: Ido Schimmel Suggested-by: Nikolay Aleksandrov Tested-by: Yotam Gigi Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 4 +--- net/bridge/br_private.h | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 70b8e9eb3b50d8bded63f808b09c4844ef63c3b8 Merge: d16605c 02b6bdd Author: Linus Torvalds Date: Tue Sep 5 11:49:48 2017 -0700 Merge tag 'gpio-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of the GPIO changes for the v4.14 cycle. Not so much changes this time, phew. David Daney and Bartosz Golaszewski did all the really interesting work in infrastructure improvement across GPIO and IRQ core, hats off for them and to tglx and Marc Z for general help with these patch sets. Core changes: - Allow the GPIO irqchip to allocate IRQs dynamically. This is an important change on systems where only a restricted number of IRQs, lesser than the number of GPIO lines, can be utilized. Now we can allocate these on a first-come-first-served basis instead of hogging up valuable IRQ lines. - Serious fix-up of the kerneldoc documentation and inclusion into the kerneldoc builds. - Pulled in the IRQ simulator from the IRQ core tree and use this in the GPIO mockup driver for exhaustive testing of interrupt abilities. New drivers: - New driver for ThunderX and OCTEON-TX. This is especially interesting as it picks up improvements from the IRQ core that allow us to handle fasteoi ACKs upwards in a hierarchy when there are IRQ flag latches on several levels in a hierarchy. Very interesting work here. - New subdriver for Renesas R-Car r8a7745 (RZ/G1E). Misc: - Several fixes and improvements for Xilinx Zynq GPIO. - Support an enablement GPIO for the 74x164 GPIO. - Switch a bunch of chips to use devres to allocate irq descriptors. - A bunch of constification fixes" * tag 'gpio-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (63 commits) gpio: mockup: remove unused variable gc gpio: pl061: constify amba_id Revert "gpiolib: request the gpio before querying its direction" gpio: twl6040: remove unneeded forward declaration gpio: zevio: make gpio_chip const gpio: add gpio_add_lookup_tables() to add several tables at once gpio: rcar: Add r8a7745 (RZ/G1E) support gpio: brcmstb: check return value of gpiochip_irqchip_add() MAINTAINERS: Add entry for THUNDERX GPIO Driver. gpio: Add gpio driver support for ThunderX and OCTEON-TX gpio: mockup: use irq_sim gpio: mxs: use devres for irq generic chip gpio: mxc: use devres for irq generic chip gpio: pch: use devres for irq generic chip gpio: ml-ioh: use devres for irq generic chip gpio: sta2x11: use devres for irq generic chip gpio: sta2x11: disallow unbinding the driver gpio: mxs: disallow unbinding the driver gpio: mxc: disallow unbinding the driver gpio: aspeed: Remove reference to clock name in debounce warning message ... commit 691223ec9798a617cb372470f4bf37e312d15063 Author: Thomas Meyer Date: Sun Sep 3 14:19:31 2017 +0200 net/mlx4_core: 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 Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 5 +++-- drivers/net/ethernet/mellanox/mlx4/main.c | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit d16605c9128a498f9b8575b5c43be95c45dbcfab Merge: fe9e3138 ac059e2 Author: Linus Torvalds Date: Tue Sep 5 11:45:33 2017 -0700 Merge tag 'pinctrl-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the big bulk of pin control changes for the v4.14 kernel. There are just a few bigger changes (new drivers mostly) and then a lot of small patches all over the place. Core changes: - Decision to wrap the sleep mode of the Spreadtrum and in the future others into a specially tagged state. The generic DT bindings and the new Spreadtrum driver conforms to this. Others should be moved over if possible. New drivers: - Spreadtrum SoCs especially the SC9860 SoC. - Storlink/Cortina Gemini 3512 and 3516 SoCs. New subdrivers: - Intel Denverton subdriver. - Intel Cannon Lake subdriver. - Intel Lewisburg subdriver. - Allwinner sunxi: R40 subdriver for A10. - Socionext uniphier PXs3 subdriver. - Rockchip RK3128 subdriver. - Renesas SH-PFC R8A77995 subdriver. Miscellaneous: - Qualcomm APQ8064 can handle general purpose clock muxing. - Mediatek MT7623 PCIe mux data fixed up. - Intel GPIO IRQs are disabled during suspend. - Several fixes and addtions to Renesas r8a7796. - Qualcomm SPMI GPIO supports dtest route and LV/MV subtype. - Input schmitt trigger support in Rockchip RV1108. - Aspeed G4 and G5 USB host/device pin control control added. - Qualcomm IPQ4019 has matured with a few missing pin groups and control bits put in place. - Lots of constification, this is the latest in cocinelle fixes" * tag 'pinctrl-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (147 commits) Revert "pinctrl: sunxi: Don't enforce bias disable (for now)" pinctrl: uniphier: fix members of rmii group for Pro4 pinctrl: Delete an error message pinctrl: core: Delete an error message pinctrl: intel: Read back TX buffer state pinctrl: rockchip: Add rv1108 recalculated iomux support pinctrl: intel: Decrease indentation in intel_gpio_set() pinctrl: rza1: Remove suffix from gpiochip label pinctrl: qcom: spmi-gpio: Correct power_source range check pinctrl: freescale: make mxs_regs const pinctrl: aspeed: Rework strap register write logic for the AST2500 pinctrl: rza1: off by one in rza1_parse_gpiochip() pinctrl: qcom: General Purpose clocks for apq8064 pinctrl: sprd: Add Spreadtrum pin control driver dt-bindings: pinctrl: Add DT bindings for Spreadtrum SC9860 pinctrl: Add sleep related state to indicate sleep related configs pinctrl: mediatek: update PCIe mux data for MT7623 pinctrl: intel: Add Intel Lewisburg GPIO support pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support pinctrl: aspeed: Fix ast2500 strap register write logic ... commit fe9e31383e9a271a9b404488704e00acd1747ee3 Merge: b88f557 00ee929 Author: Linus Torvalds Date: Tue Sep 5 11:43:30 2017 -0700 Merge tag 'regulator-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This is an extremely quiet release for the regulator subsystem, it's all fairly minor fixes and cleanups plus a few new drivers and ddevice ID additions: - Support for MediaTek MT6380, Ricoh RC5T619 and ST Voltage Reference Buffers" * tag 'regulator-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (24 commits) regulator: Add support for stm32-vrefbuf regulator: Add STM32 Voltage Reference Buffer regulator: pv88090: Exception handling for out of bounds regulator: da9063: Return an error code on probe failure regulator: rn5t618: add RC5T619 PMIC support regulator: ltc3589: constify i2c_device_id regulator: fan53555: fix I2C device ids regulator: add fixes with MT6397 dt-bindings shouldn't reference driver regulator: add fixes with MT6323 dt-bindings shouldn't reference driver regulator: add fixes with MT6311 dt-bindings shouldn't reference driver regulator: Add document for MediaTek MT6380 regulator regulator: mt6380: Add support for MT6380 regulator: pwm-regulator: Remove unneeded gpiod NULL check regulator: core: fix a possible race in disable_work handling regulator: fan53555: Use of_device_get_match_data() to simplify probe regulator: of: regulator_of_get_init_data() missing of_node_get() regulator: pwm-regulator: fix example syntax regulator: Convert to using %pOF instead of full_name regulator: cpcap: Add OF mode mapping regulator: cpcap: Fix standby mode ... commit 5fd4bf6a659e45251a91b04485318570554651b2 Author: Fabio Estevam Date: Thu Aug 31 14:52:10 2017 -0300 PCI: xilinx-nwl: Fix platform_get_irq() error handling When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Michal Simek drivers/pci/host/pcie-xilinx-nwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b88f55774f20c0c306e0a95d22ca9ab5f08187c7 Merge: 16a832a2 ecb478b Author: Linus Torvalds Date: Tue Sep 5 11:40:38 2017 -0700 Merge tag 'spi-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A fairly quiet release for the SPI subsystem: - Move to using IDR for allocating bus numbers - Modernisation of the ep93xx driver, removing a lot of open coding and using the framework more - The tools have been moved to use the standard tools build system and an install target added (there will be a fairly trivial conflict with tip resulting from the changes in the main tools Makefile) - A refactoring of the Qualcomm QUP driver which enables new variants to be supported - Explicit support for the Freescale i.MX53 and i.MX6 SPI, Renesas R-Car H3 and Rockchip RV1108 controllers" * tag 'spi-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (71 commits) spi: spi-falcon: drop check of boot select spi: imx: fix use of native chip-selects with devicetree spi: pl022: constify amba_id spi: imx: fix little-endian build spi: omap: Allocate bus number from spi framework spi: Kernel coding style fixes spi: imx: dynamic burst length adjust for PIO mode spi: Pick spi bus number from Linux idr or spi alias spi: rockchip: configure CTRLR1 according to size and data frame spi: altera: Consolidate TX/RX data register access spi: altera: Switch to SPI core transfer queue management spi: rockchip: add compatible string for rv1108 spi spi: qup: fix 64-bit build warning spi: qup: hide warning for uninitialized variable spi: spi-ep93xx: use the default master transfer queueing mechanism spi: spi-ep93xx: remove private data 'current_msg' spi: spi-ep93xx: pass the spi_master pointer around spi: spi-ep93xx: absorb the interrupt enable/disable helpers spi: spi-ep93xx: add spi master prepare_transfer_hardware() spi: spi-ep93xx: use 32-bit read/write for all registers ... commit c4492d8ade52861392e5f5b7615d7d6b335b1a7b Merge: 2c08ab3 1eed4df Author: David S. Miller Date: Tue Sep 5 11:40:08 2017 -0700 Merge branch 'flow_dissector-fixes' Tom Herbert says: ==================== flow_dissector: Flow dissector fixes This patch set fixes some basic issues with __skb_flow_dissect function. Items addressed: - Cleanup control flow in the function; in particular eliminate a bunch of goto's and implement a simplified control flow model - Add limits for number of encapsulations and headers that can be dissected v2: - Simplify the logic for limits on flow dissection. Just set the limit based on the number of headers the flow dissector can processes. The accounted headers includes encapsulation headers, extension headers, or other shim headers. Tested: Ran normal traffic, GUE, and VXLAN traffic. ==================== Signed-off-by: David S. Miller commit 1eed4dfb81b193af3299edeed2827337f9999e78 Author: Tom Herbert Date: Fri Sep 1 14:04:12 2017 -0700 flow_dissector: Add limit for number of headers to dissect In flow dissector there are no limits to the number of nested encapsulations or headers that might be dissected which makes for a nice DOS attack. This patch sets a limit of the number of headers that flow dissector will parse. Headers includes network layer headers, transport layer headers, shim headers for encapsulation, IPv6 extension headers, etc. The limit for maximum number of headers to parse has be set to fifteen to account for a reasonable number of encapsulations, extension headers, VLAN, in a packet. Note that this limit does not supercede the STOP_AT_* flags which may stop processing before the headers limit is reached. Reported-by: Hannes Frederic Sowa Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/core/flow_dissector.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 3a1214e8b06317b4e71cd3a36344df87b7858e19 Author: Tom Herbert Date: Fri Sep 1 14:04:11 2017 -0700 flow_dissector: Cleanup control flow __skb_flow_dissect is riddled with gotos that make discerning the flow, debugging, and extending the capability difficult. This patch reorganizes things so that we only perform goto's after the two main switch statements (no gotos within the cases now). It also eliminates several goto labels so that there are only two labels that can be target for goto. Reported-by: Alexander Popov Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/flow_dissector.h | 8 ++ net/core/flow_dissector.c | 223 ++++++++++++++++++++++++++++--------------- 2 files changed, 153 insertions(+), 78 deletions(-) commit 81edd471a61474de1ea772f27a3c734a68a09cc6 Author: Fabio Estevam Date: Thu Aug 31 14:52:09 2017 -0300 PCI: rockchip: Fix platform_get_irq() error handling When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Shawn Lin drivers/pci/host/pcie-rockchip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef75369a5b9afc8b45456218790f0f12906b7065 Author: Fabio Estevam Date: Thu Aug 31 14:52:07 2017 -0300 PCI: altera: Fix platform_get_irq() error handling platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Ley Foon Tan drivers/pci/host/pcie-altera-msi.c | 4 ++-- drivers/pci/host/pcie-altera.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 16a832a21f4e2c8b089935429efa646b626b9e82 Merge: bafb076 3984434 Author: Linus Torvalds Date: Tue Sep 5 11:35:16 2017 -0700 Merge tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - pnd2_edac: A minimal sideband driver (Tony Luck) - small-ish cleanups and fixes all over the place * tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, mce_amd: Get rid of local var in amd_filter_mce() EDAC, mce_amd: Get rid of most struct cpuinfo_x86 uses EDAC, mce_amd: Rename decode_smca_errors() to decode_smca_error() EDAC: Make device_type const EDAC, pnd2: Properly toggle hidden state for P2SB PCI device EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR EDAC, pnd2: Mask off the lower four bits of a BAR EDAC, thunderx: Fix error handling path in thunderx_lmc_probe() EDAC, altera: Fix error handling path in altr_edac_device_probe() EDAC, pnd2: Build in a minimal sideband driver for Apollo Lake EDAC, sb_edac: Classify memory mirroring modes EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name EDAC: Get rid of mci->mod_ver EDAC: Constify attribute_group structures EDAC, mce_amd: Use cpu_to_node() to find the node ID commit 343ce0cdfae16828d18e9228e26dd19ecc3a457f Author: Fabio Estevam Date: Thu Aug 31 14:52:05 2017 -0300 PCI: spear13xx: Fix platform_get_irq() error handling platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Pratyush Anand drivers/pci/dwc/pcie-spear13xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16df7cdb9e9dfc459b5749f8139d1e58fb5cf649 Author: Fabio Estevam Date: Thu Aug 31 14:52:04 2017 -0300 PCI: artpec6: Fix platform_get_irq() error handling platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Niklas Cassel drivers/pci/dwc/pcie-artpec6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0fe5f1cd0bf08f7640c3ce945766a1af2049893e Author: Fabio Estevam Date: Thu Aug 31 14:52:03 2017 -0300 PCI: armada8k: Fix platform_get_irq() error handling platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Cc: Thomas Petazzoni drivers/pci/dwc/pcie-armada8k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f3ec75245ee9c85578a50d090029d1726105a4d Author: Fabio Estevam Date: Thu Aug 31 14:52:02 2017 -0300 PCI: dra7xx: Fix platform_get_irq() error handling When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-dra7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1df5a487c8b338105930310eb9a876d9ad1646cb Author: Fabio Estevam Date: Thu Aug 31 14:52:01 2017 -0300 PCI: exynos: Fix platform_get_irq() error handling platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Reported-by: Bjorn Helgaas Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han drivers/pci/dwc/pci-exynos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bafb0762cb6a906eb4105cccfb3bcd90be7f40d2 Merge: 44b1671 3a6430c Author: Linus Torvalds Date: Tue Sep 5 11:08:17 2017 -0700 Merge tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big char/misc driver update for 4.14-rc1. Lots of different stuff in here, it's been an active development cycle for some reason. Highlights are: - updated binder driver, this brings binder up to date with what shipped in the Android O release, plus some more changes that happened since then that are in the Android development trees. - coresight updates and fixes - mux driver file renames to be a bit "nicer" - intel_th driver updates - normal set of hyper-v updates and changes - small fpga subsystem and driver updates - lots of const code changes all over the driver trees - extcon driver updates - fmc driver subsystem upadates - w1 subsystem minor reworks and new features and drivers added - spmi driver updates Plus a smattering of other minor driver updates and fixes. All of these have been in linux-next with no reported issues for a while" * tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (244 commits) ANDROID: binder: don't queue async transactions to thread. ANDROID: binder: don't enqueue death notifications to thread todo. ANDROID: binder: Don't BUG_ON(!spin_is_locked()). ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl ANDROID: binder: push new transactions to waiting threads. ANDROID: binder: remove proc waitqueue android: binder: Add page usage in binder stats android: binder: fixup crash introduced by moving buffer hdr drivers: w1: add hwmon temp support for w1_therm drivers: w1: refactor w1_slave_show to make the temp reading functionality separate drivers: w1: add hwmon support structures eeprom: idt_89hpesx: Support both ACPI and OF probing mcb: Fix an error handling path in 'chameleon_parse_cells()' MCB: add support for SC31 to mcb-lpc mux: make device_type const char: virtio: constify attribute_group structures. Documentation/ABI: document the nvmem sysfs files lkdtm: fix spelling mistake: "incremeted" -> "incremented" perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file nvmem: include linux/err.h from header ... commit 3664847d95e60a9a943858b7800f8484669740fc Author: Shaohua Li Date: Fri Aug 25 10:40:02 2017 -0700 md/raid5: fix a race condition in stripe batch We have a race condition in below scenario, say have 3 continuous stripes, sh1, sh2 and sh3, sh1 is the stripe_head of sh2 and sh3: CPU1 CPU2 CPU3 handle_stripe(sh3) stripe_add_to_batch_list(sh3) -> lock(sh2, sh3) -> lock batch_lock(sh1) -> add sh3 to batch_list of sh1 -> unlock batch_lock(sh1) clear_batch_ready(sh1) -> lock(sh1) and batch_lock(sh1) -> clear STRIPE_BATCH_READY for all stripes in batch_list -> unlock(sh1) and batch_lock(sh1) ->clear_batch_ready(sh3) -->test_and_clear_bit(STRIPE_BATCH_READY, sh3) --->return 0 as sh->batch == NULL -> sh3->batch_head = sh1 -> unlock (sh2, sh3) In CPU1, handle_stripe will continue handle sh3 even it's in batch stripe list of sh1. By moving sh3->batch_head assignment in to batch_lock, we make it impossible to clear STRIPE_BATCH_READY before batch_head is set. Thanks Stephane for helping debug this tricky issue. Reported-and-tested-by: Stephane Thiell Cc: stable@vger.kernel.org (v4.1+) Signed-off-by: Shaohua Li drivers/md/raid5.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2afce76a1151fe2f1104962c327d8f85047045e6 Author: Yunlong Song Date: Mon Sep 4 11:10:18 2017 +0800 Revert "f2fs: add a new function get_ssr_cost" This reverts commit b7b7c4cf1c9ef0272a65f1480457cbfdadcda19d. se->ckpt_valid_blocks will never be smaller than se->valid_blocks, so just remove get_ssr_cost. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit f62fc9f97602d5f52fd574db80d95d71869bfe21 Author: Arvind Yadav Date: Thu Aug 31 15:06:24 2017 +0530 f2fs: constify super_operations super_operations are not supposed to change at runtime. "struct super_block" working with super_operations provided by work with const super_operations. So mark the non-const structs as const Signed-off-by: Arvind Yadav Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3238691ed5f7be29f7b8b7cf7c68bbb2924361d Author: Chao Yu Date: Thu Aug 31 18:56:06 2017 +0800 f2fs: fix to wake up all sleeping flusher In scenario of remount_ro vs flush, after flush_thread exits in ->remount_fs, flusher will only clean up golbal issue_list, but without waking up flushers waiting on that list, result in hang related user threads. In order to fix this issue, this patch enables the flusher to take charge of issue_flush thread: executes merged flush command, and wake up all sleeping flushers. Fixes: 5eba8c5d1fb3 ("f2fs: fix to access nullified flush_cmd_control pointer") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit edd748e6c8e824a8281f8a8450f12c4a95ec61ee Author: Chao Yu Date: Thu Aug 31 18:56:05 2017 +0800 f2fs: avoid race in between atomic_read & atomic_inc Previously, we will miss merging flush command during fsync due to below race condition: Thread A Thread B Thread C - f2fs_issue_flush - atomic_read(&issing_flush) - f2fs_issue_flush - atomic_read(&issing_flush) - f2fs_issue_flush - atomic_read(&issing_flush) - atomic_inc(&issing_flush) - atomic_inc(&issing_flush) - atomic_inc(&issing_flush) - submit_flush_wait - submit_flush_wait - submit_flush_wait It needs to use atomic_inc_return instead to avoid such race. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 025d63a486aad611b20fa39184fc86e4b76d260e Author: Chao Yu Date: Wed Aug 30 18:04:48 2017 +0800 f2fs: remove unneeded parameter of change_curseg allocate_segment_by_default is the only caller of change_curseg passing @reuse with 'false', but commit 763bfe1bc575 ("f2fs: remove reusing any prefree segments") removes the calling, after that, @reuse in change_curseg always be true, so, let's clean up the unneeded parameter. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 11f5020d2f43a9a7b9b5cf22873e5a9a06a884f7 Author: Chao Yu Date: Wed Aug 30 18:04:47 2017 +0800 f2fs: update i_flags correctly f2fs enables hash-indexed directory by default, so we need to tag FS_INDEX_FL in inode::i_flags during directory creataion, in order to show correct status of inode in lsattr: Before: ------------------- /mnt/f2fs/dir/ After: -----------I------- /mnt/f2fs/dir/ Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 3 +++ 1 file changed, 3 insertions(+) commit ee605234996627c4fe874ea580e36211fb2bf6d5 Author: Jaegeuk Kim Date: Thu Aug 31 16:54:51 2017 -0700 f2fs: don't check inode's checksum if it was dirtied or writebacked If another thread already made the page dirtied or writebacked, we must avoid to verify checksum. If we got an error, we need to remove its uptodate as well. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 3 ++- fs/f2fs/node.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit a298d57f960255d8618b86f403dee305d3c8a29c Author: Jaegeuk Kim Date: Thu Aug 31 11:10:58 2017 -0700 f2fs: don't need to update inode checksum for recovery This patch fixes "f2fs: support inode checksum". The recovered inode page will be rewritten with valid checksum. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 -- 1 file changed, 2 deletions(-) commit 44b1671fae88ce95b8c7b53acbc6ba71ca67db00 Merge: bf1d6b2 0f9b011 Author: Linus Torvalds Date: Tue Sep 5 10:41:21 2017 -0700 Merge tag 'driver-core-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here is the "big" driver core update for 4.14-rc1. It's really not all that big, the largest thing here being some firmware tests to help ensure that that crazy api is working properly. There's also a new uevent for when a driver is bound or unbound from a device, fixing a hole in the driver model that's been there since the very beginning. Many thanks to Dmitry for being persistent and pointing out how wrong I was about this all along :) Patches for the new uevents are already in the systemd tree, if people want to play around with them. Otherwise just a number of other small api changes and updates here, nothing major. All of these patches have been in linux-next for a while with no reported issues" * tag 'driver-core-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (28 commits) driver core: bus: Fix a potential double free Do not disable driver and bus shutdown hook when class shutdown hook is set. base: topology: constify attribute_group structures. base: Convert to using %pOF instead of full_name kernfs: Clarify lockdep name for kn->count fbdev: uvesafb: remove DRIVER_ATTR() usage xen: xen-pciback: remove DRIVER_ATTR() usage driver core: Document struct device:dma_ops mod_devicetable: Remove excess description from structured comment test_firmware: add batched firmware tests firmware: enable a debug print for batched requests firmware: define pr_fmt firmware: send -EINTR on signal abort on fallback mechanism test_firmware: add test case for SIGCHLD on sync fallback initcall_debug: add deferred probe times Input: axp20x-pek - switch to using devm_device_add_group() Input: synaptics_rmi4 - use devm_device_add_group() for attributes in F01 Input: gpio_keys - use devm_device_add_group() for attributes driver core: add devm_device_add_group() and friends driver core: add device_{add|remove}_group() helpers ... commit bf1d6b2c76eda86159519bf5c427b1fa8f51f733 Merge: e63a94f 28eb51f Author: Linus Torvalds Date: Tue Sep 5 10:36:26 2017 -0700 Merge tag 'staging-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver updates from Greg KH: "Here is the big staging and IIO driver update for 4.14-rc1. Lots of staging driver fixes and cleanups, including some reorginizing of the lustre header files to try to impose some sanity on what is, and what is not, the uapi for that filesystem. There are some tty core changes in here as well, as the speakup drivers need them, and that's ok with me, they are sane and the speakup code is getting nicer because of it. There is also the addition of the obiligatory new wifi driver, just because it has been a release or two since we added our last one... Other than that, lots and lots of small coding style fixes, as usual. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (612 commits) staging:rtl8188eu:core Fix remove unneccessary else block staging: typec: fusb302: make structure fusb302_psy_desc static staging: unisys: visorbus: make two functions static staging: fsl-dpaa2/eth: fix off-by-one FD ctrl bitmaks staging: r8822be: Simplify deinit_priv() staging: r8822be: Remove some dead code staging: vboxvideo: Use CONFIG_DRM_KMS_FB_HELPER to check for fbdefio availability staging:rtl8188eu Fix comparison to NULL staging: rts5208: rename mmc_ddr_tunning_rx_cmd to mmc_ddr_tuning_rx_cmd Staging: Pi433: style fix - tabs and spaces staging: pi433: fix spelling mistake: "preample" -> "preamble" staging:rtl8188eu:core Fix Code Indent staging: typec: fusb302: Export current-limit through a power_supply class dev staging: typec: fusb302: Add support for USB2 charger detection through extcon staging: typec: fusb302: Use client->irq as irq if set staging: typec: fusb302: Get max snk mv/ma/mw from device-properties staging: typec: fusb302: Set max supply voltage to 5V staging: typec: tcpm: Add get_current_limit tcpc_dev callback staging:rtl8188eu Use __func__ instead of function name staging: lustre: coding style fixes found by checkpatch.pl ... commit ef685b34126891528f9d2975980a791f4a12c5d7 Author: Bjorn Helgaas Date: Tue Sep 5 12:33:33 2017 -0500 PCI: iproc: Clean up whitespace Use tabs (not spaces) for indentation. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 231 +++++++++++++++++++++--------------------- 1 file changed, 115 insertions(+), 116 deletions(-) commit e63a94f12b5fc67b2b92a89d4058e7a9021e900e Merge: 1a3b85e 3840ed9 Author: Linus Torvalds Date: Tue Sep 5 10:30:48 2017 -0700 Merge tag 'tty-4.14-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 update for 4.14-rc1. Well, not all that big, just a number of small serial driver fixes, and a new serial driver. Also in here are some much needed goldfish tty driver (emulator) fixes to try to get that codebase under control. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (94 commits) tty: goldfish: Implement support for kernel 'earlycon' parameter tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms tty: goldfish: Refactor constants to better reflect their nature serial: 8250_port: Remove useless NULL checks earlycon: initialise baud field of earlycon device structure tty: hvcs: make ktermios const pty: show associative slave of ptmx in fdinfo tty: n_gsm: Add compat_ioctl tty: hvcs: constify vio_device_id tty: hvc_vio: constify vio_device_id tty: mips_ejtag_fdc: constify mips_cdmm_device_id Introduce 8250_men_mcb mcb: introduce mcb_get_resource() serial: imx: Avoid post-PIO cleanup if TX DMA is started tty: serial: imx: disable irq after suspend serial: 8250_uniphier: add suspend/resume support serial: 8250_uniphier: use CHAR register for canary to detect power-off serial: 8250_uniphier: fix serial port index in private data serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings ... commit d8fa9345ef333005f04a85f823dc4b117ff436b3 Author: Bjorn Helgaas Date: Tue Sep 5 12:27:11 2017 -0500 PCI: iproc: Rename PCI_EXP_CAP to IPROC_PCI_EXP_CAP PCI_EXP_CAP is an iProc-specific value, so rename it to IPROC_PCI_EXP_CAP to make it obvious that it's not related to the generic values like PCI_EXP_RTCTL, etc. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit b91c26c6a539e26261cbe280b9f48311663ce655 Author: Oza Pawandeep Date: Mon Aug 28 16:43:35 2017 -0500 PCI: iproc: Add 500ms delay during device shutdown During soft reset (e.g., "reboot" from Linux) on some iProc-based SOCs, the LCPLL clock and PERST both go off simultaneously. This seems in accordance with the PCIe Card Electromechanical spec, r2.0, sec 2.2.3, which says the clock goes inactive after PERST# goes active, but doesn't specify how long the clock should be valid after PERST#. However, we have observed that with the iProc Stingray, some Intel NVMe endpoints, e.g., the P3700 400GB series, are not detected correctly upon the next boot sequence unless the clock remains valid for some time after PERST# is asserted. Delay 500ms after asserting PERST# before performing a reboot. The 500ms is experimentally determined. Signed-off-by: Oza Pawandeep [bhelgaas: changelog, add spec reference, fold in iproc_pcie_shutdown() export from Arnd Bergmann ] Signed-off-by: Bjorn Helgaas Reviewed-by: Ray Jui Reviewed-by: Scott Branden drivers/pci/host/pcie-iproc-platform.c | 8 +++++++ drivers/pci/host/pcie-iproc.c | 39 +++++++++++++++++++++------------- drivers/pci/host/pcie-iproc.h | 1 + 3 files changed, 33 insertions(+), 15 deletions(-) commit 1a3b85ea36d38d5732fdd86b321b10bcaeb53512 Merge: 0475919 46f5489 Author: Linus Torvalds Date: Tue Sep 5 10:26:01 2017 -0700 Merge tag 'usb-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY driver updates from Greg KH: "Here is the large USB and PHY driver update for 4.14-rc1. Not all that exciting, a few new PHY drivers, the usual mess of gadget driver updates and fixes, and of course, xhci updates to try to tame that beast. A number of usb-serial updates and other small fixes all over the USB driver tree are in here as well. Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (171 commits) usbip: vhci-hcd: make vhci_hc_driver const usb: phy: Avoid unchecked dereference warning usb: imx21-hcd: make imx21_hc_driver const usb: host: make ehci_fsl_overrides const and __initconst dt-bindings: mt8173-mtu3: add generic compatible and rename file dt-bindings: mt8173-xhci: add generic compatible and rename file usb: xhci-mtk: add generic compatible string usbip: auto retry for concurrent attach USB: serial: option: simplify 3 D-Link device entries USB: serial: option: add support for D-Link DWM-157 C1 usb: core: usbport: fix "BUG: key not in .data" when lockdep is enabled usb: chipidea: usb2: check memory allocation failure usb: Add device quirk for Logitech HD Pro Webcam C920-C usb: misc: lvstest: add entry to place port in compliance mode usb: xhci: Support enabling of compliance mode for xhci 1.1 usb:xhci:Fix regression when ATI chipsets detected usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard usb: gadget: make snd_pcm_hardware const usb: common: use of_property_read_bool() USB: core: constify vm_operations_struct ... commit aed9eb1b21e85a846c805bc299bbb9d039d4a95b Author: Colin Ian King Date: Tue Sep 5 17:51:23 2017 +0100 ext4: fix null pointer dereference on sbi In the case of a kzalloc failure when allocating sbi we end up with a null pointer dereference on sbi when assigning sbi->s_daxdev. Fix this by moving the assignment of sbi->s_daxdev to after the null pointer check of sbi. Detected by CoverityScan CID#1455379 ("Dereference before null check") Fixes: 5e405595e5bf ("ext4: perform dax_device lookup at mount") Signed-off-by: Colin Ian King Signed-off-by: Dan Williams fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bce4e98c20a45d3adf7a25881f4e6329d239fc9 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 (cherry picked from commit 0d95c883bab5c5507fac3c34bc506f735971a2ee) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6910d85250cd6e7790db3968225fd7472e4683c2 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 (cherry picked from commit c23aa71bcfe8a9d597ae5fe4c1527fac20254d0a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a338d5f8765f22e97421eb18a186a4af85d4efb2 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 (cherry picked from commit 6e31cdcfe17d8a25530924183d4a843602baebb1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 04759194dc447ff0b9ef35bc641ce3bb076c2930 Merge: 9e85ae6 d1be5c9 Author: Linus Torvalds Date: Tue Sep 5 09:53:37 2017 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - VMAP_STACK support, allowing the kernel stacks to be allocated in the vmalloc space with a guard page for trapping stack overflows. One of the patches introduces THREAD_ALIGN and changes the generic alloc_thread_stack_node() to use this instead of THREAD_SIZE (no functional change for other architectures) - Contiguous PTE hugetlb support re-enabled (after being reverted a couple of times). We now have the semantics agreed in the generic mm layer together with API improvements so that the architecture code can detect between contiguous and non-contiguous huge PTEs - Initial support for persistent memory on ARM: DC CVAP instruction exposed to user space (HWCAP) and the in-kernel pmem API implemented - raid6 improvements for arm64: faster algorithm for the delta syndrome and implementation of the recovery routines using Neon - FP/SIMD refactoring and removal of support for Neon in interrupt context. This is in preparation for full SVE support - PTE accessors converted from inline asm to cmpxchg so that we can use LSE atomics if available (ARMv8.1) - Perf support for Cortex-A35 and A73 - Non-urgent fixes and cleanups * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits) arm64: cleanup {COMPAT_,}SET_PERSONALITY() macro arm64: introduce separated bits for mm_context_t flags arm64: hugetlb: Cleanup setup_hugepagesz arm64: Re-enable support for contiguous hugepages arm64: hugetlb: Override set_huge_swap_pte_at() to support contiguous hugepages arm64: hugetlb: Override huge_pte_clear() to support contiguous hugepages arm64: hugetlb: Handle swap entries in huge_pte_offset() for contiguous hugepages arm64: hugetlb: Add break-before-make logic for contiguous entries arm64: hugetlb: Spring clean huge pte accessors arm64: hugetlb: Introduce pte_pgprot helper arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores arm64: dma-mapping: Mark atomic_pool as __ro_after_init arm64: dma-mapping: Do not pass data to gen_pool_set_algo() arm64: Remove the !CONFIG_ARM64_HW_AFDBM alternative code paths arm64: Ignore hardware dirty bit updates in ptep_set_wrprotect() arm64: Move PTE_RDONLY bit handling out of set_pte_at() kvm: arm64: Convert kvm_set_s2pte_readonly() from inline asm to cmpxchg() arm64: Convert pte handling from inline asm to using (cmp)xchg arm64: neon/efi: Make EFI fpsimd save/restore variables static ... commit 9e85ae6af6e907975f68d82ff127073ec024cb05 Merge: 6caffe2 fa41ba0 Author: Linus Torvalds Date: Tue Sep 5 09:45:46 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "The first part of the s390 updates for 4.14: - Add machine type 0x3906 for IBM z14 - Add IBM z14 TLB flushing improvements for KVM guests - Exploit the TOD clock epoch extension to provide a continuous TOD clock afer 2042/09/17 - Add NIAI spinlock hints for IBM z14 - Rework the vmcp driver and use CMA for the respone buffer of z/VM CP commands - Drop some s390 specific asm headers and use the generic version - Add block discard for DASD-FBA devices under z/VM - Add average request times to DASD statistics - A few of those constify patches which seem to be in vogue right now - Cleanup and bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (50 commits) s390/mm: avoid empty zero pages for KVM guests to avoid postcopy hangs s390/dasd: Add discard support for FBA devices s390/zcrypt: make CPRBX const s390/uaccess: avoid mvcos jump label s390/mm: use generic mm_hooks s390/facilities: fix typo s390/vmcp: simplify vmcp_response_free() s390/topology: Remove the unused parent_node() macro s390/dasd: Change unsigned long long to unsigned long s390/smp: convert cpuhp_setup_state() return code to zero on success s390: fix 'novx' early parameter handling s390/dasd: add average request times to dasd statistics s390/scm: use common completion path s390/pci: log changes to uid checking s390/vmcp: simplify vmcp_ioctl() s390/vmcp: return -ENOTTY for unknown ioctl commands s390/vmcp: split vmcp header file and move to uapi s390/vmcp: make use of contiguous memory allocator s390/cpcmd,vmcp: avoid GFP_DMA allocations s390/vmcp: fix uaccess check and avoid undefined behavior ... commit 6caffe21ddeaae4a9d18d46eed2445a8d269a1fe Merge: f32c9e05 d9e3cb2 Author: Linus Torvalds Date: Tue Sep 5 09:41:38 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha updates from Matt Turner: "This contains some small clean up patches I've neglected, and some build improvements from Ben Hutchings" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: math-emu: Fix modular build alpha: Restore symbol versions for symbols exported from assembly alpha: defconfig: Cleanup from old Kconfig options alpha: use kobj_to_dev() alpha: squash lines for immediate return alpha: kernel: Use vma_pages() alpha: silence a buffer overflow warning alpha: marvel: make use of raw_spinlock variants alpha: cleanup: remove __NR_sys_epoll_*, leave __NR_epoll_* alpha: use generic fb.h commit f32c9e059eb6c12a4296003489b167f8eef9d201 Merge: d1ce495 fd46cd5 Author: Linus Torvalds Date: Tue Sep 5 09:37:11 2017 -0700 Merge branch 'parisc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Major changes include: - Full support of the firmware Page Deallocation Table with MADV_HWPOISON and MADV_SOFT_OFFLINE. A kernel thread scans regularily for new bad memory pages. - Full support for self-extracting kernel. - Added UBSAN support. - Lots of section mismatch fixes across all parisc drivers. - Added examples for %pF and %pS usage in printk-formats.txt" * 'parisc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (28 commits) printk-formats.txt: Add examples for %pF and %pS usage parisc: Fix up devices below a PCI-PCI MegaRAID controller bridge parisc/core: Fix section mismatches parisc/ipmi_si_intf: Fix section mismatches on parisc platform parisc/input/hilkbd: Fix section mismatches parisc/net/lasi_82596: Fix section mismatches parisc/serio: Fix section mismatches in gscps2 and hp_sdc drivers parisc: Fix section mismatches in parisc core drivers parisc/parport_gsc: Fix section mismatches parisc/scsi/lasi700: Fix section mismatches parisc/scsi/zalon: Fix section mismatches parisc/8250_gsc: Fix section mismatches parisc/mux: Fix section mismatches parisc/sticore: Fix section mismatches parisc/harmony: Fix section mismatches parisc: Wire up support for self-extracting kernel parisc: Make existing core files reuseable for bootloader parisc: Add core code for self-extracting kernel parisc: Enable UBSAN support parisc/random: Add machine specific randomness ... commit d1ce495676644fc79b3ccd58657133c5d4a414fb Merge: 24e700e 558d5ad Author: Linus Torvalds Date: Tue Sep 5 09:34:49 2017 -0700 Merge tag 'm68k-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - restore symbol versions for symbols exported from assembly - defconfig updates - Mac fixes * tag 'm68k-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/mac: Avoid soft-lockup warning after mach_power_off m68k/mac: Don't hang waiting for Cuda power-down command m68k: Restore symbol versions for symbols exported from assembly m68k/defconfig: Update defconfigs for v4.13-rc1 commit 2c08ab3f2504bc7ba816ce6fde051b8bd5f028e4 Author: Arnd Bergmann Date: Tue Sep 5 10:31:35 2017 +0200 soc: ti/knav_dma: include dmaengine header A header file cleanup apparently caused a build regression with one driver using the knav infrastructure: In file included from drivers/net/ethernet/ti/netcp_core.c:30:0: include/linux/soc/ti/knav_dma.h:129:30: error: field 'direction' has incomplete type enum dma_transfer_direction direction; ^~~~~~~~~ drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_txpipe_open': drivers/net/ethernet/ti/netcp_core.c:1349:21: error: 'DMA_MEM_TO_DEV' undeclared (first use in this function); did you mean 'DMA_MEMORY_MAP'? config.direction = DMA_MEM_TO_DEV; ^~~~~~~~~~~~~~ DMA_MEMORY_MAP drivers/net/ethernet/ti/netcp_core.c:1349:21: note: each undeclared identifier is reported only once for each function it appears in drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_setup_navigator_resources': drivers/net/ethernet/ti/netcp_core.c:1659:22: error: 'DMA_DEV_TO_MEM' undeclared (first use in this function); did you mean 'DMA_DESC_HOST'? config.direction = DMA_DEV_TO_MEM; As the header is no longer included implicitly through netdevice.h, we should include it in the header that references the enum. Fixes: 0dd5759dbb1c ("net: remove dmaengine.h inclusion from netdevice.h") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller include/linux/soc/ti/knav_dma.h | 2 ++ 1 file changed, 2 insertions(+) commit fd0c88b70060e03a2215259ed29b4b31497ad205 Author: Arnd Bergmann Date: Tue Sep 5 10:05:47 2017 +0200 net/ncsi: fix ncsi_vlan_rx_{add,kill}_vid references We get a new link error in allmodconfig kernels after ftgmac100 started using the ncsi helpers: ERROR: "ncsi_vlan_rx_kill_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined! ERROR: "ncsi_vlan_rx_add_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined! Related to that, we get another error when CONFIG_NET_NCSI is disabled: drivers/net/ethernet/faraday/ftgmac100.c:1626:25: error: 'ncsi_vlan_rx_add_vid' undeclared here (not in a function); did you mean 'ncsi_start_dev'? drivers/net/ethernet/faraday/ftgmac100.c:1627:26: error: 'ncsi_vlan_rx_kill_vid' undeclared here (not in a function); did you mean 'ncsi_vlan_rx_add_vid'? This fixes both problems at once, using a 'static inline' stub helper for the disabled case, and exporting the functions when they are present. Fixes: 51564585d8c6 ("ftgmac100: Support NCSI VLAN filtering when available") Fixes: 21acf63013ed ("net/ncsi: Configure VLAN tag filter") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller include/net/ncsi.h | 10 ++++++++++ net/ncsi/ncsi-manage.c | 2 ++ 2 files changed, 12 insertions(+) commit 96e5ae4e76f1ea950d493f510399b49308bea731 Author: Eric Dumazet Date: Mon Sep 4 22:41:02 2017 -0700 bpf: fix numa_node validation syzkaller reported crashes in bpf map creation or map update [1] Problem is that nr_node_ids is a signed integer, NUMA_NO_NODE is also an integer, so it is very tempting to declare numa_node as a signed integer. This means the typical test to validate a user provided value : if (numa_node != NUMA_NO_NODE && (numa_node >= nr_node_ids || !node_online(numa_node))) must be written : if (numa_node != NUMA_NO_NODE && ((unsigned int)numa_node >= nr_node_ids || !node_online(numa_node))) [1] kernel BUG at mm/slab.c:3256! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 2946 Comm: syzkaller916108 Not tainted 4.13.0-rc7+ #35 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d2bc60c0 task.stack: ffff8801c0c90000 RIP: 0010:____cache_alloc_node+0x1d4/0x1e0 mm/slab.c:3292 RSP: 0018:ffff8801c0c97638 EFLAGS: 00010096 RAX: ffffffffffff8b7b RBX: 0000000001080220 RCX: 0000000000000000 RDX: 00000000ffff8b7b RSI: 0000000001080220 RDI: ffff8801dac00040 RBP: ffff8801c0c976c0 R08: 0000000000000000 R09: 0000000000000000 R10: ffff8801c0c97620 R11: 0000000000000001 R12: ffff8801dac00040 R13: ffff8801dac00040 R14: 0000000000000000 R15: 00000000ffff8b7b FS: 0000000002119940(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020001fec CR3: 00000001d2980000 CR4: 00000000001406f0 Call Trace: __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node+0x33/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:535 [inline] alloc_htab_elem+0x2a8/0x480 kernel/bpf/hashtab.c:740 htab_map_update_elem+0x740/0xb80 kernel/bpf/hashtab.c:820 map_update_elem kernel/bpf/syscall.c:587 [inline] SYSC_bpf kernel/bpf/syscall.c:1468 [inline] SyS_bpf+0x20c5/0x4c40 kernel/bpf/syscall.c:1443 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x440409 RSP: 002b:00007ffd1f1792b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440409 RDX: 0000000000000020 RSI: 0000000020006000 RDI: 0000000000000002 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401d70 R13: 0000000000401e00 R14: 0000000000000000 R15: 0000000000000000 Code: 83 c2 01 89 50 18 4c 03 70 08 e8 38 f4 ff ff 4d 85 f6 0f 85 3e ff ff ff 44 89 fe 4c 89 ef e8 94 fb ff ff 49 89 c6 e9 2b ff ff ff <0f> 0b 0f 0b 0f 0b 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 RIP: ____cache_alloc_node+0x1d4/0x1e0 mm/slab.c:3292 RSP: ffff8801c0c97638 ---[ end trace d745f355da2e33ce ]--- Kernel panic - not syncing: Fatal exception Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation") Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7685ab6c58557c6234f3540260195ecbee7fc4b3 Author: Chunyu Hu Date: Tue Sep 5 13:36:46 2017 +0800 tracing: Fix clear of RECORDED_TGID flag when disabling trace event When disabling one trace event, the RECORDED_TGID flag in the event file is not correctly cleared. It's clearing RECORDED_CMD flag when it should clear RECORDED_TGID flag. Link: http://lkml.kernel.org/r/1504589806-8425-1-git-send-email-chuhu@redhat.com Cc: Joel Fernandes Cc: stable@vger.kernel.org Fixes: d914ba37d7 ("tracing: Add support for recording tgid of tasks") Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d9622c12c8873911f4cc0ccdabd0362c2fca06b Author: Steven Rostedt (VMware) Date: Tue Sep 5 11:32:01 2017 -0400 tracing: Add barrier to trace_printk() buffer nesting modification trace_printk() uses 4 buffers, one for each context (normal, softirq, irq and NMI), such that it does not need to worry about one context preempting the other. There's a nesting counter that gets incremented to figure out which buffer to use. If the context gets preempted by another context which calls trace_printk() it will increment the counter and use the next buffer, and restore the counter when it is finished. The problem is that gcc may optimize the modification of the buffer nesting counter and it may not be incremented in memory before the buffer is used. If this happens, and the context gets interrupted by another context, it could pick the same buffer and corrupt the one that is being used. Compiler barriers need to be added after the nesting variable is incremented and before it is decremented to prevent usage of the context buffers by more than one context at the same time. Cc: Andy Lutomirski Cc: stable@vger.kernel.org Fixes: e2ace00117 ("tracing: Choose static tp_printk buffer by explicit nesting count") Hat-tip-to: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9b87e7a8bfb5098129836757608b3cbbdc11245a Author: Christoffer Dall Date: Thu Aug 31 22:24:25 2017 +0200 KVM: arm/arm64: Support uaccess of GICC_APRn When migrating guests around we need to know the active priorities to ensure functional virtual interrupt prioritization by the GIC. This commit clarifies the API and how active priorities of interrupts in different groups are represented, and implements the accessor functions for the uaccess register range. We live with a slight layering violation in accessing GICv3 data structures from vgic-mmio-v2.c, because anything else just adds too much complexity for us to deal with (it's not like there's a benefit elsewhere in the code of an intermediate representation as is the case with the VMCR). We accept this, because while doing v3 processing from a file named something-v2.c can look strange at first, this really is specific to dealing with the user space interface for something that looks like a GICv2. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/arm-vgic.txt | 5 +++ virt/kvm/arm/vgic/vgic-mmio-v2.c | 47 +++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) commit 50f5bd5718df9e71d1f4ba69a6480dbad54b2f24 Author: Christoffer Dall Date: Fri Sep 1 11:41:52 2017 +0200 KVM: arm/arm64: Extract GICv3 max APRn index calculation As we are about to access the APRs from the GICv2 uaccess interface, make this logic generally available. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/vgic-sys-reg-v3.c | 23 +++-------------------- virt/kvm/arm/vgic/vgic.h | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 20 deletions(-) commit 7c7d2fa1cd1e9aa9b925bac409e91544eee52c03 Author: Marc Zyngier Date: Fri Sep 1 17:51:56 2017 +0100 KVM: arm/arm64: vITS: Drop its_ite->lpi field For unknown reasons, the its_ite data structure carries an "lpi" field which contains the intid of the LPI. This is an obvious duplication of the vgic_irq->intid field, so let's fix the only user and remove the now useless field. Signed-off-by: Marc Zyngier Reviewed-by: Andre Przywara Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4aa8bcc93c6a7f327f163292e4146654b54f2086 Author: Arvind Yadav Date: Wed Aug 23 12:25:36 2017 +0530 KVM: arm/arm64: vgic: constify seq_operations and file_operations vgic_debug_seq_ops and file_operations are not supposed to change at runtime and none of the structures is modified. Signed-off-by: Arvind Yadav Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb428921b777a5e36753b5d6aa0ba8d46705cc0d Author: James Morse Date: Tue Jul 18 13:37:41 2017 +0100 KVM: arm/arm64: Fix guest external abort matching The ARM-ARM has two bits in the ESR/HSR relevant to external aborts. A range of {I,D}FSC values (of which bit 5 is always set) and bit 9 'EA' which provides: > an IMPLEMENTATION DEFINED classification of External Aborts. This bit is in addition to the {I,D}FSC range, and has an implementation defined meaning. KVM should always ignore this bit when handling external aborts from a guest. Remove the ESR_ELx_EA definition and rewrite its helper kvm_vcpu_dabt_isextabt() to check the {I,D}FSC range. This merges kvm_vcpu_dabt_isextabt() and the recently added is_abort_sea() helper. CC: Tyler Baicar Reported-by: gengdongjiu Signed-off-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_arm.h | 1 - arch/arm/include/asm/kvm_emulate.h | 24 +++++++++++++++++----- arch/arm64/include/asm/kvm_emulate.h | 24 +++++++++++++++++----- virt/kvm/arm/mmu.c | 40 ++++++++++-------------------------- 4 files changed, 49 insertions(+), 40 deletions(-) commit 84024468cf1612783e6ab317da5b72fa41487ac6 Author: Robert P. J. Day Date: Sat Sep 2 03:44:07 2017 -0400 devicetree: Adjust status "ok" -> "okay" under drivers/of/ Tweak a small number of status "ok" lines in a single file under /drivers/of/ to use the proper DTSpec 0.1 spelling of "okay". Signed-off-by: Robert P. J. Day Signed-off-by: Rob Herring drivers/of/unittest-data/overlay.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4da722ca19f30f7db250db808d1ab1703607a932 Author: Rob Herring Date: Fri Sep 1 15:05:19 2017 -0500 dt-bindings: Remove "status" from examples Pretty much any node can have a status property, so it doesn't need to be in examples. Converted with the following command and removed examples with SoC and board specific splits: git grep -l -E 'status.*=.*' Documentation/devicetree/ | xargs sed -i -E '/\sstatus.*=.*"(disabled|ok|okay)/d' Acked-by: Mark Rutland Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/arch_timer.txt | 1 - .../bindings/arm/marvell/cp110-system-controller0.txt | 1 - Documentation/devicetree/bindings/ata/apm-xgene.txt | 2 -- Documentation/devicetree/bindings/ata/imx-pata.txt | 1 - Documentation/devicetree/bindings/bus/mvebu-mbus.txt | 3 --- Documentation/devicetree/bindings/bus/nvidia,tegra20-gmi.txt | 2 -- .../devicetree/bindings/bus/nvidia,tegra210-aconnect.txt | 1 - Documentation/devicetree/bindings/clock/alphascale,acc.txt | 1 - .../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt | 1 - Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 1 - .../devicetree/bindings/clock/amlogic,meson8b-clkc.txt | 1 - Documentation/devicetree/bindings/clock/brcm,kona-ccu.txt | 1 - Documentation/devicetree/bindings/clock/exynos5433-clock.txt | 1 - Documentation/devicetree/bindings/clock/hi3660-clock.txt | 1 - Documentation/devicetree/bindings/clock/hix5hd2-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx21-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx23-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx25-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx27-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx28-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx31-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx5-clock.txt | 1 - Documentation/devicetree/bindings/clock/imx6q-clock.txt | 1 - .../devicetree/bindings/clock/nvidia,tegra124-dfll.txt | 1 - Documentation/devicetree/bindings/clock/pxa-clock.txt | 1 - Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | 1 - .../devicetree/bindings/clock/renesas,r8a7778-cpg-clocks.txt | 1 - .../devicetree/bindings/clock/renesas,rz-cpg-clocks.txt | 1 - .../devicetree/bindings/clock/samsung,s3c2410-clock.txt | 1 - .../devicetree/bindings/clock/samsung,s3c2412-clock.txt | 1 - .../devicetree/bindings/clock/samsung,s3c2443-clock.txt | 1 - .../devicetree/bindings/clock/samsung,s3c64xx-clock.txt | 1 - .../devicetree/bindings/clock/samsung,s5pv210-clock.txt | 1 - Documentation/devicetree/bindings/clock/ti/dra7-atl.txt | 2 -- Documentation/devicetree/bindings/clock/zx296702-clk.txt | 1 - Documentation/devicetree/bindings/clock/zx296718-clk.txt | 1 - Documentation/devicetree/bindings/crypto/fsl-dcp.txt | 1 - .../devicetree/bindings/crypto/inside-secure-safexcel.txt | 1 - Documentation/devicetree/bindings/crypto/marvell-cesa.txt | 1 - Documentation/devicetree/bindings/crypto/mv_cesa.txt | 1 - Documentation/devicetree/bindings/crypto/rockchip-crypto.txt | 1 - .../devicetree/bindings/devfreq/event/rockchip-dfi.txt | 1 - Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt | 1 - Documentation/devicetree/bindings/display/atmel,lcdc.txt | 1 - Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt | 1 - .../display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt | 1 - .../devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 1 - Documentation/devicetree/bindings/display/fsl,tcon.txt | 1 - .../devicetree/bindings/display/marvell,pxa2xx-lcdc.txt | 1 - .../devicetree/bindings/display/panel/innolux,p079zca.txt | 1 - .../bindings/display/rockchip/analogix_dp-rockchip.txt | 1 - .../devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt | 1 - .../bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 2 -- .../bindings/display/rockchip/inno_hdmi-rockchip.txt | 1 - .../devicetree/bindings/display/simple-framebuffer-sunxi.txt | 1 - Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 1 - Documentation/devicetree/bindings/dma/fsl-edma.txt | 1 - Documentation/devicetree/bindings/dma/mv-xor.txt | 1 - Documentation/devicetree/bindings/dma/qcom_adm.txt | 1 - Documentation/devicetree/bindings/dma/snps-dma.txt | 1 - Documentation/devicetree/bindings/dma/st_fdma.txt | 1 - Documentation/devicetree/bindings/dma/ste-dma40.txt | 1 - Documentation/devicetree/bindings/dma/sun4i-dma.txt | 1 - Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt | 1 - Documentation/devicetree/bindings/dma/ti-edma.txt | 1 - .../devicetree/bindings/fpga/xilinx-slave-serial.txt | 1 - Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt | 1 - Documentation/devicetree/bindings/gpio/spear_spics.txt | 1 - Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 3 --- Documentation/devicetree/bindings/gpu/samsung-g2d.txt | 1 - Documentation/devicetree/bindings/hsi/omap-ssi.txt | 1 - Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt | 1 - Documentation/devicetree/bindings/i2c/i2c-efm32.txt | 1 - Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | 1 - .../devicetree/bindings/iio/adc/brcm,iproc-static-adc.txt | 1 - Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt | 1 - Documentation/devicetree/bindings/iio/dac/lpc1850-dac.txt | 1 - Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt | 1 - .../devicetree/bindings/input/touchscreen/colibri-vf50-ts.txt | 1 - .../devicetree/bindings/input/touchscreen/imx6ul_tsc.txt | 1 - Documentation/devicetree/bindings/media/pxa-camera.txt | 1 - Documentation/devicetree/bindings/media/s5p-cec.txt | 1 - Documentation/devicetree/bindings/media/samsung-fimc.txt | 2 -- Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt | 1 - Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 1 - .../devicetree/bindings/memory-controllers/mvebu-devbus.txt | 1 - Documentation/devicetree/bindings/mfd/act8945a.txt | 2 -- Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt | 1 - Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 1 - Documentation/devicetree/bindings/mfd/mc13xxx.txt | 1 - Documentation/devicetree/bindings/mfd/mxs-lradc.txt | 2 -- .../devicetree/bindings/mfd/samsung,exynos5433-lpass.txt | 2 -- Documentation/devicetree/bindings/misc/atmel-ssc.txt | 1 - Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 1 - Documentation/devicetree/bindings/mmc/davinci_mmc.txt | 1 - Documentation/devicetree/bindings/mmc/fsl-imx-mmc.txt | 1 - Documentation/devicetree/bindings/mmc/mmc-card.txt | 1 - Documentation/devicetree/bindings/mmc/mmc.txt | 1 - Documentation/devicetree/bindings/mmc/orion-sdio.txt | 1 - Documentation/devicetree/bindings/mmc/sdhci-st.txt | 3 --- Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt | 1 - Documentation/devicetree/bindings/mtd/atmel-quadspi.txt | 1 - Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 1 - Documentation/devicetree/bindings/mtd/st-fsm.txt | 1 - Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 1 - Documentation/devicetree/bindings/net/brcm,amac.txt | 1 - Documentation/devicetree/bindings/net/brcm,bgmac-nsp.txt | 1 - Documentation/devicetree/bindings/net/btusb.txt | 1 - Documentation/devicetree/bindings/net/can/m_can.txt | 1 - Documentation/devicetree/bindings/net/dsa/ksz.txt | 2 -- Documentation/devicetree/bindings/net/dsa/lan9303.txt | 3 --- Documentation/devicetree/bindings/net/ftgmac100.txt | 1 - .../devicetree/bindings/net/marvell-armada-370-neta.txt | 1 - Documentation/devicetree/bindings/net/marvell-bt-8xxx.txt | 2 -- Documentation/devicetree/bindings/net/marvell-neta-bm.txt | 2 -- Documentation/devicetree/bindings/net/marvell-pp2.txt | 3 --- Documentation/devicetree/bindings/net/meson-dwmac.txt | 1 - Documentation/devicetree/bindings/net/micrel-ksz90x1.txt | 1 - Documentation/devicetree/bindings/net/microchip,enc28j60.txt | 1 - Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt | 2 -- Documentation/devicetree/bindings/net/nfc/nxp-nci.txt | 1 - Documentation/devicetree/bindings/net/nfc/pn533-i2c.txt | 1 - Documentation/devicetree/bindings/net/nfc/pn544.txt | 1 - Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt | 1 - Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt | 1 - Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt | 1 - Documentation/devicetree/bindings/net/nfc/st21nfca.txt | 1 - Documentation/devicetree/bindings/net/nfc/st95hf.txt | 2 -- Documentation/devicetree/bindings/net/nfc/trf7970a.txt | 2 -- Documentation/devicetree/bindings/net/oxnas-dwmac.txt | 1 - Documentation/devicetree/bindings/net/qca,qca7000.txt | 2 -- Documentation/devicetree/bindings/net/rockchip-dwmac.txt | 1 - Documentation/devicetree/bindings/net/smsc-lan87xx.txt | 1 - Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 1 - Documentation/devicetree/bindings/net/sti-dwmac.txt | 1 - Documentation/devicetree/bindings/net/stm32-dwmac.txt | 1 - .../devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 1 - .../devicetree/bindings/net/wireless/esp,esp8089.txt | 1 - .../devicetree/bindings/net/wireless/marvell-8xxx.txt | 1 - Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt | 1 - Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt | 1 - Documentation/devicetree/bindings/opp/opp.txt | 1 - Documentation/devicetree/bindings/pci/aardvark-pci.txt | 1 - Documentation/devicetree/bindings/pci/hisilicon-pcie.txt | 2 -- Documentation/devicetree/bindings/pci/mvebu-pci.txt | 11 ----------- Documentation/devicetree/bindings/pci/pci-armada8k.txt | 1 - Documentation/devicetree/bindings/pci/rcar-pci.txt | 1 - Documentation/devicetree/bindings/pci/xgene-pci-msi.txt | 1 - Documentation/devicetree/bindings/phy/apm-xgene-phy.txt | 3 --- Documentation/devicetree/bindings/phy/keystone-usb-phy.txt | 1 - Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt | 4 ---- Documentation/devicetree/bindings/phy/phy-mvebu.txt | 1 - .../devicetree/bindings/phy/phy-rockchip-inno-usb2.txt | 2 -- Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt | 2 -- Documentation/devicetree/bindings/phy/samsung-phy.txt | 1 - Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt | 1 - .../devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt | 1 - Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt | 1 - .../devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt | 1 - .../bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt | 1 - Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt | 1 - Documentation/devicetree/bindings/pinctrl/pinctrl-zx.txt | 1 - .../devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 - .../devicetree/bindings/pinctrl/rockchip,pinctrl.txt | 1 - .../devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 1 - Documentation/devicetree/bindings/power/power-controller.txt | 1 - Documentation/devicetree/bindings/power/reset/st-reset.txt | 1 - .../devicetree/bindings/power/supply/act8945a-charger.txt | 2 -- .../devicetree/bindings/power/supply/max8903-charger.txt | 1 - .../devicetree/bindings/power/supply/maxim,max14656.txt | 1 - Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt | 1 - Documentation/devicetree/bindings/pwm/pwm-meson.txt | 1 - Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 1 - Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt | 2 -- .../devicetree/bindings/regulator/act8865-regulator.txt | 1 - .../devicetree/bindings/regulator/act8945a-regulator.txt | 1 - Documentation/devicetree/bindings/reset/nxp,lpc1850-rgu.txt | 1 - Documentation/devicetree/bindings/rtc/st,stm32-rtc.txt | 1 - Documentation/devicetree/bindings/scsi/hisilicon-sas.txt | 1 - .../devicetree/bindings/security/tpm/st33zp24-i2c.txt | 1 - .../devicetree/bindings/security/tpm/st33zp24-spi.txt | 1 - Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt | 1 - .../devicetree/bindings/security/tpm/tpm_tis_spi.txt | 1 - Documentation/devicetree/bindings/serial/arc-uart.txt | 1 - .../devicetree/bindings/serial/axis,etraxfs-uart.txt | 1 - .../devicetree/bindings/serial/nvidia,tegra20-hsuart.txt | 1 - Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt | 3 --- Documentation/devicetree/bindings/serial/serial.txt | 2 -- .../devicetree/bindings/serio/allwinner,sun4i-ps2.txt | 1 - Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt | 1 - .../devicetree/bindings/sound/armada-370db-audio.txt | 1 - .../devicetree/bindings/sound/axentia,tse850-pcm5142.txt | 1 - Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt | 4 ---- Documentation/devicetree/bindings/sound/davinci-mcbsp.txt | 1 - Documentation/devicetree/bindings/sound/fsl,asrc.txt | 1 - Documentation/devicetree/bindings/sound/fsl,esai.txt | 1 - Documentation/devicetree/bindings/sound/fsl,spdif.txt | 1 - Documentation/devicetree/bindings/sound/hdmi.txt | 1 - Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 2 -- Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 1 - Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 1 - Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt | 5 ----- Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt | 1 - Documentation/devicetree/bindings/sound/tas5720.txt | 1 - Documentation/devicetree/bindings/sound/zte,zx-i2s.txt | 1 - Documentation/devicetree/bindings/sound/zte,zx-spdif.txt | 1 - Documentation/devicetree/bindings/spi/efm32-spi.txt | 2 -- Documentation/devicetree/bindings/spi/nvidia,tegra114-spi.txt | 1 - .../devicetree/bindings/spi/nvidia,tegra20-sflash.txt | 1 - .../devicetree/bindings/spi/nvidia,tegra20-slink.txt | 1 - Documentation/devicetree/bindings/spi/sh-hspi.txt | 1 - Documentation/devicetree/bindings/spi/sh-msiof.txt | 1 - Documentation/devicetree/bindings/spi/spi-clps711x.txt | 1 - Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 1 - Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 - Documentation/devicetree/bindings/spi/spi-orion.txt | 2 -- Documentation/devicetree/bindings/spi/spi-sun4i.txt | 1 - Documentation/devicetree/bindings/spi/spi-sun6i.txt | 1 - Documentation/devicetree/bindings/spi/spi_atmel.txt | 1 - Documentation/devicetree/bindings/sram/sunxi-sram.txt | 1 - Documentation/devicetree/bindings/thermal/armada-thermal.txt | 1 - Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 1 - .../devicetree/bindings/thermal/rcar-gen3-thermal.txt | 1 - Documentation/devicetree/bindings/unittest.txt | 5 ----- .../devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt | 1 - Documentation/devicetree/bindings/usb/da8xx-usb.txt | 2 -- Documentation/devicetree/bindings/usb/dwc3-st.txt | 1 - Documentation/devicetree/bindings/usb/dwc3-xilinx.txt | 1 - Documentation/devicetree/bindings/usb/ehci-st.txt | 1 - Documentation/devicetree/bindings/usb/exynos-usb.txt | 2 -- Documentation/devicetree/bindings/usb/isp1301.txt | 1 - Documentation/devicetree/bindings/usb/keystone-usb.txt | 1 - Documentation/devicetree/bindings/usb/mt8173-mtu3.txt | 2 -- Documentation/devicetree/bindings/usb/ohci-st.txt | 1 - Documentation/devicetree/bindings/usb/qcom,dwc3.txt | 3 --- Documentation/devicetree/bindings/usb/rockchip,dwc3.txt | 4 ---- Documentation/devicetree/bindings/usb/usb-device.txt | 1 - Documentation/devicetree/bindings/w1/fsl-imx-owire.txt | 1 - .../devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt | 1 - Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | 1 - Documentation/devicetree/bindings/watchdog/marvel.txt | 1 - 241 files changed, 311 deletions(-) commit ba83bfb1e86501d21077b570e10e443f1605be64 Author: Igor Mitsyanko Date: Wed Aug 30 13:52:25 2017 -0700 nl80211: look for HT/VHT capabilities in beacon's tail There are no HT/VHT capabilities in cfg80211_ap_settings::beacon_ies, these should be looked for in beacon's tail instead. Fixes: 66cd794e3c30 ("nl80211: add HT/VHT capabilities to AP parameters") Signed-off-by: Igor Mitsyanko Signed-off-by: Johannes Berg net/wireless/nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e46d8ce894374fc135c96a8d1057c6af1fef237 Author: Avraham Stern Date: Fri Aug 18 15:33:57 2017 +0300 mac80211: flush hw_roc_start work before cancelling the ROC When HW ROC is supported it is possible that after the HW notified that the ROC has started, the ROC was cancelled and another ROC was added while the hw_roc_start worker is waiting on the mutex (since cancelling the ROC and adding another one also holds the same mutex). As a result, the hw_roc_start worker will continue to run after the new ROC is added but before it is actually started by the HW. This may result in notifying userspace that the ROC has started before it actually does, or in case of management tx ROC, in an attempt to tx while not on the right channel. In addition, when the driver will notify mac80211 that the second ROC has started, mac80211 will warn that this ROC has already been notified. Fix this by flushing the hw_roc_start work before cancelling an ROC. Cc: stable@vger.kernel.org Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 2 ++ 1 file changed, 2 insertions(+) commit 979e1f08042b83152dfe3d76df10db31eb7edf98 Author: Johannes Berg Date: Thu Jun 22 12:20:28 2017 +0200 mac80211: agg-tx: call drv_wake_tx_queue in proper context Since drv_wake_tx_queue() is normally called in the TX path, which is already in an RCU critical section, we should call it the same way in the aggregation code path, so if the driver expects to be able to use RCU, it'll already be protected without having to enter a nested critical section. Additionally, disable soft-IRQs, since not doing so could cause issues in a driver that relies on them already being disabled like in the other path. Fixes: ba8c3d6f16a1 ("mac80211: add an intermediate software queue implementation") Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 4 ++++ 1 file changed, 4 insertions(+) commit 196a5085592c62ffa4eb739d7ce49c040c2953a1 Author: Geliang Tang Date: Mon Aug 7 21:44:24 2017 +0800 audit: update the function comments Update the function comments to match the code. Signed-off-by: Geliang Tang Signed-off-by: Paul Moore kernel/audit.c | 2 +- kernel/auditsc.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 19128341d6ca748088a9c787e54b2a160cf97a22 Author: Richard Guy Briggs Date: Fri Jul 28 03:23:31 2017 -0400 selinux: remove AVC init audit log message In the process of normalizing audit log messages, it was noticed that the AVC initialization code registered an audit log KERNEL record that didn't fit the standard format. In the process of attempting to normalize it it was determined that this record was not even necessary. Remove it. Ref: http://marc.info/?l=selinux&m=149614868525826&w=2 See: https://github.com/linux-audit/audit-kernel/issues/48 Signed-off-by: Richard Guy Briggs Acked-by: Stephen Smalley Acked-by: Steve Grubb Signed-off-by: Paul Moore security/selinux/avc.c | 2 -- 1 file changed, 2 deletions(-) commit 174e075c0e8ea14e8d540a61417e076f51701409 Author: Paul Moore Date: Fri Jul 28 16:43:37 2017 -0400 audit: update the audit info in MAINTAINERS Signed-off-by: Paul Moore MAINTAINERS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e832bf48c8e12f3b39e40fee35c4ea269d685875 Author: Mel Gorman Date: Tue Jul 4 13:11:43 2017 +0100 audit: Reduce overhead using a coarse clock Commit 2115bb250f26 ("audit: Use timespec64 to represent audit timestamps") noted that audit timestamps were not y2038 safe and used a 64-bit timestamp. In itself, this makes sense but the conversion was from CURRENT_TIME to ktime_get_real_ts64() which is a heavier call to record an accurate timestamp which is required in some, but not all, cases. The impact is that when auditd is running without any rules that all syscalls have higher overhead. This is visible in the sysbench-thread benchmark as a 11.5% performance hit. That benchmark is dumb as rocks but it's also visible in redis as an 8-10% hit on all operations which is of greater concern. It is somewhat stupid of audit to track syscalls without any rules related to syscalls but that is how it behaves. The overhead can be directly measured with perf comparing 4.9 with 4.12 4.9 7.76% sysbench [kernel.vmlinux] [k] __schedule 7.62% sysbench [kernel.vmlinux] [k] _raw_spin_lock 7.37% sysbench libpthread-2.22.so [.] __lll_lock_elision 7.29% sysbench [kernel.vmlinux] [.] syscall_return_via_sysret 6.59% sysbench [kernel.vmlinux] [k] native_sched_clock 5.21% sysbench libc-2.22.so [.] __sched_yield 4.38% sysbench [kernel.vmlinux] [k] entry_SYSCALL_64 4.28% sysbench [kernel.vmlinux] [k] do_syscall_64 3.49% sysbench libpthread-2.22.so [.] __lll_unlock_elision 3.13% sysbench [kernel.vmlinux] [k] __audit_syscall_exit 2.87% sysbench [kernel.vmlinux] [k] update_curr 2.73% sysbench [kernel.vmlinux] [k] pick_next_task_fair 2.31% sysbench [kernel.vmlinux] [k] syscall_trace_enter 2.20% sysbench [kernel.vmlinux] [k] __audit_syscall_entry ..... 0.00% swapper [kernel.vmlinux] [k] read_tsc 4.12 7.84% sysbench [kernel.vmlinux] [k] __schedule 7.05% sysbench [kernel.vmlinux] [k] _raw_spin_lock 6.57% sysbench libpthread-2.22.so [.] __lll_lock_elision 6.50% sysbench [kernel.vmlinux] [.] syscall_return_via_sysret 5.95% sysbench [kernel.vmlinux] [k] read_tsc 5.71% sysbench [kernel.vmlinux] [k] native_sched_clock 4.78% sysbench libc-2.22.so [.] __sched_yield 4.30% sysbench [kernel.vmlinux] [k] entry_SYSCALL_64 3.94% sysbench [kernel.vmlinux] [k] do_syscall_64 3.37% sysbench libpthread-2.22.so [.] __lll_unlock_elision 3.32% sysbench [kernel.vmlinux] [k] __audit_syscall_exit 2.91% sysbench [kernel.vmlinux] [k] __getnstimeofday64 Note the additional overhead from read_tsc which goes from 0% to 5.95%. This is on a single-socket E3-1230 but similar overheads have been measured on an older machine which the patch also eliminates. The patch in question has no explanation as to why a fully-accurate timestamp is required and is likely an oversight. Using a coarser, but monotically increasing, timestamp the overhead can be eliminated. While it can be worked around by configuring or disabling audit, it's tricky enough to detect that a kernel fix is justified. With this patch, we see the following; sysbenchthread 4.9.0 4.12.0 4.12.0 vanilla vanilla coarse-v1r1 Amean 1 1.49 ( 0.00%) 1.66 ( -11.42%) 1.51 ( -1.34%) Amean 3 1.48 ( 0.00%) 1.65 ( -11.45%) 1.50 ( -0.96%) Amean 5 1.49 ( 0.00%) 1.67 ( -12.31%) 1.51 ( -1.83%) Amean 7 1.49 ( 0.00%) 1.66 ( -11.72%) 1.50 ( -0.67%) Amean 12 1.48 ( 0.00%) 1.65 ( -11.57%) 1.52 ( -2.89%) Amean 16 1.49 ( 0.00%) 1.65 ( -11.13%) 1.51 ( -1.73%) The benchmark is reporting the time required for different thread counts to lock/unlock a private mutex which, while dense, demonstrates the syscall overhead. This is showing that 4.12 took a 11-12% hit but the overhead is almost eliminated by the patch. While the variance is not reported here, it's well within the noise with the patch applied. Signed-off-by: Mel Gorman Acked-by: Arnd Bergmann Acked-by: Deepa Dinamani Signed-off-by: Paul Moore kernel/audit.c | 2 +- kernel/auditsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 076a9bcacfc7ccbc2b3fdf3bd490718f6b182419 Merge: 8db6c34 2022930 Author: Eric W. Biederman Date: Tue Sep 5 08:42:47 2017 -0500 signal/mips: Remove FPE_FIXME usage from mips Ralf Baechle recently merged a change to stop explicitly handling this case on mips, as the case is impossible. Unfortunately when the code in force_fcr31_sig to not use siginfo but a simple interger variable gcc starts warning about an unitialized variable. So add a return statement so gcc knows the code never attempts to use the impossible value. Cc: Ralf Baechle Signed-off-by: "Eric W. Biederman" commit fbf1c41fc0f4d3574ac2377245efd666c1fa3075 Author: Ben Hutchings Date: Sun Sep 3 01:18:41 2017 +0100 workqueue: Fix flag collision Commit 0a94efb5acbb ("workqueue: implicit ordered attribute should be overridable") introduced a __WQ_ORDERED_EXPLICIT flag but gave it the same value as __WQ_LEGACY. I don't believe these were intended to mean the same thing, so renumber __WQ_ORDERED_EXPLICIT. Fixes: 0a94efb5acbb ("workqueue: implicit ordered attribute should be ...") Signed-off-by: Ben Hutchings Cc: stable@vger.kernel.org # v4.13 Signed-off-by: Tejun Heo include/linux/workqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 058fc47ee22c60c817c362ef6844d40d8ebb8140 Merge: c5a94a6 1ad0f0a Author: Tejun Heo Date: Tue Sep 5 06:33:41 2017 -0700 Merge branch 'for-4.13-fixes' into for-4.14 commit 87a72dcbbd3c1a80d70a41ce3a6d9cf92a9e2295 Author: Hans de Goede Date: Tue Sep 5 15:18:26 2017 +0200 video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17 The VIOS LTH17 Cherry Trail bases netbook has its LCD panel mounted rotated 90 degrees, add a DMI quirk for this. Signed-off-by: Hans de Goede Cc: Daniel Drake [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbcon_dmi_quirks.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4cd7d6c957b085d319bcf97814f95854375da0a6 Author: Mauro Carvalho Chehab Date: Tue Sep 5 08:23:42 2017 -0400 media: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers Those two ioctls were never used within the Kernel. Still, there used to have compat32 code there (and an if #0 block at the core). Get rid of them. Fixes: 286fe1ca3fa1 ("media: dmx.h: get rid of DMX_GET_CAPS") Fixes: 13adefbe9e56 ("media: dmx.h: get rid of DMX_SET_SOURCE") Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.c | 20 -------------------- fs/compat_ioctl.c | 2 -- 2 files changed, 22 deletions(-) commit 580b71e9f64e0e6e9063466fce4564c56156695d Author: Arnd Bergmann Date: Tue Sep 5 09:49:23 2017 +0200 scsi: scsi_transport_sas: select BLK_DEV_BSGLIB Without CONFIG_BLK_DEV_BSGLIB, we get a link error here: drivers/scsi/scsi_transport_sas.o: In function `sas_bsg_initialize': scsi_transport_sas.c:(.text+0xcc0): undefined reference to `bsg_setup_queue' scsi_transport_sas.c:(.text+0xd10): undefined reference to `bsg_setup_queue' drivers/scsi/scsi_transport_sas.o: In function `sas_smp_dispatch': scsi_transport_sas.c:(.text+0xe8c): undefined reference to `bsg_job_done' This modifies the Kconfig 'select' statement accordingly, and matching what we do for the other two scsi_transport implementations that use bsglib. Fixes: 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7760e223507b5218d0674b5e2e8dc29fea079a89 Author: Bart Van Assche Date: Thu Aug 31 16:59:06 2017 -0700 scsi: Remove Scsi_Host.uspace_req_q A patch I wrote myself several years ago removed SCSI target support from the code under drivers/scsi. That patch removed the code that sets uspace_req_q to a non-NULL value. Hence also remove the code that depends on uspace_req_q != NULL. References: commit 066465251303 ("tgt: removal") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 8 -------- include/scsi/scsi_host.h | 6 ------ 2 files changed, 14 deletions(-) commit 12f92866f13f9ca12e158c07978246ed83d52ed0 Author: Rob Herring Date: Thu Jul 20 18:06:22 2017 -0400 media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay" This reverts commit d2180e0cf77dc7a7049671d5d57dfa0a228f83c1. The commit was flawed in that if the device_node pointers are different, then in fact a different device is present and the device node could be different in ways other than full_name. As Frank Rowand explained: "When an overlay (1) is removed, all uses and references to the nodes and properties in that overlay are no longer valid. Any driver that uses any information from the overlay _must_ stop using any data from the overlay. Any driver that is bound to a new node in the overlay _must_ unbind. Any driver that became bound to a pre-existing node that was modified by the overlay (became bound after the overlay was applied) _must_ adjust itself to account for any changes to that node when the overlay is removed. One way to do this is to unbind when notified that the overlay is about to be removed, then to re-bind after the overlay is completely removed. If an overlay (2) is subsequently applied, a node with the same full_name as from overlay (1) may exist. There is no guarantee that overlay (1) and overlay (2) are the same overlay, even if that node has the same full_name in both cases." Also, there's not sufficient overlay support in mainline to actually remove and re-apply an overlay to hit this condition as overlays can only be applied from in kernel APIs. Fixes: d2180e0cf77d ("[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay") Cc: Javier Martinez Canillas Cc: Sylwester Nawrocki Cc: Frank Rowand Signed-off-by: Rob Herring Acked-by: Javi Merino Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit bfc133515ffba42cf81389275ec24ea3c744bb17 Author: Sergei A. Trusov Date: Wed Aug 2 04:00:01 2017 -0400 media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space The calloc function returns either a null pointer or a pointer to the allocated space. Add the second case that is missed. Fixes: da22013f7df4 ("atomisp: remove indirection from sh_css_malloc") Signed-off-by: Sergei A. Trusov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 1 + 1 file changed, 1 insertion(+) commit a607f51e5a4c421e2097077db88105402099c528 Author: Sean Young Date: Fri Aug 4 10:12:03 2017 -0400 media: Revert "[media] lirc_dev: remove superfluous get/put_device() calls" This reverts commit 5be2b76a9ca4ea5fd3e221114d62eeb0d78267ca. Only when the lirc device is freed, should we drop our reference to rc_dev, else we the rc_dev is freed to early. If userspace has a file descriptor open during unplug, it goes bang. ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x7bb/0x1e10 Read of size 8 at addr ffff8801d7d61ed0 by task ir-rec/2609 -snip- mutex_lock_nested+0x1b/0x20 ? mutex_lock_nested+0x1b/0x20 rc_close.part.6+0x20/0x60 [rc_core] rc_close+0x13/0x20 [rc_core] lirc_dev_fop_close+0x62/0xd0 [lirc_dev] __fput+0x236/0x410 ? fput+0xb0/0xb0 ? do_raw_spin_trylock+0x110/0x110 ? set_rq_offline.part.70+0xa0/0xa0 ____fput+0xe/0x10 task_work_run+0x116/0x180 ? task_work_cancel+0x170/0x170 ? _raw_spin_unlock+0x27/0x40 ? switch_task_namespaces+0x5f/0x90 do_exit+0x68b/0xe80 Cc: stable@vger.kernel.org # For Kernel 4.13 Fixes: 5be2b76a9ca4 ("[media] lirc_dev: remove superfluous get/put_device() calls") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0865c7429ed54876d01128030873b375778bf639 Author: Mauro Carvalho Chehab Date: Tue Sep 5 07:06:40 2017 -0400 media: add qcom_camss.rst to v4l-drivers rst file Avoid this warning: /devel/v4l/docs/Documentation/media/v4l-drivers/qcom_camss.rst:: WARNING: document isn't included in any toctree Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/index.rst | 1 + 1 file changed, 1 insertion(+) commit d35b0996fef3bfe76665e87bbff7d95c6807350a Author: Arnd Bergmann Date: Tue Sep 5 10:10:09 2017 +0200 dma-coherent: fix dma_declare_coherent_memory() logic error A recent change interprets the return code of dma_init_coherent_memory as an error value, but it is instead a boolean, where 'true' indicates success. This leads causes the caller to always do the wrong thing, and also triggers a compile-time warning about it: drivers/base/dma-coherent.c: In function 'dma_declare_coherent_memory': drivers/base/dma-coherent.c:99:15: error: 'mem' may be used uninitialized in this function [-Werror=maybe-uninitialized] I ended up changing the code a little more, to give use the usual error handling, as this seemed the best way to fix up the warning and make the code look reasonable at the same time. Fixes: 2436bdcda53f ("dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags") Signed-off-by: Arnd Bergmann Signed-off-by: Christoph Hellwig drivers/base/dma-coherent.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit e4faa09b0dae4f8f429922190e9aa99a564ff785 Author: Mauro Carvalho Chehab Date: Tue Sep 5 07:02:44 2017 -0400 media: dvb headers: make checkpatch happier Adjust dvb ca.h, dmx.h and frontend.h in order to make checkpatch happier. Now, it only complains about the typedefs, and those are there just to provide backward userspace compatibility. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/ca.h | 2 +- include/uapi/linux/dvb/dmx.h | 5 ++--- include/uapi/linux/dvb/frontend.h | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) commit da682492195783a046bb4aee03f41367cf648a06 Author: Mauro Carvalho Chehab Date: Tue Sep 5 06:47:08 2017 -0400 media: dvb uapi: move frontend legacy API to another part of the book There's a chapter for the legacy APIs. Move the frontend DVBv3 API to it, and update the chapter's introduction accordingly. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/frontend.rst | 1 - Documentation/media/uapi/dvb/legacy_dvb_apis.rst | 21 ++++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) commit 7c6893e3c9abf6a9676e060a1e35e5caca673d57 Author: Miklos Szeredi Date: Tue Sep 5 12:53:12 2017 +0200 ovl: don't allow writing ioctl on lower layer Problem with ioctl() is that it's a file operation, yet often used as an inode operation (i.e. modify the inode despite the file being opened for read-only). mnt_want_write_file() is used by filesystems in such cases to get write access on an arbitrary open file. Since overlayfs lets filesystems do all file operations, including ioctl, this can lead to mnt_want_write_file() returning OK for a lower file and modification of that lower file. This patch prevents modification by checking if the file is from an overlayfs lower layer and returning EPERM in that case. Need to introduce a mnt_want_write_file_path() variant that still does the old thing for inode operations that can do the copy up + modification correctly in such cases (fchown, fsetxattr, fremovexattr). This does not address the correctness of such ioctls on overlayfs (the correct way would be to copy up and attempt to perform ioctl on upper file). In theory this could be a regression. We very much hope that nobody is relying on such a hack in any sane setup. While this patch meddles in VFS code, it has no effect on non-overlayfs filesystems. Reported-by: "zhangyi (F)" Signed-off-by: Miklos Szeredi fs/internal.h | 2 ++ fs/namespace.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- fs/open.c | 4 ++-- fs/xattr.c | 9 +++++---- 4 files changed, 70 insertions(+), 9 deletions(-) commit cd91304e7190b4c4802f8e413ab2214b233e0260 Author: Miklos Szeredi Date: Tue Sep 5 12:53:11 2017 +0200 ovl: fix relatime for directories Need to treat non-regular overlayfs files the same as regular files when checking for an atime update. Add a d_real() flag to make it return the upper dentry for all file types. Reported-by: "zhangyi (F)" Signed-off-by: Miklos Szeredi fs/inode.c | 21 +++++++++++++++++---- fs/overlayfs/super.c | 3 +++ include/linux/dcache.h | 3 +++ 3 files changed, 23 insertions(+), 4 deletions(-) commit 1e13c184dcd3c19090c4b2110540ee04daf1a330 Author: Mauro Carvalho Chehab Date: Mon Sep 4 16:37:30 2017 -0400 media: pixfmt-srggb12p.rst: better format the table for PDF output Adjust the table to be better displayed on PDF output. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-srggb12p.rst | 59 +++++++++--------------- 1 file changed, 21 insertions(+), 38 deletions(-) commit debc313a186fb57aee9e272009181da8283529ca Author: Sakari Ailus Date: Sun Sep 3 16:12:33 2017 -0400 media: docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation There appears to be an issue in using \small in certain cases on Sphinx 1.4 and 1.5. Other format documents don't use \small either, remove it from here as well. Signed-off-by: Sakari Ailus [mchehab@s-opensource.com: kept tabularcolumns - readjusted - and add a few blank lines for it to display better] Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit b9261184b8470fea19cda15f0e419a9a5593602e Author: Mauro Carvalho Chehab Date: Sun Sep 3 14:39:51 2017 -0400 media: index.rst: don't write "Contents:" on PDF output Right now, Sphinx unconditionally creates a blank page with just "Contents:" on it, on PDF output. While this makes sense for html, it doesn't o PDF, as LaTeX does what's required automatically. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/index.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 679f4d6ea516234d03d85e15aca46a0c1e0a6dea Author: Mauro Carvalho Chehab Date: Sun Sep 3 07:04:33 2017 -0400 media: pixfmt*.rst: replace a two dots by a comma On several tables, the color sample location table preamble is written as: Color Sample Location.. Instead of: Color Sample Location: I suspect that the repetition of such pattern was due to some copy-and-paste (or perhaps some error during DocBook conversion). Anyway, fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-m420.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-nv12.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-nv12m.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-nv16.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-nv16m.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-uyvy.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-vyuy.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-y41p.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv410.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv411p.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv420.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv420m.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv422m.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv422p.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuv444m.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yuyv.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-yvyu.rst | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) commit 9eaafad610ad9bdbc61d83394a05ce38f896a397 Author: Mauro Carvalho Chehab Date: Sun Sep 3 05:46:06 2017 -0400 media: vidioc-g-fmt.rst: adjust table format While doing a visual inspection with Sphinx 1.5, I noticed that one of the columns was smaller than the text written there. As this is the only thing I noticed with Sphinx 1.5, I suspect that this was also a problem with Sphinx 1.4. Yet, I opted to touch it in a way that wouldn't cause backward issues. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a28ee884c6ef3ba8dfc5ac03f3463c2f12f861ed Author: Mauro Carvalho Chehab Date: Sun Sep 3 05:44:19 2017 -0400 media: vivid.rst: add a blank line to correct ReST format On all vivid parameters, there's an space after the parameter, except for "DV Timings Signal Mode". That makes this single one to be written in bold, and, at PDF output, at the same line as its description. Use the same convention as the other parameters, in order to adjust its output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/vivid.rst | 1 + 1 file changed, 1 insertion(+) commit f9e628213d5e14b57e4881fd7f3ffbf7165fecba Author: Mauro Carvalho Chehab Date: Sun Sep 3 05:13:22 2017 -0400 media: v4l2 uapi book: get rid of driver programming's chapter It doesn't make any sense having a driver programming's chapter at the uAPI book, as this is related to kernel API. Also, we now have such kAPI book where V4L2 driver programming is covered. So, get rid of this left-over. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/driver.rst | 9 --------- Documentation/media/uapi/v4l/v4l2.rst | 1 - 2 files changed, 10 deletions(-) commit 5a93bb931ea67fa7bbe87413d73f89ffd7adf5b3 Author: Mauro Carvalho Chehab Date: Sun Sep 3 05:10:44 2017 -0400 media: format.rst: use the right markup for important notes There's an important note there, but it is not using the ReST markup. So, it doesn't get any visual highlight on the output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/format.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91dd89bbbb87e970f6873ba695c7096a55d29ed6 Author: Mauro Carvalho Chehab Date: Sat Sep 2 22:08:13 2017 -0400 media: docs-rst: cardlists: change their format to flat-tables Most tables there don't fit on 80 columns. Some are very big. While those tables are actually generated via scripts, every time a new board is added, the entire table could be reformatted. >From the diffstat PoV, that's bad, as it is hard to see what happened. One such example is at changeset 4868f6e1fce6 ("media: em28xx-cardlist.rst: update to reflect last changes"): The USB ID for "Plextor ConvertX PX-AV100U" was added to card number 9, with caused the entire table to be reformatted. So, instead, use flat-tables. While here, fix PDF output, by adding tablecolumns to the tables that need it. Signed-off-by: Mauro Carvalho Chehab .../media/v4l-drivers/au0828-cardlist.rst | 44 +- Documentation/media/v4l-drivers/bttv-cardlist.rst | 849 +++++++++++++---- .../media/v4l-drivers/cx23885-cardlist.rst | 304 +++++-- Documentation/media/v4l-drivers/cx88-cardlist.rst | 469 ++++++++-- .../media/v4l-drivers/em28xx-cardlist.rst | 525 ++++++++--- Documentation/media/v4l-drivers/ivtv-cardlist.rst | 169 +++- .../media/v4l-drivers/saa7134-cardlist.rst | 999 ++++++++++++++++----- .../media/v4l-drivers/saa7164-cardlist.rst | 84 +- .../media/v4l-drivers/tm6000-cardlist.rst | 99 +- .../media/v4l-drivers/usbvision-cardlist.rst | 349 +++++-- 10 files changed, 3101 insertions(+), 790 deletions(-) commit 17cb584351f314a1270bf8504d371958060afb5b Author: Mauro Carvalho Chehab Date: Sat Sep 2 22:07:20 2017 -0400 media: em28xx-cardlist.rst: update to reflect last changes There were some new board additions. Update the cardlist accordingly. Signed-off-by: Mauro Carvalho Chehab .../media/v4l-drivers/em28xx-cardlist.rst | 210 +++++++++++---------- 1 file changed, 106 insertions(+), 104 deletions(-) commit 74c9751c833b8a9d09e9ea4098587975b9d61fd8 Author: Mauro Carvalho Chehab Date: Sat Sep 2 21:28:51 2017 -0400 media: v4l2-event.rst: adjust table to fit on PDF output The tables there don't quite fit on PDF output. Adjust it by adding a tabularcolumns macro. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-event.rst | 2 ++ 1 file changed, 2 insertions(+) commit 1b41d94bb50e34715489f48c2a649d0c130282f2 Author: Mauro Carvalho Chehab Date: Sat Sep 2 20:25:36 2017 -0400 media: docs: don't show ToC for each part on PDF output The "Table of Contents" of a PDF file is generated only once, at the beginning fo the output. It doesn't produce it on each part. So, don't output this text on each part of the document. Signed-off-by: Mauro Carvalho Chehab Documentation/media/cec-drivers/index.rst | 4 +++- Documentation/media/dvb-drivers/index.rst | 4 +++- Documentation/media/media_kapi.rst | 4 +++- Documentation/media/media_uapi.rst | 4 +++- Documentation/media/uapi/cec/cec-api.rst | 5 ++++- Documentation/media/uapi/dvb/dvbapi.rst | 4 +++- Documentation/media/uapi/mediactl/media-controller.rst | 4 +++- Documentation/media/uapi/rc/remote_controllers.rst | 4 +++- Documentation/media/uapi/v4l/v4l2.rst | 4 +++- Documentation/media/v4l-drivers/index.rst | 4 +++- 10 files changed, 31 insertions(+), 10 deletions(-) commit f989420788b752a78de3c2257b46ca9bfd244e29 Author: Mauro Carvalho Chehab Date: Sat Sep 2 20:02:42 2017 -0400 media: cec uapi: Adjust table sizes for PDF output Several tables at this media book chapter have issues when PDF is produced. Adjust them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 7 +++++-- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 9 +++++---- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 2 ++ Documentation/media/uapi/cec/cec-ioc-receive.rst | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) commit 1367f4ee6ea22fd83f71fd9eddfc7a5f13af0e0f Author: Mauro Carvalho Chehab Date: Sat Sep 2 19:29:53 2017 -0400 media: mc uapi: adjust some table sizes for PDF output Some cells are too small to fit the text written to it. Increase it. No text changes. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst | 2 +- Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- Documentation/media/uapi/mediactl/media-types.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 432e6be476d2e870ca666529e0b72e8af2595421 Author: Mauro Carvalho Chehab Date: Sat Sep 2 18:59:25 2017 -0400 media: rc-sysfs-nodes.rst: better use literals A literal box provides a better visual when pdf and html output is generated for things like the output of a sysfs devnode. It alsod matches other conventions used within the media book. So, use it. While here, use literals for protocol names. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/rc-sysfs-nodes.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b5dd3eac8407f0d62d63cc2ecec7f3cb2445ee3a Author: Mauro Carvalho Chehab Date: Sat Sep 2 17:46:52 2017 -0400 media: docs: fix PDF build with Sphinx 1.4 Commit 70b074df4ed1 ("media: fix pdf build with Spinx 1.6") caused a regression at Sphinx 1.4 PDF build: although it produces a full document in batch mode, it returns errors on interactive mode: [63] Runaway argument? {\relax ! Paragraph ended before \multicolumn was complete. \par l.7703 \hline\end{tabulary} The error seems to be due to some bug at Sphinx PDF output: when multicolumns is used, it doesn't accept an empty string. Just removing the :cpan:`1` and replacing by two empty columns fix the issue. Fixes: 70b074df4ed1 ("media: fix pdf build with Spinx 1.6") Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 6 ++++-- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit b75c1d85c37d9e77c9c654e76c208d3addc89681 Author: Mauro Carvalho Chehab Date: Sat Sep 2 16:50:45 2017 -0400 media: v4l uAPI docs: adjust some tables for PDF output On tests with Spinx 1.4, some tables are still writing text outside cells. Adjust those tables. PS.: As this was revisited several times, I suspect that this will only be fully fixed if we add tabularcolumns to all tables at the V4L2 part of the book. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/colorspaces-defs.rst | 2 ++ Documentation/media/uapi/v4l/v4l2-selection-targets.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-querycap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-subscribe-event.rst | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) commit 4d6436962a737f8dbf9b53325275b9f00b177d5e Author: Mauro Carvalho Chehab Date: Sat Sep 2 16:48:28 2017 -0400 media: vidioc-g-tuner.rst: Fix table number of cols The Tuner Audio Matrix table is broken: the first row has 7 columns instead of 6, causing it to be parsed wrong and displayed very badly on PDF output. Fix it and adjust the table to look nice at PDF output Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d39d7085222f78035b49bc48eb1c0f6180d085b9 Author: Mauro Carvalho Chehab Date: Sat Sep 2 16:32:15 2017 -0400 media: vidioc-querycap: use a more realistic value for KERNEL_VERSION In the past, V4L2 versions were 0.x.y, but that changed years ago. Since Kernel 3.1, however, the numbering schema was changed to match the Kernel version. However, the presented example still uses the old numerating schema, with is a misleading information. So, update it to the new schema. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-querycap.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1473c75e9aaf29f26fced257a26275f7cf10bb51 Author: Mauro Carvalho Chehab Date: Sat Sep 2 09:54:48 2017 -0400 media: v4l uAPI: add descriptions for arguments to all ioctls Several ioctls are missing descriptions for the third argument of the ioctl() command. They should have a description, as otherwise the output won't be ok, and will sound like something is missing. So, add them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-create-bufs.rst | 1 + Documentation/media/uapi/v4l/vidioc-cropcap.rst | 1 + Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 1 + Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst | 1 + Documentation/media/uapi/v4l/vidioc-dqevent.rst | 1 + Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 1 + Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst | 1 + Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 1 + Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst | 5 ++--- Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst | 1 + Documentation/media/uapi/v4l/vidioc-enumaudio.rst | 1 + Documentation/media/uapi/v4l/vidioc-enumaudioout.rst | 1 + Documentation/media/uapi/v4l/vidioc-enuminput.rst | 1 + Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 1 + Documentation/media/uapi/v4l/vidioc-enumstd.rst | 1 + Documentation/media/uapi/v4l/vidioc-expbuf.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-audio.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-crop.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-edid.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-enc-index.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-frequency.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-input.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-output.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-parm.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-priority.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-selection.rst | 5 +---- Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-std.rst | 1 + Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 1 + Documentation/media/uapi/v4l/vidioc-overlay.rst | 1 + Documentation/media/uapi/v4l/vidioc-prepare-buf.rst | 1 + Documentation/media/uapi/v4l/vidioc-qbuf.rst | 1 + Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst | 1 + Documentation/media/uapi/v4l/vidioc-querybuf.rst | 1 + Documentation/media/uapi/v4l/vidioc-querycap.rst | 1 + Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-querystd.rst | 1 + Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 2 +- Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 1 + Documentation/media/uapi/v4l/vidioc-streamon.rst | 2 +- Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst | 1 + Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst | 1 + Documentation/media/uapi/v4l/vidioc-subscribe-event.rst | 1 + 58 files changed, 60 insertions(+), 12 deletions(-) commit 7e6854a9bfea9ed6553acd0204da5101c9a2e6a0 Author: Mauro Carvalho Chehab Date: Mon Sep 4 08:03:40 2017 -0400 media: ca.h: document ca_msg and the corresponding ioctls Usually, CA messages are sent/received via reading/writing at the CA device node. However, two drivers (dst_ca and firedtv-ci) also implement it via ioctls. Apparently, on both cases, the net result is the same. Anyway, let's document it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-msg.rst | 19 ++++++------------- Documentation/media/uapi/dvb/ca-send-msg.rst | 6 +++++- include/uapi/linux/dvb/ca.h | 11 ++++++++++- 3 files changed, 21 insertions(+), 15 deletions(-) commit bd9049edc66e13e868f819c39844f60443e70817 Author: Mauro Carvalho Chehab Date: Sun Sep 3 20:50:17 2017 -0400 media: ca docs: document CA_SET_DESCR ioctl and structs The av7110 driver uses CA_SET_DESCR to store the descrambler control words at the CA descrambler slots. Document it. Thanks-to: Honza Petrouš Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-set-descr.rst | 15 ++------------- include/uapi/linux/dvb/ca.h | 9 ++++++++- 2 files changed, 10 insertions(+), 14 deletions(-) commit 56d51b65bcc7a5780663abd579fb6f039616b347 Author: Mauro Carvalho Chehab Date: Fri Sep 1 15:45:47 2017 -0400 media: net.h: add kernel-doc and use it at Documentation/ As we did with frontend.h, ca.h and dmx.h, move the struct definition to net.h. That should help to keep it updated, as more stuff gets added there. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/net-add-if.rst | 34 ----------------------------- Documentation/media/uapi/dvb/net-types.rst | 9 ++++++++ Documentation/media/uapi/dvb/net.rst | 1 + include/uapi/linux/dvb/net.h | 15 +++++++++++++ 4 files changed, 25 insertions(+), 34 deletions(-) commit 5176d6eefd5d58fbb787f96c2140cffb2e826b17 Author: Mauro Carvalho Chehab Date: Fri Sep 1 15:05:28 2017 -0400 media: frontend.h: Avoid the term DVB when doesn't refer to a delivery system The DVB term can either refer to the subsystem or to a delivery system. Avoid it in the first case at the kernel-doc markups. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/frontend.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e30c077d4125b4b69717350b44b19013ef0bbe5 Author: Mauro Carvalho Chehab Date: Fri Sep 1 14:44:31 2017 -0400 media: intro.rst: don't assume audio and video codecs to be MPEG2 Originally, when DVB was introduced, all codecs would be part of MPEG2 standard. That's not true anymore, as there are a large number of codec standards used on digital TV nowadays. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 90b588a9b45cf64d2b7d83fc5f496a6ffb4f70cc Author: Mauro Carvalho Chehab Date: Fri Sep 1 14:14:48 2017 -0400 media: dvbstb.svg: use dots for the optional parts of the hardware The hardware description mentions that some parts are optional. Make it clearer at the drawing. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dvbstb.svg | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 76df39fa82645bb0c9cd30bf981d54ab2c332d32 Author: Mauro Carvalho Chehab Date: Fri Sep 1 13:44:28 2017 -0400 media: dmx-get-pes-pids.rst: document the ioctl This ioctl is supported by the DVB core, but was never documented. Add a documentation for it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dmx-get-pes-pids.rst | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 883dfe8ae6c7dfe4b97151094459b8a32665a168 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:21:49 2017 -0400 media: dvb uAPI docs: minor editorial changes Do minor editorial changes to improve documentation readability: - mark literals as such; - add table markups to hint sizes; - define what PES means; - instead of hardcoding devnode numbers to zero (like adapter0/) use a question mark, to indicate that multiple devnodes may exist; - add cross-references where useful. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-fopen.rst | 25 +++++++++++----------- Documentation/media/uapi/dvb/dmx-add-pid.rst | 4 ++-- Documentation/media/uapi/dvb/dmx-fclose.rst | 5 +++-- Documentation/media/uapi/dvb/dmx-fopen.rst | 23 +++++++++++--------- Documentation/media/uapi/dvb/dmx-fread.rst | 8 +++---- Documentation/media/uapi/dvb/dmx-fwrite.rst | 4 ++-- Documentation/media/uapi/dvb/dmx-get-stc.rst | 13 +++++------ Documentation/media/uapi/dvb/dmx-remove-pid.rst | 4 ++-- .../media/uapi/dvb/dmx-set-buffer-size.rst | 2 +- Documentation/media/uapi/dvb/dmx-set-filter.rst | 4 ++-- Documentation/media/uapi/dvb/dmx-stop.rst | 4 ++-- .../media/uapi/dvb/dvb-fe-read-status.rst | 2 +- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 3 ++- Documentation/media/uapi/dvb/fe-get-info.rst | 4 ++-- .../media/uapi/dvb/fe-set-frontend-tune-mode.rst | 4 ++-- Documentation/media/uapi/dvb/fe-type-t.rst | 2 +- 16 files changed, 59 insertions(+), 52 deletions(-) commit 8e3195101bc24eb09def6cb3a42a37dde2c31c52 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:32:44 2017 -0400 media: dvbapi.rst: add an entry to DVB revision history There are several missing items at the API history. Yet, as we're doing a significant change there, add a new entry. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dvbapi.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 536593acc715712007001c9b75ce4712daacf0c4 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:31:43 2017 -0400 media: dvb-frontend-parameters.rst: fix the name of a struct The struct that contains an union of DVB parameters is called dvb_frontend_parameters (and not FrontendParameters). Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dvb-frontend-parameters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02a3c98c6beb174022c5e46a627528be53a47755 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:30:16 2017 -0400 media: dmx-fread.rst: specify how DMX_CHECK_CRC works In the past, the documentation used to say that, if a CRC error was found, a "-ECRC" error would be returned. That's not true: the DVB core will just silently ignore such errors. So, add an explicit note about that. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dmx-fread.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 699f19e3f1e84e7e0ce3b2be7ceafe4ce99b606e Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:28:16 2017 -0400 media: dvb uAPI docs: Prefer use "Digital TV instead of "DVB" The usage of the term "DVB" at the dvb API docs is confusing, as, right now, it can refer to either the European digital TV standard or to the subsystem. So, prefer calling it as "Digital TV" on most places, to avoid ambiguity. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/dvb/audio-channel-select.rst | 2 +- Documentation/media/uapi/dvb/audio-fclose.rst | 8 +++---- Documentation/media/uapi/dvb/audio-fopen.rst | 8 +++---- Documentation/media/uapi/dvb/audio-fwrite.rst | 8 +++---- Documentation/media/uapi/dvb/audio-set-av-sync.rst | 2 +- .../media/uapi/dvb/audio-set-bypass-mode.rst | 6 +++--- Documentation/media/uapi/dvb/audio-set-mute.rst | 2 +- Documentation/media/uapi/dvb/audio.rst | 13 +++++------ Documentation/media/uapi/dvb/ca-fclose.rst | 8 +++---- Documentation/media/uapi/dvb/ca-fopen.rst | 10 ++++----- Documentation/media/uapi/dvb/ca.rst | 11 +++++----- Documentation/media/uapi/dvb/demux.rst | 13 +++++++---- Documentation/media/uapi/dvb/dmx-fclose.rst | 8 +++---- Documentation/media/uapi/dvb/dmx-fopen.rst | 10 ++++----- Documentation/media/uapi/dvb/dmx-fread.rst | 8 +++---- Documentation/media/uapi/dvb/dmx-fwrite.rst | 8 +++---- Documentation/media/uapi/dvb/dvbapi.rst | 25 ++++++++++++++++------ Documentation/media/uapi/dvb/dvbproperty.rst | 4 ++-- Documentation/media/uapi/dvb/examples.rst | 4 ++-- .../media/uapi/dvb/fe-diseqc-reset-overload.rst | 2 +- Documentation/media/uapi/dvb/fe-get-info.rst | 5 +++-- Documentation/media/uapi/dvb/fe-get-property.rst | 2 +- Documentation/media/uapi/dvb/fe-read-status.rst | 2 +- .../media/uapi/dvb/fe_property_parameters.rst | 4 ++-- .../dvb/frontend-property-terrestrial-systems.rst | 2 +- Documentation/media/uapi/dvb/frontend.rst | 10 ++++----- Documentation/media/uapi/dvb/frontend_f_close.rst | 6 +++--- Documentation/media/uapi/dvb/frontend_f_open.rst | 6 +++--- .../media/uapi/dvb/frontend_legacy_dvbv3_api.rst | 6 +++--- Documentation/media/uapi/dvb/intro.rst | 18 ++++++++-------- Documentation/media/uapi/dvb/legacy_dvb_apis.rst | 6 +++--- Documentation/media/uapi/dvb/net-add-if.rst | 2 +- Documentation/media/uapi/dvb/net.rst | 13 +++++------ .../media/uapi/dvb/query-dvb-frontend-info.rst | 4 ++-- Documentation/media/uapi/dvb/video-continue.rst | 2 +- Documentation/media/uapi/dvb/video-freeze.rst | 4 ++-- Documentation/media/uapi/dvb/video-get-event.rst | 2 +- Documentation/media/uapi/dvb/video-play.rst | 2 +- .../media/uapi/dvb/video-select-source.rst | 2 +- Documentation/media/uapi/dvb/video-stop.rst | 2 +- Documentation/media/uapi/dvb/video.rst | 15 +++++++------ 41 files changed, 149 insertions(+), 126 deletions(-) commit 0de6357aca39e28118edde71216ef44af7fddc39 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:23:17 2017 -0400 media: ca-fopen.rst: Fixes the device node name for CA The device node name for CA is wrong since ever. I suspect that the name there was before DVBv3 (with was the first API introduced at the Kernel). Anyway, use the right name there. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-fopen.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a721b9b4b0e3d0b998a68bd619b2e94f6e99eb9 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:15:43 2017 -0400 media: dvb uAPI docs: adjust return value ioctl descriptions There are several issues on the return value for ioctls: - Text is confusing; - Some error codes don't exist; - The non-generic error codes should come before the text that points to the generic error codes; - Tables don't contain column size hints; - Some references are not marked as such. Correct them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-fclose.rst | 13 ++--- Documentation/media/uapi/dvb/ca-fopen.rst | 32 ++----------- Documentation/media/uapi/dvb/ca-get-cap.rst | 4 +- Documentation/media/uapi/dvb/ca-get-msg.rst | 9 +++- Documentation/media/uapi/dvb/ca-get-slot-info.rst | 10 +++- Documentation/media/uapi/dvb/ca-reset.rst | 8 +++- Documentation/media/uapi/dvb/ca-send-msg.rst | 8 +++- Documentation/media/uapi/dvb/ca-set-descr.rst | 8 +++- Documentation/media/uapi/dvb/dmx-add-pid.rst | 8 +++- Documentation/media/uapi/dvb/dmx-fclose.rst | 13 ++--- Documentation/media/uapi/dvb/dmx-fopen.rst | 33 +++++-------- Documentation/media/uapi/dvb/dmx-fread.rst | 55 +++++++--------------- Documentation/media/uapi/dvb/dmx-fwrite.rst | 29 +++++------- Documentation/media/uapi/dvb/dmx-get-pes-pids.rst | 8 +++- Documentation/media/uapi/dvb/dmx-get-stc.rst | 15 ++++-- Documentation/media/uapi/dvb/dmx-remove-pid.rst | 8 +++- .../media/uapi/dvb/dmx-set-buffer-size.rst | 9 +++- Documentation/media/uapi/dvb/dmx-set-filter.rst | 9 +++- .../media/uapi/dvb/dmx-set-pes-filter.rst | 12 +++-- Documentation/media/uapi/dvb/dmx-start.rst | 15 ++++-- Documentation/media/uapi/dvb/dmx-stop.rst | 8 +++- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 8 +++- .../media/uapi/dvb/fe-diseqc-reset-overload.rst | 8 +++- .../media/uapi/dvb/fe-diseqc-send-burst.rst | 8 +++- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 8 +++- .../uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst | 8 +++- .../media/uapi/dvb/fe-enable-high-lnb-voltage.rst | 8 +++- Documentation/media/uapi/dvb/fe-get-event.rst | 9 ++-- Documentation/media/uapi/dvb/fe-get-frontend.rst | 10 ++-- Documentation/media/uapi/dvb/fe-get-info.rst | 8 +++- Documentation/media/uapi/dvb/fe-get-property.rst | 8 +++- Documentation/media/uapi/dvb/fe-read-ber.rst | 8 +++- .../media/uapi/dvb/fe-read-signal-strength.rst | 8 +++- Documentation/media/uapi/dvb/fe-read-snr.rst | 8 +++- Documentation/media/uapi/dvb/fe-read-status.rst | 8 +++- .../media/uapi/dvb/fe-read-uncorrected-blocks.rst | 8 +++- .../media/uapi/dvb/fe-set-frontend-tune-mode.rst | 8 +++- Documentation/media/uapi/dvb/fe-set-frontend.rst | 15 ++++-- Documentation/media/uapi/dvb/fe-set-tone.rst | 8 +++- Documentation/media/uapi/dvb/fe-set-voltage.rst | 8 +++- Documentation/media/uapi/dvb/frontend_f_close.rst | 10 ++-- Documentation/media/uapi/dvb/frontend_f_open.rst | 38 +++++++++------ Documentation/media/uapi/dvb/net-add-if.rst | 8 +++- Documentation/media/uapi/dvb/net-get-if.rst | 8 +++- Documentation/media/uapi/dvb/net-remove-if.rst | 8 +++- 45 files changed, 327 insertions(+), 221 deletions(-) commit 4e3b0cab6d18461d74769a5e504a7a95eb2299d8 Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:20:12 2017 -0400 media: gen-errors.rst: document ENXIO error code This error can be produced at least at the DVB subsystem. As it is generic enough, document it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/gen-errors.rst | 5 +++++ 1 file changed, 5 insertions(+) commit d12502b84cb4c6338dd972bcaaed0509e7cad45a Author: Mauro Carvalho Chehab Date: Fri Sep 1 12:19:17 2017 -0400 media: gen-errors.rst: remove row number comments Those are introduced by the conversion scripts and don't really help. Get rid of them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/gen-errors.rst | 44 +++++++++------------------------ 1 file changed, 11 insertions(+), 33 deletions(-) commit 07ebca6202380c2f9d700e1b37a98a63b68b72c7 Author: Mauro Carvalho Chehab Date: Fri Sep 1 10:02:23 2017 -0400 media: dvb uapi docs: better organize header files Instead of having one chapter per file, place all of them at the same chapter. That better organize the chapters at the uAPI documentation. As a side effect, now all uAPI headers are at the same page, at the html output, with makes easier to use it as a reference index for the spec. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/audio_h.rst | 9 --------- Documentation/media/uapi/dvb/ca_h.rst | 9 --------- Documentation/media/uapi/dvb/dmx_h.rst | 9 --------- Documentation/media/uapi/dvb/dvbapi.rst | 7 +------ Documentation/media/uapi/dvb/frontend_h.rst | 9 --------- Documentation/media/uapi/dvb/headers.rst | 21 +++++++++++++++++++++ Documentation/media/uapi/dvb/net_h.rst | 9 --------- Documentation/media/uapi/dvb/video_h.rst | 9 --------- 8 files changed, 22 insertions(+), 60 deletions(-) commit d8bc60a90d0090b7cae1bd6296230d82f6cac455 Author: Mauro Carvalho Chehab Date: Fri Sep 1 09:18:02 2017 -0400 media: dst_ca: remove CA_SET_DESCR boilerplate This ioctl is not implemented at dst_ca driver. There's just a boilerplate code there. Remove it, as it is unlikely that anyone would implement it those days. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/dst_ca.c | 17 ----------------- 1 file changed, 17 deletions(-) commit bbed074e8c58d9bf8fd7a57b1d796e1c43b43e75 Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:53:11 2017 -0400 media: dvb rst: identify the documentation gap at the API Now that DVB spec is almost in sync, document what's missing. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca.rst | 5 +++++ Documentation/media/uapi/dvb/legacy_dvb_apis.rst | 5 +++++ 2 files changed, 10 insertions(+) commit 33047274346a830e9620764f11e37f5f6acc380d Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:45:28 2017 -0400 media: dvb CA docs: place undocumented data together with ioctls Right now, the same undocumented structs are on two places: at ca_data_types.rst and together with their ioctls. Move them to just one place and use the standard way to represent them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-msg.rst | 38 ++++++-------------------- Documentation/media/uapi/dvb/ca-set-descr.rst | 10 +++++++ Documentation/media/uapi/dvb/ca_data_types.rst | 32 ---------------------- 3 files changed, 19 insertions(+), 61 deletions(-) commit e0f891d8462d51bf42da16095fc9de57f7648043 Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:39:43 2017 -0400 media: ca-get-descr-info.rst: document this ioctl Instead of a generic boilerplate, fill it with relevant information about this ioctl. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-descr-info.rst | 29 +++------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit 5d153fb888bd9bae0802d0a8db8e1321caf4296e Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:32:56 2017 -0400 media: ca-get-slot-info.rst: document this ioctl Instead of a generic boilerplate, fill it with relevant information about this ioctl. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-slot-info.rst | 98 +++-------------------- 1 file changed, 11 insertions(+), 87 deletions(-) commit 3c71bfd433b4d936dce21b5a7ed3274220669680 Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:07:46 2017 -0400 media: ca-get-cap.rst: document this ioctl Instead of a generic boilerplate, fill it with relevant information about this ioctl. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-cap.rst | 36 ++++------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) commit 12fe8a410053739cd6b1228db69da68b22dbf7e6 Author: Mauro Carvalho Chehab Date: Fri Sep 1 07:59:59 2017 -0400 media: ca-reset.rst: add some description to this ioctl While we don't have any documentation for it, based on what's there at Kaffeine and VDR, it seems that this command should be issued before start using CA. So, document it as such. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-reset.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39a7c8a8b5fb679f1f2d77f0f30efe1d14ff0dbc Author: Mauro Carvalho Chehab Date: Fri Sep 1 08:21:04 2017 -0400 media: dst_ca: return a proper error code from CA errors Right now, on several places, the driver is returning a "-1" error to userspace, instead of a proper error code. Fix it. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/dst_ca.c | 41 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit fed7c4fe8bd0b131cc3f19ba2744061935cdcdb7 Author: Mauro Carvalho Chehab Date: Fri Sep 1 07:48:02 2017 -0400 media: ca.h: document most CA data types For most of the stuff there, documenting is easy, as the header file contains information. Yet, I was unable to document two data structs: ca_msg and ca_descr As those two structs are used by a few drivers, keep them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca_data_types.rst | 75 ++++--------------------- include/uapi/linux/dvb/ca.h | 78 ++++++++++++++++++++------ 2 files changed, 70 insertions(+), 83 deletions(-) commit 833ff5e7feda1a042b83e82208cef3d212ca0ef1 Author: Mauro Carvalho Chehab Date: Fri Sep 1 07:41:49 2017 -0400 media: ca.h: get rid of CA_SET_PID This ioctl seems to be some attempt to support a feature at the bt8xx dst_ca driver. Yet, as said there, it "needs more work". Right now, the code there is just a boilerplate. At the end of the day, no driver uses this ioctl, nor it is documented anywhere (except for "needs more work"). So, get rid of it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/ca.h.rst.exceptions | 1 - Documentation/media/dvb-drivers/ci.rst | 1 - Documentation/media/uapi/dvb/ca-set-pid.rst | 60 ---------------------- Documentation/media/uapi/dvb/ca_data_types.rst | 14 ----- Documentation/media/uapi/dvb/ca_function_calls.rst | 1 - drivers/media/pci/bt8xx/dst_ca.c | 16 ------ include/uapi/linux/dvb/ca.h | 7 --- 7 files changed, 100 deletions(-) commit abe8ee991c8eb7503400ff5b5aa16ee5637a01ab Author: Mauro Carvalho Chehab Date: Thu Aug 31 19:34:02 2017 -0400 media: net.rst: Fix the level of a section of the net chapter Due to a mistake, the DVB net chapter was actually broken into two different chapters. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/net.rst | 1 - 1 file changed, 1 deletion(-) commit bb98e6d280e00a1180f47d3391ee0bd1f312b5f6 Author: Mauro Carvalho Chehab Date: Thu Aug 31 12:28:52 2017 -0400 media: dmx.h: add kernel-doc markups and use it at Documentation/ The demux documentation is pretty poor nowadays: most of the structs and enums aren't documented at all. Add proper kernel-doc markups for them and use it. Now, the demux API data structures are fully documented :-) Signed-off-by: Mauro Carvalho Chehab Documentation/media/dmx.h.rst.exceptions | 5 + Documentation/media/uapi/dvb/dmx_types.rst | 173 +---------------------------- include/uapi/linux/dvb/dmx.h | 139 ++++++++++++++++++----- 3 files changed, 120 insertions(+), 197 deletions(-) commit 2889017c92ddacfbece9a288bbc716e1c5ab719b Author: Mauro Carvalho Chehab Date: Thu Aug 31 19:09:06 2017 -0400 media: dmx.h: get rid of GET_DMX_EVENT This seems to be a pure fictional API :-) It only exists at the DVB book, with no code implemeting it. So, just get rid of it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dmx-get-event.rst | 60 -------------------------- Documentation/media/uapi/dvb/dmx_fcalls.rst | 1 - Documentation/media/uapi/dvb/dmx_types.rst | 19 -------- 3 files changed, 80 deletions(-) commit 13adefbe9e566c6db91579e4ce17f1e5193d6f2c Author: Mauro Carvalho Chehab Date: Thu Aug 31 14:21:43 2017 -0400 media: dmx.h: get rid of DMX_SET_SOURCE No driver uses this ioctl, nor it is documented anywhere. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/dmx.h.rst.exceptions | 13 -------- Documentation/media/uapi/dvb/dmx-set-source.rst | 44 ------------------------- Documentation/media/uapi/dvb/dmx_fcalls.rst | 1 - Documentation/media/uapi/dvb/dmx_types.rst | 20 ----------- include/uapi/linux/dvb/dmx.h | 12 ------- 5 files changed, 90 deletions(-) commit 286fe1ca3fa1b6fcc7ce8695b7c8d681e6e1c3b7 Author: Mauro Carvalho Chehab Date: Thu Aug 31 14:11:34 2017 -0400 media: dmx.h: get rid of DMX_GET_CAPS There's no driver currently using it; it is also not documented about what it would be supposed to do. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/dmx.h.rst.exceptions | 1 - Documentation/media/uapi/dvb/dmx-get-caps.rst | 41 --------------------------- Documentation/media/uapi/dvb/dmx_fcalls.rst | 1 - Documentation/media/uapi/dvb/dmx_types.rst | 12 -------- include/uapi/linux/dvb/dmx.h | 7 ----- 5 files changed, 62 deletions(-) commit 791edca5685b26d4575e59f5420ba3e206f5cebb Author: Mauro Carvalho Chehab Date: Thu Aug 31 12:52:45 2017 -0400 media: dmx.h: get rid of unused DMX_KERNEL_CLIENT There's a flag defined for Digital TV demux that is not used anywhere, called DMX_KERNEL_CLIENT. Get rid of it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/dmx.h.rst.exceptions | 1 - Documentation/media/uapi/dvb/dmx_types.rst | 1 - include/uapi/linux/dvb/dmx.h | 1 - 3 files changed, 3 deletions(-) commit 7d661edd0daf91cceafc72dc5b4fa0b20317239d Author: Mauro Carvalho Chehab Date: Thu Aug 31 07:17:21 2017 -0400 media: fe_property_parameters.rst: better document bandwidth Use a table to document the supported bandwidths. That makes it clearer to readers. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/dvb/fe_property_parameters.rst | 38 +++++++++++++--------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 1181415dc6e3d60b7eaf8b18c402b331b7744515 Author: Mauro Carvalho Chehab Date: Thu Aug 31 07:16:17 2017 -0400 media: fe_property_parameters.rst: better define properties usage Several frontend properties are specific to a subset of the delivery systems. Make it clearer when describing each property. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/dvb/fe_property_parameters.rst | 82 ++++++++++++++++++++-- 1 file changed, 75 insertions(+), 7 deletions(-) commit 9d5e27cbc117671959a9f625e51c754f5a0666e3 Author: Mauro Carvalho Chehab Date: Wed Aug 30 13:45:20 2017 -0400 media: dvb frontend docs: use kernel-doc documentation Now that frontend.h contains most documentation for the frontend, remove the duplicated information from Documentation/ and use the kernel-doc auto-generated one instead. That should simplify maintainership of DVB frontend uAPI, as most of the documentation will stick with the header file. Signed-off-by: Mauro Carvalho Chehab Documentation/media/frontend.h.rst.exceptions | 185 +- Documentation/media/uapi/dvb/dtv-fe-stats.rst | 17 - Documentation/media/uapi/dvb/dtv-properties.rst | 15 - Documentation/media/uapi/dvb/dtv-property.rst | 31 - Documentation/media/uapi/dvb/dtv-stats.rst | 18 - Documentation/media/uapi/dvb/dvbproperty-006.rst | 12 - Documentation/media/uapi/dvb/dvbproperty.rst | 28 +- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 40 +- .../media/uapi/dvb/fe-diseqc-send-burst.rst | 31 +- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 29 +- Documentation/media/uapi/dvb/fe-get-info.rst | 370 +--- Documentation/media/uapi/dvb/fe-get-property.rst | 2 +- Documentation/media/uapi/dvb/fe-read-status.rst | 83 - Documentation/media/uapi/dvb/fe-set-tone.rst | 30 - .../media/uapi/dvb/fe_property_parameters.rst | 1847 +++++--------------- Documentation/media/uapi/dvb/frontend-header.rst | 4 + include/uapi/linux/dvb/frontend.h | 8 +- 17 files changed, 602 insertions(+), 2148 deletions(-) commit 8220ead805b6bab4ade2839857a198e9708b07de Author: Mauro Carvalho Chehab Date: Wed Aug 30 08:12:38 2017 -0400 media: dvb/frontend.h: document the uAPI file Most of the stuff at the Digital TV frontend header file are documented only at the Documentation. However, a few kernel-doc markups are there, several of them with parsing issues. Add the missing documentation, copying definitions from the Documentation when it applies, fixing some bugs. Please notice that DVBv3 stuff that were deprecated weren't commented by purpose. Instead, they were clearly tagged as such. This patch prepares to move part of the documentation from Documentation/ to kernel-doc comments. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/frontend.h | 580 ++++++++++++++++++++++++++++++++------ 1 file changed, 498 insertions(+), 82 deletions(-) commit f35afa4f60c868d7c7811ba747133acbf39410ac Author: Mauro Carvalho Chehab Date: Wed Aug 30 07:55:47 2017 -0400 media: dvb/frontend.h: move out a private internal structure struct dtv_cmds_h is just an ancillary struct used by the dvb_frontend.c to internally store frontend commands. It doesn't belong to the userspace header, nor it is used anywhere, except inside the DVB core. So, remove it from the header. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 11 +++++++++++ include/uapi/linux/dvb/frontend.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 192f8bc1338318b8967199cda26517a589d277f0 Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:25:20 2017 -0400 media: dvb/intro: adjust the notices about optional hardware Both CA and decoders are optional. Also, the presence or absence has nothing to do on being a PCI card or not. Nowadays, most hardware leaves the decoders to either the GPU or to some ISP inside the SoC, instead of implementing it inside the Digital TV part of the device. So, change the wording to reflect the hardware changes. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 9a9bf23089d8a36ad6c4604ba6821d7906e4b80e Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:20:45 2017 -0400 media: dvb/intro: update the history part of the document Convergence doesn't exist anymore. The community itself maintains the spec. Update accordingly. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 3e202f2b32e18c5807a169a6cf10059b14ac467a Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:19:25 2017 -0400 media: dvb/intro: update references for TV standards The references there are only for DVB. Add missing references for ATSC and ISDB standards. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 89aba6adc16533f3c1faf404765e0e45b323e7ae Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:15:40 2017 -0400 media: dvb/intro: use the term Digital TV to refer to the system On several places at the introduction, a digital TV board and its kernel support is called as DVB. The reason is simple: by the time the document was written, there were no other digital TV standards :-) Modernize the specs by referring to them as Digital TV. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 3256b36ea36525945d8575c0100752819a309aaa Author: Mauro Carvalho Chehab Date: Fri Sep 1 06:09:14 2017 -0400 media: dmx.h: split typedefs from structs Using typedefs inside the Kernel is against CodingStyle, and there's no good usage here. Just like we did at frontend.h, at commit 0df289a209e0 ("[media] dvb: Get rid of typedev usage for enums"), let's keep those typedefs only to provide userspace backward compatibility. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.c | 4 +-- include/uapi/linux/dvb/dmx.h | 56 ++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 25 deletions(-) commit c93022a72f01f8e53d6e1bc2a8d2c2824c2f36bc Author: Mauro Carvalho Chehab Date: Fri Sep 1 05:43:39 2017 -0400 media: ca.h: split typedefs from structs Using typedefs inside the Kernel is against CodingStyle, and there's no good usage here. Just like we did at frontend.h, at commit 0df289a209e0 ("[media] dvb: Get rid of typedev usage for enums"), let's keep those typedefs only to provide userspace backward compatibility. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/av7110.h | 2 +- drivers/media/pci/ttpci/av7110_ca.c | 12 ++++----- include/uapi/linux/dvb/ca.h | 51 +++++++++++++++++++++++-------------- 3 files changed, 39 insertions(+), 26 deletions(-) commit 9de981f507474f326e42117858dc9a9321331ae5 Author: Beni Lev Date: Tue Jul 25 11:25:25 2017 +0300 mac80211_hwsim: Use proper TX power In struct ieee80211_tx_info, control.vif pointer and rate_driver_data[0] falls on the same place, depending on the union usage. During the whole TX process, the union is referred to as a control struct, which holds the vif that is later used in the tx flow, especially in order to derive the used tx power. Referring direcly to rate_driver_data[0] and assigning a value to it, overwrites the vif pointer, hence making all later references irrelevant. Moreover, rate_driver_data[0] isn't used later in the flow in order to retrieve the channel that it is pointing to. Cc: stable@vger.kernel.org Signed-off-by: Beni Lev Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 -- 1 file changed, 2 deletions(-) commit 89e9bfc4ee859ad2a477f10aa2d5c37377242296 Author: Chunho Lee Date: Fri Jul 7 17:03:14 2017 -0700 mac80211: Fix null pointer dereference with iTXQ support This change adds null pointer check before dereferencing pointer dev on netif_tx_start_all_queues() when an interface is added. With iTXQ support, netif_tx_start_all_queues() is always called while an interface is added. however, the netdev queues are not associated and dev is null when the interface is either NL80211_IFTYPE_P2P_DEVICE or NL80211_IFTYPE_NAN. Signed-off-by: Chunho Lee Signed-off-by: Johannes Berg net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b44eebea181a36378bea8f27e7f9b4175bfad683 Author: Liad Kaufman Date: Sat Aug 5 11:44:29 2017 +0300 mac80211: add MESH IE in the correct order VHT MESH support was added, but the order of the IEs wasn't enforced. Fix that. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d81b0fd0e7b76b05873299ae2dd310127b13613b Author: Sharon Dvir Date: Sat Aug 5 11:44:30 2017 +0300 mac80211: shorten debug prints using ht_dbg() to avoid warning Invoking ht_dbg() with too long of a string will print a warning. Shorten the messages while retaining the printed patameters. Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53168215909281a09d3afc6fb51a9d4f81f74d39 Author: Johannes Berg Date: Thu Jun 22 12:20:30 2017 +0200 mac80211: fix VLAN handling with TXQs With TXQs, the AP_VLAN interfaces are resolved to their owner AP interface when enqueuing the frame, which makes sense since the frame really goes out on that as far as the driver is concerned. However, this introduces a problem: frames to be encrypted with a VLAN-specific GTK will now be encrypted with the AP GTK, since the information about which virtual interface to use to select the key is taken from the TXQ. Fix this by preserving info->control.vif and using that in the dequeue function. This now requires doing the driver-mapping in the dequeue as well. Since there's no way to filter the frames that are sitting on a TXQ, drop all frames, which may affect other interfaces, when an AP_VLAN is removed. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg include/net/mac80211.h | 15 ++------------- net/mac80211/iface.c | 17 +++++++++++++++-- net/mac80211/tx.c | 36 +++++++++++++++++++++++++++++------- 3 files changed, 46 insertions(+), 22 deletions(-) commit de6c5070ad3956125fe8d407381c1b18f9749f93 Merge: 5c891d5 9d14201 Author: Jiri Kosina Date: Tue Sep 5 11:14:10 2017 +0200 Merge branch 'for-4.14/wacom' into for-linus - name generation improvement for Wacom devices from Jason Gerecke - Kconfig dependency fix for Wacom driver from Arnd Bergmann commit 5c891d5e094c15bd7791dc84749b5239257f5f2d Merge: 38e50c9 0acb310c Author: Jiri Kosina Date: Tue Sep 5 11:13:17 2017 +0200 Merge branch 'for-4.14/upstream' into for-linus - usb_device_id and snd_rawmidi_ops constifications from Julia Lawall and Arvind Yadav commit 38e50c9ba84ad755247220ce6a881fbdb44aaeec Merge: d29ed11 39bbf40 Author: Jiri Kosina Date: Tue Sep 5 11:11:52 2017 +0200 Merge branch 'for-4.14/multitouch' into for-linus - support for media keys on Asus T304UA from João Paulo Rechi Vita - support for Microsoft Win8 Wireless Radio Controls extensions from João Paulo Rechi Vita Conflicts: drivers/hid/hid-ids.h Signed-off-by: Jiri Kosina commit d29ed11bb728bbe5175d1e9ff592140150305ab6 Merge: 2682b89 0be2bfd Author: Jiri Kosina Date: Tue Sep 5 11:10:13 2017 +0200 Merge branch 'for-4.14/ish' into for-linus - bring consistency into logical minimum numbering in sensor-hub driver, from Srinivas Pandruvada commit 2682b892368bf304e7ecddd9ac68045db516a009 Merge: aaf4f13 6f68f0a Author: Jiri Kosina Date: Tue Sep 5 11:08:52 2017 +0200 Merge branch 'for-4.14/driver-lock-removal' into for-linus - Arnd pointed out that driver_lock semaphore is superfluous, as driver core already provides all the necessary concurency protection. Removal patch from Binoy Jayan commit aaf4f13c456f5fb513d907ede137e8ba77d6adfb Merge: b11918b 1d710da Author: Jiri Kosina Date: Tue Sep 5 11:08:13 2017 +0200 Merge branch 'for-4.14/constify-attribute_group' into for-linus - struct attribute_group constification from Arvind Yadav commit b11918bdbe79bd002d00a9f1d78958167ccfad99 Merge: d3c7ad2 0152b29 Author: Jiri Kosina Date: Tue Sep 5 11:07:05 2017 +0200 Merge branch 'for-4.14/battery' into for-linus - support for batteries driven by HID input reports, from Dmitry Torokhov commit d3c7ad2432115b0b53fb838c14b8ad9ad72f7254 Merge: d487bb6 73c75d3 Author: Jiri Kosina Date: Tue Sep 5 11:05:28 2017 +0200 Merge branch 'for-4.14/asus' into for-linus - T100 touchpad support from Hans de Goede commit d487bb6ef121357bd4cd42fe2b08a6857ed26525 Merge: c228352 8d411cb Author: Jiri Kosina Date: Tue Sep 5 11:03:59 2017 +0200 Merge branch 'for-4.13/upstream-fixes' into for-linus - WACOM_HID_WD_TOUCHRINGSTATUS usage mapping fix in Wacom driver from Jason Gerecke - new Logitech device ID quirk from Kyle Roarty commit b4be271cebb6f8b475f8bf2199091be8fe4c4278 Author: Alexandre Belloni Date: Mon Sep 4 22:46:08 2017 +0200 rtc: ds1307: use octal permissions Octal permissions are preferred over symbolic permissions. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e69c056714974733aeb3ff114e9d434ea864d818 Author: Alexandre Belloni Date: Mon Sep 4 22:46:07 2017 +0200 rtc: ds1307: fix braces Fix unnecessary or unbalanced braces. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4057a66e5333bf487c35a37119e3012a4b318e22 Author: Alexandre Belloni Date: Mon Sep 4 22:46:06 2017 +0200 rtc: ds1307: fix alignments and blank lines Alignment should always match open parenthesis. Also remove two unnecessary blank lines Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit eb4fd19005b73be8d7f51b564aa87a59a7fb4328 Author: Alexandre Belloni Date: Mon Sep 4 22:46:05 2017 +0200 rtc: ds1307: use BIT Use the BIT macro were possbiel. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 57ec2d9580760ce35d7c54b57f8e5f7e98049b8e Author: Alexandre Belloni Date: Mon Sep 4 22:46:04 2017 +0200 rtc: ds1307: use u32 u32 should be used instead of uint32_t Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f2b4801201a46eaa9a00a39a1e2d5aa8c9864991 Author: Alexandre Belloni Date: Mon Sep 4 22:46:03 2017 +0200 rtc: ds1307: use sizeof Use sizeof where possible to ensure we don't read/write more than the allocated buffer. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 042fa8c7c04dd43b21be3ec5104681574a4f8f8c Author: Alexandre Belloni Date: Mon Sep 4 22:46:02 2017 +0200 rtc: ds1307: remove regs member ds1307->regs is never used before being read or initialized locally. There is no point in keeping a copy in memory. Also limit the size of the read buffer to what is really used, rename buf to regs for consistency and use sizeof() where possible. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 207 ++++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 100 deletions(-) commit ae930c912b3274d79319179c1f5ddd9423dd0a7d Author: Andreas Färber Date: Tue Sep 5 00:53:23 2017 +0200 rtc: Add Realtek RTD1295 Based on QNAP's arch/arm/mach-rtk119x/driver/rtk_rtc_drv.c code and mach-rtk119x/driver/dc2vo/fpga/include/mis_reg.h register definitions. The base year 2014 was observed on all of Zidoo X9S, ProBox2 Ava and Beelink Lake I. Signed-off-by: Andreas Färber Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 8 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rtd119x.c | 242 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+) commit b01e9348e106544e50691252bf58cde239681f19 Author: Hans de Goede Date: Mon Sep 4 15:22:42 2017 +0200 mfd: intel_soc_pmic: Differentiate between Bay and Cherry Trail CRC variants Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. This commits makes the intel_soc_pmic_core code check the _HRV of the ACPI-firmware-node and selects intel_soc_pmic_config_byt_crc resp. intel_soc_pmic_config_cht_crc based on this. This fixes the Bay Trail specific ACPI OpRegion code causing problems on Cherry Trail devices. Specifically this was causing the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. Fixes: 5165238460 ("mfd: intel_soc_pmic: Core driver") Reported-and-tested-by: russianneuromancer Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/Kconfig | 4 ++-- drivers/mfd/intel_soc_pmic_core.c | 34 ++++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 8 deletions(-) commit 4d9ed62ab1425d85b25d04096cb4e74117e6dc24 Author: Hans de Goede Date: Mon Sep 4 15:22:41 2017 +0200 mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHT Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. Looking at the android x86 kernel sources where most of the Crystal Cove code comes from, it talks about "Valley View", "Bay Trail" and / or BYT without ever mentioning Cherry Trail, with the exception of the regulator driver. The Asus Zenfone-2 kernel code has 2 regulator drivers, one for Crystal Cove and one for what it calls Crystal Cove Plus. The Crystal Cove Plus regulator driver is the only one to mention Cherry Trail and that driver uses different register addresses then the normal (Bay Trail) Crystal Cove regulator driver, showing that at least the regulator register addresses are different. The GPIO code should work on both, and the PWM code is known to work on both and is necessary for backlight control on some Cherry Trail devices. Testing has shown that the ACPI OpRegion code otoh is causing problems on Cherry Trail devices, which is not surprising as it deals with the regulators and those have different register addresses on CHT. Specifically the ACPI OpRegion code causes the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. This commit replaces the single mfd_cell array currently used for Crystal Cove with 2 separate arrays, one for the Bay Trail variant and one for the Cherry Trail variant, note that the Cherry Trail version of the array only contains gpio and pwm cells. The PMIC OpRegion cell is deliberately not included and drivers for the other cells in the Bay Trail cell array were never upstreamed. Fixes: 7cf0a66f32 ("mfd: intel_soc_pmic: Crystal Cove support") Reported-and-tested-by: russianneuromancer Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_core.c | 2 +- drivers/mfd/intel_soc_pmic_core.h | 3 ++- drivers/mfd/intel_soc_pmic_crc.c | 27 +++++++++++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) commit ce994077ce4ffb13d2a9a8e5cc17800e7136bc80 Author: Andrey Smirnov Date: Mon Aug 28 09:31:31 2017 -0700 dt-bindings: mfd: Add bindings for ZII RAVE devices Add Device Tree bindings for RAVE Supervisory Processor, an MCU implementing varoius bits of housekeeping functionality (watchdoging, backlight control, LED control, etc) on RAVE family of products by Zodiac Inflight Innovations. Acked-by: Rob Herring Signed-off-by: Andrey Smirnov Signed-off-by: Lee Jones .../devicetree/bindings/mfd/zii,rave-sp.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 993dc737c0996c163325961fb62a0ed9fd0308b4 Author: Arnd Bergmann Date: Wed Aug 23 16:44:51 2017 +0200 mfd: omap-usb-tll: Fix register offsets gcc-8 notices that the register number calculation is wrong when the offset is an 'u8' but the number is larger than 256: drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': drivers/mfd/omap-usb-tll.c:90:46: error: overflow in conversion from 'int' to 'u8 {aka unsigned char}' chages value from 'i * 256 + 2070' to '22' [-Werror=overflow] This addresses it by always using a 32-bit offset number for the register. This is apparently an old problem that previous compilers did not find. Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/omap-usb-tll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e1372a4ceb80dafef5ff661a66d7b3a1a8c0a75 Author: Arvind Yadav Date: Mon Aug 21 23:25:27 2017 +0530 mfd: da9052: Constify spi_device_id spi_device_id are not supposed to change at runtime. All functions working with spi_device_id provided by work with const spi_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Lee Jones drivers/mfd/da9052-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b471aaa0e1a8f3d06c76b52c3a903f817d7052e Author: Furquan Shaikh Date: Sun Jul 23 23:02:19 2017 -0700 mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend Commit 274e43edcda6f ("mfd: intel-lpss: Do not put device in reset state on suspend") changed the behavior on suspend by not putting LPSS controllers into reset. This was done because S3/S0ix fail if UART device is put into reset and no_console_suspend flag is enabled. Because of the above change, I2C controller gets into a bad state if it observes that the I2C lines are pulled low when power to I2C device is cut off during suspend (generally, I2C lines are pulled to power rail of the I2C device in order to ensure that there is no leakage because of the pulls when device is turned off). This results in the controller timing out for all future I2C operations after resume. It is primarily because of the following sequence of operations: During suspend: 1. I2C controller is disabled, but it is not put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. ==> At this point the I2C controller gets into a bad state On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled. However, even after enabling the I2C controller, all future I2C xfers fail since the controller is in a bad state and does not attempt to make any transactions and hence times out. In order to ensure that the controller does not get into a bad state, this change puts it into reset if the controller type is not UART. With this change, the order of operations is: During suspend: 1. I2C controller is disabled and put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled and taken out of reset. Signed-off-by: Furquan Shaikh Signed-off-by: Lee Jones drivers/mfd/intel-lpss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6af42e5dd008535b9c1a7d2538ab19617538c3eb Author: Arvind Yadav Date: Sun Aug 20 00:59:37 2017 +0530 mfd: da9055: 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: Lee Jones drivers/mfd/da9055-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4b91470bd79b988253ec00590e5b554042af4a7 Author: Florian R. Hölzlwimmer Date: Sat Aug 19 15:26:49 2017 +0200 mfd: intel-lpss: Add missing PCI ID for Intel Sunrise Point LPSS devices This patch adds a missing PCI ID of the Intel Sunrise Point chipset to the Intel LPSS driver. It fixes a bug causing the touchpad of the Lenovo Yoga 720-15 not to be recognized. See also bug 1700657 on bugs.launchpad.net. Many thanks to CoolStar, who found this solution! Reported-by: CoolStar Tested-by: Mike Schwartz Tested-by: Björn Dahlgren Signed-off-by: Florian R. Hölzlwimmer Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 1 + 1 file changed, 1 insertion(+) commit b62d8dbe419893b7aee5fac282e1da8c811cfcfb Author: Arvind Yadav Date: Tue Aug 8 15:24:56 2017 +0530 mfd: t7l66xb: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. we must disable clock, if t7l66xb_probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Lee Jones drivers/mfd/t7l66xb.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit e10feb36c98576fd7d1f24edaf2669dbfe7df21d Author: Marek Vasut Date: Tue May 2 14:18:15 2017 +0200 mfd: Add ROHM BD9571MWV-M PMIC DT bindings Add DT bindings for the ROHM BD9571MWV-M PMIC. This PMIC has the following features: - multiple voltage monitors for 1V8, 2V5, 3V3 voltage rail - one voltage regulator for DVFS - two GPIOs Signed-off-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/bd9571mwv.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 1ae14f8e84727d158cb6d27760e6f17eb9994cff Author: Hans de Goede Date: Mon Aug 14 22:02:23 2017 +0200 mfd: intel_soc_pmic_chtwc: Turn Kconfig option into a bool The PMIC provides ACPI OpRegions which must be available for other drivers' PS0 / PS3 methods early-on as such it must be builtin as the Kconfig help text already states. Somehow its Kconfig option ended up being a tristate though, this fixes this. Signed-off-by: Hans de Goede Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea3993a9bdb77375a91e88b5e5f853474b095dd5 Author: Axel Lin Date: Sun Jul 30 18:58:15 2017 +0800 mfd: lp87565: Convert to use devm_mfd_add_devices() This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by: Axel Lin Reviewed-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/lp87565.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9bbf6a15ce19dd947b7fa6ad4095931ab3682da8 Author: Rajmohan Mani Date: Fri Jul 28 17:30:24 2017 -0700 mfd: Add support for TPS68470 device The 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 patch adds support for TPS68470 mfd device. Signed-off-by: Rajmohan Mani Signed-off-by: Lee Jones drivers/mfd/Kconfig | 18 ++++++++ drivers/mfd/Makefile | 1 + drivers/mfd/tps68470.c | 106 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/tps68470.h | 97 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 222 insertions(+) commit d9018976cdb6eefc62a7ba79a405f6c9661b08a7 Author: Mika Westerberg Date: Fri Jul 28 13:50:42 2017 +0300 mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/Broadwell At least on Lenovo Thinkpad Yoga, the BIOS seems to monitor the SPI-NOR write protection bit and if it is flipped to read/write it assumes the BIOS configuration was changed on next reboot. It then, for unknown reasons, resets the BIOS settings back to default. We can prevent this by just leaving the write protection bit intact and let the SPI-NOR driver know whether the device is writable or not. In case of this particular Lenovo the SPI-NOR flash will be exposed as read-only. Fixes: ff00d7a32a1b ("mfd: lpc_ich: Add support for SPI serial flash host controller") Link: https://bugzilla.kernel.org/show_bug.cgi?id=195951 Reported-by: Abdó Roig-Marange Signed-off-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 10 ---------- 1 file changed, 10 deletions(-) commit b0f3ab20e76499db12b0bbadb5737d9870f10418 Author: Ludovic Desroches Date: Tue Jul 18 15:22:19 2017 +0200 mfd: syscon: atmel-smc: Add helper to retrieve register layout For HSMC controller, the register layout depends on the device i.e. the offset of setup, pulse, cycle, mode and timings registers is not the same. An helper is added to provide the correct register layout. Fixes: fe9d7cb22ef3 ("mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation") Suggested-by: Boris Brezillon Signed-off-by: Ludovic Desroches Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/memory/atmel-ebi.c | 13 +++++-- drivers/mfd/atmel-smc.c | 67 +++++++++++++++++++++++++------- drivers/mtd/nand/atmel/nand-controller.c | 10 +++-- include/linux/mfd/syscon/atmel-smc.h | 32 ++++++++++----- 4 files changed, 92 insertions(+), 30 deletions(-) commit f446363374e4c31fecad2cf95d877b4631de9890 Author: Quentin Schulz Date: Wed Jul 26 16:28:27 2017 +0800 mfd: axp20x: Use correct platform device ID for many PEK According to their datasheets, the AXP221, AXP223, AXP288, AXP803, AXP809 and AXP813 PEK have different values for startup time bits from the AXP20X, let's use the platform device id with the correct values. Signed-off-by: Quentin Schulz Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 462ae14190b42febd47699d2235fa0abae67afbf Author: Chen-Yu Tsai Date: Wed Jul 26 16:28:25 2017 +0800 dt-bindings: mfd: axp20x: Introduce bindings for AXP813 The X-Powers AXP813 is a PMIC designed to be paired with Allwinner's A83T SoC. There is also an AXP818, which is paired with the H8 SoC. The two models seem to be identical, apart from the external markings. This patch introduces the basic mfd and regulator bindings for the AXP813. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 49 +++++++++++++++++++++--- 1 file changed, 44 insertions(+), 5 deletions(-) commit 7303733a6ca2a68b210ebdc09cace8b0ffe8b179 Author: Chen-Yu Tsai Date: Wed Jul 26 16:28:26 2017 +0800 mfd: axp20x: Add support for AXP813 PMIC The X-Powers AXP813 PMIC is normally used with Allwinner's A83T SoC. It has the same range of functions as other X-Powers PMICs, such as DC-DC buck converter and linear regulator outputs, AC-IN and VBUS power supplies, power button trigger, GPIOs, ADCs, and a battery charger. Note that the IRQ table given in the datasheet is incorrect: in IRQ enable/status registers 1, there are separate IRQs for ACIN and VBUS, instead of bits [7:5] being the same as bits [4:2]. So it shares the same IRQs as the AXP803, rather than the AXP288. This patch adds basic mfd support for it, with only the power button enabled. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/axp20x-rsb.c | 1 + drivers/mfd/axp20x.c | 22 ++++++++++++++++++++++ include/linux/mfd/axp20x.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) commit 7e312ffdd7aa68f0110f5d95416f78ea29ceb984 Author: Chen-Yu Tsai Date: Wed Jul 26 16:28:24 2017 +0800 dt-bindings: mfd: axp20x: Add AXP806 to supported list of chips The binding already lists compatibles and regulators for the AXP806, but it is missing from the list of supported chips at the beginning. Add it. Fixes: 204ae2963e10 ("mfd: axp20x: Add bindings for AXP806 PMIC") Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 1 + 1 file changed, 1 insertion(+) commit d3ea212720948acff862b4c842d5b464ad338841 Author: Marek Vasut Date: Mon Jul 17 22:45:12 2017 +0200 mfd: Add ROHM BD9571MWV-M MFD PMIC driver Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS entry. The MFD part only specifies the regmap bits for the PMIC and binds the subdevs together. Signed-off-by: Marek Vasut Signed-off-by: Lee Jones MAINTAINERS | 11 ++ drivers/mfd/Kconfig | 14 +++ drivers/mfd/Makefile | 1 + drivers/mfd/bd9571mwv.c | 230 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/bd9571mwv.h | 115 +++++++++++++++++++++ 5 files changed, 371 insertions(+) commit ec58871fb9c50429d6b5570066a7166da8faf086 Author: Guodong Xu Date: Thu Jul 20 15:32:42 2017 +0800 mfd: hi6421-pmic: Add support for HiSilicon Hi6421v530 Add support for HiSilicon Hi6421v530 PMIC. Hi6421v530 communicates with main SoC via memory-mapped I/O. Hi6421v530 and Hi6421 are PMIC chips from the same vendor, HiSilicon, but at different revisions. They share the same memory-mapped I/O design. They differ in integrated devices, such as regulator details, LDO voltage points. Signed-off-by: Guodong Xu Signed-off-by: Wang Xiaoyin Acked-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/hi6421-pmic-core.c | 70 ++++++++++++++++++++++++++++++----------- include/linux/mfd/hi6421-pmic.h | 5 +++ 2 files changed, 57 insertions(+), 18 deletions(-) commit 568e5476cf2b8dfdcf123a67b88fb724beb5487c Author: Guodong Xu Date: Thu Jul 20 15:32:41 2017 +0800 mfd: hi6421-pmic: Update dev_err messages Update dev_err messages to make them more readable. Signed-off-by: Guodong Xu Acked-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/hi6421-pmic-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 876368c3caa59b174d9a6ac28b7e88a9a9544eac Author: Guodong Xu Date: Thu Jul 20 15:32:40 2017 +0800 mfd: hi6421-pmic: Change license text to shorter form Change license text to a shorter form of GPLv2. Signed-off-by: Guodong Xu Acked-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/hi6421-pmic-core.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 5c8f124893c4a691bdae5e9258cb0bca44653f08 Author: Michal Simek Date: Mon Jul 17 11:28:55 2017 +0200 mfd: Kconfig: Add missing Kconfig dependency for TPS65086 MTF_CORE should be enabled when driver is enabled. Without this patch you can configure: CONFIG_MFD_CORE is not set CONFIG_MFD_TPS65086=y ... which ends up with compilation error: drivers/mfd/tps65086.o: In function `tps65086_probe': drivers/mfd/tps65086.c:110: undefined reference to `mfd_add_devices' drivers/mfd/tps65086.c:110:(.text+0x128): relocation truncated to fit: \ R_AARCH64_CALL26 against undefined symbol `mfd_add_devices' Signed-off-by: Michal Simek Signed-off-by: Lee Jones drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 757bce527da57ad9fbb91d97455e17c5716375d4 Author: Ludovic Desroches Date: Tue Jul 11 09:40:13 2017 +0200 mfd: syscon: Update Atmel SMC binding doc A new compatible string is introduced for SMC on sama5d2 to manage a different layout of the registers. Signed-off-by: Ludovic Desroches │Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/atmel-smc.txt | 1 + 1 file changed, 1 insertion(+) commit 52557dc624df7de5808c5c26476f3a8863bb0128 Author: Arvind Yadav Date: Mon Jul 10 11:07:22 2017 +0530 mfd: ab8500-core: 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 16298 1009 184 17491 4453 drivers/mfd/ab8500-core.o File size After adding 'const': text data bss dec hex filename 16490 817 184 17491 4453 drivers/mfd/ab8500-core.o Signed-off-by: Arvind Yadav Signed-off-by: Lee Jones drivers/mfd/ab8500-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5368b06dba4b911654221f3aad92b3298392a59a Author: Sebastian Reichel Date: Mon Jul 3 10:39:59 2017 +0200 dt-bindings: mfd: da9052: Support TSI as ADC DA9052 allows using the touchscreen input pins as general purpose analogue input pin by wiring analogue inputs to X+, X-, Y+ and Y- and providing a reference voltage at TSIREF pin. Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2042f3c29f2f11129434de8a610878e8a15b4174 Author: Christophe JAILLET Date: Wed Jul 5 07:50:54 2017 +0200 mfd: max8998: Fix potential NULL pointer dereference if 'max8998_i2c_parse_dt_pdata() fails (when out of memory), a NULL pointer dereference will occur in the error handling code. Return directly instead. Fixes: ee999fb3f17f("mfd: max8998: Add support for Device Tree") Signed-off-by: Christophe JAILLET Signed-off-by: Lee Jones drivers/mfd/max8998.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0953075112d7626474b0bb88690f5f1ab93ec803 Author: Julia Lawall Date: Thu May 4 22:10:54 2017 +0200 mfd: max8925-i2c: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any use, on every possible execution path through the function. The static has no benefit, and dropping it reduces the code size. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // The change in code size is indicates by the following output from the size command. before: text data bss dec hex filename 2579 240 16 2835 b13 drivers/mfd/max8925-i2c.o after: text data bss dec hex filename 2531 240 8 2779 adb drivers/mfd/max8925-i2c.o Signed-off-by: Julia Lawall Acked-by: Kees Cook Signed-off-by: Lee Jones drivers/mfd/max8925-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45f80a9f78f1bcf87c09ae120a68011efe35128a Author: Sebastian Reichel Date: Fri Jun 30 16:35:03 2017 +0200 mfd: da9052: Fix manual ADC read after timed out read It is possible that under heavy system load, the counter in the completion struct, used for waiting for end of AD conversion, gets incremented twice. To make sure the driver recovers from this situation, the completion struct should be reinitialized. Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones drivers/mfd/da9052-core.c | 2 ++ 1 file changed, 2 insertions(+) commit e26ae3660b9ca2d180131670ae5388580dcf19b3 Author: Colin Ian King Date: Fri Jun 30 10:33:27 2017 +0100 mfd: rtsx: Make arrays depth and cd_mask static const Don't populate the arrays depath and cd_mask on the stack but make them static const. Makes the object code smaller: text data bss dec hex filename 25413 7216 448 33077 8135 drivers/mfd/rtsx_pcr.o text data bss dec hex filename 25151 7360 448 32959 80bf drivers/mfd/rtsx_pcr.o Signed-off-by: Colin Ian King Signed-off-by: Lee Jones drivers/mfd/rtsx_pcr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff827cf5698b111b2e5f825cb9ee508115f94e8a Author: Dan Carpenter Date: Fri Jun 30 11:02:21 2017 +0300 mfd: twl-core: Improve the documentation Saying it "returns the result" seems tautological. The read function does not return num_bytes on success, it returns zero on success. I noticed this discrepancy because some of the callers were checking for >= 0. Signed-off-by: Dan Carpenter Signed-off-by: Lee Jones drivers/mfd/twl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f979bf8f56a22b2395edceed0dc371a538e34cc Merge: ea5ae80 9787076 4f16cab f0b638a 0335a95 a205425 f7c2239 Author: Lee Jones Date: Tue Sep 5 08:45:36 2017 +0100 Merge branches 'ib-mfd-arm-i2c-4.14', 'ib-mfd-arm-usb-video-4.14', 'ib-mfd-hwmon-4.14', 'ib-mfd-iio-pwm-4.14', 'ib-mfd-input-rtc-4.14', 'ib-mfd-many-4.14' and 'ib-mfd-pinctrl-regulator-4.14' into ibs-for-mfd-merged commit 69c9d96ce60b3a78ea4f311faed96f0e24ff655a Author: Andreas Färber Date: Tue Sep 5 00:53:22 2017 +0200 dt-bindings: rtc: Add Realtek RTD1295 Add a binding for the RTC on the Realtek RTD119x/RTD129x SoC families. Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/realtek,rtd119x.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7a7d3e4c031b969c3b570787fc9fdb605abda03e Author: Simon Dinkin Date: Thu Aug 31 13:09:36 2017 +0300 mac80211: fix incorrect assignment of reassoc value this fix minor issue in the log message. in ieee80211_rx_mgmt_assoc_resp function, when assigning the reassoc value from the mgmt frame control: ieee80211_is_reassoc_resp function need to be used, instead of ieee80211_is_reassoc_req function. Signed-off-by: Simon Dinkin Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 770e96125515daf1c7bc179323f2e0d488dfe6ac Merge: 24e700e eba9fac Author: Ingo Molnar Date: Tue Sep 5 07:14:28 2017 +0200 Merge tag 'perf-core-for-mingo-4.14-20170901' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Support syscall name glob matching in 'perf trace' (Arnaldo Carvalho de Melo) e.g.: # perf trace -e pkey_* 32.784 (0.006 ms): pkey/16018 pkey_alloc(init_val: DISABLE_WRITE) = -1 EINVAL Invalid argument 32.795 (0.004 ms): pkey/16018 pkey_mprotect(start: 0x7f380d0a6000, len: 4096, prot: READ|WRITE, pkey: -1) = 0 32.801 (0.002 ms): pkey/16018 pkey_free(pkey: -1 ) = -1 EINVAL Invalid argument ^C# - Do not auto merge counts for explicitely specified events in 'perf stat' (Arnaldo Carvalho de Melo) - Fix syntax in documentation of .perfconfig intel-pt option (Jack Henschel) - Calculate the average cycles of iterations for loops detected by the branch history support in 'perf report' (Jin Yao) - Support PERF_SAMPLE_PHYS_ADDR as a sort key "phys_daddr" in the 'script', 'mem', 'top' and 'report'. Also add a test entry for it in 'perf test' (Kan Liang) - Fix 'Object code reading' 'perf test' entry in PowerPC (Ravi Bangoria) - Remove some duplicate Power9 duplicate vendor events (described in JSON files) (Sukadev Bhattiprolu) - Add help entry in the TUI annotate browser about cycling thru hottest instructions with TAB/shift+TAB (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a702e47eab32c643054c5055cf5ce320d59f4dee Author: Icenowy Zheng Date: Tue Aug 29 12:51:27 2017 +0800 dmaengine: sun6i: support V3s SoC variant Allwinner V3s has a DMA engine similar to the ones from A31, but with fewer channels and DRQs. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 + drivers/dma/sun6i-dma.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 0430a7c753744af746679a96026916b50908aafa Author: Icenowy Zheng Date: Tue Aug 29 12:51:26 2017 +0800 dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk Originally we enable a special gate bit when the compatible indicates A23/33. But according to BSP sources and user manuals, more SoCs will need this gate bit. So make it a common quirk configured in the config struct. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit a3f406d6d1bb326b12a84bf028009e4cff59004d Author: Sergei Shtylyov Date: Thu Aug 31 23:59:24 2017 +0300 dmaengine: rcar-dmac: document R8A77970 bindings Renesas R-Car V3M (R8A77970) SoC also has the R-Car gen2/3 compatible DMA controllers, so document the SoC specific binding. Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit 574897dc14736ea0d57b3c70ec42d82c6e55152f Author: Lars-Peter Clausen Date: Thu Aug 31 13:35:10 2017 +0200 dmaengine: xilinx_dma: Fix error code format specifier 'err' is a signed int and error codes are typically negative numbers, so use '%d' instead of '%u' to format the error code in the error message. Fixes: ba16db36b5dd ("dmaengine: vdma: Add clock support") Signed-off-by: Lars-Peter Clausen Acked-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit d02fd5f7709f1296bad5d92e7e8515ef1a05dec4 Author: Jian Jun Chen Date: Wed Aug 23 13:23:10 2017 +0800 drm/i915/gvt: Remove one duplicated MMIO Remove one duplicated MMIO GEN6_PCODE_MAILBOX. Duplicated MMIO will cause host GVT-g initialization failure. Fixes: 9c3a16c887f0 ("drm/i915/hsw+: Add support for multiple power well regs") Signed-off-by: Jian Jun Chen Acked-by: Imre Deak Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 1 - 1 file changed, 1 deletion(-) commit 76e752701a8af4404bbd9c45723f7cbd6e4a251e Author: Samuel Cabrero Date: Tue Jul 11 12:44:39 2017 +0200 cifs: Check for timeout on Negotiate stage Some servers seem to accept connections while booting but never send the SMBNegotiate response neither close the connection, causing all processes accessing the share hang on uninterruptible sleep state. This happens when the cifs_demultiplex_thread detects the server is unresponsive so releases the socket and start trying to reconnect. At some point, the faulty server will accept the socket and the TCP status will be set to NeedNegotiate. The first issued command accessing the share will start the negotiation (pid 5828 below), but the response will never arrive so other commands will be blocked waiting on the mutex (pid 55352). This patch checks for unresponsive servers also on the negotiate stage releasing the socket and reconnecting if the response is not received and checking again the tcp state when the mutex is acquired. PID: 55352 TASK: ffff880fd6cc02c0 CPU: 0 COMMAND: "ls" #0 [ffff880fd9add9f0] schedule at ffffffff81467eb9 #1 [ffff880fd9addb38] __mutex_lock_slowpath at ffffffff81468fe0 #2 [ffff880fd9addba8] mutex_lock at ffffffff81468b1a #3 [ffff880fd9addbc0] cifs_reconnect_tcon at ffffffffa042f905 [cifs] #4 [ffff880fd9addc60] smb_init at ffffffffa042faeb [cifs] #5 [ffff880fd9addca0] CIFSSMBQPathInfo at ffffffffa04360b5 [cifs] .... Which is waiting a mutex owned by: PID: 5828 TASK: ffff880fcc55e400 CPU: 0 COMMAND: "xxxx" #0 [ffff880fbfdc19b8] schedule at ffffffff81467eb9 #1 [ffff880fbfdc1b00] wait_for_response at ffffffffa044f96d [cifs] #2 [ffff880fbfdc1b60] SendReceive at ffffffffa04505ce [cifs] #3 [ffff880fbfdc1bb0] CIFSSMBNegotiate at ffffffffa0438d79 [cifs] #4 [ffff880fbfdc1c50] cifs_negotiate_protocol at ffffffffa043b383 [cifs] #5 [ffff880fbfdc1c80] cifs_reconnect_tcon at ffffffffa042f911 [cifs] #6 [ffff880fbfdc1d20] smb_init at ffffffffa042faeb [cifs] #7 [ffff880fbfdc1d60] CIFSSMBQFSInfo at ffffffffa0434eb0 [cifs] .... Signed-off-by: Samuel Cabrero Reviewed-by: Aurélien Aptel Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cifssmb.c | 12 ++++++++++++ fs/cifs/connect.c | 3 ++- fs/cifs/smb2pdu.c | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) commit 24e700e291d52bd200212487e2b654c0aa3f07a2 Merge: f570917 c6ef894 Author: Linus Torvalds Date: Mon Sep 4 17:43:56 2017 -0700 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Thomas Gleixner: "This update provides: - Cleanup of the IDT management including the removal of the extra tracing IDT. A first step to cleanup the vector management code. - The removal of the paravirt op adjust_exception_frame. This is a XEN specific issue, but merged through this branch to avoid nasty merge collisions - Prevent dmesg spam about the TSC DEADLINE bug, when the CPU has disabled the TSC DEADLINE timer in CPUID. - Adjust a debug message in the ioapic code to print out the information correctly" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) x86/idt: Fix the X86_TRAP_BP gate x86/xen: Get rid of paravirt op adjust_exception_frame x86/eisa: Add missing include x86/idt: Remove superfluous ALIGNment x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature x86/idt: Remove the tracing IDT leftovers x86/idt: Hide set_intr_gate() x86/idt: Simplify alloc_intr_gate() x86/idt: Deinline setup functions x86/idt: Remove unused functions/inlines x86/idt: Move interrupt gate initialization to IDT code x86/idt: Move APIC gate initialization to tables x86/idt: Move regular trap init to tables x86/idt: Move IST stack based traps to table init x86/idt: Move debug stack init to table based x86/idt: Switch early trap init to IDT tables x86/idt: Prepare for table based init x86/idt: Move early IDT setup out of 32-bit asm x86/idt: Move early IDT handler setup to IDT code x86/idt: Consolidate IDT invalidation ... commit 9725d4cef62229b4ec4c912e0db0761e7d400650 Author: Christoph Hellwig Date: Fri Sep 1 17:39:25 2017 +0200 fs: unexport vfs_readv and vfs_writev We've got no modular users left, and any potential modular user is better of with iov_iter based variants. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 4 +--- include/linux/fs.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) commit bd8df82be66698042d11e7919e244c8d72b042ca Author: Christoph Hellwig Date: Fri Sep 1 17:39:24 2017 +0200 fs: unexport vfs_read and vfs_write No modular users left. Given that they take user pointers there is no good reason to export it to drivers to start with. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 4 ---- 1 file changed, 4 deletions(-) commit eb031849d52e61d24ba54e9d27553189ff328174 Author: Christoph Hellwig Date: Fri Sep 1 17:39:23 2017 +0200 fs: unexport __vfs_read/__vfs_write No modular users left, and any new ones should use kernel_read/write or iov_iter variants instead. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 2 -- include/linux/fs.h | 1 - 2 files changed, 3 deletions(-) commit 8257723993e29335bcbd1912e6956357a5539976 Author: Christoph Hellwig Date: Fri Sep 1 17:39:22 2017 +0200 lustre: switch to kernel_write Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/staging/lustre/lnet/libcfs/tracefile.c | 10 ++-------- drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 7 +------ 2 files changed, 3 insertions(+), 14 deletions(-) commit 05a4a33b6d82bc6ec157b0bda409b2708b1fa45f Author: Christoph Hellwig Date: Fri Sep 1 17:39:21 2017 +0200 gadget/f_mass_storage: stop messing with the address limit Instead use kernel_read/write consistently, which also makes sparse happy. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/usb/gadget/function/f_mass_storage.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 21cb2559eb510dfbe9b5d0dd31605f44d2cd2891 Author: Christoph Hellwig Date: Fri Sep 1 17:39:20 2017 +0200 mconsole: switch to kernel_read Instead of playing with address limits. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro arch/um/drivers/mconsole_kern.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8e93157bdd4a9718ce8e05c370ab9fe48debb4c2 Author: Christoph Hellwig Date: Fri Sep 1 17:39:19 2017 +0200 btrfs: switch write_buf to kernel_write Instead of playing with the addressing limits. Signed-off-by: Christoph Hellwig Reviewed-by: Nikolay Borisov Signed-off-by: Al Viro fs/btrfs/send.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 670986ec01c1129db114b7720826a80756c7e899 Author: Christoph Hellwig Date: Fri Sep 1 17:39:18 2017 +0200 net/9p: switch p9_fd_read to kernel_write Instead of playing with the addressing limits. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro net/9p/trans_fd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit b4bf802a5a6563c22d5e41a0f8873088bd3f655e Author: Christoph Hellwig Date: Fri Sep 1 17:39:17 2017 +0200 mm/nommu: switch do_mmap_private to kernel_read Instead of playing with the address limit. This also gains us validation of the kvec and proper atime updates. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro mm/nommu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 9a779bc149c79a7acae5614617a0a9e0fd007ce4 Author: Christoph Hellwig Date: Fri Sep 1 17:39:16 2017 +0200 serial2002: switch serial2002_tty_write to kernel_{read/write} Instead of playing games with the address limit. This also gains us proper usage of the write counter, time stamp updates and kvec validation. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/staging/comedi/drivers/serial2002.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 73e18f7c0b3e1432353cdd86672c27cace7e6a7e Author: Christoph Hellwig Date: Fri Sep 1 17:39:15 2017 +0200 fs: make the buf argument to __kernel_write a void pointer This matches kernel_read and kernel_write and avoids any need for casts in the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 2 +- include/linux/fs.h | 2 +- kernel/acct.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e13ec939e96b13e664bb6cee361cc976a0ee621a Author: Christoph Hellwig Date: Fri Sep 1 17:39:14 2017 +0200 fs: fix kernel_write prototype Make the position an in/out argument like all the other read/write helpers and and make the buf argument a void pointer. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/mtd/nand/nandsim.c | 2 +- drivers/target/target_core_alua.c | 3 ++- drivers/target/target_core_file.c | 2 +- drivers/target/target_core_pr.c | 3 ++- fs/ecryptfs/read_write.c | 2 +- fs/read_write.c | 6 +++--- include/linux/fs.h | 2 +- kernel/sysctl_binary.c | 9 ++++++--- security/keys/big_key.c | 3 ++- 9 files changed, 19 insertions(+), 13 deletions(-) commit bdd1d2d3d251c65b74ac4493e08db18971c09240 Author: Christoph Hellwig Date: Fri Sep 1 17:39:13 2017 +0200 fs: fix kernel_read prototype Use proper ssize_t and size_t types for the return value and count argument, move the offset last and make it an in/out argument like all other read/write helpers, and make the buf argument a void pointer to get rid of lots of casts in the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro arch/mips/kernel/elf.c | 12 ++++------- arch/x86/ia32/ia32_aout.c | 4 ++-- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 13 +++++------- drivers/mtd/nand/nandsim.c | 2 +- fs/binfmt_aout.c | 3 ++- fs/binfmt_elf.c | 23 ++++++++++++---------- fs/binfmt_elf_fdpic.c | 17 ++++++++-------- fs/binfmt_flat.c | 18 +++++------------ fs/binfmt_misc.c | 5 ++++- fs/coda/dir.c | 5 +++-- fs/ecryptfs/read_write.c | 2 +- fs/exec.c | 7 +++---- fs/read_write.c | 8 +++----- include/linux/fs.h | 2 +- kernel/sysctl_binary.c | 12 +++++++---- net/9p/trans_fd.c | 4 +++- security/keys/big_key.c | 3 ++- 17 files changed, 69 insertions(+), 71 deletions(-) commit c41fbad015dabb0a40ecca50c3ff5658eb6471ff Author: Christoph Hellwig Date: Fri Sep 1 17:39:12 2017 +0200 fs: move kernel_read to fs/read_write.c Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/exec.c | 17 ----------------- fs/read_write.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) commit ac452acae1caa1a451142a30b4e1ea09cfac4410 Author: Christoph Hellwig Date: Fri Sep 1 17:39:11 2017 +0200 fs: move kernel_write to fs/read_write.c Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 17 ++++++++++++++++- fs/splice.c | 16 ---------------- 2 files changed, 16 insertions(+), 17 deletions(-) commit 317d5a5f0f8fcc084d02c776c602c64a5b94e47b Author: Christoph Hellwig Date: Fri Sep 1 17:39:10 2017 +0200 autofs4: switch autofs4_write to __kernel_write Instead of playing games with the address limit.. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/autofs4/waitq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8a2af06415ef0fc922162503dd18da0d9be7771f Author: Christoph Hellwig Date: Fri Sep 1 17:39:09 2017 +0200 ashmem: switch to ->read_iter And use the proper VFS helper for using the backing file. Also make sure we hold ashmem_lock while updating f_pos to make sure that it's not racy. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro drivers/staging/android/ashmem.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit c35fc7a5abae9c154dd6f8c0b288462342facd45 Author: Christoph Hellwig Date: Tue Aug 29 16:13:21 2017 +0200 block_dev: support RFW_NOWAIT on block device nodes All support is already there in the generic code, we just need to wire it up. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/block_dev.c | 5 +++++ 1 file changed, 5 insertions(+) commit 91f9943e1c7b6638f27312d03fe71fcc67b23571 Author: Christoph Hellwig Date: Tue Aug 29 16:13:20 2017 +0200 fs: support RWF_NOWAIT for buffered reads This is based on the old idea and code from Milosz Tanski. With the aio nowait code it becomes mostly trivial now. Buffered writes continue to return -EOPNOTSUPP if RWF_NOWAIT is passed. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/aio.c | 6 ------ fs/btrfs/file.c | 6 +++++- fs/ext4/file.c | 6 +++--- fs/xfs/xfs_file.c | 11 +++++++++-- include/linux/fs.h | 6 +++--- 5 files changed, 20 insertions(+), 15 deletions(-) commit 3239d834847627b6634a4139cf1dc58f6f137a46 Author: Milosz Tanski Date: Tue Aug 29 16:13:19 2017 +0200 fs: support IOCB_NOWAIT in generic_file_buffered_read Allow generic_file_buffered_read to bail out early instead of waiting for the page lock or reading a page if IOCB_NOWAIT is specified. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer Acked-by: Sage Weil Signed-off-by: Al Viro mm/filemap.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 47c27bc46946dea543196a92061da14c6da9889e Author: Christoph Hellwig Date: Tue Aug 29 16:13:18 2017 +0200 fs: pass iocb to do_generic_file_read And rename it to the more descriptive generic_file_buffered_read while at it. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Al Viro mm/filemap.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 2ff81cd35f9e9c8e6896ea129eb04976d109f15d Merge: 45865da 9dee147 Author: David S. Miller Date: Mon Sep 4 15:27:49 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for next-net (part 2) The following patchset contains Netfilter updates for net-next. This patchset includes updates for nf_tables, removal of CONFIG_NETFILTER_DEBUG and a new mode for xt_hashlimit. More specifically, they: 1) Add new rate match mode for hashlimit, this introduces a new revision for this match. The idea is to stop matching packets until ratelimit criteria stands true. Patch from Vishwanath Pai. 2) Add ->select_ops indirection to nf_tables named objects, so we can choose between different flavours of the same object type, patch from Pablo M. Bermudo. 3) Shorter function names in nft_limit, basically: s/nft_limit_pkt_bytes/nft_limit_bytes, also from Pablo M. Bermudo. 4) Add new stateful limit named object type, this allows us to create limit policies that you can identify via name, also from Pablo. 5) Remove unused hooknum parameter in conntrack ->packet indirection. From Florian Westphal. 6) Patches to remove CONFIG_NETFILTER_DEBUG and macros such as IP_NF_ASSERT and IP_NF_ASSERT. From Varsha Rao. 7) Add nf_tables_updchain() helper function and use it from nf_tables_newchain() to make it more maintainable. Similarly, add nf_tables_addchain() and use it too. 8) Add new netlink NLM_F_NONREC flag, this flag should only be used for deletion requests, specifically, to support non-recursive deletion. Based on what we discussed during NFWS'17 in Faro. 9) Use NLM_F_NONREC from table and sets in nf_tables. 10) Support for recursive chain deletion. Table and set deletion commands come with an implicit content flush on deletion, while chains do not. This patch addresses this inconsistency by adding the code to perform recursive chain deletions. This also comes with the bits to deal with the new NLM_F_NONREC netlink flag. ==================== Signed-off-by: David S. Miller commit f57091767add2b79d76aac41b83b192d8ba1dce7 Merge: d725c7a d56593e Author: Linus Torvalds Date: Mon Sep 4 13:56:37 2017 -0700 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache quality monitoring update from Thomas Gleixner: "This update provides a complete rewrite of the Cache Quality Monitoring (CQM) facility. The existing CQM support was duct taped into perf with a lot of issues and the attempts to fix those turned out to be incomplete and horrible. After lengthy discussions it was decided to integrate the CQM support into the Resource Director Technology (RDT) facility, which is the obvious choise as in hardware CQM is part of RDT. This allowed to add Memory Bandwidth Monitoring support on top. As a result the mechanisms for allocating cache/memory bandwidth and the corresponding monitoring mechanisms are integrated into a single management facility with a consistent user interface" * 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) x86/intel_rdt: Turn off most RDT features on Skylake x86/intel_rdt: Add command line options for resource director technology x86/intel_rdt: Move special case code for Haswell to a quirk function x86/intel_rdt: Remove redundant ternary operator on return x86/intel_rdt/cqm: Improve limbo list processing x86/intel_rdt/mbm: Fix MBM overflow handler during CPU hotplug x86/intel_rdt: Modify the intel_pqr_state for better performance x86/intel_rdt/cqm: Clear the default RMID during hotcpu x86/intel_rdt: Show bitmask of shareable resource with other executing units x86/intel_rdt/mbm: Handle counter overflow x86/intel_rdt/mbm: Add mbm counter initialization x86/intel_rdt/mbm: Basic counting of MBM events (total and local) x86/intel_rdt/cqm: Add CPU hotplug support x86/intel_rdt/cqm: Add sched_in support x86/intel_rdt: Introduce rdt_enable_key for scheduling x86/intel_rdt/cqm: Add mount,umount support x86/intel_rdt/cqm: Add rmdir support x86/intel_rdt: Separate the ctrl bits from rmdir x86/intel_rdt/cqm: Add mon_data x86/intel_rdt: Prepare for RDT monitor data support ... commit d725c7ac8b96cbdc28266895c6f7080c55bf2f23 Merge: 93cc122 0c96b27 Author: Linus Torvalds Date: Mon Sep 4 13:53:53 2017 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug fix from Thomas Gleixner: "A single fix to handle the removal of the first dynamic CPU hotplug state correctly" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/hotplug: Handle removal correctly in cpuhp_store_callbacks() commit 93cc1228b4a60584f3dadbd84f19f365bb945acb Merge: dd90ccc 9fbd7fd Author: Linus Torvalds Date: Mon Sep 4 13:08:27 2017 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The interrupt subsystem delivers this time: - Refactoring of the GIC-V3 driver to prepare for the GIC-V4 support - Initial GIC-V4 support - Consolidation of the FSL MSI support - Utilize the effective affinity interface in various ARM irqchip drivers - Yet another interrupt chip driver (UniPhier AIDET) - Bulk conversion of the irq chip driver to use %pOF - The usual small fixes and improvements all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits) irqchip/ls-scfg-msi: Add MSI affinity support irqchip/ls-scfg-msi: Add LS1043a v1.1 MSI support irqchip/ls-scfg-msi: Add LS1046a MSI support arm64: dts: ls1046a: Add MSI dts node arm64: dts: ls1043a: Share all MSIs arm: dts: ls1021a: Share all MSIs arm64: dts: ls1043a: Fix typo of MSI compatible string arm: dts: ls1021a: Fix typo of MSI compatible string irqchip/ls-scfg-msi: Fix typo of MSI compatible strings irqchip/irq-bcm7120-l2: Use correct I/O accessors for irq_fwd_mask irqchip/mmp: Make mmp_intc_conf const irqchip/gic: Make irq_chip const irqchip/gic-v3: Advertise GICv4 support to KVM irqchip/gic-v4: Enable low-level GICv4 operations irqchip/gic-v4: Add some basic documentation irqchip/gic-v4: Add VLPI configuration interface irqchip/gic-v4: Add VPE command interface irqchip/gic-v4: Add per-VM VPE domain creation irqchip/gic-v3-its: Set implementation defined bit to enable VLPIs irqchip/gic-v3-its: Allow doorbell interrupts to be injected/cleared ... commit dd90cccffc20a15d8e4c3ac8813f4b6a6cd4766f Merge: b1b6f83 5121829 Author: Linus Torvalds Date: Mon Sep 4 13:06:34 2017 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A rather small update for the time(r) subsystem: - A new clocksource driver IMX-TPM - Minor fixes to the alarmtimer facility - Device tree cleanups for Renesas drivers - A new kselftest and fixes for the timer related tests - Conversion of the clocksource drivers to use %pOF - Use the proper helpers to access rlimits in the posix-cpu-timer code" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: alarmtimer: Ensure RTC module is not unloaded clocksource: Convert to using %pOF instead of full_name clocksource/drivers/bcm2835: Remove message for a memory allocation failure devicetree: bindings: Remove deprecated properties devicetree: bindings: Remove unused 32-bit CMT bindings devicetree: bindings: Deprecate property, update example devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings devicetree: bindings: Remove sh7372 CMT binding clocksource/drivers/imx-tpm: Add imx tpm timer support dt-bindings: timer: Add nxp tpm timer binding doc posix-cpu-timers: Use dedicated helper to access rlimit values alarmtimer: Fix unavailable wake-up source in sysfs timekeeping: Use proper timekeeper for debug code kselftests: timers: set-timer-lat: Add one-shot timer test cases kselftests: timers: set-timer-lat: Tweak reporting when timer fires early kselftests: timers: freq-step: Fix build warning kselftests: timers: freq-step: Define ADJ_SETOFFSET if device has older kernel headers commit 495e642939114478a5237a7d91661ba93b76f15a Author: Miklos Szeredi Date: Mon Sep 4 21:42:22 2017 +0200 vfs: add flags to d_real() Add a separate flags argument (in addition to the open flags) to control the behavior of d_real(). Signed-off-by: Miklos Szeredi Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- fs/open.c | 4 ++-- fs/overlayfs/super.c | 4 ++-- include/linux/dcache.h | 11 ++++++----- include/linux/fs.h | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) commit b1b6f83ac938d176742c85757960dec2cf10e468 Merge: 5f82e71 9e52fc2 Author: Linus Torvalds Date: Mon Sep 4 12:21:28 2017 -0700 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm changes from Ingo Molnar: "PCID support, 5-level paging support, Secure Memory Encryption support The main changes in this cycle are support for three new, complex hardware features of x86 CPUs: - Add 5-level paging support, which is a new hardware feature on upcoming Intel CPUs allowing up to 128 PB of virtual address space and 4 PB of physical RAM space - a 512-fold increase over the old limits. (Supercomputers of the future forecasting hurricanes on an ever warming planet can certainly make good use of more RAM.) Many of the necessary changes went upstream in previous cycles, v4.14 is the first kernel that can enable 5-level paging. This feature is activated via CONFIG_X86_5LEVEL=y - disabled by default. (By Kirill A. Shutemov) - Add 'encrypted memory' support, which is a new hardware feature on upcoming AMD CPUs ('Secure Memory Encryption', SME) allowing system RAM to be encrypted and decrypted (mostly) transparently by the CPU, with a little help from the kernel to transition to/from encrypted RAM. Such RAM should be more secure against various attacks like RAM access via the memory bus and should make the radio signature of memory bus traffic harder to intercept (and decrypt) as well. This feature is activated via CONFIG_AMD_MEM_ENCRYPT=y - disabled by default. (By Tom Lendacky) - Enable PCID optimized TLB flushing on newer Intel CPUs: PCID is a hardware feature that attaches an address space tag to TLB entries and thus allows to skip TLB flushing in many cases, even if we switch mm's. (By Andy Lutomirski) All three of these features were in the works for a long time, and it's coincidence of the three independent development paths that they are all enabled in v4.14 at once" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (65 commits) x86/mm: Enable RCU based page table freeing (CONFIG_HAVE_RCU_TABLE_FREE=y) x86/mm: Use pr_cont() in dump_pagetable() x86/mm: Fix SME encryption stack ptr handling kvm/x86: Avoid clearing the C-bit in rsvd_bits() x86/CPU: Align CR3 defines x86/mm, mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages acpi, x86/mm: Remove encryption mask from ACPI page protection type x86/mm, kexec: Fix memory corruption with SME on successive kexecs x86/mm/pkeys: Fix typo in Documentation/x86/protection-keys.txt x86/mm/dump_pagetables: Speed up page tables dump for CONFIG_KASAN=y x86/mm: Implement PCID based optimization: try to preserve old TLB entries using PCID x86: Enable 5-level paging support via CONFIG_X86_5LEVEL=y x86/mm: Allow userspace have mappings above 47-bit x86/mm: Prepare to expose larger address space to userspace x86/mpx: Do not allow MPX if we have mappings above 47-bit x86/mm: Rename tasksize_32bit/64bit to task_size_32bit/64bit() x86/xen: Redefine XEN_ELFNOTE_INIT_P2M using PUD_SIZE * PTRS_PER_PUD x86/mm/dump_pagetables: Fix printout of p4d level x86/mm/dump_pagetables: Generalize address normalization x86/boot: Fix memremap() related build failure ... commit 1d1821b20d4a3ed9d0abf063014776979e6822dc Author: Carlos Munoz Date: Tue Aug 29 10:40:38 2017 -0500 watchdog: octeon-wdt: Add support for 78XX SOCs. Signed-off-by: Carlos Munoz Signed-off-by: Steven J. Hill Acked-by: David Daney Acked-by: Guenter Roeck Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17214/ Signed-off-by: Ralf Baechle drivers/watchdog/octeon-wdt-main.c | 133 ++++++++++++++++++++++++++++--------- 1 file changed, 103 insertions(+), 30 deletions(-) commit 0cd4e7a918863a332eddd3d57d778fe93697053e Author: David Daney Date: Tue Aug 29 10:40:37 2017 -0500 watchdog: octeon-wdt: Add support for cn68XX SOCs. Signed-off-by: David Daney Signed-off-by: Carlos Munoz Signed-off-by: Chandrakala Chavva Acked-by: Guenter Roeck Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17213/ Signed-off-by: Ralf Baechle drivers/watchdog/octeon-wdt-main.c | 48 +++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) commit 381cec022e46f51268f3e33c9c60764fb56f73df Author: Steven J. Hill Date: Tue Aug 29 10:40:36 2017 -0500 watchdog: octeon-wdt: File cleaning. * Update copyright and company name. * Remove unused headers. * Fix variable spelling and data type. * Use octal values for module parameters. Signed-off-by: Steven J. Hill Acked-by: David Daney Acked-by: Guenter Roeck Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17212/ Signed-off-by: Ralf Baechle drivers/watchdog/octeon-wdt-main.c | 45 +++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 15 deletions(-) commit ba1fc93457e3506aaab88b67b5404a8915ea8233 Author: Steven J. Hill Date: Tue Aug 29 10:40:35 2017 -0500 MIPS: Octeon: Allow access to CIU3 IRQ domains. Add accessor function octeon_irq_get_block_domain() for cores with a CIU3. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17210/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/octeon-irq.c | 9 +++++++++ arch/mips/include/asm/octeon/octeon.h | 2 ++ 2 files changed, 11 insertions(+) commit 3c425df7a0ff5ca6feab890cb8f51f4d8aa98ef8 Author: Steven J. Hill Date: Tue Aug 29 10:40:34 2017 -0500 MIPS: Octeon: Make CSR functions node aware. Updates CSR read/write functions to be aware of nodes present in systems with CIU3 support. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17211/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/cvmx.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 1fb6e539289503514956970511c5f5e02b0a8ddc Author: Steven J. Hill Date: Tue Aug 29 10:40:33 2017 -0500 MIPS: Octeon: Watchdog registers for 70xx, 73xx, 78xx, F75xx. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17208/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/cvmx-ciu-defs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 49d148b4e52fcf7458345ea1acb9049e085a6a86 Author: Steven J. Hill Date: Tue Aug 29 10:40:32 2017 -0500 watchdog: octeon-wdt: Remove old boot vector code. Signed-off-by: Steven J. Hill Acked-by: David Daney Acked-by: Guenter Roeck Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17209/ Signed-off-by: Ralf Baechle drivers/watchdog/octeon-wdt-main.c | 134 +++---------------------------------- drivers/watchdog/octeon-wdt-nmi.S | 42 +++++++++--- 2 files changed, 44 insertions(+), 132 deletions(-) commit 9438a86a07f74670ad730ee5799a8006ae668ab9 Author: Steven J. Hill Date: Tue Aug 29 10:40:31 2017 -0500 MIPS: Octeon: Add support for accessing the boot vector. Used by the Octeon watchdog driver to get the address of the firmware boot vector. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17206/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/executive/Makefile | 2 +- .../cavium-octeon/executive/cvmx-boot-vector.c | 167 +++++++++++++++++++++ arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 85 +++++++++++ arch/mips/include/asm/octeon/cvmx-boot-vector.h | 53 +++++++ arch/mips/include/asm/octeon/cvmx-bootmem.h | 28 ++++ 5 files changed, 334 insertions(+), 1 deletion(-) commit d9a46c183a52bb864efc2fe17e564c812295647c Author: Martin Blumenstingl Date: Sun Aug 20 00:18:23 2017 +0200 MIPS: lantiq: Remove the arch/mips/lantiq/xway/reset.c implementation The RCU register are now access through separates drivers. remove the last pieces of the old implementation. The GPHY reset bits are now set by the GPHY driver which registers a reboot notifier. The reboot is triggered by a syscon-reboot driver and the MIPS specific parts are done by the generic MIPS implementation in arch/mips/kernel/reset.c. Signed-off-by: Martin Blumenstingl Signed-off-by: Hauke Mehrtens Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17131/ Signed-off-by: Ralf Baechle arch/mips/lantiq/Kconfig | 1 + arch/mips/lantiq/xway/Makefile | 2 +- arch/mips/lantiq/xway/reset.c | 147 ----------------------------------------- 3 files changed, 2 insertions(+), 148 deletions(-) commit fe556cd86774388a82bc1ab1e2e3818ca87dd4d4 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:22 2017 +0200 MIPS: lantiq: remove old USB PHY initialisation This is now done in a PHY driver. Signed-off-by: Hauke Mehrtens Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17130/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/reset.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) commit dea54fbad332f4a12af64049f0905637c04b4411 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:21 2017 +0200 phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module This driver starts the DWC2 core(s) built into the XWAY SoCs and provides the PHY interfaces for each core. The phy instances can be passed to the dwc2 driver, which already supports the generic phy interface. Signed-off-by: Hauke Mehrtens Acked-by: Kishon Vijay Abraham I Acked-by: Rob Herring Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17127/ Signed-off-by: Ralf Baechle .../bindings/phy/phy-lantiq-rcu-usb2.txt | 40 ++++ arch/mips/lantiq/xway/sysctrl.c | 36 +-- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 2 +- drivers/phy/lantiq/Kconfig | 9 + drivers/phy/lantiq/Makefile | 1 + drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 254 +++++++++++++++++++++ 7 files changed, 324 insertions(+), 19 deletions(-) commit d5103604f78e1afc29e586785af540c82b573f3a Author: Hauke Mehrtens Date: Sun Aug 20 00:18:20 2017 +0200 MIPS: lantiq: remove old GPHY loader code The GPHY loader was replaced by a new more flexible driver. Remove the old driver. Signed-off-by: Hauke Mehrtens Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17129/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/Makefile | 2 - arch/mips/lantiq/xway/reset.c | 106 ------------------------------- arch/mips/lantiq/xway/xrx200_phy_fw.c | 113 ---------------------------------- 3 files changed, 221 deletions(-) commit 126534141b45d9d1b205fbe3f2321200074b76fd Author: Martin Blumenstingl Date: Sun Aug 20 00:18:19 2017 +0200 MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd Compared to the old xrx200_phy_fw driver the new version has multiple enhancements. The name of the firmware files does not have to be added to all .dts files anymore - one now configures the GPHY mode (FE or GE) instead. Each GPHY can now also boot separate firmware (thus mixing of GE and FE GPHYs is now possible). The new implementation is based on the RCU syscon-mfd and uses the reeset_controller framework instead of raw RCU register reads/writes. Signed-off-by: Martin Blumenstingl Signed-off-by: Hauke Mehrtens Reviewed-by: Andy Shevchenko Acked-by: Rob Herring Cc: john@phrozen.org Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17128/ Signed-off-by: Ralf Baechle .../devicetree/bindings/mips/lantiq/rcu-gphy.txt | 36 +++ arch/mips/lantiq/xway/sysctrl.c | 6 +- drivers/soc/lantiq/Makefile | 1 + drivers/soc/lantiq/gphy.c | 260 +++++++++++++++++++++ include/dt-bindings/mips/lantiq_rcu_gphy.h | 15 ++ 5 files changed, 316 insertions(+), 2 deletions(-) commit ba73f0bcced372ca6d438a4c569f61c40f2702ce Author: Hauke Mehrtens Date: Sun Aug 20 00:18:18 2017 +0200 MIPS: lantiq: remove old reset controller implementation This code is now replaced by a reset controller in drivers/reset/reset- lantiq-rcu.c. The old code was never used anyway. Signed-off-by: Hauke Mehrtens Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17124/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/reset.c | 68 ------------------------------------------- 1 file changed, 68 deletions(-) commit 79797b6fadf4d2b6ea639406e08c8ce1f259f6ae Author: Martin Blumenstingl Date: Sun Aug 20 00:18:17 2017 +0200 reset: Add a reset controller driver for the Lantiq XWAY based SoCs The reset controllers (on xRX200 and newer SoCs have two of them) are provided by the RCU module. This was initially implemented as a simple reset controller. However, the RCU module provides more functionality (ethernet GPHYs, USB PHY, etc.), which makes it a MFD device. The old reset controller driver implementation from arch/mips/lantiq/xway/reset.c did not honor this fact. For some devices the request and the status bits are different. Signed-off-by: Martin Blumenstingl Signed-off-by: Hauke Mehrtens Reviewed-by: Andy Shevchenko Acked-by: Philipp Zabel Acked-by: Rob Herring Cc: john@phrozen.org Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17125/ Signed-off-by: Ralf Baechle .../devicetree/bindings/reset/lantiq,reset.txt | 30 +++ drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-lantiq.c | 212 +++++++++++++++++++++ 4 files changed, 249 insertions(+) commit 4dcfadb18e735fbdaf8c7eca06e7e0acf0847184 Author: Ralf Baechle Date: Thu Aug 31 22:02:18 2017 +0200 MIPS: lantiq: Replace ltq_boot_select() with dummy implementation. This will only be used until the last usage of ltq_boot_select() has been removed. Signed-off-by: Ralf Baechle arch/mips/lantiq/falcon/reset.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 333b2707a0ec6769179ac8161394536f4663b77b Author: Hauke Mehrtens Date: Sun Aug 20 00:18:16 2017 +0200 MIPS: lantiq: remove ltq_reset_cause() and ltq_boot_select() Do not export the ltq_reset_cause() and ltq_boot_select() function any more. ltq_reset_cause() was accessed by the watchdog driver before to see why the last reset happened, this is now done through direct access of the register over regmap. The bits in this register are anyway different between the xrx200 and the falcon SoC. ltq_boot_select() is not used any more and was used by the flash drivers to check if the system was booted from this flash type, now the drivers should depend on the device tree only. Signed-off-by: Hauke Mehrtens Acked-by: Martin Blumenstingl Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17126/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-lantiq/lantiq.h | 2 -- arch/mips/lantiq/falcon/reset.c | 13 ------------- arch/mips/lantiq/xway/reset.c | 19 ------------------- 3 files changed, 34 deletions(-) commit c20b3b8019823ad8a77c968a702115f735b64a79 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:15 2017 +0200 MIPS: lantiq: Convert the fpi bus driver to a platform_driver Instead of hacking the configuration of the FPI bus into the arch code add an own bus driver for this internal bus. The FPI bus is the main bus of the SoC. This bus driver makes sure the bus is configured correctly before the child drivers are getting initialized. This driver will probably also be used on different SoCs later. Signed-off-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Reviewed-by: Andy Shevchenko Cc: john@phrozen.org Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17122/ Signed-off-by: Ralf Baechle .../devicetree/bindings/mips/lantiq/fpi-bus.txt | 31 ++++++++ MAINTAINERS | 1 + arch/mips/lantiq/xway/reset.c | 4 - arch/mips/lantiq/xway/sysctrl.c | 41 ---------- drivers/soc/Makefile | 1 + drivers/soc/lantiq/Makefile | 1 + drivers/soc/lantiq/fpi-bus.c | 87 ++++++++++++++++++++++ 7 files changed, 121 insertions(+), 45 deletions(-) commit 3e5b08518f6aefad31dca975634c3133457928ff Author: Sebastian Reichel Date: Mon Sep 4 09:30:03 2017 -0700 Input: add a driver for PWM controllable vibrators Provide a simple driver for PWM controllable vibrators. It will be used by Motorola Droid 4. Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/pwm-vibrator.txt | 66 +++++ drivers/input/misc/Kconfig | 12 + drivers/input/misc/Makefile | 1 + drivers/input/misc/pwm-vibra.c | 267 +++++++++++++++++++++ 4 files changed, 346 insertions(+) commit c5aba1cdd3d31cbf3c8e9d571c9a4db952117970 Author: Hauke Mehrtens Date: Mon Sep 4 13:57:15 2017 +0200 Documentation: DT: MIPS: lantiq: Add docs for the RCU bindings This adds the initial documentation for the RCU module (a MFD device which provides USB PHYs, reset controllers and more). The RCU register range is used for multiple purposes. Mostly one device uses one or multiple register exclusively, but for some registers some bits are for one driver and some other bits are for a different driver. With this patch all accesses to the RCU registers will go through syscon. Signed-off-by: Hauke Mehrtens Acked-by: Martin Blumenstingl Acked-by: Rob Herring Cc: john@phrozen.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17121/ Signed-off-by: Ralf Baechle .../devicetree/bindings/mips/lantiq/rcu.txt | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit d9e3cb2f9ed91020b780ee662bdec692a3f276c9 Author: Ben Hutchings Date: Wed Jul 19 01:02:04 2017 +0100 alpha: math-emu: Fix modular build Commit 00fc0e0dda62 ("alpha: move exports to actual definitions") also removed the exports of the math emulator hooks, which are defined in C code. In case anyone cares about the option of CONFIG_MATHEMU=m, add exports next to those definitions. Also add a MODULE_LICENSE. Fixes: 00fc0e0dda62 ("alpha: move exports to actual definitions") Signed-off-by: Ben Hutchings Signed-off-by: Matt Turner arch/alpha/kernel/traps.c | 2 ++ arch/alpha/math-emu/math.c | 1 + 2 files changed, 3 insertions(+) commit 873f9b5bcbf27f6e89e1879714abe4532cacf5d7 Author: Ben Hutchings Date: Wed Jul 19 01:01:16 2017 +0100 alpha: Restore symbol versions for symbols exported from assembly Add so that genksyms knows the types of these symbols and can generate CRCs for them. Fixes: 00fc0e0dda62 ("alpha: move exports to actual definitions") Signed-off-by: Ben Hutchings Signed-off-by: Matt Turner arch/alpha/include/asm/asm-prototypes.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 81f166c225bb8e6ad25df3592ebf267918bd407f Author: Krzysztof Kozlowski Date: Thu Jul 20 06:57:52 2017 +0200 alpha: defconfig: Cleanup from old Kconfig options Remove old, dead Kconfig options (in order appearing in this commit): - IP_NF_QUEUE: commit 3dd6664fac7e ("netfilter: remove unused "config IP_NF_QUEUE""); - AUTOFS_FS: commit 561c5cf9236a ("staging: Remove autofs3"); Signed-off-by: Krzysztof Kozlowski Signed-off-by: Matt Turner arch/alpha/defconfig | 2 -- 1 file changed, 2 deletions(-) commit 8c9b839c0b80f4fb4c17632961770f2f4719f8e2 Author: Geliang Tang Date: Wed Jan 6 23:35:16 2016 +0800 alpha: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Matt Turner arch/alpha/kernel/pci-sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 203308a5d1e96df245a2817ae7f39fa1b8544da4 Author: Masahiro Yamada Date: Sun Sep 11 15:26:51 2016 +0900 alpha: squash lines for immediate return Remove unneeded variables and assignments. While we are here, fix the coding style of SMC37c669_read_config(): - replace whitespaces at the start of lines with tabs - remove unneeded whitespaces around parentheses Signed-off-by: Masahiro Yamada Signed-off-by: Matt Turner arch/alpha/kernel/pci-noop.c | 6 +----- arch/alpha/kernel/pci.c | 6 +----- arch/alpha/kernel/smc37c669.c | 7 ++----- 3 files changed, 4 insertions(+), 15 deletions(-) commit 236d62b03a95d70ffe04fbc4cd55a64136f2ee44 Author: Shyam Saini Date: Mon Oct 10 05:47:36 2016 +0530 alpha: kernel: Use vma_pages() Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Shyam Saini Signed-off-by: Matt Turner arch/alpha/kernel/pci-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03e1f04414b6e8ad9dd20081c3f8304e81f28f47 Author: Dan Carpenter Date: Mon Nov 14 14:34:00 2016 +0300 alpha: silence a buffer overflow warning We check that "member" is in bounds for the first line, but we also use it on the next line without checking which is a mistake. Signed-off-by: Dan Carpenter Signed-off-by: Matt Turner arch/alpha/kernel/setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b5a3a128b44219f0802a8b7895e09233853c8b43 Author: Julia Cartwright Date: Tue Mar 21 17:43:02 2017 -0500 alpha: marvel: make use of raw_spinlock variants The alpha/marvel code currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Matt Turner arch/alpha/include/asm/core_marvel.h | 2 +- arch/alpha/kernel/core_marvel.c | 2 +- arch/alpha/kernel/sys_marvel.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) commit beb1057feb1d061a0598440c73c4ca4e020c0751 Author: Sergei Trofimovich Date: Sat Apr 8 20:46:56 2017 +0100 alpha: cleanup: remove __NR_sys_epoll_*, leave __NR_epoll_* __NR_sys_epoll_create and friends are alpha-specific while __NR_epoll_create is a generic name for other arches. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: linux-alpha@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich Signed-off-by: Matt Turner arch/alpha/include/uapi/asm/unistd.h | 5 ----- 1 file changed, 5 deletions(-) commit 1c0234aac80b9b20d7685ad0fc04ec0ab676684f Author: Tobias Klauser Date: Wed May 17 10:29:34 2017 +0200 alpha: use generic fb.h The arch uses a verbatim copy of the asm-generic version and does not add any own implemntations to the header, so use asm-generic/fb.h instead of duplicating code. Signed-off-by: Tobias Klauser Signed-off-by: Matt Turner arch/alpha/include/asm/Kbuild | 1 + arch/alpha/include/asm/fb.h | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) commit 5517554e43131f542e5f95c94c5cd9a1bb989fab Author: Ronnie Sahlberg Date: Thu Aug 24 11:24:56 2017 +1000 cifs: Add support for writing attributes on SMB2+ This adds support for writing extended attributes on SMB2+ shares. Attributes can be written using the setfattr command. RH-bz: 1110709 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifsglob.h | 2 +- fs/cifs/cifsproto.h | 3 ++- fs/cifs/cifssmb.c | 3 ++- fs/cifs/smb2ops.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.c | 10 +++++++++ fs/cifs/smb2proto.h | 3 +++ fs/cifs/xattr.c | 2 +- 7 files changed, 79 insertions(+), 4 deletions(-) commit 95907fea4fd8ccc736e0a428e52159b4d42b9958 Author: Ronnie Sahlberg Date: Thu Aug 24 11:24:55 2017 +1000 cifs: Add support for reading attributes on SMB2+ SMB1 already has support to read attributes. This adds similar support to SMB2+. With this patch, tools such as 'getfattr' will now work with SMB2+ shares. RH-bz: 1110709 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.c | 12 +++++ fs/cifs/smb2pdu.h | 10 ++++ fs/cifs/smb2proto.h | 3 ++ 4 files changed, 169 insertions(+) commit 5f82e71a001d14824a7728ad9e49f6aea420f161 Merge: 6c51e67 edc2988 Author: Linus Torvalds Date: Mon Sep 4 11:52:29 2017 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - Add 'cross-release' support to lockdep, which allows APIs like completions, where it's not the 'owner' who releases the lock, to be tracked. It's all activated automatically under CONFIG_PROVE_LOCKING=y. - Clean up (restructure) the x86 atomics op implementation to be more readable, in preparation of KASAN annotations. (Dmitry Vyukov) - Fix static keys (Paolo Bonzini) - Add killable versions of down_read() et al (Kirill Tkhai) - Rework and fix jump_label locking (Marc Zyngier, Paolo Bonzini) - Rework (and fix) tlb_flush_pending() barriers (Peter Zijlstra) - Remove smp_mb__before_spinlock() and convert its usages, introduce smp_mb__after_spinlock() (Peter Zijlstra) * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits) locking/lockdep/selftests: Fix mixed read-write ABBA tests sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK() acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures smp: Avoid using two cache lines for struct call_single_data locking/lockdep: Untangle xhlock history save/restore from task independence locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being futex: Remove duplicated code and fix undefined behaviour Documentation/locking/atomic: Finish the document... locking/lockdep: Fix workqueue crossrelease annotation workqueue/lockdep: 'Fix' flush_work() annotation locking/lockdep/selftests: Add mixed read-write ABBA tests mm, locking/barriers: Clarify tlb_flush_pending() barriers locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS truly non-interactive locking/lockdep: Explicitly initialize wq_barrier::done::map locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE to CONFIG_LOCKDEP_COMPLETIONS locking/lockdep: Reword title of LOCKDEP_CROSSRELEASE config locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING locking/refcounts, x86/asm: Implement fast refcount overflow protection locking/lockdep: Fix the rollback and overwrite detection logic in crossrelease ... commit 6c51e67b64d169419fb13318035bb442f9176612 Merge: e0a195b cf7de27 Author: Linus Torvalds Date: Mon Sep 4 11:18:17 2017 -0700 Merge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull syscall updates from Ingo Molnar: "Improve the security of set_fs(): we now check the address limit on a number of key platforms (x86, arm, arm64) before returning to user-space - without adding overhead to the typical system call fast path" * 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64/syscalls: Check address limit on user-mode return arm/syscalls: Check address limit on user-mode return x86/syscalls: Check address limit on user-mode return commit e0a195b5225e1285806622cc146dc5c3312fb392 Merge: 0098410 c455fd9 Author: Linus Torvalds Date: Mon Sep 4 11:13:56 2017 -0700 Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 spinlock update from Ingo Molnar: "Convert an NMI lock to raw" [ Clarification: it's not that the lock itself is NMI-safe, it's about NMI registration called from RT contexts - Linus ] * 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/nmi: Use raw lock commit 0098410dd62dcbabf50b5b1d257ddcc9278e9087 Merge: f29139b aa78c1c Author: Linus Torvalds Date: Mon Sep 4 11:11:57 2017 -0700 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode loading updates from Ingo Molnar: "Update documentation, improve robustness and fix a memory leak" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/intel: Improve microcode patches saving flow x86/microcode: Document the three loading methods x86/microcode/AMD: Free unneeded patch before exit from update_cache() commit f29139bf109d35967229b2caf4e6297c201cc690 Merge: a1400cd 4f16720 Author: Linus Torvalds Date: Mon Sep 4 11:10:30 2017 -0700 Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug updates from Ingo Molnar: "Various fixes to the NUMA emulation code" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/numa_emulation: Recalculate numa_nodes_parsed from emulated nodes x86/numa_emulation: Assign physnode_mask directly from numa_nodes_parsed x86/numa_emulation: Refine the calculation of max_emu_nid and dfl_phys_nid commit a1400cdb777409d142c76958ed96e39c2cb95edd Merge: d5e54c4 aac64f7 Author: Linus Torvalds Date: Mon Sep 4 11:05:23 2017 -0700 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpuid updates from Ingo Molnar: "AMD F17h related updates" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/amd: Hide unused legacy_fixup_core_id() function x86/cpu/amd: Derive L3 shared_cpu_map from cpu_llc_shared_mask x86/cpu/amd: Limit cpu_core_id fixup to families older than F17h commit 9edcad53d673fb033c2da7c6c05d30737739fdf5 Author: Meng Xu Date: Mon Sep 4 11:34:33 2017 -0400 libnvdimm, nfit: move the check on nd_reserved2 to the endpoint Delay the check of nd_reserved2 to the actual endpoint (acpi_nfit_ctl) that uses it, as a prevention of a potential double-fetch bug. While examining the kernel source code, I found a dangerous operation that could turn into a double-fetch situation (a race condition bug) where the same userspace memory region are fetched twice into kernel with sanity checks after the first fetch while missing checks after the second fetch. In the case of _IOC_NR(ioctl_cmd) == ND_CMD_CALL: 1. The first fetch happens in line 935 copy_from_user(&pkg, p, sizeof(pkg) 2. subsequently `pkg.nd_reserved2` is asserted to be all zeroes (line 984 to 986). 3. The second fetch happens in line 1022 copy_from_user(buf, p, buf_len) 4. Given that `p` can be fully controlled in userspace, an attacker can race condition to override the header part of `p`, say, `((struct nd_cmd_pkg *)p)->nd_reserved2` to arbitrary value (say nine 0xFFFFFFFF for `nd_reserved2`) after the first fetch but before the second fetch. The changed value will be copied to `buf`. 5. There is no checks on the second fetches until the use of it in line 1034: nd_cmd_clear_to_send(nvdimm_bus, nvdimm, cmd, buf) and line 1038: nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, &cmd_rc) which means that the assumed relation, `p->nd_reserved2` are all zeroes might not hold after the second fetch. And once the control goes to these functions we lose the context to assert the assumed relation. 6. Based on my manual analysis, `p->nd_reserved2` is not used in function `nd_cmd_clear_to_send` and potential implementations of `nd_desc->ndctl` so there is no working exploit against it right now. However, this could easily turns to an exploitable one if careless developers start to use `p->nd_reserved2` later and assume that they are all zeroes. Move the validation of the nd_reserved2 field to the ->ndctl() implementation where it has a stable buffer to evaluate. Signed-off-by: Meng Xu Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 4 ++++ drivers/nvdimm/bus.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit d5e54c4ed4246b6c28ce0f82109b42c4015c542a Merge: 4515392 9e8730b Author: Linus Torvalds Date: Mon Sep 4 10:58:41 2017 -0700 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: "More Clang support related fixes" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Use cc-option to validate stack alignment parameter x86/build: Fix stack alignment for CLang x86/build: Drop unused mflags-y commit ed43d098f9020d6669a00bd26fac807d5c19e202 Author: Colin Ian King Date: Sun Sep 3 14:06:01 2017 +0100 rpmsg: glink: initialize ret to zero to ensure error status check is correct The new switch cases for RPM_CMD_RX_DONE, RPM_CMD_RX_DONE_W_REUSE, RPM_CMD_RX_INTENT_REQ_ACK, RPM_CMD_INTENT and RPM_CMD_RX_INTENT_REQ from 4 recent commits are not setting ret and so a later non-zero check on ret is testing on a garbage value in ret. Fix this by initializing ret to zero. Detected by CoverityScan CID#1455249 ("Uninitialized scalar variable") Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents) Fixes: dacbb35e930f ("glink: Receive and store the remote intent buffers") Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable") Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command") Signed-off-by: Colin Ian King Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 906cf29cfab5806d32c2a274f86f3d076c0a48be Author: Colin Ian King Date: Sun Sep 3 13:46:14 2017 +0100 rpmsg: glink: fix null pointer dereference on a null intent In the case where glink->intentless is true and the call to qcom_glink_tx fails then we have a condition where ret is non-zero and intent is null, causing a null pointer deference when setting intent->in_use to false. Add an extra check to only dereference intent if intent is non-null. Detected by: CoverityScan CID#1455247 ("Explicit null dereferenced") Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command") Signed-off-by: Colin Ian King Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45153920c7b6f905c917dc1dfb69f4e214799fc8 Merge: b0c79f4 0982adc Author: Linus Torvalds Date: Mon Sep 4 10:51:02 2017 -0700 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The main changes are KASL related fixes and cleanups: in particular we now exclude certain physical memory ranges as KASLR randomization targets that have proven to be unreliable (early-)RAM on some firmware versions" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/KASLR: Work around firmware bugs by excluding EFI_BOOT_SERVICES_* and EFI_LOADER_* from KASLR's choice x86/boot/KASLR: Prefer mirrored memory regions for the kernel physical address efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor x86/boot/KASLR: Rename process_e820_entry() into process_mem_region() x86/boot/KASLR: Switch to pass struct mem_vector to process_e820_entry() x86/boot/KASLR: Wrap e820 entries walking code into new function process_e820_entries() commit 00ee929f9efcad925ed4118f8c2e8bceb9fe7373 Merge: ddc239a f039685 Author: Mark Brown Date: Mon Sep 4 17:54:38 2017 +0100 Merge tag 'regulator-v4.14' into regulator-next regulator: Updates for v4.14 This is an extremely quiet release for the regulator subsystem, it's all fairly minor fixes and cleanups plus a few new drivers and ddevice ID additions: - Support for MediaTek MT6380, Ricoh RC5T619 and ST Voltage Reference Buffers. # gpg: Signature made Mon 04 Sep 2017 17:51:28 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 ddc239a4ac5bbd040e6f2f0ce3b876cd08281706 Merge: a69064e da26296 4ebb9d7 423a116 Author: Mark Brown Date: Mon Sep 4 17:54:35 2017 +0100 Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/cpcap' and 'regulator/fix/of' into regulator-linus commit a69064e75ee6303f505f256a675c20e0e54c4f2c Merge: 569dbb8 c9ccaa0 Author: Mark Brown Date: Mon Sep 4 17:54:34 2017 +0100 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit b0c79f49c343cda8954b3322984c32f258ca4ccb Merge: f213a6c dd88a0a Author: Linus Torvalds Date: Mon Sep 4 09:52:57 2017 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: - Introduce the ORC unwinder, which can be enabled via CONFIG_ORC_UNWINDER=y. The ORC unwinder is a lightweight, Linux kernel specific debuginfo implementation, which aims to be DWARF done right for unwinding. Objtool is used to generate the ORC unwinder tables during build, so the data format is flexible and kernel internal: there's no dependency on debuginfo created by an external toolchain. The ORC unwinder is almost two orders of magnitude faster than the (out of tree) DWARF unwinder - which is important for perf call graph profiling. It is also significantly simpler and is coded defensively: there has not been a single ORC related kernel crash so far, even with early versions. (knock on wood!) But the main advantage is that enabling the ORC unwinder allows CONFIG_FRAME_POINTERS to be turned off - which speeds up the kernel measurably: With frame pointers disabled, GCC does not have to add frame pointer instrumentation code to every function in the kernel. The kernel's .text size decreases by about 3.2%, resulting in better cache utilization and fewer instructions executed, resulting in a broad kernel-wide speedup. Average speedup of system calls should be roughly in the 1-3% range - measurements by Mel Gorman [1] have shown a speedup of 5-10% for some function execution intense workloads. The main cost of the unwinder is that the unwinder data has to be stored in RAM: the memory cost is 2-4MB of RAM, depending on kernel config - which is a modest cost on modern x86 systems. Given how young the ORC unwinder code is it's not enabled by default - but given the performance advantages the plan is to eventually make it the default unwinder on x86. See Documentation/x86/orc-unwinder.txt for more details. - Remove lguest support: its intended role was that of a temporary proof of concept for virtualization, plus its removal will enable the reduction (removal) of the paravirt API as well, so Rusty agreed to its removal. (Juergen Gross) - Clean up and fix FSGS related functionality (Andy Lutomirski) - Clean up IO access APIs (Andy Shevchenko) - Enhance the symbol namespace (Jiri Slaby) * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (47 commits) objtool: Handle GCC stack pointer adjustment bug x86/entry/64: Use ENTRY() instead of ALIGN+GLOBAL for stub32_clone() x86/fpu/math-emu: Add ENDPROC to functions x86/boot/64: Extract efi_pe_entry() from startup_64() x86/boot/32: Extract efi_pe_entry() from startup_32() x86/lguest: Remove lguest support x86/paravirt/xen: Remove xen_patch() objtool: Fix objtool fallthrough detection with function padding x86/xen/64: Fix the reported SS and CS in SYSCALL objtool: Track DRAP separately from callee-saved registers objtool: Fix validate_branch() return codes x86: Clarify/fix no-op barriers for text_poke_bp() x86/switch_to/64: Rewrite FS/GS switching yet again to fix AMD CPUs selftests/x86/fsgsbase: Test selectors 1, 2, and 3 x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps x86/fsgsbase/64: Fully initialize FS and GS state in start_thread_common x86/asm: Fix UNWIND_HINT_REGS macro for older binutils x86/asm/32: Fix regs_get_register() on segment registers x86/xen/64: Rearrange the SYSCALL entries x86/asm/32: Remove a bunch of '& 0xffff' from pt_regs segment reads ... commit f039685b2e3a5b77461cd5006a5651ccaeafa396 Merge: a6955d3 83b2a3c 0cdbf48 Author: Mark Brown Date: Mon Sep 4 17:45:50 2017 +0100 Merge remote-tracking branches 'regulator/topic/rc5t619' and 'regulator/topic/stm32-vref' into regulator-next commit a6955d3635d83e4c333ccb4ab51dc7f2661362f2 Merge: 02929a4 d57287b 723310d 8986a11 a4aae5a e3b53b8 Author: Mark Brown Date: Mon Sep 4 17:45:46 2017 +0100 Merge remote-tracking branches 'regulator/topic/mt6380', 'regulator/topic/mtk', 'regulator/topic/pv88090', 'regulator/topic/pwm' and 'regulator/topic/qcom' into regulator-next commit 02929a4478b66727dc895346a408b63e06dfe4ee Merge: 0ab9129 74ff8e0 b661565 7799167 fc1111b 6d284bb Author: Mark Brown Date: Mon Sep 4 17:45:42 2017 +0100 Merge remote-tracking branches 'regulator/topic/cpcap', 'regulator/topic/da9063', 'regulator/topic/dt', 'regulator/topic/fan53555' and 'regulator/topic/ltc3589' into regulator-next commit 0ab912978c626ea6afd6ee85845ba9356fcda8cc Merge: 0bbc0a0 da26296 4ebb9d7 423a116 Author: Mark Brown Date: Mon Sep 4 17:45:38 2017 +0100 Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/cpcap' and 'regulator/fix/of' into regulator-linus commit 0bbc0a0a0270ecb1cc8726c6ea663320b4b5e551 Merge: 569dbb8 c9ccaa0 Author: Mark Brown Date: Mon Sep 4 17:45:37 2017 +0100 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit 1bf21b3373df2b5bfa3c6d2dcd52344c7ee4cc58 Author: Colin Ian King Date: Mon Sep 4 09:17:39 2017 -0700 Input: adi - make array seq static, reduces object code size Don't populate the array seq on the stack, instead make it static. Makes the object code smaller by over 170 bytes: Before: text data bss dec hex filename 13227 3232 0 16459 404b drivers/input/joystick/adi.o After: text data bss dec hex filename 12957 3328 0 16285 3f9d drivers/input/joystick/adi.o Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/joystick/adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 Merge: f5308d1 08d6ac9 Author: Dmitry Torokhov Date: Mon Sep 4 09:22:54 2017 -0700 Merge branch 'next' into for-linus Prepare input updates for 4.14 merge window. commit ee5f38a4459a453ba5d5bdacdcffdf408548338f Merge: cc91cea 7051334 Author: Takashi Iwai Date: Mon Sep 4 18:13:29 2017 +0200 Merge tag 'asoc-v4.14-cs43130' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for the CS43130 driver A couple of warning fixes for the newly added CS43130 driver. commit f213a6c84c1b4b396a0713ee33cff0e02ba8235f Merge: 621bee3 bbdacdf Author: Linus Torvalds Date: Mon Sep 4 09:10:24 2017 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - fix affine wakeups (Peter Zijlstra) - improve CPU onlining (and general bootup) scalability on systems with ridiculous number (thousands) of CPUs (Peter Zijlstra) - sched/numa updates (Rik van Riel) - sched/deadline updates (Byungchul Park) - sched/cpufreq enhancements and related cleanups (Viresh Kumar) - sched/debug enhancements (Xie XiuQi) - various fixes" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) sched/debug: Optimize sched_domain sysctl generation sched/topology: Avoid pointless rebuild sched/topology, cpuset: Avoid spurious/wrong domain rebuilds sched/topology: Improve comments sched/topology: Fix memory leak in __sdt_alloc() sched/completion: Document that reinit_completion() must be called after complete_all() sched/autogroup: Fix error reporting printk text in autogroup_create() sched/fair: Fix wake_affine() for !NUMA_BALANCING sched/debug: Intruduce task_state_to_char() helper function sched/debug: Show task state in /proc/sched_debug sched/debug: Use task_pid_nr_ns in /proc/$pid/sched sched/core: Remove unnecessary initialization init_idle_bootup_task() sched/deadline: Change return value of cpudl_find() sched/deadline: Make find_later_rq() choose a closer CPU in topology sched/numa: Scale scan period with tasks in group and shared/private sched/numa: Slow down scan rate if shared faults dominate sched/pelt: Fix false running accounting sched: Mark pick_next_task_dl() and build_sched_domain() as static sched/cpupri: Don't re-initialize 'struct cpupri' sched/deadline: Don't re-initialize 'struct cpudl' ... commit 621bee34f6ed12d6d4f8896028333fc2200b4ced Merge: 9657752 9662d43 Author: Linus Torvalds Date: Mon Sep 4 09:08:56 2017 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Ingo Molnar: "A single change fixing SMCA bank initialization on systems that don't have CPU0 enabled" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/AMD: Allow any CPU to initialize the smca_banks array commit 1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1 Author: Al Viro Date: Mon Sep 4 12:07:24 2017 -0400 fix the __user misannotations in asm-generic get_user/put_user Signed-off-by: Al Viro include/asm-generic/uaccess.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cc91ceaf3efd9a2364463b5f85d9f391f1ddaa9d Author: Takashi Iwai Date: Mon Sep 4 17:38:36 2017 +0200 ALSA: hda/ca0132 - Fix memory leak at error path The CA0132 codec driver doesn't call the free function at its error path of the probe, which leaves the allocated memory. Call ca0132_free() properly at the error handling. Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9657752cb5039c7498d4b27c4a75530f93b87d9b Merge: 0081a0c 1b2f76d Author: Linus Torvalds Date: Mon Sep 4 08:39:02 2017 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Kernel side changes: - Add branch type profiling/tracing support. (Jin Yao) - Add the PERF_SAMPLE_PHYS_ADDR ABI to allow the tracing/profiling of physical memory addresses, where the PMU supports it. (Kan Liang) - Export some PMU capability details in the new /sys/bus/event_source/devices/cpu/caps/ sysfs directory. (Andi Kleen) - Aux data fixes and updates (Will Deacon) - kprobes fixes and updates (Masami Hiramatsu) - AMD uncore PMU driver fixes and updates (Janakarajan Natarajan) On the tooling side, here's a (limited!) list of highlights - there were many other changes that I could not list, see the shortlog and git history for details: UI improvements: - Implement a visual marker for fused x86 instructions in the annotate TUI browser, available now in 'perf report', more work needed to have it available as well in 'perf top' (Jin Yao) Further explanation from one of Jin's patches: │ ┌──cmpl $0x0,argp_program_version_hook 81.93 │ ├──je 20 │ │ lock cmpxchg %esi,0x38a9a4(%rip) │ │↓ jne 29 │ │↓ jmp 43 11.47 │20:└─→cmpxch %esi,0x38a999(%rip) That means the cmpl+je is a fused instruction pair and they should be considered together. - Record the branch type and then show statistics and info about in callchain entries (Jin Yao) Example from one of Jin's patches: # perf record -g -j any,save_type # perf report --branch-history --stdio --no-children 38.50% div.c:45 [.] main div | ---main div.c:42 (RET CROSS_2M cycles:2) compute_flag div.c:28 (cycles:2) compute_flag div.c:27 (RET CROSS_2M cycles:1) rand rand.c:28 (cycles:1) rand rand.c:28 (RET CROSS_2M cycles:1) __random random.c:298 (cycles:1) __random random.c:297 (COND_BWD CROSS_2M cycles:1) __random random.c:295 (cycles:1) __random random.c:295 (COND_BWD CROSS_2M cycles:1) __random random.c:295 (cycles:1) __random random.c:295 (RET CROSS_2M cycles:9) namespaces support: - Add initial support for namespaces, using setns to access files in namespaces, grabbing their build-ids, etc. (Krister Johansen) perf trace enhancements: - Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo) - Add initial 'clone' syscall args beautifier in 'perf trace' (Arnaldo Carvalho de Melo) - Ignore 'fd' and 'offset' args for MAP_ANONYMOUS in 'perf trace' (Arnaldo Carvalho de Melo) - Beautifiers for the 'cmd' arg of several ioctl types, including: sound, DRM, KVM, vhost virtio and perf_events. (Arnaldo Carvalho de Melo) - Add PERF_SAMPLE_CALLCHAIN and PERF_RECORD_MMAP[2] to 'perf data' CTF conversion, allowing CTF trace visualization tools to show callchains and to resolve symbols (Geneviève Bastien) - Beautify the fcntl syscall, which is an interesting one in the sense that infrastructure had to be put in place to change the formatters of some arguments according to the value in a previous one, i.e. cmd dictates how arg and the syscall return will be formatted. (Arnaldo Carvalho de Melo perf stat enhancements: - Use group read for event groups in 'perf stat', reducing overhead when groups are defined in the event specification, i.e. when using {} to enclose a list of events, asking them to be read at the same time, e.g.: "perf stat -e '{cycles,instructions}'" (Jiri Olsa) pipe mode improvements: - Process tracing data in 'perf annotate' pipe mode (David Carrillo-Cisneros) - Add header record types to pipe-mode, now this command: $ perf record -o - -e cycles sleep 1 | perf report --stdio --header Will show the same as in non-pipe mode, i.e. involving a perf.data file (David Carrillo-Cisneros) Vendor specific hardware event support updates/enhancements: - Update POWER9 vendor events tables (Sukadev Bhattiprolu) - Add POWER9 PMU events Sukadev (Bhattiprolu) - Support additional POWER8+ PVR in PMU mapfile (Shriya) - Add Skylake server uncore JSON vendor events (Andi Kleen) - Support exporting Intel PT data to sqlite3 with python perf scripts, this is in addition to the postgresql support that was already there (Adrian Hunter)" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (253 commits) perf symbols: Fix plt entry calculation for ARM and AARCH64 perf probe: Fix kprobe blacklist checking condition perf/x86: Fix caps/ for !Intel perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR perf/core, pt, bts: Get rid of itrace_started perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments tools headers: Sync cpu features kernel ABI headers with tooling headers perf tools: Pass full path of FEATURES_DUMP perf tools: Robustify detection of clang binary tools lib: Allow external definition of CC, AR and LD perf tools: Allow external definition of flex and bison binary names tools build tests: Don't hardcode gcc name perf report: Group stat values on global event id perf values: Zero value buffers perf values: Fix allocation check perf values: Fix thread index bug perf report: Add dump_read function perf record: Set read_format for inherit_stat perf c2c: Fix remote HITM detection for Skylake perf tools: Fix static build with newer toolchains ... commit 9dee1474121550b20542321f9e0579801c6b587c Author: Pablo Neira Ayuso Date: Sun Sep 3 23:56:01 2017 +0200 netfilter: nf_tables: support for recursive chain deletion This patch sorts out an asymmetry in deletions. Currently, table and set deletion commands come with an implicit content flush on deletion. However, chain deletion results in -EBUSY if there is content in this chain, so no implicit flush happens. So you have to send a flush command in first place to delete chains, this is inconsistent and it can be annoying in terms of user experience. This patch uses the new NLM_F_NONREC flag to request non-recursive chain deletion, ie. if the chain to be removed contains rules, then this returns EBUSY. This problem was discussed during the NFWS'17 in Faro, Portugal. In iptables, you hit -EBUSY if you try to delete a chain that contains rules, so you have to flush first before you can remove anything. Since iptables-compat uses the nf_tables netlink interface, it has to use the NLM_F_NONREC flag from userspace to retain the original iptables semantics, ie. bail out on removing chains that contain rules. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit a8278400809dd99eb24468c02c8d4f0cb0003eae Author: Pablo Neira Ayuso Date: Sun Sep 3 23:56:00 2017 +0200 netfilter: nf_tables: use NLM_F_NONREC for deletion requests Bail out if user requests non-recursive deletion for tables and sets. This new flags tells nf_tables netlink interface to reject deletions if tables and sets have content. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2335ba704f32b855651d0cd15dd9b271ec565fb6 Author: Pablo Neira Ayuso Date: Sun Sep 3 23:55:59 2017 +0200 netlink: add NLM_F_NONREC flag for deletion requests In the last NFWS in Faro, Portugal, we discussed that netlink is lacking the semantics to request non recursive deletions, ie. do not delete an object iff it has child objects that hang from this parent object that the user requests to be deleted. We need this new flag to solve a problem for the iptables-compat backward compatibility utility, that runs iptables commands using the existing nf_tables netlink interface. Specifically, custom chains in iptables cannot be deleted if there are rules in it, however, nf_tables allows to remove any chain that is populated with content. To sort out this asymmetry, iptables-compat userspace sets this new NLM_F_NONREC flag to obtain the same semantics that iptables provides. This new flag should only be used for deletion requests. Note this new flag value overlaps with the existing: * NLM_F_ROOT for get requests. * NLM_F_REPLACE for new requests. However, those flags should not ever be used in deletion requests. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netlink.h | 3 +++ 1 file changed, 3 insertions(+) commit 4035285fe07d82ee78e314022541e619463aa408 Author: Pablo Neira Ayuso Date: Sun Sep 3 23:54:28 2017 +0200 netfilter: nf_tables: add nf_tables_addchain() Wrap the chain addition path in a function to make it more maintainable. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 199 ++++++++++++++++++++++-------------------- 1 file changed, 106 insertions(+), 93 deletions(-) commit 2c4a488a482d265df4505671f6051067524c4f76 Author: Pablo Neira Ayuso Date: Sun Sep 3 23:54:27 2017 +0200 netfilter: nf_tables: add nf_tables_updchain() nf_tables_newchain() is too large, wrap the chain update path in a function to make it more maintainable. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 170 +++++++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 78 deletions(-) commit 284b4c9289766c6294d4c6292aea565f78215b0e Author: Wang YanQing Date: Mon Sep 4 23:17:09 2017 +0800 ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe When hda_codec_driver_probe meet error and return failure, we need to free resource with patch_ops.free, or we will get resource leak. Signed-off-by: Wang YanQing Signed-off-by: Takashi Iwai sound/pci/hda/hda_bind.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit edeb8e4ccb79eaed4a5126945cce00489f09b849 Author: Fabio Estevam Date: Mon Sep 4 11:58:14 2017 -0300 ARM: imx: mx31moboard: Remove unused 'dma' variable Commit 2436bdcda53f ("dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags") missed to remove the 'dma' variable causing the following build warning: arch/arm/mach-imx/mach-mx31moboard.c:478:6: warning: unused variable 'dma' [-Wunused-variable] Remove the unused 'dma' variable. Signed-off-by: Fabio Estevam Signed-off-by: Christoph Hellwig arch/arm/mach-imx/mach-mx31moboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0081a0ce809b611c1f37da5d6ae5bc8027ffd1c4 Merge: fea1543 94edf6f Author: Linus Torvalds Date: Mon Sep 4 08:13:52 2017 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnad: "The main RCU related changes in this cycle were: - Removal of spin_unlock_wait() - SRCU updates - RCU torture-test updates - RCU Documentation updates - Extend the sys_membarrier() ABI with the MEMBARRIER_CMD_PRIVATE_EXPEDITED variant - Miscellaneous RCU fixes - CPU-hotplug fixes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (63 commits) arch: Remove spin_unlock_wait() arch-specific definitions locking: Remove spin_unlock_wait() generic definitions drivers/ata: Replace spin_unlock_wait() with lock/unlock pair ipc: Replace spin_unlock_wait() with lock/unlock pair exit: Replace spin_unlock_wait() with lock/unlock pair completion: Replace spin_unlock_wait() with lock/unlock pair doc: Set down RCU's scheduling-clock-interrupt needs doc: No longer allowed to use rcu_dereference on non-pointers doc: Add RCU files to docbook-generation files doc: Update memory-barriers.txt for read-to-write dependencies doc: Update RCU documentation membarrier: Provide expedited private command rcu: Remove exports from rcu_idle_exit() and rcu_idle_enter() rcu: Add warning to rcu_idle_enter() for irqs enabled rcu: Make rcu_idle_enter() rely on callers disabling irqs rcu: Add assertions verifying blocked-tasks list rcu/tracing: Set disable_rcu_irq_enter on rcu_eqs_exit() rcu: Add TPS() protection for _rcu_barrier_trace strings rcu: Use idle versions of swait to make idle-hack clear swait: Add idle variants which don't contribute to load average ... commit fea1543760351e10e9c573ddf8861c2f23f5b866 Merge: 81a84ad caba4cb Author: Linus Torvalds Date: Mon Sep 4 08:11:52 2017 -0700 Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects fix from Ingo Molnar: "A single commit making debugobjects interact better with kmemleak" * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Make kmemleak ignore debug objects commit ecb478bf866b8450c724958815e8d46b97c1b113 Merge: 2dcfd28 9a6b947 Author: Mark Brown Date: Mon Sep 4 15:51:34 2017 +0100 Merge remote-tracking branch 'spi/topic/xlp' into spi-next commit 2dcfd2814baf506207bb0be837ecd6a5f6830e16 Merge: 17c49e5 61a8dec d5e9a4a 36bc749 e60dfe0 e9d4650 Author: Mark Brown Date: Mon Sep 4 15:51:30 2017 +0100 Merge remote-tracking branches 'spi/topic/sh-msiof', 'spi/topic/stm32', 'spi/topic/sunxi', 'spi/topic/tegra' and 'spi/topic/tools' into spi-next commit 17c49e53f3fd6f6bd620e0bea2ff934d88629983 Merge: 817ef6e 128345b c18d925 88a1981 04b37d2 345fef7 Author: Mark Brown Date: Mon Sep 4 15:51:26 2017 +0100 Merge remote-tracking branches 'spi/topic/pxa', 'spi/topic/pxa2xx', 'spi/topic/qup', 'spi/topic/rockchip' and 'spi/topic/sh' into spi-next commit 817ef6e685ab367d155a983210fb0ccc1b5aa3f8 Merge: a3a4246 602c8f4 8bc85a8 b590782 808f515 5b8d5ad Author: Mark Brown Date: Mon Sep 4 15:51:22 2017 +0100 Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/loopback', 'spi/topic/omap', 'spi/topic/pic32' and 'spi/topic/pl022' into spi-next commit a3a424602aab9a2d3527463f94b2472235d62ff1 Merge: 45cfc32 8027408 25c56c8 d9a0177 1a41aa1 Author: Mark Brown Date: Mon Sep 4 15:51:18 2017 +0100 Merge remote-tracking branches 'spi/topic/cadence', 'spi/topic/dt', 'spi/topic/ep93xx' and 'spi/topic/falcon' into spi-next commit 45cfc32ba4f22f7bfa3fed699c6bc6ee32b13420 Merge: 0d1a619 b64836a da470d6 054e532 378da4a c3c25ea7 Author: Mark Brown Date: Mon Sep 4 15:51:14 2017 +0100 Merge remote-tracking branches 'spi/topic/altera', 'spi/topic/at79', 'spi/topic/bcm-qspi', 'spi/topic/bcm63xx' and 'spi/topic/bcm63xx-hspi' into spi-next commit 0d1a619d921707887893317d4e711808b1dec432 Merge: 569dbb8 9a9a047 Author: Mark Brown Date: Mon Sep 4 15:51:13 2017 +0100 Merge remote-tracking branch 'spi/topic/core' into spi-next commit 7051334672e54fae67e02d5d3296fb62b3343be7 Author: Takashi Iwai Date: Mon Sep 4 15:54:48 2017 +0200 ASoC: cs43130: Fix unused compiler warnings for PM runtime Add __maybe_unused prefix for addressing the following warnings: sound/soc/codecs/cs43130.c:2615:12: warning: ‘cs43130_runtime_resume’ defined but not used [-Wunused-function] sound/soc/codecs/cs43130.c:2596:12: warning: ‘cs43130_runtime_suspend’ defined but not used [-Wunused-function] Fixes: 8f1e5bf9b440 ("ASoC: cs43130: Add support for CS43130 codec") Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cs43130.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f31877a16b0926dea4d1d9b72917a3eca9be19b6 Author: Takashi Iwai Date: Mon Sep 4 15:54:47 2017 +0200 ASoC: cs43130: Fix possible Oops with invalid dev_id As compiler spotted out, there is the potential NULL-dereference in the code when dc-measure OF is given for other than 43130/43131: sound/soc/codecs/cs43130.c:2089:18: warning: ‘hpload_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] Warn it and return before triggering Oops. Fixes: 8f1e5bf9b440 ("ASoC: cs43130: Add support for CS43130 codec") Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cs43130.c | 4 ++++ 1 file changed, 4 insertions(+) commit 191a3980c6161d40c32e69273e0567615be17001 Author: Miklos Szeredi Date: Mon Sep 4 16:44:42 2017 +0200 ovl: cleanup d_real for negative d_real() is never called with a negative dentry. So remove the d_is_negative() check (which would never trigger anyway, since d_is_reg() returns false for a negative dentry). Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 3 --- 1 file changed, 3 deletions(-) commit d3e329b3156699bd85d1aa7a5f792cd38d6a5fd3 Author: Gustavo A. R. Silva Date: Mon Sep 4 16:00:50 2017 +0200 video: fbdev: sis: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1226761 Signed-off-by: Gustavo A. R. Silva Cc: Thomas Winischhofer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sis/init301.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit a7582733ef7fa80d8e8a53717e73cf83b6f2152e Author: Bhumika Goyal Date: Mon Sep 4 16:00:50 2017 +0200 video: fbdev: make fb_var_screeninfo const Make these const as they are not modified anywhere. Signed-off-by: Bhumika Goyal Cc: Julia Lawall Cc: Guan Xuetao Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fb-puv3.c | 2 +- drivers/video/fbdev/maxinefb.c | 2 +- drivers/video/fbdev/pmag-aa-fb.c | 2 +- drivers/video/fbdev/pmag-ba-fb.c | 2 +- drivers/video/fbdev/pmagb-b-fb.c | 2 +- drivers/video/fbdev/pvr2fb.c | 2 +- drivers/video/fbdev/q40fb.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 8e75f7a7a00461ef6d91797a60b606367f6e344d Author: Vladis Dronov Date: Mon Sep 4 16:00:50 2017 +0200 video: fbdev: aty: do not leak uninitialized padding in clk to userspace 'clk' is copied to a userland with padding byte(s) after 'vclk_post_div' field unitialized, leaking data from the stack. Fix this ensuring all of 'clk' is initialized to zero. References: https://github.com/torvalds/linux/pull/441 Reported-by: sohu0106 Signed-off-by: Vladis Dronov Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/atyfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9a58de545858ac9ee67745cdea6d94cc322938e Author: Jan H. Schönherr Date: Mon Sep 4 16:00:50 2017 +0200 vgacon: Prevent faulty bootparams.screeninfo from causing harm If a zero for the number of colums or rows manages to slip through, gotoxy() will underflow vc->vc_pos, causing the next action on the referenced memory to end with a page fault. Make the check in vgacon_startup() more pessimistic to prevent that. Signed-off-by: Jan H. Schönherr Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/vgacon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 58ec01cebafd4b9fc039c12c744013e9c71ec802 Author: Bhumika Goyal Date: Mon Sep 4 16:00:49 2017 +0200 video: fbdev: make fb_videomode const Make these const as they are only passed to a const argument of the function fb_find_mode. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct fb_videomode s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ identifier match.s; expression list[5] es; position ref.p; @@ fb_find_mode(es,&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 fb_videomode s; Signed-off-by: Bhumika Goyal Cc: Julia Lawall Cc: Paul Mackerras Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/aty128fb.c | 2 +- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/cyber2000fb.c | 2 +- drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- drivers/video/fbdev/sm501fb.c | 2 +- drivers/video/fbdev/vermilion/vermilion.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 52a962ee1ca4dca721d44fe59aca1faea9f418cf Author: Hans de Goede Date: Mon Sep 4 16:00:49 2017 +0200 video/console: Add new BIOS date for GPD pocket to dmi quirk table GPD has released a new BIOS for the pocket, update the dmi data accordingly. Signed-off-by: Hans de Goede [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbcon_dmi_quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 176780c7d2fab4ac7b46f217e20db0ce533f27f4 Author: David Lechner Date: Mon Sep 4 16:00:49 2017 +0200 fbcon: remove restriction on margin color This removes the restriction on the value range of the fbcon=margin: parameter. The color value really depends on the driver being used. Signed-off-by: David Lechner Cc: Geert Uytterhoeven [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz Documentation/fb/fbcon.txt | 2 +- drivers/video/fbdev/core/fbcon.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit bf4392bac1f559397285b3c285b85dd0330f3d43 Author: Arvind Yadav Date: Mon Sep 4 16:00:49 2017 +0200 video: ARM CLCD: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46524b1404a6b5d7de3eb23078d796bfb58aaf60 Author: Arvind Yadav Date: Mon Sep 4 16:00:49 2017 +0200 video: fm2fb: constify zorro_device_id zorro_device_id are not supposed to change at runtime. All functions working with zorro_device_id provided by work with const zorro_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/fm2fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 799b88deec3fc4cd20165549a8cfcca94cbef98c Author: Bhumika Goyal Date: Mon Sep 4 16:00:49 2017 +0200 video: fbdev: annotate fb_fix_screeninfo with const and __initconst Make these const as they are only used during a copy operation. Some structures are used as a copy operation inside __init functions, so make them const and replace __initdata with __initconst to avoid section conflict error. Signed-off-by: Bhumika Goyal Cc: Julia Lawall Cc: Nicolas Ferre Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/68328fb.c | 2 +- drivers/video/fbdev/atmel_lcdfb.c | 2 +- drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/grvga.c | 2 +- drivers/video/fbdev/pmag-aa-fb.c | 2 +- drivers/video/fbdev/pmag-ba-fb.c | 2 +- drivers/video/fbdev/pmagb-b-fb.c | 2 +- drivers/video/fbdev/ps3fb.c | 2 +- drivers/video/fbdev/skeletonfb.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit f0b638a7f6dba2eb6bf99fc648eab77f7ad5e59f Author: Fabrice Gasnier Date: Mon Aug 28 12:04:14 2017 +0200 iio: adc: stm32: add support for lptimer triggers STM32 ADC supports hardware triggers like STM32 Low-Power Timer. For instance, STM32H7 ADC may be triggered by instances 1, 2 or 3. Add hardware triggered mode so Low-Power Timer Trigger driver can validate device. Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron Signed-off-by: Lee Jones drivers/iio/adc/stm32-adc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d8958824cf0714cc4ddcf320cf12028277ad55c4 Author: Fabrice Gasnier Date: Mon Aug 28 12:04:13 2017 +0200 iio: counter: Add support for STM32 LPTimer Add support for STM32 Low-Power Timer, that can be used as counter or quadrature encoder. Signed-off-by: Fabrice Gasnier Reviewed-by: Jonathan Cameron Signed-off-by: Lee Jones .../ABI/testing/sysfs-bus-iio-lptimer-stm32 | 57 +++ drivers/iio/counter/Kconfig | 9 + drivers/iio/counter/Makefile | 1 + drivers/iio/counter/stm32-lptimer-cnt.c | 383 +++++++++++++++++++++ 4 files changed, 450 insertions(+) commit 717e6922de754c3aa5da5a1e417683cc899efe1c Author: Fabrice Gasnier Date: Mon Aug 28 12:04:12 2017 +0200 dt-bindings: iio: Add STM32 LPTimer quadrature encoder and counter Add documentation for STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter binding. Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Lee Jones .../bindings/iio/counter/stm32-lptimer-cnt.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b01ced2b504b2592af6703533c62cb9d1cdc1c6c Author: Fabrice Gasnier Date: Mon Aug 28 12:04:11 2017 +0200 iio: trigger: Add STM32 LPTimer trigger driver Add support for LPTIMx_OUT triggers that can be found on some STM32 devices. These triggers can be used then by ADC or DAC. Typical usage is to configure LPTimer as PWM output (via pwm-stm32-lp) and have synchronised analog conversions with these triggers. Signed-off-by: Fabrice Gasnier Reviewed-by: Jonathan Cameron Signed-off-by: Lee Jones drivers/iio/trigger/Kconfig | 11 +++ drivers/iio/trigger/Makefile | 1 + drivers/iio/trigger/stm32-lptimer-trigger.c | 118 ++++++++++++++++++++++++++ include/linux/iio/timer/stm32-lptim-trigger.h | 27 ++++++ 4 files changed, 157 insertions(+) commit 5dae3c90fe76f18815945177498e680e711a4347 Author: Fabrice Gasnier Date: Mon Aug 28 12:04:10 2017 +0200 dt-bindings: iio: Add STM32 LPTimer trigger binding Add documentation for STMicroelectronics STM32 Low-Power Timer Trigger binding. Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Lee Jones .../bindings/iio/timer/stm32-lptimer-trigger.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit efd11ad164bf78c2ac1d9d8c27257bbdba494388 Author: Fabrice Gasnier Date: Mon Aug 28 12:04:08 2017 +0200 dt-bindings: pwm: Add STM32 LPTimer PWM binding Add documentation for STMicroelectronics STM32 Low-Power Timer PWM binding. Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/pwm/pwm-stm32-lp.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e70a540b4e023045a85529edbd04da73a0c72a12 Author: Fabrice Gasnier Date: Mon Aug 28 12:04:09 2017 +0200 pwm: Add STM32 LPTimer PWM driver Add support for single PWM channel on Low-Power Timer, that can be found on some STM32 platforms. Signed-off-by: Fabrice Gasnier Acked-by: Thierry Reding Signed-off-by: Lee Jones drivers/pwm/Kconfig | 10 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-stm32-lp.c | 246 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+) commit e8924005b4e7964313536547d4b73406330be26d Author: Fabrice Gasnier Date: Mon Aug 28 12:04:07 2017 +0200 mfd: Add STM32 LPTimer driver STM32 Low-Power Timer hardware block can be used for: - PWM generation - IIO trigger (in sync with PWM) - IIO quadrature encoder counter PWM and IIO timer configuration are mixed in the same registers so we need a multi fonction driver to be able to share those registers. Signed-off-by: Fabrice Gasnier Signed-off-by: Lee Jones drivers/mfd/Kconfig | 14 +++++ drivers/mfd/Makefile | 1 + drivers/mfd/stm32-lptimer.c | 107 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/stm32-lptimer.h | 62 ++++++++++++++++++++++ 4 files changed, 184 insertions(+) commit a7a0db07e9ffd55278b080b0a8e466853075f2c7 Author: Fabrice Gasnier Date: Mon Aug 28 12:04:06 2017 +0200 dt-bindings: mfd: Add STM32 LPTimer binding Add documentation for STMicroelectronics STM32 Low-Power Timer binding. Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/stm32-lptimer.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit a205425658dead19bb1b8ac00584aed98e60dde2 Author: Wolfram Sang Date: Mon Aug 14 18:34:24 2017 +0200 mfd: twl: Move header file out of I2C realm include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang Acked-by: Greg Kroah-Hartman Acked-by: Alexandre Belloni Acked-by: Mark Brown Acked-by: Sebastian Reichel Acked-by: Jonathan Cameron Acked-by: Dmitry Torokhov Acked-by: Kishon Vijay Abraham I Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Thierry Reding Acked-by: Tony Lindgren Acked-by: Daniel Thompson Acked-by: Linus Walleij Acked-by: Guenter Roeck Signed-off-by: Lee Jones arch/arm/mach-omap2/common.h | 2 +- arch/arm/mach-omap2/omap_twl.c | 2 +- drivers/gpio/gpio-twl4030.c | 2 +- drivers/iio/adc/twl4030-madc.c | 2 +- drivers/iio/adc/twl6030-gpadc.c | 2 +- drivers/input/keyboard/twl4030_keypad.c | 2 +- drivers/input/misc/twl4030-pwrbutton.c | 2 +- drivers/input/misc/twl4030-vibra.c | 2 +- drivers/mfd/twl-core.c | 6 +- drivers/mfd/twl4030-audio.c | 2 +- drivers/mfd/twl4030-irq.c | 2 +- drivers/mfd/twl4030-power.c | 2 +- drivers/mfd/twl6030-irq.c | 2 +- drivers/phy/ti/phy-twl4030-usb.c | 2 +- drivers/power/supply/twl4030_charger.c | 2 +- drivers/pwm/pwm-twl-led.c | 2 +- drivers/pwm/pwm-twl.c | 2 +- drivers/regulator/twl-regulator.c | 2 +- drivers/regulator/twl6030-regulator.c | 2 +- drivers/rtc/rtc-twl.c | 2 +- drivers/usb/phy/phy-twl6030-usb.c | 2 +- drivers/video/backlight/pandora_bl.c | 2 +- drivers/watchdog/twl4030_wdt.c | 2 +- include/linux/i2c/twl.h | 876 -------------------------------- include/linux/mfd/twl.h | 876 ++++++++++++++++++++++++++++++++ sound/soc/codecs/twl4030.c | 2 +- 26 files changed, 902 insertions(+), 902 deletions(-) commit b06898d119f6b8dba7b318ad73558ce2d39161e8 Merge: b24a5f2 f5fd4a6 Author: Takashi Iwai Date: Mon Sep 4 14:50:49 2017 +0200 Merge tag 'asoc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.14 This is quite a large release by volume of patches and diff, a lot of that is mechanical cleanup patches but it's great to also see a range of vendors actively working on adding new features and fixing issues in their drivers. Intel and Realtek have been especially active here. - Continued work towards moving everything to the component model from Morimoto-san. - Use of devres for jack detection GPIOs, eliminating some potential resource leaks. - Jack detection support for Qualcomm MSM8916. - Support for Allwinner H3, Cirrus Logic CS43130, Intel Kabylake systems with RT5663, Realtek RT274, TI TLV320AIC32x6 and Wolfson WM8523. commit 83ef26ac1326fdd2fc8d160967cdca2e8b46ccd4 Author: Colin Ian King Date: Mon Sep 4 11:12:32 2017 +0100 ASoC: cs43130: fix spelling mistake: "irq_occurrance" -> "irq_occurrence" Trivial fix to spelling mistake in variable name Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/cs43130.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2b6639d4c794749d5fe7f071e7c66e0a9a12cc84 Author: Martin Blumenstingl Date: Sun Aug 20 00:18:13 2017 +0200 MIPS: lantiq: Enable MFD_SYSCON to be able to use it for the RCU MFD Signed-off-by: Martin Blumenstingl Signed-off-by: Hauke Mehrtens Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17120/ Signed-off-by: Ralf Baechle arch/mips/lantiq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1814809edc7c7e22b14296ce8219db46dbf0639f Author: Hauke Mehrtens Date: Sun Aug 20 00:18:12 2017 +0200 watchdog: lantiq: add device tree binding documentation The binding was not documented before, add the documentation now. Signed-off-by: Hauke Mehrtens Acked-by: Rob Herring Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17119/ Signed-off-by: Ralf Baechle .../devicetree/bindings/watchdog/lantiq-wdt.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 710322ba8cc6c1ce98779ee02e1fdb6571700c47 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:11 2017 +0200 watchdog: lantiq: access boot cause register through regmap This patch avoids accessing the function ltq_reset_cause() and directly accesses the register given over the syscon interface. The syscon interface will be implemented for the xway SoCs for the falcon SoCs the ltq_reset_cause() function never worked, because a wrong offset was used. Signed-off-by: Hauke Mehrtens Acked-by: Guenter Roeck Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17123/ Signed-off-by: Ralf Baechle drivers/watchdog/lantiq_wdt.c | 74 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 5 deletions(-) commit 3147f448f7cf97c3ec5320870f99dca520e824f2 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:09 2017 +0200 mtd: lantiq-flash: drop check of boot select Do not check which flash type the SoC was booted from before using this driver. Assume that the device tree is correct and use this driver when it was added to device tree. This also removes a build dependency to the SoC code. Signed-off-by: Hauke Mehrtens Acked-by: Brian Norris Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17117/ Signed-off-by: Ralf Baechle drivers/mtd/maps/lantiq-flash.c | 6 ------ 1 file changed, 6 deletions(-) commit d0fd35c6cca79646b9a7bc440cc02839561fc30a Author: Martin Blumenstingl Date: Sun Aug 20 00:18:08 2017 +0200 MIPS: lantiq: Use of_platform_default_populate instead of __dt_register_buses This allows populating syscon devices which are using "simple-mfd" instead of "simple-bus". Signed-off-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17116/ Signed-off-by: Ralf Baechle arch/mips/lantiq/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f15a6483111843859450e07ec34333d3d6e5adc Author: Paul Burton Date: Sat Aug 12 21:36:46 2017 -0700 irqchip: mips-gic: Let the core set struct irq_common_data affinity gic_set_affinity() manually copies the provided cpumask to the struct irq_common_data affinity field, returning IRQ_SET_MASK_OK_NOCOPY in order to prevent the core code from doing that. We can instead simply let the core code do it for us, by returning IRQ_SET_MASK_OK instead of IRQ_SET_MASK_OK_NOCOPY & doing the copy ourselves. [ralf@linux-mips.org: Resolve merge conflict.] Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17056/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 07df8bfef8ce9536f93c957488a48d9d87d575c2 Author: Paul Burton Date: Fri Aug 18 14:04:35 2017 -0700 irqchip: mips-gic: Use cpumask_first_and() in gic_set_affinity() Currently in gic_set_affinity() we calculate a temporary cpumask holding the intersection of the provided cpumask & the CPUs that are online, then we call cpumask_first twice on it to find the first such CPU. Since we don't need the temporary cpumask for anything else & we only care about the first CPU that's both online & in the provided cpumask, we can instead use cpumask_first_and to find that CPU & drop the temporary mask. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17110/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b2b2e584ceabeddbc5ea1965ca6ca435726f5de0 Author: Paul Burton Date: Sat Aug 12 21:36:44 2017 -0700 irqchip: mips-gic: Clean up mti, reserved-cpu-vectors handling When parsing mti,reserved-cpu-vectors we generate a mask of all bits that have been declared reserved, the loop through starting from bit 2 to find one that isn't reserved (ie. is zero). This patch accomplishes the same task more simply by: - Inititialising the reserved mask to 0x3 (ie. the 2 software interrupts). This means we don't need to skip them later as the loop previously has. - Replacing the loop checking for zero bits with find_first_zero_bit, which fits our needs now that the 2 software interrupts are marked reserved. This requires that the type of reserved is changed to unsigned long so that it's suitable for use with bitmap functions. - Replacing the magic number 8 with the hamming weight of the ST0_IM field - ie. the number of bits that a MIPS CPU has for interrupt inputs. This is still a compile-time constant 8, but makes it clearer why it's 8. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17054/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7778c4b27cbe0e24dc016477ec60d63b272f7ea2 Author: Paul Burton Date: Fri Aug 18 14:02:21 2017 -0700 irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK* This patch avoids the need to read the GIC_SH_MASK* registers when decoding shared interrupts by setting & clearing the interrupt's bit in the appropriate CPU's pcpu_masks entry when masking or unmasking the interrupt. This effectively means that whilst an interrupt is masked we clear its bit in all pcpu_masks, which causes gic_handle_shared_int() to ignore it on all CPUs without needing to check GIC_SH_MASK*. In essence, we add a little overhead to masking or unmasking interrupts but in return reduce the overhead of the far more common task of decoding interrupts. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17109/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 52 +++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit aa493737d8e2b7d4393a94479eec63381f842daa Author: Paul Burton Date: Sat Aug 12 21:36:42 2017 -0700 irqchip: mips-gic: Make pcpu_masks a per-cpu variable Define the pcpu_masks variable using the kernel's standard per-cpu variable support, rather than an open-coded array of structs containing bitmaps. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17052/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 87888bcbe4abfe5a755223d10e3086f5951017c6 Author: Paul Burton Date: Sat Aug 12 21:36:41 2017 -0700 irqchip: mips-gic: Inline gic_basic_init() gic_basic_init() is now a fairly short function that is only called in one place. Inline it into gic_of_init() to help readability. [ralf@linux-mips.org: Resolved conflict.] Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17051/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 46 +++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) commit fbea754123ae5d9678295398c98e91f1b2159e5b Author: Paul Burton Date: Sat Aug 12 21:36:40 2017 -0700 irqchip: mips-gic: Inline __gic_init() The __gic_init() function is only called from gic_of_init() now that the non-DT path has been removed. In order to simplify the code & aid readability, fold __gic_init() into gic_of_init(). This provides us with the ability to return an error code, which __gic_init() was previously unable to do. As such the irq_domain_add_*() error paths are modified to print & return an error rather than panic(). [ralf@linux-mips.org: Resoled reject.] Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17050/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 115 ++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 60 deletions(-) commit 1fad12cd5ef43755d028f760fa089c87f5533451 Author: Paul Burton Date: Sat Aug 12 21:36:39 2017 -0700 irqchip: mips-gic: Remove linux/irqchip/mips-gic.h The linux/irqchip/mips-gic.h header is no longer used. Remove it. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17049/ Signed-off-by: Ralf Baechle include/linux/irqchip/mips-gic.h | 14 -------------- 1 file changed, 14 deletions(-) commit 3f1770c0e687c6009f4476bf529528568835f45c Author: Paul Burton Date: Sat Aug 12 21:36:38 2017 -0700 MIPS: Remove unnecessary inclusions of linux/irqchip/mips-gic.h linux/irqchip/mips-gic.h is included in a few files that don't actually use it at all. Remove these unnecessary inclusions in preparation for removing the header. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17048/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cmp.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/pistachio/irq.c | 1 - 3 files changed, 3 deletions(-) commit 16ae123e89d603a69d980bd76c4bb686f219ba0e Author: Paul Burton Date: Sat Aug 12 21:36:37 2017 -0700 MIPS: VDSO: Avoid use of linux/irqchip/mips-gic.h Our VDSO code makes use of macros from linux/irqchip/mips-gic.h to provide offsets to register values, but these are trivial offsets to the two 32 bit halves of a 64 bit value. Replace use of the macros with zero (ie. omit adding an offset) and the size of the low 32 bit of the value. This removes our need for linux/irqchip/mips-gic.h & prepares us for it to be removed. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17047/ Signed-off-by: Ralf Baechle arch/mips/vdso/gettimeofday.c | 7 +++---- include/linux/irqchip/mips-gic.h | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) commit dd0163508c07a67b28befe5af23d7ab9941ae8ca Author: Paul Burton Date: Sat Aug 12 21:36:36 2017 -0700 irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h The linux/irqchip/mips-gic.h header is now almost empty. Move the declarations of gic_get_c0_compare_int(), gic_get_c0_perfcount_int() & gic_get_c0_fdc_int() to asm/mips-gic.h in order to close in on being able to delete the former header. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17046/ Signed-off-by: Ralf Baechle arch/mips/generic/irq.c | 1 - arch/mips/include/asm/mips-gic.h | 30 ++++++++++++++++++++++++++++++ arch/mips/mti-malta/malta-time.c | 1 - arch/mips/pistachio/time.c | 2 +- arch/mips/ralink/irq-gic.c | 2 +- drivers/irqchip/irq-mips-gic.c | 1 - include/linux/irqchip/mips-gic.h | 8 -------- 7 files changed, 32 insertions(+), 13 deletions(-) commit 56d7b61dc6d4e13cef786c8e4a2bfe43e4db932d Author: Paul Burton Date: Sat Aug 12 21:36:35 2017 -0700 irqchip: mips-gic: Remove gic_present Nothing uses the global gic_present variable anymore; mips_gic_present() should be used instead. Remove the dead code. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17045/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 2 -- include/linux/irqchip/mips-gic.h | 6 ------ 2 files changed, 8 deletions(-) commit 72eb29951f98f612ba5a5bb8c58c87eaf8fb7351 Author: Paul Burton Date: Sat Aug 12 21:36:34 2017 -0700 MIPS: Use mips_gic_present() in place of gic_present In preparation for removing the gic_present global variable, switch to using the mips_gic_present() function instead. For the most part this is a straightforward substitution. In cases which previously wrapped the GIC case in an #ifdef CONFIG_MIPS_GIC that #ifdef has been removed, since mips_gic_present() will return a compile-time constant false allowing the affected code to be optimised out anyway. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17044/ Signed-off-by: Ralf Baechle arch/mips/generic/irq.c | 7 ++++--- arch/mips/kernel/smp-mt.c | 6 ++---- arch/mips/lantiq/irq.c | 4 ---- arch/mips/mti-malta/malta-int.c | 4 ++-- arch/mips/mti-malta/malta-time.c | 19 +++++++++---------- 5 files changed, 17 insertions(+), 23 deletions(-) commit 85eec73ce4c4322b3b442b9582f6656abb5d125f Author: Paul Burton Date: Sat Aug 12 21:36:33 2017 -0700 irqchip: mips-gic: Remove gic_init() All in-tree platforms now probe the GIC driver using device tree, and as such nothing calls gic_init() any longer. Remove the dead code. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17043/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 7 ------- include/linux/irqchip/mips-gic.h | 3 --- 2 files changed, 10 deletions(-) commit 75c1b2fca25f7d7617cfddd3e53f82bca1e17bbb Author: Paul Burton Date: Sat Aug 12 21:36:32 2017 -0700 irqchip: mips-gic: Remove __gic_irq_dispatch() forward declaration We provide a forward declaration of the __gic_irq_dispatch() function for no apparent reason. Remove it. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17042/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 2 -- 1 file changed, 2 deletions(-) commit 84103814a2cfd3561ff00bd7317c22f40f9e0dad Author: Paul Burton Date: Sat Aug 12 21:36:31 2017 -0700 irqchip: mips-gic: Remove gic_get_usm_range() The MIPS VDSO code is no longer reliant upon the irqchip driver to provide the address of the GIC's user-visible section via gic_get_usm_range(). Remove the now-dead code. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17041/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 14 -------------- include/linux/irqchip/mips-gic.h | 11 ----------- 2 files changed, 25 deletions(-) commit 00578cd864d45ae4b8fa3f684f8d6f783dd8d15d Author: Paul Burton Date: Sat Aug 12 21:36:30 2017 -0700 MIPS: VDSO: Drop gic_get_usm_range() usage We don't really need gic_get_usm_range() to abstract discovery of the address of the GIC user-visible section now that we have access to its base address globally. Switch to calculating it ourselves, which will allow us to stop requiring the irqchip driver to care about a counter exposed to userland for use via the VDSO. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17040/ Signed-off-by: Ralf Baechle arch/mips/kernel/vdso.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit b11d4c1f5a3ac68fa163b0daeca1f98ba328c9de Author: Paul Burton Date: Sat Aug 12 21:36:29 2017 -0700 irqchip: mips-gic: Move various definitions to the driver Move the definitions of macros used to convert between hardware IRQ numbers & shared or local interrupt numbers into the irqchip driver, which is all that should ever need to care about them. Remove GIC_CPU_TO_VEC_OFFSET() in the process since it's never used. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17039/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-boards/maltaint.h | 5 ----- drivers/irqchip/irq-mips-gic.c | 16 ++++++++++++++++ include/linux/irqchip/mips-gic.h | 19 ------------------- 3 files changed, 16 insertions(+), 24 deletions(-) commit 3ee50dcbef374651056ea42d5eb543bbacb3ff41 Author: Paul Burton Date: Sat Aug 12 21:36:28 2017 -0700 irqchip: mips-gic: Remove GIC_CPU_INT* macros The GIC_CPU_INT* macros are never used. Remove the dead code. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17038/ Signed-off-by: Ralf Baechle include/linux/irqchip/mips-gic.h | 8 -------- 1 file changed, 8 deletions(-) commit ba9cc4352e9c40ab3b158620a1bd9cd53295ea17 Author: Paul Burton Date: Sat Aug 12 21:36:27 2017 -0700 MIPS: GIC: Move GIC_LOCAL_INT_* to asm/mips-gic.h Move the definition of VP-local interrupts provided by the MIPS Global Interrupt Controller to the new asm/mips-gic.h header to be alongside the new accessor functions. Whilst at it, convert to an enum which lends itself more easily to expansion & documentation. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17037/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-gic.h | 24 ++++++++++++++++++++++++ include/linux/irqchip/mips-gic.h | 10 ---------- 2 files changed, 24 insertions(+), 10 deletions(-) commit 0d0cf58cd6814ed63deb67fc5f4c27ad725075b1 Author: Paul Burton Date: Sat Aug 12 21:36:26 2017 -0700 irqchip: mips-gic: Convert remaining local reg access to new accessors Convert the remaining accesses to registers in the GIC VP-local & VP-other register blocks to use the new accessor functions provided by asm/mips-gic.h, resulting in code which is often shorter & easier to read. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17036/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 68 +++++++--------------------------------- include/linux/irqchip/mips-gic.h | 44 -------------------------- 2 files changed, 12 insertions(+), 100 deletions(-) commit 9da3c64589e4eae68631b1b5ed31c586be6ad923 Author: Paul Burton Date: Sat Aug 12 21:36:25 2017 -0700 irqchip: mips-gic: Convert local int mask access to new accessors Use the new accessor functions provided by asm/mips-gic.h to access masks controlling local interrupts, resulting in code which is often shorter & easier to read. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17035/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 14 +++++------ include/linux/irqchip/mips-gic.h | 52 ---------------------------------------- 2 files changed, 7 insertions(+), 59 deletions(-) commit 3680746abd87e733ec836025115580562b3dcb47 Author: Paul Burton Date: Sat Aug 12 21:36:24 2017 -0700 irqchip: mips-gic: Convert remaining shared reg access to new accessors Convert the remaining accesses to registers in the GIC shared register block to use the new accessor functions provided by asm/mips-gic.h, resulting in code which is often shorter & easier to read. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17034/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 16 ++++++++-------- include/linux/irqchip/mips-gic.h | 20 -------------------- 2 files changed, 8 insertions(+), 28 deletions(-) commit 0efe3cbf1504309bf088f74eb627d0987f67e934 Author: Paul Burton Date: Sat Aug 12 21:36:23 2017 -0700 irqchip: mips-gic: Remove gic_map_to_vpe() Remove the gic_map_to_vpe() function in favour of using the new write_gic_map_vp() accessor function which isn't any more complex to use & allows us to drop a level of abstraction. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17033/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 11 ++--------- include/linux/irqchip/mips-gic.h | 6 ------ 2 files changed, 2 insertions(+), 15 deletions(-) commit d3e8cf44792d60047ba45036abfc38ab414e49e5 Author: Paul Burton Date: Sat Aug 12 21:36:22 2017 -0700 irqchip: mips-gic: Remove gic_map_to_pin() Remove the gic_map_to_pin() function in favour of using the new write_gic_map_pin() accessor function which isn't any more complex to use & allows us to drop a level of abstraction. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17032/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 8 +------- include/linux/irqchip/mips-gic.h | 10 ---------- 2 files changed, 1 insertion(+), 17 deletions(-) commit c26ba670cdb84e0556436be7bf68a75a1d4f4d76 Author: Paul Burton Date: Sat Aug 12 21:36:21 2017 -0700 irqchip: mips-gic: Remove gic_set_dual_edge() Remove the gic_set_dual_edge() function in favour of using the new change_gic_dual() accessor function which provides equivalent functionality. This also allows us to remove the gic_update_bits() function which gic_set_dual_edge() was the last user of, along with the GIC_INTR_OFS() & GIC_INTR_BIT() macros. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17031/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 28 +++++----------------------- include/linux/irqchip/mips-gic.h | 17 ----------------- 2 files changed, 5 insertions(+), 40 deletions(-) commit 471aa962a6acc19a990e20fa3846db40e62120cc Author: Paul Burton Date: Sat Aug 12 21:36:20 2017 -0700 irqchip: mips-gic: Remove gic_set_trigger() Remove the gic_set_trigger() function in favour of using the new change_gic_trig() accessor function which provides equivalent functionality. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17030/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 19 ++++++------------- include/linux/irqchip/mips-gic.h | 5 ----- 2 files changed, 6 insertions(+), 18 deletions(-) commit 80e5f9c9e295b08c5c588083a4ad35e1e5f78731 Author: Paul Burton Date: Sat Aug 12 21:36:19 2017 -0700 irqchip: mips-gic: Remove gic_set_polarity() Remove the gic_set_polarity() function in favour of using the new change_gic_pol() accessor function which provides equivalent functionality. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17029/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 17 +++++------------ include/linux/irqchip/mips-gic.h | 5 ----- 2 files changed, 5 insertions(+), 17 deletions(-) commit 87554b0ef3884143563e090375269730780c6617 Author: Paul Burton Date: Sat Aug 12 21:36:18 2017 -0700 irqchip: mips-gic: Drop gic_(re)set_mask() functions The gic_set_mask() & gic_reset_mask() functions are now no more convenient to call than the write_gic_smask() or write_gic_rmask() accessor functions. Remove the layer of abstraction. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17028/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 18 +++--------------- include/linux/irqchip/mips-gic.h | 4 ---- 2 files changed, 3 insertions(+), 19 deletions(-) commit a0dc5cb5e31bdbcf1f1dddf62a62d06d6b82d53a Author: Paul Burton Date: Sat Aug 12 21:36:17 2017 -0700 irqchip: mips-gic: Simplify gic_local_irq_domain_map() Simplify gic_local_irq_domain_map() by: - Moving the check for invalid IRQs outside of the loop. - Moving the decision about whether to use gic_cpu_pin or timer_cpu_pin outside of the loop. - Using the new write_gic_vo_map() accessor function to avoid the need to handle each map register separately. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17027/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 57 +++++++++++----------------------------- include/linux/irqchip/mips-gic.h | 6 ----- 2 files changed, 16 insertions(+), 47 deletions(-) commit e98fcb2a8cc003c37c24713d2303667a8f624a30 Author: Paul Burton Date: Sat Aug 12 21:36:16 2017 -0700 irqchip: mips-gic: Simplify shared interrupt pending/mask reads Simplify the reads of the bitmaps indicating pending & masked interrupts in gic_handle_shared_int() using the __ioread32_copy() & __ioread64_copy() helper functions. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17026/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 29 +++++++++++------------------ include/linux/irqchip/mips-gic.h | 6 ------ 2 files changed, 11 insertions(+), 24 deletions(-) commit d8c825e2a05390efa4a5750c5c17e168139c1d48 Author: Paul Burton Date: Sat Aug 12 21:36:15 2017 -0700 MIPS: Add __ioread64_copy We currently have __ioread32_copy, __iowrite32_copy & __iowrite64_copy helpers in lib/iomap_copy.c. This patch adds __ioread64_copy to round out the set, allowing copies from I/O memory using 32 or 64 bit reads. [ralf@linux-mips.org: Changed to move all the code of this patch to be applied to arch/mips temporarily.] Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17025/ Signed-off-by: Ralf Baechle arch/mips/include/asm/io.h | 2 ++ arch/mips/lib/Makefile | 2 +- arch/mips/lib/iomap_copy.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) commit 9762d2e6d329a500dc6c07156e3c56aab3992471 Author: Paul Burton Date: Sat Aug 12 21:36:14 2017 -0700 irqchip: mips-gic: Remove gic_read_local_vp_id() Nothing needs gic_read_local_vp_id() any longer, so remove the dead code. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17024/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 8 -------- include/linux/irqchip/mips-gic.h | 17 ----------------- 2 files changed, 25 deletions(-) commit 37916178eea9b96ff539bce605fae9a8a8fbed34 Author: Paul Burton Date: Sat Aug 12 21:36:13 2017 -0700 MIPS: CPS: Read GIC_VL_IDENT directly, not via irqchip driver Rather than calling the gic_read_local_vp_id() function from the GIC irqchip driver, call read_gic_vl_ident() to read the GIC_VL_IDENT register directly. This will allow us to remove gic_read_local_vp_id() from the irqchip driver in a further patch, since that driver doesn't actually care about the register's value. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17023/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 095a7e388b5fbf8958686a90a04fe9387f6aa50b Author: Paul Burton Date: Sat Aug 12 21:36:12 2017 -0700 irqchip: mips-gic: Remove counter access functions The MIPS GIC clocksource driver is no longer using the accessor functions provided by the irqchip driver, so remove them. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17022/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 95 ---------------------------------------- include/linux/irqchip/mips-gic.h | 22 ---------- 2 files changed, 117 deletions(-) commit 9efdb14f76f4d7591cd4d7a436ebd716b19703b6 Author: Varsha Rao Date: Wed Aug 30 13:37:12 2017 +0530 net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT() macros. This patch removes CONFIG_NETFILTER_DEBUG and _ASSERT() macros as they are no longer required. Replace _ASSERT() macros with WARN_ON(). Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso arch/parisc/configs/c3000_defconfig | 1 - arch/sh/configs/se7751_defconfig | 1 - include/net/netfilter/nf_conntrack.h | 6 ------ net/Kconfig | 7 ------- net/bridge/netfilter/ebtables.c | 20 ++++++++------------ net/ipv4/netfilter/ip_tables.c | 12 +++--------- net/ipv6/netfilter/ip6_tables.c | 12 +++--------- 7 files changed, 14 insertions(+), 45 deletions(-) commit 44d6e2f27328b254111dd716fde45b3b59b8a4f7 Author: Varsha Rao Date: Wed Aug 30 13:37:11 2017 +0530 net: Replace NF_CT_ASSERT() with WARN_ON(). This patch removes NF_CT_ASSERT() and instead uses WARN_ON(). Signed-off-by: Varsha Rao include/net/netfilter/nf_conntrack.h | 2 +- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 6 +++--- net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 8 ++++---- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 2 +- net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 6 +++--- net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 4 ++-- net/netfilter/nf_conntrack_core.c | 11 +++++------ net/netfilter/nf_conntrack_expect.c | 4 ++-- net/netfilter/nf_conntrack_extend.c | 2 +- net/netfilter/nf_conntrack_standalone.c | 6 +++--- net/netfilter/nf_nat_core.c | 4 ++-- net/netfilter/nf_nat_redirect.c | 6 +++--- net/netfilter/xt_NETMAP.c | 8 ++++---- net/netfilter/xt_nat.c | 20 ++++++++++---------- 15 files changed, 45 insertions(+), 46 deletions(-) commit d1c1e39de8357d66163da39e893e38ea1410e8f8 Author: Florian Westphal Date: Tue Aug 29 12:04:10 2017 +0200 netfilter: remove unused hooknum arg from packet functions tested with allmodconfig build. Signed-off-by: Florian Westphal 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 | 6 ++---- net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_conntrack_proto_dccp.c | 2 +- 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 | 1 - net/netfilter/nf_conntrack_proto_udp.c | 1 - 10 files changed, 4 insertions(+), 13 deletions(-) commit a691205571723cb0544110ca91653ac4b0eb5b17 Author: Pablo M. Bermudo Garay Date: Wed Aug 23 22:41:25 2017 +0200 netfilter: nft_limit: add stateful object type Register a new limit stateful object type into the stateful object infrastructure. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 3 +- net/netfilter/nft_limit.c | 122 ++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 2 deletions(-) commit 6e323887565fe8a23c6c85faf9e395a24affd05c Author: Pablo M. Bermudo Garay Date: Wed Aug 23 22:41:24 2017 +0200 netfilter: nft_limit: replace pkt_bytes with bytes Just a small refactor patch in order to improve the code readability. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_limit.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit dfc46034b54af3abf594de75a1ee43ef2ec2a60a Author: Pablo M. Bermudo Garay Date: Wed Aug 23 22:41:23 2017 +0200 netfilter: nf_tables: add select_ops for stateful objects This patch adds support for overloading stateful objects operations through the select_ops() callback, just as it is implemented for expressions. This change is needed for upcoming additions to the stateful objects infrastructure. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 35 ++++++++++++++++++++++++----------- net/netfilter/nf_tables_api.c | 36 ++++++++++++++++++++++++------------ net/netfilter/nft_counter.c | 20 +++++++++++++------- net/netfilter/nft_ct.c | 18 ++++++++++++------ net/netfilter/nft_objref.c | 7 ++++--- net/netfilter/nft_quota.c | 20 +++++++++++++------- 6 files changed, 90 insertions(+), 46 deletions(-) commit bea74641e3786d51dcf1175527cc1781420961c9 Author: Vishwanath Pai Date: Fri Aug 18 20:58:59 2017 +0200 netfilter: xt_hashlimit: add rate match mode This patch adds a new feature to hashlimit that allows matching on the current packet/byte rate without rate limiting. This can be enabled with a new flag --hashlimit-rate-match. The match returns true if the current rate of packets is above/below the user specified value. The main difference between the existing algorithm and the new one is that the existing algorithm rate-limits the flow whereas the new algorithm does not. Instead it *classifies* the flow based on whether it is above or below a certain rate. I will demonstrate this with an example below. Let us assume this rule: iptables -A INPUT -m hashlimit --hashlimit-above 10/s -j new_chain If the packet rate is 15/s, the existing algorithm would ACCEPT 10 packets every second and send 5 packets to "new_chain". But with the new algorithm, as long as the rate of 15/s is sustained, all packets will continue to match and every packet is sent to new_chain. This new functionality will let us classify different flows based on their current rate, so that further decisions can be made on them based on what the current rate is. This is how the new algorithm works: We divide time into intervals of 1 (sec/min/hour) as specified by the user. We keep track of the number of packets/bytes processed in the current interval. After each interval we reset the counter to 0. When we receive a packet for match, we look at the packet rate during the current interval and the previous interval to make a decision: if [ prev_rate < user and cur_rate < user ] return Below else return Above Where cur_rate is the number of packets/bytes seen in the current interval, prev is the number of packets/bytes seen in the previous interval and 'user' is the rate specified by the user. We also provide flexibility to the user for choosing the time interval using the option --hashilmit-interval. For example the user can keep a low rate like x/hour but still keep the interval as small as 1 second. To preserve backwards compatibility we have to add this feature in a new revision, so I've created revision 3 for hashlimit. The two new options we add are: --hashlimit-rate-match --hashlimit-rate-interval I have updated the help text to add these new options. Also added a few tests for the new options. Suggested-by: Igor Lubashev Reviewed-by: Josh Hunt Signed-off-by: Vishwanath Pai Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/xt_hashlimit.h | 3 +- include/uapi/linux/netfilter/xt_hashlimit.h | 36 +++- net/netfilter/xt_hashlimit.c | 277 +++++++++++++++++++++++++--- 3 files changed, 285 insertions(+), 31 deletions(-) commit b24a5f293058b512f1685930f2983a20ee3e15ab Author: Andy Shevchenko Date: Fri Sep 1 19:15:07 2017 +0300 ALSA: atmel: Remove leftovers of AVR32 removal The ALSA related include header files are left overs after the commit 020c5260c2b1 ("ALSA: atmel: Remove AVR32 bits from the driver") Fixes: 020c5260c2b1 ("ALSA: atmel: Remove AVR32 bits from the driver") Signed-off-by: Andy Shevchenko Signed-off-by: Takashi Iwai include/sound/atmel-abdac.h | 23 ----------------------- include/sound/atmel-ac97c.h | 38 -------------------------------------- 2 files changed, 61 deletions(-) commit 5f10e84934e4ef2289d1335087529685e5e679cc Author: Andy Shevchenko Date: Fri Sep 1 19:15:06 2017 +0300 ALSA: atmel: convert AC97c driver to GPIO descriptor API Convert the driver to use GPIO descriptor API. Signed-off-by: Andy Shevchenko Signed-off-by: Takashi Iwai sound/atmel/ac97c.c | 70 ++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 60 deletions(-) commit b84e843644f211dbddcd65ba80732bdc3acf5380 Author: PeiSen Hou Date: Fri Sep 1 15:11:56 2017 +0800 ALSA: hda/realtek - Enable jack detection function for Intel ALC700 Intel ALC 700 needs this patch for jack detection function. Because ALC700's jack detect function defaults is disable. So alc700 needs pathc to enable jack detection function. Signed-off-by: PeiSen Hou Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 265601f034df3566f22da11240977aab8860f6a7 Author: Cédric Le Goater Date: Mon Sep 4 08:37:55 2017 +0200 powerpc/xive: Fix section __init warning xive_spapr_init() is called from a __init routine and calls __init routines. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4716e488abc22d487e298ee6c0c7d7dada9fcb64 Author: Paul Mackerras Date: Mon Sep 4 13:59:00 2017 +1000 powerpc: Fix kernel crash in emulation of vector loads and stores Commit 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code", 2017-08-30) changed the register usage in get_vr and put_vr with the aim of leaving the register number in r3 untouched on return. Unfortunately, r6 was not a good choice, as the callers as of 350779a29f11 store a MSR value in r6. Then, in commit c22435a5f3d8 ("powerpc: Emulate FP/vector/VSX loads/stores correctly when regs not live", 2017-08-30), the saving and restoring of the MSR got moved into get_vr and put_vr. Either way, the effect is that we put a value in MSR that only has the 0x3f8 bits non-zero, meaning that we are switching to 32-bit mode. That leads to a crash like this: Unable to handle kernel paging request for instruction fetch Faulting instruction address: 0x0007bea0 Oops: Kernel access of bad area, sig: 11 [#12] LE SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: vmx_crypto binfmt_misc ip_tables x_tables autofs4 crc32c_vpmsum CPU: 6 PID: 32659 Comm: trashy_testcase Tainted: G D 4.13.0-rc2-00313-gf3026f57e6ed-dirty #23 task: c000000f1bb9e780 task.stack: c000000f1ba98000 NIP: 000000000007bea0 LR: c00000000007b054 CTR: c00000000007be70 REGS: c000000f1ba9b960 TRAP: 0400 Tainted: G D (4.13.0-rc2-00313-gf3026f57e6ed-dirty) MSR: 10000000400010a1 CR: 48000228 XER: 00000000 CFAR: c00000000007be74 SOFTE: 1 GPR00: c00000000007b054 c000000f1ba9bbe0 c000000000e6e000 000000000000001d GPR04: c000000f1ba9bc00 c00000000007be70 00000000000000e8 9000000002009033 GPR08: 0000000002000000 100000000282f033 000000000b0a0900 0000000000001009 GPR12: 0000000000000000 c00000000fd42100 0706050303020100 a5a5a5a5a5a5a5a5 GPR16: 2e2e2e2e2e2de70c 2e2e2e2e2e2e2e2d 0000000000ff00ff 0606040202020000 GPR20: 000000000000005b ffffffffffffffff 0000000003020100 0000000000000000 GPR24: c000000f1ab90020 c000000f1ba9bc00 0000000000000001 0000000000000001 GPR28: c000000f1ba9bc90 c000000f1ba9bea0 000000000b0a0908 0000000000000001 NIP [000000000007bea0] 0x7bea0 LR [c00000000007b054] emulate_loadstore+0x1044/0x1280 Call Trace: [c000000f1ba9bbe0] [c000000000076b80] analyse_instr+0x60/0x34f0 (unreliable) [c000000f1ba9bc70] [c00000000007b7ec] emulate_step+0x23c/0x544 [c000000f1ba9bce0] [c000000000053424] arch_uprobe_skip_sstep+0x24/0x40 [c000000f1ba9bd00] [c00000000024b2f8] uprobe_notify_resume+0x598/0xba0 [c000000f1ba9be00] [c00000000001c284] do_notify_resume+0xd4/0xf0 [c000000f1ba9be30] [c00000000000bd44] ret_from_except_lite+0x70/0x74 Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX ---[ end trace a7ae7a7f3e0256b5 ]--- To fix this, we just revert to using r3 as before, since the callers don't rely on r3 being left unmodified. Fortunately, this can't be triggered by a misaligned load or store, because vector loads and stores truncate misaligned addresses rather than taking an alignment interrupt. It can be triggered using uprobes. Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") Reported-by: Anton Blanchard Signed-off-by: Paul Mackerras Tested-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/lib/ldstfp.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit edc2988c548db05e33b921fed15821010bc74895 Merge: d82fed7 81a84ad Author: Ingo Molnar Date: Mon Sep 4 11:01:18 2017 +0200 Merge branch 'linus' into locking/core, to fix up conflicts Conflicts: mm/page_alloc.c Signed-off-by: Ingo Molnar commit 2a32a4d9c9cc4141abdf8e90f0cd167a614c9e91 Merge: 1f7f51a 39cdc62 Author: Takashi Iwai Date: Mon Sep 4 10:10:27 2017 +0200 Merge branch 'for-next' into for-linus commit 34bbf1335fac345eb69a13d143d2dcad368c7b56 Author: Christoph Hellwig Date: Mon Sep 4 08:29:48 2017 +0200 dma-coherent: remove an unused variable Signed-off-by: Christoph Hellwig Reported-by: Stephen Rothwell drivers/base/dma-coherent.c | 1 - 1 file changed, 1 deletion(-) commit 45865dabb14cee3be334c1376d69e959a62af561 Merge: f98ce38 65bce46 Author: David S. Miller Date: Sun Sep 3 21:27:55 2017 -0700 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2017-09-03 Here's one last bluetooth-next pull request for the 4.14 kernel: - NULL pointer fix in ca8210 802.15.4 driver - A few "const" fixes - New Kconfig option for disabling legacy interfaces Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit f98ce38927d53e84960fbc5f7789d5ad6126b076 Merge: 3cf2e08 b665f4f Author: David S. Miller Date: Sun Sep 3 21:27:18 2017 -0700 Merge branch 'qualcomm-rmnet-Fix-comments-on-initial-patchset' Subash Abhinov Kasiviswanathan says: ==================== net: qualcomm: rmnet: Fix comments on initial patchset This series fixes the comments from Dan on the first patch series. Fixes a memory corruption which could occur if mux_id was higher than 32. Remove the RMNET_LOCAL_LOGICAL_ENDPOINT which is no longer used. Make a log message more useful. Combine __rmnet_set_endpoint_config() with rmnet_set_endpoint_config(). Set the mux_id in rmnet_vnd_newlink(). Set the ingress and egress data format directly in newlink. Implement ndo_get_iflink to find the real_dev. Rename the real_dev_info to port to make it similar to other drivers. The conversion of rmnet_devices to a list and hash lookup will be sent as part of a seperate patch. ==================== Signed-off-by: David S. Miller commit b665f4f82d31c17926df3ac7c4a59bbff7af463b Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:46 2017 -0600 net: qualcomm: rmnet: Rename real_dev_info to port Make it similar to drivers like ipvlan / macvlan so it is easier to read. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 65 +++++++++++----------- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 5 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 56 +++++++++---------- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 6 +- .../ethernet/qualcomm/rmnet/rmnet_map_command.c | 13 ++--- .../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 3 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 17 +++--- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 4 +- 8 files changed, 82 insertions(+), 87 deletions(-) commit b752eff5be24ec146393944848d2ffbef92b43a7 Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:45 2017 -0600 net: qualcomm: rmnet: Implement ndo_get_iflink This makes it easier to find out the parent dev. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 + drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 12 +++++++++++- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 3 ++- 4 files changed, 15 insertions(+), 3 deletions(-) commit 032ee46828e7a2531c77bf80052fa1237820ec9c Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:44 2017 -0600 net: qualcomm: rmnet: Refactor the new rmnet dev creation Data format can be directly set from rmnet_newlink() since the rmnet real dev info is already available. Since __rmnet_get_real_dev_info() is no longer used in rmnet_config.c after removal of those functions, move content to rmnet_get_real_dev_info(). __rmnet_set_endpoint_config() is collapsed into rmnet_set_endpoint_config() since only mux_id was being set additionally within it. Remove an unnecessary mux_id check. Set the mux_id for the rmnet_dev within rmnet_vnd_newlink() itself. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 96 +++++----------------- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 13 ++- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 1 - 3 files changed, 26 insertions(+), 84 deletions(-) commit 2d516c0d904af52967bb974ee58aa74819d8d05f Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:43 2017 -0600 net: qualcomm: rmnet: Move the device creation log The current log is not very useful as it does not log the device name since it it is prior to registration - (unnamed net_device) (uninitialized): Setting up device Modify to log after the device registration - rmnet1: rmnet dev created Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 61bf5490ec47f61b522ecf24958c835aefa38812 Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:42 2017 -0600 net: qualcomm: rmnet: Remove the unused endpoint -1 This was used only in the original patch series where the IOCTLs were present and is no longer in use. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 009e1b2b7a302219562999f3b273bd4cbf4d9b40 Author: Subash Abhinov Kasiviswanathan Date: Sat Sep 2 23:30:41 2017 -0600 net: qualcomm: rmnet: Fix memory corruption if mux_id is greater than 32 rmnet_rtnl_validate() was checking for upto mux_id 254, however the rmnet_devices devices could hold upto 32 entries only. Fix this by increasing the size of the rmnet_devices. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 3 +-- drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h | 1 - drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) commit 3cf2e08f5ace79d57c8edba06deb59b25bd1dd33 Merge: 18a4ded 9ce4fa5 Author: David S. Miller Date: Sun Sep 3 21:22:05 2017 -0700 Merge branch 'nfp-refactor-app-init-and-minor-flower-fixes' Jakub Kicinski says: ==================== nfp: refactor app init, and minor flower fixes This series is a part 2 to what went into net as a simpler fix. In net we simply moved when existing callbacks are invoked to ensure flower app does not still use representors when lower netdev has already been destroyed. In this series we add a callback to notify apps when vNIC netdevs are fully initialized and they are about to be destroyed. This allows flower to spawn representors at the right time, while keeping the start/stop callbacks for what they are intended to be used - FW initialization over control channel. Patch 4 improves drop monitor interaction and patch 5 changes the default Kconfig selection of flower offload. Patch 6 fixes locking around representor updates which got lost in net-next. ==================== Signed-off-by: David S. Miller commit 9ce4fa548313f585c637aa846f7fc904b676bf43 Author: Jakub Kicinski Date: Sat Sep 2 18:26:05 2017 -0700 nfp: flower: restore RTNL locking around representor updates When we moved to updating representors from a workqueue grabbing the RTNL somehow got lost in the process. Restore it, and make sure RCU lock is not held while we are grabbing the RTNL. RCU protects the representor table, so since we will be under RTNL we can drop RCU lock as soon as we find the netdev pointer. RTNL is needed for the dev_set_mtu() call. Fixes: 2dff19622421 ("nfp: process MTU updates from firmware flower app") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7c8a2d8b366d2dc9e386b96e4555cc5c6932c43d Author: Jakub Kicinski Date: Sat Sep 2 18:26:04 2017 -0700 nfp: build the flower offload by default It's reasonable to assume that if user selects to build the NFP driver all offload capabilities will be enabled by default. Change the CONFIG_NFP_APP_FLOWER to default to enabled. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 023a928461e9370e73de2d5ef1a7e44a8033d2a6 Author: Jakub Kicinski Date: Sat Sep 2 18:26:03 2017 -0700 nfp: be drop monitor friendly Use dev_consume_skb_any() in place of dev_kfree_skb_any() when control frame has been successfully processed in flower and on the driver's main TX completion path. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 3 +++ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 9d8b17bed757a3c5edbd6c1d09e52cbff6f2cc78 Author: Jakub Kicinski Date: Sat Sep 2 18:26:02 2017 -0700 nfp: move the start/stop app callbacks back Since representors are now created with a separate callback start/stop app callbacks can be moved again to their original location. They are intended to app-specific init/clean up over the control channel. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 26 ++++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 192e685105097c48ad9f3665af643e1d97bcd2d4 Author: Jakub Kicinski Date: Sat Sep 2 18:26:01 2017 -0700 nfp: flower: base lifetime of representors on existence of lower vNIC Create representors after lower vNIC is registered and destroy them before it is destroyed. Move the code out of start/stop callbacks directly into vnic_init/clean callbacks. Make sure SR-IOV callbacks don't try to create representors when lower device does not exist. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 66 +++++++++++++++--------- 1 file changed, 43 insertions(+), 23 deletions(-) commit c496291c5a414bd55bae76880137947d2e8decbe Author: Jakub Kicinski Date: Sat Sep 2 18:26:00 2017 -0700 nfp: separate app vNIC init/clean from alloc/free We currently only have one app callback for vNIC creation and destruction. This is insufficient, because some actions have to be taken before netdev is registered, after it's registered and after it's unregistered. Old callbacks were really corresponding to alloc/free actions. Rename them and add proper init/clean. Apps using representors will be able to use new callbacks to manage lifetime of upper devices. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 10 +++---- drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/main.c | 27 +++++++++++++---- drivers/net/ethernet/netronome/nfp/flower/main.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_app.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_app.h | 35 +++++++++++++++++------ drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 4 +-- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 16 +++++++++-- drivers/net/ethernet/netronome/nfp/nic/main.c | 2 +- 9 files changed, 73 insertions(+), 27 deletions(-) commit 18a4ded9d12473e82f4609a06a99744aec88defc Merge: ccfdf21 d4b6c48 Author: David S. Miller Date: Sun Sep 3 21:17:07 2017 -0700 Merge tag 'mlx5-updates-2017-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-09-03 This series from Tariq includes micro data path optimization for mlx5e netdevice driver. Mainly Tariq introduces the following changes to NAPI and RX handling path of the driver: - RX ring structure reorganizing - Trivial code refactoring and optimization - NAPI busy-poll for when fast UMR is in progress - Non-atomic state operations in NAPI context - Remove unnecessary fields from fast path structures - page-cache micro optimization - Rely on NAPI to avoid missing an IRQ for RX/TX shared NAPI contexts - Stop NAPI when irq changes affinity - Distribute RSS table among all RX rings ==================== Signed-off-by: David S. Miller commit 81a84ad3cb5711cec79f4dd53a4ce026b092c432 Merge: fe91f28 86c0f046 Author: Linus Torvalds Date: Sun Sep 3 21:07:29 2017 -0700 Merge branch 'docs-next' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "After a fair amount of churn in the last couple of cycles, docs are taking it easier this time around. Lots of fixes and some new documentation, but nothing all that radical. Perhaps the most interesting change for many is the scripts/sphinx-pre-install tool from Mauro; it will tell you exactly which packages you need to install to get a working docs toolchain on your system. There are two little patches reaching outside of Documentation/; both just tweak kerneldoc comments to eliminate warnings and fix some dangling doc pointers" * 'docs-next' of git://git.lwn.net/linux: (52 commits) Documentation/sphinx: fix kernel-doc decode for non-utf-8 locale genalloc: Fix an incorrect kerneldoc comment doc: Add documentation for the genalloc subsystem assoc_array: fix path to assoc_array documentation kernel-doc parser mishandles declarations split into lines docs: ReSTify table of contents in core.rst docs: process: drop git snapshots from applying-patches.rst Documentation:input: fix typo swap: Remove obsolete sentence sphinx.rst: Allow Sphinx version 1.6 at the docs docs-rst: fix verbatim font size on tables Documentation: stable-kernel-rules: fix broken git urls rtmutex: update rt-mutex rtmutex: update rt-mutex-design docs: fix minimal sphinx version in conf.py docs: fix nested numbering in the TOC NVMEM documentation fix: A minor typo docs-rst: pdf: use same vertical margin on all Sphinx versions doc: Makefile: if sphinx is not found, run a check script docs: Fix paths in security/keys ... commit ccfdf21bbbe2e68be5cd63e2ee6b4c0d0d93a3a9 Merge: 45f7929 ee954d1a Author: David S. Miller Date: Sun Sep 3 20:23:26 2017 -0700 Merge branch 'mlxsw-Offloading-GRE-tunnels' Jiri Pirko says: ==================== mlxsw: Offloading GRE tunnels Petr says: This patch series introduces to mlxsw driver support for offloading IP-in-IP tunnels in general, and for (subset of) GRE in particular. This patchset supports two ways of configuring GRE: - So called "hierarchical configuration", where the GRE device has a bound dummy device, which is in a different VRF. The VRF with host traffic is called "overlay", the one with encapsulated traffic is called "underlay". - So called "flat configuration", where the GRE device doesn't have a bound device, and overlay and underlay are both in the same VRF (possibly the default one). Two routes are then interesting: a route that directs traffic to a GRE device (which would typically be in overlay VRF, but could be in another one), and a local route for the tunnel's local address (in underlay). Handling of these two route types is then introduced as patches to support, respectively, IPv4 and IPv6 encapsulation and IPv4 decapsulation. The encap and decap routes then reference a loopback device, a new type of RIF introduced by this patchset for the specific use of offloading tunnels. The encap and decap code is abstract with respect to the particulars of individual L3 tunnel types. This patchset introduces support for GRE tunnels in particular. Limitations: - Each tunnel needs to have a different local address (within a given VRF). When two tunnels are used that are in conflict, FIB abort is triggered and the driver ceases offloading FIBs. Full handling of such configurations needs special setup in the hardware, such that the tunnels that share an address are dispatched correctly according to their key (or lack thereof). That's currently not implemented, and to keep things deterministic, the driver triggers FIB abort. - A next hop that uses an incompletely-specified tunnel (e.g. such that are used for LWT) is not offloaded, but doesn't trigger FIB abort like the above. If such routes end up being in a de facto conflict with other tunnels, then if there already is an offload for that address, the traffic for the conflicting tunnel will end up mismatching the configuration of the offloaded tunnel, and thus gets to slow path through an error trap. - GRE checksumming and sequence numbers are not supported and TTL and TOS need to be set to inherit. Tunnels with a different configuration are not offloaded and their traffic is trapping to slow path. Note in particular that TOS of inherit is not the default configuration and needs to be explicitly specified when the tunnel is created. - The only feature that is not graciously handled is that if a change is made to the tunnel, e.g. through "ip tunnel change", such changes are not reflected in the driver. There is currently no notification mechanism for these changes. Introduction of this mechanism and its leverage in the driver will be subject of follow-up work. For now this limitation can be worked around by removing and re-adding the encap route. --- v1->v2: -fix order of patch 5 ==================== Signed-off-by: David S. Miller commit ee954d1a91b2bb71defb17697f0a2263f46235d2 Author: Petr Machata Date: Sat Sep 2 23:49:29 2017 +0200 mlxsw: spectrum_router: Support GRE tunnels This patch introduces callbacks and tunnel type to offload GRE 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_ipip.c | 176 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 26 +++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 4 + 4 files changed, 207 insertions(+) commit 92107cfb411f5371bee56d9a13d28ef8b40bbbbc Author: Petr Machata Date: Sat Sep 2 23:49:28 2017 +0200 mlxsw: spectrum_router: Add loopback accessors struct mlxsw_sp_rif is a router-private structure, and therefore everything related to it is as well: parameters, and derived RIF types including loopbacks. IPIP module needs access to some details of loopback interfaces, but exporting all the RIF shebang would create too large an interface. So instead export just the bare minimum necessary: accessors for RIF index and underlay VRF ID. 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 | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 3 +++ 2 files changed, 13 insertions(+) commit 86484de2c917b6ba5965ef2248d9966424932af4 Author: Petr Machata Date: Sat Sep 2 23:49:27 2017 +0200 mlxsw: spectrum: Register for IPIP_DECAP_ERROR trap These traps are generated for packets that fail checks for source IP, encapsulation type, or GRE key. Trap these packets to CPU for follow-up handling by the kernel, which will send ICMP destination unreachable responses. 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 | 1 + drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 + 2 files changed, 2 insertions(+) commit 1cc38fb144ded22b81ef7b53b77d52885f25ecea Author: Petr Machata Date: Sat Sep 2 23:49:26 2017 +0200 mlxsw: spectrum_router: Use existing decap route The local route that points at IPIP's underlay device (decap route) can be present long before the GRE device. Thus when an encap route is added, it's necessary to look inside the underlay FIB if the decap route is already present. If so, the current trap offload needs to be withdrawn and replaced with a decap offload. 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 | 80 ++++++++++++++++++++-- 1 file changed, 76 insertions(+), 4 deletions(-) commit 4607f6d26950ffb3c4c8e5b2db42f364f19dd26c Author: Petr Machata Date: Sat Sep 2 23:49:25 2017 +0200 mlxsw: spectrum_router: Support IPv4 underlay decap Unlike encapsulation, which is represented by a next hop forwarding to an IPIP tunnel, decapsulation is a type of local route. It is created for local routes whose prefix corresponds to the local address of one of offloaded IPIP tunnels. When the tunnel is removed (i.e. all the encap next hops are removed), the decap offload is migrated back to a trap for resolution in slow path. This patch assumes that decap route is already present when encap route is added. A follow-up patch will fix this issue. Note that this patch only supports IPv4 underlay. Support for IPv6 underlay will be subject to follow-up work apart from 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_ipip.h | 7 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 141 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 3 + 3 files changed, 146 insertions(+), 5 deletions(-) commit 8f28a3097645ae29a7c6835ed9323d6b6b8db169 Author: Petr Machata Date: Sat Sep 2 23:49:24 2017 +0200 mlxsw: spectrum_router: Support IPv6 overlay encap Add the missing bits to recognize IPv6 next hops as IPIP ones to enable offloading of IPv6 overlay encapsulation. 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, 19 insertions(+), 1 deletion(-) commit 1012b9ac28c6d61f54e0dd9f8744af88427020b7 Author: Petr Machata Date: Sat Sep 2 23:49:23 2017 +0200 mlxsw: spectrum_router: Support IPv4 overlay encap This introduces some common code for tracking of offloaded IP-in-IP tunnels, and support for offloading IPv4 overlay encapsulating routes in particular. A follow-up patch will introduce IPv6 overlay as well. Offloaded tunnels are kept in a linked list of mlxsw_sp_ipip_entry objects hooked up in mlxsw_sp_router. A network device that represents the tunnel is used as a key to look up the corresponding IPIP entry. Note that in the future, more general keying mechanism will be needed, because parts of the tunnel information can be provided by the route. IPIP entries are reference counted, because several next hops may end up using the same tunnel, and we only want to offload it once. Encapsulation path hooks into next hop handling. Routes that forward to a tunnel are now considered gateway routes, thus giving them the same treatment that other remote routes get. An IPIP next hop type is introduced. Details of individual tunnel types are kept in an array of mlxsw_sp_ipip_ops objects. If a tunnel type doesn't match any of the known tunnel types, the next-hop is not considered an IPIP next hop. The list of IPIP tunnel types is currently empty, follow-up patches will add support for GRE. Traffic to IPIP tunnel types that are not explicitly recognized by the driver traps and is handled in slow path. 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 | 20 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 238 ++++++++++++++++++++- 2 files changed, 257 insertions(+), 1 deletion(-) commit 35225e4740baa9707f4063bedb4367185b9d1ae7 Author: Petr Machata Date: Sat Sep 2 23:49:22 2017 +0200 mlxsw: spectrum_router: Make nexthops typed In the router, some next hops may reference an encapsulating netdevice, such as GRE or IPIP. To properly offload these next hops, mlxsw needs to keep track of whether a given next hop is a regular Ethernet entry, or an IP-in-IP tunneling entry. To facilitate this book-keeping, add a type field to struct mlxsw_sp_nexthop. There is, as of this patch, only one next hop type: MLXSW_SP_NEXTHOP_TYPE_ETH. Follow-up patches will introduce the IP-in-IP variant. There are several places where next hops are initialized in the IPv4 path. Instead of replicating the logic at every one of them, factor it out to a function mlxsw_sp_nexthop4_type_init(). The corresponding fini is actually protocol-neutral, so put it to mlxsw_sp_nexthop_type_fini(), but create a corresponding protocoled _fini function that dispatches to the protocol-neutral one. The IPv6 path is simpler, but for symmetry with IPv4, create the same suite of functions with corresponding logic. 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 | 138 ++++++++++++++------- 1 file changed, 95 insertions(+), 43 deletions(-) commit f6050ee6f462e6dbd9dd6a49e5dc3cca7fc0b601 Author: Petr Machata Date: Sat Sep 2 23:49:21 2017 +0200 mlxsw: spectrum_router: Extract mlxsw_sp_rt6_is_gateway() IPv6 counterpart of the previous patch: introduce a function to determine whether a given route is a gateway route. The new function takes a mlxsw_sp argument which follow-up patches will use. Thus mlxsw_sp_fib6_entry_type_set() got that argument 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_router.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 9b01451ad5fe09d95aea9cfd5b36cde574651ab4 Author: Petr Machata Date: Sat Sep 2 23:49:20 2017 +0200 mlxsw: spectrum_router: Extract mlxsw_sp_fi_is_gateway() For IPv4 IP-in-IP offload, routes that direct traffic to IP-in-IP devices need to be considered gateway routes as well. That involves a bit more logic, so extract the current test to a separate function, where the logic can be later added. 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 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 6ddb7426a7d4429c9df9dada9ebc0cc396d31cc4 Author: Petr Machata Date: Sat Sep 2 23:49:19 2017 +0200 mlxsw: spectrum_router: Introduce loopback RIFs When offloading L3 tunnels, an adjacency entry is created that loops the packet back into the underlay router. Loopback interfaces then hold the corresponding information and are created for IP-in-IP netdevices. 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 | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 152 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 13 ++ 3 files changed, 164 insertions(+), 2 deletions(-) commit 010cadf916a5112a2de1642301917f4139104d46 Author: Petr Machata Date: Sat Sep 2 23:49:18 2017 +0200 mlxsw: spectrum_router: Support FID-less RIFs Loopback RIFs, which will be introduced in a follow-up patch, differ from other RIFs in that they do not have a FID associated with them. To support this, demote FID allocation from mlxsw_sp_rif_create to configure op of the existing RIF types, and likewise the FID release from mlxsw_sp_rif_destroy to deconfigure op. 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 | 85 ++++++++++++++++------ 1 file changed, 63 insertions(+), 22 deletions(-) commit 38ebc0f45474abf4c4229ec3218915576475af85 Author: Petr Machata Date: Sat Sep 2 23:49:17 2017 +0200 mlxsw: spectrum_router: Add mlxsw_sp_ipip_ops Details of individual tunnel types are kept in an array of mlxsw_sp_ipip_ops objects. Follow-up patches will use the list to determine whether a constructed RIF should be a loopback, and to decide whether a next hop references a tunnel. The list is currently empty, follow-up patches will add support for GRE. 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/Makefile | 4 +- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 38 ++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 51 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 19 ++++++++ 4 files changed, 110 insertions(+), 2 deletions(-) commit ff1f06ce9df9deea690a3f16ded77e0b665acffd Author: Petr Machata Date: Sat Sep 2 23:49:16 2017 +0200 mlxsw: spectrum_router: Publish mlxsw_sp_l3proto The spectrum_ipip module that will be introduced in the follow-up patches needs to know the data type. 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 | 5 ----- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit 89e419828f91ecf46c85b23576904077f62a1a2e Author: Petr Machata Date: Sat Sep 2 23:49:15 2017 +0200 mlxsw: reg: Give mlxsw_reg_ratr_pack a type parameter To support IPIP, the driver needs to be able to construct an IPIP adjacency. Change mlxsw_reg_ratr_pack to take an adjacency type as an argument. Adjust the one existing caller. 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/reg.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 9571e828f460161f76dc3aa24f5857076344b2da Author: Petr Machata Date: Sat Sep 2 23:49:14 2017 +0200 mlxsw: reg: Extract mlxsw_reg_ritr_mac_pack() Unlike other interface types, loopback RIFs do not have MAC address. So drop the corresponding argument from mlxsw_reg_ritr_pack() and move it to a new function. Call that from callers of mlxsw_reg_ritr_pack. 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/reg.h | 7 +++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) commit 1e659ebf581997a988faebe56e900e7139a9ccb1 Author: Petr Machata Date: Sat Sep 2 23:49:13 2017 +0200 mlxsw: reg: Add Routing Tunnel Decap Properties Register The RTDP register is used for configuring the tunnel decap properties of NVE and IPinIP. 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/reg.h | 129 ++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) commit a43da820c8ff671054105144287766a24cfbcdc0 Author: Petr Machata Date: Sat Sep 2 23:49:12 2017 +0200 mlxsw: reg: Add mlxsw_reg_ralue_act_ip2me_tun_pack() To implement IP-in-IP decapsulation, Spectrum uses LPM entries of type IP2ME with tunnel validity bit and tunnel pointer set. The necessary register fields are already available, so add a function to pack the RALUE as appropriate. 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/reg.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6c4153b1e7b71ba5e9183f14eed58a5277be3894 Author: Petr Machata Date: Sat Sep 2 23:49:11 2017 +0200 mlxsw: reg: Move enum mlxsw_reg_ratr_trap_id This enum is used with reg_ratr_trap_id, so move it next to the register definition. While at it, drop the enumerator initializers. 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/reg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7c819de4389bf91878954f41e51a0003171217ff Author: Petr Machata Date: Sat Sep 2 23:49:10 2017 +0200 mlxsw: reg: Update RATR to support IP-in-IP tunnels So far, adjacencies have always been of type Ethernet (with value of 0), and thus there was no need to explicitly support RATR type. However to support IP-in-IP adjacencies, this type and a suite of IP-in-IP-specific attributes need to be added. 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/reg.h | 66 +++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 99ae8e3e5e609c1d9d4288b3a6eec449733189df Author: Petr Machata Date: Sat Sep 2 23:49:09 2017 +0200 mlxsw: reg: Update RITR to support loopback device Update the register so that loopback RIFs can be created and loopback properties specified. 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/reg.h | 88 +++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 6d9c153a0b84392406bc77600aa7d3ea365de041 Author: Florian Fainelli Date: Sat Sep 2 08:56:45 2017 -0700 net: dsa: loop: Do not unregister invalid fixed PHY During error injection it was possible to crash in dsa_loop_exit() because of an attempt to unregister an invalid PHY. We actually want to the driver probing in dsa_loop_init() even though fixed_phy_register() may return an error to exercise how DSA deals with such cases, but we should not be crashing during driver removal. Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45f7929194148866c679c78f774d74e808feb6a4 Merge: b63f604 688cbaf Author: David S. Miller Date: Sun Sep 3 20:16:56 2017 -0700 Merge branch 'mvpp2-improve-the-mac-address-retrieval-logic' Antoine Tenart says: ==================== net: mvpp2: improve the mac address retrieval logic This series aims at fixing the logic behind the MAC address retrieval in the PPv2 driver. A possible issue is also fixed in patch 3/3 to introduce fallbacks when the address given in the device tree isn't valid. Thanks! Antoine Since v2: - Patch 1/4 from v2 was applied on net (and net was merged in net-next). - Rebased on net-next. Since v1: - Rebased onto net (was on net-next). ==================== Signed-off-by: David S. Miller commit 688cbaf202df8b4a69f5ccd39e0027f179852d44 Author: Antoine Tenart Date: Sat Sep 2 11:06:49 2017 +0200 net: mvpp2: fallback using h/w and random mac if the dt one isn't valid When using a mac address described in the device tree, a check is made to see if it is valid. When it's not, no fallback is defined. This patches tries to get the mac address from h/w (or use a random one if the h/w one isn't valid) when the dt mac address isn't valid. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit d2a6e48e5254f653decc1612f3cbee3e5c8592c7 Author: Antoine Tenart Date: Sat Sep 2 11:06:48 2017 +0200 net: mvpp2: fix use of the random mac address for PPv2.2 The MAC retrieval logic is using a variable to store an h/w stored mac address and checks this mac against invalid ones before using it. But the mac address is only read from h/w when using PPv2.1. So when using PPv2.2 it defaults to its init state. This patches fixes the logic to only check if the h/w mac is valid when actually retrieving a mac from h/w. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3ba8c81e15c11fc396d0b5d11adaf9db6ed39533 Author: Antoine Tenart Date: Sat Sep 2 11:06:47 2017 +0200 net: mvpp2: move the mac retrieval/copy logic into its own function The MAC retrieval has a quite complicated logic (which is broken). Moves it to its own function to prepare for patches fixing its logic, so that reviews are easier. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 45 +++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit fe91f28138e730790db014812623cfaadd318fa6 Merge: aa9d464 7074d0a Author: Linus Torvalds Date: Sun Sep 3 18:43:20 2017 -0700 Merge tag 'hwmon-for-linus-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - new drivers: - Lantiq CPU temperature sensor - IBM CFF power supply - TPS53679 PMBus driver - new support: - LM5066I (lm25066 PMBus driver) - Intel VID protocol VR13 (PMBus drivers) - CAT34TS02C, GT30TS00, GT34TS02, and CAT34TS04 (jc42 driver) - cleanup and minor improvements in several drivers * tag 'hwmon-for-linus-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (36 commits) hwmon: (ltq-cputemp) add cpu temp sensor driver hwmon: (ltq-cputemp) add devicetree bindings documentation hwmon: (pmbus) Add support for Texas Instruments tps53679 device hwmon: (asc7621) make several arrays static const hwmon: (pmbus/lm25066) Add support for TI LM5066I hwmon: (pmbus/lm25066) Offset coefficient depends on CL hwmon: (pmbus) Add support for Intel VID protocol VR13 Documentation: hwmon: Document the IBM CFF power supply hwmon: (pmbus) Add IBM Common Form Factor (CFF) power supply driver dt-bindings: hwmon: Document the IBM CCF power supply version 1 hwmon: (ftsteutates) constify i2c_device_id hwmon: da9052: Add support for TSI channel mfd: da9052: Make touchscreen registration optional hwmon: da9052: Replace S_IRUGO with 0444 mfd: da9052: Add register details for TSI hwmon: (aspeed-pwm) add THERMAL dependency hwmon: (pmbus) Add debugfs for status registers hwmon: (aspeed-pwm-tacho) cooling device support. Documentation: dt-bindings: aspeed-pwm-tacho cooling device. hwmon: (pmbus): Add generic alarm bit for iin and pin ... commit aa9d4648c2fbb455df7750ade1b73dd9ad9b3690 Merge: 906dde0 8eb19e8 Author: Linus Torvalds Date: Sun Sep 3 17:49:17 2017 -0700 Merge tag 'for-linus-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "This is a big pull request. Of note is that I'm sending you the new ioctl API for the rdma subsystem. We put it up on linux-api@, but didn't get much response. The API is complex, but it solves two different problems in one go: 1) The bi-directional nature of the RDMA file write calls, which created the security hole we had to handle (and for which the fix is now causing problems for systems in production, we were a bit over zealous in the fix and the ability to open a device, then fork, then create new queue pairs on the device and use them is broken). 2) The bloat caused by different vendors implementing extensions to the base verbs API. Each vendor's hardware is slightly different, and the hardware might be suitable for one extension but not another. By the time we add generic extensions for all the different ways that the different hardware can offload things, the API becomes bloated. Things like our completion structs have started to exceed a cache line in size because of all the elements needed to support this. That in turn shows up heavily in the performance graphs with a noticable drop in performance on 100Gigabit links as our completion structs go from occupying one cache line to 1+. This API makes things like the completion structs modular in a very similar way to netlink so that your structs can only include the items needed for the offloads/features you are actually using on a given queue pair. In that way we support everything, but only use what we need, and our structs stay smaller. The ioctl API is better explained by the posting on linux-api@ than I can explain it here, so I'll just leave it at that. The rest of the pull request is typical stuff. Updates for 4.14 kernel merge window - Lots of hfi1 driver updates (mixed with a few qib and core updates as well) - rxe updates - various mlx updates - Set default roce type to RoCEv2 - Several larger fixes for bnxt_re that were too big for -rc - Several larger fixes for qedr that, likewise, were too big for -rc - Misc core changes - Make the hns_roce driver compilable on arches other than aarch64 so we can more easily debug build issues related to it - Add rdma-netlink infrastructure updates - Add automatic IRQ affinity infrastructure - Add 32bit lid support - Lots of misc fixes across the subsystem from random people - Autoloading of RDMA netlink modules - PCI pool cleanups from Romain Perier - mlx5 driver feature additions and fixes - Hardware tag matchine feature - Fix sleeping in atomic when resolving roce ah - Add experimental ioctl interface as posted to linux-api@" * tag 'for-linus-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (328 commits) IB/core: Expose ioctl interface through experimental Kconfig IB/core: Assign root to all drivers IB/core: Add completion queue (cq) object actions IB/core: Add legacy driver's user-data IB/core: Export ioctl enum types to user-space IB/core: Explicitly destroy an object while keeping uobject IB/core: Add macros for declaring methods and attributes IB/core: Add uverbs merge trees functionality IB/core: Add DEVICE object and root tree structure IB/core: Declare an object instead of declaring only type attributes IB/core: Add new ioctl interface RDMA/vmw_pvrdma: Fix a signedness RDMA/vmw_pvrdma: Report network header type in WC IB/core: Add might_sleep() annotation to ib_init_ah_from_wc() IB/cm: Fix sleeping in atomic when RoCE is used IB/core: Add support to finalize objects in one transaction IB/core: Add a generic way to execute an operation on a uobject Documentation: Hardware tag matching IB/mlx5: Support IB_SRQT_TM net/mlx5: Add XRQ support ... commit aaed2dd8a31359e5767ee099ecbb078d55be4d29 Author: Deepa Dinamani Date: Wed Aug 2 19:51:15 2017 -0700 utimes: Make utimes y2038 safe struct timespec is not y2038 safe on 32 bit machines. Replace timespec with y2038 safe struct timespec64. Note that the patch only changes the internals without modifying the syscall interfaces. This will be part of a separate series. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro fs/utimes.c | 23 ++++++++++++----------- include/linux/time.h | 2 +- init/initramfs.c | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) commit 7ff2819e8dd5b528887dfbe4ff395f5d2142edff Author: Deepa Dinamani Date: Wed Aug 2 19:51:14 2017 -0700 ipc: shm: Make shmid_kernel timestamps y2038 safe time_t is not y2038 safe. Replace all uses of time_t by y2038 safe time64_t. Similarly, replace the calls to get_seconds() with y2038 safe ktime_get_real_seconds(). Note that this preserves fast access on 64 bit systems, but 32 bit systems need sequence counters. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro include/linux/shm.h | 6 +++--- ipc/shm.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit e54d02b23c5eed3aa0ffe54e659dfe1c9084c262 Author: Deepa Dinamani Date: Wed Aug 2 19:51:13 2017 -0700 ipc: sem: Make sem_array timestamps y2038 safe time_t is not y2038 safe. Replace all uses of time_t by y2038 safe time64_t. Similarly, replace the calls to get_seconds() with y2038 safe ktime_get_real_seconds(). Note that this preserves fast access on 64 bit systems, but 32 bit systems need sequence counters. The syscall interface themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro include/linux/sem.h | 3 ++- ipc/sem.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 50578ea97a2a352c109bd1657e667b212faf2cbb Author: Deepa Dinamani Date: Wed Aug 2 19:51:12 2017 -0700 ipc: msg: Make msg_queue timestamps y2038 safe time_t is not y2038 safe. Replace all uses of time_t by y2038 safe time64_t. Similarly, replace the calls to get_seconds() with y2038 safe ktime_get_real_seconds(). Note that this preserves fast access on 64 bit systems, but 32 bit systems need sequence counters. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro include/linux/msg.h | 7 ++++--- ipc/msg.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) commit b9047726386bb538cf5e4f52a9f04eb556eebc67 Author: Deepa Dinamani Date: Wed Aug 2 19:51:11 2017 -0700 ipc: mqueue: Replace timespec with timespec64 struct timespec is not y2038 safe. Replace all uses of timespec by y2038 safe struct timespec64. Even though timespec is used here to represent timeouts, replace these with timespec64 so that it facilitates in verification by creating a y2038 safe kernel image that is free of timespec. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani Cc: Paul Moore Cc: Richard Guy Briggs Reviewed-by: Richard Guy Briggs Reviewed-by: Arnd Bergmann Acked-by: Paul Moore Signed-off-by: Al Viro include/linux/audit.h | 6 +++--- ipc/mqueue.c | 28 ++++++++++++++-------------- kernel/audit.h | 2 +- kernel/auditsc.c | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) commit 3ef56dc2678258b7211b1870d034c1666becb2bd Author: Deepa Dinamani Date: Wed Aug 2 19:51:10 2017 -0700 ipc: Make sys_semtimedop() y2038 safe struct timespec is not y2038 safe on 32 bit machines. Replace timespec with y2038 safe struct timespec64. Note that the patch only changes the internals without modifying the syscall interface. This will be part of a separate series. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro ipc/sem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b63f6044d8e43e4a1eef8b0a2310cec872fd1d38 Merge: 942e7e5 1aff647 Author: David S. Miller Date: Sun Sep 3 17:08:42 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree. Basically, updates to the conntrack core, enhancements for nf_tables, conversion of netfilter hooks from linked list to array to improve memory locality and asorted improvements for the Netfilter codebase. More specifically, they are: 1) Add expection to hashes after timer initialization to prevent access from another CPU that walks on the hashes and calls del_timer(), from Florian Westphal. 2) Don't update nf_tables chain counters from hot path, this is only used by the x_tables compatibility layer. 3) Get rid of nested rcu_read_lock() calls from netfilter hook path. Hooks are always guaranteed to run from rcu read side, so remove nested rcu_read_lock() where possible. Patch from Taehee Yoo. 4) nf_tables new ruleset generation notifications include PID and name of the process that has updated the ruleset, from Phil Sutter. 5) Use skb_header_pointer() from nft_fib, so we can reuse this code from the nf_family netdev family. Patch from Pablo M. Bermudo. 6) Add support for nft_fib in nf_tables netdev family, also from Pablo. 7) Use deferrable workqueue for conntrack garbage collection, to reduce power consumption, from Patch from Subash Abhinov Kasiviswanathan. 8) Add nf_ct_expect_iterate_net() helper and use it. From Florian Westphal. 9) Call nf_ct_unconfirmed_destroy only from cttimeout, from Florian. 10) Drop references on conntrack removal path when skbuffs has escaped via nfqueue, from Florian. 11) Don't queue packets to nfqueue with dying conntrack, from Florian. 12) Constify nf_hook_ops structure, from Florian. 13) Remove neededlessly branch in nf_tables trace code, from Phil Sutter. 14) Add nla_strdup(), from Phil Sutter. 15) Rise nf_tables objects name size up to 255 chars, people want to use DNS names, so increase this according to what RFC 1035 specifies. Patch series from Phil Sutter. 16) Kill nf_conntrack_default_on, it's broken. Default on conntrack hook registration on demand, suggested by Eric Dumazet, patch from Florian. 17) Remove unused variables in compat_copy_entry_from_user both in ip_tables and arp_tables code. Patch from Taehee Yoo. 18) Constify struct nf_conntrack_l4proto, from Julia Lawall. 19) Constify nf_loginfo structure, also from Julia. 20) Use a single rb root in connlimit, from Taehee Yoo. 21) Remove unused netfilter_queue_init() prototype, from Taehee Yoo. 22) Use audit_log() instead of open-coding it, from Geliang Tang. 23) Allow to mangle tcp options via nft_exthdr, from Florian. 24) Allow to fetch TCP MSS from nft_rt, from Florian. This includes a fix for a miscalculation of the minimal length. 25) Simplify branch logic in h323 helper, from Nick Desaulniers. 26) Calculate netlink attribute size for conntrack tuple at compile time, from Florian. 27) Remove protocol name field from nf_conntrack_{l3,l4}proto structure. From Florian. 28) Remove holes in nf_conntrack_l4proto structure, so it becomes smaller. From Florian. 29) Get rid of print_tuple() indirection for /proc conntrack listing. Place all the code in net/netfilter/nf_conntrack_standalone.c. Patch from Florian. 30) Do not built in print_conntrack() if CONFIG_NF_CONNTRACK_PROCFS is off. From Florian. 31) Constify most nf_conntrack_{l3,l4}proto helper functions, from Florian. 32) Fix broken indentation in ebtables extensions, from Colin Ian King. 33) Fix several harmless sparse warning, from Florian. 34) Convert netfilter hook infrastructure to use array for better memory locality, joint work done by Florian and Aaron Conole. Moreover, add some instrumentation to debug this. 35) Batch nf_unregister_net_hooks() calls, to call synchronize_net once per batch, from Florian. 36) Get rid of noisy logging in ICMPv6 conntrack helper, from Florian. 37) Get rid of obsolete NFDEBUG() instrumentation, from Varsha Rao. 38) Remove unused code in the generic protocol tracker, from Davide Caratti. I think I will have material for a second Netfilter batch in my queue if time allow to make it fit in this merge window. ==================== Signed-off-by: David S. Miller commit 906dde0f355bd97c080c215811ae7db1137c4af8 Merge: 69c0067 7846b12 Author: Linus Torvalds Date: Sun Sep 3 17:02:26 2017 -0700 Merge tag 'drm-for-v4.14' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for 4.14 merge window. I'm sending this early, as my continuing journey into fatherhood is occurring really soon now, I'm going to be mostly useless for the next couple of weeks, though I may be able to read email, I doubt I'll be doing much patch applications or git sending. If anything urgent pops up I've asked Daniel/Jani/Alex/Sean to try and direct stuff towards you. Outside drm changes: Some rcar-du updates that touch the V4L tree, all acks should be in place. It adds one export to the radix tree code for new i915 use case. There are some minor AGP cleanups (don't see that too often). Changes to the vbox driver in staging to avoid breaking compilation. Summary: core: - Atomic helper fixes - Atomic UAPI fixes - Add YCBCR 4:2:0 support - Drop set_busid hook - Refactor fb_helper locking - Remove a bunch of internal APIs - Add a bunch of better default handlers - Format modifier/blob plane property added - More internal header refactoring - Make more internal API names consistent - Enhanced syncobj APIs (wait/signal/reset/create signalled) bridge: - Add Synopsys Designware MIPI DSI host bridge driver tiny: - Add Pervasive Displays RePaper displays - Add support for LEGO MINDSTORMS EV3 LCD i915: - Lots of GEN10/CNL support patches - drm syncobj support - Skylake+ watermark refactoring - GVT vGPU 48-bit ppgtt support - GVT performance improvements - NOA change ioctl - CCS (color compression) scanout support - GPU reset improvements amdgpu: - Initial hugepage support - BO migration logic rework - Vega10 improvements - Powerplay fixes - Stop reprogramming the MC - Fixes for ACP audio on stoney - SR-IOV fixes/improvements - Command submission overhead improvements amdkfd: - Non-dGPU upstreaming patches - Scratch VA ioctl - Image tiling modes - Update PM4 headers for new firmware - Drop all BUG_ONs. nouveau: - GP108 modesetting support. - Disable MSI on big endian. vmwgfx: - Add fence fd support. msm: - Runtime PM improvements exynos: - NV12MT support - Refactor KMS drivers imx-drm: - Lock scanout channel to improve memory bw - Cleanups etnaviv: - GEM object population fixes tegra: - Prep work for Tegra186 support - PRIME mmap support sunxi: - HDMI support improvements - HDMI CEC support omapdrm: - HDMI hotplug IRQ support - Big driver cleanup - OMAP5 DSI support rcar-du: - vblank fixes - VSP1 updates arcgpu: - Minor fixes stm: - Add STM32 DSI controller driver dw_hdmi: - Add support for Rockchip RK3399 - HDMI CEC support atmel-hlcdc: - Add 8-bit color support vc4: - Atomic fixes - New ioctl to attach a label to a buffer object - HDMI CEC support - Allow userspace to dictate rendering order on submit ioctl" * tag 'drm-for-v4.14' of git://people.freedesktop.org/~airlied/linux: (1074 commits) drm/syncobj: Add a signal ioctl (v3) drm/syncobj: Add a reset ioctl (v3) drm/syncobj: Add a syncobj_array_find helper drm/syncobj: Allow wait for submit and signal behavior (v5) drm/syncobj: Add a CREATE_SIGNALED flag drm/syncobj: Add a callback mechanism for replace_fence (v3) drm/syncobj: add sync obj wait interface. (v8) i915: Use drm_syncobj_fence_get drm/syncobj: Add a race-free drm_syncobj_fence_get helper (v2) drm/syncobj: Rename fence_get to find_fence drm: kirin: Add mode_valid logic to avoid mode clocks we can't generate drm/vmwgfx: Bump the version for fence FD support drm/vmwgfx: Add export fence to file descriptor support drm/vmwgfx: Add support for imported Fence File Descriptor drm/vmwgfx: Prepare to support fence fd drm/vmwgfx: Fix incorrect command header offset at restart drm/vmwgfx: Support the NOP_ERROR command drm/vmwgfx: Restart command buffers after errors drm/vmwgfx: Move irq bottom half processing to threads drm/vmwgfx: Don't use drm_irq_[un]install ... commit 69c0067aa3f40d3e52ab78643aecb17d669d3389 Merge: 569dbb8 b38e51c Author: Linus Torvalds Date: Sun Sep 3 16:09:03 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc fixes from Al Viro: "Loose ends and regressions from the last merge window. Strictly speaking, only binfmt_flat thing is a build regression per se - the rest is 'only sparse cares about that' stuff" [ This came in before the 4.13 release and could have gone there, but it was late in the release and nothing seemed critical enough to care, so I'm pulling it in the 4.14 merge window instead - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp() compat_hdio_ioctl: Fix a declaration : Fix copy_in_user() declaration annotate RWF_... flags teach SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE to handle __bitwise arguments commit d97561f461e4cb5b2e170bc33b466cffbddc8719 Merge: 4afbce7 d0e4a193 Author: Rafael J. Wysocki Date: Mon Sep 4 00:07:36 2017 +0200 Merge branch 'pm-tools' * pm-tools: tools/power/cpupower: allow running without cpu0 pm-graph: package makefile and man pages pm-graph: AnalyzeBoot v2.1 pm-graph: AnalyzeSuspend v4.7 commit 4afbce7b39d2b326616f0a87a6246b1383237868 Merge: 835f128 7aa7a03 Author: Rafael J. Wysocki Date: Mon Sep 4 00:07:27 2017 +0200 Merge branch 'pm-docs' * pm-docs: PM: docs: Delete the obsolete states.txt document PM: docs: Describe high-level PM strategies and sleep states commit 835f12819ba7e51c21ae8370e8be337bf82d8de4 Merge: 7b01463 0a9f429 Author: Rafael J. Wysocki Date: Mon Sep 4 00:06:34 2017 +0200 Merge branch 'pm-devfreq' * pm-devfreq: PM / devfreq: Fix memory leak when fail to register device PM / devfreq: Add dependency on PM_OPP PM / devfreq: Move private devfreq_update_stats() into devfreq PM / devfreq: Convert to using %pOF instead of full_name commit 7b01463e51f6849d0787b24d06a62efcb243dd44 Merge: a1b5fd8 726fb6b Author: Rafael J. Wysocki Date: Mon Sep 4 00:06:02 2017 +0200 Merge branch 'pm-sleep' * pm-sleep: ACPI / PM: Check low power idle constraints for debug only PM / s2idle: Rename platform operations structure PM / s2idle: Rename ->enter_freeze to ->enter_s2idle PM / s2idle: Rename freeze_state enum and related items PM / s2idle: Rename PM_SUSPEND_FREEZE to PM_SUSPEND_TO_IDLE ACPI / PM: Prefer suspend-to-idle over S3 on some systems platform/x86: intel-hid: Wake up Dell Latitude 7275 from suspend-to-idle PM / suspend: Define pr_fmt() in suspend.c PM / suspend: Use mem_sleep_labels[] strings in messages PM / sleep: Put pm_test under CONFIG_PM_SLEEP_DEBUG PM / sleep: Check pm_wakeup_pending() in __device_suspend_noirq() PM / core: Add error argument to dpm_show_time() PM / core: Split dpm_suspend_noirq() and dpm_resume_noirq() PM / s2idle: Rearrange the main suspend-to-idle loop PM / timekeeping: Print debug messages when requested PM / sleep: Mark suspend/hibernation start and finish PM / sleep: Do not print debug messages by default PM / suspend: Export pm_suspend_target_state commit a1b5fd8fa29fb2359f398ef17a706449d94de80d Merge: ab271bc 1b39e3f Author: Rafael J. Wysocki Date: Mon Sep 4 00:05:51 2017 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: Make drivers initialize polling state cpuidle: Move polling state initialization code to separate file cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol cpuidle: Convert to using %pOF instead of full_name commit ab271bc95b40960799c084b0e94a33c4272ec0bf Merge: 08a1000 57ccaf3 Author: Rafael J. Wysocki Date: Mon Sep 4 00:05:42 2017 +0200 Merge branch 'intel_pstate' * intel_pstate: cpufreq: intel_pstate: Shorten a couple of long names cpufreq: intel_pstate: Simplify intel_pstate_adjust_pstate() cpufreq: intel_pstate: Improve IO performance with per-core P-states cpufreq: intel_pstate: Drop INTEL_PSTATE_HWP_SAMPLING_INTERVAL cpufreq: intel_pstate: Drop ->update_util from pstate_funcs cpufreq: intel_pstate: Do not use PID-based P-state selection commit 08a10002bed151f6df201715adb80c1c5e7fe7ca Merge: bd87c8f c49cbc1 Author: Rafael J. Wysocki Date: Mon Sep 4 00:05:22 2017 +0200 Merge branch 'pm-cpufreq-sched' * pm-cpufreq-sched: cpufreq: schedutil: Always process remote callback with slow switching cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily cpufreq: Return 0 from ->fast_switch() on errors cpufreq: Simplify cpufreq_can_do_remote_dvfs() cpufreq: Process remote callbacks from any CPU if the platform permits sched: cpufreq: Allow remote cpufreq callbacks cpufreq: schedutil: Use unsigned int for iowait boost cpufreq: schedutil: Make iowait boost more energy efficient commit bd87c8fb9d2e420e5ddffad0cd1abcadfca75dbd Merge: 45a7953 fded5fc Author: Rafael J. Wysocki Date: Mon Sep 4 00:05:13 2017 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (33 commits) cpufreq: imx6q: Fix imx6sx low frequency support cpufreq: speedstep-lib: make several arrays static, makes code smaller cpufreq: ti: Fix 'of_node_put' being called twice in error handling path cpufreq: dt-platdev: Drop few entries from whitelist cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2 ARM: ux500: don't select CPUFREQ_DT cpufreq: Convert to using %pOF instead of full_name cpufreq: Cap the default transition delay value to 10 ms cpufreq: dbx500: Delete obsolete driver mfd: db8500-prcmu: Get rid of cpufreq dependency cpufreq: enable the DT cpufreq driver on the Ux500 cpufreq: Loongson2: constify platform_device_id cpufreq: dt: Add r8a7796 support to to use generic cpufreq driver cpufreq: remove setting of policy->cpu in policy->cpus during init cpufreq: mediatek: add support of cpufreq to MT7622 SoC cpufreq: mediatek: add cleanups with the more generic naming cpufreq: rcar: Add support for R8A7795 SoC cpufreq: dt: Add rk3328 compatible to use generic cpufreq driver cpufreq: s5pv210: add missing of_node_put() cpufreq: Allow dynamic switching with CPUFREQ_ETERNAL latency ... commit 45a7953c831c5885a4c6eddeeda4fe7628b3a96d Merge: 569dbb8 820b9b0 7627929 ea11e94 313c8c1 9d913e4 Author: Rafael J. Wysocki Date: Mon Sep 4 00:04:49 2017 +0200 Merge branches 'pm-core', 'pm-opp', 'pm-domains', 'pm-cpu' and 'pm-avs' * pm-core: PM / wakeup: Set power.can_wakeup if wakeup_sysfs_add() fails * pm-opp: PM / OPP: Fix get sharing CPUs when hotplug is used PM / OPP: OF: Use pr_debug() instead of pr_err() while adding OPP table * pm-domains: PM / Domains: Convert to using %pOF instead of full_name PM / Domains: Extend generic power domain debugfs PM / Domains: Add time accounting to various genpd states * pm-cpu: PM / CPU: replace raw_notifier with atomic_notifier * pm-avs: PM / AVS: rockchip-io: add io selectors and supplies for RV1108 commit 298bd7fb26cb2797a8b19b66a68389b3f27ae7e2 Merge: 940c8df 7dae632 e931d0d 5e93232 Author: Rafael J. Wysocki Date: Sun Sep 3 23:55:34 2017 +0200 Merge branches 'acpi-sysfs', 'acpi-apei' and 'acpi-blacklist' * acpi-sysfs: ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region * acpi-apei: ACPI / APEI: Suppress message if HEST not present ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources ACPI: APEI: fix the wrong iteration of generic error status block ACPI: APEI: Enable APEI multiple GHES source to share a single external IRQ * acpi-blacklist: intel_pstate: convert to use acpi_match_platform_list() ACPI / blacklist: add acpi_match_platform_list() commit 940c8df63a534e004a5828182712ecf0036c26f7 Merge: 01d2f10 1f59ab2 82d2b61 03c3876 19dc713 Author: Rafael J. Wysocki Date: Sun Sep 3 23:54:29 2017 +0200 Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' * acpi-video: ACPI / video: Add force_none quirk for Dell OptiPlex 9020M * acpi-battery: ACPI: make device_attribute const * acpi-spcr: ACPI: SPCR: work around clock issue on xgene UART ACPI: SPCR: extend XGENE 8250 workaround to m400 * acpi-misc: ACPI / dock: constify attribute_group structure MAINTAINERS: Add Tony and Boris as ACPI/APEI reviewers ACPI / lpat: Fix typos in comments and kerneldoc style MAINTAINERS: device property: ACPI: add fwnode.h commit 01d2f105a428bb2ebc248e71b8c86df569288b95 Merge: f928a49 42d516c a4bb2b4 58eefe2 8a2e487 Author: Rafael J. Wysocki Date: Sun Sep 3 23:54:03 2017 +0200 Merge branches 'acpi-x86', 'acpi-soc', 'acpi-pmic' and 'acpi-apple' * acpi-x86: ACPI / boot: Add number of legacy IRQs to debug output ACPI / boot: Correct address space of __acpi_map_table() ACPI / boot: Don't define unused variables * acpi-soc: ACPI / LPSS: Don't abort ACPI scan on missing mem resource * acpi-pmic: ACPI / PMIC: xpower: Do pinswitch magic when reading GPADC * acpi-apple: spi: Use Apple device properties in absence of ACPI resources ACPI / scan: Recognize Apple SPI and I2C slaves ACPI / property: Support Apple _DSM properties ACPI / property: Don't evaluate objects for devices w/o handle treewide: Consolidate Apple DMI checks commit f928a49027ed4c5c35065102d150ada5e26bfc75 Merge: 4467ade 56f77ee 10d8ab2 0ed780e 66ed4ca Author: Rafael J. Wysocki Date: Sun Sep 3 23:53:39 2017 +0200 Merge branches 'acpi-ec', 'acpi-dma', 'acpi-processor' and 'acpi-cppc' * acpi-ec: ACPI / EC: Clean up EC GPE mask flag ACPI: EC: Fix possible issues related to EC initialization order * acpi-dma: ACPI/IORT: Add IORT named component memory address limits ACPI: Make acpi_dma_configure() DMA regions aware ACPI: Introduce DMA ranges parsing ACPI: Make acpi_dev_get_resources() method agnostic * acpi-processor: ACPI / processor: make function acpi_processor_check_duplicates() static ACPI: processor: use dev_dbg() instead of dev_warn() when CPPC probe failed * acpi-cppc: mailbox: pcc: Drop uninformative output during boot commit 4467ade90d62a87c449bc35df61378a81a702741 Merge: b2a84ee eb7f43c 020a637 Author: Rafael J. Wysocki Date: Sun Sep 3 23:53:19 2017 +0200 Merge branches 'acpi-scan' and 'acpi-pm' * acpi-scan: ACPI / scan: Enable GPEs before scanning the namespace ACPICA: Make it possible to enable runtime GPEs earlier ACPICA: Dispatch active GPEs at init time * acpi-pm: ACPI / PM: Add debug statements to acpi_pm_notify_handler() ACPI: Add debug statements to acpi_global_event_handler() ACPI / sleep: Make acpi_sleep_syscore_init() static ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup() ACPI / PM: Split acpi_device_wakeup() PCI / PM: Skip bridges in pci_enable_wake() commit b2a84eedca1b827c6e513a8139e47b394f2d988d Merge: 569dbb8 4a9673d Author: Rafael J. Wysocki Date: Sun Sep 3 23:53:05 2017 +0200 Merge branch 'acpica' * acpica: (32 commits) ACPICA: Update version to 20170728 ACPICA: Revert "Update resource descriptor handling" ACPICA: Resources: Allow _DMA method in walk resources ACPICA: Ensure all instances of AE_AML_INTERNAL have error messages ACPICA: Implement deferred resolution of reference package elements ACPICA: Debugger: Improve support for Alias objects ACPICA: Interpreter: Update handling for Alias operator ACPICA: EFI/EDK2: Cleanup to enable /WX for MSVC builds ACPICA: acpidump: Add DSDT/FACS instance support for Linux and EFI ACPICA: CLib: Add short multiply/shift support ACPICA: EFI/EDK2: Sort acpi.h inclusion order ACPICA: Add a comment, no functional change ACPICA: Namespace: Update/fix an error message ACPICA: iASL: Add support for the SDEI table ACPICA: Divergences: reduce access size definitions ACPICA: Update version to 20170629 ACPICA: Update resource descriptor handling ACPICA: iasl: Update to IORT SMMUv3 disassembling ACPICA: Disassembler: skip parsing of incorrect external declarations ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias ... commit 443cb3a32101a2f3201f417d7342017666666116 Merge: 4113f36 f026bc2 Author: David S. Miller Date: Sun Sep 3 11:04:21 2017 -0700 Merge branch 'l2tp-session-creation-fixes' Guillaume Nault says: ==================== l2tp: session creation fixes The session creation process has a few issues wrt. concurrent tunnel deletion. Patch #1 avoids creating sessions in tunnels that are getting removed. This prevents races where sessions could try to take tunnel resources that were already released. Patch #2 removes some racy l2tp_tunnel_find() calls in session creation callbacks. Together with path #1 it ensures that sessions can only access tunnel resources that are guaranteed to remain valid during the session creation process. There are other problems with how sessions are created: pseudo-wire specific data are set after the session is added to the tunnel. So the session can be used, or deleted, before it has been completely initialised. Separating session allocation from session registration would be necessary, but we'd still have circular dependencies preventing race-free registration. I'll consider this issue in future series. ==================== Signed-off-by: David S. Miller commit f026bc29a8e093edfbb2a77700454b285c97e8ad Author: Guillaume Nault Date: Fri Sep 1 17:58:51 2017 +0200 l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore searching for the parent tunnel isn't necessary because l2tp_nl_cmd_session_create() already has a pointer to it and holds a reference. This patch modifies ->session_create()'s prototype to directly pass the the parent tunnel as parameter, thus avoiding searching for it in pppol2tp_session_create() and l2tp_eth_create(). Since we have to touch the ->session_create() call in l2tp_nl_cmd_session_create(), let's also remove the useless conditional: we know that ->session_create isn't NULL at this point because it's already been checked earlier in this same function. Finally, one might be tempted to think that the removed l2tp_tunnel_find() calls were harmless because they would return the same tunnel as the one held by l2tp_nl_cmd_session_create() anyway. But that tunnel might be removed and a new one created with same tunnel Id before the l2tp_tunnel_find() call. In this case l2tp_tunnel_find() would return the new tunnel which wouldn't be protected by the reference held by l2tp_nl_cmd_session_create(). Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP") Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.h | 4 +++- net/l2tp/l2tp_eth.c | 11 +++-------- net/l2tp/l2tp_netlink.c | 8 ++++---- net/l2tp/l2tp_ppp.c | 19 +++++++------------ 4 files changed, 17 insertions(+), 25 deletions(-) commit f3c66d4e144a0904ea9b95d23ed9f8eb38c11bfb Author: Guillaume Nault Date: Fri Sep 1 17:58:48 2017 +0200 l2tp: prevent creation of sessions on terminated tunnels l2tp_tunnel_destruct() sets tunnel->sock to NULL, then removes the tunnel from the pernet list and finally closes all its sessions. Therefore, it's possible to add a session to a tunnel that is still reachable, but for which tunnel->sock has already been reset. This can make l2tp_session_create() dereference a NULL pointer when calling sock_hold(tunnel->sock). This patch adds the .acpt_newsess field to struct l2tp_tunnel, which is used by l2tp_tunnel_closeall() to prevent addition of new sessions to tunnels. Resetting tunnel->sock is done after l2tp_tunnel_closeall() returned, so that l2tp_session_add_to_tunnel() can safely take a reference on it when .acpt_newsess is true. The .acpt_newsess field is modified in l2tp_tunnel_closeall(), rather than in l2tp_tunnel_destruct(), so that it benefits all tunnel removal mechanisms. E.g. on UDP tunnels, a session could be added to a tunnel after l2tp_udp_encap_destroy() proceeded. This would prevent the tunnel from being removed because of the references held by this new session on the tunnel and its socket. Even though the session could be removed manually later on, this defeats the purpose of commit 9980d001cec8 ("l2tp: add udp encap socket destroy handler"). 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_core.c | 41 ++++++++++++++++++++++++++++------------- net/l2tp/l2tp_core.h | 4 ++++ 2 files changed, 32 insertions(+), 13 deletions(-) commit 4113f36bc7084ea0d47c0f5f1137776b603c91a7 Merge: 64327fc 5a63643 Author: David S. Miller Date: Sun Sep 3 11:01:05 2017 -0700 Merge branch 'net-revert-lib-percpu_counter-API-for-fragmentation-mem-accounting' Jesper Dangaard Brouer says: ==================== net: revert lib/percpu_counter API for fragmentation mem accounting There is a bug in fragmentation codes use of the percpu_counter API, that can cause issues on systems with many CPUs, above 24 CPUs. After much consideration and different attempts at solving the API usage. The conclusion is to revert to the simple atomic_t API instead. The ratio between batch size and threshold size make it a bad use-case for the lib/percpu_counter API. As using the correct API calls will unfortunately cause systems with many CPUs to always execute an expensive sum across all CPUs. Plus the added complexity is not worth it. ==================== Signed-off-by: David S. Miller commit 5a63643e583b6a9789d7a225ae076fb4e603991c Author: Jesper Dangaard Brouer Date: Fri Sep 1 11:26:13 2017 +0200 Revert "net: fix percpu memory leaks" This reverts commit 1d6119baf0610f813eb9d9580eb4fd16de5b4ceb. After reverting commit 6d7b857d541e ("net: use lib/percpu_counter API for fragmentation mem accounting") then here is no need for this fix-up patch. As percpu_counter is no longer used, it cannot memory leak it any-longer. Fixes: 6d7b857d541e ("net: use lib/percpu_counter API for fragmentation mem accounting") Fixes: 1d6119baf061 ("net: fix percpu memory leaks") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/inet_frag.h | 7 +------ net/ieee802154/6lowpan/reassembly.c | 11 +++-------- net/ipv4/ip_fragment.c | 12 +++--------- net/ipv6/netfilter/nf_conntrack_reasm.c | 12 +++--------- net/ipv6/reassembly.c | 12 +++--------- 5 files changed, 13 insertions(+), 41 deletions(-) commit fb452a1aa3fd4034d7999e309c5466ff2d7005aa Author: Jesper Dangaard Brouer Date: Fri Sep 1 11:26:08 2017 +0200 Revert "net: use lib/percpu_counter API for fragmentation mem accounting" This reverts commit 6d7b857d541ecd1d9bd997c97242d4ef94b19de2. There is a bug in fragmentation codes use of the percpu_counter API, that can cause issues on systems with many CPUs. The frag_mem_limit() just reads the global counter (fbc->count), without considering other CPUs can have upto batch size (130K) that haven't been subtracted yet. Due to the 3MBytes lower thresh limit, this become dangerous at >=24 CPUs (3*1024*1024/130000=24). The correct API usage would be to use __percpu_counter_compare() which does the right thing, and takes into account the number of (online) CPUs and batch size, to account for this and call __percpu_counter_sum() when needed. We choose to revert the use of the lib/percpu_counter API for frag memory accounting for several reasons: 1) On systems with CPUs > 24, the heavier fully locked __percpu_counter_sum() is always invoked, which will be more expensive than the atomic_t that is reverted to. Given systems with more than 24 CPUs are becoming common this doesn't seem like a good option. To mitigate this, the batch size could be decreased and thresh be increased. 2) The add_frag_mem_limit+sub_frag_mem_limit pairs happen on the RX CPU, before SKBs are pushed into sockets on remote CPUs. Given NICs can only hash on L2 part of the IP-header, the NIC-RXq's will likely be limited. Thus, a fair chance that atomic add+dec happen on the same CPU. Revert note that commit 1d6119baf061 ("net: fix percpu memory leaks") removed init_frag_mem_limit() and instead use inet_frags_init_net(). After this revert, inet_frags_uninit_net() becomes empty. Fixes: 6d7b857d541e ("net: use lib/percpu_counter API for fragmentation mem accounting") Fixes: 1d6119baf061 ("net: fix percpu memory leaks") Signed-off-by: Jesper Dangaard Brouer Acked-by: Florian Westphal Signed-off-by: David S. Miller include/net/inet_frag.h | 30 +++++++++--------------------- net/ipv4/inet_fragment.c | 4 +--- 2 files changed, 10 insertions(+), 24 deletions(-) commit 942e7e5fc1ea4625d971e62f00b5ae3d2f8855de Author: Colin Ian King Date: Thu Aug 31 18:07:24 2017 +0100 net/mlx4_core: fix incorrect size allocation for dev->caps.spec_qps The current allocation for dev->caps.spec_qps is for the size of the pointer and not the size of the actual mlx4_spec_qps structure. Fix this by using the correct size. Also splint allocation over a few lines to make it cppcheck clean on overly wide lines. Detected by CoverityScan, CID#1455222 ("Wrong sizeof argument") Fixes: c73c8b1e47ca ("net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap") Signed-off-by: Colin Ian King Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 542deb88b0e3696ec9986e804628158169200776 Author: Colin Ian King Date: Thu Aug 31 17:30:53 2017 +0100 net/mlx4_core: fix memory leaks on error exit path The structures hca_param and func_cap are not being kfree'd on an error exit path causing two memory leaks. Fix this by jumping to the existing free memory error exit path. Detected by CoverityScan, CID#1455219, CID#1455224 ("Resource Leak") Fixes: c73c8b1e47ca ("net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap") Signed-off-by: Colin Ian King Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 64327fc811268d4a24de03dac242ea29de6be75f Author: Stefano Brivio Date: Thu Aug 31 18:11:41 2017 +0200 ipv4: Don't override return code from ip_route_input_noref() After ip_route_input() calls ip_route_input_noref(), another check on skb_dst() is done, but if this fails, we shouldn't override the return code from ip_route_input_noref(), as it could have been more specific (i.e. -EHOSTUNREACH). This also saves one call to skb_dst_force_safe() and one to skb_dst() in case the ip_route_input_noref() check fails. Reported-by: Sabrina Dubroca Fixes: 9df16efadd2a ("ipv4: call dst_hold_safe() properly") Signed-off-by: Stefano Brivio Acked-by: Wei Wang Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller include/net/route.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6c370590cfe0c36bcd62d548148aa65c984540b7 Author: Pan Bian Date: Sat Sep 2 09:54:23 2017 -0700 xfs: use kmem_free to free return value of kmem_zalloc In function xfs_test_remount_options(), kfree() is used to free memory allocated by kmem_zalloc(). But it is better to use kmem_free(). Signed-off-by: Pan Bian Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8353a814f2518dcfa79a5bb77afd0e7dfa391bb1 Author: Christoph Hellwig Date: Sat Sep 2 09:53:41 2017 -0700 xfs: open code end_buffer_async_write in xfs_finish_page_writeback Our loop in xfs_finish_page_writeback, which iterates over all buffer heads in a page and then calls end_buffer_async_write, which also iterates over all buffers in the page to check if any I/O is in flight is not only inefficient, but also potentially dangerous as end_buffer_async_write can cause the page and all buffers to be freed. Replace it with a single loop that does the work of end_buffer_async_write on a per-page basis. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 71 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 24 deletions(-) commit 26f2f4de0bd93cbe891e11307d9e4906253bfda8 Author: Dan Williams Date: Sun Sep 3 10:17:53 2017 -0700 dax: fix FS_DAX=n BLOCK=y compilation The 0day kbuild robot reports: >> drivers//dax/super.c:64:20: error: redefinition of 'fs_dax_get_by_bdev' struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) ^~~~~~~~~~~~~~~~~~ In file included from drivers//dax/super.c:22:0: include/linux/dax.h:76:34: note: previous definition of 'fs_dax_get_by_bdev' was here static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) ^~~~~~~~~~~~~~~~~~ Protect the definition of fs_dax_get_by_bdev() in drivers/dax/super.c with an ifdef. Fixes: 78f354735081 ("dax: introduce a fs_dax_get_by_bdev() helper") Cc: Christoph Hellwig Cc: Darrick J. Wong Reviewed-by: Jan Kara Reported-by: kbuild test robot Signed-off-by: Dan Williams drivers/dax/super.c | 2 ++ 1 file changed, 2 insertions(+) commit c65e3d6ef4bfdc4c8460509f08507cf7dc026974 Author: Lorenzo Bianconi Date: Tue Aug 29 13:45:11 2017 +0200 iio: magnetometer: st_magn: fix drdy line configuration for LIS3MDL Data-ready line in LIS3MDL is routed to drdy pin and it is not possible to select a different INT pin. st_sensors_set_dataready_irq() assumes that if drdy int address is not exported in register map, irq trigger is not supported by the sensor and hw_irq_trigger is always false. Based on this configuration st_sensors_irq_thread does not consume generated interrupt causing an unhandled irq. Fix this taking into account status register address in st_sensors_set_dataready_irq() Fixes: 90efe0556292 (iio: st_sensors: harden interrupt handling) Signed-off-by: Lorenzo Bianconi Cc: Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_core.c | 11 ++++++++++- drivers/iio/magnetometer/st_magn_core.c | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 3af75db12e3d3537bc01c06bbdc876cb17e82b35 Author: Akinobu Mita Date: Thu Aug 24 09:22:57 2017 +0900 iio: adc: ti-ads1015: fix comparator polarity setting The comparator polarity field in config register is not correctly initialized as per the interrupt trigger setting. Because the bitfield definision is wrong and bit shifting is missed. Fixes: d9f39babd8ba ("iio: adc: ti-ads1015: add threshold event support") Cc: Daniel Baluta Cc: Jonathan Cameron Signed-off-by: Akinobu Mita Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1f7f51a63114bab3a05920f4b1343154e95e2cb6 Author: Wang YanQing Date: Sun Sep 3 21:18:49 2017 +0800 ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm Commit fb087eaaef72 ("ALSA: hda - hdmi eld control created based on pcm") forget to filter out invalid pcm numbers, if there is only one invalid pcm number, then this issue causes we create eld control for invalid pcm silently, but when there are more than one invalid pcm numbers, then this issue bring probe error looks like below dmesg: " kernel: [ 1.647283] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 0xc2967540) kernel: [ 1.651192] snd_hda_intel 0000:00:03.0: Too many HDMI devices kernel: [ 1.651195] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y kernel: [ 1.651197] snd_hda_intel 0000:00:03.0: Too many HDMI devices kernel: [ 1.651199] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y kernel: [ 1.651201] snd_hda_intel 0000:00:03.0: Too many HDMI devices kernel: [ 1.651203] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y kernel: [ 1.651676] snd_hda_intel 0000:00:03.0: control 3:0:0:ELD:0 is already present kernel: [ 1.651787] snd_hda_codec_hdmi: probe of hdaudioC0D0 failed with error -16 " This patch add invalid pcm number filter before calling hdmi_create_eld_ctl. Fixes: fb087eaaef72 ("ALSA: hda - hdmi eld control created based on pcm") Signed-off-by: Wang YanQing Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 4 +++- sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/patch_hdmi.c | 14 ++++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) commit d4b6c48800dda97f5a0824305d7c8175a127d414 Author: Tariq Toukan Date: Wed Jun 7 13:55:34 2017 +0300 net/mlx5e: Distribute RSS table among all RX rings In default, uniformly distribute the RSS indirection table entries among all RX rings, rather than restricting this only to the rings on the close NUMA node. irqbalancer would anyway dynamically override the default affinities set to the RX rings. This gives better multi-stream performance and CPU util. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 ++------------- 3 files changed, 4 insertions(+), 17 deletions(-) commit a8c2eb15797a0f0bf17734d365da7bdc3e263155 Author: Tariq Toukan Date: Sun Jul 2 13:17:42 2017 +0300 net/mlx5e: Stop NAPI when irq balancer changes affinity NAPI context keeps rescheduling on same CPU as long as it's busy. This doesn't give the oppurtunity for changes in irq affinities to take effect. Fix that by calling napi_complete_done() upon a change in affinity. This would stop the NAPI and reschedule it on the new CPU. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 20 ++++++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) commit 7b33aaeaae1acfec01cbb0cf41fa8c07aea55609 Author: Tariq Toukan Date: Sun Jul 2 12:56:12 2017 +0300 net/mlx5e: Use kernel's mechanism to avoid missing NAPIs We used a channel state bit MLX5E_CHANNEL_NAPI_SCHED to make sure no NAPI is missed when a channel's napi_schedule() is called for completion events of the different channel's resources/rings while NAPI is currently running. Now, as similar mechanism is implemented in kernel, ("39e6c8208d7b net: solve a NAPI race"), we obsolete our own implementation and rely on the return value of napi_complete_done(). This patch removes a redundant overhead of atomic bit operations. Signed-off-by: Tariq Toukan Cc: Eric Dumazet Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 10 +--------- 3 files changed, 1 insertion(+), 15 deletions(-) commit 29c2849e0d204bdc892842e2aae744d2219f07f2 Author: Tariq Toukan Date: Sun Jul 2 17:33:59 2017 +0300 net/mlx5e: Slightly increase RX page-cache size In XDP_TX flow, we now get back quicker to each page in page-cache, and on some occasions refcount does not get back to 1 on time, causing some costly page allocations. Slightly increase the size of RX page-cache to significantly decrease the chances for this to happen. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70871f1ec4a7e2d52683a53a5ee596790080a2c3 Author: Tariq Toukan Date: Thu Jul 13 18:26:40 2017 +0300 net/mlx5e: Don't recycle page if moved to far NUMA Avoid recycling an RX page if it moved to another NUMA node. Add an ethtool counter to count such events. Signed-off-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_rx.c | 6 ++++-- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) commit 3b56f7b2af86033f421d0f0fd10cf5c3f74872e0 Author: Tariq Toukan Date: Mon Jul 17 14:31:39 2017 +0300 net/mlx5e: Remove unnecessary fields in ICO SQ As of current design, in each NAPI, only a single UMR WQE completion could be available in the completion queue of the the internal control operations (ICO) send queue, in addition to nop operations that require no actions upon completion. This renders the consume index obsolete, as the wqe_counter field in CQE is sufficient. This helps removing a memory barrier, and obsoletes the need for tracking the num_wqebbs to update the consumer counter. In addition, remove other unused fields in icosq struct: pdev, dma_fifo_pc, and prev_cc. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 19 ++----------------- 3 files changed, 2 insertions(+), 26 deletions(-) commit 7cc6d77bb56de3a428ed7cde91a09fffbdbef794 Author: Tariq Toukan Date: Mon Jul 17 12:27:26 2017 +0300 net/mlx5e: Type-specific optimizations for RX post WQEs function Separate the RX post WQEs function of the different RQ types. This enables RQ type-specific optimizations in data-path. Poll the ICOSQ completion queue only for Striding RQ, and only when a UMR post completion could be possibly available. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 101 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 64 +------------- 4 files changed, 92 insertions(+), 87 deletions(-) commit a071cb9f25bef32ec309ca9d123022c52175341b Author: Tariq Toukan Date: Mon Jul 3 10:18:19 2017 +0300 net/mlx5e: Non-atomic RQ state indicator for UMR WQE in progress The indication for a UMR WQE in progress is needed only within the NAPI context, and hence no races possible and no need for the use of atomic operations. The only place the flag is read outside of NAPI context is in closure flow, after RQ is disabled flag is no more accessed in NAPI. Use a boolean instead of a bit in ring state, so that its non-atomic set operations do not race with the atomic sets of the other bits. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) commit a1eaba4c5c29b6b5196b2237ce3a8d7d97622b2f Author: Tariq Toukan Date: Mon Jul 3 11:27:20 2017 +0300 net/mlx5e: Non-atomic indicator for ring enabled state Rings enabled state change occurs in control path only, and is always followed by a napi_sychronize(), so that following NAPIs read the new value. This read does not need to be atomic. The RQ auto-moderation bit is not set/cleared in data-path. No need for atomic read, a regular read operation is sufficient. In RQ creation time as well, there's no multiple threads trying to access it yet, hence a regular read can be used. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) commit 604acb193b8383a3774673c324e576e4c6b4ffcd Author: Tariq Toukan Date: Mon Jun 5 11:17:20 2017 +0300 net/mlx5e: Refactor data-path lro header function Refactor function mlx5e_lro_update_hdr() to reduce number of branches. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 45 +++++++++++-------------- include/linux/mlx5/device.h | 2 +- 2 files changed, 21 insertions(+), 26 deletions(-) commit 4b7dfc9925143eb4a55bbb97c033d6da03b29bff Author: Tariq Toukan Date: Mon Jun 19 18:11:30 2017 +0300 net/mlx5e: Early-return on empty completion queues NAPI context handles different kinds of completion queues (RX, TX, and others). Hence, upon a poll trial, some of them might be empty. Here we early-return upon empty completion queues, as well as full rx buffer, and save unnecessary logic and memory barriers. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 40 ++++++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 16 +++++----- 2 files changed, 32 insertions(+), 24 deletions(-) commit 4cbb7558013a4f600eb1ca9ad34959d8912240e6 Author: Tariq Toukan Date: Mon Jun 19 18:36:30 2017 +0300 net/mlx5e: NAPI busy-poll when UMR post is in progress If a UMR post is in progress, it means that there's a missing WQE in RQ, and that a completion will be shortly available in ICO SQ completion queue. Prefer busy-poll to handle it as soon as possible. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4c2af5cc2bee32685883b55328d8b5ec80e1781f Author: Tariq Toukan Date: Sun Jun 25 16:28:46 2017 +0300 net/mlx5e: Small enhancements for RX MPWQE allocation and free The dma offset of a MPWQE (Multi-Packet WQE) in memory region is fixed for all rounds. Calculate it once on creation time, instead of in runtime. This also obsoletes the wqe argument in the function. In addition, optimize dma_info iterator calculation. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 18 ++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 9bafe2adabd16e74e28920956680b15bf529c2eb Author: Tariq Toukan Date: Sun Jun 25 15:23:35 2017 +0300 net/mlx5e: Use memset to init skbs_frags array to zeros In RX data-path, use memset() instead of loop assignment to init the whole skbs_frags array. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b681c481f11bd2839d759f493b00008a6c690e61 Author: Tariq Toukan Date: Mon Jul 3 11:51:17 2017 +0300 net/mlx5e: Remove unnecessary wqe_sz field from RQ buffer Field is used only locally within the RQ create function. The use of a local variable is sufficient. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) commit 89e89f7a9fded02b81f4ee21e30c64892116cf34 Author: Tariq Toukan Date: Sun Jul 2 19:02:05 2017 +0300 net/mlx5e: Replace multiplication by stride size with a shift In RX data-path, use shift operations instead of a regular multiplication by stride size, as it is a power of two. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit b45d8b50b8264cac7b2f1245ca04a2f009038ac7 Author: Tariq Toukan Date: Mon Feb 13 18:41:30 2017 +0200 net/mlx5e: Reorganize struct mlx5e_rq Bring fast-path fields together, and combine RX WQE mutual exclusive fields into a union. Page-reuse and XDP are mutually exclusive and cannot be used at the same time. Use a union to combine their footprints. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 16 +++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 13 ++++++------- 3 files changed, 20 insertions(+), 19 deletions(-) commit dd60687ee541ca3f6df8758f38e6f22f57c42a37 Author: Christoph Hellwig Date: Sat Sep 2 08:21:20 2017 -0700 xfs: don't set v3 xflags for v2 inodes Reject attempts to set XFLAGS that correspond to di_flags2 inode flags if the inode isn't a v3 inode, because di_flags2 only exists on v3. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 7bf7a193a90cadccaad21c5970435c665c40fe27 Author: Darrick J. Wong Date: Thu Aug 31 15:11:06 2017 -0700 xfs: fix compiler warnings Fix up all the compiler warnings that have crept in. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 2 +- fs/xfs/libxfs/xfs_inode_fork.c | 9 +++------ fs/xfs/xfs_buf_item.c | 2 ++ fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_log_recover.c | 4 ++++ 5 files changed, 11 insertions(+), 8 deletions(-) commit 1fabbf781167052f4480bdcc627378a27e78a559 Author: Oded Gabbay Date: Sat Sep 2 15:00:25 2017 +0300 drm/amdkfd: pass queue's mqd when destroying mqd In VI, the destroy mqd function needs to inquire fields present in the mqd structure. That's why we need to pass it to that function instead of NULL. Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f121292f0a0873fa2cd3a0292fb4860a8953f38 Author: Cédric Le Goater Date: Wed Aug 30 21:46:17 2017 +0200 powerpc/xive: improve debugging macros Having the CPU identifier in the debug logs is helpful when tracking issues. Also add some more logging and fix a compile issue in xive_do_source_eoi(). Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ac5e5a5402d64acd48af3287718e24ff8ba9fa21 Author: Cédric Le Goater Date: Wed Aug 30 21:46:16 2017 +0200 powerpc/xive: add XIVE Exploitation Mode to CAS On POWER9, the Client Architecture Support (CAS) negotiation process determines whether the guest operates in XIVE Legacy compatibility or in XIVE exploitation mode. Now that we have initial guest support for the XIVE interrupt controller, let's inform the hypervisor what we can do. The platform advertises the XIVE Exploitation Mode support using the property "ibm,arch-vec-5-platform-support-vec-5", byte 23 bits 0-1 : - 0b00 XIVE legacy mode Only - 0b01 XIVE exploitation mode Only - 0b10 XIVE legacy or exploitation mode The OS asks for XIVE Exploitation Mode support using the property "ibm,architecture-vec-5", byte 23 bits 0-1: - 0b00 XIVE legacy mode Only - 0b01 XIVE exploitation mode Only Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman arch/powerpc/include/asm/prom.h | 5 ++++- arch/powerpc/kernel/prom_init.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) commit bed81ee181dd6b21171cffbb80472cc5b774c24d Author: Cédric Le Goater Date: Wed Aug 30 21:46:15 2017 +0200 powerpc/xive: introduce H_INT_ESB hcall The H_INT_ESB hcall() is used to issue a load or store to the ESB page instead of using the MMIO pages. This can be used as a workaround on some HW issues. The OS knows that this hcall should be used on an interrupt source when the ESB hcall flag is set to 1 in the hcall H_INT_GET_SOURCE_INFO. To maintain the frontier between the xive frontend and backend, we introduce a new xive operation 'esb_rw' to be used in the routines doing memory accesses on the ESBs. Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/sysdev/xive/common.c | 10 ++++++-- arch/powerpc/sysdev/xive/spapr.c | 44 +++++++++++++++++++++++++++++++- arch/powerpc/sysdev/xive/xive-internal.h | 1 + 4 files changed, 53 insertions(+), 3 deletions(-) commit c58a14a9ccf0a79bbdafc106a95c080340c00f49 Author: Cédric Le Goater Date: Wed Aug 30 21:46:14 2017 +0200 powerpc/xive: add the HW IRQ number under xive_irq_data It will be required later by the H_INT_ESB hcall. Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/sysdev/xive/native.c | 2 ++ arch/powerpc/sysdev/xive/spapr.c | 2 ++ 3 files changed, 5 insertions(+) commit 99f122573e76376088019d7c3a44744e62db9415 Author: Cédric Le Goater Date: Wed Aug 30 21:46:13 2017 +0200 powerpc/xive: introduce xive_esb_write() Some source support MMIO stores on the ESB page to perform EOI. Let's introduce a specific routine for this case even if this should be the only use of it. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 59fc2724e45dfea849336108c602e93ea880a18f Author: Cédric Le Goater Date: Wed Aug 30 21:46:12 2017 +0200 powerpc/xive: rename xive_poke_esb() in xive_esb_read() xive_poke_esb() is performing a load/read so it is better named as xive_esb_read() as we will need to introduce a xive_esb_write() routine. Also use the XIVE_ESB_LOAD_EOI offset when EOI'ing LSI interrupts. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit eac1e731b59ee3b5f5e641a7765c7ed41ed26226 Author: Cédric Le Goater Date: Wed Aug 30 21:46:11 2017 +0200 powerpc/xive: guest exploitation of the XIVE interrupt controller This is the framework for using XIVE in a PowerVM guest. The support is very similar to the native one in a much simpler form. Each source is associated with an Event State Buffer (ESB). This is a two bit state machine which is used to trigger events. The bits are named "P" (pending) and "Q" (queued) and can be controlled by MMIO. The Guest OS registers event (or notifications) queues on which the HW will post event data for a target to notify. Instead of OPAL calls, a set of Hypervisors call are used to configure the interrupt sources and the event/notification queues of the guest: - H_INT_GET_SOURCE_INFO used to obtain the address of the MMIO page of the Event State Buffer (PQ bits) entry associated with the source. - H_INT_SET_SOURCE_CONFIG assigns a source to a "target". - H_INT_GET_SOURCE_CONFIG determines to which "target" and "priority" is assigned to a source - H_INT_GET_QUEUE_INFO returns the address of the notification management page associated with the specified "target" and "priority". - H_INT_SET_QUEUE_CONFIG sets or resets the event queue for a given "target" and "priority". It is also used to set the notification config associated with the queue, only unconditional notification for the moment. Reset is performed with a queue size of 0 and queueing is disabled in that case. - H_INT_GET_QUEUE_CONFIG returns the queue settings for a given "target" and "priority". - H_INT_RESET resets all of the partition's interrupt exploitation structures to their initial state, losing all configuration set via the hcalls H_INT_SET_SOURCE_CONFIG and H_INT_SET_QUEUE_CONFIG. - H_INT_SYNC issue a synchronisation on a source to make sure sure all notifications have reached their queue. As for XICS, the XIVE interface for the guest is described in the device tree under the "interrupt-controller" node. A couple of new properties are specific to XIVE : - "reg" contains the base address and size of the thread interrupt managnement areas (TIMA), also called rings, for the User level and for the Guest OS level. Only the Guest OS level is taken into account today. - "ibm,xive-eq-sizes" the size of the event queues. One cell per size supported, contains log2 of size, in ascending order. - "ibm,xive-lisn-ranges" the interrupt numbers ranges assigned to the guest. These are allocated using a simple bitmap. and also : - "/ibm,plat-res-int-priorities" contains a list of priorities that the hypervisor has reserved for its own use. Tested with a QEMU XIVE model for pseries and with the Power hypervisor. Signed-off-by: Cédric Le Goater Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 13 +- arch/powerpc/include/asm/xive.h | 3 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/powerpc/platforms/pseries/hotplug-cpu.c | 11 +- arch/powerpc/platforms/pseries/kexec.c | 6 +- arch/powerpc/platforms/pseries/setup.c | 8 +- arch/powerpc/platforms/pseries/smp.c | 27 +- arch/powerpc/sysdev/xive/Kconfig | 5 + arch/powerpc/sysdev/xive/Makefile | 1 + arch/powerpc/sysdev/xive/common.c | 13 + arch/powerpc/sysdev/xive/spapr.c | 618 +++++++++++++++++++++++++++ 11 files changed, 698 insertions(+), 8 deletions(-) commit 994ea2f41999113d84c317da3ec1e10aa6469b3f Author: Cédric Le Goater Date: Wed Aug 30 21:46:10 2017 +0200 powerpc/xive: introduce a common routine xive_queue_page_alloc() This routine will be used in the spapr backend. Also introduce a short xive_alloc_order() helper. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 16 ++++++++++++++++ arch/powerpc/sysdev/xive/native.c | 16 +++++----------- arch/powerpc/sysdev/xive/xive-internal.h | 6 ++++++ 3 files changed, 27 insertions(+), 11 deletions(-) commit cfd63736726a7fabb3dd89ea91cff143ac4dc8a7 Author: Nicolas Porcel Date: Sat Aug 19 00:20:51 2017 +0200 kbuild: Use KCONFIG_CONFIG in buildtar Previously, .config was used in buildtar script regardless of the value of KCONFIG_CONFIG. Signed-off-by: Nicolas Porcel Signed-off-by: Masahiro Yamada scripts/package/buildtar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32d9b70a053a835b4dfb33158fc03795ea103e44 Merge: 864150d db3cd7a Author: David S. Miller Date: Fri Sep 1 20:39:12 2017 -0700 Merge branch 'hv_netvsc-channel-settings-cleanups-and-fixes' Haiyang Zhang says: ==================== hv_netvsc: cleanups and fixes of channel settings This patch set cleans up some unused variables, unnecessary checks. Also fixed some limit checking of channel number. ==================== Signed-off-by: David S. Miller commit db3cd7af9d0f174475cbcc02c0e96a5408fe2dc2 Author: Haiyang Zhang Date: Fri Sep 1 14:30:07 2017 -0700 hv_netvsc: Fix the channel limit in netvsc_set_rxfh() The limit of setting receive indirection table value should be the current number of channels, not the VRSS_CHANNEL_MAX. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06be580ac7b650938cb3f2cf8cd02d73ff96d3e4 Author: Haiyang Zhang Date: Fri Sep 1 14:30:06 2017 -0700 hv_netvsc: Simplify the limit check in netvsc_set_channels() Because of the following code, net->num_tx_queues equals to VRSS_CHANNEL_MAX, and max_chn is less than or equals to VRSS_CHANNEL_MAX. netvsc_drv.c: alloc_etherdev_mq(sizeof(struct net_device_context), VRSS_CHANNEL_MAX); rndis_filter.c: net_device->max_chn = min_t(u32, VRSS_CHANNEL_MAX, num_possible_rss_qs); So this patch removes the unnecessary limit check before comparing with "max_chn". Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 3 --- 1 file changed, 3 deletions(-) commit 5c4217d05d3258fa9999ad959c9b6da791b70bfa Author: Haiyang Zhang Date: Fri Sep 1 14:30:05 2017 -0700 hv_netvsc: Simplify num_chn checking in rndis_filter_device_add() The minus one and assignment to a local variable is not necessary. This patch simplifies it. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 715e2ec532f6bffc8ee1cb9282c9e6cbf8809591 Author: Haiyang Zhang Date: Fri Sep 1 14:30:04 2017 -0700 hv_netvsc: Clean up an unused parameter in rndis_filter_set_rss_param() This patch removes the parameter, num_queue in rndis_filter_set_rss_param(), which is no longer in use. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/hyperv/rndis_filter.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit 864150dfa31dceab6ec5ca4579a2d35ede985cb7 Author: Ido Schimmel Date: Fri Sep 1 12:15:17 2017 +0300 net: Add module reference to FIB notifiers When a listener registers to the FIB notification chain it receives a dump of the FIB entries and rules from existing address families by invoking their dump operations. While we call into these modules we need to make sure they aren't removed. Do that by increasing their reference count before invoking their dump operations and decrease it afterwards. Fixes: 04b1d4e50e82 ("net: core: Make the FIB notification chain generic") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/net/fib_notifier.h | 2 ++ net/core/fib_notifier.c | 13 +++++++++++-- net/ipv4/fib_notifier.c | 2 ++ net/ipv6/fib6_notifier.c | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) commit 9e2cf36d5ca03837dc59d389d77282499c64201d Merge: 90a9631 ec158f7 Author: David S. Miller Date: Fri Sep 1 20:31:19 2017 -0700 Merge branch 'netvsc-vf-cleanups' Stephen Hemminger says: ==================== netvsc: transparent VF related cleanups The first gets rid of unnecessary ref counting, and second allows removing hv_netvsc driver even if VF present. ==================== Signed-off-by: David S. Miller commit ec158f77def2df084d9f62565357e3037b04bd3f Author: Stephen Hemminger Date: Thu Aug 31 16:16:13 2017 -0700 netvsc: allow driver to be removed even if VF is present If VF is attached then can still allow netvsc driver module to be removed. Just have to make sure and do the cleanup. Also, avoid extra rtnl round trip when calling unregister. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 9a0c48df0d77602da3958a4c8fc2abb9521b0ade Author: Stephen Hemminger Date: Thu Aug 31 16:16:12 2017 -0700 netvsc: cleanup datapath switch Use one routine for datapath up/down. Don't need to reopen the rndis layer. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) commit 90a9631cf8c27a2b4702af600cad390fcabb88fb Author: John Fastabend Date: Fri Sep 1 11:29:26 2017 -0700 bpf: sockmap update/simplify memory accounting scheme Instead of tracking wmem_queued and sk_mem_charge by incrementing in the verdict SK_REDIRECT paths and decrementing in the tx work path use skb_set_owner_w and sock_writeable helpers. This solves a few issues with the current code. First, in SK_REDIRECT inc on sk_wmem_queued and sk_mem_charge were being done without the peers sock lock being held. Under stress this can result in accounting errors when tx work and/or multiple verdict decisions are working on the peer psock. Additionally, this cleans up the code because we can rely on the default destructor to decrement memory accounting on kfree_skb. Also this will trigger sk_write_space when space becomes available on kfree_skb() which wasn't happening before and prevent __sk_free from being called until all in-flight packets are completed. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 250b0f78310c11b41b941f6ccd6938b5cf7970cd Merge: 487234c c1d1b43 Author: David S. Miller Date: Fri Sep 1 20:22:04 2017 -0700 Merge branch 'net-ubuf_info-refcnt-conversion' Eric Dumazet says: ==================== net: ubuf_info.refcnt conversion Yet another atomic_t -> refcount_t conversion, split in two patches. First patch prepares the automatic conversion done in the second patch. ==================== Signed-off-by: David S. Miller commit c1d1b437816f0afa99202be3cb650c9d174667bc Author: Eric Dumazet Date: Thu Aug 31 16:48:22 2017 -0700 net: convert (struct ubuf_info)->refcnt 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. v2: added the change in drivers/vhost/net.c as spotted by Willem. Signed-off-by: Eric Dumazet Acked-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/vhost/net.c | 2 +- include/linux/skbuff.h | 5 +++-- net/core/skbuff.c | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) commit db5bce32fbe19f0c7482fb5a40a33178bbe7b11b Author: Eric Dumazet Date: Thu Aug 31 16:48:21 2017 -0700 net: prepare (struct ubuf_info)->refcnt conversion In order to convert this atomic_t refcnt to refcount_t, we need to init the refcount to one to not trigger a 0 -> 1 transition. This also removes one atomic operation in fast path. v2: removed dead code in sock_zerocopy_put_abort() as suggested by Willem. Signed-off-by: Eric Dumazet Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 10 ++-------- net/ipv4/tcp.c | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) commit 487234cc1954a1c09115a82b45ebcc2086657572 Author: Florian Fainelli Date: Fri Sep 1 17:32:34 2017 -0700 net: systemport: Correctly set TSB endian for host Similarly to how we configure the RSB (Receive Status Block) we also need to set the TSB (Transmit Status Block) based on the host endian. This was missing from the commit indicated below. Fixes: 389a06bc534e ("net: systemport: Set correct RSB endian bits based on host") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 13 +++++++++++++ drivers/net/ethernet/broadcom/bcmsysport.h | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) commit d49e3a9f5ec493270d53b7796be4da9a1a804ce3 Merge: 6391c4f c03fa9b Author: David S. Miller Date: Fri Sep 1 18:38:09 2017 -0700 Merge branch 'inet_diag-TCP-MD5' Ivan Delalande says: ==================== inet_diag: report TCP MD5 signing keys and addresses Allow userspace to retrieve MD5 signature keys and addresses configured on TCP sockets through inet_diag. Thanks to Eric Dumazet and Stephen Hemminger for their useful explanations and feedback. v5: - memset the whole netlink payload after it has been nla_reserve-d in tcp_diag_put_md5sig (a third memset had to be added for tcpm_key so we might as well have just one for entire region). - move the nla_total_size call from inet_sk_attr_size to the idiag_get_aux_size defined by protocols as they could add multiple netlink attributes, - add check for net_admin in tcp_diag_get_aux_size. v4: - add new struct tcp_diag_md5sig to report the data instead of tcp_md5sig to avoid wasting 112 bytes on every tcpm_addr, - memset tcpm_addr on IPv4 addresses to avoid leaks, - style fix in inet_diag_dump_one_icsk. v3: - rename inet_diag_*md5sig in tcp_diag.c to tcp_diag_* for consistency, - don't lock the socket in tcp_diag_put_md5sig, - add checks on md5sig_count in tcp_diag_put_md5sig to not create the netlink attribute if the list is empty, and to avoid overflows or memory leaks if the list has changed in the meantime. v2: - move changes to tcp_diag.c and extend inet_diag_handler to allow protocols to provide additional data on INET_DIAG_INFO, - lock socket before calling tcp_diag_put_md5sig. I also have a patch for iproute2/ss to test this change, making it print this new attribute. I'm planning to polish and send it if this series gets applied. ==================== Signed-off-by: David S. Miller commit c03fa9bcacd9ac04595cc13f34f3445f0a5ecf13 Author: Ivan Delalande Date: Thu Aug 31 09:59:39 2017 -0700 tcp_diag: report TCP MD5 signing keys and addresses Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is not possible to retrieve these from the kernel once they have been configured on sockets. Signed-off-by: Ivan Delalande Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/inet_diag.h | 1 + include/uapi/linux/tcp.h | 9 ++++ net/ipv4/tcp_diag.c | 109 ++++++++++++++++++++++++++++++++++++++--- 3 files changed, 113 insertions(+), 6 deletions(-) commit b37e88407c1d78f157778d73427cd7e9e1d6369d Author: Ivan Delalande Date: Thu Aug 31 09:59:38 2017 -0700 inet_diag: allow protocols to provide additional data Extend inet_diag_handler to allow individual protocols to report additional data on INET_DIAG_INFO through idiag_get_aux. The size can be dynamic and is computed by idiag_get_aux_size. Signed-off-by: Ivan Delalande Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/inet_diag.h | 7 +++++++ net/ipv4/inet_diag.c | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) commit 6391c4f67ad1643a17b54376e381038b9e660a0f Author: Thomas Meyer Date: Thu Aug 31 16:18:15 2017 +0200 ipv6: sr: Use ARRAY_SIZE macro Grepping for "sizeof\(.+\) / sizeof\(" found this as one of the first candidates. Maybe a coccinelle can catch all of those. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller net/ipv6/seg6_hmac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5debc53ffecf79ca1c2d6fc194764cb6a8fa91a9 Author: Colin Ian King Date: Thu Aug 31 15:07:27 2017 +0100 net: qualcomm: rmnet: remove unused variable priv priv is being assigned but is never used, so remove it. Cleans up clang build warning: "warning: Value stored to 'priv' is never read" Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Colin Ian King Acked-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 3 --- 1 file changed, 3 deletions(-) commit 33c8182166273fa002ed11fd4ecd96120512941a Author: Colin Ian King Date: Thu Aug 31 14:57:15 2017 +0100 net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size Don't populate the array bcm7xxx_suspend_cfg A on the stack, instead make it static. Makes the object code smaller by over 300 bytes: Before: text data bss dec hex filename 6351 8146 0 14497 38a1 drivers/net/phy/bcm7xxx.o After: text data bss dec hex filename 5986 8210 0 14196 3774 drivers/net/phy/bcm7xxx.o Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d05071ed4a8a0acbc918bae76571d917ab05119b Author: Colin Ian King Date: Thu Aug 31 14:24:49 2017 +0100 fsl/fman: make arrays port_ids static, reduces object code size Don't populate the arrays port_ids on the stack, instead make them static. Makes the object code smaller by over 700 bytes: Before: text data bss dec hex filename 28785 5832 192 34809 87f9 fman.o After: text data bss dec hex filename 27921 5992 192 34105 8539 fman.o Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 6026e043d09012c6269f9a96a808d52d9c498224 Merge: 4cc5b44 138e4ad Author: David S. Miller Date: Fri Sep 1 17:42:05 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Three cases of simple overlapping changes. Signed-off-by: David S. Miller commit 4cc5b44b29a9de9b3f841efedaa3f769066c63cc Author: Eric Dumazet Date: Fri Sep 1 14:03:32 2017 -0700 inetpeer: fix RCU lookup() Excess of seafood or something happened while I cooked the commit adding RB tree to inetpeer. Of course, RCU rules need to be respected or bad things can happen. In this particular loop, we need to read *pp once per iteration, not twice. Fixes: b145425f269a ("inetpeer: remove AVL implementation in favor of RB tree") Reported-by: John Sperbeck Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inetpeer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 152b8126889d371f55cd30d2fffb52044ce2008d Author: Yangbo Lu Date: Fri Sep 1 10:32:02 2017 +0800 ARM: multi_v7_defconfig: make eSDHC driver built-in Sometimes root file system is deployed on SD card. It's proper to build eSDHC driver into kernel. Signed-off-by: Yangbo Lu Acked-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3e36ab37c9eac0f2a821806fea05c64f367304b Merge: ebc12a5 2b17939 Author: Olof Johansson Date: Fri Sep 1 16:45:36 2017 -0700 Merge tag 'at91-ab-4.14-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt DT for 4.14 - sama5d2: add classD, ISC and QSPI - New SoM and board: sama5d27 SoM1 - at91sam9g45: add AC97 * tag 'at91-ab-4.14-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: at91sam9g45: add AC97 ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd ARM: dts: at91: sama5d2: add classd nodes ARM: dts: at91: sama5d2_xplained: use pin macros instead of numbers ARM: dts: at91: at91-sama5d27_som1_ek: Add sama5d27 SoM1 EK support ARM: dts: at91: at91-sama5d27_som1: add sama5d27 SoM1 support ARM: dts: at91: sama5d2: add isc node ARM: dts: at91: sama5d2: add QSPI nodes Signed-off-by: Olof Johansson commit c911171a7488c0028cfa05f2cf52f0067c7c880b Merge: ed09f6d 72af17b Author: Olof Johansson Date: Fri Sep 1 16:44:19 2017 -0700 Merge tag 'mvebu-dt64-4.14-4' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.14 (part 4) Adding more resources on the network controller ppv2.2 on Armada 7K/8K allowing to use last improvement introduced in the driver. Also enabling more network ports on the mcbin (A8K base board) * tag 'mvebu-dt64-4.14-4' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: mcbin: enable more networking ports arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node arm64: dts: marvell: add TX interrupts for PPv2.2 Signed-off-by: Olof Johansson commit ed09f6d05c1839ee658c664419a9ad0c58168216 Merge: c338aa5 fe45174 Author: Olof Johansson Date: Fri Sep 1 16:42:51 2017 -0700 Merge tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt64 Allwinner fixes for 4.13, take 3 This is a revert of the EMAC bindings. The discussion has not settled down yet on a proper representation of the PHY, and therefore we cannot commit to a binding yet * tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm: dts: sunxi: Revert EMAC changes arm64: dts: allwinner: Revert EMAC changes dt-bindings: net: Revert sun8i dwmac binding arm64: allwinner: h5: fix pinctrl IRQs arm64: allwinner: a64: sopine: add missing ethernet0 alias arm64: allwinner: a64: pine64: add missing ethernet0 alias arm64: allwinner: a64: bananapi-m64: add missing ethernet0 alias Signed-off-by: Olof Johansson Conflicts: arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts commit ebc12a529bfd6589d271b736bcf32919f9d3328f Merge: 1595de0 fe45174 Author: Olof Johansson Date: Fri Sep 1 16:41:42 2017 -0700 Merge tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner fixes for 4.13, take 3 This is a revert of the EMAC bindings. The discussion has not settled down yet on a proper representation of the PHY, and therefore we cannot commit to a binding yet * tag 'sunxi-fixes-for-4.13-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm: dts: sunxi: Revert EMAC changes arm64: dts: allwinner: Revert EMAC changes dt-bindings: net: Revert sun8i dwmac binding arm64: allwinner: h5: fix pinctrl IRQs arm64: allwinner: a64: sopine: add missing ethernet0 alias arm64: allwinner: a64: pine64: add missing ethernet0 alias arm64: allwinner: a64: bananapi-m64: add missing ethernet0 alias Signed-off-by: Olof Johansson commit 73c950da6ec523136090d6d4d6907a6ea8e8b67b Author: Russell King Date: Wed Jul 26 09:18:08 2017 +0100 clk: si5351: fix PLL reset Changing the audio sample rate on the SolidRun Cubox disrupts the video output. The Si5351 provides both the video clock (using PLLA on output 0) and the audio clock (using PLLB on output 2). When the rate of clock output 2 is changed, it reconfigures PLLB, which results in both PLLA and PLLB being reset. The reset of PLLA causes clock output 0 to be disrupted, thereby causing a loss of sync by the attached display device. Hence, each time the audio sample rate changes (eg, when a video player starts up, or when starting to play music) the video display momentarily blanks while the Si5351 settles down. Prior to the commit below, this behaviour did not happen. Fix this by only resetting only the PLL which has been changed. Fixes: 6dc669a22c77 ("clk: si5351: Add PLL soft reset") Signed-off-by: Russell King Acked-by: Sebastian Hesselbarth Signed-off-by: Stephen Boyd drivers/clk/clk-si5351.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 7c89717f82bd305e3102963485f3da160d11bcf6 Author: Bjorn Andersson Date: Sun Aug 27 22:34:53 2017 -0700 remoteproc: Introduce rproc handle accessor for children In certain circumstances rpmsg devices needs to acquire a handle to the ancestor remoteproc instance, e.g. to invoke rproc_report_crash() when a fatal error is detected. Introduce an interface that walks the device tree in search for a remoteproc instance and return this. Tested-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 18 ++++++++++++++++++ include/linux/remoteproc.h | 2 ++ 2 files changed, 20 insertions(+) commit 4ab6cf11e703de24f21a50a027a48fca787f7a00 Author: Quentin Schulz Date: Thu Aug 10 08:34:07 2017 +0200 ASoC: atmel-classd: remove aclk clock Since gclk (generated-clk) is now able to determine the rate of the audio_pll, there is no need for classd to have a direct phandle to the audio_pll while already having a phandle to gclk. Thus, remove all mentions to aclk in classd driver and update macros and variable names. Signed-off-by: Quentin Schulz Acked-by: Mark Brown Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd sound/soc/atmel/atmel-classd.c | 47 +++++++++++++----------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) commit f8fef412f34ba55fea97b7687ea881c00caf6fc0 Author: Quentin Schulz Date: Thu Aug 10 08:34:06 2017 +0200 ASoC: atmel-classd: remove aclk clock from DT binding Since gclk (generated-clk) is now able to determine the rate of the audio_pll, there is no need for classd to have a direct phandle to the audio_pll while already having a phandle to gclk. This binding is used by no board in mainline so it is safe to be modified. Signed-off-by: Quentin Schulz Acked-by: Mark Brown Acked-by: Rob Herring Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/sound/atmel-classd.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1a1a36d72e3d34afbb738bd3b00a0b09382962fb Author: Quentin Schulz Date: Thu Aug 10 08:34:05 2017 +0200 clk: at91: clk-generated: make gclk determine audio_pll rate This allows gclk to determine audio_pll rate and set the parent rate accordingly. However, there are multiple children clocks that could technically change the rate of audio_pll (via gck). With the rate locking, the first consumer to enable the clock will be the one definitely setting the rate of the clock. Since audio IPs are most likely to request the same rate, we enforce that the only clks able to modify gck rate are those of audio IPs. To remain consistent, we deny other clocks to be children of audio_pll. Signed-off-by: Quentin Schulz Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 63 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) commit 8a8f4bf0c48055f0648b5449f4685b6cd0fc1c85 Author: Quentin Schulz Date: Thu Aug 10 08:34:04 2017 +0200 clk: at91: clk-generated: create function to find best_diff The way to find the best_diff and do the appropriate process afterwards can be re-used. This patch prepares the driver for an upcoming patch that will allow clk_generated to determine the rate of the audio_pll. Signed-off-by: Quentin Schulz Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 41 ++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 0865805d82d4c822647ee35ab2629c48cc40706b Author: Quentin Schulz Date: Thu Aug 10 08:34:03 2017 +0200 clk: at91: add audio pll clock drivers This new clock driver set allows to have a fractional divided clock that would generate a precise clock particularly suitable for audio applications. The main audio pll clock has two children clocks: one that is connected to the PMC, the other that can directly drive a pad. As these two routes have different enable bits and different dividers and divider formulas, they are handled by two different drivers. Each of them could modify the rate of the main audio pll parent. The main audio pll clock can output 620MHz to 700MHz. Signed-off-by: Nicolas Ferre Signed-off-by: Quentin Schulz Acked-by: Boris Brezillon Signed-off-by: Stephen Boyd arch/arm/mach-at91/Kconfig | 4 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-audio-pll.c | 536 +++++++++++++++++++++++++++++++++++++++ include/linux/clk/at91_pmc.h | 25 ++ 4 files changed, 566 insertions(+) commit 33202fa32d2f04f613ef748baebfa734013fdbbf Author: Quentin Schulz Date: Thu Aug 10 08:34:02 2017 +0200 dt-bindings: clk: at91: add audio plls to the compatible list This new clock driver set allows to have a fractional divided clock that would generate a precise clock particularly suitable for audio applications. The main audio pll clock has two children clocks: one that is connected to the PMC, the other that can directly drive a pad. As these two routes have different enable bits and different dividers and divider formulas, they are handled by two different drivers. This adds the audio plls (frac, pad and pmc) to the compatible list of at91 clocks in DT binding. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/at91-clock.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8c7aa63289470ba42c3a34e37bdc574308d024bd Author: Quentin Schulz Date: Thu Aug 10 08:34:01 2017 +0200 clk: at91: clk-generated: remove useless divisor loop The driver requests the current clk rate of each of its parent clocks to decide whether a clock rate is suitable or not. It does not request determine_rate from a parent clock which could request a rate change in parent clock (i.e. there is no parent rate propagation). We know the rate we want (passed along req argument of the function) and the parent clock rate, thus we know the closest rounded divisor, we don't need to iterate over the available divisors to find the best one for a given clock. Signed-off-by: Quentin Schulz Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 4fec0a5a193666279635eeb0257984b7a88ee332 Author: Bjorn Andersson Date: Fri Sep 1 15:42:29 2017 -0700 remoteproc: qcom: Make ssr_notifiers local The ssr_notifiers variable should be local, so add the missing static storage classifier. Fixes: 1e140df04965 ("remoteproc: qcom: Add support for SSR notifications") Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b41d6c8e6967b4243e5b721aa4d778eb6f7d4e7 Author: Bjorn Andersson Date: Tue Aug 29 16:13:36 2017 -0700 dt-bindings: soc: qcom: Extend GLINK to cover SMEM In addition to using GLINK for communication with the RPM it can be used ontop of SMEM for communicating with remoteprocs, extend the binding to also describe this case and reference the GLINK binding from the affected remoteproc bindings. Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/remoteproc/qcom,adsp.txt | 7 ++++--- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 5 +++++ Documentation/devicetree/bindings/soc/qcom/qcom,glink.txt | 13 +++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) commit eea07023e6d9523ddf446bbac771e78805614b43 Author: Bjorn Andersson Date: Tue Aug 29 16:13:35 2017 -0700 remoteproc: qcom: adsp: Allow defining GLINK edge Introduce the GLINK subdev, which allows the definition of a GLINK edge as child of a remoteproc. Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_adsp_pil.c | 3 +++ drivers/remoteproc/qcom_common.c | 49 ++++++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_common.h | 11 +++++++++ 4 files changed, 64 insertions(+) commit 3b79b26101936bbdb7a5c69161c69d65a1108fb0 Author: Michael Ellerman Date: Sat Sep 2 07:48:17 2017 +1000 powerpc/sstep: Avoid used uninitialized error Older compilers think val may be used uninitialized: arch/powerpc/lib/sstep.c: In function 'emulate_loadstore': arch/powerpc/lib/sstep.c:2758:23: error: 'val' may be used uninitialized in this function We know better, but initialise val to 0 to avoid breaking the build. Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 1 + 1 file changed, 1 insertion(+) commit 96291d565550c1fd363e488cc17cb3189d2e4cc2 Author: Bjorn Helgaas Date: Fri Sep 1 16:35:50 2017 -0500 PCI: Fix typos and whitespace errors Fix various typos and whitespace errors: s/Synopsis/Synopsys/ s/Designware/DesignWare/ s/Keystine/Keystone/ s/gpio/GPIO/ s/pcie/PCIe/ s/phy/PHY/ s/confgiruation/configuration/ No functional change intended. Signed-off-by: Bjorn Helgaas CREDITS | 2 +- .../devicetree/bindings/pci/83xx-512x-pci.txt | 6 +++--- .../devicetree/bindings/pci/altera-pcie.txt | 18 ++++++++-------- .../devicetree/bindings/pci/axis,artpec6-pcie.txt | 2 +- .../devicetree/bindings/pci/designware-pcie.txt | 24 ++++++++++------------ .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 2 +- .../devicetree/bindings/pci/hisilicon-pcie.txt | 4 ++-- .../devicetree/bindings/pci/kirin-pcie.txt | 8 ++++---- .../devicetree/bindings/pci/layerscape-pci.txt | 2 +- .../devicetree/bindings/pci/mvebu-pci.txt | 2 +- .../devicetree/bindings/pci/pci-armada8k.txt | 2 +- .../devicetree/bindings/pci/pci-keystone.txt | 15 +++++++------- .../devicetree/bindings/pci/qcom,pcie.txt | 4 ++-- .../devicetree/bindings/pci/ralink,rt3883-pci.txt | 2 +- Documentation/devicetree/bindings/pci/rcar-pci.txt | 7 +++---- .../devicetree/bindings/pci/rockchip-pcie.txt | 2 +- .../bindings/pci/samsung,exynos5440-pcie.txt | 22 ++++++++++---------- .../devicetree/bindings/pci/spear13xx-pcie.txt | 6 +++--- Documentation/devicetree/bindings/pci/ti-pci.txt | 8 ++++---- .../devicetree/bindings/pci/versatile.txt | 2 +- .../devicetree/bindings/pci/xgene-pci-msi.txt | 5 +++-- .../devicetree/bindings/pci/xgene-pci.txt | 8 ++++---- .../devicetree/bindings/pci/xilinx-nwl-pcie.txt | 7 ++++--- MAINTAINERS | 2 +- drivers/pci/dwc/Kconfig | 12 +++++------ drivers/pci/dwc/pci-dra7xx.c | 1 - drivers/pci/dwc/pci-keystone-dw.c | 2 +- drivers/pci/dwc/pcie-designware-ep.c | 2 +- drivers/pci/dwc/pcie-designware-host.c | 2 +- drivers/pci/dwc/pcie-designware.c | 2 +- drivers/pci/dwc/pcie-designware.h | 2 +- drivers/pci/host/pcie-rockchip.c | 2 +- drivers/pci/host/pcie-xilinx.c | 2 +- drivers/pci/pcie/aer/aerdrv_core.c | 4 ++-- drivers/pci/quirks.c | 2 +- include/linux/aer.h | 5 ++--- include/linux/pcieport_if.h | 2 +- 37 files changed, 99 insertions(+), 103 deletions(-) commit cacf7eaf2a36cc51c24b591d681676b6d27a7a6e Author: Shawn Lin Date: Fri Sep 1 16:35:30 2017 -0500 PCI: Remove unused "res" variable from pci_resource_io() The "res" variable in pci_resource_io() is never used. Remove it. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 3 --- 1 file changed, 3 deletions(-) commit 0142626d08223b0f6ad04859301b53178f11c317 Author: Shawn Lin Date: Fri Sep 1 16:35:20 2017 -0500 PCI: Correct kernel-doc of pci_vpd_srdt_size(), pci_vpd_srdt_tag() The kernel-doc comments don't match the arguments, so fix the comments. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas include/linux/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65bce46298d064dff9db1282e17bb26602715819 Author: Loic Poulain Date: Fri Sep 1 13:41:17 2017 -0700 Bluetooth: make baswap src const Signed-off-by: Loic Poulain Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/lib.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 60702867008172c5bd7b5aa82964123e252c2612 Author: Paul Burton Date: Wed Aug 30 09:33:30 2017 -0700 MIPS: Malta: Use new GIC accessor functions Use the accessor functions provided by asm/mips-gic.h rather than calling functions provided by the GIC irqchip driver, in preparation for those non-IRQ-related functions being removed from the irqchip driver. Signed-off-by: Paul Burton Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8bb48f79ea70875be1b4c5d5167a43cc6513d6e1 Author: Andreas Färber Date: Fri Aug 25 00:52:36 2017 +0200 clk: mb86s7x: Drop non-building driver It fails to build once we introduce the ARCH_MB86S7X Kconfig symbol: drivers/clk/clk-mb86s7x.c:27:10: fatal error: soc/mb86s7x/scb_mhu.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. And when commenting out that line, we get: drivers/clk/clk-mb86s7x.c: In function 'crg_gate_control': drivers/clk/clk-mb86s7x.c:72:8: error: implicit declaration of function 'mb86s7x_send_packet' [-Werror=implicit-function-declaration] ret = mb86s7x_send_packet(CMD_PERI_CLOCK_GATE_SET_REQ, ^~~~~~~~~~~~~~~~~~~ drivers/clk/clk-mb86s7x.c:72:28: error: 'CMD_PERI_CLOCK_GATE_SET_REQ' undeclared (first use in this function) ret = mb86s7x_send_packet(CMD_PERI_CLOCK_GATE_SET_REQ, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/clk-mb86s7x.c:72:28: note: each undeclared identifier is reported only once for each function it appears in drivers/clk/clk-mb86s7x.c: In function 'crg_rate_control': drivers/clk/clk-mb86s7x.c:116:10: error: 'CMD_PERI_CLOCK_RATE_SET_REQ' undeclared (first use in this function) code = CMD_PERI_CLOCK_RATE_SET_REQ; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/clk-mb86s7x.c:121:10: error: 'CMD_PERI_CLOCK_RATE_GET_REQ' undeclared (first use in this function); did you mean 'CMD_PERI_CLOCK_RATE_SET_REQ'? code = CMD_PERI_CLOCK_RATE_GET_REQ; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ CMD_PERI_CLOCK_RATE_SET_REQ drivers/clk/clk-mb86s7x.c: In function 'mhu_cluster_rate': drivers/clk/clk-mb86s7x.c:276:10: error: 'CMD_CPU_CLOCK_RATE_GET_REQ' undeclared (first use in this function) code = CMD_CPU_CLOCK_RATE_GET_REQ; ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/clk-mb86s7x.c:278:10: error: 'CMD_CPU_CLOCK_RATE_SET_REQ' undeclared (first use in this function); did you mean 'CMD_CPU_CLOCK_RATE_GET_REQ'? code = CMD_CPU_CLOCK_RATE_SET_REQ; ^~~~~~~~~~~~~~~~~~~~~~~~~~ CMD_CPU_CLOCK_RATE_GET_REQ cc1: some warnings being treated as errors scripts/Makefile.build:302: recipe for target 'drivers/clk/clk-mb86s7x.o' failed make[2]: *** [drivers/clk/clk-mb86s7x.o] Error 1 Remove the driver for now. Signed-off-by: Andreas Färber Signed-off-by: Stephen Boyd drivers/clk/Makefile | 1 - drivers/clk/clk-mb86s7x.c | 390 ---------------------------------------------- 2 files changed, 391 deletions(-) commit d897246df9fc0a5df97a784bf7b072be4a6ae479 Author: Darrick J. Wong Date: Thu Aug 31 13:47:35 2017 -0700 fsmap: fix documentation of FMR_OF_LAST The FMR_OF_LAST flag is set on the last fsmap record being returned for the dataset requested, contrary to what the header file says. Fix the docs to reflect the behavior of all fsmap implementations. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner include/uapi/linux/fsmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cc1ee5e654114aa7fac6993488ad2cd0b3411bb Author: Darrick J. Wong Date: Wed Aug 30 16:06:36 2017 -0700 xfs: simplify the rmap code in xfs_bmse_merge In Christoph's patch to refactor xfs_bmse_merge, the updated rmap code does more work than it needs to (because map-extent auto-merges records). Remove the unnecessary unmap and save ourselves a deferred op. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f91fb956f243086c7a95c508f01152c74c35f6ce Author: Eric Sandeen Date: Wed Aug 30 09:24:12 2017 -0700 xfs: remove unused flags arg from xfs_file_iomap_begin_delay Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 47c7d0b19502583120c3f396c7559e7a77288a68 Author: Amir Goldstein Date: Wed Aug 30 09:23:12 2017 -0700 xfs: fix incorrect log_flushed on fsync When calling into _xfs_log_force{,_lsn}() with a pointer to log_flushed variable, log_flushed will be set to 1 if: 1. xlog_sync() is called to flush the active log buffer AND/OR 2. xlog_wait() is called to wait on a syncing log buffers xfs_file_fsync() checks the value of log_flushed after _xfs_log_force_lsn() call to optimize away an explicit PREFLUSH request to the data block device after writing out all the file's pages to disk. This optimization is incorrect in the following sequence of events: Task A Task B ------------------------------------------------------- xfs_file_fsync() _xfs_log_force_lsn() xlog_sync() [submit PREFLUSH] xfs_file_fsync() file_write_and_wait_range() [submit WRITE X] [endio WRITE X] _xfs_log_force_lsn() xlog_wait() [endio PREFLUSH] The write X is not guarantied to be on persistent storage when PREFLUSH request in completed, because write A was submitted after the PREFLUSH request, but xfs_file_fsync() of task A will be notified of log_flushed=1 and will skip explicit flush. If the system crashes after fsync of task A, write X may not be present on disk after reboot. This bug was discovered and demonstrated using Josef Bacik's dm-log-writes target, which can be used to record block io operations and then replay a subset of these operations onto the target device. The test goes something like this: - Use fsx to execute ops of a file and record ops on log device - Every now and then fsync the file, store md5 of file and mark the location in the log - Then replay log onto device for each mark, mount fs and compare md5 of file to stored value Cc: Christoph Hellwig Cc: Josef Bacik Cc: Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 7 ------- 1 file changed, 7 deletions(-) commit 742d84290739ae908f1b61b7d17ea382c8c0073a Author: Christoph Hellwig Date: Wed Aug 30 09:23:01 2017 -0700 xfs: disable per-inode DAX flag Currently flag switching can be used to easily crash the kernel. Disable the per-inode DAX flag until that is sorted out. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8bfadd8d03b7ff8fe70be3d3a6980e6a20cb5a92 Author: Christoph Hellwig Date: Tue Aug 29 15:44:14 2017 -0700 xfs: replace xfs_qm_get_rtblks with a direct call to xfs_bmap_count_leaves Use the existing functionality instead of directly poking into the extent list. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) commit e17a5c6f0e3609da83270f42698b1dfedde86f44 Author: Christoph Hellwig Date: Tue Aug 29 15:44:14 2017 -0700 xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent This avoids poking into the internals of the extent list. Also return the number of extents as the return value instead of an additional by reference argument, and make it available to callers outside of xfs_bmap_util.c Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 21 ++++++++++----------- fs/xfs/xfs_bmap_util.h | 1 + 2 files changed, 11 insertions(+), 11 deletions(-) commit 4c35445b591ee669097c5b98e4bb677808e9f582 Author: Christoph Hellwig Date: Tue Aug 29 15:44:13 2017 -0700 xfs: use xfs_iext_*_extent helpers in xfs_bmap_split_extent_at This abstracts the function away from details of the low-level extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 4da6b514eaa168c246fc5c1245c4f82084bcf24e Author: Christoph Hellwig Date: Tue Aug 29 15:44:13 2017 -0700 xfs: use xfs_iext_*_extent helpers in xfs_bmap_shift_extents This abstracts the function away from details of the low-level extent list implementation. Note that it seems like the previous implementation of rmap for the merge case was completely broken, but it no seems appear to trigger that. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 180 +++++++++++++++++++++++------------------------ 1 file changed, 88 insertions(+), 92 deletions(-) commit 05b7c8ab2be71e6fef4615451e7af1bc79ffdf29 Author: Christoph Hellwig Date: Tue Aug 29 15:44:12 2017 -0700 xfs: move some code around inside xfs_bmap_shift_extents For the first right move we need to look up next_fsb. That means our last fsb that contains next_fsb must also be the current extent, so take advantage of that by moving the code around a bit. 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, 29 insertions(+), 25 deletions(-) commit bc75705d00637c5f7b0346bf63094a9899c3d516 Author: Shaohua Li Date: Fri Sep 1 11:15:18 2017 -0700 block/loop: remove unused field nobody uses the list. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.h | 1 - 1 file changed, 1 deletion(-) commit 92d773324b7edbd36bf0c28c1e0157763aeccc92 Author: Shaohua Li Date: Fri Sep 1 11:15:17 2017 -0700 block/loop: fix use after free lo_rw_aio->call_read_iter-> 1 aops->direct_IO 2 iov_iter_revert lo_rw_aio_complete could happen between 1 and 2, the bio and bvec could be freed before 2, which accesses bvec. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.c | 16 +++++++++++++--- drivers/block/loop.h | 5 ++++- 2 files changed, 17 insertions(+), 4 deletions(-) commit 8db6c34f1dbc8e06aa016a9b829b06902c3e1340 Author: Serge E. Hallyn Date: Mon May 8 13:11:56 2017 -0500 Introduce v3 namespaced file capabilities Root in a non-initial user ns cannot be trusted to write a traditional security.capability xattr. If it were allowed to do so, then any unprivileged user on the host could map his own uid to root in a private namespace, write the xattr, and execute the file with privilege on the host. However supporting file capabilities in a user namespace is very desirable. Not doing so means that any programs designed to run with limited privilege must continue to support other methods of gaining and dropping privilege. For instance a program installer must detect whether file capabilities can be assigned, and assign them if so but set setuid-root otherwise. The program in turn must know how to drop partial capabilities, and do so only if setuid-root. This patch introduces v3 of the security.capability xattr. It builds a vfs_ns_cap_data struct by appending a uid_t rootid to struct vfs_cap_data. This is the absolute uid_t (that is, the uid_t in user namespace which mounted the filesystem, usually init_user_ns) of the root id in whose namespaces the file capabilities may take effect. When a task asks to write a v2 security.capability xattr, if it is privileged with respect to the userns which mounted the filesystem, then nothing should change. Otherwise, the kernel will transparently rewrite the xattr as a v3 with the appropriate rootid. This is done during the execution of setxattr() to catch user-space-initiated capability writes. Subsequently, any task executing the file which has the noted kuid as its root uid, or which is in a descendent user_ns of such a user_ns, will run the file with capabilities. Similarly when asking to read file capabilities, a v3 capability will be presented as v2 if it applies to the caller's namespace. If a task writes a v3 security.capability, then it can provide a uid for the xattr so long as the uid is valid in its own user namespace, and it is privileged with CAP_SETFCAP over its namespace. The kernel will translate that rootid to an absolute uid, and write that to disk. After this, a task in the writer's namespace will not be able to use those capabilities (unless rootid was 0), but a task in a namespace where the given uid is root will. Only a single security.capability xattr may exist at a time for a given file. A task may overwrite an existing xattr so long as it is privileged over the inode. Note this is a departure from previous semantics, which required privilege to remove a security.capability xattr. This check can be re-added if deemed useful. This allows a simple setxattr to work, allows tar/untar to work, and allows us to tar in one namespace and untar in another while preserving the capability, without risking leaking privilege into a parent namespace. Example using tar: $ cp /bin/sleep sleepx $ mkdir b1 b2 $ lxc-usernsexec -m b:0:100000:1 -m b:1:$(id -u):1 -- chown 0:0 b1 $ lxc-usernsexec -m b:0:100001:1 -m b:1:$(id -u):1 -- chown 0:0 b2 $ lxc-usernsexec -m b:0:100000:1000 -- tar --xattrs-include=security.capability --xattrs -cf b1/sleepx.tar sleepx $ lxc-usernsexec -m b:0:100001:1000 -- tar --xattrs-include=security.capability --xattrs -C b2 -xf b1/sleepx.tar $ lxc-usernsexec -m b:0:100001:1000 -- getcap b2/sleepx b2/sleepx = cap_sys_admin+ep # /opt/ltp/testcases/bin/getv3xattr b2/sleepx v3 xattr, rootid is 100001 A patch to linux-test-project adding a new set of tests for this functionality is in the nsfscaps branch at github.com/hallyn/ltp Changelog: Nov 02 2016: fix invalid check at refuse_fcap_overwrite() Nov 07 2016: convert rootid from and to fs user_ns (From ebiederm: mar 28 2017) commoncap.c: fix typos - s/v4/v3 get_vfs_caps_from_disk: clarify the fs_ns root access check nsfscaps: change the code split for cap_inode_setxattr() Apr 09 2017: don't return v3 cap for caps owned by current root. return a v2 cap for a true v2 cap in non-init ns Apr 18 2017: . Change the flow of fscap writing to support s_user_ns writing. . Remove refuse_fcap_overwrite(). The value of the previous xattr doesn't matter. Apr 24 2017: . incorporate Eric's incremental diff . move cap_convert_nscap to setxattr and simplify its usage May 8, 2017: . fix leaking dentry refcount in cap_inode_getsecurity Signed-off-by: Serge Hallyn Signed-off-by: Eric W. Biederman fs/xattr.c | 6 + include/linux/capability.h | 2 + include/linux/security.h | 2 + include/uapi/linux/capability.h | 22 +++- security/commoncap.c | 270 +++++++++++++++++++++++++++++++++++++--- 5 files changed, 280 insertions(+), 22 deletions(-) commit 12cd3a2fe3ba6d1a2cf007e4e8dcfbe66d3d0a28 Author: Bart Van Assche Date: Wed Aug 30 11:42:11 2017 -0700 bfq: Use icq_to_bic() consistently Some code uses icq_to_bic() to convert an io_cq pointer to a bfq_io_cq pointer while other code uses a direct cast. Convert the code that uses a direct cast such that it uses icq_to_bic(). Acked-by: Paolo Valente Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1530486cda2df87d66af8bd3aa069c12b6fada41 Author: Bart Van Assche Date: Wed Aug 30 11:42:10 2017 -0700 bfq: Suppress compiler warnings about comparisons This patch avoids that the following warnings are reported when building with W=1: block/bfq-iosched.c: In function 'bfq_back_seek_max_store': block/bfq-iosched.c:4860:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (__data < (MIN)) \ ^ block/bfq-iosched.c:4876:1: note: in expansion of macro 'STORE_FUNCTION' STORE_FUNCTION(bfq_back_seek_max_store, &bfqd->bfq_back_max, 0, INT_MAX, 0); ^~~~~~~~~~~~~~ block/bfq-iosched.c: In function 'bfq_slice_idle_store': block/bfq-iosched.c:4860:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (__data < (MIN)) \ ^ block/bfq-iosched.c:4879:1: note: in expansion of macro 'STORE_FUNCTION' STORE_FUNCTION(bfq_slice_idle_store, &bfqd->bfq_slice_idle, 0, INT_MAX, 2); ^~~~~~~~~~~~~~ block/bfq-iosched.c: In function 'bfq_slice_idle_us_store': block/bfq-iosched.c:4892:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (__data < (MIN)) \ ^ block/bfq-iosched.c:4899:1: note: in expansion of macro 'USEC_STORE_FUNCTION' USEC_STORE_FUNCTION(bfq_slice_idle_us_store, &bfqd->bfq_slice_idle, 0, ^~~~~~~~~~~~~~~~~~~ Acked-by: Paolo Valente Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/bfq-iosched.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2f79136ba2df07ce7563158f7948c4ce770f8132 Author: Bart Van Assche Date: Wed Aug 30 11:42:09 2017 -0700 bfq: Check kstrtoul() return value Make sysfs writes fail for invalid numbers instead of storing uninitialized data copied from the stack. This patch removes all uninitialized_var() occurrences from the BFQ source code. Acked-by: Paolo Valente Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/bfq-iosched.c | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) commit dfb79af5469a028e23ba2592a577d9b6f8a5651f Author: Bart Van Assche Date: Wed Aug 30 11:42:08 2017 -0700 bfq: Declare local functions static Acked-by: Paolo Valente Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/bfq-cgroup.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit fa393d1b9c6326c227a24915a6f00721a288bde9 Author: Bart Van Assche Date: Wed Aug 30 11:42:07 2017 -0700 bfq: Annotate fall-through in a switch statement This patch avoids that gcc 7 issues a warning about fall-through when building with W=1. Acked-by: Paolo Valente Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/bfq-iosched.c | 1 + 1 file changed, 1 insertion(+) commit a254d989f31df97be9ee07a13b9b20087d0d3106 Merge: 40326d8 40a5fce Author: Jens Axboe Date: Fri Sep 1 13:52:37 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-4.14/block-postmerge Pull NVMe updates from Christoph: "A few more nvme updates for 4.14: - generate a correct default NQN (Daniel Verkamp) - metadata passthrough for the NVME_IOCTL_IO_CMD ioctl, as well as related fixes and cleanups (Keith) - better scalability for connecting to the NVMeOF target (Roland Dreier) - target support for reading the host identifier (Omri Mann)" commit 1ee55a8f7f6b7ca4c0c59e0b4b4e3584a085c2d3 Author: Jose Abreu Date: Fri Sep 1 17:00:23 2017 +0100 ARC: Re-enable MMU upon Machine Check exception I recently came upon a scenario where I would get a double fault machine check exception tiriggered by a kernel module. However the ensuing crash stacktrace (ksym lookup) was not working correctly. Turns out that machine check auto-disables MMU while modules are allocated in kernel vaddr spapce. This patch re-enables the MMU before start printing the stacktrace making stacktracing of modules work upon a fatal exception. Cc: stable@kernel.org Signed-off-by: Jose Abreu Reviewed-by: Alexey Brodkin Signed-off-by: Vineet Gupta [vgupta: moved code into low level handler to avoid in 2 places] arch/arc/kernel/entry.S | 6 ++++++ arch/arc/mm/tlb.c | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) commit aa7e3a5e8b63628c7fc131effc163ade08ced41b Author: Jose Abreu Date: Tue Aug 29 10:14:20 2017 +0100 ARC: Show fault information passed to show_kernel_fault_diag() Currently we pass a string argument to show_kernel_fault_diag() which describes the reason for the fault. This is not being used so just add a pr_info() which outputs the fault information. With this change we get from: | | Path: /bin/busybox | CPU: 0 PID: 92 Comm: modprobe Not tainted 4.12.0-rc6 #30 | task: 9a254780 task.stack: 9a212000 | | [ECR ]: 0x00200400 => Other Fatal Err | to: | | Unhandled Machine Check Exception | Path: /bin/busybox | CPU: 0 PID: 92 Comm: modprobe Not tainted 4.12.0-rc6 #37 | task: 9a240780 task.stack: 9a226000 | |[ECR ]: 0x00200400 => Machine Check (Other Fatal Err) | Which can help debugging. Cc: Alexey Brodkin Signed-off-by: Jose Abreu Signed-off-by: Vineet Gupta arch/arc/kernel/traps.c | 2 +- arch/arc/kernel/troubleshoot.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit a518d63777a4e94e4b2dd86501604ec49ffe86b2 Author: Alexey Brodkin Date: Tue Aug 15 21:13:55 2017 +0300 ARC: [plat-hsdk] initial port for HSDK board This initial port adds support of ARC HS Development Kit board with some basic features such serial port, USB, SD/MMC and Ethernet. Essentially we run Linux kernel on all 4 cores (i.e. utilize SMP) and heavily use IO Coherency for speeding-up DMA-aware peripherals. Note as opposed to other ARC boards we link Linux kernel to 0x9000_0000 intentionally because cores 1 and 3 configured with DCCM situated at our more usual link base 0x8000_0000. We still can use memory region starting at 0x8000_0000 as we reallocate DCCM in our platform code. Note that PAE remapping for DMA clients does not work due to an RTL bug, so CREG_PAE register must be programmed to all zeroes, otherwise it will cause problems with DMA to/from peripherals even if PAE40 is not used. Acked-by: Rob Herring Signed-off-by: Alexey Brodkin Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta Documentation/devicetree/bindings/arc/hsdk.txt | 7 + arch/arc/Kconfig | 1 + arch/arc/Makefile | 1 + arch/arc/boot/dts/hsdk.dts | 189 +++++++++++++++++++++++++ arch/arc/configs/hsdk_defconfig | 80 +++++++++++ arch/arc/kernel/devtree.c | 5 +- arch/arc/plat-hsdk/Kconfig | 9 ++ arch/arc/plat-hsdk/Makefile | 9 ++ arch/arc/plat-hsdk/platform.c | 66 +++++++++ 9 files changed, 365 insertions(+), 2 deletions(-) commit 9ed68785f7f2b001a6911d64fbd10cfc6fa49b27 Author: Eugeniy Paltsev Date: Tue Aug 15 21:13:54 2017 +0300 ARC: mm: Decouple RAM base address from kernel link address [Needed for HSDK] Currently the first page of system (hence RAM base) is assumed to be @ CONFIG_LINUX_LINK_BASE, where kernel itself is linked. However is case of HSDK platform, for reasons explained in that patch, this is not true. kernel needs to be linked @ 0x9000_0000 while DDR is still wired at 0x8000_0000. To properly account for this 256M of RAM, we need to introduce a new option and base page frame accountiing off of it. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta [vgupta: renamed CONFIG_KERNEL_RAM_BASE_ADDRESS => CONFIG_LINUX_RAM_BASE : simplified changelog] arch/arc/Kconfig | 10 +++++++++- arch/arc/boot/dts/axc001.dtsi | 2 +- arch/arc/boot/dts/axc003.dtsi | 2 +- arch/arc/boot/dts/axc003_idu.dtsi | 2 +- arch/arc/boot/dts/nsim_hs.dts | 2 +- arch/arc/include/asm/page.h | 2 +- arch/arc/mm/cache.c | 2 +- arch/arc/mm/init.c | 6 +++--- 8 files changed, 18 insertions(+), 10 deletions(-) commit bee91c3a3ce63daf64bb53ae60e6a2fb2961d3d7 Author: Eugeniy Paltsev Date: Tue Aug 15 21:13:53 2017 +0300 ARCv2: IOC: Tighten up the contraints (specifically base / size alignment) [Needed for HSDK] - Currently IOC base is hardcoded to 0x8000_0000 which is default value of LINUX_LINK_BASE, but may not always be the case - IOC programming model imposes the constraint that IOC aperture size needs to be aligned to IOC base address, which we were not checking so far. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta [vgupta: reworked the changelog] arch/arc/mm/cache.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 0fa400cb8a90753044bbcb5810fa1a59d96d5ea1 Author: Vineet Gupta Date: Tue Aug 22 14:37:22 2017 -0700 ARC: [plat-axs103] refactor the DT fudging code with clk frequency setting code gone by prev commits, we can elide the unconditonal DT parsing to the specific case of quad core config where we possibly need to fudge the DT value. Signed-off-by: Vineet Gupta arch/arc/plat-axs10x/axs10x.c | 46 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit f6a09bace0bb9587985b48ed652f2b292f8de0de Author: Eugeniy Paltsev Date: Mon Aug 14 19:12:11 2017 +0300 ARC: [plat-axs103] use clk driver #2: Add core pll node to DT to manage cpu clk Add core pll node (core_clk) to manage cpu frequency. core_clk represents pll itself. input_clk represents clock signal source (basically xtal) which comes to pll input. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/axc003.dtsi | 11 +++++++++-- arch/arc/boot/dts/axc003_idu.dtsi | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) commit 9926c29f746d178400543e2056cee4d437e697f3 Author: Eugeniy Paltsev Date: Mon Aug 14 19:12:10 2017 +0300 ARC: [plat-axs103] use clk driver #1: Get rid of platform specific cpu clk setting historically axs103 platform code used to set the cpu clk by writing to PLL registers directly. however the axs10x clk driver is now upstream so no need to do this amymore. Driver is selected automatically when CONFIG_ARC_PLAT_AXS10X is set Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta [vgupta: deleted more code not needed anymore] arch/arc/plat-axs10x/axs10x.c | 118 ++---------------------------------------- 1 file changed, 5 insertions(+), 113 deletions(-) commit edb096e00724f02db5f6ec7900f3bbd465c6c76f Author: Steven Rostedt (VMware) Date: Fri Sep 1 12:18:28 2017 -0400 ftrace: Fix memleak when unregistering dynamic ops when tracing disabled If function tracing is disabled by the user via the function-trace option or the proc sysctl file, and a ftrace_ops that was allocated on the heap is unregistered, then the shutdown code exits out without doing the proper clean up. This was found via kmemleak and running the ftrace selftests, as one of the tests unregisters with function tracing disabled. # cat kmemleak unreferenced object 0xffffffffa0020000 (size 4096): comm "swapper/0", pid 1, jiffies 4294668889 (age 569.209s) hex dump (first 32 bytes): 55 ff 74 24 10 55 48 89 e5 ff 74 24 18 55 48 89 U.t$.UH...t$.UH. e5 48 81 ec a8 00 00 00 48 89 44 24 50 48 89 4c .H......H.D$PH.L backtrace: [] kmemleak_vmalloc+0x85/0xf0 [] __vmalloc_node_range+0x281/0x3e0 [] module_alloc+0x4f/0x90 [] arch_ftrace_update_trampoline+0x160/0x420 [] ftrace_startup+0xe7/0x300 [] register_ftrace_function+0x72/0x90 [] trace_selftest_ops+0x204/0x397 [] trace_selftest_startup_function+0x394/0x624 [] run_tracer_selftest+0x15c/0x1d7 [] init_trace_selftests+0x75/0x192 [] do_one_initcall+0x90/0x1e2 [] kernel_init_freeable+0x350/0x3fe [] kernel_init+0x13/0x122 [] ret_from_fork+0x2a/0x40 [] 0xffffffffffffffff Cc: stable@vger.kernel.org Fixes: 12cce594fa ("ftrace/x86: Allow !CONFIG_PREEMPT dynamic ops to use allocated trampolines") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit eba9fac017617e685d648339e29a1453a30cb065 Author: Arnaldo Carvalho de Melo Date: Fri Sep 1 14:55:40 2017 -0300 perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB The popup help accessed via 'h' wasn't mentioning about TAB and shift-TAB, just about 'H', which goes to the hottest line, while the former two are the hotkeys for actually cycling thru the hottest lines. Reported-by: Flavio Bruno Leitner Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5ppym6odizfj1ifa4t7neiku@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f2285c148c4167337d12452bebccadd2ad821d5d Author: Christoph Hellwig Date: Tue Aug 29 15:44:12 2017 -0700 xfs: use xfs_iext_get_extent in xfs_bmap_first_unused Use the bmap abstraction instead of open-coding bmbt details here. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 50bb44c28614205def9e711190842b4c0242ae79 Author: Christoph Hellwig Date: Tue Aug 29 15:44:11 2017 -0700 xfs: switch xfs_bmap_local_to_extents to use xfs_iext_insert Use the helper instead of open coding it, to provide a better abstraction for the scalable extent list work. This also gets an additional assert and trace point for free. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 67e4e69cb2a7afbffdefd1a0a23a94d1d706c38f Author: Christoph Hellwig Date: Tue Aug 29 15:44:11 2017 -0700 xfs: add a xfs_iext_update_extent helper This helper is used to update an extent record based on the extent index, and can be used to provide a level of abstractions between callers that want to modify in-core extent records and the details of the extent list implementation. Also switch all users of the xfs_bmbt_set_all(xfs_iext_get_ext(...)) pattern to this new helper. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 12 ++++++------ fs/xfs/libxfs/xfs_inode_fork.c | 12 ++++++++++++ fs/xfs/libxfs/xfs_inode_fork.h | 2 ++ 3 files changed, 20 insertions(+), 6 deletions(-) commit d522d569d6adf72ceda90153a086e089e6c2fbc6 Author: Christoph Hellwig Date: Tue Aug 29 10:08:41 2017 -0700 xfs: consolidate the various page fault handlers Add a new __xfs_filemap_fault helper that implements all four page fault callouts, and make these methods themselves small stubs that set the correct write_fault flag, and exit early for the non-DAX case for the hugepage related ones. Also remove the extra size checking in the pfn_fault path, which is now handled in the core DAX code. Life would be so much simpler if we only had one method for all this. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 96 +++++++++++++++++++----------------------------------- fs/xfs/xfs_trace.h | 29 +++++++++++++++-- 2 files changed, 60 insertions(+), 65 deletions(-) commit e7647fb49167809502724eb3c402cea77716fc67 Author: Christoph Hellwig Date: Tue Aug 29 10:08:41 2017 -0700 iomap: return VM_FAULT_* codes from iomap_page_mkwrite All callers will need the VM_FAULT_* flags, so convert in the helper. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 4 ++-- fs/xfs/xfs_file.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 2dd3d709fc4338681a3aa61658122fa8faa5a437 Author: Brian Foster Date: Tue Aug 29 10:08:40 2017 -0700 xfs: relog dirty buffers during swapext bmbt owner change The owner change bmbt scan that occurs during extent swap operations does not handle ordered buffer failures. Buffers that cannot be marked ordered must be physically logged so previously dirty ranges of the buffer can be relogged in the transaction. Since the bmbt scan may need to process and potentially log a large number of blocks, we can't expect to complete this operation in a single transaction. Update extent swap to use a permanent transaction with enough log reservation to physically log a buffer. Update the bmbt scan to physically log any buffers that cannot be ordered and to terminate the scan with -EAGAIN. On -EAGAIN, the caller rolls the transaction and restarts the scan. Finally, update the bmbt scan helper function to skip bmbt blocks that already match the expected owner so they are not reprocessed after scan restarts. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig [darrick: fix the xfs_trans_roll call] Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.c | 26 ++++++++++++++------- fs/xfs/xfs_bmap_util.c | 57 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 18 deletions(-) commit a5814bceea48ee1c57c4db2bd54b0c0246daf54a Author: Brian Foster Date: Tue Aug 29 10:08:40 2017 -0700 xfs: disallow marking previously dirty buffers as ordered Ordered buffers are used in situations where the buffer is not physically logged but must pass through the transaction/logging pipeline for a particular transaction. As a result, ordered buffers are not unpinned and written back until the transaction commits to the log. Ordered buffers have a strict requirement that the target buffer must not be currently dirty and resident in the log pipeline at the time it is marked ordered. If a dirty+ordered buffer is committed, the buffer is reinserted to the AIL but not physically relogged at the LSN of the associated checkpoint. The buffer log item is assigned the LSN of the latest checkpoint and the AIL effectively releases the previously logged buffer content from the active log before the buffer has been written back. If the tail pushes forward and a filesystem crash occurs while in this state, an inconsistent filesystem could result. It is currently the caller responsibility to ensure an ordered buffer is not already dirty from a previous modification. This is unclear and error prone when not used in situations where it is guaranteed a buffer has not been previously modified (such as new metadata allocations). To facilitate general purpose use of ordered buffers, update xfs_trans_ordered_buf() to conditionally order the buffer based on state of the log item and return the status of the result. If the bli is dirty, do not order the buffer and return false. The caller must either physically log the buffer (having acquired the appropriate log reservation) or push it from the AIL to clean it before it can be marked ordered in the current transaction. Note that ordered buffers are currently only used in two situations: 1.) inode chunk allocation where previously logged buffers are not possible and 2.) extent swap which will be updated to handle ordered buffer failures in a separate patch. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_buf.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 6fb10d6d22094bc4062f92b9ccbcee2f54033d04 Author: Brian Foster Date: Tue Aug 29 10:08:39 2017 -0700 xfs: move bmbt owner change to last step of extent swap The extent swap operation currently resets bmbt block owners before the inode forks are swapped. The bmbt buffers are marked as ordered so they do not have to be physically logged in the transaction. This use of ordered buffers is not safe as bmbt buffers may have been previously physically logged. The bmbt owner change algorithm needs to be updated to physically log buffers that are already dirty when/if they are encountered. This means that an extent swap will eventually require multiple rolling transactions to handle large btrees. In addition, all inode related changes must be logged before the bmbt owner change scan begins and can roll the transaction for the first time to preserve fs consistency via log recovery. In preparation for such fixes to the bmbt owner change algorithm, refactor the bmbt scan out of the extent fork swap code to the last operation before the transaction is committed. Update xfs_swap_extent_forks() to only set the inode log flags when an owner change scan is necessary. Update xfs_swap_extents() to trigger the owner change based on the inode log flags. Note that since the owner change now occurs after the extent fork swap, the inode btrees must be fixed up with the inode number of the current inode (similar to log recovery). Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 99c794c639a65cc7b74f30a674048fd100fe9ac8 Author: Brian Foster Date: Tue Aug 29 10:08:39 2017 -0700 xfs: skip bmbt block ino validation during owner change Extent swap uses xfs_btree_visit_blocks() to fix up bmbt block owners on v5 (!rmapbt) filesystems. The bmbt scan uses xfs_btree_lookup_get_block() to read bmbt blocks which verifies the current owner of the block against the parent inode of the bmbt. This works during extent swap because the bmbt owners are updated to the opposite inode number before the inode extent forks are swapped. The modified bmbt blocks are marked as ordered buffers which allows everything to commit in a single transaction. If the transaction commits to the log and the system crashes such that recovery of the extent swap is required, log recovery restarts the bmbt scan to fix up any bmbt blocks that may have not been written back before the crash. The log recovery bmbt scan occurs after the inode forks have been swapped, however. This causes the bmbt block owner verification to fail, leads to log recovery failure and requires xfs_repair to zap the log to recover. Define a new invalid inode owner flag to inform the btree block lookup mechanism that the current inode may be invalid with respect to the current owner of the bmbt block. Set this flag on the cursor used for change owner scans to allow this operation to work at runtime and during log recovery. Signed-off-by: Brian Foster Fixes: bb3be7e7c ("xfs: check for bogus values in btree block headers") Cc: stable@vger.kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap_btree.c | 1 + fs/xfs/libxfs/xfs_btree.c | 1 + fs/xfs/libxfs/xfs_btree.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) commit 8dc518dfa7dbd079581269e51074b3c55a65a880 Author: Brian Foster Date: Tue Aug 29 10:08:38 2017 -0700 xfs: don't log dirty ranges for ordered buffers Ordered buffers are attached to transactions and pushed through the logging infrastructure just like normal buffers with the exception that they are not actually written to the log. Therefore, we don't need to log dirty ranges of ordered buffers. xfs_trans_log_buf() is called on ordered buffers to set up all of the dirty state on the transaction, buffer and log item and prepare the buffer for I/O. Now that xfs_trans_dirty_buf() is available, call it from xfs_trans_ordered_buf() so the latter is now mutually exclusive with xfs_trans_log_buf(). This reflects the implementation of ordered buffers and helps eliminate confusion over the need to log ranges of ordered buffers just to set up internal log state. Signed-off-by: Brian Foster Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.c | 6 ++---- fs/xfs/libxfs/xfs_ialloc.c | 2 -- fs/xfs/xfs_trans_buf.c | 26 ++++++++++++++------------ 3 files changed, 16 insertions(+), 18 deletions(-) commit 9684010d38eccda733b61106765e9357cf436f65 Author: Brian Foster Date: Tue Aug 29 10:08:38 2017 -0700 xfs: refactor buffer logging into buffer dirtying helper xfs_trans_log_buf() is responsible for logging the dirty segments of a buffer along with setting all of the necessary state on the transaction, buffer, bli, etc., to ensure that the associated items are marked as dirty and prepared for I/O. We have a couple use cases that need to to dirty a buffer in a transaction without actually logging dirty ranges of the buffer. One existing use case is ordered buffers, which are currently logged with arbitrary ranges to accomplish this even though the content of ordered buffers is never written to the log. Another pending use case is to relog an already dirty buffer across rolled transactions within the deferred operations infrastructure. This is required to prevent a held (XFS_BLI_HOLD) buffer from pinning the tail of the log. Refactor xfs_trans_log_buf() into a new function that contains all of the logic responsible to dirty the transaction, lidp, buffer and bli. This new function can be used in the future for the use cases outlined above. This patch does not introduce functional changes. Signed-off-by: Brian Foster Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans.h | 4 +++- fs/xfs/xfs_trans_buf.c | 46 ++++++++++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 17 deletions(-) commit e9385cc6fb7edf23702de33a2dc82965d92d9392 Author: Brian Foster Date: Tue Aug 29 10:08:37 2017 -0700 xfs: ordered buffer log items are never formatted Ordered buffers pass through the logging infrastructure without ever being written to the log. The way this works is that the ordered buffer status is transferred to the log vector at commit time via the ->iop_size() callback. In xlog_cil_insert_format_items(), ordered log vectors bypass ->iop_format() processing altogether. Therefore it is unnecessary for xfs_buf_item_format() to handle ordered buffers. Remove the unnecessary logic and assert that an ordered buffer never reaches this point. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 12 ++---------- fs/xfs/xfs_trace.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) commit 6453c65d3576bc3e602abb5add15f112755c08ca Author: Brian Foster Date: Tue Aug 29 10:08:37 2017 -0700 xfs: remove unnecessary dirty bli format check for ordered bufs xfs_buf_item_unlock() historically checked the dirty state of the buffer by manually checking the buffer log formats for dirty segments. The introduction of ordered buffers invalidated this check because ordered buffers have dirty bli's but no dirty (logged) segments. The check was updated to accommodate ordered buffers by looking at the bli state first and considering the blf only if the bli is clean. This logic is safe but unnecessary. There is no valid case where the bli is clean yet the blf has dirty segments. The bli is set dirty whenever the blf is logged (via xfs_trans_log_buf()) and the blf is cleared in the only place BLI_DIRTY is cleared (xfs_trans_binval()). Remove the conditional blf dirty checks and replace with an assert that should catch any discrepencies between bli and blf dirty states. Refactor the old blf dirty check into a helper function to be used by the assert. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 62 ++++++++++++++++++++++++++------------------------- fs/xfs/xfs_buf_item.h | 1 + 2 files changed, 33 insertions(+), 30 deletions(-) commit a4f6cf6b2b6b60ec2a05a33a32e65caa4149aa2b Author: Brian Foster Date: Tue Aug 29 10:08:36 2017 -0700 xfs: open-code xfs_buf_item_dirty() It checks a single flag and has one caller. It probably isn't worth its own function. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 11 ----------- fs/xfs/xfs_buf_item.h | 1 - fs/xfs/xfs_trans_buf.c | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) commit 8ad7c629b18695ec1ee8654fb27599864049862b Author: Christoph Hellwig Date: Mon Aug 28 10:21:04 2017 -0700 xfs: remove the ip argument to xfs_defer_finish And instead require callers to explicitly join the inode using xfs_defer_ijoin. Also consolidate the defer error handling in a few places using a goto label. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr.c | 140 +++++++++++++++++++++------------------- fs/xfs/libxfs/xfs_attr_remote.c | 35 +++++----- fs/xfs/libxfs/xfs_bmap.c | 4 +- fs/xfs/libxfs/xfs_defer.c | 8 +-- fs/xfs/libxfs/xfs_defer.h | 3 +- fs/xfs/libxfs/xfs_refcount.c | 2 +- fs/xfs/xfs_bmap_item.c | 2 +- fs/xfs/xfs_bmap_util.c | 10 +-- fs/xfs/xfs_dquot.c | 2 +- fs/xfs/xfs_inode.c | 13 ++-- fs/xfs/xfs_iomap.c | 6 +- fs/xfs/xfs_refcount_item.c | 2 +- fs/xfs/xfs_reflink.c | 11 ++-- fs/xfs/xfs_rtalloc.c | 2 +- fs/xfs/xfs_symlink.c | 5 +- 15 files changed, 129 insertions(+), 116 deletions(-) commit 882d8785fb87f691000a0b33c215364d74bd2ceb Author: Christoph Hellwig Date: Mon Aug 28 10:21:03 2017 -0700 xfs: rename xfs_defer_join to xfs_defer_ijoin Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 +- fs/xfs/libxfs/xfs_defer.c | 4 ++-- fs/xfs/libxfs/xfs_defer.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 411350df14a3d6f1c769ea64a8b43a71f8d9760e Author: Christoph Hellwig Date: Mon Aug 28 10:21:03 2017 -0700 xfs: refactor xfs_trans_roll Split xfs_trans_roll into a low-level helper that just rolls the actual transaction and a new higher level xfs_trans_roll_inode that takes care of logging and rejoining the inode. This gets rid of the NULL inode case, and allows to simplify the special cases in the deferred operation code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr.c | 16 ++++++++-------- fs/xfs/libxfs/xfs_attr_leaf.c | 6 +++--- fs/xfs/libxfs/xfs_attr_remote.c | 4 ++-- fs/xfs/libxfs/xfs_defer.c | 23 +++++++++-------------- fs/xfs/xfs_attr_inactive.c | 6 +++--- fs/xfs/xfs_inode.c | 4 ++-- fs/xfs/xfs_trans.c | 28 +++++----------------------- fs/xfs/xfs_trans.h | 3 ++- fs/xfs/xfs_trans_inode.c | 14 ++++++++++++++ 9 files changed, 48 insertions(+), 56 deletions(-) commit f2e9ad212def50bcf4c098c6288779dd97fff0f0 Author: Omar Sandoval Date: Fri Aug 25 10:05:26 2017 -0700 xfs: check for race with xfs_reclaim_inode() in xfs_ifree_cluster() After xfs_ifree_cluster() finds an inode in the radix tree and verifies that the inode number is what it expected, xfs_reclaim_inode() can swoop in and free it. xfs_ifree_cluster() will then happily continue working on the freed inode. Most importantly, it will mark the inode stale, which will probably be overwritten when the inode slab object is reallocated, but if it has already been reallocated then we can end up with an inode spuriously marked stale. In 8a17d7ddedb4 ("xfs: mark reclaimed inodes invalid earlier") we added a second check to xfs_iflush_cluster() to detect this race, but the similar RCU lookup in xfs_ifree_cluster() needs the same treatment. Signed-off-by: Omar Sandoval Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 10 +++++----- fs/xfs/xfs_inode.c | 23 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) commit 799ea9e9c59949008770aab4e1da87f10e99dbe4 Author: Darrick J. Wong Date: Fri Aug 18 18:08:25 2017 -0700 xfs: evict all inodes involved with log redo item When we introduced the bmap redo log items, we set MS_ACTIVE on the mountpoint and XFS_IRECOVERY on the inode to prevent unlinked inodes from being truncated prematurely during log recovery. This also had the effect of putting linked inodes on the lru instead of evicting them. Unfortunately, we neglected to find all those unreferenced lru inodes and evict them after finishing log recovery, which means that we leak them if anything goes wrong in the rest of xfs_mountfs, because the lru is only cleaned out on unmount. Therefore, evict unreferenced inodes in the lru list immediately after clearing MS_ACTIVE. Fixes: 17c12bcd30 ("xfs: when replaying bmap operations, don't let unlinked inodes get reaped") Signed-off-by: Darrick J. Wong Cc: viro@ZenIV.linux.org.uk Reviewed-by: Brian Foster fs/inode.c | 1 + fs/internal.h | 1 - fs/xfs/xfs_log.c | 12 ++++++++++++ include/linux/fs.h | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) commit 63ce8449bc1081711eef1add68909e9bd758de62 Author: Arnaldo Carvalho de Melo Date: Thu Aug 31 15:32:18 2017 -0300 perf stat: Only auto-merge events that are PMU aliases Peter reported that when he explicitely asked for multiple events with the same name on the command line it got coalesced into just one line, i.e.: # perf stat -e cycles -e cycles -e cycles usleep 1 Performance counter stats for 'usleep 1': 3,269,652 cycles 0.000884123 seconds time elapsed # And while there is the --no-merges option to disable that auto-merging, this is a blunt change in behaviour for such explicit request, so change the code so that this auto merging is done only when handling the multi PMU aliases with the same name that introduced this coalescing, restoring the previous behaviour for the explicit case: # perf stat -e cycles -e cycles -e cycles usleep 1 Performance counter stats for 'usleep 1': 1,472,837 cycles 1,472,837 cycles 1,472,837 cycles 0.001764870 seconds time elapsed # Reported-by: Peter Zijlstra Acked-by: Andi Kleen Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Mark Rutland Cc: Namhyung Kim Cc: Wang Nan Fixes: 430daf2dc7af ("perf stat: Collapse identically named events") Link: http://lkml.kernel.org/r/20170831184122.GK4831@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 +- tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 24 ++++++++++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) commit fc33dccba39584e403436b9cda3edc9c34b62bce Author: Kan Liang Date: Tue Aug 29 13:11:12 2017 -0400 perf test: Add test case for PERF_SAMPLE_PHYS_ADDR Extend sample-parsing test cases to support new sample type PERF_SAMPLE_PHYS_ADDR. Signed-off-by: Kan Liang Tested-by: Jiri Olsa Acked-by: Stephane Eranian Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504026672-7304-6-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/sample-parsing.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 49d58f04eb6cdc18b3747fc4243a7114364f5420 Author: Kan Liang Date: Tue Aug 29 13:11:11 2017 -0400 perf script: Support physical address Display the physical address at the tail if it is available. Signed-off-by: Kan Liang Tested-by: Jiri Olsa Acked-by: Stephane Eranian Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504026672-7304-5-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 2 +- tools/perf/builtin-script.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) commit c35aeb9dfe512422ca9ea28aae692c8f1d052b2d Author: Kan Liang Date: Tue Aug 29 13:11:10 2017 -0400 perf mem: Support physical address Add option phys-data in "perf mem" to record/report physical address. The default mem sort order for physical address is changed accordingly. Signed-off-by: Kan Liang Tested-by: Jiri Olsa Acked-by: Stephane Eranian Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504026672-7304-4-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-mem.txt | 4 ++ tools/perf/builtin-mem.c | 97 +++++++++++++++++++++++++---------- 2 files changed, 75 insertions(+), 26 deletions(-) commit 8780fb25ab060bafa5a8149e79b703e0fc7ee847 Author: Kan Liang Date: Tue Aug 29 13:11:09 2017 -0400 perf sort: Add sort option for physical address Add a new sort option "phys_daddr" for --mem-mode sort. With this option applied, perf can sort and report by sample's physical address. Signed-off-by: Kan Liang Tested-by: Jiri Olsa Acked-by: Stephane Eranian Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504026672-7304-3-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 1 + tools/perf/util/hist.c | 4 +++ tools/perf/util/hist.h | 1 + tools/perf/util/machine.c | 8 ++++-- tools/perf/util/session.c | 3 +++ tools/perf/util/sort.c | 42 ++++++++++++++++++++++++++++++++ tools/perf/util/sort.h | 1 + tools/perf/util/symbol.h | 1 + 8 files changed, 59 insertions(+), 2 deletions(-) commit 3b0a5daa061076b2b75ffc294e74483ad9bf241a Author: Kan Liang Date: Tue Aug 29 13:11:08 2017 -0400 perf tools: Support new sample type for physical address Support new sample type PERF_SAMPLE_PHYS_ADDR for physical address. Add new option --phys-data to record sample physical address. Signed-off-by: Kan Liang Tested-by: Jiri Olsa Acked-by: Stephane Eranian Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504026672-7304-2-git-send-email-kan.liang@intel.com [ Added missing printing in evsel.c patch sent by Jiri Olsa ] Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 4 +++- tools/perf/Documentation/perf-record.txt | 5 ++++- tools/perf/builtin-record.c | 2 ++ tools/perf/perf.h | 1 + tools/perf/util/event.h | 1 + tools/perf/util/evsel.c | 19 ++++++++++++++++++- 6 files changed, 29 insertions(+), 3 deletions(-) commit 2a118e1bd22cad57318520d37e3a184b8846c6a2 Author: Sukadev Bhattiprolu Date: Wed Aug 30 21:42:23 2017 -0400 perf vendor events powerpc: Remove duplicate events Some POWER PMU event names have multiple/alternate event codes. These alternate event codes were listed in the POWER9 JSON files for reference. But the perf tool does not seem to handle duplicates cleanly. 'perf list' shows such duplicate events only once, but 'perf stat' ends up counting the first event code twice, multiplexing if necessary and we end up with double the event counts. Remove the duplicate event codes from the JSON files for now. Reported-by: Michael Petlan Signed-off-by: Sukadev Bhattiprolu Cc: Andi Kleen Cc: Anton Blanchard Cc: Jiri Olsa Cc: Michael Ellerman Link: http://lkml.kernel.org/r/20170830231506.GB20351@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/powerpc/power9/frontend.json | 7 +- .../perf/pmu-events/arch/powerpc/power9/other.json | 120 --------------------- .../pmu-events/arch/powerpc/power9/pipeline.json | 7 +- tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 7 +- 4 files changed, 3 insertions(+), 138 deletions(-) commit 4fb205392022ba99a45dd01a62c6e2df046e400a Author: Jack Henschel Date: Thu Aug 31 10:05:35 2017 +0200 perf intel-pt: Fix syntax in documentation of config option As specified in tools/perf/Documentation/perf-config.txt, perf configuration items must be in 'key = value' format, otherwise the following error message occurs: $ perf record -e intel_pt//u -- ls bad config file line 2 in ~/.perfconfig $ cat .perfconfig [intel-pt] mispred-all Changing to assigning a value to the key 'mispred-all' fixes the issue: $ perf record -e intel_pt//u -- ls [ perf record: Woken up 1 times to write data ] [ perf record: Capured and wrote 0.031 MB perf.data] $ cat .perfconfig [intel-pt] mispred-all = true Signed-off-by: Jack Henschel Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170831080535.2157-1-jackdev@mailbox.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-pt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a805d8648ee09c136130fe4114a09574bc0b1ef Author: Ravi Bangoria Date: Thu Aug 31 14:44:56 2017 +0530 perf test powerpc: Fix 'Object code reading' test 'Object code reading' test always fails on powerpc guest. Two reasons for the failure are: 1. When elf section is too big (size beyond 'unsigned int' max value). objdump fails to disassemble from such section. This was fixed with commit 0f6329bd7fc ("binutils/objdump: Fix disassemble for huge elf sections") in binutils. 2. When the sample is from hypervisor. Hypervisor symbols can not be resolved within guest and thus thread__find_addr_map() fails for such symbols. Fix this by ignoring hypervisor symbols in the test. Signed-off-by: Ravi Bangoria Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1504170896-7876-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/code-reading.c | 5 +++++ 1 file changed, 5 insertions(+) commit 27702bcfe8a125a1feeeb5f07526d63b20cac47f Author: Arnaldo Carvalho de Melo Date: Thu Aug 31 11:50:04 2017 -0300 perf trace: Support syscall name globbing So now we can use: # perf trace -e pkey_* 532.784 ( 0.006 ms): pkey/16018 pkey_alloc(init_val: DISABLE_WRITE) = -1 EINVAL Invalid argument 532.795 ( 0.004 ms): pkey/16018 pkey_mprotect(start: 0x7f380d0a6000, len: 4096, prot: READ|WRITE, pkey: -1) = 0 532.801 ( 0.002 ms): pkey/16018 pkey_free(pkey: -1 ) = -1 EINVAL Invalid argument ^C[root@jouet ~]# Or '-e epoll*', '-e *msg*', etc. Combining syscall names with perf events, tracepoints, etc, continues to be valid, i.e. this is possible: # perf probe -L sys_nanosleep 0 SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp, struct timespec __user *, rmtp) { struct timespec64 tu; 5 if (get_timespec64(&tu, rqtp)) 6 return -EFAULT; if (!timespec64_valid(&tu)) 9 return -EINVAL; 11 current->restart_block.nanosleep.type = rmtp ? TT_NATIVE : TT_NONE; 12 current->restart_block.nanosleep.rmtp = rmtp; 13 return hrtimer_nanosleep(&tu, HRTIMER_MODE_REL, CLOCK_MONOTONIC); } # perf probe my_probe="sys_nanosleep:12 rmtp" Added new event: probe:my_probe (on sys_nanosleep:12 with rmtp) You can now use it in all perf tools, such as: perf record -e probe:my_probe -aR sleep 1 # # perf trace -e probe:my_probe/max-stack=5/,*sleep sleep 1 0.427 ( 0.003 ms): sleep/16690 nanosleep(rqtp: 0x7ffefc245090) ... 0.430 ( ): probe:my_probe:(ffffffffbd112923) rmtp=0) sys_nanosleep ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) return_from_SYSCALL_64 ([kernel.kallsyms]) __nanosleep_nocancel (/usr/lib64/libc-2.25.so) 0.427 (1000.208 ms): sleep/16690 ... [continued]: nanosleep()) = 0 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-elycoi8wy6y0w9dkj7ox1mzz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-trace.txt | 2 +- tools/perf/builtin-trace.c | 39 +++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) commit 89be3f8ab701180fc0329eff1b076528d64ac56b Author: Arnaldo Carvalho de Melo Date: Thu Aug 31 11:46:49 2017 -0300 perf syscalltbl: Support glob matching on syscall names With two new methods, one to find the first match, returning its syscall id and its index in whatever internal database it keeps the syscall into, then one to find the next match, if any. Implemented only on arches where we actually read the syscall table from the kernel sources, i.e. x86-64 for now, all the others use the libaudit method for which this returns -1, i.e. just stubs were added, with the actual implementation using whatever libaudit functions for matching that may be available. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-i0sj4rxk1a63pfe9gl8z8irs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/syscalltbl.c | 33 +++++++++++++++++++++++++++++++++ tools/perf/util/syscalltbl.h | 3 +++ 2 files changed, 36 insertions(+) commit bbd9644e84f68587ed136c7e1c56e454c26231ff Author: Willem de Bruijn Date: Fri Sep 1 12:31:51 2017 -0400 selftests: correct define in msg_zerocopy.c The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that. Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions. Reported-by: Dan Melnic Signed-off-by: Willem de Bruijn Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/net/msg_zerocopy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc8889ae8298ebfc6bbf52ad98fe3b5afdf4ae70 Author: Willem de Bruijn Date: Fri Sep 1 12:01:41 2017 -0400 doc: document MSG_ZEROCOPY Documentation for this feature was missing from the patchset. Copied a lot from the netdev 2.1 paper, addressing some small interface changes since then. Changes v1 -> v2 - change email discussion URL format - clarify that u32 counter is per-syscall, unsigned and wraps after UINT_MAX calls - describe errno on send failure specific to MSG_ZEROCOPY - a few very minor rewordings Signed-off-by: Willem de Bruijn Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller Documentation/networking/msg_zerocopy.rst | 257 ++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) commit 9df59055ed8e2f817149e786b2a52bc17832d84e Author: David Ahern Date: Fri Sep 1 08:18:07 2017 -0700 bpf: Collapse offset checks in sock_filter_is_valid_access Make sock_filter_is_valid_access consistent with other is_valid_access helpers. Requested-by: Daniel Borkmann Signed-off-by: David Ahern Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 2 -- 1 file changed, 2 deletions(-) commit c54a5048904b6a492551d1cf0a7c9ae3ca763f4b Author: Andrew Pilloud Date: Fri Sep 1 07:49:49 2017 -0700 mvneta: Driver and hardware supports IPv6 offload, so enable it The mvneta driver and hardware supports IPv6 offload, however it isn't enabled. Set the NETIF_F_IPV6_CSUM feature to inform the network layer that this driver can offload IPV6 TCP and UDP checksums. This change has been tested on an Armada 370 and the feature support confirmed with several device datasheets including the Armada XP and Armada 3700. Signed-off-by: Andrew Pilloud Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dd6fc7a3e19e79aa25a96f477c4c62f5b71cae2 Merge: f6849d0 eb464d4 Author: David S. Miller Date: Fri Sep 1 10:35:38 2017 -0700 Merge tag 'wireless-drivers-next-for-davem-2017-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.14 Few last patches for 4.14, nothing really major here. Major changes: wil6210 * support FW RSSI reporting (by mistake this was accidentally mentioned already in the previous pull request, but now it's really included) * make debugfs optional, adds new Kconfig option CONFIG_WIL6210_DEBUGFS qtnfmac * implement 64-bit DMA support ==================== Signed-off-by: David S. Miller commit f6849d01bdc0830c5f4aaba11785827e20d3bad5 Author: Colin Ian King Date: Fri Sep 1 14:44:31 2017 +0100 qlcnic: remove redundant zero check on retries counter At the end of the do while loop the integer counter retries will always be zero and so the subsequent check to see if it is zero is always true and therefore redundant. Remove the redundant check and always return -EIO on this return path. Also unbreak the literal string in dev_err message to clean up a checkpatch warning. Detected by CoverityScan, CID#744279 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 034263a3b9a9d02de81ebafe40e77c6cde80d23f 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 (cherry picked from commit 41c32e5da3ff3922490341a988b2a3ae46d0b6a8) Signed-off-by: Rodrigo Vivi 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 43d57414b6e9f31809c2bd25b0545b887ce6ab09 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 (cherry picked from commit 0db1aa424e3ee91fcb9d583edb30a933c64c5b88) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_i2c.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 54706fa973b592eb8b3a6e04ac888d5fbb704d0a 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 (cherry picked from commit 0abd9976960a5c46b5cc49f2f53281774a8a4a3e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b2eff59160e017c6091ecda1ee2c84f8c914143 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 (cherry picked from commit e8f345e08d391827f2cba5d172af990cc7afb062) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abd21a873a4aa13119a4eb1d46b99790d7cf7835 Merge: c5b2cef 60f78652 Author: David S. Miller Date: Fri Sep 1 10:26:32 2017 -0700 Merge branch 'mdio-mux-Misc-fix' Corentin Labbe says: ==================== net: mdio-mux: Misc fix This patch series fix minor problems found when working on the dwmac-sun8i syscon mdio-mux. Changes since v1: - Removed obsolete comment about of_mdio_find_bus/put_device - removed more DRV_VERSION ==================== Signed-off-by: David S. Miller commit 60f786525032432af1b7d9b8935cb12936244ccd Author: Corentin Labbe Date: Fri Sep 1 13:56:04 2017 +0200 net: mdio-mux: fix unbalanced put_device mdio_mux_uninit() call put_device (unconditionally) because of of_mdio_find_bus() in mdio_mux_init. But of_mdio_find_bus is only called if mux_bus is empty. If mux_bus is set, mdio_mux_uninit will print a "refcount_t: underflow" trace. This patch add a get_device in the other branch of "if (mux_bus)". Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c642bbbc72d4d5165da7c8477d13791f5943dd05 Author: Corentin Labbe Date: Fri Sep 1 13:56:03 2017 +0200 net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers This patch fix an old information that mdio-mux-mmioreg can only handle 8bit registers. This is not true anymore. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e4ccf363721d33d85f902c61a7f50513689b2cb Author: Corentin Labbe Date: Fri Sep 1 13:56:02 2017 +0200 net: mdio-mux: printing driver version is useless Remove the driver version information because this information is not useful in an upstream kernel driver. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 3 --- 1 file changed, 3 deletions(-) commit b1b123cfb24b19a4e73e55011a5da58d9523b073 Author: Corentin Labbe Date: Fri Sep 1 13:56:01 2017 +0200 net: mdio-mux: Remove unnecessary 'out of memory' message This patch fix checkpatch warning about unnecessary 'out of memory' message. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 6 ------ 1 file changed, 6 deletions(-) commit 2d00cd859c79fb477ead232241808e02b6f468b3 Author: Corentin Labbe Date: Fri Sep 1 13:56:00 2017 +0200 net: mdio-mux: Fix NULL Comparison style This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d587b82df23beea5086998abbc61f49b8759eebb Author: Geert Uytterhoeven Date: Wed Aug 30 11:55:58 2017 +0200 dt-bindings: pinctrl: sh-pfc: Use generic node name Use the preferred generic node name in the example. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Signed-off-by: Rob Herring Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33d006ee954f22fca0c5a4a9f989d0c42d80b79a Author: Vadim Pasternak Date: Tue Aug 29 18:02:57 2017 +0000 dt-bindings: Add vendor Mellanox This patch adds Mellanox vendor to vendor-prefixes. Signed-off-by: Vadim Pasternak Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 28eb51f7468a43769bd9dca19a54d97ec7a447ed Author: Janani Sankara Babu Date: Fri Sep 1 12:32:53 2017 +0530 staging:rtl8188eu:core Fix remove unneccessary else block This patch removes the unwanted braces and else statement inside the function 'SecIsInPMKIDList' Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c5b2cef3b64bfd9f206a0bb99ccd24c784aa2062 Merge: 0d22a3c db40b4d Author: David S. Miller Date: Fri Sep 1 10:08:44 2017 -0700 Merge branch 'mvpp2-optional-PHYs-and-GoP-link-irq' Antoine Tenart says: ==================== net: mvpp2: optional PHYs and GoP link irq This series aims at making the driver work when no PHY is connected between a port and the physical layer and not described as a fixed-phy. This is useful for some usecases such as when a switch is connected directly to the serdes lanes. It can also be used for SFP ports on the 7k-db and 8k-db while waiting for the phylink support to land in (which should be part of another series). This series makes the phy optional in the PPv2 driver, and then adds the support for the GoP port link interrupt to handle link status changes on such ports. This was tested using the SFP ports on the 7k-db and 8k-db boards. Since v1: - Now use phy_interface_mode_is_rgmii() in the GoP link patch. - Added one cosmetic patch to take advantage of phy_interface_mode_is_rgmii() in the whole PPv2 driver. ==================== Signed-off-by: David S. Miller commit db40b4d1478c86bf8b1b41a4a5b5d10b0da39f0c Author: Antoine Tenart Date: Fri Sep 1 11:04:55 2017 +0200 Documentation/bindings: net: marvell-pp2: add the link interrupt A link interrupt can be described. Document this valid interrupt name. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-pp2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd3651b2ab66de177ad0d51c239af260a764b9f1 Author: Antoine Tenart Date: Fri Sep 1 11:04:54 2017 +0200 net: mvpp2: use the GoP interrupt for link status changes This patch adds the GoP link interrupt support for when a port isn't connected to a PHY. Because of this the phylib callback is never called and the link status management isn't done. This patch use the GoP link interrupt in such cases to still have a minimal link management. Without this patch ports not connected to a PHY cannot work. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 177 ++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+), 5 deletions(-) commit 5997c86bf0e94f0b29f9ab416b1db62a8fa4e4eb Author: Antoine Tenart Date: Fri Sep 1 11:04:53 2017 +0200 net: mvpp2: make the phy optional There is not necessarily a PHY between the GoP and the physical port. However, the driver currently makes the "phy" property mandatory, contrary to what is stated in the device tree bindings. This patch makes the PHY optional, and aligns the PPv2 driver on its device tree documentation. However if a PHY is provided, the GoP link interrupt won't be used. With this patch switches directly connected to the serdes lanes and SFP ports on the Armada 8040-db and Armada 7040-db can be used if the link interrupt is described in the device tree. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 1df2270d06fa65c3479e713eb00eca25896db653 Author: Antoine Tenart Date: Fri Sep 1 11:04:52 2017 +0200 net: mvpp2: take advantage of the is_rgmii helper Convert all RGMII checks to use the phy_interface_mode_is_rgmii() helper. This is a cosmetic patch. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 9ea859b11b251df57df5bb9fc146ac014b31071c Author: Colin Ian King Date: Fri Sep 1 11:20:57 2017 +0100 staging: typec: fusb302: make structure fusb302_psy_desc static The const structure fusb302_psy_desc is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings symbol 'fusb302_psy_desc' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc05a9c8774bca5ca95518a0ab3a335e45dcc26b Author: Colin Ian King Date: Fri Sep 1 11:08:10 2017 +0100 staging: unisys: visorbus: make two functions static The functions sig_queue_offset and sig_data_offset are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'sig_queue_offset' was not declared. Should it be static? symbol 'sig_data_offset' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d22a3cf8da164dfc694cc159eabd355f14aba7e Merge: 843bd2b 241bc85 Author: David S. Miller Date: Fri Sep 1 10:01:36 2017 -0700 Merge branch 'mlxsw-next-fixes' Jiri Pirko says: ==================== mlxsw: spectrum_router: Couple of fixes Ido Schimmel (2): mlxsw: spectrum_router: Trap packets hitting anycast routes mlxsw: spectrum_router: Set abort trap in all virtual routers ==================== Signed-off-by: David S. Miller commit 241bc859f6d0f912b8a2246896501a9d934149fa Author: Ido Schimmel Date: Fri Sep 1 10:58:56 2017 +0200 mlxsw: spectrum_router: Set abort trap in all virtual routers When the abort mechanism is invoked a default route directing packets to the CPU is programmed in all the virtual routers currently in use. This can result in packet loss in case a new VRF is configured. Upon abort, program the default route in all virtual routers, whether they are in use or not. The patch is directed at net-next since post-abort fixes aren't critical and packet loss due to a missing default route will be insignificant compared to packet loss caused by the CPU port policer. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 --- 1 file changed, 3 deletions(-) commit d3b6d3774fc2b636b12f8ef6367ed294861469ed Author: Ido Schimmel Date: Fri Sep 1 10:58:55 2017 +0200 mlxsw: spectrum_router: Trap packets hitting anycast routes I relied on the fact that anycast routes use the loopback device as their nexthop device to trap packets hitting them to the CPU. After commit 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") this is no longer the case and such routes are programmed with a forward action (note the 'offload' flag): anycast cafe:: dev enp3s0np7 proto kernel metric 0 offload pref medium This will prevent the router from locally receiving packets destined to the Subnet-Router anycast address. Fix this by specifically programming anycast routes with action trap, which results in the following output: anycast cafe:: dev enp3s0np7 proto kernel metric 0 pref medium Fixes: 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 843bd2b38d7f3929e0fa4dd7e8061ba9da7a3961 Merge: 08daaec bb9b9f8 Author: David S. Miller Date: Fri Sep 1 09:57:39 2017 -0700 Merge branch 'bpf-Improve-LRU-map-lookup-performance' Martin KaFai Lau says: ==================== bpf: Improve LRU map lookup performance This patchset improves the lookup performance of the LRU map. Please see individual patch for details. ==================== Signed-off-by: David S. Miller commit bb9b9f8802212d98e70c63045b1734162945eaa5 Author: Martin KaFai Lau Date: Thu Aug 31 23:27:13 2017 -0700 bpf: Only set node->ref = 1 if it has not been set This patch writes 'node->ref = 1' only if node->ref is 0. The number of lookups/s for a ~1M entries LRU map increased by ~30% (260097 to 343313). Other writes on 'node->ref = 0' is not changed. In those cases, the same cache line has to be changed anyway. First column: Size of the LRU hash Second column: Number of lookups/s Before: > echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')" 1048577: 260097 After: > echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')" 1048577: 343313 Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/bpf_lru_list.h | 3 ++- kernel/bpf/hashtab.c | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit cc555421bc118edd070f41258d6f55f1ccfc2558 Author: Martin KaFai Lau Date: Thu Aug 31 23:27:12 2017 -0700 bpf: Inline LRU map lookup Inline the lru map lookup to save the cost in making calls to bpf_map_lookup_elem() and htab_lru_map_lookup_elem(). Different LRU hash size is tested. The benefit diminishes when the cache miss starts to dominate in the bigger LRU hash. Considering the change is simple, it is still worth to optimize. First column: Size of the LRU hash Second column: Number of lookups/s Before: > for i in $(seq 9 20); do echo "$((2**i+1)): $(./map_perf_test 1024 1 $((2**i+1)) 10000000 | awk '{print $3}')"; done 513: 1132020 1025: 1056826 2049: 1007024 4097: 853298 8193: 742723 16385: 712600 32769: 688142 65537: 677028 131073: 619437 262145: 498770 524289: 316695 1048577: 260038 After: > for i in $(seq 9 20); do echo "$((2**i+1)): $(./map_perf_test 1024 1 $((2**i+1)) 10000000 | awk '{print $3}')"; done 513: 1221851 1025: 1144695 2049: 1049902 4097: 884460 8193: 773731 16385: 729673 32769: 721989 65537: 715530 131073: 671665 262145: 516987 524289: 321125 1048577: 260048 Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 637cd8c312d8caf234821fd37238b8f956d9ab13 Author: Martin KaFai Lau Date: Thu Aug 31 23:27:11 2017 -0700 bpf: Add lru_hash_lookup performance test Create a new case to test the LRU lookup performance. At the beginning, the LRU map is fully loaded (i.e. the number of keys is equal to map->max_entries). The lookup is done through key 0 to num_map_entries and then repeats from 0 again. This patch also creates an anonymous struct to properly name the test params in stress_lru_hmap_alloc() in map_perf_test_kern.c. Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 44 +++++++++++++++++++---- samples/bpf/map_perf_test_user.c | 77 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 112 insertions(+), 9 deletions(-) commit 08daaec742d170eabe7f8355c2f86fc8be166f10 Merge: 8fd6820 8598112 Author: David S. Miller Date: Fri Sep 1 09:57:04 2017 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-09-01 This should be the last ipsec-next pull request for this release cycle: 1) Support netdevice ESP trailer removal when decryption is offloaded. From Yossi Kuperman. 2) Fix overwritten return value of copy_sec_ctx(). Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 46320a6acc4fb58f04bcf78c4c942cc43b20f986 Author: Steven Rostedt (VMware) Date: Fri Sep 1 12:04:09 2017 -0400 ftrace: Fix selftest goto location on error In the second iteration of trace_selftest_ops(), the error goto label is wrong in the case where trace_selftest_test_global_cnt is off. In the case of error, it leaks the dynamic ops that was allocated. Cc: stable@vger.kernel.org Fixes: 95950c2e ("ftrace: Add self-tests for multiple function trace users") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f5489f781ae3e4d23a4e8e29e0ea3626739d2d Merge: 3a16191 b5fdde2 Author: Greg Kroah-Hartman Date: Fri Sep 1 16:53:42 2017 +0200 Merge tag 'usb-serial-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.14-rc1 Here are the USB-serial updates for 4.14-rc1; a new option device id and one device-id clean up. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 40326d8a33d5b70039849d233975b63c733d94a2 Author: Shaohua Li Date: Thu Aug 31 22:09:46 2017 -0700 block/loop: allow request merge for directio mode Currently loop disables merge. While it makes sense for buffer IO mode, directio mode can benefit from request merge. Without merge, loop could send small size IO to underlayer disk and harm performance. Reviewed-by: Omar Sandoval Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.c | 66 ++++++++++++++++++++++++++++++++++++++++------------ drivers/block/loop.h | 1 + 2 files changed, 52 insertions(+), 15 deletions(-) commit 54bb0ade6627a183c211345761ec46e4bf0048fe Author: Shaohua Li Date: Thu Aug 31 22:09:45 2017 -0700 block/loop: set hw_sectors Loop can handle any size of request. Limiting it to 255 sectors just burns the CPU for bio split and request merge for underlayer disk and also cause bad fs block allocation in directio mode. Reviewed-by: Omar Sandoval Reviewed-by: Ming Lei Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) commit 7074d0a92758603369655ef5d4f49e6caaae0b4e Author: Florian Eckert Date: Fri Sep 1 08:58:17 2017 +0200 hwmon: (ltq-cputemp) add cpu temp sensor driver Add the lantiq cpu temperature sensor support for xrx200. Signed-off-by: Florian Eckert Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 7 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/ltq-cputemp.c | 163 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+) commit 7a3b68b9075cf9b67692bb97497740bab1dfab41 Author: Florian Eckert Date: Fri Sep 1 08:58:18 2017 +0200 hwmon: (ltq-cputemp) add devicetree bindings documentation Document the devicetree bindings for the ltq-cputemp Signed-off-by: Florian Eckert Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/ltq-cputemp.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ef13ecbc134d7e0ca4ab4834d08bd20885b53c62 Author: Dan Carpenter Date: Wed Aug 30 17:04:56 2017 +0300 kernfs: checking for IS_ERR() instead of NULL The kernfs_get_inode() returns NULL on error, it never returns error pointers. Fixes: aa8188253474 ("kernfs: add exportfs operations") Acked-by: Tejun Heo Acked-by: Greg Kroah-Hartman Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe fs/kernfs/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11b86a84bc535a602fcf72ba6b3aa4eaa748764f Author: Horia Geantă Date: Fri Sep 1 15:58:41 2017 +0300 staging: fsl-dpaa2/eth: fix off-by-one FD ctrl bitmaks Fix the values of DPAA2_FD_CTRL_FSE and DPAA2_FD_CTRL_FAERR, which are shifted off by one bit. Fixes: 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") Cc: Signed-off-by: Horia Geantă Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1f936d73683a540227cca3aaecdb68b6c3d53c5 Merge: a52329a 2d2a2b8 Author: Boris Brezillon Date: Fri Sep 1 15:34:30 2017 +0200 Merge tag 'nand/for-4.14' of git://git.infradead.org/l2-mtd into mtd/next From Boris: " This pull request contains the following core changes: * Fix memory leaks in the core * Remove unused NAND locking support * Rename nand.h into rawnand.h (preparing support for spi NANDs) * Use NAND_MAX_ID_LEN where appropriate * Fix support for 20nm Hynix chips * Fix support for Samsung and Hynix SLC NANDs and the following driver changes: * Various cleanup, improvements and fixes in the qcom driver * Fixes for bugs detected by various static code analysis tools * Fix mxc ooblayout definition * Add a new part_parsers to tmio and sharpsl platform data in order to define a custom list of partition parsers * Request the reset line in exclusive mode in the sunxi driver * Fix a build error in the orion-nand driver when compiled for ARMv4 * Allow 64-bit mvebu platforms to select the PXA3XX driver " commit a52329a9ce9fa5120eda68ae6af050bc498ab83e Merge: 5ffa70b 18f7ce2 Author: Boris Brezillon Date: Fri Sep 1 15:34:00 2017 +0200 Merge tag 'spi-nor/for-4.14' of git://git.infradead.org/l2-mtd into mtd/next From Cyrille: " This pull request contains the following notable changes: - add support to the JEDEC JESD216B specification (SFDP tables). - add support to the Intel Denverton SPI flash controller. - fix error recovery for Spansion/Cypress SPI NOR memories. - fix 4-byte address management for the Aspeed SPI controller. - add support to some Microchip SST26 memory parts - remove unneeded pinctrl header " commit c16a854e4463078aedad601fac76341760a66dd1 Author: Biju Das Date: Tue Aug 29 14:52:06 2017 +0100 mmc: renesas_sdhi: Add r8a7743/5 support Add support for r8a7743/5 SoC.Renesas RZ/G1[ME] (R8A7743/5) SDHI is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Acked-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 ++ 1 file changed, 2 insertions(+) commit f5fd4a67bef5f2c5c2c9eb0cb2900e12d192ae23 Merge: 6f78e0a 6cbcad0 89b1370 66f41da Author: Mark Brown Date: Fri Sep 1 12:13:19 2017 +0100 Merge remote-tracking branches 'asoc/topic/wm8524', 'asoc/topic/wm8804' and 'asoc/topic/zte' into asoc-next commit 6f78e0a1b2c96e0567122f0f679b2d327105c070 Merge: 644cbda cfe267d 5144468 c9f3d34 c996b52 c0d088f Author: Mark Brown Date: Fri Sep 1 12:13:15 2017 +0100 Merge remote-tracking branches 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/utils', 'asoc/topic/ux500' and 'asoc/topic/wm8523' into asoc-next commit 644cbda501ee409aeef091e0cbf693aa15ecf878 Merge: 2e9ac12 1bb7cb6 86464ef e4eabf7 b9045b9 19b0fa1 Author: Mark Brown Date: Fri Sep 1 12:13:10 2017 +0100 Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5720', 'asoc/topic/tegra', 'asoc/topic/tlv320aic32x4' and 'asoc/topic/tlv320aic3x' into asoc-next commit 2e9ac12a00f1de285fc6fd77b9c9949b4bd7283f Merge: 55eafeb a728f56 a1150d4 c5efe23 635eac1 7d29938 Author: Mark Brown Date: Fri Sep 1 12:13:06 2017 +0100 Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/spear', 'asoc/topic/sta32x', 'asoc/topic/stm32' and 'asoc/topic/sunxi' into asoc-next commit 55eafeb5cdbd5d7440f5532ebf13d49edc66316b Merge: cb2b0d7 abfedab c26d838 b7e2672 1107a29 Author: Mark Brown Date: Fri Sep 1 12:13:03 2017 +0100 Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5670', 'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-next commit cb2b0d7c6b961b333be22184ff3890eff0a02162 Merge: e5fadb7 1d89147 f1d68ea 88faae2 f36544a 9c324af Author: Mark Brown Date: Fri Sep 1 12:12:58 2017 +0100 Merge remote-tracking branches 'asoc/topic/rt5563', 'asoc/topic/rt5616', 'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5663' into asoc-next commit e5fadb7281ed7c86d0d2ad394588ac3eda99b019 Merge: bf3cc31 fcf005a 1fe165b 60b0fde eb33869 Author: Mark Brown Date: Fri Sep 1 12:12:55 2017 +0100 Merge remote-tracking branches 'asoc/topic/rk3036', 'asoc/topic/rockchip', 'asoc/topic/rt274' and 'asoc/topic/rt5514' into asoc-next commit bf3cc310a23defb31e23c3f062b335178c8a603f Merge: af4f477 27bfda0 da61a11 d7622fa Author: Mark Brown Date: Fri Sep 1 12:12:52 2017 +0100 Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/psc-ac97' and 'asoc/topic/pxa' into asoc-next commit af4f47717ff17cf81710cbd5dd78f11705204b88 Merge: af796e3 b286401 0d97ee8 3dfcd34 f70eab3 e23d834 Author: Mark Brown Date: Fri Sep 1 12:12:48 2017 +0100 Merge remote-tracking branches 'asoc/topic/mtk', 'asoc/topic/mxs', 'asoc/topic/nau8825', 'asoc/topic/nuc900' and 'asoc/topic/of-graph' into asoc-next commit af796e3b2c82c7becd38cb08ed262a5e969c95c1 Merge: 796ff73 636d7e28 df9401b 9ab51b9 dea1105 Author: Mark Brown Date: Fri Sep 1 12:12:44 2017 +0100 Merge remote-tracking branches 'asoc/topic/kirkwood', 'asoc/topic/max9867', 'asoc/topic/max98926' and 'asoc/topic/max98927' into asoc-next commit 796ff73a080886330e917baad228c6dffad8003d Merge: 7d630ce 94372fc 3a4e1b9 f3f7df7 eae3734 Author: Mark Brown Date: Fri Sep 1 12:12:41 2017 +0100 Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack' and 'asoc/topic/jz4740' into asoc-next commit 7d630ce4d635b847c4c15606738fb0f5aa777cf3 Merge: 3b2d0bb b888454 a6a67da dd80627 b1dc00a 943fa02 Author: Mark Brown Date: Fri Sep 1 12:12:36 2017 +0100 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8316', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/hdmi' into asoc-next commit 3b2d0bb5ef7f0d07fe05feefd15c1acbc3bda22e Merge: 8f90409 465c925 55be663 8937ea0 4243e04 Author: Mark Brown Date: Fri Sep 1 12:12:32 2017 +0100 Merge remote-tracking branches 'asoc/topic/cs43130', 'asoc/topic/cs53l30', 'asoc/topic/cygnus' and 'asoc/topic/davinci' into asoc-next commit 8f90409f91e338fc8b026bffafe7a3877d1a5ac7 Merge: a641ed5 c566077 db3be25 72a63c6 Author: Mark Brown Date: Fri Sep 1 12:12:29 2017 +0100 Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34' and 'asoc/topic/cs42l42' into asoc-next commit a641ed5e35dfa1276aa59ba1426d3e6adb0c2823 Merge: 82af2b7 bf9790b 2dc3b7b 7f8159a aeb6fa0 Author: Mark Brown Date: Fri Sep 1 12:12:26 2017 +0100 Merge remote-tracking branches 'asoc/topic/blackfin', 'asoc/topic/build', 'asoc/topic/cirrus' and 'asoc/topic/compress' into asoc-next commit 82af2b7f3d69501b6883e31281b4d73531bad9aa Merge: 94e26c0 68feed9 4dbcc5f 0515760 052fba7 cc6e256 Author: Mark Brown Date: Fri Sep 1 12:12:21 2017 +0100 Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x' and 'asoc/topic/bcm' into asoc-next commit 94e26c07002fa01fa807c68c6b44355b79ba82ac Merge: 460f623 a5702e1 Author: Mark Brown Date: Fri Sep 1 12:12:20 2017 +0100 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 460f623a6e3cab02c3cda52cf64094a96afece4e Merge: 39e0a0a 38a7708 Author: Mark Brown Date: Fri Sep 1 12:12:19 2017 +0100 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 39e0a0ae6957a7eafcd3245f45f40bf822e49812 Merge: 0314f69 88c2746 Author: Mark Brown Date: Fri Sep 1 12:12:18 2017 +0100 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit 0314f6947c5132c63413855c34d8cff22e95ae2b Merge: 2e70042 f13db33 Author: Mark Brown Date: Fri Sep 1 12:12:17 2017 +0100 Merge remote-tracking branch 'asoc/topic/const' into asoc-next commit 2e700424799ebe7731839efcee30a5a23525e7b5 Merge: ab99d98 44c0736 Author: Mark Brown Date: Fri Sep 1 12:12:17 2017 +0100 Merge remote-tracking branch 'asoc/topic/component' into asoc-next commit ab99d9872e93e83fc2d992eeb8de7d9a128858eb Merge: a5ef8ca 5602671 Author: Mark Brown Date: Fri Sep 1 12:12:16 2017 +0100 Merge remote-tracking branch 'asoc/topic/msm8916' into asoc-next commit a5ef8ca69a6bea61062854ee37cb199a5659964c Merge: 1a34ec4 4428ffa 8d7313b Author: Mark Brown Date: Fri Sep 1 12:12:13 2017 +0100 Merge remote-tracking branches 'asoc/fix/arizona' and 'asoc/fix/mtk' into asoc-linus commit 1a34ec4ab2851e2d0a02e2a63b6296e686512a7e Merge: c8b24e2 e0936c3 Author: Mark Brown Date: Fri Sep 1 12:12:12 2017 +0100 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit c8b24e23ad8f283d5f81d4888751fb8828f076a0 Merge: 72aaea3 d70c4a0 Author: Mark Brown Date: Fri Sep 1 12:12:11 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 72aaea38a266639fdc4c8cfc2c421735fd3bbda9 Merge: cc4a41f 0599730 Author: Mark Brown Date: Fri Sep 1 12:12:09 2017 +0100 Merge tag 'asoc-fix-v4.13-rc7' into asoc-linus ASoC: Fixes for v4.13 A couple of fixes, one for a regression in simple-card introduced during the merge window that was only reported this week and another for a regression in registration of ACPI GPIOs. # gpg: Signature made Thu 31 Aug 2017 12:50:29 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 38a770859e10f566c434ae0d3f380954280f262b Author: Pradeep Tewani Date: Fri Sep 1 13:36:13 2017 +0530 ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins Copier can support upto 4 output pins. However, only pin 0 is configured as a part of copier initialization. Configuring rest of pins require the separate IPC to be sent to fw. Signed-off-by: Pradeep Tewani Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 53 ++++++++++++++++++++++++++++++---- sound/soc/intel/skylake/skl-topology.h | 5 ++++ 2 files changed, 53 insertions(+), 5 deletions(-) commit b21f0522ee376ddbea54fab47ff36f687f2a438b Author: Kuninori Morimoto Date: Fri Sep 1 04:33:01 2017 +0000 ASoC: add missing compile rule for max98371 It is still using old driver style, this patch also fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/Makefile | 1 + sound/soc/codecs/max98371.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) commit 2dc3b7b06bace6d8986a5fae6569ef30276cdd73 Author: Kuninori Morimoto Date: Fri Sep 1 04:33:27 2017 +0000 ASoC: add missing compile rule for sirf-audio-codec It is still using old driver style, this patch also fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/Makefile | 1 + sound/soc/codecs/sirf-audio-codec.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit a3dcadd220b4572f9baaad5f3c0c00044273c961 Author: Kuninori Morimoto Date: Fri Sep 1 04:33:01 2017 +0000 ASoC: add missing compile rule for max98371 It is still using old driver style, this patch also fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/Makefile | 1 + sound/soc/codecs/max98371.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) commit 465c925695593b43695e2396f7279879a72275eb Author: Li Xu Date: Fri Aug 18 11:00:20 2017 -0500 ASoC: cs43130: Add devicetree bindings for CS43130 Add devicetree bindings documentation file for Cirrus Logic CS43130 codec. Signed-off-by: Li Xu Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/sound/cs43130.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 8f1e5bf9b4408e91942b94c76583eaf098f19382 Author: Li Xu Date: Fri Aug 18 11:00:19 2017 -0500 ASoC: cs43130: Add support for CS43130 codec Add support for Cirrus Logic CS43130 codec. Support: I2S/DSP PCM playback. DoP/DSD playback. HP detection and DC/AC impedance measurement. Signed-off-by: Li Xu Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs43130.c | 2690 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs43130.h | 546 +++++++++ 4 files changed, 3244 insertions(+) commit a728f56094e7cf60a1dc0642fe86901d1a4dfb4e Author: Vitaly Wool Date: Thu Aug 17 13:42:36 2017 +0200 ASoC: make clock direction configurable in asoc-simple Some CPU drivers (e. g. davinci-mcasp) may require the system clock to be configured as OUT, while there's no good way currently to set SND_SOC_CLK_OUT in simple-soc driver if the clock is fixed-rate. This patch makes asoc_simple_card_init_dai() initialize clock to SND_SOCK_CLK_OUT if explicitly stated in the relevant dts file. This change is transparent and doesn't change the default behavior. Signed-off-by: Vitaly Wool Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/simple-card.txt | 3 +++ include/sound/simple_card_utils.h | 1 + sound/soc/generic/simple-card-utils.c | 9 +++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) commit 1a41aa1376df9e24d0c760df1a6f59765316c457 Author: Hauke Mehrtens Date: Sun Aug 20 00:18:10 2017 +0200 spi: spi-falcon: drop check of boot select Do not check which flash type the SoC was booted from before using this driver. Assume that the device tree is correct and use this driver when it was added to device tree. This also removes a build dependency to the SoC code. All device trees I am aware of only have one correct flash device entry in it. The device tree is anyway bundled with the kernel in all systems using device tree I know of. The boot mode can be specified with some pin straps and will select the flash type the rom code will boot from. One SPI, NOR or NAND flash chip can be connect to the EBU and used to load the first stage boot loader from. Signed-off-by: Hauke Mehrtens Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Mark Brown drivers/spi/spi-falcon.c | 5 ----- 1 file changed, 5 deletions(-) commit 4a75682ce3bcd57d146db25b888e71f659ba4998 Author: Christoph Hellwig Date: Sat Aug 26 11:25:02 2017 +0200 MAINTAINERS: use the iommu list for the dma-mapping subsystem Maintaining a subsystem with linux-kernel as the main list is painful as it has way to much traffic. On the other hand the dma-mapping subsystem is small enough that a list on its own would be silly. So use the list for the closes subsystem instead instead. Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy Acked-by: Joerg Roedel Acked-by: Marek Szyprowski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2436bdcda53ff4abb7897c87fa29ef3de8055344 Author: Christoph Hellwig Date: Fri Aug 25 17:13:09 2017 +0200 dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags DMA_MEMORY_IO was never used in the tree, so remove it. That means there is no need for the DMA_MEMORY_MAP flag either now, so remove it as well and change dma_declare_coherent_memory to return a normal errno value. Signed-off-by: Christoph Hellwig Reviewed-by: Marek Szyprowski Documentation/DMA-API.txt | 21 +--------- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 44 ++++++++------------- arch/arm/mach-imx/mach-mx31moboard.c | 12 +++--- arch/sh/drivers/pci/fixups-dreamcast.c | 3 +- drivers/base/dma-coherent.c | 46 +++++++--------------- drivers/base/dma-mapping.c | 7 +--- .../platform/soc_camera/sh_mobile_ceu_camera.c | 5 +-- drivers/scsi/NCR_Q720.c | 3 +- drivers/usb/host/ohci-sm501.c | 7 ++-- drivers/usb/host/ohci-tmio.c | 9 ++--- include/linux/dma-mapping.h | 6 +-- 11 files changed, 52 insertions(+), 111 deletions(-) commit 47b59d8e40850a05370ee9198ea5e505d89489f1 Merge: cc4a41f 0b9a369 8da4af9 c3aa474 bfee0cf 4193998 96302d8 6ce5b0f af6ee6c 3ff2dcc 5082219 ec62b1a cceb845 add02cf Author: Joerg Roedel Date: Fri Sep 1 11:31:42 2017 +0200 Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next commit 5082219b6a61cab585765a2ce4cd2a1f2f15dcdc Author: Filippo Sironi Date: Thu Aug 31 10:58:11 2017 +0200 iommu/vt-d: Don't be too aggressive when clearing one context entry Previously, we were invalidating context cache and IOTLB globally when clearing one context entry. This is a tad too aggressive. Invalidate the context cache and IOTLB for the interested device only. Signed-off-by: Filippo Sironi Cc: David Woodhouse Cc: David Woodhouse Cc: Joerg Roedel Cc: Jacob Pan Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Acked-by: David Woodhouse Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit c6ef89421e236d75693ae968d80d44a52409889d Author: Ingo Molnar Date: Fri Sep 1 11:04:56 2017 +0200 x86/idt: Fix the X86_TRAP_BP gate Andrei Vagin reported a CRIU regression and bisected it back to: 90f6225fba0c ("x86/idt: Move IST stack based traps to table init") This table init conversion loses the system-gate property of X86_TRAP_BP and erroneously moves it from DPL3 to DPL0. Fix it. Reported-by: Andrei Vagin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: dvlasenk@redhat.com Cc: linux-tip-commits@vger.kernel.org Cc: peterz@infradead.org Cc: brgerst@gmail.com Cc: rostedt@goodmis.org Cc: bp@alien8.de Cc: luto@kernel.org Cc: jpoimboe@redhat.com Cc: Cyrill Gorcunov Cc: torvalds@linux-foundation.org Cc: tip-bot for Jacob Shin Link: http://lkml.kernel.org/r/20170901082630.xvyi5bwk6etmppqc@gmail.com arch/x86/kernel/idt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b32dbc1e0bf0eaa8bdd725491b361d5fc2f57a85 Author: Christoph Hellwig Date: Fri Aug 25 17:12:18 2017 +0200 dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag This flag was never implemented or used. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Documentation/DMA-API.txt | 4 ---- drivers/base/dma-coherent.c | 2 -- drivers/char/virtio_console.c | 3 --- include/linux/dma-mapping.h | 3 +-- 4 files changed, 1 insertion(+), 11 deletions(-) commit 723288836628bc1c0855f3bb7b64b1803e4b9e4a Author: Robin Murphy Date: Thu Aug 31 11:32:54 2017 +0100 of: restrict DMA configuration Moving DMA configuration to happen later at driver probe time had the unnoticed side-effect that we now perform DMA configuration for *every* device represented in DT, rather than only those explicitly created by the of_platform and PCI code. As Christoph points out, this is not really the best thing to do. Whilst there may well be other DMA-capable buses that can benefit from having their children automatically configured after the bridge has probed, there are also plenty of others like USB, MDIO, etc. that definitely do not support DMA and should not be indiscriminately processed. The good news is that in most cases the DT "dma-ranges" property serves as an appropriate indicator - per a strict interpretation of the spec, anything lacking a "dma-ranges" property should be considered not to have a mapping of DMA address space from its children to its parent, thus anything for which of_dma_get_range() does not succeed does not need DMA configuration. Certain bus types have a general expectation of DMA capability and carry a well-established precedent that an absent "dma-ranges" implies the same as the empty property, so we automatically opt those in to DMA configuration regardless, to avoid regressing most existing platforms. Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") Reported-by: Christoph Hellwig Signed-off-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Christoph Hellwig drivers/of/device.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 40a5fce495715c48c2e02668144e68a507ac5a30 Author: Daniel Verkamp Date: Wed Aug 30 15:18:19 2017 -0700 nvme-fabrics: generate spec-compliant UUID NQNs The default host NQN, which is generated based on the host's UUID, does not follow the UUID-based NQN format laid out in the NVMe 1.3 specification. Remove the "NVMf:" portion of the NQN to match the spec. Signed-off-by: Daniel Verkamp Reviewed-by: Max Gurtovoy Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a6430ce462172caac7c73f4afd550ab0f105737 Author: Martijn Coenen Date: Thu Aug 31 10:04:29 2017 +0200 ANDROID: binder: don't queue async transactions to thread. This can cause issues with processes using the poll() interface: 1) client sends two oneway transactions 2) the second one gets queued on async_todo (because the server didn't handle the first one yet) 3) server returns from poll(), picks up the first transaction and does transaction work 4) server is done with the transaction, sends BC_FREE_BUFFER, and the second transaction gets moved to thread->todo 5) libbinder's handlePolledCommands() only handles the commands in the current data buffer, so doesn't see the new transaction 6) the server continues running and issues a new outgoing transaction. Now, it suddenly finds the incoming oneway transaction on its thread todo, and returns that to userspace. 7) userspace does not expect this to happen; it may be holding a lock while making the outgoing transaction, and if handling the incoming trasnaction requires taking the same lock, userspace will deadlock. By queueing the async transaction to the proc workqueue, we make sure it's only picked up when a thread is ready for proc work. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bb74562a7f8398231be20a5c9d36225301a9be31 Author: Martijn Coenen Date: Thu Aug 31 10:04:28 2017 +0200 ANDROID: binder: don't enqueue death notifications to thread todo. This allows userspace to request death notifications without having to worry about getting an immediate callback on the same thread; one scenario where this would be problematic is if the death recipient handler grabs a lock that was already taken earlier (eg as part of a nested transaction). Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 858b2719686ddd0ab5fc77479a46d16f90e6b7da Author: Martijn Coenen Date: Thu Aug 31 10:04:26 2017 +0200 ANDROID: binder: Don't BUG_ON(!spin_is_locked()). Because is_spin_locked() always returns false on UP systems. Use assert_spin_locked() instead, and remove the WARN_ON() instances, since those were easy to verify. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit abcc61537e3566cae7f1fd225f2dcb82b3595fe3 Author: Colin Cross Date: Thu Aug 31 10:04:24 2017 +0200 ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl The BINDER_GET_NODE_DEBUG_INFO ioctl will return debug info on a node. Each successive call reusing the previous return value will return the next node. The data will be used by libmemunreachable to mark the pointers with kernel references as reachable. Signed-off-by: Colin Cross Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 43 +++++++++++++++++++++++++++++++++++++ include/uapi/linux/android/binder.h | 14 ++++++++++++ 2 files changed, 57 insertions(+) commit 408c68b17aea2f23236cdb49b6c060e0ded846ed Author: Martijn Coenen Date: Thu Aug 31 10:04:19 2017 +0200 ANDROID: binder: push new transactions to waiting threads. Instead of pushing new transactions to the process waitqueue, select a thread that is waiting on proc work to handle the transaction. This will make it easier to improve priority inheritance in future patches, by setting the priority before we wake up a thread. If we can't find a waiting thread, submit the work to the proc waitqueue instead as we did previously. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 181 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 127 insertions(+), 54 deletions(-) commit 1b77e9dcc3da9359f5936a7a4a0b5b6585c5e37e Author: Martijn Coenen Date: Thu Aug 31 10:04:18 2017 +0200 ANDROID: binder: remove proc waitqueue Removes the process waitqueue, so that threads can only wait on the thread waitqueue. Whenever there is process work to do, pick a thread and wake it up. Having the caller pick a thread is helpful for things like priority inheritance. This also fixes an issue with using epoll(), since we no longer have to block on different waitqueues. Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 255 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 181 insertions(+), 74 deletions(-) commit 8ef4665aa129a14f3733efc651c53a3c6c47b500 Author: Sherry Yang Date: Thu Aug 31 11:56:36 2017 -0700 android: binder: Add page usage in binder stats Add the number of active, lru, and free pages for each binder process in binder stats Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 ++ drivers/android/binder_alloc.c | 28 ++++++++++++++++++++++++++++ drivers/android/binder_alloc.h | 2 ++ 3 files changed, 32 insertions(+) commit 957ccc2bc8f9ebfe8b19112cdc6c2bb20fd7bcf8 Author: Sherry Yang Date: Thu Aug 31 10:26:06 2017 -0700 android: binder: fixup crash introduced by moving buffer hdr Fix crash introduced by 74310e06be4d74dcf67cd108366710dee5c576d5 (android: binder: Move buffer out of area shared with user space) when close is called after open without mmap in between. Reported-by: kernel test robot Fixes: 74310e06be4d ("android: binder: Move buffer out of area shared with user space") 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 fdbb9457b4e1d3a6deb3325bba7616334f371be7 Author: Markus Elfring Date: Thu Aug 3 20:23:57 2017 +0200 axonram: Return directly after a failed kzalloc() in axon_ram_probe() * Return directly after a call of the function "kzalloc" failed at the beginning. * Delete a repeated check for the local variable "bank" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/sysdev/axonram.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit a1bddf3991573f3dff2762bfca5e113f19889d5a Author: Markus Elfring Date: Thu Aug 3 20:00:16 2017 +0200 axonram: Improve a size determination in axon_ram_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/sysdev/axonram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c86a93971ec7134672333e5a9758368a909d0854 Author: Markus Elfring Date: Thu Aug 3 19:49:18 2017 +0200 axonram: Delete an error message for a failed memory allocation in axon_ram_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/sysdev/axonram.c | 1 - 1 file changed, 1 deletion(-) commit bab9f954aaf352127725a9b7920226abdb65b604 Author: Alistair Popple Date: Fri Aug 11 16:22:56 2017 +1000 powerpc/powernv/npu: Move tlb flush before launching ATSD The nest MMU tlb flush needs to happen before the GPU translation shootdown is launched to avoid the GPU refilling its tlb with stale nmmu translations prior to the nmmu flush completing. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit de854e54d79bc0ad5c45c5be50821b1c0639cb75 Author: Julia Lawall Date: Wed Aug 2 23:01:45 2017 +0200 powerpc/macintosh: constify wf_sensor_ops structures The wf_sensor_ops structures are only stored in the ops field of a wf_sensor structure, which is declared as const. Thus the wf_sensor_ops structures themselves can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct wf_sensor_ops i@p = { ... }; @ok1@ identifier r.i; struct wf_sensor s; position p; @@ s.ops = &i@p @ok2@ identifier r.i; struct wf_sat_sensor s; position p; @@ s.sens.ops = &i@p @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct wf_sensor_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct wf_sensor_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Michael Ellerman drivers/macintosh/windfarm_lm75_sensor.c | 2 +- drivers/macintosh/windfarm_lm87_sensor.c | 2 +- drivers/macintosh/windfarm_max6690_sensor.c | 2 +- drivers/macintosh/windfarm_smu_sat.c | 2 +- drivers/macintosh/windfarm_smu_sensors.c | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) commit 8a7aef2cb3dafd2e8560750f4e5ad2cc2d9b1d17 Author: Julia Lawall Date: Sat Oct 29 21:37:02 2016 +0200 powerpc/iommu: Use permission-specific DEVICE_ATTR variants Use DEVICE_ATTR_RW for read-write attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. Signed-off-by: Julia Lawall Acked-by: Michael Ellerman (powerpc) Signed-off-by: Michael Ellerman arch/powerpc/kernel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6ab41161b44a3b4d504ac29c9dd9976890d76a3f Author: Markus Elfring Date: Fri Aug 4 16:37:56 2017 +0200 powerpc/eeh: Delete an error out of memory message at init time Omit an extra message for a memory allocation failure in eeh_dev_init(). This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [mpe: Do not drop the message that can happen at runtime and lead to an event not being handled] Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_dev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit aae85e3c20ec3baa90aa901a517c8f4cc684b278 Author: Markus Elfring Date: Sun May 7 16:32:04 2017 +0200 powerpc/mm: Use seq_putc() in two functions Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_hashpagetable.c | 2 +- arch/powerpc/mm/dump_linuxpagetables.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b6a945ae03fd3962b51b27ecedf4f1dd7e034229 Author: Rob Herring Date: Tue Jul 18 16:43:12 2017 -0500 macintosh: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring [mpe: Also convert the two cases inside #if 0] Signed-off-by: Michael Ellerman drivers/macintosh/macio_sysfs.c | 2 +- drivers/macintosh/rack-meter.c | 12 ++++++------ drivers/macintosh/smu.c | 8 ++++---- drivers/macintosh/via-cuda.c | 4 ++-- drivers/macintosh/windfarm_fcu_controls.c | 4 ++-- drivers/macintosh/windfarm_lm87_sensor.c | 4 ++-- drivers/macintosh/windfarm_smu_sat.c | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) commit 859420e3155d8192b31a93cd92d32c85151bf8da Author: Rob Herring Date: Tue Jul 18 16:43:07 2017 -0500 ide: pmac: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: "David S. Miller" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-ide@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Acked-by: David S. Miller Signed-off-by: Michael Ellerman drivers/ide/pmac.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b0d6c9bab5e41d07f2bece1ef8c81cd2175b5f88 Author: Haren Myneni Date: Thu Aug 31 00:19:07 2017 -0700 crypto/nx: Add P9 NX support for 842 compression engine This patch adds P9 NX support for 842 compression engine. Virtual Accelerator Switchboard (VAS) is used to access 842 engine on P9. For each NX engine per chip, setup receive window using vas_rx_win_open() which configures RxFIFo with FIFO address, lpid, pid and tid values. This unique (lpid, pid, tid) combination will be used to identify the target engine. For crypto open request, open send window on the NX engine for the corresponding chip / cpu where the open request is executed. This send window will be closed upon crypto close request. NX provides high and normal priority FIFOs. For compression / decompression requests, we use only hight priority FIFOs in kernel. Each NX request will be communicated to VAS using copy/paste instructions with vas_copy_crb() / vas_paste_crb() functions. Signed-off-by: Haren Myneni Reviewed-by: Ram Pai Signed-off-by: Michael Ellerman drivers/crypto/nx/Kconfig | 1 + drivers/crypto/nx/nx-842-powernv.c | 377 ++++++++++++++++++++++++++++++++++++- 2 files changed, 372 insertions(+), 6 deletions(-) commit 146e9f1b65478643f2729a97ccb8be60bb4492e5 Author: Haren Myneni Date: Thu Aug 31 00:18:18 2017 -0700 crypto/nx: Add P9 NX specific error codes for 842 engine This patch adds changes for checking P9 specific 842 engine error codes. These errros are reported in coprocessor status block (CSB) for failures. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman arch/powerpc/include/asm/icswx.h | 3 +++ drivers/crypto/nx/nx-842-powernv.c | 18 ++++++++++++++++++ drivers/crypto/nx/nx-842.h | 8 ++++++++ 3 files changed, 29 insertions(+) commit f05368336b3ae399f66cf511c52c6d69c7bc6b39 Author: Haren Myneni Date: Thu Aug 31 00:17:25 2017 -0700 crypto/nx: Use kzalloc for workmem allocation Send window is opened / closed for each crypto session. So initializes txwin in workmem. 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 cd38a8a8a2ab95e43a031410db6a32f2d84e3fc0 Author: Haren Myneni Date: Thu Aug 31 00:14:06 2017 -0700 crypto/nx: Add nx842_add_coprocs_list function Updating coprocessor list is moved to nx842_add_coprocs_list(). This function will be used for both icswx and VAS functions. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842-powernv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1ee51b28ee6ad7919da4fbe9672263dd274dcbfe Author: Haren Myneni Date: Thu Aug 31 00:13:15 2017 -0700 crypto/nx: Create nx842_delete_coprocs function Move deleting coprocessors info upon exit or failure to nx842_delete_coprocs(). Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842-powernv.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 56c10d5ea68b9a1425df0dedbe5d2710cc7d8bfa Author: Haren Myneni Date: Thu Aug 31 00:12:22 2017 -0700 crypto/nx: Create nx842_configure_crb function Configure CRB is moved to nx842_configure_crb() so that it can be used for icswx and VAS exec functions. VAS function will be added later with P9 support. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842-powernv.c | 57 +++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 19 deletions(-) commit c97f8169fb227cae5adeac56cafa980f25978031 Author: Haren Myneni Date: Thu Aug 31 00:11:29 2017 -0700 crypto/nx: Rename nx842_powernv_function as icswx function Rename nx842_powernv_function to nx842_powernv_exec. nx842_powernv_exec points to nx842_exec_icswx and will be point to VAS exec function which will be added later for P9 NX support. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842-powernv.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit ad1b0122bdc96cbcfcfbc9ef59f9bf3658802a72 Author: Christophe Leroy Date: Wed Aug 23 16:54:38 2017 +0200 powerpc/32: remove a NOP from memset() memset() is patched after initialisation to activate the optimised part which uses cache instructions. Today we have a 'b 2f' to skip the optimised patch, which then gets replaced by a NOP, implying a useless cycle consumption. As we have a 'bne 2f' just before, we could use that instruction for the live patching, hence removing the need to have a dedicated 'b 2f' to be replaced by a NOP. This patch changes the 'bne 2f' by a 'b 2f'. During init, that 'b 2f' is then replaced by 'bne 2f' Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_32.c | 7 ++++++- arch/powerpc/lib/copy_32.S | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 7bf6057b962016eee57bc76295f80a26f90172f7 Author: Christophe Leroy Date: Wed Aug 23 16:54:36 2017 +0200 powerpc/32: optimise memset() There is no need to extend the set value to an int when the length is lower than 4 as in that case we only do byte stores. We can therefore immediately branch to the part handling it. By separating it from the normal case, we are able to eliminate a few actions on the destination pointer. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/lib/copy_32.S | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit c0622167e3d4195d50b925bfabd8966589635e75 Author: Christophe Leroy Date: Wed Aug 23 16:54:34 2017 +0200 powerpc: fix location of two EXPORT_SYMBOL Commit 9445aa1a3062a ("ppc: move exports to definitions") added EXPORT_SYMBOL() for memset() and flush_hash_pages() in the middle of the functions. This patch moves them at the end of the two functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/lib/copy_32.S | 2 +- arch/powerpc/mm/hash_low_32.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit da74f659205ea08cb0fd0b3050637b0e0eb31520 Author: Christophe Leroy Date: Wed Aug 23 16:54:32 2017 +0200 powerpc/32: add memset16() Commit 694fc88ce271f ("powerpc/string: Implement optimized memset variants") added memset16(), memset32() and memset64() for the 64 bits PPC. On 32 bits, memset64() is not relevant, and as shown below, the generic version of memset32() gives a good code, so only memset16() is candidate for an optimised version. 000009c0 : 9c0: 2c 05 00 00 cmpwi r5,0 9c4: 39 23 ff fc addi r9,r3,-4 9c8: 4d 82 00 20 beqlr 9cc: 7c a9 03 a6 mtctr r5 9d0: 94 89 00 04 stwu r4,4(r9) 9d4: 42 00 ff fc bdnz 9d0 9d8: 4e 80 00 20 blr The last part of memset() handling the not 4-bytes multiples operates on bytes, making it unsuitable for handling word without modification. As it would increase memset() complexity, it is better to implement memset16() from scratch. In addition it has the advantage of allowing a more optimised memset16() than what we would have by using the memset() function. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/string.h | 4 +++- arch/powerpc/lib/copy_32.S | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit 45f62159f3aafe27e2df45a3ec83b32ca7304410 Author: Paul Mackerras Date: Fri Sep 1 09:51:23 2017 +1000 powerpc: Wrap register number correctly for string load/store instructions Michael Ellerman reported that emulate_loadstore() was trying to access element 32 of regs->gpr[], which doesn't exist, when emulating a string store instruction. This is because the string load and store instructions (lswi, lswx, stswi and stswx) are defined to wrap around from register 31 to register 0 if the number of bytes being loaded or stored is sufficiently large. This wrapping was not implemented in the emulation code. To fix it, we mask the register number after incrementing it. Reported-by: Michael Ellerman Fixes: c9f6f4ed95d4 ("powerpc: Implement emulation of string loads and stores") Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d2b65ac6526a82965212b632d42687251e122a36 Author: Paul Mackerras Date: Wed Aug 30 16:34:09 2017 +1000 powerpc: Emulate load/store floating point as integer word instructions This adds emulation for the lfiwax, lfiwzx and stfiwx instructions. This necessitated adding a new flag to indicate whether a floating point or an integer conversion was needed for LOAD_FP and STORE_FP, so this moves the size field in op->type up 4 bits. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 5 ++-- arch/powerpc/lib/sstep.c | 60 ++++++++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 17 deletions(-) commit 31bfdb036f1281831db2532178f0da41f4dc9bed Author: Paul Mackerras Date: Wed Aug 30 14:12:40 2017 +1000 powerpc: Use instruction emulation infrastructure to handle alignment faults This replaces almost all of the instruction emulation code in fix_alignment() with calls to analyse_instr(), emulate_loadstore() and emulate_dcbz(). The only emulation code left is the SPE emulation code; analyse_instr() etc. do not handle SPE instructions at present. One result of this is that we can now handle alignment faults on all the new VSX load and store instructions that were added in POWER9. VSX loads/stores will take alignment faults for unaligned accesses to cache-inhibited memory. Another effect is that we no longer rely on the DAR and DSISR values set by the processor. With this, we now need to include the instruction emulation code unconditionally. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 4 - arch/powerpc/kernel/align.c | 803 ++------------------------------------------ arch/powerpc/lib/Makefile | 4 +- 3 files changed, 34 insertions(+), 777 deletions(-) commit a53d5182e24c22986ad0e99e52f8fe343ee7d7ac Author: Paul Mackerras Date: Wed Aug 30 14:12:39 2017 +1000 powerpc: Separate out load/store emulation into its own function This moves the parts of emulate_step() that deal with emulating load and store instructions into a new function called emulate_loadstore(). This is to make it possible to reuse this code in the alignment handler. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 9 ++ arch/powerpc/lib/sstep.c | 258 ++++++++++++++++++++++----------------- 2 files changed, 154 insertions(+), 113 deletions(-) commit d955189ae42796621fb439e5e778ccaeebc2a1e7 Author: Paul Mackerras Date: Wed Aug 30 14:12:38 2017 +1000 powerpc: Handle opposite-endian processes in emulation code This adds code to the load and store emulation code to byte-swap the data appropriately when the process being emulated is set to the opposite endianness to that of the kernel. This also enables the emulation for the multiple-register loads and stores (lmw, stmw, lswi, stswi, lswx, stswx) to work for little-endian. In little-endian mode, the partial word at the end of a transfer for lsw*/stsw* (when the byte count is not a multiple of 4) is loaded/stored at the least-significant end of the register. Additionally, this fixes a bug in the previous code in that it could call read_mem/write_mem with a byte count that was not 1, 2, 4 or 8. Note that this only works correctly on processors with "true" little-endian mode, such as IBM POWER processors from POWER6 on, not the so-called "PowerPC" little-endian mode that uses address swizzling as implemented on the old 32-bit 603, 604, 740/750, 74xx CPUs. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 7 +- arch/powerpc/lib/sstep.c | 184 +++++++++++++++++++++++++++------------ 2 files changed, 131 insertions(+), 60 deletions(-) commit b9da9c8a48c56339c7c95d8ff0c9aff93727ac95 Author: Paul Mackerras Date: Wed Aug 30 14:12:37 2017 +1000 powerpc: Set regs->dar if memory access fails in emulate_step() This adds code to the instruction emulation code to set regs->dar to the address of any memory access that fails. This address is not necessarily the same as the effective address of the instruction, because if the memory access is unaligned, it might cross a page boundary and fault on the second page. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 74 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 22 deletions(-) commit b2543f7b20bb2a551ed340447d7303f0ce4644f1 Author: Paul Mackerras Date: Wed Aug 30 14:12:36 2017 +1000 powerpc: Emulate the dcbz instruction This adds code to analyse_instr() and emulate_step() to understand the dcbz (data cache block zero) instruction. The emulate_dcbz() function is made public so it can be used by the alignment handler in future. (The apparently unnecessary cropping of the address to 32 bits is there because it will be needed in that situation.) Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 2 ++ arch/powerpc/lib/sstep.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 1f41fb790460acf432f826f4aeeff6f7da891ff7 Author: Paul Mackerras Date: Wed Aug 30 14:12:35 2017 +1000 powerpc: Emulate load/store floating double pair instructions This adds lfdp[x] and stfdp[x] to the set of instructions that analyse_instr() and emulate_step() understand. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 68 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 16 deletions(-) commit e61ccc7b0c413f3937dfd53b72a8ac29b226975f Author: Paul Mackerras Date: Wed Aug 30 14:12:34 2017 +1000 powerpc: Emulate vector element load/store instructions This adds code to analyse_instr() and emulate_step() to handle the vector element loads and stores: lvebx, lvehx, lvewx, stvebx, stvehx, stvewx. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit c22435a5f3d8f85ea162ae523a6ba60a58521ba5 Author: Paul Mackerras Date: Wed Aug 30 14:12:33 2017 +1000 powerpc: Emulate FP/vector/VSX loads/stores correctly when regs not live At present, the analyse_instr/emulate_step code checks for the relevant MSR_FP/VEC/VSX bit being set when a FP/VMX/VSX load or store is decoded, but doesn't recheck the bit before reading or writing the relevant FP/VMX/VSX register in emulate_step(). Since we don't have preemption disabled, it is possible that we get preempted between checking the MSR bit and doing the register access. If that happened, then the registers would have been saved to the thread_struct for the current process. Accesses to the CPU registers would then potentially read stale values, or write values that would never be seen by the user process. Another way that the registers can become non-live is if a page fault occurs when accessing user memory, and the page fault code calls a copy routine that wants to use the VMX or VSX registers. To fix this, the code for all the FP/VMX/VSX loads gets restructured so that it forms an image in a local variable of the desired register contents, then disables preemption, checks the MSR bit and either sets the CPU register or writes the value to the thread struct. Similarly, the code for stores checks the MSR bit, copies either the CPU register or the thread struct to a local variable, then reenables preemption and then copies the register image to memory. If the instruction being emulated is in the kernel, then we must not use the register values in the thread_struct. In this case, if the relevant MSR enable bit is not set, then emulate_step refuses to emulate the instruction. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 1 + arch/powerpc/lib/ldstfp.S | 241 +++++++-------------------------------- arch/powerpc/lib/sstep.c | 228 +++++++++++++++++++++++++----------- 3 files changed, 203 insertions(+), 267 deletions(-) commit e0a0986b446553c6a69fe1bb36250224646b264f Author: Paul Mackerras Date: Wed Aug 30 14:12:32 2017 +1000 powerpc: Make load/store emulation use larger memory accesses At the moment, emulation of loads and stores of up to 8 bytes to unaligned addresses on a little-endian system uses a sequence of single-byte loads or stores to memory. This is rather inefficient, and the code is hard to follow because it has many ifdefs. In addition, the Power ISA has requirements on how unaligned accesses are performed, which are not met by doing all accesses as sequences of single-byte accesses. Emulation of VSX loads and stores uses __copy_{to,from}_user, which means the emulation code has no control on the size of accesses. To simplify this, we add new copy_mem_in() and copy_mem_out() functions for accessing memory. These use a sequence of the largest possible aligned accesses, up to 8 bytes (or 4 on 32-bit systems), to copy memory between a local buffer and user memory. We then rewrite {read,write}_mem_unaligned and the VSX load/store emulation using these new functions. These new functions also simplify the code in do_fp_load() and do_fp_store() for the unaligned cases. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 235 +++++++++++++++++++++-------------------------- 1 file changed, 106 insertions(+), 129 deletions(-) commit 958465ee5407dc1b25ba6eb33f0e8bb6179960ee Author: Paul Mackerras Date: Wed Aug 30 14:12:31 2017 +1000 powerpc: Add emulation for the addpcis instruction The addpcis instruction puts the sum of the next instruction address plus a constant into a register. Since the result depends on the address of the instruction, it will give an incorrect result if it is single-stepped out of line, which is what the *probes subsystem will currently do if a probe is placed on an addpcis instruction. This fixes the problem by adding emulation of it to analyse_instr(). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 5762e08344bd7c5bfc41030f74c4ab6ce6e461d0 Author: Paul Mackerras Date: Wed Aug 30 14:12:30 2017 +1000 powerpc: Don't update CR0 in emulation of popcnt, prty, bpermd instructions The architecture shows the least-significant bit of the instruction word as reserved for the popcnt[bwd], prty[wd] and bpermd instructions, that is, these instructions never update CR0. Therefore this changes the emulation of these instructions to skip the CR0 update. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f1bbb99f41e06d5ba93ea8eafacd96a7a71d0c7d Author: Paul Mackerras Date: Wed Aug 30 14:12:29 2017 +1000 powerpc: Fix emulation of the isel instruction The case added for the isel instruction was added inside a switch statement which uses the 10-bit minor opcode field in the 0x7fe bits of the instruction word. However, for the isel instruction, the minor opcode field is only the 0x3e bits, and the 0x7c0 bits are used for the "BC" field, which indicates which CR bit to use to select the result. Therefore, for the isel emulation to work correctly when BC != 0, we need to match on ((instr >> 1) & 0x1f) == 15). To do this, we pull the isel case out of the switch statement and put it in an if statement of its own. Fixes: e27f71e5ff3c ("powerpc/lib/sstep: Add isel instruction emulation") Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d120cdbce68c3739f94f733bec376460fb9cbc14 Author: Paul Mackerras Date: Wed Aug 30 14:12:28 2017 +1000 powerpc/64: Fix update forms of loads and stores to write 64-bit EA When a 64-bit processor is executing in 32-bit mode, the update forms of load and store instructions are required by the architecture to write the full 64-bit effective address into the RA register, though only the bottom 32 bits are used to address memory. Currently, the instruction emulation code writes the truncated address to the RA register. This fixes it by keeping the full 64-bit EA in the instruction_op structure, truncating the address in emulate_step() where it is used to address memory, rather than in the address computations in analyse_instr(). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 4 +- arch/powerpc/lib/sstep.c | 109 ++++++++++++++++++++------------------- 2 files changed, 58 insertions(+), 55 deletions(-) commit 350779a29f11f80ac66a8b38a7718ad30f003f18 Author: Paul Mackerras Date: Wed Aug 30 14:12:27 2017 +1000 powerpc: Handle most loads and stores in instruction emulation code This extends the instruction emulation infrastructure in sstep.c to handle all the load and store instructions defined in the Power ISA v3.0, except for the atomic memory operations, ldmx (which was never implemented), lfdp/stfdp, and the vector element load/stores. The instructions added are: Integer loads and stores: lbarx, lharx, lqarx, stbcx., sthcx., stqcx., lq, stq. VSX loads and stores: lxsiwzx, lxsiwax, stxsiwx, lxvx, lxvl, lxvll, lxvdsx, lxvwsx, stxvx, stxvl, stxvll, lxsspx, lxsdx, stxsspx, stxsdx, lxvw4x, lxsibzx, lxvh8x, lxsihzx, lxvb16x, stxvw4x, stxsibx, stxvh8x, stxsihx, stxvb16x, lxsd, lxssp, lxv, stxsd, stxssp, stxv. These instructions are handled both in the analyse_instr phase and in the emulate_step phase. The code for lxvd2ux and stxvd2ux has been taken out, as those instructions were never implemented in any processor and have been taken out of the architecture, and their opcodes have been reused for other instructions in POWER9 (lxvb16x and stxvb16x). The emulation for the VSX loads and stores uses helper functions which don't access registers or memory directly, which can hopefully be reused by KVM later. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 8 + arch/powerpc/include/asm/sstep.h | 21 ++ arch/powerpc/lib/Makefile | 1 + arch/powerpc/lib/ldstfp.S | 70 ++-- arch/powerpc/lib/quad.S | 62 ++++ arch/powerpc/lib/sstep.c | 610 +++++++++++++++++++++++++++++++--- 6 files changed, 710 insertions(+), 62 deletions(-) commit ee0a54d7978874fb2ba3b1e61e88ffffd31fcbc9 Author: Paul Mackerras Date: Wed Aug 30 14:12:26 2017 +1000 powerpc: Don't check MSR FP/VMX/VSX enable bits in analyse_instr() This removes the checks for the FP/VMX/VSX enable bits in the MSR from analyse_instr() and adds them to emulate_step() instead. The reason for this is that we may want to use analyse_instr() in a situation where the FP/VMX/VSX register values are stored in the current thread_struct and the FP/VMX/VSX enable bits in the MSR image in the pt_regs are zero. Since analyse_instr() doesn't make any changes to register state, it is reasonable for it to indicate what the effect of an instruction would be even though the relevant enable bit is off. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 54 +++++++++++------------------------------------- 1 file changed, 12 insertions(+), 42 deletions(-) commit 3cdfcbfd32b9d1c0d4a6fa80ee9c390927aab948 Author: Paul Mackerras Date: Wed Aug 30 14:12:25 2017 +1000 powerpc: Change analyse_instr so it doesn't modify *regs The analyse_instr function currently doesn't just work out what an instruction does, it also executes those instructions whose effect is only to update CPU registers that are stored in struct pt_regs. This is undesirable because optprobes uses analyse_instr to work out if an instruction could be successfully emulated in future. This changes analyse_instr so it doesn't modify *regs; instead it stores information in the instruction_op structure to indicate what registers (GPRs, CR, XER, LR) would be set and what value they would be set to. A companion function called emulate_update_regs() can then use that information to update a pt_regs struct appropriately. As a minor cleanup, this replaces inline asm using the cntlzw and cntlzd instructions with calls to __builtin_clz() and __builtin_clzl(). Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sstep.h | 52 +++- arch/powerpc/lib/sstep.c | 601 +++++++++++++++++++++++---------------- 2 files changed, 396 insertions(+), 257 deletions(-) commit e8a27f836f165c26f867ece7f31eb5c811692319 Author: NeilBrown Date: Thu Aug 31 10:23:25 2017 +1000 md/bitmap: disable bitmap_resize for file-backed bitmaps. bitmap_resize() does not work for file-backed bitmaps. The buffer_heads are allocated and initialized when the bitmap is read from the file, but resize doesn't read from the file, it loads from the internal bitmap. When it comes time to write the new bitmap, the bh is non-existent and we crash. The common case when growing an array involves making the array larger, and that normally means making the bitmap larger. Doing that inside the kernel is possible, but would need more code. It is probably easier to require people who use file-backed bitmaps to remove them and re-add after a reshape. So this patch disables the resizing of arrays which have file-backed bitmaps. This is better than crashing. Reported-by: Zhilong Liu Fixes: d60b479d177a ("md/bitmap: add bitmap_resize function to allow bitmap resizing.") Cc: stable@vger.kernel.org (v3.5+). Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/bitmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8fd682072335e98b53823c89efa4d2460e79a3d5 Merge: e12f1a5 0adc3dd Author: David S. Miller Date: Fri Sep 1 06:05:16 2017 +0100 Merge branch 'bpf-Add-option-to-set-mark-and-priority-in-cgroup-sock-programs' David Ahern says: ==================== bpf: Add option to set mark and priority in cgroup sock programs Add option to set mark and priority in addition to bound device for newly created sockets. Also, allow the bpf programs to use the get_current_uid_gid helper meaning socket marks, priority and device can be set based on the uid/gid of the running process. Sample programs are updated to demonstrate the new options. v3 - no changes to Patches 1 and 2 which Alexei acked in previous versions - dropped change related to recursive programs in a cgroup - updated tests per dropped patch v2 - added flag to control recursive behavior as requested by Alexei - added comment to sock_filter_func_proto regarding use of get_current_uid_gid helper - updated test programs for recursive option ==================== Signed-off-by: David S. Miller commit 0adc3dd90050538ac543c6c0bea8e8527a9e2e2c Author: David Ahern Date: Thu Aug 31 15:05:50 2017 -0700 samples/bpf: Update cgroup socket examples to use uid gid helper Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/sock_flags_kern.c | 5 +++++ samples/bpf/test_cgrp2_sock.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 33aeb5e30acac9ae68cb5acc4eecc1fca4358859 Author: David Ahern Date: Thu Aug 31 15:05:49 2017 -0700 samples/bpf: Update cgrp2 socket tests Update cgrp2 bpf sock tests to check that device, mark and priority can all be set on a socket via bpf programs attached to a cgroup. Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_cgrp2_sock.sh | 162 +++++++++++++++++++++++++++++++---------- 1 file changed, 124 insertions(+), 38 deletions(-) commit f776d460b8d25c5319b7dbc4ffd4d5fbbc10e7c1 Author: David Ahern Date: Thu Aug 31 15:05:48 2017 -0700 samples/bpf: Add option to dump socket settings Add option to dump socket settings. Will be used in the next patch to verify bpf programs are correctly setting mark, priority and device based on the cgroup attachment for the program run. Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_cgrp2_sock.c | 75 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) commit 609b1c32752de65134a4e4e2ceb3933790463723 Author: David Ahern Date: Thu Aug 31 15:05:47 2017 -0700 samples/bpf: Add detach option to test_cgrp2_sock Add option to detach programs from a cgroup. Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_cgrp2_sock.c | 50 ++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 15 deletions(-) commit fa38aa17bcf31a798638d911891cd478cdea40e0 Author: David Ahern Date: Thu Aug 31 15:05:46 2017 -0700 samples/bpf: Update sock test to allow setting mark and priority Update sock test to set mark and priority on socket create. Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_cgrp2_sock.c | 134 ++++++++++++++++++++++++++++++++++++----- samples/bpf/test_cgrp2_sock.sh | 2 +- 2 files changed, 119 insertions(+), 17 deletions(-) commit ae2cf1c466bea99e927899707aed022942505d27 Author: David Ahern Date: Thu Aug 31 15:05:45 2017 -0700 bpf: Allow cgroup sock filters to use get_current_uid_gid helper Allow BPF programs run on sock create to use the get_current_uid_gid helper. IPv4 and IPv6 sockets are created in a process context so there is always a valid uid/gid Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 482dca939fb7ee35ba20b944b4c2476133dbf0df Author: David Ahern Date: Thu Aug 31 15:05:44 2017 -0700 bpf: Add mark and priority to sock options that can be set Add socket mark and priority to fields that can be set by ebpf program when a socket is created. Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 2 ++ net/core/filter.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit a45a1f3614182267803baadba657b59e2ddc0545 Author: Bart Van Assche Date: Wed Aug 30 16:58:42 2017 -0700 scsi: scsi-mq: Always unprepare before requeuing a request One of the two scsi-mq functions that requeue a request unprepares a request before requeueing (scsi_io_completion()) but the other function not (__scsi_queue_insert()). Make sure that a request is unprepared before requeuing it. Fixes: commit d285203cf647 ("scsi: add support for a blk-mq based I/O path.") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cad8cf20a65f3d6cd70719bd0fec2d54546b12ef Author: Bart Van Assche Date: Wed Aug 30 16:58:41 2017 -0700 scsi: Show .retries and .jiffies_at_alloc in debugfs Make these two member variables available in debugfs such that their value can be verified by kernel developers. An example of the new output: ffff8804a513d480 {.op=READ, .cmd_flags=META|PRIO, .rq_flags=MQ_INFLIGHT|DONTPREP|IO_STAT|STATS, .atomic_flags=STARTED, .tag=17, .internal_tag=-1, .cmd=Read(10) 28 00 08 81 32 38 00 00 08 00, .retries=0, allocated 0.010 s ago} Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 832889f5ed45ec90c76f6eb97e64baf845929007 Author: Bart Van Assche Date: Wed Aug 30 16:58:40 2017 -0700 scsi: Improve requeuing behavior Requests are unprepared and reprepared when being requeued. Avoid that requeuing resets .jiffies_at_alloc and .retries by initializing these two member variables from inside scsi_initialize_rq() and by preserving both member variables when preparing a request. This patch affects the requeuing behavior of both the legacy scsi and the scsi-mq code paths. Reported-by: Brian King References: https://lkml.org/lkml/2017/8/18/923 ("Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Brian King Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 64104f703212ff50e855bb2e2fa80d71db62c521 Author: Bart Van Assche Date: Wed Aug 30 16:58:39 2017 -0700 scsi: Call scsi_initialize_rq() for filesystem requests If a pass-through request is submitted then blk_get_request() initializes that request by calling scsi_initialize_rq(). Also call this function for filesystem requests. Introduce CMD_INITIALIZED to keep track of whether or not a request has already been initialized. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Brian King Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 26 ++++++++++++++++++++++---- include/scsi/scsi_cmnd.h | 3 +++ 2 files changed, 25 insertions(+), 4 deletions(-) commit df2f84516758788889281e97d736c7863ff200ea Author: Colin Ian King Date: Thu Jul 27 00:56:27 2017 +0100 clk: ti: check for null return in strrchr to avoid null dereferencing strrchr can potentially return a null so the following strlen on the null pointer can cause a null dereference. Add a check to see if the string postfix is not null before calling strlen. Detected by CoverityScan, CID#1452039 ("Dereference null return") Signed-off-by: Colin Ian King Acked-by: Tero Kristo Signed-off-by: Stephen Boyd drivers/clk/ti/adpll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2316a7a33408b6e7b24e9d2a9a7c24af9a012289 Author: Alex Frid Date: Tue Jul 25 13:18:40 2017 +0300 clk: Don't write error code into divider register Add a check for error returned by divider value calculation to avoid writing error code into hw register. Signed-off-by: Alex Frid Reviewed-by: Peter De Schrijver Reviewed-by: Jon Mayo Fixes: bca9690b9426 ("clk: divider: Make generic for usage elsewhere") Signed-off-by: Stephen Boyd drivers/clk/clk-divider.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c264416c9b3dfd860aba9bcbe0ab4e0f061c0ca Author: Katsuhiro Suzuki Date: Thu Aug 10 16:23:46 2017 +0900 clk: uniphier: add video input subsystem clock Add a clock for video input subsystem (EXIV) on UniPhier LD11/LD20 SoCs. Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e3dd205860a52347a858db58ace3d28998105da1 Author: Katsuhiro Suzuki Date: Thu Aug 10 16:23:45 2017 +0900 clk: uniphier: add audio system clock Add clock for audio subsystem (AIO) and SoC internal audio codec (EVEA) on UniPhier LD11/LD20 SoCs. Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3e4d618b0722b64c551c3f2fc4c4f9cb3558ed93 Author: Gabriel Fernandez Date: Mon Aug 21 13:59:02 2017 +0200 clk: stm32h7: Add stm32h743 clock driver This patch enables clocks for STM32H743 boards. Signed-off-by: Gabriel Fernandez for MFD changes: Acked-by: Lee Jones for DT-Bindings Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st,stm32h7-rcc.txt | 71 + drivers/clk/Makefile | 1 + drivers/clk/clk-stm32h7.c | 1410 ++++++++++++++++++++ include/dt-bindings/clock/stm32h7-clks.h | 165 +++ include/dt-bindings/mfd/stm32h7-rcc.h | 136 ++ 5 files changed, 1783 insertions(+) commit 0a9c869d5c568054a828a38357f30d77659e5b1e Author: Gabriel Fernandez Date: Mon Aug 21 13:59:01 2017 +0200 clk: gate: expose clk_gate_ops::is_enabled This patch exposes clk_gate_ops::is_enabled as functions that can be directly called and assigned in places like this so we don't need wrapper functions that do nothing besides forward the call. Signed-off-by: Gabriel Fernandez Suggested-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-gate.c | 3 ++- include/linux/clk-provider.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 42d3c5f634de895cf01f066a1ea67140d653c36e Author: Gabriel Fernandez Date: Mon Aug 21 13:59:00 2017 +0200 clk: nxp: clk-lpc32xx: rename clk_gate_is_enabled() We need to export clk_gate_is_enabled() from clk framework, then to avoid compilation issue we have to rename clk_gate_is_enabled() in NXP LPC32xx clock driver. We changed all gate op with 'lpc32xx_' prefix: lpc32xx_clk_gate_enable(), lpc32xx_clk_gate_disable(), lpc32xx_clk_gate_is_enabled(). Signed-off-by: Gabriel Fernandez Acked-by: Vladimir Zapolskiy Signed-off-by: Stephen Boyd drivers/clk/nxp/clk-lpc32xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 736de651a83640c3a7597926625e48c882df8efa Author: Masahiro Yamada Date: Thu Aug 31 21:03:36 2017 +0900 clk: uniphier: add PXs3 clock data Add basic clock data for Socionext's new SoC PXs3. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/uniphier-clock.txt | 3 +++ drivers/clk/uniphier/clk-uniphier-core.c | 12 +++++++++ drivers/clk/uniphier/clk-uniphier-sys.c | 30 ++++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier.h | 1 + 4 files changed, 46 insertions(+) commit 9fa7231b1979f792b2cbc395c52e197158494948 Author: Leo Yan Date: Tue Aug 29 15:58:37 2017 +0800 clk: hi6220: change watchdog clock source The old code uses tcxo (19.2MHz) as watchdog clock but actually the watchdog uses 32K clock, as result the watchdog timeout cannot be set correctly and delay long time to reset SoC. So this patch is to use 'ref32k' as clock source for watchdog. Fixes: 72ea48610d43 ("clk: hi6220: Clock driver support for Hisilicon hi6220 SoC") Signed-off-by: Leo Yan Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi6220.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 08d6ac9ee5fedd82040bc878705981b67a116a3f Author: Colin Ian King Date: Thu Aug 31 09:30:44 2017 -0700 Input: byd - make array seq static, reduces object code size Don't populate the array seq on the stack, instead make it static. Makes the object code smaller by over 1100 bytes: Before: text data bss dec hex filename 6152 1216 64 7432 1d08 drivers/input/mouse/byd.o After: text data bss dec hex filename 4974 1280 64 6318 18ae drivers/input/mouse/byd.o Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/mouse/byd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ef08d7a4438bb85856ee158f2b5e3e02c479279 Author: Zhang Rui Date: Thu Jul 20 10:22:47 2017 +0800 Thermal: int3406_thermal: fix thermal sysfs I/F there are three concepts represent backlight in int3406_thermal driver. 1. the raw brightness value from native graphics driver. 2. the percentage numbers from ACPI _BCL control method. 3. the consecutive numbers represent cooling states. int3406_thermal driver 1. uses value from DDDL/DDPC as the lower/upper limit, which is consistent with ACPI _BCL control methods. 2. reads current and maximum brightness from the native graphics driver. 3. expose them to thermal sysfs I/F This patch fixes the code that switches between the raw brightness value and the cooling state, which results in bogus value in thermal sysfs I/F. Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/int3406_thermal.c | 96 +++++++++-------------- 1 file changed, 37 insertions(+), 59 deletions(-) commit 43f6b0cfb2e4dfd5aa452a1d44491e805e37b7da Author: nixiaoming Date: Thu Aug 31 18:51:09 2017 +0800 KVM: PPC: Book3S HV: Fix memory leak in kvm_vm_ioctl_get_htab_fd We do ctx = kzalloc(sizeof(*ctx), GFP_KERNEL) and then later on call anon_inode_getfd(), but if that fails we don't free ctx, so that memory gets leaked. To fix it, this adds kfree(ctx) in the failure path. Signed-off-by: nixiaoming Reviewed-by: Paolo Bonzini Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 + 1 file changed, 1 insertion(+) commit f8ff9777ec48c4c3078e96b33d88109783078a81 Author: Bjorn Andersson Date: Thu Aug 31 09:27:35 2017 -0700 rpmsg: glink: Export symbols from common code The common code needs to export the probe and remove symbols in order for the SMEM and RPM drivers to access them when compiled as a module. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 3 +++ 1 file changed, 3 insertions(+) commit 2a5bfe47624bfc835aa0632a0505ba55576c98db Author: Steven Rostedt (VMware) Date: Thu Aug 31 17:36:51 2017 -0400 ftrace: Zero out ftrace hashes when a module is removed When a ftrace filter has a module function, and that module is removed, the filter still has its address as being enabled. This can cause interesting side effects. Nothing dangerous, but unwanted functions can be traced because of it. # cd /sys/kernel/tracing # echo ':mod:snd_seq' > set_ftrace_filter # cat set_ftrace_filter snd_use_lock_sync_helper [snd_seq] check_event_type_and_length [snd_seq] snd_seq_ioctl_pversion [snd_seq] snd_seq_ioctl_client_id [snd_seq] snd_seq_ioctl_get_queue_tempo [snd_seq] update_timestamp_of_queue [snd_seq] snd_seq_ioctl_get_queue_status [snd_seq] snd_seq_set_queue_tempo [snd_seq] snd_seq_ioctl_set_queue_tempo [snd_seq] snd_seq_ioctl_get_queue_timer [snd_seq] seq_free_client1 [snd_seq] [..] # rmmod snd_seq # cat set_ftrace_filter # modprobe kvm # cat set_ftrace_filter kvm_set_cr4 [kvm] kvm_emulate_hypercall [kvm] kvm_set_dr [kvm] This is because removing the snd_seq module after it was being filtered, left the address of the snd_seq functions in the hash. When the kvm module was loaded, some of its functions were loaded at the same address as the snd_seq module. This would enable them to be filtered and traced. Now we don't want to clear the hash completely. That would cause removing a module where only its functions are filtered, to cause the tracing to enable all functions, as an empty filter means to trace all functions. Instead, just set the hash ip address to zero. Then it will never match any function. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) commit de8cf95047cfe06d0bc3b7bbbe4fd337d47da2c7 Author: Johannes Thumshirn Date: Wed Aug 30 16:04:13 2017 +0200 Kbuild: enable -Wunused-macros warning for "make W=2" We have lots of dead defines and macros in drivers, lets offer users a way to detect and eventually remove them. Signed-off-by: Johannes Thumshirn Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) commit 8e9b466799230bc20a029579e92d4cd526e5a2e1 Author: Masahiro Yamada Date: Sun Aug 20 15:04:11 2017 +0900 kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd) Kbuild conventionally uses $(shell cd ... && /bin/pwd) idiom to get the absolute path of the directory because GNU Make 3.80, the minimal supported version at that time, did not support $(abspath ...) or $(realpath ...). Commit 37d69ee30808 ("docs: bump minimal GNU Make version to 3.81") dropped the GNU Make 3.80 support, so we are now allowed to use those make-builtin helpers. This conversion will provide better portability without relying on the pwd command or its location /bin/pwd. I am intentionally using $(realpath ...) instead $(abspath ...) in some places. The difference between the two is $(realpath ...) returns an empty string if the given path does not exist. It is convenient in places where we need to error-out if the makefile fails to create an output directory. Signed-off-by: Masahiro Yamada Acked-by: Thierry Reding Makefile | 12 ++++++------ scripts/gdb/linux/Makefile | 2 +- tools/power/cpupower/Makefile | 2 +- tools/scripts/Makefile.include | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) commit 8f98ae0c9b90bb46097e4f28e81e9ae6148e5694 Merge: 58738c4 5e40559 Author: Dan Williams Date: Thu Aug 31 16:25:59 2017 -0700 Merge branch 'for-4.14/fs' into libnvdimm-for-next commit 65bc9d7ff2d7c93a09dd6d6632d6170058fc0d34 Author: Elaine Zhang Date: Wed Aug 16 10:00:03 2017 +0800 clk: Kconfig: Name RK805 in Kconfig for COMMON_CLK_RK808 The RK808 and RK805 PMICs are using a similar register map. We can reuse the clk driver for the RK805 PMIC. So let's add the RK805 in the Kconfig description. Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17ecd246414b3a0fe0cb248c86977a8bda465b7b Author: Maxime Ripard Date: Fri Aug 25 09:42:02 2017 +0200 rtc: sun6i: Add support for the external oscillator gate The RTC can output its 32kHz clock outside of the SoC, for example to clock a WiFi chip. Create a new clock that other devices will be able to retrieve, while maintaining the DT stability by providing a default name for that clock if clock-output-names doesn't list one. Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/sun6i-rtc.txt | 4 ++-- drivers/rtc/rtc-sun6i.c | 24 +++++++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) commit f22d9cdcb5eb7ed1c4629a167474d68df0003a3d Author: Miodrag Dinic Date: Fri Aug 18 15:08:54 2017 +0200 rtc: goldfish: Add RTC driver for Android emulator Add device driver for a virtual RTC device in Android emulator. The compatible string used by OS for binding the driver is defined as "google,goldfish-rtc". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Alexandre Belloni MAINTAINERS | 1 + drivers/rtc/Kconfig | 8 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-goldfish.c | 237 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 247 insertions(+) commit 7a08de1d8fd27ac60ed8ce7a15efb88471014080 Author: Aleksandar Markovic Date: Fri Aug 18 15:08:53 2017 +0200 dt-bindings: Add device tree binding for Goldfish RTC driver Add documentation for DT binding of Goldfish RTC driver. The compatible string used by OS for binding the driver is "google,goldfish-rtc". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/google,goldfish-rtc.txt | 17 +++++++++++++++++ MAINTAINERS | 5 +++++ 2 files changed, 22 insertions(+) commit 0759c886f4fbaadd1ea6a67a1e442207d6215f0d Author: Nikita Yushchenko Date: Thu Aug 24 09:32:11 2017 +0300 rtc: ds1307: add basic support for ds1341 chip This adds support for reading and writing date/time from/to ds1341 chip. ds1341 chip has other features - alarms, input clock (can be used instead of intercal oscillator for better accuracy), output clock ("square wave generation"). However, not all of that is available at the same time. Same chip pins, CLKIN/nINTA and SQW/nINTB, can be used either for input/output clocks, or for alarm interrupts. Role of these pins on particular board depends on hardware wiring. We can add device tree properties that describe if each of pins is wired as clock, or as interrupt, or left unconnected, and enable support for corresponding functionality based on that. But that is cumbersome, requires hardware for testing, and has to deal with bit enabling/disabling output clock also affects which pins alarm interrupts are routed to. Another factor is that there are hardware setups (i.e. ZII RDU2) that power DS1341 from SuperCap, which makes power saving critical. For such setups, kernel driver should leave register bits that control mentioned pins in the state configured by bootloader. Given all that, it was decided to limit support to "only date/time" for now. That is enough for common use case. Full (and cumbersome) implementation can be added later if ever needed. Signed-off-by: Nikita Yushchenko Reviewed-by: Linus Walleij Tested-by: Aleksander Morgado Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 +++++----- drivers/rtc/rtc-ds1307.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) commit 969fa07b9479f435bc4363e4ff75db99fc9b24fb Author: Heiner Kallweit Date: Wed Jul 12 07:49:54 2017 +0200 rtc: ds1307: remove member nvram_offset from struct ds1307 Remove member nvram_offset from struct ds1307 and use the value stored in struct chip_desc directly. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e553170a597e30ceb39bdf602f33421dc348017a Author: Heiner Kallweit Date: Wed Jul 12 07:49:47 2017 +0200 rtc: ds1307: factor out offset to struct chip_desc Factor out offset to struct chip_desc and remove it from struct ds1307. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 1efb98ba5ea57c4be5a1698f745abff382e17151 Author: Heiner Kallweit Date: Wed Jul 12 07:49:44 2017 +0200 rtc: ds1307: factor out rtc_ops to struct chip_desc Factor out rtc_ops to struct chip_desc and use ds13xx_rtc_ops as default. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 51 ++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit 45947127054efb95e128ba130d0768640765dae7 Author: Heiner Kallweit Date: Wed Jul 12 07:49:41 2017 +0200 rtc: ds1307: factor out irq_handler to struct chip_desc Factor out irq_handler to struct chip_desc and use ds1307_irq as default. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 82e2d43f6315d7ae8cca1d00c94f25df0f17eb85 Author: Heiner Kallweit Date: Wed Jul 12 07:49:37 2017 +0200 rtc: ds1307: improve irq setup Change the usage of variable want_irq to reflect its name. Don't set it to true in case wakeup is enabled but no interrupt number is given. In addition set variable ds1307_can_wakeup_device if chip->alarm is set only. This allows to simplify the code and make it better understandable. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 7624df482d7aba599a92ebe1a1fab3e27749b658 Author: Heiner Kallweit Date: Wed Jul 12 07:49:33 2017 +0200 rtc: ds1307: constify struct chip_desc variables Constify struct chip_desc variables. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8490fd55ab90e0039242a5f53acf8a6c2c5e961 Author: Heiner Kallweit Date: Wed Jul 12 07:49:28 2017 +0200 rtc: ds1307: improve trickle charger initialization Instead of storing the trickle_charger_setup value in struct chip_desc we can let function ds1307_trickle_init return it because it's used in the probe function only. This allows us to constify struct chip_desc variables in a next step. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 0b6ee8059448003591cc67fa1ee7db4d979a5bab Author: Heiner Kallweit Date: Wed Jul 12 07:49:22 2017 +0200 rtc: ds1307: factor out bbsqi bit to struct chip_desc Factor out the bbsqi bit to struct chip_desc. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 340fd7bce08af00f97d07d5d09d1a9822379efec Author: Heiner Kallweit Date: Wed Jul 12 07:49:14 2017 +0200 rtc: ds1307: remove member irq from struct ds1307 The irq number is used in the probe function only, so we don't have to store it in struct ds1307. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 79c676c4e31e7d31b5adfbac996dd167766cf4ab Author: Elaine Zhang Date: Wed Aug 16 10:00:35 2017 +0800 rtc: rk808: Name RK805 in Kconfig for RTC_DRV_RK808 The RK808 and RK805 PMICs are using a similar register map. We can reuse the rtc driver for the RK805 PMIC. So let's add the RK805 in the Kconfig description. Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45a63518493ac33506247227d5758bf2318cfbdc Author: Arvind Yadav Date: Sun Aug 20 00:37:55 2017 +0530 rtc: 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: Alexandre Belloni drivers/rtc/rtc-ds1672.c | 2 +- drivers/rtc/rtc-em3027.c | 2 +- drivers/rtc/rtc-max6900.c | 2 +- drivers/rtc/rtc-rv3029c2.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 58738c495e15badd2015e19ff41f1f1ed55200bc Author: Dan Williams Date: Thu Aug 31 15:41:55 2017 -0700 libnvdimm: fix integer overflow static analysis warning Dan reports: The patch 62232e45f4a2: "libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices" from Jun 8, 2015, leads to the following static checker warning: drivers/nvdimm/bus.c:1018 __nd_ioctl() warn: integer overflows 'buf_len' From a casual review, this seems like it might be a real bug. On the first iteration we load some data into in_env[]. On the second iteration we read a use controlled "in_size" from nd_cmd_in_size(). It can go up to UINT_MAX - 1. A high number means we will fill the whole in_env[] buffer. But we potentially keep looping and adding more to in_len so now it can be any value. It simple enough to change, but it feels weird that we keep looping even though in_env is totally full. Shouldn't we just return an error if we don't have space for desc->in_num. We keep looping because the size of the total input is allowed to be bigger than the 'envelope' which is a subset of the payload that tells us how much data to expect. For safety explicitly check that buf_len does not overflow which is what the checker flagged. Cc: Fixes: 62232e45f4a2: "libnvdimm: control (ioctl) messages for nvdimm_bus..." Reported-by: Dan Carpenter Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5deb67f77a266010e2c10fb124b7516d0d258ce8 Author: Robin Murphy Date: Thu Aug 31 12:27:09 2017 +0100 libnvdimm, nd_blk: remove mmio_flush_range() mmio_flush_range() suffers from a lack of clearly-defined semantics, and is somewhat ambiguous to port to other architectures where the scope of the writeback implied by "flush" and ordering might matter, but MMIO would tend to imply non-cacheable anyway. Per the rationale in 67a3e8fe9015 ("nd_blk: change aperture mapping from WC to WB"), the only existing use is actually to invalidate clean cache lines for ARCH_MEMREMAP_PMEM type mappings *without* writeback. Since the recent cleanup of the pmem API, that also now happens to be the exact purpose of arch_invalidate_pmem(), which would be a far more well-defined tool for the job. Rather than risk potentially inconsistent implementations of mmio_flush_range() for the sake of one callsite, streamline things by removing it entirely and instead move the ARCH_MEMREMAP_PMEM related definitions up to the libnvdimm level, so they can be shared by NFIT as well. This allows NFIT to be enabled for arm64. Signed-off-by: Robin Murphy Signed-off-by: Dan Williams arch/x86/Kconfig | 1 - arch/x86/include/asm/cacheflush.h | 2 -- drivers/acpi/nfit/Kconfig | 2 +- drivers/acpi/nfit/core.c | 2 +- drivers/nvdimm/pmem.h | 14 -------------- include/linux/libnvdimm.h | 15 +++++++++++++++ lib/Kconfig | 3 --- tools/testing/nvdimm/test/nfit.c | 4 ++-- 8 files changed, 19 insertions(+), 24 deletions(-) commit d9b83c7569536e3255992491737d9f895640ea18 Author: Vishal Verma Date: Wed Aug 30 19:36:03 2017 -0600 libnvdimm, btt: rework error clearing Clearing errors or badblocks during a BTT write requires sending an ACPI DSM, which means potentially sleeping. Since a BTT IO happens in atomic context (preemption disabled, spinlocks may be held), we cannot perform error clearing in the course of an IO. Due to this error clearing for BTT IOs has hitherto been disabled. In this patch we move error clearing out of the atomic section, and thus re-enable error clearing with BTTs. When we are about to add a block to the free list, we check if it was previously marked as an error, and if it was, we add it to the freelist, but also set a flag that says error clearing will be required. We then drop the lane (ending the atomic context), and send a zero buffer so that the error can be cleared. The error flag in the free list is protected by the nd 'lane', and is set only be a thread while it holds that lane. When the error is cleared, the flag is cleared, but while holding a mutex for that freelist index. When writing, we check for two things - 1/ If the freelist mutex is held or if the error flag is set. If so, this is an error block that is being (or about to be) cleared. 2/ If the block is a known badblock based on nsio->bb The second check is required because the BTT map error flag for a map entry only gets set when an error LBA is read. If we write to a new location that may not have the map error flag set, but still might be in the region's badblock list, we can trigger an EIO on the write, which is undesirable and completely avoidable. Cc: Jeff Moyer Cc: Toshi Kani Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 117 ++++++++++++++++++++++++++++++++++++++++++++----- drivers/nvdimm/btt.h | 5 +++ drivers/nvdimm/claim.c | 8 ---- 3 files changed, 111 insertions(+), 19 deletions(-) commit 0930a750c35be3c2f5aacebc0d20ddeaf727c208 Author: Vishal Verma Date: Wed Aug 30 19:36:02 2017 -0600 libnvdimm: fix potential deadlock while clearing errors With the ACPI NFIT 'DSM' methods, acpi can be called from IO paths. Specifically, the DSM to clear media errors is called during writes, so that we can provide a writes-fix-errors model. However it is easy to imagine a scenario like: -> write through the nvdimm driver -> acpi allocation -> writeback, causes more IO through the nvdimm driver -> deadlock Fix this by using memalloc_noio_{save,restore}, which sets the GFP_NOIO flag for the current scope when issuing commands/IOs that are expected to clear errors. Cc: Cc: Cc: Dan Williams Cc: Robert Moore Cc: Rafael J. Wysocki Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 75892004508260df72ed3d319f10d2acd516220e Author: Vishal Verma Date: Wed Aug 30 19:36:01 2017 -0600 libnvdimm, btt: cache sector_size in arena_info In preparation for the error clearing rework, add sector_size in the arena_info struct. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 1 + drivers/nvdimm/btt.h | 2 ++ 2 files changed, 3 insertions(+) commit 1398199d849047c59acef0c04e550b47bb9b4be6 Author: Vishal Verma Date: Wed Aug 30 19:36:00 2017 -0600 libnvdimm, btt: ensure that flags were also unchanged during a map_read In btt_map_read, we read the map twice to make sure that the map entry didn't change after we added it to the read tracking table. In anticipation of expanding the use of the error bit, also make sure that the error and zero flags are constant across the two map reads. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0595d539a5deb4f495618ebbed96db59ae635e32 Author: Vishal Verma Date: Wed Aug 30 19:35:59 2017 -0600 libnvdimm, btt: refactor map entry operations with macros Add helpers for converting a raw map entry to just the block number, or either of the 'e' or 'z' flags in preparation for actually using the error flag to mark blocks with media errors. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 8 ++++---- drivers/nvdimm/btt.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) commit da1a42cd457fb06c2fd141c670b2ca3397234322 Author: Michal Simek Date: Thu Aug 31 14:55:45 2017 -0700 Input: xilinx_ps2 - fix multiline comment style Fix multiline comments style not to be reported by checkpatch. Signed-off-by: Michal Simek Signed-off-by: Dmitry Torokhov drivers/input/serio/xilinx_ps2.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 065e63f951432068ba89a844fcbff68ea16ee186 Author: Steven Rostedt (VMware) Date: Thu Aug 31 17:03:47 2017 -0400 tracing: Only have rmmod clear buffers that its events were active in Currently, when a module event is enabled, when that module is removed, it clears all ring buffers. This is to prevent another module from being loaded and having one of its trace event IDs from reusing a trace event ID of the removed module. This could cause undesirable effects as the trace event of the new module would be using its own processing algorithms to process raw data of another event. To prevent this, when a module is loaded, if any of its events have been used (signified by the WAS_ENABLED event call flag, which is never cleared), all ring buffers are cleared, just in case any one of them contains event data of the removed event. The problem is, there's no reason to clear all ring buffers if only one (or less than all of them) uses one of the events. Instead, only clear the ring buffers that recorded the events of a module that is being removed. To do this, instead of keeping the WAS_ENABLED flag with the trace event call, move it to the per instance (per ring buffer) event file descriptor. The event file descriptor maps each event to a separate ring buffer instance. Then when the module is removed, only the ring buffers that activated one of the module's events get cleared. The rest are not touched. Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 8 +++----- kernel/trace/trace.c | 3 +++ kernel/trace/trace.h | 1 + kernel/trace/trace_events.c | 15 +++++++-------- 4 files changed, 14 insertions(+), 13 deletions(-) commit e12f1a5952c9ac27888846f267ed19cb478618e6 Merge: 84ccac6 0fb5fe3 Author: David S. Miller Date: Thu Aug 31 14:42:20 2017 -0700 Merge branch 'mlxsw-Add-IPv6-host-dpipe-table' Jiri Pirko says: ==================== mlxsw: Add IPv6 host dpipe table This patchset adds IPv6 host dpipe table support. This will provide the ability to observe the hardware offloaded IPv6 neighbors. ==================== Signed-off-by: David S. Miller commit 0fb5fe3c886cb808c6a304f3df3336bdd04e18f5 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:19 2017 +0200 mlxsw: spectrum_dpipe: Add support for controlling IPv6 neighbor counters Add support for controlling IPv6 neighbor counters via dpipe. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 1ed5574c6d48c6094bf688aa2cc755ea6ca4007c Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:18 2017 +0200 mlxsw: spectrum_router: Add support for setting counters on IPv6 neighbors Add support for setting counters on IPv6 neighbors based on dpipe's host6 table counter status. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 410774bde1155c85076d6d7105f6af4e97815045 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:17 2017 +0200 mlxsw: spectrum_dpipe: Add support for IPv6 host table dump Add support for IPv6 host 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 | 75 ++++++++++++++++++++-- 1 file changed, 70 insertions(+), 5 deletions(-) commit 6049e5390cfdcc5df9114d2721a5f0e32baf9824 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:16 2017 +0200 mlxsw: spectrum_dpipe: Make host entry fill handler more generic Change the host entry filler helper to be applicable for both IPv4/6 addresses. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 0250768c6c6e131bded979fd939bc4642a506a07 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:15 2017 +0200 mlxsw: spectrum_router: Add IPv6 neighbor access helper Add helper for accessing destination IP in case of IPv6 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 | 9 +++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 2 ++ 2 files changed, 11 insertions(+) commit 506f7dd56de7631ce7ba80ca150164c905ecf262 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:14 2017 +0200 mlxsw: spectrum_dpipe: Add IPv6 host table initial support Add IPv6 host table initial support. The action behavior for both IPv4/6 tables is the same, thus the same action dump op is used. Neighbors with link local address are ignored. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 76 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 1 + 2 files changed, 71 insertions(+), 6 deletions(-) commit 1d1056d80b8e44efcc05298bfa85fa5ec0998bc9 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:13 2017 +0200 mlxsw: spectrum_router: Export IPv6 link local address check helper Neighbors with link local addresses are not offloaded to the host table, yet, the are maintained in the driver for adjacency table usage. When dumping the IPv6 host neighbors this link local neighbors should be ignored. This patch exports this helper for dpipe usage. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 1797f5b3cf0b3a73c42b89f7a8fd897417373730 Author: Arkadi Sharshevsky Date: Thu Aug 31 17:59:12 2017 +0200 devlink: Add IPv6 header for dpipe This will be used by the IPv6 host table which will be introduced in the following patches. The fields in the header are added per-use. This header is global and can be reused by many drivers. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 1 + include/uapi/linux/devlink.h | 5 +++++ net/core/devlink.c | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) commit b38e51cd167927225ae0c26bd404403b7b1cd2f3 Author: Randy Dunlap Date: Sun Jul 30 10:25:37 2017 -0700 binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp() Change the m32r flat_put_addr_at_rp() function to return int and always return 0. The microblaze function already returned 0 so just change its function return type from void to int. Seven (7) other arch-es already have this function as returning an int type result. Fixes: 468138d78510 (binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail) Signed-off-by: Randy Dunlap Cc: Al Viro Reported-by: kbuild test robot Signed-off-by: Al Viro arch/m32r/include/asm/flat.h | 3 ++- arch/microblaze/include/asm/flat.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 8363dae23463df5d27aa3f3430ad64f5c8fcee3e Author: Bart Van Assche Date: Wed Aug 23 15:29:11 2017 -0700 compat_hdio_ioctl: Fix a declaration This patch avoids that sparse reports the following warning messages: block/compat_ioctl.c:85:11: warning: incorrect type in assignment (different address spaces) block/compat_ioctl.c:85:11: expected unsigned long *[noderef] p block/compat_ioctl.c:85:11: got void [noderef] * block/compat_ioctl.c:91:21: warning: incorrect type in argument 1 (different address spaces) block/compat_ioctl.c:91:21: expected void const volatile [noderef] * block/compat_ioctl.c:91:21: got unsigned long *[noderef] p block/compat_ioctl.c:87:53: warning: dereference of noderef expression block/compat_ioctl.c:91:21: warning: dereference of noderef expression Fixes: commit d597580d3737 ("generic ...copy_..._user primitives") Signed-off-by: Bart Van Assche Cc: Jens Axboe Signed-off-by: Al Viro block/compat_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f58e76c1c551c7577b25a6fe493d82f5214331b7 Author: Bart Van Assche Date: Wed Aug 23 15:29:10 2017 -0700 : Fix copy_in_user() declaration copy_in_user() copies data from user-space address @from to user- space address @to. Hence declare both @from and @to as user-space pointers. Fixes: commit d597580d3737 ("generic ...copy_..._user primitives") Signed-off-by: Bart Van Assche Cc: Signed-off-by: Al Viro include/linux/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddef7ed2b5cbafae692d1d580bb5a07808926a9c Author: Christoph Hellwig Date: Thu Jul 6 18:58:37 2017 +0200 annotate RWF_... flags [AV: added missing annotations in syscalls.h/compat.h] Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/nfsd/vfs.c | 2 +- fs/read_write.c | 50 ++++++++++++++++++++++---------------------- include/linux/compat.h | 16 ++++++++++++-- include/linux/fs.h | 12 ++++++----- include/linux/syscalls.h | 4 ++-- include/uapi/linux/aio_abi.h | 21 ++++++++++--------- include/uapi/linux/fs.h | 28 ++++++++++++++++++------- 7 files changed, 80 insertions(+), 53 deletions(-) commit 4f59c718521a0f00b6589da6b8fcea2dc296026d Author: Al Viro Date: Sat Jul 8 11:40:39 2017 -0400 teach SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE to handle __bitwise arguments Signed-off-by: Al Viro arch/s390/include/asm/compat.h | 5 +++-- include/linux/compat.h | 2 +- include/linux/syscalls.h | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) commit 1db1f3cea1d8886c686832d4618b346ae16c03c8 Author: Vishal Verma Date: Wed Aug 30 19:35:58 2017 -0600 libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path The IO context conversion for rw_bytes missed a case in the BTT write path (btt_map_write) which should've been marked as atomic. In reality this should not cause a problem, because map writes are to small for nsio_rw_bytes to attempt error clearing, but it should be fixed for posterity. Add a might_sleep() in the non-atomic section of nsio_rw_bytes so that things like the nfit unit tests, which don't actually sleep, can catch bugs like this. Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 3 ++- drivers/nvdimm/claim.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 2670cd1674055ab48a9607472c5ff14781b9b2ea Author: Paolo Valente Date: Thu Aug 31 20:00:31 2017 +0200 doc, block, bfq: better describe how to properly configure bfq Many users have reported the lack of an HOWTO for properly configuring bfq as a function of the goal one wants to achieve (max responsiveness, max throughput, ...). In fact, all needed details are already provided in the documentation file bfq-iosched.txt. Yet the document lacks guidance on which parameter descriptions to look at. This commit adds some simple direction. Signed-off-by: Paolo Valente Reviewed-by: Jeremy Hickman Reviewed-by: Laurentiu Nicola Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 78 +++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 24 deletions(-) commit 233f0bf415e28adca96f61289e424ce4cfa9a9c0 Author: Paolo Valente Date: Thu Aug 31 20:00:30 2017 +0200 doc, block, bfq: fix some typos and remove stale stuff In addition to containing some typos and stale sentences, the file bfq-iosched.txt still mentioned a set of sysfs parameters that have been removed from this version of bfq. This commit fixes all these issues. Signed-off-by: Paolo Valente Reviewed-by: Jeremy Hickman Reviewed-by: Laurentiu Nicola Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 66 ++++++------------------------------- 1 file changed, 10 insertions(+), 56 deletions(-) commit a15797f4bef201544263ef5c264c3f48d78cc5d4 Author: Dan Williams Date: Thu Aug 31 12:53:36 2017 -0700 libnvdimm, nfit: export an 'ecc_unit_size' sysfs attribute When the nfit driver initializes it runs an ARS (Address Range Scrub) operation across every pmem range. Part of that process involves determining the ARS capabilities of a given address range. One of the capabilities that is reported is the 'Clear Uncorrectable Error Range Length Unit Size' (see: ACPI 6.2 section 9.20.7.4 Function Index 1 - Query ARS Capabilities). This property is of interest to userspace software as it indicates the boundary at which the NVDIMM may need to perform read-modify-write cycles to maintain ECC blocks. Cc: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 43cade803ebeb002403d4b704e041ce800e5b0e1 Author: Omar Sandoval Date: Thu Aug 24 00:03:44 2017 -0700 loop: fold loop_switch() into callers The comments here are really outdated, and blk-mq made flushing much simpler, so just fold the two cases into the callers. Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 76 ++++++++-------------------------------------------- 1 file changed, 11 insertions(+), 65 deletions(-) commit 89e4fdecb51cf5535867026274bc97de9480ade5 Author: Omar Sandoval Date: Thu Aug 24 00:03:43 2017 -0700 loop: add ioctl for changing logical block size This is a different approach from the first attempt in f2c6df7dbf9a ("loop: support 4k physical blocksize"). Rather than extending LOOP_{GET,SET}_STATUS, add a separate ioctl just for setting the block size. Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 24 ++++++++++++++++++++++++ include/uapi/linux/loop.h | 1 + 2 files changed, 25 insertions(+) commit 6c6b6f28b3335fd85ec833ee0005d9c9dca6c003 Author: Omar Sandoval Date: Thu Aug 24 00:03:42 2017 -0700 loop: set physical block size to PAGE_SIZE The physical block size is "the lowest possible sector size that the hardware can operate on without reverting to read-modify-write operations" (from the comment on blk_queue_physical_block_size()). Since loop does buffered I/O on the backing file by default, the RMW unit is a page. This isn't the case for direct I/O mode, but let's keep it simple. Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a0740c4109d646d8697d359962edea47301c652 Author: Omar Sandoval Date: Thu Aug 24 00:03:41 2017 -0700 loop: get rid of lo_blocksize This is only used for setting the soft block size on the struct block_device once and then never used again. Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/loop.c | 10 ++-------- drivers/block/loop.h | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) commit 60361e12d01676e23a8de89a5ef4a349ae97f616 Author: Zev Weiss Date: Wed Aug 30 05:36:38 2017 -0500 ftrace: Fix debug preempt config name in stack_tracer_{en,dis}able stack_tracer_disable()/stack_tracer_enable() had been using the wrong name for the config symbol to enable their preempt-debugging checks -- fix with a word swap. Link: http://lkml.kernel.org/r/20170831154036.4xldyakmmhuts5x7@hatter.bewilderbeest.net Cc: stable@vger.kernel.org Fixes: 8aaf1ee70e ("tracing: Rename trace_active to disable_stack_tracer and inline its modification") Signed-off-by: Zev Weiss Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51218298a25e6942957c5595f2abf130d47d5df9 Author: Alexandre Belloni Date: Mon Aug 21 00:01:46 2017 +0200 alarmtimer: Ensure RTC module is not unloaded When registering the rtc device to be used to handle alarm timers, get_device is used to ensure the device doesn't go away but the module can still be unloaded. Call try_module_get to ensure the rtc driver will not go away. Reported-and-tested-by: Michal Simek Signed-off-by: Alexandre Belloni Signed-off-by: Thomas Gleixner Acked-by: John Stultz Cc: Stephen Boyd Link: http://lkml.kernel.org/r/20170820220146.30969-1-alexandre.belloni@free-electrons.com kernel/time/alarmtimer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 86c0f046a8b0c23fca65f77333c233a06c25ef9a Author: Jani Nikula Date: Thu Aug 31 22:21:29 2017 +0300 Documentation/sphinx: fix kernel-doc decode for non-utf-8 locale On python3, Popen() universal_newlines=True converts the subprocess stdout to unicode text using a codec based on user preferences. Given LANG indicating ascii and utf-8 stdout from the subprocess, you'd get: WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno ../drivers/media/dvb-core/demux.h' processing failed with: 'ascii' codec can't decode byte 0xe2 in position 6368: ordinal not in range(128) Fix this by dropping universal_newlines=True and replacing the implicit LANG specific decode with an explicit utf-8 decode. This also gets rid of the annoying conditional code for python 2 vs. 3. Fixes: ba3501859354 ("Documentation/sphinx: fix kernel-doc extension on python3") Reference: http://mid.mail-archive.com/54c23e8e-89c0-5cea-0dcc-e938952c5642@infradead.org Reported-and-tested-by: Randy Dunlap Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Signed-off-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/sphinx/kerneldoc.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5878d5d6fdef6447d73b0acc121ba445bef37f53 Author: Juergen Gross Date: Thu Aug 31 19:42:49 2017 +0200 x86/xen: Get rid of paravirt op adjust_exception_frame When running as Xen pv-guest the exception frame on the stack contains %r11 and %rcx additional to the other data pushed by the processor. Instead of having a paravirt op being called for each exception type prepend the Xen specific code to each exception entry. When running as Xen pv-guest just use the exception entry with prepended instructions, otherwise use the entry without the Xen specific code. [ tglx: Merged through tip to avoid ugly merge conflict ] Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com Cc: luto@amacapital.net Link: http://lkml.kernel.org/r/20170831174249.26853-1-jg@pfupf.net arch/x86/entry/entry_64.S | 23 ++------ arch/x86/entry/entry_64_compat.S | 1 - arch/x86/include/asm/paravirt.h | 5 -- arch/x86/include/asm/paravirt_types.h | 3 -- arch/x86/include/asm/proto.h | 3 ++ arch/x86/include/asm/traps.h | 28 ++++++++-- arch/x86/kernel/asm-offsets_64.c | 1 - arch/x86/kernel/paravirt.c | 3 -- arch/x86/xen/enlighten_pv.c | 98 +++++++++++++++++++++++------------ arch/x86/xen/irq.c | 3 -- arch/x86/xen/xen-asm_64.S | 41 +++++++++++++-- arch/x86/xen/xen-ops.h | 1 - 12 files changed, 133 insertions(+), 77 deletions(-) commit ef1d4deab953ecb1dfcf9f167043bda8b3f14a11 Author: Thomas Gleixner Date: Thu Aug 31 20:08:16 2017 +0200 x86/eisa: Add missing include The seperation of the EISA init missed to include linux/io.h which breaks the build with some special configurations. Reported-by: Ingo Molnar Fixes: f7eaf6e00fd5 ("x86/boot: Move EISA setup to a separate file") Signed-off-by: Thomas Gleixner arch/x86/kernel/eisa.c | 1 + 1 file changed, 1 insertion(+) commit 8fc614c0ae5cb5df11d6aa9559e63baacf20a840 Author: Bjorn Helgaas Date: Thu Aug 31 14:12:39 2017 -0500 PCI/AER: Reformat AER register definitions Reformat so comments fit on same line as definition. No functional change intended. Signed-off-by: Bjorn Helgaas include/uapi/linux/pci_regs.h | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 84ccac6e7854ebbfb56d2fc6d5bef9be49bb304c Author: Eric Dumazet Date: Thu Aug 31 04:53:42 2017 -0700 x86: bpf_jit: small optimization in emit_bpf_tail_call() Saves 4 bytes replacing following instructions : lea rax, [rsi + rdx * 8 + offsetof(...)] mov rax, qword ptr [rax] cmp rax, 0 by : mov rax, [rsi + rdx * 8 + offsetof(...)] test rax, rax Signed-off-by: Eric Dumazet Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/x86/net/bpf_jit_comp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 117b2dc58c07924da7f545f93a1f5862f46e14f7 Author: Arvind Yadav Date: Thu Aug 31 11:39:13 2017 -0700 Input: pxa27x_keypad - handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov drivers/input/keyboard/pxa27x_keypad.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8a7f102c4b15940e43b712d35da357a2c05ffb84 Author: Arvind Yadav Date: Thu Aug 31 11:35:29 2017 -0700 Input: tegra-kbc - handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tegra-kbc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3edcf18ec2a8665fec060a05535fca6be16a61de Author: Tariq Toukan Date: Thu Aug 31 14:16:39 2017 +0300 samples/bpf: Fix compilation issue in redirect dummy program Fix compilation error below: $ make samples/bpf/ LLVM ERROR: 'xdp_redirect_dummy' label emitted multiple times to assembly file make[1]: *** [samples/bpf/xdp_redirect_kern.o] Error 1 make: *** [samples/bpf/] Error 2 Fixes: 306da4e685b4 ("samples/bpf: xdp_redirect load XDP dummy prog on TX device") Signed-off-by: Tariq Toukan Acked-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/xdp_redirect_kern.c | 2 +- samples/bpf/xdp_redirect_map_kern.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f16ded5948a5e6a399161bd71e866b198952ea5f Author: Rami Rosen Date: Thu Aug 31 13:41:40 2017 +0300 net: fix two typos in net_device_ops documentation. This patch fixes two trivial typos in net_device_ops documentation, related to ndo_xdp_flush callback. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 323fbd0edf3ffe8d9d71a651c26b97a14a3c9d0e Author: Andrii Date: Thu Aug 31 08:28:01 2017 +0300 net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv() Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv() in net/dccp/ipv6.c, similar to the handling in net/ipv6/tcp_ipv6.c Signed-off-by: Andrii Vladyka Signed-off-by: David S. Miller net/dccp/ipv6.c | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) commit e3cfddd577e763496c25ddb855cfff48b1174b63 Author: Roopa Prabhu Date: Wed Aug 30 22:18:13 2017 -0700 bridge: add tracepoint in br_fdb_update This extends bridge fdb table tracepoints to also cover learned fdb entries in the br_fdb_update path. Note that unlike other tracepoints I have moved this to when the fdb is modified because this is in the datapath and can generate a lot of noise in the trace output. br_fdb_update is also called from added_by_user context in the NTF_USE case which is already traced ..hence the !added_by_user check. Signed-off-by: Roopa Prabhu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/trace/events/bridge.h | 31 +++++++++++++++++++++++++++++++ net/bridge/br_fdb.c | 5 ++++- net/core/net-traces.c | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) commit 07d79fc7d94e3f884b8b1c95aa615b202bb5e4c1 Author: Cong Wang Date: Wed Aug 30 14:30:36 2017 -0700 net_sched: add reverse binding for tc class TC filters when used as classifiers are bound to TC classes. However, there is a hidden difference when adding them in different orders: 1. If we add tc classes before its filters, everything is fine. Logically, the classes exist before we specify their ID's in filters, it is easy to bind them together, just as in the current code base. 2. If we add tc filters before the tc classes they bind, we have to do dynamic lookup in fast path. What's worse, this happens all the time not just once, because on fast path tcf_result is passed on stack, there is no way to propagate back to the one in tc filters. This hidden difference hurts performance silently if we have many tc classes in hierarchy. This patch intends to close this gap by doing the reverse binding when we create a new class, in this case we can actually search all the filters in its parent, match and fixup by classid. And because tcf_result is specific to each type of tc filter, we have to introduce a new ops for each filter to tell how to bind the class. Note, we still can NOT totally get rid of those class lookup in ->enqueue() because cgroup and flow filters have no way to determine the classid at setup time, they still have to go through dynamic lookup. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/sch_generic.h | 1 + net/sched/cls_basic.c | 9 +++++++ net/sched/cls_bpf.c | 9 +++++++ net/sched/cls_flower.c | 9 +++++++ net/sched/cls_fw.c | 9 +++++++ net/sched/cls_matchall.c | 9 +++++++ net/sched/cls_route.c | 9 +++++++ net/sched/cls_rsvp.h | 9 +++++++ net/sched/cls_tcindex.c | 9 +++++++ net/sched/cls_u32.c | 9 +++++++ net/sched/sch_api.c | 68 +++++++++++++++++++++++++++++++++++++++++++++-- 11 files changed, 148 insertions(+), 2 deletions(-) commit eb464d4a8d092a793b97b724cd3cc6eeb229232a Merge: a9a65a6 393b706 Author: Kalle Valo Date: Thu Aug 31 21:34:22 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.14. Major changes: wil6210 * support FW RSSI reporting (by mistake this was accidentally mentioned already in the previous pull request, but now it's really included) * make debugfs optional, adds new Kconfig option CONFIG_WIL6210_DEBUGFS commit 8ce906c13c32cfd3de71063ca4b8c3b774e4ca08 Author: Baolin Wang Date: Wed Aug 30 11:05:47 2017 +0800 i2c: sprd: Fix undefined reference errors Since the i2c driver of Spreadtrum can not be build as one module, thus it should depend on CONFIG_I2C is build in. Signed-off-by: Baolin Wang Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e001525c4bcca9d3476f3ae30ff03e9ff67703d0 Author: Gaku Inami Date: Thu Apr 20 02:46:31 2017 +0900 clk: cs2000: Add cs2000_set_saved_rate This patch adds the common function to reset the clk rate in order to be able to use it in other cases. Signed-off-by: Gaku Inami Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Yoshihiro Kaneko Acked-by: Kuninori Morimoto Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit fa0abb18d981099071ad382375d1d9e625d81f36 Author: Lucas Stach Date: Fri Aug 18 18:30:58 2017 +0200 clk: imx51: propagate rate across ipu_di*_sel This propagates rate requests from the display interface to the divider or PLL output, allowing to hit the required display rate in many more cases. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Tested-By: Wladimir J. van der Laan Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx51-imx53.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 393b706cf20c2b612ca88fb2e48b43e3e376796f Author: Ryan Hsu Date: Thu Aug 31 15:36:16 2017 +0300 ath10k: configure and enable the wakeup capability ACPI will rely on device driver to tell it if the device could support wakeup function when system in D3 state. This has caused some platform can't support remote wakeup correctly, because the ACPI wakeup GPE is not enabled, hence registers the .set_wakeup callback to handle it if device supports wakeup. Tested with QCA6174 hw3.0, firmware ('WLAN.RM.4.4.1-00008-QCARMSWP-1') Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 1 + drivers/net/wireless/ath/ath10k/wow.c | 14 ++++++++++++++ drivers/net/wireless/ath/ath10k/wow.h | 1 + 3 files changed, 16 insertions(+) commit 32faa3f0ee509176aeac0009e3ee93f9b15f07a5 Author: Ryan Hsu Date: Thu Aug 31 15:36:14 2017 +0300 ath10k: add the PCI PM core suspend/resume ops The actual PCI suspend/resume in ath10k has been handled in wow.c, but in the case of the device doesn't support remote wakeup, the .hif_suspend() and .hif_resume() will never be handled. ath10k_wow_op_suspend() { if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, ar->running_fw->fw_file.fw_features))) { ret = 1; goto exit; } .... ret = ath10k_hif_suspend(ar); } So register the PCI PM core to support the suspend/resume if the device doesn't support remote wakeup. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 9fbd7fd28d1a1053325967670915c12b4b246a61 Merge: b33394b ae3efab Author: Thomas Gleixner Date: Thu Aug 31 20:12:51 2017 +0200 Merge tag 'irqchip-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 4.14 from Marc Zyngier: - irqchip-specific part of the monster GICv4 series - new UniPhier AIDET irqchip driver - new variants of some Freescale MSI widget - blanket removal of of_node->full_name in printk - random collection of fixes commit 5e405595e5bf4c09fab9ca1e7dbe5b62872757b5 Author: Dan Williams Date: Thu Aug 24 16:42:48 2017 -0700 ext4: perform dax_device lookup at mount The ->iomap_begin() operation is a hot path, so cache the fs_dax_get_by_host() result at mount time to avoid the incurring the hash lookup overhead on a per-i/o basis. Cc: "Theodore Ts'o" Cc: Andreas Dilger Reviewed-by: Jan Kara Reported-by: Christoph Hellwig Signed-off-by: Dan Williams fs/ext4/ext4.h | 1 + fs/ext4/inode.c | 11 +++-------- fs/ext4/super.c | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) commit 39cdc62b1b4efa39831d4de22f990043b0304fff Author: Himanshu Jha Date: Thu Aug 31 20:36:42 2017 +0530 ALSA: ctxfi: 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: Takashi Iwai sound/pci/ctxfi/ctresource.c | 6 ++---- sound/pci/ctxfi/ctsrc.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit 056db9d7c47551290129f3a251d489a1738c0ce7 Merge: 4e90345 c84f568 Author: Stephen Boyd Date: Thu Aug 31 10:57:34 2017 -0700 Merge tag 'sunxi-clk-for-4.14-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next Pull more Allwinner clock changes from Maxime Ripard: * Conversion of the last two SoCs (A10, A20) to the sunxi-ng framework * tag 'sunxi-clk-for-4.14-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: Add sun4i/sun7i CCU driver dt-bindings: List devicetree binding for the CCU of Allwinner A10 dt-bindings: List devicetree binding for the CCU of Allwinner A20 commit 3840ed9548f778717aaab5eab744da798c3ea055 Author: Miodrag Dinic Date: Tue Aug 29 15:53:20 2017 +0200 tty: goldfish: Implement support for kernel 'earlycon' parameter Add early console functionality to the Goldfish tty driver. When 'earlycon' kernel command line parameter is used with no options, the early console is determined by the 'stdout-path' property in device tree's 'chosen' node. This is illustrated in the following device tree source example: Device tree example: chosen { stdout-path = "/goldfish_tty@1f004000"; }; goldfish_tty@1f004000 { interrupts = <0xc>; reg = <0x1f004000 0x0 0x1000>; compatible = "google,goldfish-tty"; }; Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Greg Kroah-Hartman drivers/tty/Kconfig | 3 +++ drivers/tty/goldfish.c | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 7157d2be23da9f8860c69e2b79184a4e02701dad Author: Miodrag Dinic Date: Tue Aug 29 15:53:19 2017 +0200 tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms Implement tty r/w operations using streaming DMA. Goldfish tty for Ranchu platforms has been modified to use streaming DMA mappings for read/write operations. This change eliminates the need for snooping through the TLB in QEMU using cpu_get_phys_page_debug() which does not guarantee that it will return the valid va -> pa mapping. The streaming DMA mapping is implemented using dma_map_single() per transfer, while dma_unmap_single() is used for unmapping right after the DMA transfer. Using DMA API is the proper way for handling r/w transfers and makes this driver more portable, thus effectively eliminating the need for virt_to_page() and page_to_phys() conversions. This change does not affect the old style Goldfish tty behaviour which is still used by the Goldfish emulator. Version register has been added and probed to see which platform is running this driver. Reading from the new register GOLDFISH_TTY_REG_VERSION using the Goldfish emulator will return 0 and driver will work with virtual addresses. Whereas if run on Ranchu it returns 1, and thus DMA is used. (Goldfish and Ranchu are code names for the first and the second generation of virtual boards used by Android emulator.) Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Greg Kroah-Hartman drivers/tty/goldfish.c | 166 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 139 insertions(+), 27 deletions(-) commit 2296eee704e70dac7fef8ac13f2716e4896dd13e Author: Aleksandar Markovic Date: Tue Aug 29 15:53:18 2017 +0200 tty: goldfish: Refactor constants to better reflect their nature Classify constants GOLDFISH_TTY_xxx into two groups: command ids and register offsets. Apply different naming for register offsets (add 'REG_' after 'GOLDFISH_TTY_' in constant names). Change implementation to use preprocessor's '#define' statements instead of 'enum' declaration (as this is more common way of implementation in such cases). This makes the driver code easier to follow and hopefully prevents future bugs. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Greg Kroah-Hartman drivers/tty/goldfish.c | 52 ++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 0f9b011d3321ca1079c7a46c18cb1956fbdb7bcb Author: Christophe JAILLET Date: Tue Aug 29 21:23:49 2017 +0200 driver core: bus: Fix a potential double free The .release function of driver_ktype is 'driver_release()'. This function frees the container_of this kobject. So, this memory must not be freed explicitly in the error handling path of 'bus_add_driver()'. Otherwise a double free will occur. Signed-off-by: Christophe JAILLET Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/base/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a97db8818c7e8bb4f2d786ca73b2b761eacf482c Author: Jaghathiswari Rankappagounder Natarajan Date: Wed Aug 30 16:34:35 2017 -0700 drivers: w1: add hwmon temp support for w1_therm This change adds hwmon temp support for w1_therm. Signed-off-by: Jaghathiswari Rankappagounder Natarajan Acked-by: Evgeniy Polyakov Acked-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit b78165f028713121609dae40f10246da6293a281 Author: Jaghathiswari Rankappagounder Natarajan Date: Wed Aug 30 16:34:34 2017 -0700 drivers: w1: refactor w1_slave_show to make the temp reading functionality separate Inside the w1_slave_show function refactor the code to read the temp into a separate function. Signed-off-by: Jaghathiswari Rankappagounder Natarajan Acked-by: Guenter Roeck Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 82 +++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 31 deletions(-) commit 2eb7954809bf26de27bc3a2fea4eef606bbf4482 Author: Jaghathiswari Rankappagounder Natarajan Date: Wed Aug 30 16:34:33 2017 -0700 drivers: w1: add hwmon support structures This patch has changes to w1.h/w1.c generic files to add (optional) hwmon support structures. Signed-off-by: Jaghathiswari Rankappagounder Natarajan Acked-by: Evgeniy Polyakov Acked-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 18 +++++++++++++++++- include/linux/w1.h | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit db15d73e5f0ea8e9b2c2be31dea45205257eb5fd Author: Huy Duong Date: Wed Aug 30 21:53:37 2017 +0700 eeprom: idt_89hpesx: Support both ACPI and OF probing Allow the idt_89hpesx driver to get information from child nodes from both OF and ACPI by using more generic fwnode_property_read*() functions. Below is an example of instantiating idt_89hpesx driver via ACPI Table: Device(IDT0) { Name(_HID, "PRP0001") Name(_CID, "PRP0001") Name(_CCA, ONE) Name(_STR, Unicode("IDT SW I2C Slave")) Name(_CRS, ResourceTemplate () { I2cSerialBus (0x74, ControllerInitiated, 1000, AddressingMode7Bit, "\\_SB.I2CS", 0x00, ResourceConsumer, , ) }) Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"compatible", "idt,89hpes32nt8ag2"}, }, }) Device (EPR0) { Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"compatible", "onsemi,24c64"}, Package () {"reg", 0x50}, } }) } } Signed-off-by: Huy Duong Acked-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 126 +++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 71 deletions(-) commit 5ec6bff199f27c85a37443a854f7c9f1a8c94a9d Author: Christophe JAILLET Date: Tue Aug 29 14:47:25 2017 +0200 mcb: Fix an error handling path in 'chameleon_parse_cells()' If 'chameleon_get_bar()' fails, we will return 0, which mean success. We should return the corresponding error code instead. Remove the useless initialisation of 'ret' which was hiding the issue. (if 'ret' is not set, gcc generates a warning ("warning: ‘ret’ may be used uninitialized in this function")) Signed-off-by: Christophe JAILLET Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit acf5e051ac44d5dc60b21bc4734ef1b844d55551 Author: Michael Moese Date: Tue Aug 29 14:47:24 2017 +0200 MCB: add support for SC31 to mcb-lpc This patch adds the resources and DMI ID's for the MEN SC31, which uses a different address region to map the LPC bus than the one used for the existing SC24. Signed-off-by: Michael Moese [jth add stable tag] Cc: (v4.9+) Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-lpc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ae28d7402a7e7cf3dd0da1f2eb6a52b337873e08 Author: Andy Shevchenko Date: Wed Aug 30 17:12:13 2017 +0300 serial: 8250_port: Remove useless NULL checks After switching to HR timers for RS485 the NULL checks for the object inside timer functions become useless. Remove them to avoid confusion to static analyzers. Fixes 6e0a5de2136b ("serial: 8250: Use hrtimers for rs485 delays") Cc: Colin Ian King Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 31cb9a8575ca04f47ea113434d4782b695638b62 Author: Eugeniy Paltsev Date: Mon Aug 21 19:22:13 2017 +0300 earlycon: initialise baud field of earlycon device structure For now baud field of earlycon structure device is't initialised at all in of_setup_earlycon (in oppositе to register_earlycon). So when I use stdout-path to point earlycon device (like stdout-path = &serial or stdout-path = "serial:115200n8") baud field of earlycon device structure remains uninitialised and earlycon initialization is not performed correctly as of_setup_earlycon is used. When pass all arguments via bootargs (like bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8") initialization is performed correctly as register_earlycon is used. So initialise baud field of earlycon device structure by value of "current-speed" property from device tree or from options (if they exist) when we use of_setup_earlycon Signed-off-by: Eugeniy Paltsev Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/earlycon.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8cf037a8b22f71c6659bd0246bfaba9e79766f64 Author: Dan Williams Date: Wed Aug 30 09:43:34 2017 -0700 ext2: perform dax_device lookup at mount The ->iomap_begin() operation is a hot path, so cache the fs_dax_get_by_host() result at mount time to avoid the incurring the hash lookup overhead on a per-i/o basis. Cc: "Theodore Ts'o" Cc: Andreas Dilger Reviewed-by: Jan Kara Reported-by: Christoph Hellwig Signed-off-by: Dan Williams fs/ext2/ext2.h | 1 + fs/ext2/inode.c | 11 +++-------- fs/ext2/super.c | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) commit 486aff5e04823bb1e60c4045226eb244024b8420 Author: Dan Williams Date: Thu Aug 24 15:12:50 2017 -0700 xfs: perform dax_device lookup at mount The ->iomap_begin() operation is a hot path, so cache the fs_dax_get_by_host() result at mount time to avoid the incurring the hash lookup overhead on a per-i/o basis. Reported-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dan Williams fs/xfs/xfs_aops.c | 13 +++++++++++++ fs/xfs/xfs_aops.h | 1 + fs/xfs/xfs_buf.c | 4 +++- fs/xfs/xfs_buf.h | 3 ++- fs/xfs/xfs_iomap.c | 10 +--------- fs/xfs/xfs_super.c | 25 +++++++++++++++++++++---- 6 files changed, 41 insertions(+), 15 deletions(-) commit a470ad21f980c1b642bf17eeda8e584b5566b701 Author: Larry Finger Date: Wed Aug 30 14:43:13 2017 -0500 staging: r8822be: Simplify deinit_priv() Now that the extraneous debugging code is removed, routine deinit_priv() clearly contains code that serves no useful purpose. A null test before a call to kfree() and a spurious cast are also removed. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/rtl_halmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c353af8343c37386161167ae7fbe6747f6be580c Author: Larry Finger Date: Wed Aug 30 14:43:12 2017 -0500 staging: r8822be: Remove some dead code The code found inside an #ifdef CONFIG_RTL_DEBUG ... #endif section is left over from debugging of the original driver, and should be deleted. Reported by: Andreas Ziegler Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/rtl_halmac.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 5598e55a8dc647c4c4ea474351f85b93d9e9dd68 Author: Hans de Goede Date: Thu Aug 31 17:03:17 2017 +0200 staging: vboxvideo: Use CONFIG_DRM_KMS_FB_HELPER to check for fbdefio availability Checking for CONFIG_FB_DEFERRED_IO is not the right thing to do since the fbdev code may be built as a module while vboxvideo is builtin. This can only happen when DRM_KMS_FB_HELPER is not set: a) DRM_VBOXVIDEO selects DRM_KMS_HELPER b) DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER c) DRM_KMS_FB_HELPER selects FB_DEFERRED_IO So when DRM_KMS_FB_HELPER is set and vboxvideo is builtin then FB_DEFERRED_IO must be builtin too. This commit moves the #ifdefs around fbdefio code over to CONFIG_DRM_KMS_FB_HELPER, as other drm drivers already do, fixing: drivers/staging/vboxvideo/vbox_fb.o: In function `vbox_fbdev_fini': vbox_fb.c:(.text+0x36): undefined reference to `fb_deferred_io_cleanup' Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/vboxvideo/vbox_fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ab86dbed6f2a836e17e209b399b5f43eded69e7f Author: Janani Sankara Babu Date: Thu Aug 31 17:16:27 2017 +0530 staging:rtl8188eu Fix comparison to NULL This patch replaces the comparison of variable say x to NULL with '!x' signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da7ca1e05f34bda8ab8623abaa9f86d1c2e02e0b Author: Colin Ian King Date: Thu Aug 31 12:40:15 2017 +0100 staging: rts5208: rename mmc_ddr_tunning_rx_cmd to mmc_ddr_tuning_rx_cmd Trival fix to spelling mistake in function name Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52056bd7acb9497ab7eb4b567a0c822b55156d72 Author: Derek Robson Date: Thu Aug 31 18:37:48 2017 +1200 Staging: Pi433: style fix - tabs and spaces Fixed checkpatch errors, spaces before tabs. Found using checkpatch. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5dcf92266cdc994fc380521258b2e81025e31df9 Author: Colin Ian King Date: Wed Aug 30 13:05:38 2017 +0100 staging: pi433: fix spelling mistake: "preample" -> "preamble" Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee04922ee00fad1b8da1e3677a66a3ab21b4af95 Author: Janani Sankara Babu Date: Wed Aug 30 17:23:25 2017 +0530 staging:rtl8188eu:core Fix Code Indent This patch solves the code indentation issue inside the if block Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4046c06fb11cbb5d90324da2df7e2acafcb9826c Author: Hans de Goede Date: Wed Aug 30 11:48:10 2017 +0200 staging: typec: fusb302: Export current-limit through a power_supply class dev The fusb302 Type-C port-controller cannot control the current-limit directly, so we need to exported the limit so that another driver (e.g. the charger driver) can pick the limit up and configure the system accordingly. The power-supply subsys already provides infrastructure for this, power-supply devices have the notion of being supplied by another power-supply and have properties through which we can export the current-limit. Register a power_supply and export the current-limit through the power_supply's current-max property. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/Kconfig | 2 +- drivers/staging/typec/fusb302/fusb302.c | 63 +++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 3 deletions(-) commit 382099d6bcffa13ea729ad5c8f0ae67fafbe563f Author: Hans de Goede Date: Wed Aug 30 11:48:09 2017 +0200 staging: typec: fusb302: Add support for USB2 charger detection through extcon The fusb302 port-controller relies on an external device doing USB2 charger-type detection. The Intel Whiskey Cove PMIC with which the fusb302 is combined on some X86/ACPI platforms already has a charger-type detection driver which uses extcon to communicate the detected charger-type. Rather then inventing a new API for USB2 charger-type detection specifically for use with the tcpm code, this commit simply re-uses the existing extcon API and uses that do USB2 charger detection. Note that the "fcs,extcon-name" property name is only for kernel internal use by X86/ACPI platform code and as such is NOT documented in the fusb302 devicetree bindings. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 4660e4aeb9d74895eb6478932bf5cabeb0db723e Author: Hans de Goede Date: Wed Aug 30 11:48:08 2017 +0200 staging: typec: fusb302: Use client->irq as irq if set The fusb302 is also used on x86 systems where the platform code sets the irq in client->irq and there is no gpio named fcs,int_n. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 097578ec200858cfa2dd905b08ab8d5576a656e6 Author: Hans de Goede Date: Wed Aug 30 11:48:07 2017 +0200 staging: typec: fusb302: Get max snk mv/ma/mw from device-properties This is board specific info so it should come from board config, such as devicetree. I've chosen to prefix these with "fcs," treating them as fusb302 driver specific for now. We may want to revisit this and replace these with properties which are part of a (to be written) generic type-c controller devicetree binding. Since this commit adds new dt-properties it also adds devicetree-bindings documentation (which so far was absent for the fusb302 driver). Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Acked-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/fcs,fusb302.txt | 29 ++++++++++++++++++++++ drivers/staging/typec/fusb302/TODO | 4 +++ drivers/staging/typec/fusb302/fusb302.c | 18 +++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) commit 9a8fc4dd36041e017f3ee87a380686c80822b233 Author: Hans de Goede Date: Wed Aug 30 11:48:06 2017 +0200 staging: typec: fusb302: Set max supply voltage to 5V Anything higher then 5V may damage hardware not capable of it, so the only sane default here is 5V. If a board is able to handle a higher voltage that should come from board specific data such as device-tree and not be hard coded into the fusb302 code. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea62cfc71b6f7f0ae9bb93b60335a6dedcaa69e6 Author: Hans de Goede Date: Wed Aug 30 11:48:05 2017 +0200 staging: typec: tcpm: Add get_current_limit tcpc_dev callback A Rp signalling the default current limit indicates that we're possibly connected to an USB2 power-source. In some cases the type-c port-controller may provide the capability to detect the current-limit in this case, through e.g. BC1.2 detection. This commit adds an optional get_current_limit tcpc_dev callback which allows the port-controller to provide current-limit detection for when the CC pin is pulled up with Rp. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 5 ++++- drivers/staging/typec/tcpm.h | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 26e59b35023a16b7564900acc47cc3fd6ba1334d Author: Janani Sankara Babu Date: Tue Aug 29 18:28:15 2017 +0530 staging:rtl8188eu Use __func__ instead of function name This patch makes use of predefined identifier __func__ inorder to clear the warning: Prefer using '"%s...", __func__' to using 'update_bmc_sta', this function's name, in a string Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e0594edd86fc7d77f65f316cde78b2d1278fa35 Author: Simo Koskinen Date: Tue Aug 29 14:08:16 2017 +0200 staging: lustre: coding style fixes found by checkpatch.pl The patch removes "WARNING: Prefer using '"%s...", __func__' to using 'xxxxxxxx', this function's name, in a string" warnings reported by checkpatch.pl script. Signed-off-by: Simo Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/lu_object.c | 9 +++++---- 7 files changed, 14 insertions(+), 13 deletions(-) commit db3edb13415175dc1a7bc89c4ddc944b15370801 Author: Edvard Holst Date: Wed Aug 30 11:33:22 2017 +0000 staging: goldfish: (Coding Style) Fixed parenthesis alignment. Fixed paranthesis alignment for compliance with checkpatch. Signed-off-by: Edvard Holst Signed-off-by: Greg Kroah-Hartman drivers/staging/goldfish/goldfish_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e25201d667b36783500904585a74c7381394fcd1 Author: Sameer Wadgaonkar Date: Wed Aug 30 13:36:35 2017 -0400 staging: unisys: change pr_err to dev_err in visor_check_channel Changing pr_err to dev_err in visor_check_channel. Added device as an argument to visor_check_channel to pass into dev_err. 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 | 7 +++--- drivers/staging/unisys/visorbus/visorbus_main.c | 33 ++++++++++++++----------- drivers/staging/unisys/visorbus/visorchipset.c | 1 + 3 files changed, 23 insertions(+), 18 deletions(-) commit 13fe0c8f72b9ff46f0052a074ce57ca5edd23472 Author: Sameer Wadgaonkar Date: Wed Aug 30 13:36:34 2017 -0400 staging: unisys: visorbus: remove EXPORT_SYMBOL_GPL for visor_check_channel Removing EXPORT_SYMBOL_GPU from visor_check_channel since it is used only in visorbus. 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 | 1 - 1 file changed, 1 deletion(-) commit 1604ebecdb752e1ae958fb3f462c34698fe15e5c Author: David Kershner Date: Wed Aug 30 13:36:33 2017 -0400 staging: unisys: visorbus: Fix up GUID definition Fix up the GUID definition to remove some checkpatch warnings as well as using the whole width of the screen. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 425eaf47e9461063a600b5d810c9405c41c3b8e2 Author: David Kershner Date: Wed Aug 30 13:36:32 2017 -0400 staging: unisys: visorbus: just check for GUID Every channel_type must have a valid GUID, checking for the name was just redundant. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d7f1589a1df39c0aa6234179c032e2ed9af3e0e6 Author: David Kershner Date: Wed Aug 30 13:36:31 2017 -0400 staging: unisys: Use size of channel defined in the channel. The size of the channel should be pulled from the channel header, not from the message. All channels must be at least the size of the channel_header. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 10 ++-- drivers/staging/unisys/visorbus/visorchannel.c | 56 +++++++--------------- drivers/staging/unisys/visorbus/visorchipset.c | 6 +-- 3 files changed, 22 insertions(+), 50 deletions(-) commit ebef2610b75652a30d0155d5b9108340a7bacc29 Author: David Binder Date: Wed Aug 30 13:36:30 2017 -0400 staging: unisys: visornic: Remove unnecessary return values Removes unnecessary return value in send_rcv_posts_if_needed(), since NAPI polling functions do not return errors. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 6577cbf1f65ab582f3011a537f86ba6fc833fec3 Author: David Kershner Date: Wed Aug 30 13:36:29 2017 -0400 staging: unisys: visorbus: use all 80 characters for multi-line messages The file visorchipset had a bunch of comments that were not using the full screen before they wrapped, update the comments to wrap at 80 characters instead. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 35 ++++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 45311439daf0d706e4e96aec13132b5e3009edb3 Author: David Kershner Date: Wed Aug 30 13:36:28 2017 -0400 staging: unisys: visorchipset: Shorten parser_init_byte_stream. Shorten the name of the function parser_init_byte_stream to just parser_init_stream. 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 39b486d6ec094d686bc1c73d16ce5cc7b2953d17 Author: David Kershner Date: Wed Aug 30 13:36:27 2017 -0400 staging: unisys: visorbus: Move parser functions location in file. The parser functions were defined at the top of the file even though they were not referenced until later in the file. This patch moves them closer to where they are defined so they can be easily referenced. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 116 ++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) commit d20a0171fbeff54460a0e9bdf6c01ee226b4412a Author: David Kershner Date: Wed Aug 30 13:36:26 2017 -0400 staging: unisys: visorbus: remove uneeded initializations Several variables were initialized when not needed. Remove the extraneous initializations. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4a064300002986132afa426fbe3f7376ce8f7cd Author: David Kershner Date: Wed Aug 30 13:36:25 2017 -0400 staging: unisys: visorbus: Remove useless else clause in visorutil_spar_detect. The function visorutil_spar_detect had an if clause that returns from the function, no need to do the rest of the code in an else clause. 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 26a42c251ed8a31529b9529a9d03b3d781cbd169 Author: David Kershner Date: Wed Aug 30 13:36:24 2017 -0400 staging: unisys: Change data to point to visor_controlvm_parameters_header. The data field was being defined as a character array and then casted into a visor_controlvm_parameters_header structure. This patch converts it to just point to the visor_controlvm_parameters_header structure. The data following the header is still behind the header_info. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit af53ce418b3dc4c9b66ad4b4381f08589424da06 Author: David Kershner Date: Wed Aug 30 13:36:23 2017 -0400 staging: unisys: visorbus: Split else if blocks into multiple if. Visorbus_configure had a block of "else if" clauses at the beginning of the function. Simplify this to just being "if" clauses since each code block ended with a goto. 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 4d77e606169efe942f6b2f41d124264df08a25e8 Author: David Kershner Date: Wed Aug 30 13:36:22 2017 -0400 staging: unisys: visorbus: Remove check for valid parm_addr. The variable parm_addr will never be null, so no need to check for it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6f24e9554b2663177fb451186a3cfedaca7af33 Author: David Kershner Date: Wed Aug 30 13:36:21 2017 -0400 staging: unisys: visorbus: Remove useless initialization. The variable ctx was allocated with kzalloc, so all the data inside is zero, no need to reset it to 0. 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, 3 deletions(-) commit 7fa098a1c61d2499e992b3855238fc743c81cf39 Author: David Kershner Date: Wed Aug 30 13:36:20 2017 -0400 staging: unisys: visorbus: Remove useless comment. Currently setting it in the right location, so no longer not sure. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit f1f537c2e7f565a808623d3244ea73a65839240e Author: David Kershner Date: Wed Aug 30 13:36:19 2017 -0400 staging: unisys: visorbus: Consolidate controlvm channel creation. The functions to create the controlvm channel were disjointed and ignoring information that was available. This patch consolidates it so it clearer what is happening. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 47 ++++++++++---------------- 1 file changed, 17 insertions(+), 30 deletions(-) commit eaec40a3d1482e6c69614866e40939c06cf7cd49 Author: David Kershner Date: Wed Aug 30 13:36:18 2017 -0400 staging: unisys: include: Add comment next to mutex. Checkpatch reports an error that no comment was next to the mutex lock. Add an appropriate message for the lock. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68f4f7665caef801d1ad361f613a9edd7c40bb16 Author: David Kershner Date: Wed Aug 30 13:36:17 2017 -0400 staging: unisys: Don't check for null before getting driver device. The macro to convert to the driver object was giving a checkpatch warning when it ateempted to check for a null driver. It would return NULL if it found it, but only one location was checking to see if it was NULL. Remove the check in the MACRO and do it prior to calling the macro if required. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 3 +-- drivers/staging/unisys/visorbus/visorbus_main.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) commit 9a8dc900ec8929c63345350d544c349c687e2055 Author: David Kershner Date: Wed Aug 30 13:36:16 2017 -0400 staging: unisys: visorbus: Use __func__ instead of name. The dev_err was using the hardcoded function name, as reported by checkpatch, it should be using __func__. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0616454cbdc06b98d83a732055822dd1fa135c7 Author: David Kershner Date: Wed Aug 30 13:36:15 2017 -0400 staging: unisys: visorbus: Convert macros to functions. Several macros in visorchannel.c were doing complex arithmetic, converted them to functions so that valid type checking could be done. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 74e1129b906c516df21abc40cbbd1ffe1dd9e5da Author: David Kershner Date: Wed Aug 30 13:36:14 2017 -0400 staging: unisys: visorbus: Fix parameter alignment. Fixed the following checkpatch warning: visorchannel.c:443: CHECK: Alignment should match open parenthesis Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800da5fb3f9770c27c5b24e5a7e265f5ea51e98e Author: David Kershner Date: Wed Aug 30 13:36:13 2017 -0400 staging: unisys: visorbus: Clean up vmcall address function. The function vmcall address needed to be cleaned up. The structure vmcall_controlvm_addr was not needed so it was removed and was replaced with vmcall_io_controlvm_addr_params since it needs to be allocated on the heap for DMA access. With the structure removed and the fields as local variables, it helped clean up the formatting of the function. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 27 +++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 496c890249dd65705eb20cfb909f03c99a7cea72 Author: David Binder Date: Wed Aug 30 13:36:12 2017 -0400 staging: unisys: visornic: Fix miscellaneous block comment format issues. Fixes miscellaneous formatting issues with several block comments throughout visornic_main.c. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 1ce0a9bca4963b79b80f3881e355fc9a7d92e31f Author: David Binder Date: Wed Aug 30 13:36:11 2017 -0400 staging: unisys: visornic: Fix up existing function comments. Refactors existing static function comments to increase code readability. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 417 +++++++++++------------- 1 file changed, 190 insertions(+), 227 deletions(-) commit 3459e83a141e2af284c5980917dfa8a1bb224319 Author: Sameer Wadgaonkar Date: Wed Aug 30 13:36:10 2017 -0400 staging: unisys: visorbus: visorbus_main.c: Fix return values for checks in visorbus_register_visor_driver. The error return values for the drv->probe, drv->remove, drv->pause and drv->resume checks should be -EINVAL instead of -ENODEV. Reported-by: Greg Kroah-Hartman 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 90544cb10caafa6c12315215486a62a8d487f6be Author: Sameer Wadgaonkar Date: Wed Aug 30 13:36:09 2017 -0400 staging: unisys: visorbus: visorchipset.c: Fix bug in parser_init_byte_stream. This patch fixes a bug in the function parser_init_byte_stream() by removing the call to parser_done from goto err_finish_ctx. The function parser_done() decrements chipset_dev->controlvm_payload_bytes_buffered which is not incremented before this gets called. Signed-off-by: Sameer Wadgaonkar Reported-by: Dan Carpenter Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7126395e607ca122aed1f2bcced3075756bb1a54 Author: David Kershner Date: Wed Aug 30 13:36:08 2017 -0400 staging: unisys: use the kernel min define The kernel already provides a min function, we should be using that instead of creating our own MINNUM. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 3 --- drivers/staging/unisys/visornic/visornic_main.c | 9 ++++----- 2 files changed, 4 insertions(+), 8 deletions(-) commit aef0278e108b2e0a0fbe75f545772c23abce8c40 Author: Jonathan Whitaker Date: Wed Aug 30 22:24:53 2017 -0600 staging: ks7010: Fix coding style and remove checkpatch.pl warnings. Removed printk statements for debugging. The same information can be acquired via ftrace, so these print statements are uneccessary. Signed-off-by: Jonathan Whitaker Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ---- 1 file changed, 4 deletions(-) commit 3a161913990e9052bf0ce32443871a95cd88f3fd Author: Bhumika Goyal Date: Wed Aug 30 18:22:23 2017 +0530 usbip: vhci-hcd: make vhci_hc_driver const Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb3c74de28b24f5a36d12d6c84f1fceb25d12c4f Author: Baolin Wang Date: Mon Aug 28 19:02:41 2017 +0800 usb: phy: Avoid unchecked dereference warning Move the USB phy NULL checking before issuing usb_phy_set_charger_current() to avoid unchecked dereference warning. Signed-off-by: Baolin Wang Signed-off-by: Greg Kroah-Hartman include/linux/usb/phy.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 06e74935c77e8605d7d825cd3762cad2c70578ed Author: Bhumika Goyal Date: Wed Aug 30 18:20:12 2017 +0530 usb: imx21-hcd: make imx21_hc_driver const Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/host/imx21-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b491f61ecb9668c9fd8d519cf25e8c46a30fb906 Author: Bhumika Goyal Date: Wed Aug 30 14:35:25 2017 +0530 usb: host: make ehci_fsl_overrides const and __initconst Make this structure const as it is not modified. And replace __initdata with __initconst to avoid section conflict error. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3d3ad68febacae8a98cb1e40af6c9337f7454a8 Author: Chunfeng Yun Date: Wed Aug 30 19:34:11 2017 +0800 dt-bindings: mt8173-mtu3: add generic compatible and rename file The mt8173-mtu3.txt actually holds the bindings for all mediatek SoCs with usb3 DRD IP, so add a generic compatible and change the name to mediatek,mtu3.txt. Signed-off-by: Chunfeng Yun Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/mediatek,mtu3.txt | 91 ++++++++++++++++++++++ .../devicetree/bindings/usb/mt8173-mtu3.txt | 87 --------------------- 2 files changed, 91 insertions(+), 87 deletions(-) commit 5fc56a8ea956f450e120d894d42c97880e0d9444 Author: Chunfeng Yun Date: Wed Aug 30 19:34:10 2017 +0800 dt-bindings: mt8173-xhci: add generic compatible and rename file The mt8173-xhci.txt actually holds the bindings for all mediatek SoCs with xHCI controller, so add a generic compatible and change the name to mediatek,mtk-xhci.txt to reflect that. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 111 +++++++++++++++++++++ .../devicetree/bindings/usb/mt8173-mtu3.txt | 2 +- .../devicetree/bindings/usb/mt8173-xhci.txt | 103 ------------------- 3 files changed, 112 insertions(+), 104 deletions(-) commit 5675b4d40b52291f9035c120b28f905a27f32828 Author: Chunfeng Yun Date: Wed Aug 30 19:34:09 2017 +0800 usb: xhci-mtk: add generic compatible string The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 1 + 1 file changed, 1 insertion(+) commit a38711a88b7e3fd0c0d292a35693e0f608263759 Author: Nobuo Iwata Date: Tue Aug 29 11:13:34 2017 +0900 usbip: auto retry for concurrent attach This patch adds recovery from false busy state on concurrent attach operation. The procedure of attach operation is as below. 1) Find an unused port in /sys/devices/platform/vhci_hcd/status. (userspace) 2) Request attach found port to driver through /sys/devices/platform/vhci_hcd/attach. (userspace) 3) Lock table, reserve requested port and unlock table. (vhci driver) Attaching more than one remote devices concurrently, same unused port number will be found in step-1. Then one request will succeed and others will fail even though there are some unused ports. With this patch, driver returns EBUSY when requested port has already been used. In this case, attach command retries from step-1: finding another unused port. If there's no unused port, the attach operation will fail in step-1. Otherwise it retries automatically using another unused port. vhci-hcd's interface (only errno) is changed as following. Current errno New errno Condition EINVAL same as left specified port number is in invalid range EAGAIN same as left platform_get_drvdata() failed EINVAL same as left specified socket fd is not valid EINVAL EBUSY specified port status is not free The errno EBUSY was not used in userspace src/usbip_attach.c:import_device(). It is needed to distinguish the condition to be able to retry from other unrecoverable errors. It is possible to avoid this failure by introducing userspace exclusive control. But it's exaggerated for this special condition. The locking itself has done in driver. As an alternate solution, userspace doesn't specify port number, driver searches unused port and it returns port number to the userspace. With this solution, the interface is much different than this patch. Signed-off-by: Nobuo Iwata Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_sysfs.c | 6 +++++- tools/usb/usbip/src/usbip_attach.c | 35 ++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 16 deletions(-) commit a27bfcab5c1c3a0df61b68e85fc5e4cade83559f Author: Jonathan Corbet Date: Thu Aug 31 09:47:22 2017 -0600 genalloc: Fix an incorrect kerneldoc comment The kerneldoc comment for the genpool_algo_t typedef was incomplete and incorrectly formatted, leading to a raft of warnings during the docs build. Fix it appropriately. Signed-off-by: Jonathan Corbet include/linux/genalloc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ae3efabfadea92a7300f57792ebeb24b5d18469f Author: Minghuan Lian Date: Wed Jul 5 14:59:03 2017 +0800 irqchip/ls-scfg-msi: Add MSI affinity support For LS1046a and LS1043a v1.1, the MSI controller has 4 MSIRs and 4 GIC SPI interrupts which can be associated with different Core. So we can support affinity to improve the performance. The MSI message data is a byte for Layerscape MSI. 7 6 5 4 3 2 1 0 | - | IBS | SRS | SRS bit0-1 is to select a MSIR which is associated with a CPU. IBS bit2-6 of ls1046, bit2-4 of ls1043a v1.1 is to select bit of the MSIR. With affinity, only bits of MSIR0(srs=0 cpu0) are available. All other bits of the MSIR1-3(cpu1-3) are reserved. The MSI hwirq always equals bit index of the MSIR0. When changing affinity, MSI message data will be appended corresponding SRS then MSI will be moved to the corresponding core. But in affinity mode, there is only 8 MSI interrupts for a controller of LS1043a v1.1. It cannot meet the requirement of the some PCIe devices such as 4 ports Ethernet card. In contrast, without affinity, all MSIRs can be used for core 0, the MSI interrupts can up to 32. So the parameter is added to control affinity mode. "lsmsi=no-affinity" will disable affinity and increase MSI interrupt number. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier drivers/irqchip/irq-ls-scfg-msi.c | 68 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) commit fd100dab63ef634e1e0e8b5d9d6d4ba7df9be93f Author: Minghuan Lian Date: Wed Jul 5 14:59:02 2017 +0800 irqchip/ls-scfg-msi: Add LS1043a v1.1 MSI support A MSI controller of LS1043a v1.0 only includes one MSIR and is assigned one GIC interrupt. In order to support affinity, LS1043a v1.1 MSI is assigned 4 MSIRs and 4 GIC interrupts. But the MSIR has the different offset and only supports 8 MSIs. The bits between variable bit_start and bit_end in structure ls_scfg_msir are used to show 8 MSI interrupts. msir_irqs and msir_base are added to describe the difference of MSI between LS1043a v1.1 and other SoCs. Acked-by: Rob Herring Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier .../interrupt-controller/fsl,ls-scfg-msi.txt | 1 + drivers/irqchip/irq-ls-scfg-msi.c | 45 +++++++++++++++++++--- 2 files changed, 40 insertions(+), 6 deletions(-) commit 4dd5da65a39d9a0405304fdef0804afffece044b Author: Minghuan Lian Date: Wed Jul 5 14:59:01 2017 +0800 irqchip/ls-scfg-msi: Add LS1046a MSI support LS1046a includes 4 MSIRs, each MSIR is assigned a dedicate GIC SPI interrupt and provides 32 MSI interrupts. Compared to previous MSI, LS1046a's IBS(interrupt bit select) shift is changed to 2 and total MSI interrupt number is changed to 128. The patch adds structure 'ls_scfg_msir' to describe MSIR setting and 'ibs_shift' to store the different value between the SoCs. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier drivers/irqchip/irq-ls-scfg-msi.c | 165 ++++++++++++++++++++++++++++++-------- 1 file changed, 130 insertions(+), 35 deletions(-) commit cb3421684ee778d60da26232bfea626dca2eb8db Author: Minghuan Lian Date: Wed Jul 5 14:59:00 2017 +0800 arm64: dts: ls1046a: Add MSI dts node LS1046a includes 3 MSI controllers. Each controller supports 128 interrupts. Acked-by: Rob Herring Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier .../interrupt-controller/fsl,ls-scfg-msi.txt | 1 + arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 0b09331a25fe279e7b93aa58dda35e58fd23eaa6 Author: Minghuan Lian Date: Wed Jul 5 14:58:59 2017 +0800 arm64: dts: ls1043a: Share all MSIs In order to maximize the use of MSI, a PCIe controller will share all MSI controllers. The patch changes "msi-parent" to refer to all MSI controller dts nodes. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df3015888d88479ea5da914330c87af58987886b Author: Minghuan Lian Date: Wed Jul 5 14:58:58 2017 +0800 arm: dts: ls1021a: Share all MSIs In order to maximize the use of MSI, a PCIe controller will share all MSI controllers. The patch changes msi-parent to refer to all MSI controller dts nodes. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier arch/arm/boot/dts/ls1021a.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f93aff6263f3de4428daf0ea8872f6c0121438ec Author: Minghuan Lian Date: Wed Jul 5 14:58:57 2017 +0800 arm64: dts: ls1043a: Fix typo of MSI compatible string "1" should be replaced by "l". This is a typo. The patch is to fix it. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9041ea324b0f2bec624c385c4a8bbd21d453e9b Author: Minghuan Lian Date: Wed Jul 5 14:58:56 2017 +0800 arm: dts: ls1021a: Fix typo of MSI compatible string "1" should be replaced by "l". This is a typo. The patch is to fix it. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier arch/arm/boot/dts/ls1021a.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d35b2c99520bbc018d645ddcbc0332f36a985a56 Author: Minghuan Lian Date: Wed Jul 5 14:58:55 2017 +0800 irqchip/ls-scfg-msi: Fix typo of MSI compatible strings The patch is to fix typo of the Layerscape SCFG MSI dts compatible strings. "1" is replaced by "l". Acked-by: Rob Herring Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Marc Zyngier .../devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt | 6 +++--- drivers/irqchip/irq-ls-scfg-msi.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit b5f515735bea4ae71c248aea3e049073f8852889 Author: Andreas Dilger Date: Thu Aug 31 11:09:45 2017 -0400 ext4: avoid Y2038 overflow in recently_deleted() Avoid a 32-bit time overflow in recently_deleted() since i_dtime (inode deletion time) is stored only as a 32-bit value on disk. Since i_dtime isn't used for much beyond a boolean value in e2fsck and is otherwise only used in this function in the kernel, there is no benefit to use more space in the inode for this field on disk. Instead, compare only the relative deletion time with the low 32 bits of the time using the newly-added time_before32() helper, which is similar to time_before() and time_after() for jiffies. Increase RECENTCY_DIRTY to 300s based on Ted's comments about usage experience at Google. Signed-off-by: Andreas Dilger Signed-off-by: Theodore Ts'o Reviewed-by: Arnd Bergmann fs/ext4/ialloc.c | 19 +++++++++++++------ include/linux/time.h | 15 +++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) commit b304605f0a2c25c028e26a9a3f6aa798693a4051 Author: Florian Fainelli Date: Wed Aug 30 17:29:16 2017 -0700 irqchip/irq-bcm7120-l2: Use correct I/O accessors for irq_fwd_mask Initialization of irq_fwd_mask was done using __raw_writel() which happens to work for all cases except when using ARM BE8 which requires writel() (with the proper swapping). Move the initialization of the irq_fwd_mask till later when we have correctly defined our I/O accessors. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier drivers/irqchip/irq-bcm7120-l2.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c8c7d93dcbf21ebcf7486473e7a9a6addf49caa9 Author: Bhumika Goyal Date: Thu Aug 24 15:56:21 2017 +0530 irqchip/mmp: Make mmp_intc_conf const Make these const as they are only used during a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct mmp_intc_conf 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 mmp_intc_conf s; Signed-off-by: Bhumika Goyal Signed-off-by: Marc Zyngier drivers/irqchip/irq-mmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73c4c37c7e6ecc3cf921d182b733c9322ebed117 Author: Bhumika Goyal Date: Sat Aug 19 16:22:37 2017 +0530 irqchip/gic: Make irq_chip const Make this const as it is only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bdf502517288662d883fbaa915874790f51a2cd Author: Marc Zyngier Date: Sun Jun 25 14:10:46 2017 +0100 irqchip/gic-v3: Advertise GICv4 support to KVM As KVM needs to know about the availability of GICv4 to enable direct injection of interrupts, let's advertise the feature in the gic_kvm_info structure. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 2 ++ include/linux/irqchip/arm-gic-common.h | 2 ++ 2 files changed, 4 insertions(+) commit 3d63cb53e221d8ab347e94aeac0b5511857beb7f Author: Marc Zyngier Date: Tue Dec 20 15:31:54 2016 +0000 irqchip/gic-v4: Enable low-level GICv4 operations Get the show on the road... Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/Makefile | 2 +- drivers/irqchip/irq-gic-v3-its.c | 3 ++- drivers/irqchip/irq-gic-v4.c | 13 +++++++++++++ include/linux/irqchip/arm-gic-v4.h | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) commit 7954907bedafd0f8e81633803945cb304793b29d Author: Marc Zyngier Date: Wed Dec 21 17:40:16 2016 +0000 irqchip/gic-v4: Add some basic documentation Do a braindump of the way things are supposed to work. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit f2eac75de435871d5a497f8b557874a2a8a7b264 Author: Marc Zyngier Date: Wed Dec 21 21:50:32 2016 +0000 irqchip/gic-v4: Add VLPI configuration interface Add the required interfaces to map, unmap and update a VLPI. Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 42 ++++++++++++++++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v4.h | 4 ++++ 2 files changed, 46 insertions(+) commit eab84318c2811e3f38c080efcc7f709f51bb8370 Author: Marc Zyngier Date: Tue Dec 20 15:31:02 2016 +0000 irqchip/gic-v4: Add VPE command interface Add the required interfaces to schedule a VPE and perform a VINVALL command. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 25 +++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v4.h | 2 ++ 2 files changed, 27 insertions(+) commit 7de5c0af9c7c717f9052e6d75b24f90050e6a56e Author: Marc Zyngier Date: Tue Dec 20 15:27:52 2016 +0000 irqchip/gic-v4: Add per-VM VPE domain creation When creating a VM, it is very convenient to have an irq domain containing all the doorbell interrupts associated with that VM (each interrupt representing a VPE). Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 74 ++++++++++++++++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v4.h | 3 ++ 2 files changed, 77 insertions(+) commit d51c4b4da7f8fae8c884e3b89fdab906f66da28a Author: Marc Zyngier Date: Tue Jun 27 21:24:25 2017 +0100 irqchip/gic-v3-its: Set implementation defined bit to enable VLPIs A long time ago, GITS_CTLR[1] used to be called GITC_CTLR.EnableVLPI. It has been subsequently deprecated and is now an "Implementation Defined" bit that may ot may not be set for GICv4. Brilliant. And the current crop of the FastModel requires that bit for VLPIs to be enabled. Oh well... Let's set it and find out what breaks. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 7 +++++-- include/linux/irqchip/arm-gic-v3.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) commit e57a3e2847ad74bd3285287b0effc1cfcc3d8806 Author: Marc Zyngier Date: Mon Jul 31 14:47:24 2017 +0100 irqchip/gic-v3-its: Allow doorbell interrupts to be injected/cleared While the doorbell interrupts are usually driven by the HW itself, having a way to trigger them independently has proved to be a really useful debug feature. As it is actually very little code, let's add it to the VPE irqchip operations. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 958b90d162b4ad40a7a809af5f56f3744d73ab84 Author: Marc Zyngier Date: Fri Aug 18 16:14:17 2017 +0100 irqchip/gic-v3-its: Move pending doorbell after VMOVP After moving a VPE from a redistributor to another, we're still left with a potential pending doorbell interrupt on the old redistributor. That interrupt should be moved to the new one to be either cleared or take, depending on what the hypervisor wishes to do. So let's move it right after having execited VMOVP. This doesn't add much cost in the !DirectLPI case (we trade a DISCARD for a MOVI), and the cost of the DIRECTLPI case should be minimal (two extra MMIO accesses). Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 20b3d54ecba51c5fe476eea94ffdc463559c5c85 Author: Marc Zyngier Date: Tue Dec 20 15:23:22 2016 +0000 irqchip/gic-v3-its: Add device proxy for VPE management if !DirectLpi When we don't have the DirectLPI feature, we must work around the architecture shortcomings to be able to perform the required maintenance (interrupt masking, clearing and injection). For this, we create a fake device whose sole purpose is to provide a way to issue commands as if we were dealing with LPIs coming from that device (while they actually originate from the ITS). This fake device doesn't have LPIs allocated to it, but instead uses the VPE LPIs. Of course, this could be a real bottleneck, and a naive implementation would require 6 commands to issue an invalidation. Instead, let's allocate at least one event per physical CPU (rounded up to the next power of 2), and opportunistically map the VPE doorbell to an event. This doorbell will be mapped until we roll over and need to reallocate this slot. This ensures that most of the time, we only need 2 commands to issue an INV, INT or CLEAR, making the performance a lot better, given that we always issue a CLEAR on entry, and an INV on each side of a trapped WFI. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 151 +++++++++++++++++++++++++++++++++++-- include/linux/irqchip/arm-gic-v4.h | 2 + 2 files changed, 147 insertions(+), 6 deletions(-) commit 93f94ea0548c2628efe7d57e0989f06a14cedb53 Author: Marc Zyngier Date: Fri Aug 4 18:37:09 2017 +0100 irqchip/gic-v3-its: Make LPI allocation optional on device creation The normal course of action when allocating the ITS' view of a device is to allocate the corresponding LPIs. But we're about to introduce devices that borrow their interrupts from some other entities. So let's make the allocation optional. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit f6a91da7c788ac7345305ee291d0b205d2f5a70f Author: Marc Zyngier Date: Tue Dec 20 15:20:38 2016 +0000 irqchip/gic-v3-its: Add VPE interrupt masking When masking/unmasking a doorbell interrupt, it is necessary to issue an invalidation to the corresponding redistributor. We use the DirectLPI feature by writting directly to the corresponding redistributor. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 6 ++++++ arch/arm64/include/asm/arch_gicv3.h | 2 ++ drivers/irqchip/irq-gic-v3-its.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) commit 3171a47a22eedfb6e97803fb193fc98cdb61d90f Author: Marc Zyngier Date: Tue Dec 20 15:17:28 2016 +0000 irqchip/gic-v3-its: Add VPE affinity changes When we're about to run a vcpu, it is crucial that the redistributor associated with the physical CPU is being told about the new residency. This is abstracted by hijacking the irq_set_affinity method for the doorbell interrupt associated with the VPE. It is expected that the hypervisor will call this method before scheduling the VPE. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 96 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 5e2f764234bd0ef9542902fb608e525c41e0d7ee Author: Marc Zyngier Date: Tue Dec 20 15:10:50 2016 +0000 irqchip/gic-v3-its: Add VPE invalidation hook When a guest issues a INVALL command targetting a collection, it must be translated into a VINVALL for the VPE that has this collection. This patch implements a hook that offers this functionallity to the hypervisor. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 4 ++++ 1 file changed, 4 insertions(+) commit e643d80340363c9d172abfbe437537196cfc1643 Author: Marc Zyngier Date: Tue Dec 20 15:09:31 2016 +0000 irqchip/gic-v3-its: Add VPE scheduling When a VPE is scheduled to run, the corresponding redistributor must be told so, by setting VPROPBASER to the VM's property table, and VPENDBASER to the vcpu's pending table. When scheduled out, we preserve the IDAI and PendingLast bits. The latter is specially important, as it tells the hypervisor that there are pending interrupts for this vcpu. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 85 ++++++++++++++++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v3.h | 58 ++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) commit 3ca63f363f3f8fe457482c53d5c86d83bff21e64 Author: Marc Zyngier Date: Tue Jan 3 13:39:52 2017 +0000 irqchip/gic-v3-its: Add VPENDBASER/VPROPBASER accessors V{PEND,PROP}BASER being 64bit registers, they need some ad-hoc accessors on 32bit, specially given that VPENDBASER contains a Valid bit, making the access a bit convoluted. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 28 ++++++++++++++++++++++++++++ arch/arm64/include/asm/arch_gicv3.h | 5 +++++ include/linux/irqchip/arm-gic-v3.h | 5 +++++ 3 files changed, 38 insertions(+) commit eb78192be2833484b0f7b506d217a40621215251 Author: Marc Zyngier Date: Tue Dec 20 14:47:05 2016 +0000 irqchip/gic-v3-its: Add VPE irq domain [de]activation On activation, a VPE is mapped using the VMAPP command, followed by a VINVALL for a good measure. On deactivation, the VPE is simply unmapped. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 102 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 7d75bbb4bc1ad90386776459d37e4ddfe605671e Author: Marc Zyngier Date: Tue Dec 20 13:55:54 2016 +0000 irqchip/gic-v3-its: Add VPE irq domain allocation/teardown When creating a VM, the low level GICv4 code is responsible for: - allocating each VPE a unique VPEID - allocating a doorbell interrupt for each VPE - allocating the pending tables for each VPE - allocating the property table for the VM This of course has to be reversed when the VM is brought down. All of this is wired into the irq domain alloc/free methods. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 169 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) commit 8fff27aec182ed4d6fe15d1373fc6b35cdfcda0f Author: Marc Zyngier Date: Tue Dec 20 13:41:55 2016 +0000 irqchip/gic-v3-its: Add VPE domain infrastructure Add the basic GICv4 VPE (vcpu in GICv4 parlance) infrastructure (irqchip, irq domain) that is going to be populated in the following patches. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 015ec0386ab69a5b6b21f6c1559b242f4540de9f Author: Marc Zyngier Date: Tue Dec 20 09:54:57 2016 +0000 irqchip/gic-v3-its: Add VLPI configuration handling When a VLPI is reconfigured (enabled, disabled, change in priority), the full configuration byte must be written, and the caches invalidated. Also, when using the irq_mask/irq_unmask methods, it is necessary to disable the doorbell for that particular interrupt (by mapping it to 1023) on top of clearing the Enable bit. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 75 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 5 deletions(-) commit d011e4e654d7f519bf892995b9f4b453dbf8a3e5 Author: Marc Zyngier Date: Tue Dec 20 09:44:41 2016 +0000 irqchip/gic-v3-its: Add VLPI map/unmap operations In order to let a VLPI being injected into a guest, the VLPI must be mapped using the VMAPTI command. When moved to a different vcpu, it must be moved with the VMOVI command. These commands are issued via the irq_set_vcpu_affinity method, making sure we unmap the corresponding host LPI first. The reverse is also done when the VLPI is unmapped from the guest. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 250 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 247 insertions(+), 3 deletions(-) commit c808eea8f763a996409656df83c41b8ec628060b Author: Marc Zyngier Date: Tue Dec 20 09:31:20 2016 +0000 irqchip/gic-v3-its: Add VLPI configuration hook Add the skeleton irq_set_vcpu_affinity method that will be used to configure VLPIs. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d7276b80e752acaaf30f04e62d0e986b5bced2df Author: Marc Zyngier Date: Tue Dec 20 15:11:47 2016 +0000 irqchip/gic-v3-its: Add GICv4 ITS command definitions Add the new GICv4 ITS command definitions, most of them, being defined in terms of their physical counterparts. Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- include/linux/irqchip/arm-gic-v3.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit de29faa0d8ac925534749bc56d539bf936ce122b Author: Marc Zyngier Date: Mon Dec 19 19:25:00 2016 +0000 irqchip/gic-v4: Add management structure definitions Add a bunch of GICv4-specific data structures that will get used in subsequent patches. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v4.h | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 24d90bb2f3251a8cb63b65e8eb61713d6395362c Author: Paolo Valente Date: Thu Aug 31 08:46:31 2017 +0200 block, bfq: guarantee update_next_in_service always returns an eligible entity If the function bfq_update_next_in_service is invoked as a consequence of the activation or requeueing of an entity, say E, then it doesn't invoke bfq_lookup_next_entity to get the next-in-service entity. In contrast, it follows a shorter path: if E happens to be eligible (see commit "bfq-sq-mq: make lookup_next_entity push up vtime on expirations" for details on eligibility) and to have a lower virtual finish time than the current candidate as next-in-service entity, then E directly becomes the next-in-service entity. Unfortunately, there is a corner case for which this shorter path makes bfq_update_next_in_service choose a non eligible entity: it occurs if both E and the current next-in-service entity happen to be non eligible when bfq_update_next_in_service is invoked. In this case, E is not set as next-in-service, and, since bfq_lookup_next_entity is not invoked, the state of the parent entity is not updated so as to end up with an eligible entity as the proper next-in-service entity. In this respect, next-in-service is actually allowed to be non eligible while some queue is in service: since no system-virtual-time push-up can be performed in that case (see again commit "bfq-sq-mq: make lookup_next_entity push up vtime on expirations" for details), next-in-service is chosen, speculatively, as a function of the possible value that the system virtual time may get after a push up. But the correctness of the schedule breaks if next-in-service is still a non eligible entity when it is time to set in service the next entity. Unfortunately, this may happen in the above corner case. This commit fixes this problem by making bfq_update_next_in_service invoke bfq_lookup_next_entity not only if the above shorter path cannot be taken, but also if the shorter path is taken but fails to yield an eligible next-in-service entity. Signed-off-by: Paolo Valente Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Jens Axboe block/bfq-wf2q.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a02195ce864069c3aa41da792364bdfb3cdbc39f Author: Paolo Valente Date: Thu Aug 31 08:46:30 2017 +0200 block, bfq: remove direct switch to an entity in higher class If the function bfq_update_next_in_service is invoked as a consequence of the activation or requeueing of an entity, say E, and finds out that E belongs to a higher-priority class than that of the current next-in-service entity, then it sets next_in_service directly to E. But this may lead to anomalous schedules, because E may happen not be eligible for service, because its virtual start time is higher than the system virtual time for its service tree. This commit addresses this issue by simply removing this direct switch. Signed-off-by: Paolo Valente Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Jens Axboe block/bfq-wf2q.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 80294c3bbf3ceb20530ee4aa44bbaf354222b021 Author: Paolo Valente Date: Thu Aug 31 08:46:29 2017 +0200 block, bfq: make lookup_next_entity push up vtime on expirations To provide a very smooth service, bfq starts to serve a bfq_queue only if the queue is 'eligible', i.e., if the same queue would have started to be served in the ideal, perfectly fair system that bfq simulates internally. This is obtained by associating each queue with a virtual start time, and by computing a special system virtual time quantity: a queue is eligible only if the system virtual time has reached the virtual start time of the queue. Finally, bfq guarantees that, when a new queue must be set in service, there is always at least one eligible entity for each active parent entity in the scheduler. To provide this guarantee, the function __bfq_lookup_next_entity pushes up, for each parent entity on which it is invoked, the system virtual time to the minimum among the virtual start times of the entities in the active tree for the parent entity (more precisely, the push up occurs if the system virtual time happens to be lower than all such virtual start times). There is however a circumstance in which __bfq_lookup_next_entity cannot push up the system virtual time for a parent entity, even if the system virtual time is lower than the virtual start times of all the child entities in the active tree. It happens if one of the child entities is in service. In fact, in such a case, there is already an eligible entity, the in-service one, even if it may not be not present in the active tree (because in-service entities may be removed from the active tree). Unfortunately, in the last re-design of the hierarchical-scheduling engine, the reset of the pointer to the in-service entity for a given parent entity--reset to be done as a consequence of the expiration of the in-service entity--always happens after the function __bfq_lookup_next_entity has been invoked. This causes the function to think that there is still an entity in service for the parent entity, and then that the system virtual time cannot be pushed up, even if actually such a no-more-in-service entity has already been properly reinserted into the active tree (or in some other tree if no more active). Yet, the system virtual time *had* to be pushed up, to be ready to correctly choose the next queue to serve. Because of the lack of this push up, bfq may wrongly set in service a queue that had been speculatively pre-computed as the possible next-in-service queue, but that would no more be the one to serve after the expiration and the reinsertion into the active trees of the previously in-service entities. This commit addresses this issue by making __bfq_lookup_next_entity properly push up the system virtual time if an expiration is occurring. Signed-off-by: Paolo Valente Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Jens Axboe block/bfq-iosched.c | 4 ++-- block/bfq-iosched.h | 4 ++-- block/bfq-wf2q.c | 58 +++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 19 deletions(-) commit bc30658eff39c5bb562174fcf93618ab6a7afe88 Merge: 4e2a809 469869d Author: Thomas Gleixner Date: Thu Aug 31 16:03:47 2017 +0200 Merge branch 'clockevents/4.14' of http://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent updates from Daniel Lezcano: - Add the new imx-tpm driver (Dong Aisheng) - Remove DT deprecated binding for Renesas (Magnus Damm) - Remove error message on memory allocation (Markus Elfring) - Convert clocksource drivers to use %pOF commit 469869d18a886e046161ca65516bd3ffcd2f804b Author: Rob Herring Date: Tue Jul 18 16:42:53 2017 -0500 clocksource: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Gonzalez Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-arm-kernel@lists.infradead.org Acked-by: Marc Gonzalez Acked-by: Alexandre TORGUE Signed-off-by: Daniel Lezcano drivers/clocksource/tango_xtal.c | 6 +++--- drivers/clocksource/timer-of.c | 11 +++++------ drivers/clocksource/timer-probe.c | 3 +-- drivers/clocksource/timer-stm32.c | 8 ++++---- 4 files changed, 13 insertions(+), 15 deletions(-) commit ac059e2aa01dcbbd7e0b2609abbef5790486fafe Author: Priit Laes Date: Sun Aug 27 15:55:23 2017 +0300 Revert "pinctrl: sunxi: Don't enforce bias disable (for now)" This reverts commit 2154d94b40ea2a5de05245521371d0461bb0d669. The original patch was intented to avoid some issues with the sunxi gpio rework and was supposed to be reverted after all the required DT bits had been merged around v4.10. Signed-off-by: Priit Laes Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 12219fd2bf5304293f5cf014cbc2e6bfdfcab7b5 Author: Kunihiko Hayashi Date: Mon Aug 28 11:21:26 2017 +0900 pinctrl: uniphier: fix members of rmii group for Pro4 The ether_rmii_groups should have "ether_rmii" and "ether_rmiib" as members. This patch replaces to them. Fixes: 1e359ab1285e ("pinctrl: uniphier: add Ethernet pin-mux settings") Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04b5de3a8f54fad8bb838827de85381bc6a5bc61 Author: Jiri Slaby Date: Thu Aug 31 14:16:53 2017 +0200 x86/idt: Remove superfluous ALIGNment Commit 87e81786b13b ("x86/idt: Move early IDT setup out of 32-bit asm") switched early_ignore_irq to use ENTRY. ENTRY aligns the code, so there is no need for one more ALIGN right before the function. And add one \n after the function to separate it from the data. Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Cc: Denys Vlasenko Cc: Peter Zijlstra Cc: Brian Gerst Cc: Steven Rostedt Cc: Linus Torvalds Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Josh Poimboeuf Link: http://lkml.kernel.org/r/20170831121653.28917-1-jslaby@suse.cz arch/x86/kernel/head_32.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d785d9ec7894d0e92f0d0eecc8add9c84131daa4 Author: Wei Liu Date: Tue Aug 29 11:27:53 2017 +0100 xen/mmu: set MMU_NORMAL_PT_UPDATE in remap_area_mfn_pte_fn No functional change because MMU_NORMAL_PT_UPDATE is in fact 0. Set it to make the code consistent with similar code in mmu_pv.c Signed-off-by: Wei Liu Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b194da25ca4812f6307204f9166ec623fd08d5d0 Author: Boris Ostrovsky Date: Wed Aug 23 18:27:04 2017 -0400 xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests Commit aba831a69632 ("xen: remove tests for pvh mode in pure pv paths") removed XENFEAT_auto_translated_physmap test in xen_alloc_p2m_entry() since it is assumed that the routine is never called by non-PV guests. However, alloc_xenballooned_pages() may make this call on a PVH guest. Prevent this from happening by adding XENFEAT_auto_translated_physmap check there. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Fixes: aba831a69632 ("xen: remove tests for pvh mode in pure pv paths") drivers/xen/balloon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 22f12f0df802cea865672d8f39fbebdc03981050 Author: Julien Grall Date: Thu Aug 17 17:14:52 2017 +0100 xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init() When booting Linux as Xen guest with CONFIG_DEBUG_ATOMIC, the following splat appears: [ 0.002323] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) [ 0.019717] ASID allocator initialised with 65536 entries [ 0.020019] xen:grant_table: Grant tables using version 1 layout [ 0.020051] Grant table initialized [ 0.020069] BUG: sleeping function called from invalid context at /data/src/linux/mm/page_alloc.c:4046 [ 0.020100] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0 [ 0.020123] no locks held by swapper/0/1. [ 0.020143] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc5 #598 [ 0.020166] Hardware name: FVP Base (DT) [ 0.020182] Call trace: [ 0.020199] [] dump_backtrace+0x0/0x270 [ 0.020222] [] show_stack+0x24/0x30 [ 0.020244] [] dump_stack+0xb8/0xf0 [ 0.020267] [] ___might_sleep+0x1c8/0x1f8 [ 0.020291] [] __might_sleep+0x58/0x90 [ 0.020313] [] __alloc_pages_nodemask+0x1c0/0x12e8 [ 0.020338] [] alloc_page_interleave+0x38/0x88 [ 0.020363] [] alloc_pages_current+0xdc/0xf0 [ 0.020387] [] __get_free_pages+0x28/0x50 [ 0.020411] [] evtchn_fifo_alloc_control_block+0x2c/0xa0 [ 0.020437] [] xen_evtchn_fifo_init+0x38/0xb4 [ 0.020461] [] xen_init_IRQ+0x44/0xc8 [ 0.020484] [] xen_guest_init+0x250/0x300 [ 0.020507] [] do_one_initcall+0x44/0x130 [ 0.020531] [] kernel_init_freeable+0x120/0x288 [ 0.020556] [] kernel_init+0x18/0x110 [ 0.020578] [] ret_from_fork+0x10/0x40 [ 0.020606] xen:events: Using FIFO-based ABI [ 0.020658] Xen: initializing cpu0 [ 0.027727] Hierarchical SRCU implementation. [ 0.036235] EFI services will not be available. [ 0.043810] smp: Bringing up secondary CPUs ... This is because get_cpu() in xen_evtchn_fifo_init() will disable preemption, but __get_free_page() might sleep (GFP_ATOMIC is not set). xen_evtchn_fifo_init() will always be called before SMP is initialized, so {get,put}_cpu() could be replaced by a simple smp_processor_id(). This also avoid to modify evtchn_fifo_alloc_control_block that will be called in other context. Signed-off-by: Julien Grall Reported-by: Andre Przywara Reviewed-by: Boris Ostrovsky Fixes: 1fe565517b57 ("xen/events: use the FIFO-based ABI if available") Signed-off-by: Boris Ostrovsky drivers/xen/events/events_fifo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit fefcfb9935be0208ff522563239f11a04f98c27d Author: Arnd Bergmann Date: Fri Jul 21 18:17:45 2017 +0200 xen/pvcalls: use WARN_ON(1) instead of __WARN() __WARN() is an internal helper that is only available on some architectures, but causes a build error e.g. on ARM64 in some configurations: drivers/xen/pvcalls-back.c: In function 'set_backend_state': drivers/xen/pvcalls-back.c:1097:5: error: implicit declaration of function '__WARN' [-Werror=implicit-function-declaration] Unfortunately, there is no equivalent of BUG() that takes no arguments, but WARN_ON(1) is commonly used in other drivers and works on all configurations. Fixes: 7160378206b2 ("xen/pvcalls: xenbus state handling") Signed-off-by: Arnd Bergmann Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a0e4fd14ba0b90b6fcea9c0f7f6de6886479427d Author: Juergen Gross Date: Fri Aug 4 13:36:13 2017 +0200 xen: remove not used trace functions There are some Xen specific trace functions defined in include/trace/events/xen.h. Remove them. Signed-off-by: Juergen Gross Acked-by: Steven Rostedt (VMware) Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky include/trace/events/xen.h | 20 -------------------- 1 file changed, 20 deletions(-) commit 882bbe56aed0cbb00b374454f6c069919c9228dd Author: Juergen Gross Date: Fri Aug 4 13:36:12 2017 +0200 xen: remove unused function xen_set_domain_pte() The function xen_set_domain_pte() is used nowhere in the kernel. Remove it. Signed-off-by: Juergen Gross Acked-by: Steven Rostedt (VMware) Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/include/asm/xen/page.h | 2 -- arch/x86/xen/mmu_pv.c | 20 -------------------- include/trace/events/xen.h | 18 ------------------ 3 files changed, 40 deletions(-) commit 82616f9599a707e8225ceca6000dc5ea5aa78e11 Author: Juergen Gross Date: Fri Aug 4 13:36:11 2017 +0200 xen: remove tests for pvh mode in pure pv paths Remove the last tests for XENFEAT_auto_translated_physmap in pure PV-domain specific paths. PVH V1 is gone and the feature will always be "false" in PV guests. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/include/asm/xen/page.h | 3 --- arch/x86/xen/p2m.c | 25 +------------------------ arch/x86/xen/setup.c | 5 +---- 3 files changed, 2 insertions(+), 31 deletions(-) commit fff219d90c8220f9e8a254d792537503cfb93017 Author: Arvind Yadav Date: Wed Aug 2 23:16:57 2017 +0530 xen-platform: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/platform-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4feaeb036b2e0f715e0d05ae84da01c6696a75f Author: Juergen Gross Date: Thu Jul 27 17:11:58 2017 +0200 xen: cleanup xen.h The macros for testing domain types are more complicated then they need to. Simplify them. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky include/xen/xen.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 42d3078a8ad7542eee980da08a781a769bb21fe4 Author: Stefano Stabellini Date: Thu Jul 6 11:01:08 2017 -0700 xen: introduce a Kconfig option to enable the pvcalls backend Also add pvcalls-back to the Makefile. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/Kconfig | 12 ++++++++++++ drivers/xen/Makefile | 1 + 2 files changed, 13 insertions(+) commit 5ad9918ffc4157f239f2e7849b4987d3b20f917e Author: Stefano Stabellini Date: Thu Jul 6 11:01:08 2017 -0700 xen/pvcalls: implement write When the other end notifies us that there is data to be written (pvcalls_back_conn_event), increment the io and write counters, and schedule the ioworker. Implement the write function called by ioworker by reading the data from the data ring, writing it to the socket by calling inet_sendmsg. Set out_error on error. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit b3f9f773af1f925b35f73f5e946bd96728b96cca Author: Stefano Stabellini Date: Thu Jul 6 11:01:08 2017 -0700 xen/pvcalls: implement read When an active socket has data available, increment the io and read counters, and schedule the ioworker. Implement the read function by reading from the socket, writing the data to the data ring. Set in_error on error. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 5d520d8580b31d75a115ac58ab0a804b92581fd5 Author: Stefano Stabellini Date: Thu Jul 6 11:01:07 2017 -0700 xen/pvcalls: implement the ioworker functions We have one ioworker per socket. Each ioworker goes through the list of outstanding read/write requests. Once all requests have been dealt with, it returns. We use one atomic counter per socket for "read" operations and one for "write" operations to keep track of the reads/writes to do. We also use one atomic counter ("io") per ioworker to keep track of how many outstanding requests we have in total assigned to the ioworker. The ioworker finishes when there are none. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 0a85d23b8164c951a50512b84601decb9a5e4dd6 Author: Stefano Stabellini Date: Thu Jul 6 11:01:07 2017 -0700 xen/pvcalls: disconnect and module_exit Implement backend_disconnect. Call pvcalls_back_release_active on active sockets and pvcalls_back_release_passive on passive sockets. Implement module_exit by calling backend_disconnect on frontend connections. [ boris: fixed long lines ] Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit a51729cb9b8079dcb520cb78a761f14fbdd0a3b4 Author: Stefano Stabellini Date: Thu Jul 6 11:01:07 2017 -0700 xen/pvcalls: implement release command Release both active and passive sockets. For active sockets, make sure to avoid possible conflicts with the ioworker reading/writing to those sockets concurrently. Set map->release to let the ioworker know atomically that the socket will be released soon, then wait until the ioworker finishes (flush_work). Unmap indexes pages and data rings. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 3cf33a587de48740c2da4d2ea5b414d5e493a2eb Author: Stefano Stabellini Date: Thu Jul 6 11:01:07 2017 -0700 xen/pvcalls: implement poll command Implement poll on passive sockets by requesting a delayed response with mappass->reqcopy, and reply back when there is data on the passive socket. Poll on active socket is unimplemented as by the spec, as the frontend should just wait for events and check the indexes on the indexes page. Only support one outstanding poll (or accept) request for every passive socket at any given time. [ boris: fixed long lines ] Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 75 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) commit 6f474e711617d00ef3be31f454301da00d0eb5ac Author: Stefano Stabellini Date: Thu Jul 6 11:01:07 2017 -0700 xen/pvcalls: implement accept command Implement the accept command by calling inet_accept. To avoid blocking in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get scheduled on sk_data_ready (for a passive socket, it means that there are connections to accept). Use the reqcopy field to store the request. Accept the new socket from the delayed work function, create a new sock_mapping for it, map the indexes page and data ring, and reply to the other end. Allocate an ioworker for the socket. Only support one outstanding blocking accept request for every socket at any time. Add a field to sock_mapping to remember the passive socket from which an active socket was created. [ boris: fixed whitespaces ] Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 113 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 8ce3f7626f96b985142c5e93f9f2dc338b0c21bf Author: Stefano Stabellini Date: Thu Jul 6 11:01:06 2017 -0700 xen/pvcalls: implement listen command Call inet_listen to implement the listen command. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 331a63e6f8e42bf20dfa5b94d717a5ef130fcbee Author: Stefano Stabellini Date: Thu Jul 6 11:01:06 2017 -0700 xen/pvcalls: implement bind command Allocate a socket. Track the allocated passive sockets with a new data structure named sockpass_mapping. It contains an unbound workqueue to schedule delayed work for the accept and poll commands. It also has a reqcopy field to be used to store a copy of a request for delayed work. Reads/writes to it are protected by a lock (the "copy_lock" spinlock). Initialize the workqueue in pvcalls_back_bind. Implement the bind command with inet_bind. The pass_sk_data_ready event handler will be added later. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 5db4d286a8ef88a04247a005df9cdd4bce3c7673 Author: Stefano Stabellini Date: Thu Jul 6 11:01:06 2017 -0700 xen/pvcalls: implement connect command Allocate a socket. Keep track of socket <-> ring mappings with a new data structure, called sock_mapping. Implement the connect command by calling inet_stream_connect, and mapping the new indexes page and data ring. Allocate a workqueue and a work_struct, called ioworker, to perform reads and writes to the socket. When an active socket is closed (sk_state_change), set in_error to -ENOTCONN and notify the other end, as specified by the protocol. sk_data_ready and pvcalls_back_ioworker will be implemented later. [ boris: fixed whitespaces ] Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 179 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) commit fb0298754ab79f0aca1a8162f9aeb5b097c0a1b1 Author: Stefano Stabellini Date: Thu Jul 6 11:01:00 2017 -0700 xen/pvcalls: implement socket command Just reply with success to the other end for now. Delay the allocation of the actual socket to bind and/or connect. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b1efa69317e5e7e813620af180f262a0fc1db47c Author: Stefano Stabellini Date: Thu Jul 6 11:00:00 2017 -0700 xen/pvcalls: handle commands from the frontend When the other end notifies us that there are commands to be read (pvcalls_back_event), wake up the backend thread to parse the command. The command ring works like most other Xen rings, so use the usual ring macros to read and write to it. The functions implementing the commands are empty stubs for now. [ boris: fixed whitespaces ] Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 125 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit d0e4d560c2433d29d11219567958b12bfe596d22 Author: Stefano Stabellini Date: Thu Jul 6 10:59:29 2017 -0700 xen/pvcalls: connect to a frontend Introduce a per-frontend data structure named pvcalls_fedata. It contains pointers to the command ring, its event channel, a list of active sockets and a tree of passive sockets (passing sockets need to be looked up from the id on listen, accept and poll commands, while active sockets only on release). It also has an unbound workqueue to schedule the work of parsing and executing commands on the command ring. socket_lock protects the two lists. In pvcalls_back_global, keep a list of connected frontends. [ boris: fixed whitespaces/long lines ] Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 0a9c75c2c7258f2c50d2c62430ccca3eec9f866f Author: Stefano Stabellini Date: Thu Jul 6 10:59:17 2017 -0700 xen/pvcalls: xenbus state handling Introduce the code to handle xenbus state changes. Implement the probe function for the pvcalls backend. Write the supported versions, max-page-order and function-calls nodes to xenstore, as required by the protocol. Introduce stub functions for disconnecting/connecting to a frontend. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 155 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) commit 9be07334f99e1f9e0b244d73528bc3afce126735 Author: Stefano Stabellini Date: Wed Jul 5 13:08:48 2017 -0700 xen/pvcalls: initialize the module and register the xenbus backend Keep a list of connected frontends. Use a semaphore to protect list accesses. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 72e59c30df449bc7fe601716e60c824b4ffe606d Author: Stefano Stabellini Date: Wed Jul 5 13:08:39 2017 -0700 xen/pvcalls: introduce the pvcalls xenbus backend Introduce a xenbus backend 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 Reviewed-by: Juergen Gross CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-back.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 75e3ea5ba7d7a6c171c62c710990f2a5fb07e19a Author: Stefano Stabellini Date: Wed Jul 5 13:08:30 2017 -0700 xen: introduce the pvcalls interface header Introduce the C header file which defines the PV Calls interface. It is imported from xen/include/public/io/pvcalls.h. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: konrad.wilk@oracle.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky include/xen/interface/io/pvcalls.h | 121 +++++++++++++++++++++++++++++++++++++ include/xen/interface/io/ring.h | 2 + 2 files changed, 123 insertions(+) commit 9b21e72e8ce7f70f53f3cc3d2d47568e7f6029d2 Author: Markus Elfring Date: Sat Aug 26 20:30:04 2017 +0200 pinctrl: Delete an error message Omit an extra message 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: Linus Walleij drivers/pinctrl/devicetree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f68f8481316cc13a2bdf86efe49e251ac7c8946f Author: Markus Elfring Date: Sat Aug 26 20:15:21 2017 +0200 pinctrl: core: Delete an error message 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: Linus Walleij drivers/pinctrl/core.c | 1 - 1 file changed, 1 deletion(-) commit d68b42e30bbacd24354d644f430d088435b15e83 Author: Andy Shevchenko Date: Thu Aug 24 11:19:33 2017 +0300 pinctrl: intel: Read back TX buffer state In the same way as it's done in pinctrl-cherryview.c we would provide a readback TX buffer state. Fixes: 17fab473693 ("pinctrl: intel: Set pin direction properly") Reported-by: "Bourque, Francis" Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Tested-by: "Bourque, Francis" Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 12b8f01818974a5052b482db6c3fdca395f5dc4f Author: David Wu Date: Wed Aug 23 16:00:07 2017 +0800 pinctrl: rockchip: Add rv1108 recalculated iomux support The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate iomux. And the register offset is larger than the u8 range, so changed to u32. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 68 +++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 02b6bddb0b0a4e27fad6623d82579f2a1e35d3d3 Author: Colin Ian King Date: Thu Aug 24 12:34:22 2017 +0100 gpio: mockup: remove unused variable gc The variable gc is assigned but never read and is redundant. Remove it. Cleans up clang warning: drivers/gpio/gpio-mockup.c:169:2: warning: Value stored to 'gc' is never read Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 2 -- 1 file changed, 2 deletions(-) commit 6760f3f74e72d690bc47b8a1ca1716d2f2e4ad74 Author: Louis Yu Date: Tue Aug 1 15:28:33 2017 +0800 thermal: mediatek: minor mtk_thermal.c cleanups Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu Reviewed-by: Dawei Chien Signed-off-by: Zhang Rui drivers/thermal/mtk_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a0689933404c50f9ee2122b69b4be83e984afa2 Author: Louis Yu Date: Tue Aug 1 15:28:32 2017 +0800 thermal: mediatek: extend calibration data for mt2712 chip This patch adds support for mt2712 chip thermal calibration data and calculation, and is compatible with the existing chips. Signed-off-by: Louis Yu Reviewed-by: Dawei Chien Signed-off-by: Zhang Rui drivers/thermal/mtk_thermal.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 6cf7f002e70773fc11d032628edd2ecc679fe05b Author: Louis Yu Date: Tue Aug 1 15:28:31 2017 +0800 thermal: mediatek: add Mediatek thermal driver for mt2712 This patch adds support for mt2712 chip to mtk_thermal, and integrate mt2712 into the same mediatek thermal driver. MT2712 has only 1 bank and 4 sensors. Signed-off-by: Louis Yu Reviewed-by: Dawei Chien Signed-off-by: Zhang Rui drivers/thermal/mtk_thermal.c | 70 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-) commit f09517ab172e919366d730fcf765f17eaada058b Author: Louis Yu Date: Tue Aug 1 15:28:30 2017 +0800 dt-bindings: thermal: Add binding document for Mediatek thermal controller This adds the device tree binding documentation for the mediatek thermal controller found on Mediatek MT2712. Signed-off-by: Louis Yu Reviewed-by: Dawei Chien Signed-off-by: Zhang Rui Documentation/devicetree/bindings/thermal/mediatek-thermal.txt | 1 + 1 file changed, 1 insertion(+) commit a9a65a6b2b69e51f453fe26eeba1e45a720bbb05 Author: Gustavo A. R. Silva Date: Wed Aug 30 12:04:24 2017 -0500 rtlwifi: rtl8723be: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. Addresses-Coverity-ID: 1248728 Signed-off-by: Gustavo A. R. Silva Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f38966a7ace842afd3a9bf5d0fb56640f49df60c Author: Hans de Goede Date: Wed Aug 30 15:54:49 2017 +0200 brcmfmac: Log chip id and revision For debugging some problems, it is useful to know the chip revision add a brcmf_info message logging this. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 3 +++ 1 file changed, 3 insertions(+) commit f31039d4aea97d3827d0518f267f32a74dbdc498 Author: Sergey Matyukevich Date: Tue Aug 29 15:16:23 2017 +0300 qtnfmac: implement 64-bit dma support Use 64-bit dma for hosts with CONFIG_ARCH_DMA_ADDR_T_64BIT enabled. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 70 ++++++++++++++++++---- .../wireless/quantenna/qtnfmac/pearl/pcie_ipc.h | 10 ++-- .../quantenna/qtnfmac/pearl/pcie_regs_pearl.h | 1 + 3 files changed, 65 insertions(+), 16 deletions(-) commit b00edea3ed5fd4241d211671602d7a39d9482295 Author: Sergey Matyukevich Date: Tue Aug 29 15:16:22 2017 +0300 qtnfmac: fix free_xfer_buffer cleanup Check if skb tracking arrays has been already allocated. This additional check handles the case when init partially failed. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bab5dac73c08e0a18717756c4aff6417279bf2f9 Author: Sergey Matyukevich Date: Tue Aug 29 15:16:21 2017 +0300 qtnfmac: modify qtnf_map_bar not to return NULL NULL is not a special type of success here but a error pointer. So it makes sense to check against NULL in qtnf_map_bar and return error code. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 97f38011451f53fe9a495ff5e0ca035d91dd550d Author: Sergey Matyukevich Date: Tue Aug 29 15:16:20 2017 +0300 qtnfmac: module param sanity check Linux built-in circ_buf implementation assumes that that the circular buffer length is a power of 2. Make sure that rx and tx descriptor queue lengths are power-of-2. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 57b18a75d90e7728bc3dec11d7294f3aef44c9a6 Author: Sergey Matyukevich Date: Tue Aug 29 15:16:19 2017 +0300 qtnfmac: drop -D__CHECK_ENDIAN from cflags Flag -D__CHECK_ENDIAN was wrong: it should be -D__CHECK_ENDIAN__ instead. However now this flag is enabled by default, so it can be removed. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/Makefile | 4 ---- 1 file changed, 4 deletions(-) commit 309e8cda596f6552a32dd14b969ce9b17f837f2f Author: Ernesto A. Fernández Date: Thu Aug 31 07:53:15 2017 -0500 gfs2: preserve i_mode if __gfs2_set_acl() fails When changing a file's acl mask, __gfs2_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by only changing the inode mode after the acl has been set. Signed-off-by: Ernesto A. Fernández Signed-off-by: Bob Peterson fs/gfs2/acl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 8546137721a9f8bb0fe99d89558628f17344ad5c Author: Andy Shevchenko Date: Thu Aug 24 11:19:34 2017 +0300 pinctrl: intel: Decrease indentation in intel_gpio_set() Decrease indentation in intel_gpio_set() to make it looking slightly better and be in align with intel_gpio_get(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit cb715d0ad0ed8cbbf39a7fec303e9b6fa7fe6502 Author: Jacopo Mondi Date: Thu Aug 24 10:52:18 2017 +0200 pinctrl: rza1: Remove suffix from gpiochip label The OF node name already contains the gpio chip identifier, no need to append it when creating the label. The following debug message clearly shows the suffix is not required "pinctrl-rza1 fcfe3000.pin-controller: Parsed gpiochip gpio-0-0 with 6 pins" Signed-off-by: Jacopo Mondi Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rza1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54aae14beee6a6e9f72358f1873b3e497029c41d Author: Ernesto A. Fernández Date: Wed Aug 30 07:26:30 2017 -0500 gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing The function __gfs2_xattr_set() will return -ENODATA when called to remove a xattr that does not exist. The result is that setfacl will show an exit status of 1 when called to set only a file's mode bits (on a file with no ACLs), despite succeeding. A "No data available" error will be printed as well. To fix this return 0 instead, except when the XATTR_REPLACE flag is set, in which case -ENODATA is appropriate. This is consistent with how most other xattr setting functions work, in other filesystems. Signed-off-by: Ernesto A. Fernández Signed-off-by: Bob Peterson fs/gfs2/xattr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8eb19e8e7c8658226d8b7e75728e6dfa2ef32717 Author: Matan Barak Date: Thu Aug 3 16:07:07 2017 +0300 IB/core: Expose ioctl interface through experimental Kconfig Add CONFIG_INFINIBAND_EXP_USER_ACCESS that enables the ioctl interface. This interface is experimental and is subject to change. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 9 +++++++++ drivers/infiniband/core/uverbs.h | 2 ++ drivers/infiniband/core/uverbs_main.c | 6 ++++++ 3 files changed, 17 insertions(+) commit 524271129401ed896dc76e49acdbafc506cb41ac Author: Matan Barak Date: Thu Aug 3 16:07:06 2017 +0300 IB/core: Assign root to all drivers In order to use the parsing tree, we need to assign the root to all drivers. Currently, we just assign the default parsing tree via ib_uverbs_add_one. The driver could override this by assigning a parsing tree prior to registering the device. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_main.c | 18 ++++++++++++++++++ include/rdma/uverbs_ioctl.h | 12 ++++++++++++ include/rdma/uverbs_std_types.h | 14 ++++++++++++++ 4 files changed, 45 insertions(+) commit 9ee79fce364216df35ec46e26d20780c3c1644cc Author: Matan Barak Date: Thu Aug 3 16:07:05 2017 +0300 IB/core: Add completion queue (cq) object actions Adding CQ ioctl actions: 1. create_cq 2. destroy_cq This requires adding the following: 1. A specification describing the method a. Handler b. Attributes specification Each attribute is one of the following: a. PTR_IN - input data Note: This could be encoded inlined for data < 64bit b. PTR_OUT - response data c. IDR - idr based object d. FD - fd based object Blobs attributes (clauses a and b) contain their type, while objects specifications (clauses c and d) contains the expected object type (for example, the given id should be UVERBS_TYPE_PD) and the required access (READ, WRITE, NEW or DESTROY). If a NEW is required, the new object's id will be assigned to this attribute. All attributes could get UA_FLAGS attribute. Currently we support stating that an attribute is mandatory or that the specification size corresponds to a lower bound (and that this attribute could be extended). We currently add both default attributes and the two generic UHW_IN and UHW_OUT driver specific attributes. 2. Handler A handler gets a uverbs_attr_bundle. The handler developer uses uverbs_attr_get to fetch an attribute of a given id. Each of these attribute groups correspond to the specification group defined in the action (clauses 1.b and 1.c respectively). The indices of these arrays corresponds to the attribute ids declared in the specifications (clause 2). The handler is quite simple. It assumes the infrastructure fetched all objects and locked, created or destroyed them as required by the specification. Pointer (or blob) attributes were validated to match their required sizes. After the handler finished, the infrastructure commits or rollbacks the objects. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 138 ++++++++++++++++++++++++++++- include/uapi/rdma/ib_user_ioctl_verbs.h | 20 +++++ 2 files changed, 157 insertions(+), 1 deletion(-) commit d70724f149b107f8e4062320270d3d8b6713a1bb Author: Matan Barak Date: Thu Aug 3 16:07:04 2017 +0300 IB/core: Add legacy driver's user-data In this phase, we don't want to change all the drivers to use flexible driver's specific attributes. Therefore, we add two default attributes: UHW_IN and UHW_OUT. These attributes are optional in some methods and they encode the driver specific command data. We add a function that extract this data and creates the legacy udata over it. Driver's data should start from UVERBS_UDATA_DRIVER_DATA_FLAG. This turns on the first bit of the namespace, indicating this attribute belongs to the driver's namespace. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 40 ++++++++++++++++++++++++++ include/rdma/uverbs_ioctl.h | 46 ++++++++++++++++++++++++++++++ include/uapi/rdma/ib_user_ioctl_verbs.h | 10 +++++++ 3 files changed, 96 insertions(+) commit 64b19e1323e96c34af7ca90d1954e70890c7a98e Author: Matan Barak Date: Thu Aug 3 16:07:03 2017 +0300 IB/core: Export ioctl enum types to user-space Add a new ib_user_ioctl_verbs.h which exports all required ABI enums and structs to the user-space. Export the default types to user-space through this file. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford include/rdma/uverbs_std_types.h | 18 +---------- include/uapi/rdma/ib_user_ioctl_verbs.h | 54 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 17 deletions(-) commit 4da70da23e9ba03f7f9e067fbe0eec6ebbfee401 Author: Matan Barak Date: Thu Aug 3 16:07:02 2017 +0300 IB/core: Explicitly destroy an object while keeping uobject When some objects are destroyed, we need to extract their status at destruction. After object's destruction, this status (e.g. events_reported) relies in the uobject. In order to have the latest and correct status, the underlying object should be destroyed, but we should keep the uobject alive and read this information off the uobject. We introduce a rdma_explicit_destroy function. This function destroys the class type object (for example, the IDR class type which destroys the underlying object as well) and then convert the uobject to be of a null class type. This uobject will then be destroyed as any other uobject once uverbs_finalize_object[s] is called. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 35 +++++++++++++++++++++++++++++++++++ include/rdma/uverbs_types.h | 1 + 2 files changed, 36 insertions(+) commit 3541030650c0ddb5d52163082fee427b2a453799 Author: Matan Barak Date: Thu Aug 3 16:07:01 2017 +0300 IB/core: Add macros for declaring methods and attributes This patch adds macros for declaring objects, methods and attributes. These definitions are later used by downstream patches to declare some of the default types. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford include/rdma/uverbs_ioctl.h | 105 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) commit 118620d3686b2d624f9a5019f2f14c64cf50d21a Author: Matan Barak Date: Thu Aug 3 16:07:00 2017 +0300 IB/core: Add uverbs merge trees functionality Different drivers support different features and even subset of the common uverbs implementation. Currently, this is handled as bitmask in every driver that represents which kind of methods it supports, but doesn't go down to attributes granularity. Moreover, drivers might want to add their specific types, methods and attributes to let their user-space counter-parts be exposed to some more efficient abstractions. It means that existence of different features is validated syntactically via the parsing infrastructure rather than using a complex in-handler logic. In order to do that, we allow defining features and abstractions as parsing trees. These per-feature parsing tree could be merged to an efficient (perfect-hash based) parsing tree, which is later used by the parsing infrastructure. To sum it up, this makes a parse tree unique for a device and represents only the features this particular device supports. This is done by having a root specification tree per feature. Before a device registers itself as an IB device, it merges all these trees into one parsing tree. This parsing tree is used to parse all user-space commands. A future user-space application could read this parse tree. This tree represents which objects, methods and attributes are supported by this device. This is based on the idea of Jason Gunthorpe Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/uverbs_ioctl_merge.c | 665 +++++++++++++++++++++++++++ include/rdma/uverbs_ioctl.h | 40 +- 3 files changed, 706 insertions(+), 2 deletions(-) commit 09e3ebf8c193d3f154c4ffb7cb18995df0243bc6 Author: Matan Barak Date: Thu Aug 3 16:06:59 2017 +0300 IB/core: Add DEVICE object and root tree structure This adds the DEVICE object. This object supports creating the context that all objects are created from. Moreover, it supports executing methods which are related to the device itself, such as QUERY_DEVICE. This is a singleton object (per file instance). All standard objects are put in the root structure. This root will later on be used in drivers as the source for their whole parsing tree. Later on, when new features are added, these drivers could mix this root with other customized objects. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 17 +++++++++++++++ include/rdma/uverbs_ioctl.h | 35 ++++++++++++++++++++++++++++++ include/rdma/uverbs_std_types.h | 18 +++++++++++++++ 3 files changed, 70 insertions(+) commit 5009010fbf54bdc27e57baca490e1f9d6a4609e0 Author: Matan Barak Date: Thu Aug 3 16:06:58 2017 +0300 IB/core: Declare an object instead of declaring only type attributes Switch all uverbs_type_attrs_xxxx with DECLARE_UVERBS_OBJECT macros. This will be later used in order to embed the object specific methods in the objects as well. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 112 +++++++++++++---------------- include/rdma/uverbs_ioctl.h | 16 +++++ include/rdma/uverbs_std_types.h | 40 +++++------ include/rdma/uverbs_types.h | 38 ++++++---- 4 files changed, 107 insertions(+), 99 deletions(-) commit fac9658cabb98afb68ef1630c558864e6f559c07 Author: Matan Barak Date: Thu Aug 3 16:06:57 2017 +0300 IB/core: Add new ioctl interface In this ioctl interface, processing the command starts from properties of the command and fetching the appropriate user objects before calling the handler. Parsing and validation is done according to a specifier declared by the driver's code. In the driver, all supported objects are declared. These objects are separated to different object namepsaces. Dividing objects to namespaces is done at initialization by using the higher bits of the object ids. This initialization can mix objects declared in different places to one parsing tree using in this ioctl interface. For each object we list all supported methods. Similarly to objects, methods are separated to method namespaces too. Namespacing is done similarly to the objects case. This could be used in order to add methods to an existing object. Each method has a specific handler, which could be either a default handler or a driver specific handler. Along with the handler, a bunch of attributes are specified as well. Similarly to objects and method, attributes are namespaced and hashed by their ids at initialization too. All supported attributes are subject to automatic fetching and validation. These attributes include the command, response and the method's related objects' ids. When these entities (objects, methods and attributes) are used, the high bits of the entities ids are used in order to calculate the hash bucket index. Then, these high bits are masked out in order to have a zero based index. Since we use these high bits for both bucketing and namespacing, we get a compact representation and O(1) array access. This is mandatory for efficient dispatching. Each attribute has a type (PTR_IN, PTR_OUT, IDR and FD) and a length. Attributes could be validated through some attributes, like: (*) Minimum size / Exact size (*) Fops for FD (*) Object type for IDR If an IDR/fd attribute is specified, the kernel also states the object type and the required access (NEW, WRITE, READ or DESTROY). All uobject/fd management is done automatically by the infrastructure, meaning - the infrastructure will fail concurrent commands that at least one of them requires concurrent access (WRITE/DESTROY), synchronize actions with device removals (dissociate context events) and take care of reference counting (increase/decrease) for concurrent actions invocation. The reference counts on the actual kernel objects shall be handled by the handlers. objects +--------+ | | | | methods +--------+ | | ns method method_spec +-----+ |len | +--------+ +------+[d]+-------+ +----------------+[d]+------------+ |attr1+-> |type | | object +> |method+-> | spec +-> + attr_buckets +-> |default_chain+--> +-----+ |idr_type| +--------+ +------+ |handler| | | +------------+ |attr2| |access | | | | | +-------+ +----------------+ |driver chain| +-----+ +--------+ | | | | +------------+ | | +------+ | | | | | | | | | | | | | | | | | | | | +--------+ [d] = Hash ids to groups using the high order bits The right types table is also chosen by using the high bits from the ids. Currently we have either default or driver specific groups. Once validation and object fetching (or creation) completed, we call the handler: int (*handler)(struct ib_device *ib_dev, struct ib_uverbs_file *ufile, struct uverbs_attr_bundle *ctx); ctx bundles attributes of different namespaces. Each element there is an array of attributes which corresponds to one namespaces of attributes. For example, in the usually used case: ctx core +----------------------------+ +------------+ | core: +---> | valid | +----------------------------+ | cmd_attr | | driver: | +------------+ |----------------------------+--+ | valid | | | cmd_attr | | +------------+ | | valid | | | obj_attr | | +------------+ | | drivers | +------------+ +> | valid | | cmd_attr | +------------+ | valid | | cmd_attr | +------------+ | valid | | obj_attr | +------------+ Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/rdma_core.c | 46 +++++ drivers/infiniband/core/rdma_core.h | 5 + drivers/infiniband/core/uverbs_ioctl.c | 364 +++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 2 + include/rdma/uverbs_ioctl.h | 101 ++++++++- include/uapi/rdma/rdma_user_ioctl.h | 33 +++ 7 files changed, 543 insertions(+), 10 deletions(-) commit 14d6c3a83fbcd9c3d19e24d8d5820a912f2615c9 Author: Adit Ranadive Date: Tue Aug 29 15:51:30 2017 -0700 RDMA/vmw_pvrdma: Fix a signedness Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Adit Ranadive Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72f9b089ecd2cc2194d27cbb14fd80a0b1472e89 Author: Aditya Sarwade Date: Tue Aug 29 15:51:29 2017 -0700 RDMA/vmw_pvrdma: Report network header type in WC We should report the network header type in the work completion so that the kernel can infer the right RoCE type headers. Reviewed-by: Bryan Tan Signed-off-by: Aditya Sarwade Signed-off-by: Adit Ranadive Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 1 + include/uapi/rdma/vmw_pvrdma-abi.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 79364227e6b4923478e99d8480d62482b588ef84 Author: Roland Dreier Date: Tue Aug 29 10:34:44 2017 -0700 IB/core: Add might_sleep() annotation to ib_init_ah_from_wc() For RoCE, ib_init_ah_from_wc() can follow the path ib_init_ah_from_wc() -> rdma_addr_find_l2_eth_by_grh() -> rdma_resolve_ip() and rdma_resolve_ip() will sleep in kzalloc() and wait_for_completion(). However, developers will not see any warnings if they use ib_init_ah_from_wc() in an atomic context and test only on IB, because the function doesn't sleep in that case. Add a might_sleep() so that lockdep will catch bugs no matter what hardware is used to test. Signed-off-by: Roland Dreier Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit c76161181193985087cd716fdf69b5cb6cf9ee85 Author: Roland Dreier Date: Tue Aug 29 10:34:43 2017 -0700 IB/cm: Fix sleeping in atomic when RoCE is used A couple of places in the CM do spin_lock_irq(&cm_id_priv->lock); ... if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) However when the underlying transport is RoCE, this leads to a sleeping function being called with the lock held - the callchain is cm_alloc_response_msg() -> ib_create_ah_from_wc() -> ib_init_ah_from_wc() -> rdma_addr_find_l2_eth_by_grh() -> rdma_resolve_ip() and rdma_resolve_ip() starts out by doing req = kzalloc(sizeof *req, GFP_KERNEL); not to mention rdma_addr_find_l2_eth_by_grh() doing wait_for_completion(&ctx.comp); to wait for the task that rdma_resolve_ip() queues up. Fix this by moving the AH creation out of the lock. Signed-off-by: Roland Dreier Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 63 +++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 19 deletions(-) commit 773b79f7a7c7839fb9d09c0e206734173a8b0a6b Author: Vitaly Kuznetsov Date: Wed Aug 2 18:09:21 2017 +0200 tracing/hyper-v: Trace hyperv_mmu_flush_tlb_others() Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger Reviewed-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Haiyang Zhang Cc: Jork Loeser Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Simon Xiao Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20170802160921.21791-10-vkuznets@redhat.com Signed-off-by: Ingo Molnar MAINTAINERS | 1 + arch/x86/hyperv/mmu.c | 7 +++++++ arch/x86/include/asm/trace/hyperv.h | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 628f54cc6451d2706ba8a56763dbf93be02aaa80 Author: Vitaly Kuznetsov Date: Wed Aug 2 18:09:20 2017 +0200 x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger Cc: Andy Lutomirski Cc: Haiyang Zhang Cc: Jork Loeser Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Simon Xiao Cc: Steven Rostedt Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20170802160921.21791-9-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/hyperv/mmu.c | 133 ++++++++++++++++++++++++++++++++++++- arch/x86/include/uapi/asm/hyperv.h | 10 +++ 2 files changed, 140 insertions(+), 3 deletions(-) commit 3e83dfd5d8e374328078f527f1f7d189824896ab Merge: 3308376 9e52fc2 Author: Ingo Molnar Date: Thu Aug 31 14:20:06 2017 +0200 Merge branch 'x86/mm' into x86/platform, to pick up TLB flush dependency Signed-off-by: Ingo Molnar commit 69fecf599f48e258984b2ffdf0a4c65a35a31287 Author: Lior David Date: Mon Aug 28 22:18:47 2017 +0300 wil6210: ensure P2P device is stopped before removing interface User space can remove the P2P management interface while it is active (for example, while listen/search is active) and this can cause a crash. Ensure the P2P device is fully stopped before removing. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 57 +++++++++++++++-------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit d83ad4c4fd78b22935711f865048bab78b43fc86 Author: Lior David Date: Mon Aug 28 22:18:46 2017 +0300 wil6210: increase connect timeout Connect can take longer than current timeout in some scenarios, for example with long-range antenna array. Increase the timeout to support these scenarios. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7086d861753bc0aaa8b6445f657d8e39953e4fcd Author: Dedy Lansky Date: Mon Aug 28 22:18:45 2017 +0300 wil6210: clear PAL_UNIT_ICR part of device reset When FW starts running it can get D0 to D3 interrupt that is a leftover from previous system suspend while FW was not running. As this interrupt is not relevant anymore, clear it part of device reset procedure. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 2 ++ drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 3 insertions(+) commit 1490846d256af947a4743f04ba8c97dc3bc37073 Author: Dedy Lansky Date: Mon Aug 28 22:18:44 2017 +0300 wil6210: move pre-FW configuration to separate function Re-arrange the code to have dedicated function for device configuration which takes place before FW starts running. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) commit 761f8e4d463e1cbf6da0d228bc74cecc800d4de5 Author: Lazar Alexei Date: Mon Aug 28 22:18:43 2017 +0300 wil6210: align to latest auto generated wmi.h Align to latest version of the auto generated wmi file describing the interface with FW. Signed-off-by: Lazar Alexei Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.h | 714 ++++++++++++++++++++++----------- 1 file changed, 475 insertions(+), 239 deletions(-) commit 5f591dac9f20f76439df2e18570765d384a94070 Author: Gidon Studinski Date: Mon Aug 28 22:18:42 2017 +0300 wil6210: make debugfs compilation optional Since debugfs is a kernel configuration option, enable the driver to compile without debugfs. Signed-off-by: Gidon Studinski Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/Kconfig | 12 ++++++++++++ drivers/net/wireless/ath/wil6210/Makefile | 2 +- drivers/net/wireless/ath/wil6210/wil6210.h | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) commit 40cbd88be702a2455b6e047dc13f5d51ed542063 Author: Lior David Date: Mon Aug 28 22:18:41 2017 +0300 wil6210: ratelimit errors in TX/RX interrupts Sometimes there is a firmware crash but the hardware is not fully stopped and continue to send TX/RX interrupts. This can cause an overload of messages which can bring the host down. Add ratelimit to these error messages to fix this. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Author: Hauke Mehrtens Date: Thu Aug 24 23:06:41 2017 +0200 ath10k: activate user space firmware loading again In commit 9f5bcfe93315 ("ath10k: silence firmware file probing warnings") the firmware loading was changed from request_firmware() to request_firmware_direct() to silence some warnings in case it fails. request_firmware_direct() directly searches in the file system only and does not send a hotplug event to user space in case it could not find the firmware directly. In LEDE we use a user space script to extract the calibration data from the flash memory which gets triggered by the hotplug event. This way the firmware gets extracted from some vendor specific partition when the driver requests this firmware. This mechanism does not work any more after this change. Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings") Signed-off-by: Hauke Mehrtens Cc: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30b83fff6d977da43b103e1ae9b5c67956b0ebda Author: Erik Stromdahl Date: Wed Aug 23 21:32:58 2017 +0200 ath10k: sdio: remove unused struct member irq_wq in struct ath10k_sdio is a remnant from an earlier version of the sdio patchset. Its use was removed as a result of Kalle's review, but somehow the struct member survived. It is not used and can therefore safely be removed. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/sdio.c | 4 ---- drivers/net/wireless/ath/ath10k/sdio.h | 2 -- 2 files changed, 6 deletions(-) commit c9353bf483d3724c116a9d502c0ead9cec54a61a Author: Ryan Hsu Date: Tue Aug 22 14:44:02 2017 -0700 ath10k: fix napi_poll budget overflow In napi_poll, the budget number is used to control the amount of packets we should handle per poll to balance the resource in the system. In the list of the amsdu packets reception, we check if there is budget count left and handle the complete list of the packets, that it will have chances the very last list will over the budget leftover. So adding one more parameter - budget_left, this would help while traversing the list to avoid handling more than the budget given. Reported-by: Andrey Ryabinin Fix-suggested-by: Igor Mitsyanko Link: https://lkml.kernel.org/r/26670dce-4dd2-f8e4-0e14-90d74257e739@virtuozzo.com Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 93b2d3cf3733b4060d3623161551f51ea1ab5499 Author: Paul Mackerras Date: Wed Aug 30 14:12:24 2017 +1000 powerpc: Correct instruction code for xxlor instruction The instruction code for xxlor that commit 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()", 2010-06-15) added is actually the code for xxlnor. It is used in get_vsr() and put_vsr() and the effect of the error is that if emulate_step is used to emulate a VSX load or store from any register other than vsr0, the bitwise complement of the correct value will be loaded or stored. This corrects the error. Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()") Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9effe925039cf54489b5c04e0d40073bb3a123d Author: Michael Ellerman Date: Thu Aug 24 20:49:57 2017 +1000 powerpc: Fix DAR reporting when alignment handler faults Anton noticed that if we fault part way through emulating an unaligned instruction, we don't update the DAR to reflect that. The DAR value is eventually reported back to userspace as the address in the SEGV signal, and if userspace is using that value to demand fault then it can be confused by us not setting the value correctly. This patch is ugly as hell, but is intended to be the minimal fix and back ports easily. Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman Reviewed-by: Paul Mackerras arch/powerpc/kernel/align.c | 119 +++++++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 45 deletions(-) commit 4e83ac4cfbde6b300f31f9460b96c67664a792ce Author: Fenglin Wu Date: Wed Jul 19 14:39:55 2017 +0800 pinctrl: qcom: spmi-gpio: Correct power_source range check Power source selection in DIG_VIN_CTL is indexed from 0, in the range check it shouldn't be equal to the total number of power sources. Signed-off-by: Fenglin Wu Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72c7c78e68d1e509c19bade5496d9d55d81699a5 Author: Arvind Yadav Date: Wed Aug 23 21:45:09 2017 +0530 gpio: pl061: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/gpio/gpio-pl061.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae9d7f83a58d94380a05efd796da0373bcb9fb04 Author: Bhumika Goyal Date: Wed Aug 23 19:19:12 2017 +0530 pinctrl: freescale: make mxs_regs const Make these const as they are only stored in the const field of a mxs_pinctrl_soc_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx23.c | 2 +- drivers/pinctrl/freescale/pinctrl-imx28.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c95c895303ed13e883e0e6386e0b978174329210 Author: David Hildenbrand Date: Wed Aug 30 18:06:02 2017 +0200 KVM: s390: vsie: cleanup mcck reinjection The machine check information is part of the vsie_page. Signed-off-by: David Hildenbrand Message-Id: <20170830160603.5452-4-david@redhat.com> Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/vsie.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3dbf0205b18c9db9ee86d886c94e731cc1fa7f09 Author: David Hildenbrand Date: Wed Aug 30 18:06:01 2017 +0200 KVM: s390: use WARN_ON_ONCE only for checking Move the real logic that always has to be executed out of the WARN_ON_ONCE. Signed-off-by: David Hildenbrand Message-Id: <20170830160603.5452-3-david@redhat.com> Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8149fc07724a1eee65d772749935bd923ae4f686 Author: David Hildenbrand Date: Wed Aug 30 18:06:00 2017 +0200 KVM: s390: guestdbg: fix range check Looks like the "overflowing" range check is wrong. |=======b-------a=======| addr >= a || addr <= b Signed-off-by: David Hildenbrand Message-Id: <20170830160603.5452-2-david@redhat.com> Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/guestdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dea110501745734baf7a90dc1e1b50481ade6191 Author: Ryan Lee Date: Mon Aug 28 16:31:01 2017 -0700 ASoC: max98927: Changed device property read function Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 607f7777bf0c0224bfadd31a37acc8d1fd25324d Author: Ryan Lee Date: Mon Aug 28 16:31:00 2017 -0700 ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit f81991ddd001981bbe4ea0d25f88a4f95fb018be Author: Ryan Lee Date: Mon Aug 28 16:30:59 2017 -0700 ASoC: max98927: Added PM suspend and resume function Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 848844b87a26265019215dbb7fb588a5fac0a110 Author: Ryan Lee Date: Mon Aug 28 16:30:58 2017 -0700 ASoC: max98927: Modified chip default register values Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 01c6f1b5c832b75af5d34555201050db896285a8 Author: Ryan Lee Date: Mon Aug 28 16:30:56 2017 -0700 ASoC: max98927: Added missing \n to end of dev_err messages Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9c1743ebe0da614517a1b94f171924d5fd758df4 Author: Ryan Lee Date: Mon Aug 28 16:30:55 2017 -0700 ASoC: max98927: Updated volatile register list Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5241bd16c7576de3cf189e3e40b01bd4fa10f803 Author: Andrew Jeffery Date: Wed Aug 23 23:11:25 2017 +0930 pinctrl: aspeed: Rework strap register write logic for the AST2500 Yong Li found that writes to the AST2500 strapping register were not properly supported by the Aspeed pinctrl core and provided a patch to rectify the problem. Several revisions of the patch were posted and ultimately v4 should have been applied, however some unfortunate liberal application of tags on my part lead to confusion between v3[1] and v4[2]. Generate the diff between v3 and v4 to apply as a fixup patch. [1] http://patchwork.ozlabs.org/patch/801662/ [2] http://patchwork.ozlabs.org/patch/802946/ Cc: Yong Li Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit faaaba065298faeb62ea83cd3a1cc19764becab1 Author: Dan Carpenter Date: Fri Aug 18 13:32:48 2017 +0300 pinctrl: rza1: off by one in rza1_parse_gpiochip() The rza1_pctl->ports[] array has RZA1_NPORTS (12) elements. The > here should be >= to prevent an out of bounds access. Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller") Signed-off-by: Dan Carpenter Reviewed-by: Geert Uytterhoeven Acked-by: Jacopo Mondi Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rza1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0515760fa1159ffa863c7b2b73466aaff7d11a80 Author: Christophe Jaillet Date: Thu Aug 31 06:40:42 2017 +0200 ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()' If 'clk_prepare_enable()' fails, we must release some resources before returning. Add a new label in the existing error handling path and 'goto' there. Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET Acked-by: Alexandre Belloni Signed-off-by: Mark Brown sound/atmel/ac97c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 795c633f60936fd1ea0e4ef50e5a7534dd9fb74c Author: Jerome Brunet Date: Thu Aug 31 11:29:58 2017 +0200 mmc: meson-gx: fix __ffsdi2 undefined on arm32 Using __bf_shf does not compile on arm 32 architecture. This has gone unnoticed till now cause the driver is only used on arm64. In addition, __bf_shf was already used in the driver without any issue. It was used on a constant value, so the call was probably optimized away. Replace __bf_shf by __ffs fixes the problem Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit afb5519fdb346201728040cab4e08ce53e7ff4fd Author: John Allen Date: Wed Aug 23 12:18:43 2017 -0500 powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs Check if an LMB is assigned before attempting to call dlpar_acquire_drc in order to avoid any unnecessary rtas calls. This substantially reduces the running time of memory hot add on lpars with large amounts of memory. [mpe: We need to explicitly set rc to 0 in the success case, otherwise the compiler might think we use rc without initialising it.] Fixes: c21f515c7436 ("powerpc/pseries: Make the acquire/release of the drc for memory a seperate step") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0982adc746736a313dac9cb8cc936ca51ca3741a Author: Naoya Horiguchi Date: Mon Aug 28 16:30:59 2017 +0900 x86/boot/KASLR: Work around firmware bugs by excluding EFI_BOOT_SERVICES_* and EFI_LOADER_* from KASLR's choice There's a potential bug in how we select the KASLR kernel address n the early boot code. The KASLR boot code currently chooses the kernel image's physical memory location from E820_TYPE_RAM regions by walking over all e820 entries. E820_TYPE_RAM includes EFI_BOOT_SERVICES_CODE and EFI_BOOT_SERVICES_DATA as well, so those regions can end up hosting the kernel image. According to the UEFI spec, all memory regions marked as EfiBootServicesCode and EfiBootServicesData are available as free memory after the first call to ExitBootServices(). I.e. so such regions should be usable for the kernel, per spec. In real life however, we have workarounds for broken x86 firmware, where we keep such regions reserved until SetVirtualAddressMap() is done. See the following code in should_map_region(): static bool should_map_region(efi_memory_desc_t *md) { ... /* * Map boot services regions as a workaround for buggy * firmware that accesses them even when they shouldn't. * * See efi_{reserve,free}_boot_services(). */ if (md->type =3D=3D EFI_BOOT_SERVICES_CODE || md->type =3D=3D EFI_BOOT_SERVICES_DATA) return false; This workaround suppressed a boot crash, but potential issues still remain because no one prevents the regions from overlapping with kernel image by KASLR. So let's make sure that EFI_BOOT_SERVICES_{CODE|DATA} regions are never chosen as kernel memory for the workaround to work fine. Furthermore, EFI_LOADER_{CODE|DATA} regions are also excluded because they can be used after ExitBootServices() as defined in EFI spec. As a result, we choose kernel address only from EFI_CONVENTIONAL_MEMORY which is the only memory type we know to be safely free. Signed-off-by: Naoya Horiguchi Cc: Ard Biesheuvel Cc: Baoquan He Cc: Junichi Nomura Cc: Kees Cook Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: fanc.fnst@cn.fujitsu.com Cc: izumi.taku@jp.fujitsu.com Link: http://lkml.kernel.org/r/20170828074444.GC23181@hori1.linux.bs1.fc.nec.co.jp [ Rewrote/fixed/clarified the changelog and the in code comments. ] Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 7def9a2418430a8af2a56023769ccdcdea7cd7e1 Author: Arvind Yadav Date: Wed Aug 30 22:18:20 2017 +0530 powerpc/4xx: Constify cpm_suspend_ops struct 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: Michael Ellerman arch/powerpc/platforms/4xx/cpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fce4b371fe5c99a9c05db8493d72f0d1a474ab26 Author: Sean Young Date: Wed Aug 23 11:06:04 2017 -0400 media: serial_ir: fix tx timing calculation on 32-bit Move the calculation to where it is needed, so the result doesn't need to be stored in the device struct. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/serial_ir.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit 766cbb31893108850f898fa3616d57c59b584354 Author: Sean Young Date: Fri Aug 25 10:45:47 2017 -0400 media: rc: gpio-ir-tx: use ktime accessor functions Prefer using accessor functions so we are not dependent on the ktime_t type. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-tx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 800846c4d92f538c6640f83d9f9c0f44dac8ada7 Author: Jasmin Jessich Date: Fri Aug 25 05:59:41 2017 -0400 media: rc: use ktime accessor functions Prefer using accessor functions so we are not dependent on the ktime_t type. Signed-off-by: Jasmin Jessich Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-ir-raw.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2c7710847c444d22e0dd7f843fdbf892304e1cae Author: Vinay Simha BN Date: Wed Aug 16 11:32:17 2017 +0530 pinctrl: qcom: General Purpose clocks for apq8064 Add support for general purpose (GP) clocks for apq8064 DT binding documentation updated for qcom,apq8064-pinctrl general purpose (GP) clocks. Signed-off-by: Vinay Simha BN Acked-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,apq8064-pinctrl.txt | 3 +- drivers/pinctrl/qcom/pinctrl-apq8064.c | 42 ++++++++++++++++++---- 2 files changed, 38 insertions(+), 7 deletions(-) commit 88faae2c2e35c88a806c052a7fc20948211b0895 Author: Ian W MORRISON Date: Thu Aug 31 08:35:47 2017 +1000 ASoC: rt5645: Add jack detection workaround for MINIX Z83-4 based devices The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices requires jd_mode=3 to make the jack detection work. Using a BIOS DMI product of "Z83-4" will match both devices of 'NEO Z83-4' and 'Z83-4 Pro'. Signed-off-by: Ian W Morrison Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 19b0fa11bb1c0c24296c9f670a37c091bd3c815d Author: Peter Ujfalusi Date: Thu Aug 31 11:49:47 2017 +0300 ASoC: tlv320aic3x: Support for OCMV configuration In aic3x class of devices Output Common-Mode Voltage can be configured for better analog performance. The OCMV value depends on the Analog and digital domain power supply voltage configuration. The default OCMV of 1.35V gives best performance when AVDD is around 2.7V and DVDD is 1.525V, but for higher AVDD/DVDD higher OCMV setting is recommended. The patch gives an automatic way of guessing the best OCMV which can be overwritten by a DT parameter if needed. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown .../devicetree/bindings/sound/tlv320aic3x.txt | 5 +++ sound/soc/codecs/tlv320aic3x.c | 45 ++++++++++++++++++++++ sound/soc/codecs/tlv320aic3x.h | 8 ++++ 3 files changed, 58 insertions(+) commit 594a30fb12424717a41c62323d2a8bf167dbccad Author: Hans de Goede Date: Wed Aug 30 12:58:11 2017 +0200 x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature When booting 4.13 on a VirtualBox VM on a Skylake host the following error shows up in the logs: [ 0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0xb2 (or later) This is caused by apic_check_deadline_errata() only checking CPU model and not the X86_FEATURE_TSC_DEADLINE_TIMER flag (which VirtualBox does NOT export to the guest), combined with VirtualBox not exporting the micro-code version to the guest. This commit adds a check for X86_FEATURE_TSC_DEADLINE_TIMER to apic_check_deadline_errata(), silencing this error on VirtualBox VMs. Signed-off-by: Hans de Goede Acked-by: Thomas Gleixner Cc: Frank Mehnert Cc: Linus Torvalds Cc: Michael Thayer Cc: Michal Necasek Cc: Peter Zijlstra Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata") Link: http://lkml.kernel.org/r/20170830105811.27539-1-hdegoede@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9e52fc2b50de3a1c08b44f94c610fbe998c0031a Author: Vitaly Kuznetsov Date: Mon Aug 28 10:22:51 2017 +0200 x86/mm: Enable RCU based page table freeing (CONFIG_HAVE_RCU_TABLE_FREE=y) There's a subtle bug in how some of the paravirt guest code handles page table freeing on x86: On x86 software page table walkers depend on the fact that remote TLB flush does an IPI: walk is performed lockless but with interrupts disabled and in case the page table is freed the freeing CPU will get blocked as remote TLB flush is required. On other architectures which don't require an IPI to do remote TLB flush we have an RCU-based mechanism (see include/asm-generic/tlb.h for more details). In virtualized environments we may want to override the ->flush_tlb_others callback in pv_mmu_ops and use a hypercall asking the hypervisor to do a remote TLB flush for us. This breaks the assumption about IPIs. Xen PV has been doing this for years and the upcoming remote TLB flush for Hyper-V will do it too. This is not safe, as software page table walkers may step on an already freed page. Fix the bug by enabling the RCU-based page table freeing mechanism, CONFIG_HAVE_RCU_TABLE_FREE=y. Testing with kernbench and mmap/munmap microbenchmarks, and neither showed any noticeable performance impact. Suggested-by: Peter Zijlstra Signed-off-by: Vitaly Kuznetsov Acked-by: Peter Zijlstra Acked-by: Juergen Gross Acked-by: Kirill A. Shutemov Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jork Loeser Cc: KY Srinivasan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20170828082251.5562-1-vkuznets@redhat.com [ Rewrote/fixed/clarified the changelog. ] Signed-off-by: Ingo Molnar arch/x86/Kconfig | 1 + arch/x86/include/asm/tlb.h | 14 ++++++++++++++ arch/x86/mm/pgtable.c | 8 ++++---- 3 files changed, 19 insertions(+), 4 deletions(-) commit c054c8a0c3a8a7e2ec2d6d5a628821f3cb832538 Author: Takashi Iwai Date: Thu Aug 31 10:57:36 2017 +0200 ALSA: sh: Put missing KERN_* prefix sh audio driver prints its presence at probe function but a proper KERN_ prefix is missing. Put KERN_INFO there as it's merely an advertisement. Signed-off-by: Takashi Iwai sound/sh/sh_dac_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10304d71cbe19ccb47c6ad524405c8d9587b646c Author: Takashi Iwai Date: Thu Aug 31 11:00:20 2017 +0200 ALSA: usx2y: Put missing KERN_CONT prefix The usx2y driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai sound/usb/usx2y/usb_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5659f244584cf414aa08c2bcf4dfa52fd972df64 Author: Takashi Iwai Date: Thu Aug 31 10:59:12 2017 +0200 ALSA: usb-audio: Put missing KERN_CONT prefix The usb-audio driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai sound/usb/midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39e48d9b128abbd2ea9b8403bb1e2693323db2f4 Author: Jan Beulich Date: Thu Aug 31 01:30:19 2017 -0600 x86/mm: Use pr_cont() in dump_pagetable() The lack of newlines in preceding format strings is a clear indication that these were meant to be continuations of one another, and indeed output ends up quite a bit more compact (and readable) that way. Switch other plain printk()-s in the function instances to pr_info(), as requested. Signed-off-by: Jan Beulich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/59A7D72B0200007800175E4E@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/mm/fault.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 874b83d396bb41886e70876afe783a0d81d79583 Author: Takashi Iwai Date: Thu Aug 31 10:56:50 2017 +0200 ALSA: asihpi: Put missing KERN_CONT prefix The asihpi driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai sound/pci/asihpi/hpidebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07f070dda48c3c5b0a81d6b48b4d7c7de7341b12 Author: Takashi Iwai Date: Thu Aug 31 10:56:12 2017 +0200 ALSA: vx: Put missing KERN_CONT prefix The vx driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai sound/drivers/vx/vx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53cfa99e37010c9d270dc9f16054928d4e0716e6 Author: Takashi Iwai Date: Thu Aug 31 10:53:35 2017 +0200 ALSA: opl3: Put missing KERN_CONT prefix The opl3 driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai sound/drivers/opl3/opl3_midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d792a678c759b3b06af197c2c250cea13f9c57b Author: Thomas Gleixner Date: Thu Aug 31 10:22:06 2017 +0200 x86/idt: Remove the tracing IDT leftovers Stephen reported a merge conflict with the XEN tree. That also shows that the IDT cleanup forgot to remove the now unused trace_{trap} defines. Remove them. Reported-by: Stephen Rothwell Signed-off-by: Thomas Gleixner Cc: Juergen Gross arch/x86/include/asm/traps.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 8598112d04af21cf6c895670e72dcb8a9f58e74f Author: Steffen Klassert Date: Thu Aug 31 10:37:00 2017 +0200 xfrm: Fix return value check of copy_sec_ctx. A recent commit added an output_mark. When copying this output_mark, the return value of copy_sec_ctx is overwitten without a check. Fix this by copying the output_mark before the security context. Fixes: 077fbac405bf ("net: xfrm: support setting an output mark.") Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d01fd38a3b01ca2112a689d70f7ecec40d952ee Author: H. Nikolaus Schaller Date: Thu Aug 31 08:59:50 2017 +0200 power: supply: bq27xxx: enable writing capacity values for bq27421 Tested on Pyra prototype with bq27421. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 4 ---- 1 file changed, 4 deletions(-) commit 96d91431d6915073c539c8bdd439b4c863148fc1 Author: Oliver O'Halloran Date: Thu Jun 29 17:12:56 2017 +1000 powerpc/smp: Add Power9 scheduler topology In previous generations of Power processors each core had a private L2 cache. The Power 9 processor has a slightly different design where the L2 cache is shared among pairs of cores rather than being completely private. Making the scheduler aware of this cache sharing allows the scheduler to make better migration decisions. For example, if two CPU heavy tasks share a core then one task can be migrated to the paired core to improve throughput. Under the existing three level topology the task could be migrated to any core on the same chip, while with the new topology it would be preferentially migrated to the paired core so it remains cache-hot. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit 41d32cfce1ae616413761d07986e1fb4b907e808 Author: Baolin Wang Date: Thu Aug 17 14:50:38 2017 +0800 pinctrl: sprd: Add Spreadtrum pin control driver This patch adds the pin control driver for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/sprd/Kconfig | 17 + drivers/pinctrl/sprd/Makefile | 2 + drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 972 ++++++++++++++++++++++++ drivers/pinctrl/sprd/pinctrl-sprd.c | 1113 ++++++++++++++++++++++++++++ drivers/pinctrl/sprd/pinctrl-sprd.h | 67 ++ 7 files changed, 2173 insertions(+) commit e6f3f66903fb9bf67d4f8062cbfb4712168970f9 Author: Baolin Wang Date: Thu Aug 17 14:50:37 2017 +0800 dt-bindings: pinctrl: Add DT bindings for Spreadtrum SC9860 This patch adds the binding documentation for Spreadtrum SC9860 pin controller device. Signed-off-by: Baolin Wang Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/sprd,pinctrl.txt | 83 ++++++++++++++++++++++ .../bindings/pinctrl/sprd,sc9860-pinctrl.txt | 70 ++++++++++++++++++ 2 files changed, 153 insertions(+) commit 6606bc9dee63ad8cda2cc310d2ad5992673a785a Author: Baolin Wang Date: Thu Aug 17 14:50:36 2017 +0800 pinctrl: Add sleep related state to indicate sleep related configs In some scenarios, we should set some pins as input/output/pullup/pulldown when the specified system goes into deep sleep mode, then when the system goes into deep sleep mode, these pins will be set automatically by hardware. That means some pins are not controlled by any specific driver in the OS, but need to be controlled when entering sleep mode. Thus we introduce one sleep state config into pinconf-generic for users to configure. Signed-off-by: Baolin Wang Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 2 ++ drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 2 ++ 3 files changed, 6 insertions(+) commit ca8febe8f91510022572c2238c49c69dac35adae Author: Ryder Lee Date: Fri Aug 18 11:48:05 2017 +0800 pinctrl: mediatek: update PCIe mux data for MT7623 MT2701 shares the same driver with MT7623, but there is a slight difference between their pin functions (e.g., PCIe), so we update the different parts in pinmux table. Doing so, SoC could choose the correct mux setting via their own pinfun.h. Signed-off-by: Ryder Lee Cc: Biao Huang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9e238e380c2a8aff21d37f713b5c24b079a726a5 Author: Linus Walleij Date: Thu Aug 31 07:58:17 2017 +0200 Revert "gpiolib: request the gpio before querying its direction" This reverts commit 108d23e322a247d9f89ba2e2742520ead0944cc9. It turns out this causes a regression on the OMAP, Marvell and Renesas. Reported-by: Tony Lindgren Reported-by: Thomas Petazzoni Reported-by: Jacopo Mondi Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 11 ----------- 1 file changed, 11 deletions(-) commit 47ebcc0bb1d5eb7f1b1eeab675409ea7f67b4a5c Author: Yossi Kuperman Date: Wed Aug 30 11:30:39 2017 +0300 xfrm: Add support for network devices capable of removing the ESP trailer In conjunction with crypto offload [1], removing the ESP trailer by hardware can potentially improve the performance by avoiding (1) a cache miss incurred by reading the nexthdr field and (2) the necessity to calculate the csum value of the trailer in order to keep skb->csum valid. This patch introduces the changes to the xfrm stack and merely serves as an infrastructure. Subsequent patch to mlx5 driver will put this to a good use. [1] https://www.mail-archive.com/netdev@vger.kernel.org/msg175733.html Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/ipv4/esp4.c | 70 ++++++++++++++++++++++++++++++++++----------------- net/ipv6/esp6.c | 51 ++++++++++++++++++++++++++----------- net/xfrm/xfrm_input.c | 5 ++++ 4 files changed, 89 insertions(+), 38 deletions(-) commit 4e903450bcb9a6bc90733b981d7cb8b3c4996a0e Author: Arnd Bergmann Date: Wed Aug 23 16:39:27 2017 +0200 clk: sunxi: fix uninitialized access gcc-8 reports an uninitialized variable access in a code path that we would see with incorrect DTB input: drivers/clk/sunxi/clk-sun8i-bus-gates.c: In function 'sun8i_h3_bus_gates_init': drivers/clk/sunxi/clk-sun8i-bus-gates.c:85:27: error: 'clk_parent' may be used uninitialized in this function [-Werror=maybe-uninitialized] This works around by skipping invalid input and printing a warning instead if it ever happens. The problem was apparently part of the initiali driver submission, but older compilers don't notice it. Fixes: ab6e23a4e388 ("clk: sunxi: Add H3 clocks support") Signed-off-by: Arnd Bergmann Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-sun8i-bus-gates.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2c606871f3d8e3cfd4a079081a7cd9aabdbba99a Author: Bhumika Goyal Date: Tue Aug 22 19:36:26 2017 +0530 clk: versatile: make clk_ops const Make this const as it is only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Acked-by: Liviu Dudau Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-vexpress-osc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit daeeb438c052e3763617c636943e07a8f3684e9e Author: Eugeniy Paltsev Date: Fri Aug 25 20:39:14 2017 +0300 ARC: clk: introduce HSDK pll driver HSDK board manages its clocks using various PLLs. These PLL have same dividers and corresponding control registers mapped to different addresses. So we add one common driver for such PLLs. Each PLL on HSDK board consists of three dividers: IDIV, FBDIV and ODIV. Output clock value is managed using these dividers. We add pre-defined tables with supported rate values and appropriate configurations of IDIV, FBDIV and ODIV for each value. As of today we add support for PLLs that generate clock for the HSDK arc cpus, system, ddr, AXI tunnel and hdmi. By this patch we add support for several plls (arc cpus pll and others), so we had to use two different init types: CLK_OF_DECLARE for arc cpus pll and regular probing for others plls. Signed-off-by: Eugeniy Paltsev Reviewed-by: Vineet Gupta Signed-off-by: Stephen Boyd .../bindings/clock/snps,hsdk-pll-clock.txt | 28 ++ MAINTAINERS | 6 + drivers/clk/Kconfig | 7 + drivers/clk/Makefile | 1 + drivers/clk/clk-hsdk-pll.c | 431 +++++++++++++++++++++ 5 files changed, 473 insertions(+) commit 59273246b2df45feaea05e1069914f8ec2120c8c Author: Arvind Yadav Date: Mon Aug 28 10:58:53 2017 +0530 clk: zte: constify clk_div_table clk_div_table are not supposed to change at runtime. All functions working with clk_div_table provided by work with const clk_div_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fdda6ee947cd4faf8d0d5bc4d9888f896358355d Author: Arvind Yadav Date: Mon Aug 28 10:58:52 2017 +0530 clk: imx: constify clk_div_table clk_div_table are not supposed to change at runtime. All functions working with clk_div_table provided by work with const clk_div_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6sl.c | 6 +++--- drivers/clk/imx/clk-imx6sx.c | 6 +++--- drivers/clk/imx/clk-imx6ul.c | 6 +++--- drivers/clk/imx/clk-imx7d.c | 4 ++-- drivers/clk/imx/clk-vf610.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) commit 9959989fc49d61f0c53524a3b95c55db7b7b9b3f Author: Kunihiko Hayashi Date: Mon Aug 28 18:57:23 2017 +0900 clk: uniphier: add ethernet clock control support Add clock control for ethernet controller on Pro4, PXs2, LD11 and LD20. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2839b1efebe8a1ce68780331f3150beba82590eb Author: Linus Walleij Date: Tue Aug 8 21:08:18 2017 +0200 clk: gemini: hands off PCI OE bit This bit is pin control, and needs to be carefully managed by the new pin control driver. Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/clk-gemini.c | 7 ------- 1 file changed, 7 deletions(-) commit 56d877764112af89aebb17e831c579827f006df0 Author: Arvind Yadav Date: Mon Aug 28 12:32:41 2017 +0530 clk: ux500: prcc: constify clk_ops. clk_ops are not supposed to change at runtime. All functions working with clk_ops provided by work with const clk_ops. So mark the non-const clk_ops as const. Here, Function "clk_reg_prcc" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcc non-const clk_ops argument as const. Signed-off-by: Arvind Yadav Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/clk-prcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ca2ea4b0365324f449f83ce99d6c0a430bfe924c Author: Arvind Yadav Date: Mon Aug 28 12:32:40 2017 +0530 clk: ux500: sysctrl: constify clk_ops. clk_ops are not supposed to change at runtime. All functions working with clk_ops provided by work with const clk_ops. So mark the non-const clk_ops as const. Here, Function "clk_reg_sysctrl" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_sysctrl non-const clk_ops argument as const. Signed-off-by: Arvind Yadav Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/clk-sysctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit df4f45a00b104463d147c60a45f353879f70fc8b Author: Arvind Yadav Date: Mon Aug 28 12:32:39 2017 +0530 clk: ux500: prcmu: constify clk_ops. clk_ops are not supposed to change at runtime. All functions working with clk_ops provided by work with const clk_ops. So mark the non-const clk_ops as const. Here, Function "clk_reg_prcmu" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcmu non-const clk_ops argument as const. Signed-off-by: Arvind Yadav Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/clk-prcmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ea3100ab0129e6812dbf3e57d2737fda63b16ae8 Merge: acfb98b 7b3722f Author: David S. Miller Date: Wed Aug 30 22:14:37 2017 -0700 Merge tag 'mlx5-GRE-Offload' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-08-31 (GRE Offloads support) This series provides the support for MPLS RSS and GRE TX offloads and RSS support. The first patch from Gal and Ariel provides the mlx5 driver support for ConnectX capability to perform IP version identification and matching in order to distinguish between IPv4 and IPv6 without the need to specify the encapsulation type, thus perform RSS in MPLS automatically without specifying MPLS ethertyoe. This patch will also serve for inner GRE IPv4/6 classification for inner GRE RSS. 2nd patch from Gal, Adds the TX offloads support for GRE tunneled packets, by reporting the needed netdev features. 3rd patch from Gal, Adds GRE inner RSS support by creating the needed device resources (Steering Tables/rules and traffic classifiers) to Match GRE traffic and perform RSS hashing on the inner headers. Improvement: Testing 8 TCP streams bandwidth over GRE: System: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 21.3 Gbps (Single RQ) Now : 90.5 Gbps (RSS spread on 8 RQs) ==================== Signed-off-by: David S. Miller commit acfb98b99647aa7dc7c111db52d5f4199d2b641f Author: Rick Farrington Date: Wed Aug 30 16:19:53 2017 -0700 liquidio: fix crash in presence of zeroed-out base address regs Fix crash in linux PF driver when BARs have been cleared/de-programmed; fail early init (prior to mapping BARs) if the BAR0 or BAR1 registers are zero. This situation can arise when the PF is added to a VM (PCI pass-through), then a PF FLR is issued (in the VM). After this occurs, the BAR registers will be zero. If we attempt to load the PF driver in the host (after VM has been shutdown), the host can reset. Signed-off-by: Rick Farrington Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller .../net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 12bdc5e1e58304d27cb16e30597e2e706e536fb1 Author: David Ahern Date: Wed Aug 30 17:07:30 2017 -0700 devlink: Maintain consistency in mac field name IPv4 name uses "destination ip" as does the IPv6 patch set. Make the mac field consistent. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a636a56d2d39676fe85190dec102c7440e24977 Author: Oliver O'Halloran Date: Thu Jun 29 17:12:55 2017 +1000 powerpc/smp: Add cpu_l2_cache_map We want to add an extra level to the CPU scheduler topology to account for cores which share a cache. To do this we need to build a cpumask for each CPU that indicates which CPUs share this cache to use as an input to the scheduler. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/include/asm/smp.h | 6 ++++++ arch/powerpc/kernel/smp.c | 23 +++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) commit df52f6714071c49a1fb1f541d4c4ff929bd4594d Author: Oliver O'Halloran Date: Thu Jun 29 17:12:54 2017 +1000 powerpc/smp: Rework CPU topology construction The CPU scheduler topology is constructed from a number of per-cpu cpumasks which describe which sets of logical CPUs are related in some fashion. Current code that handles constructing these masks when CPUs are hot(un)plugged can be simplified a bit by exploiting the fact that the scheduler requires higher levels of the toplogy (e.g package level groupings) to be supersets of the lower levels (e.g. threas in a core). This patch reworks the cpumask construction to be simpler and easier to extend with extra topology levels. Signed-off-by: Oliver O'Halloran [mpe: Fix CONFIG_HOTPLUG_CPU=n build] Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 152 ++++++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 66 deletions(-) commit e3d8b67e2c60dcd35661d34df249f20d20463f0c Author: Oliver O'Halloran Date: Thu Jun 29 17:12:53 2017 +1000 powerpc/smp: Use cpu_to_chip_id() to find core siblings When building the CPU scheduler topology the kernel uses the ibm,chipid property from the devicetree to group logical CPUs. Currently the DT search for this property is open-coded in smp.c and this functionality is a duplication of what's in cpu_to_chip_id() already. This patch removes the existing search in favor of that. It's worth mentioning that the semantics of the search are different in cpu_to_chip_id(). When there is no ibm,chipid in the CPUs node it will also search /cpus and / for the property, but this should not effect the output topology. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) commit 197267d0356004a31c4d6b6336598f5dff3301e1 Author: Frederic Barrat Date: Wed Aug 30 12:15:49 2017 +0200 cxl: Fix driver use count cxl keeps a driver use count, which is used with the hash memory model on p8 to know when to upgrade local TLBIs to global and to trigger callbacks to manage the MMU for PSL8. If a process opens a context and closes without attaching or fails the attachment, the driver use count is never decremented. As a consequence, TLB invalidations remain global, even if there are no active cxl contexts. We should increment the driver use count when the process is attaching to the cxl adapter, and not on open. It's not needed before the adapter starts using the context and the use count is decremented on the detach path, so it makes more sense. It affects only the user api. The kernel api is already doing The Right Thing. Signed-off-by: Frederic Barrat Cc: stable@vger.kernel.org # v4.2+ Fixes: 7bb5d91a4dda ("cxl: Rework context lifetimes") Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 4 ++++ drivers/misc/cxl/file.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit a3c01050584da30405181505d20cd62cb42f3cdd Author: Michael Neuling Date: Wed Aug 30 20:45:12 2017 +1000 selftests/powerpc: Force ptrace tests to build -fno-pie Currently these tests won't build with a `--enable-default-pie` compiler as they require r30 to be clobbered. This gives an error: ptrace-tm-spd-gpr.c:41:2: error: PIC register clobbered by 'r30' in 'asm' This forces these tests to be built no-pie. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/ptrace/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 866bfc75f40e4f8a00d268f73f3a02f572e6c082 Author: Hannes Reinecke Date: Tue Jun 27 16:29:51 2017 +0200 powerpc: conditionally compile platform-specific serial drivers mpsc.c and mpc52xx-psc.c are platform-specific serial drivers, and should be compiled for the respective platforms only. Signed-off-by: Hannes Reinecke Reviewed-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 7 ++++--- arch/powerpc/boot/serial.c | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) commit eb039161da2ff388cc30d076badd8e06fb015f33 Author: Tobin C. Harding Date: Thu Mar 9 16:42:12 2017 +1100 powerpc/asm: Convert .llong directives to .8byte .llong is an undocumented PPC specific directive. The generic equivalent is .quad, but even better (because it's self describing) is .8byte. Convert all .llong directives to .8byte. Signed-off-by: Tobin C. Harding Signed-off-by: Michael Ellerman arch/powerpc/boot/crt0.S | 20 ++++++++++---------- arch/powerpc/include/asm/asm-compat.h | 2 +- arch/powerpc/include/asm/feature-fixups.h | 6 +++--- arch/powerpc/include/asm/reg.h | 12 ++++++------ arch/powerpc/kernel/entry_64.S | 2 +- arch/powerpc/kernel/head_64.S | 8 ++++---- arch/powerpc/kernel/reloc_64.S | 6 +++--- arch/powerpc/kernel/systbl.S | 14 +++++++------- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- arch/powerpc/platforms/pseries/hvCall.S | 2 +- arch/powerpc/purgatory/trampoline.S | 4 ++-- .../powerpc/switch_endian/switch_endian_test.S | 2 +- 12 files changed, 40 insertions(+), 40 deletions(-) commit 5b593949f8ff2b505e68bf044ea4586a4b57e1ac Author: Balbir Singh Date: Thu Apr 13 17:20:45 2017 +1000 powerpc/configs: Enable THP and 64K for ppc64(le)_defconfig Enable 64K page size and THP. I use ppc64le_defconfig when I need a single config across guest and host, but having 4K page size as default is not what I expect. I could move these over to server.config and merge if ppc64_defconfig is meant for systems that use 4k pages by default. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc64_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit d8895268f06546ad3744acce37798ec50b16ae42 Author: Murilo Opsfelder Araujo Date: Thu Jun 1 13:05:41 2017 -0300 MAINTAINERS: Add drivers/watchdog/wdrtas.c to powerpc section drivers/watchdog/wdrtas.c is of interest of linuxppc maintainers. Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 539df7fcb303f2cbe8021a27839928485937cd6b Author: Balbir Singh Date: Thu Apr 13 17:03:09 2017 +1000 powerpc/configs: Enable function trace by default Most (all?) distros turn these on, so it makes sense to enable them for testing coverage, and they're also useful for developers. Signed-off-by: Balbir Singh Acked-by: Naveen N. Rao [mpe: Reword change log] Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 4 ++++ arch/powerpc/configs/ppc64_defconfig | 3 +++ arch/powerpc/configs/pseries_defconfig | 3 +++ 3 files changed, 10 insertions(+) commit d1e1b351f50f9e5941f436f6c63949731979e00c Author: Balbir Singh Date: Wed Aug 30 21:45:09 2017 +1000 powerpc/xmon: Add ISA v3.0 SPRs to SPR dump Add support for printing the PIDR/TIDR for ISA 300 and PSSCR and PTCR in ISA 3.0 hypervisor mode. SPRN_PSSCR_PR is the privileged mode access and is used when we are not in hypervisor mode. Signed-off-by: Balbir Singh [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/xmon/xmon.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 64d66aa051544c31048ca58ab0ff81f294d37e9d Author: Balbir Singh Date: Wed Aug 30 21:43:34 2017 +1000 powerpc/xmon: Add AMR, UAMOR, AMOR, IAMR to SPR dump This patch adds support to xmon for dumping the AMR, UAMOR, AMOR and IAMR SPRs based on their supported ISA revisions. Signed-off-by: Balbir Singh [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit cf9159c36cca6b3d82a6eb620055b321af3c5b9b Author: Balbir Singh Date: Wed Aug 30 10:27:44 2017 +1000 powerpc/xmon: Dump all 64 bits of HDEC ISA 3.0 defines hypervisor decrementer to be 64 bits in length. This patch extends the print format for to be 64 bits. Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f2462acb6a995f2b0005192c0ba8eb2bce08da4 Author: Masahiro Yamada Date: Tue Sep 6 20:21:50 2016 +0900 powerpc: Squash lines for simple wrapper functions Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman arch/powerpc/kernel/ptrace.c | 42 ++++++++++----------------------- arch/powerpc/platforms/ps3/repository.c | 22 ++++------------- 2 files changed, 17 insertions(+), 47 deletions(-) commit 6deb6b474bda4d2d3fbee066f20561d3dc7f8b30 Author: Michael Ellerman Date: Wed Aug 30 17:41:17 2017 +1000 powerpc/mm/radix: Prettify mapped memory range print out When we map memory at boot we print out the ranges of real addresses that we mapped and the page size that was used. Currently it's a bit ugly: Mapped range 0x0 - 0x2000000000 with 0x40000000 Mapped range 0x200000000000 - 0x202000000000 with 0x40000000 Pad the addresses so they line up, and print the page size using actual units, eg: Mapped 0x0000000000000000-0x0000000001200000 with 64.0 KiB pages Mapped 0x0000000001200000-0x0000000040000000 with 2.00 MiB pages Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bd350f7121b542206e8738a317a905c109ec0f5b Author: Michael Ellerman Date: Wed Aug 30 17:41:29 2017 +1000 powerpc/mm/radix: Add pr_fmt() to pgtable-radix.c Make the printks look a bit nicer by adding a prefix. Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 4 ++++ 1 file changed, 4 insertions(+) commit f9df74dfce542ad2aea2e601ef1a1281e01fad6a Author: Bryant G. Ly Date: Tue Aug 29 08:11:51 2017 -0500 powerpc/kernel: Change retrieval of pci_dn For a PCI device it's pci_dn can be retrieved from pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. Thus, we should just use the existing function pci_get_pdn_by_devfn to get the pci_dn. Signed-off-by: Bryant G. Ly Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtas_pci.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) commit 22259a6e800cdb8e06e65432fcd019983214be0c Author: Aneesh Kumar K.V Date: Mon Aug 28 14:05:44 2017 +0530 powerpc/mm/cxl: Add barrier when setting mm cpumask We need to add memory barrier so that the page table walk doesn't happen before the cpumask is set and made visible to the other cpus. We need to use a sync here instead of lwsync because lwsync is not sufficient for store/load ordering. We also need to add an if (mm) check so that we do the right thing when called with a kernel context. For kernel context, we have mm = NULL. W.r.t kernel address we can skip setting the mm cpumask. Fixes: 0f4bc0932e ("powerpc/mm/cxl: Add the fault handling cpu to mm cpumask") Cc: Andrew Donnellan Reported-by: Benjamin Herrenschmidt Reported-by: Dan Carpenter Signed-off-by: Aneesh Kumar K.V Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/fault.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 2392c8c8c0450293625dbef19ff5e206fb7b6749 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:40 2017 -0700 powerpc/powernv/vas: Define copy/paste interfaces Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman MAINTAINERS | 1 + arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/include/asm/vas.h | 12 ++++++++ arch/powerpc/platforms/powernv/copy-paste.h | 46 ++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/vas-window.c | 47 +++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/vas.h | 18 +++++++++-- 6 files changed, 124 insertions(+), 2 deletions(-) commit 5239af679a07427647b009ebb9c70b1a03ebca9b Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:39 2017 -0700 powerpc/powernv/vas: Define vas_tx_win_open() Define an interface to open a VAS send window. This interface is intended to be used the Nest Accelerator (NX) driver(s) to open a send window and use it to submit compression/encryption requests to a VAS receive window. The receive window, identified by the [vasid, cop] parameters, must already be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 42 ++++++++ arch/powerpc/platforms/powernv/vas-window.c | 156 +++++++++++++++++++++++++++- 2 files changed, 195 insertions(+), 3 deletions(-) commit 98271d4198699947d66d6f8a02c09bd27cb90022 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:38 2017 -0700 powerpc/powernv/vas: Define vas_win_close() interface Define the vas_win_close() interface which should be used to close a send or receive windows. While the hardware configurations required to open send and receive windows differ, the configuration to close a window is the same for both. So we use a single interface to close the window. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 7 ++ arch/powerpc/platforms/powernv/vas-window.c | 101 ++++++++++++++++++++++++++-- 2 files changed, 103 insertions(+), 5 deletions(-) commit 62c4eda4fabe89709ec43dcf1efe9fbea007a734 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:37 2017 -0700 powerpc/powernv/vas: Define vas_rx_win_open() interface Define the vas_rx_win_open() interface. This interface is intended to be used by the Nest Accelerator (NX) driver(s) to setup receive windows for one or more NX engines (which implement compression & encryption algorithms in the hardware). Follow-on patches will provide an interface to close the window and to open a send window that kernel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 45 +++++ arch/powerpc/platforms/powernv/vas-window.c | 283 +++++++++++++++++++++++++++- arch/powerpc/platforms/powernv/vas.h | 14 ++ 3 files changed, 341 insertions(+), 1 deletion(-) commit bbfe59f8a7057f80f67a74e77fb4e941240e90b9 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:36 2017 -0700 powerpc/powernv/vas: Define helpers to alloc/free windows Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 73 +++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit b25b33ac18b35775949ab227bb3075bb6cb11bc3 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:35 2017 -0700 powerpc/powernv/vas: Define helpers to init window context Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 299 ++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/vas.h | 55 +++++ 2 files changed, 354 insertions(+) commit 180fe15a8299c14f77347c5835c98c2446226ee6 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:34 2017 -0700 powerpc/powernv/vas: Define helpers to access MMIO regions Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 174 ++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) commit 4dea2d1a927c61114a168d4509b56329ea6effb7 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:33 2017 -0700 powerpc/powernv/vas: Define vas_init() and vas_exit() Implement vas_init() and vas_exit() functions for a new VAS module. This VAS module is essentially a library for other device drivers and kernel users of the NX coprocessors like NX-842 and NX-GZIP. In the future this will be extended to add support for user space to access the NX coprocessors. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman .../devicetree/bindings/powerpc/ibm,vas.txt | 22 +++ MAINTAINERS | 8 ++ arch/powerpc/platforms/powernv/Kconfig | 14 ++ arch/powerpc/platforms/powernv/Makefile | 1 + arch/powerpc/platforms/powernv/vas-window.c | 19 +++ arch/powerpc/platforms/powernv/vas.c | 151 +++++++++++++++++++++ arch/powerpc/platforms/powernv/vas.h | 2 + 7 files changed, 217 insertions(+) commit b6622a339e8670a1025d4dd84be473c76dabed33 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:32 2017 -0700 powerpc/powernv: Move GET_FIELD/SET_FIELD to vas.h Move the GET_FIELD and SET_FIELD macros to vas.h as VAS and other users of VAS, including NX-842 can use those macros. There is a lot of related code between the VAS/NX kernel drivers and skiboot. For consistency, switch the order of parameters in SET_FIELD to match the order in skiboot. Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Dan Streetman Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 8 ++++++++ drivers/crypto/nx/nx-842-powernv.c | 7 ++++--- drivers/crypto/nx/nx-842.h | 5 ----- 3 files changed, 12 insertions(+), 8 deletions(-) commit 967689141eb37c4365eac0fac82d857773098475 Author: Sukadev Bhattiprolu Date: Mon Aug 28 23:23:31 2017 -0700 powerpc/powernv/vas: Define macros, register fields and structures Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu [mpe: Fixup include guard to use _ASM_POWERPC_VAS_H] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 45 +++++ arch/powerpc/platforms/powernv/vas.h | 382 +++++++++++++++++++++++++++++++++++ 2 files changed, 427 insertions(+) commit c47a94031e81bd497704a535d60d0262a3155dbf Author: Balbir Singh Date: Tue Aug 29 17:22:36 2017 +1000 powerpc/xmon: Fix display of SPRs Convert 0.16x to 0.16lx. Otherwise we lose the top 8 nibbles and effectively print only the last 32 bits. Fixes: 1846193b178d ("powerpc/xmon: Dump ISA 2.06 SPRs") Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit f1e08232ede8d1888d51e94940645f93a8462d75 Author: Alexey Kardashevskiy Date: Tue Aug 29 17:34:04 2017 +1000 powerpc/pci: Remove OF node back pointer from pci_dn The check_req() helper uses pci_get_pdn() to get an OF node pointer. pci_get_pdn() returns a pci_dn pointer which either: 1) from the OF node returned by pci_device_to_OF_node(); 2) from the parent child_list where entries don't have OF node pointers. Since check_req() does not care about 2), it can call pci_device_to_OF_node() directly, hence the change. The find_pe_dn() helper uses embedded pci_dn to get an OF node which is also stored in edev->pdev so let's take a shortcut and call pci_device_to_OF_node() directly. With these 2 changes, we can finally get rid of the OF node back pointer. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pci-bridge.h | 1 - arch/powerpc/kernel/pci_dn.c | 1 - arch/powerpc/platforms/pseries/msi.c | 11 ++--------- 3 files changed, 2 insertions(+), 11 deletions(-) commit 14db3d52d3a214ae8132a403de410af7643cb8b0 Author: Alexey Kardashevskiy Date: Tue Aug 29 17:34:03 2017 +1000 powerpc/eeh: Reduce use of pci_dn::node The pci_dn struct caches a OF device node pointer in order to access the "ibm,loc-code" property when EEH is recovering. However, when this happens in eeh_dev_check_failure(), we also have a pci_dev pointer which should have a valid pointer to the device node when pci_dn has one (both pointers are not NULL for physical functions and are NULL for virtual functions). This changes pci_remove_device_node_info() to look for a parent of the node being removed, just like pci_add_device_node_info() does when it references the parent node. This is the first step to get rid of pci_dn::node. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 9 +++++---- arch/powerpc/kernel/pci_dn.c | 7 +++++-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 405b33a76d26e426276c088b38dc7efba7538ff2 Author: Alexey Kardashevskiy Date: Tue Aug 29 17:34:02 2017 +1000 powerpc/eeh: Remove unnecessary config_addr from eeh_dev The eeh_dev struct hold a config space address of an associated node and the very same address is also stored in the pci_dn struct which is always present during the eeh_dev lifetime. This uses bus:devfn directly from pci_dn instead of cached and packed config_addr. Since config_addr is made from device's bus:dev.fn, there is no point in keeping it in the debugfs either so remove that too. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 - arch/powerpc/kernel/eeh_pe.c | 42 ++++++++++++++-------------- arch/powerpc/kernel/eeh_sysfs.c | 3 -- arch/powerpc/platforms/powernv/eeh-powernv.c | 9 +++--- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 -- 5 files changed, 26 insertions(+), 31 deletions(-) commit 69672bd7489f8a995e9cb89655dc1dcee555dadb Author: Alexey Kardashevskiy Date: Tue Aug 29 17:34:01 2017 +1000 powerpc/eeh: Remove unnecessary pointer to phb from eeh_dev The eeh_dev struct already holds a pointer to pci_dn which it does not exist without and pci_dn itself holds the very same pointer so just use it. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 - arch/powerpc/kernel/eeh.c | 7 +++---- arch/powerpc/kernel/eeh_dev.c | 2 -- arch/powerpc/kernel/eeh_driver.c | 2 +- arch/powerpc/kernel/eeh_pe.c | 24 +++++++++++++----------- arch/powerpc/platforms/powernv/eeh-powernv.c | 5 ++--- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- 7 files changed, 20 insertions(+), 23 deletions(-) commit 8bae6a23198defc5576e4c6f1f97822883d705ae Author: Alexey Kardashevskiy Date: Tue Aug 29 17:34:00 2017 +1000 powerpc/eeh: Reduce to one the number of places where edev is allocated arch/powerpc/kernel/eeh_dev.c:57 is the only legit place where edev is allocated; other 2 places allocate it on stack and in the heap for a very short period of time to use eeh_pe_get() as takes edev. This changes eeh_pe_get() to receive required parameters explicitly. This removes unnecessary temporary allocation of edev. This uses the "pe_no" name instead of the "pe_config_addr" name as it actually is a PE number and not a config space address as it seemed. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Andrew Donnellan Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 3 ++- arch/powerpc/kernel/eeh_pe.c | 32 ++++++++++++++++++---------- arch/powerpc/platforms/powernv/eeh-powernv.c | 15 ++----------- 3 files changed, 25 insertions(+), 25 deletions(-) commit 5f600b17d190aa0e4011557fd6abb05908a53a0d Author: Alexey Kardashevskiy Date: Tue Aug 29 17:33:59 2017 +1000 powerpc/pci: Remove unused parameter from add_one_dev_pci_data() pdev is always NULL, remove it. To make checkpatch.pl happy, this also removes the "out of memory" message. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Andrew Donnellan Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/pci_dn.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 9e2b70fbbc451cc56863644f6e7349148f7482cf Author: Arvind Yadav Date: Mon Aug 28 11:35:15 2017 +0530 powerpc/512x: Constify clk_div_tables clk_div_tables are not supposed to change at runtime. mpc512x_clk_divtable function working with const clk_div_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Michael Ellerman arch/powerpc/platforms/512x/clock-commonclk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d046759f6ad75824fdf7b9c9a3da0272ea9ea92 Author: Dan Carpenter Date: Fri Aug 25 13:33:40 2017 +0300 powerpc/44x: Fix mask and shift to zero bug My static checker complains that 0x00001800 >> 13 is zero. Looking at the context, it seems like a copy and paste bug from the line below and probably 0x3 << 13 or 0x00006000 was intended. Fixes: 2af59f7d5c3e ("[POWERPC] 4xx: Add 405GPr and 405EP support in boot wrapper") Signed-off-by: Dan Carpenter Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/boot/4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c65540453e150844367ffe98e45d5175181b2ec1 Author: Dan Carpenter Date: Wed Jun 28 14:49:07 2017 +0300 powerpc/83xx: Use sizeof correct type when ioremapping There is a cut and paste error here so we use sizeof(struct mpc83xx_pmc) to remap the memory for "clock_regs". That sizeof() is 20 bytes and we only need to remap 12 bytes. It presumably doesn't affect run time too much... I changed them to both use sizeof(*variable_name) because that's the preferred kernel style these days. Fixes: d49747bdfb2d ("powerpc/mpc83xx: Power Management support") Signed-off-by: Dan Carpenter [mpe: It will map at least one page anyway, but still a good cleanup] Signed-off-by: Michael Ellerman arch/powerpc/platforms/83xx/suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b96672dd840f2231c3e0804842d380c401739733 Author: Nicholas Piggin Date: Wed Jul 19 16:59:12 2017 +1000 powerpc: Machine check interrupt is a non-maskable interrupt Use nmi_enter similarly to system reset interrupts. This uses NMI printk NMI buffers and turns off various debugging facilities that helps avoid tripping on ourselves or other CPUs. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6fcd6baa90aeec9dcbe30786e15c125bf50503b2 Author: Nicholas Piggin Date: Wed Jul 19 16:59:11 2017 +1000 powerpc/powernv: Use kernel crash path for machine checks There are quite a few machine check exceptions that can be caused by kernel bugs. To make debugging easier, use the kernel crash path in cases of synchronous machine checks that occur in kernel mode, if that would not result in the machine going straight to panic or crash dump. There is a downside here that die()ing the process in kernel mode can still leave the system unstable. panic_on_oops will always force the system to fail-stop, so systems where that behaviour is important will still do the right thing. As a test, when triggering an i-side 0111b error (ifetch from foreign address) in kernel mode process context on POWER9, the kernel currently dies quickly like this: Severe Machine check interrupt [Not recovered] NIP [ffff000000000000]: 0xffff000000000000 Initiator: CPU Error type: Real address [Instruction fetch (foreign)] [ 127.426651616,0] OPAL: Reboot requested due to Platform error. Effective[ 127.426693712,3] OPAL: Reboot requested due to Platform error. address: ffff000000000000 opal: Reboot type 1 not supported Kernel panic - not syncing: PowerNV Unrecovered Machine Check CPU: 56 PID: 4425 Comm: syscall Tainted: G M 4.12.0-rc1-13857-ga4700a261072-dirty #35 Call Trace: [ 128.017988928,4] IPMI: BUG: Dropping ESEL on the floor due to buggy/mising code in OPAL for this BMC Rebooting in 10 seconds.. Trying to free IRQ 496 from IRQ context! After this patch, the process is killed and the kernel continues with this message, which gives enough information to identify the offending branch (i.e., with CFAR): Severe Machine check interrupt [Not recovered] NIP [ffff000000000000]: 0xffff000000000000 Initiator: CPU Error type: Real address [Instruction fetch (foreign)] Effective address: ffff000000000000 Oops: Machine check, sig: 7 [#1] SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 ... CPU: 22 PID: 4436 Comm: syscall Tainted: G M 4.12.0-rc1-13857-ga4700a261072-dirty #36 task: c000000932300000 task.stack: c000000932380000 NIP: ffff000000000000 LR: 00000000217706a4 CTR: ffff000000000000 REGS: c00000000fc8fd80 TRAP: 0200 Tainted: G M (4.12.0-rc1-13857-ga4700a261072-dirty) MSR: 90000000001c1003 CR: 24000484 XER: 20000000 CFAR: c000000000004c80 DAR: 0000000021770a90 DSISR: 0a000000 SOFTE: 1 GPR00: 0000000000001ebe 00007fffce4818b0 0000000021797f00 0000000000000000 GPR04: 00007fff8007ac24 0000000044000484 0000000000004000 00007fff801405e8 GPR08: 900000000280f033 0000000024000484 0000000000000000 0000000000000030 GPR12: 9000000000001003 00007fff801bc370 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR28: 00007fff801b0000 0000000000000000 00000000217707a0 00007fffce481918 NIP [ffff000000000000] 0xffff000000000000 LR [00000000217706a4] 0x217706a4 Call Trace: Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Signed-off-by: Nicholas Piggin Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bug.h | 1 + arch/powerpc/include/asm/fadump.h | 2 ++ arch/powerpc/kernel/fadump.c | 9 ++++++++- arch/powerpc/kernel/traps.c | 22 ++++++++++++++++++++++ arch/powerpc/platforms/powernv/opal.c | 32 ++++++++++++++++++++++++++------ 5 files changed, 59 insertions(+), 7 deletions(-) commit b746e3e01e70d23ef53dcde1203ab78a1b7ac514 Author: Nicholas Piggin Date: Wed Jul 19 16:59:10 2017 +1000 powerpc/powernv: Flush console before platform error reboot Unrecovered MCE and HMI errors are sent through a special restart OPAL call to log the platform error. The downside is that they don't go through normal Linux crash paths, so they don't give much information to the Linux console. Change this by providing a special crash function which does some of the console flushing from the panic() path before calling firmware to reboot. The downside of this is a little more code to execute before reaching the firmware reboot. However in practice, it's critical to get the Linux console messages output in order to debug a problem. So this is a desirable tradeoff. Note on the implementation: It is difficult to plumb a custom reboot handler into the panic path, because panic does a little bit too much work. For example, it will try to delay with the timebase, but that may be corrupted in some cases resulting in a hang without reaching the platform reboot. Another problem is that panic can invoke the crash dump code which is not what we want in the case of a hardware platform error. Long-term the best solution will be to rework the panic path so it can be suitable for this kind of panic, but for now we just duplicate a bit of the code. Signed-off-by: Nicholas Piggin Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 +- arch/powerpc/platforms/powernv/opal-hmi.c | 22 ++------ arch/powerpc/platforms/powernv/opal.c | 89 ++++++++++++++++++------------- arch/powerpc/platforms/powernv/powernv.h | 2 + 4 files changed, 57 insertions(+), 58 deletions(-) commit 4388c9b3a6ee7d6afc36c8a0bb5579b1606229b5 Author: Nicholas Piggin Date: Wed Jul 5 13:56:27 2017 +1000 powerpc: Do not send system reset request through the oops path A system reset is a request to crash / debug the system rather than necessarily caused by encountering a BUG. So there is no need to serialize all CPUs behind the die lock, adding taints to all subsequent traces beyond the first, breaking console locks, etc. The system reset is NMI context which has its own printk buffers to prevent output being interleaved. Then it's better to have all secondaries print out their debug as quickly as possible and the primary will flush out all printk buffers during panic(). So remove the 0x100 path from die, and move it into system_reset. Name the crash/dump reasons "System Reset". This gives "not tained" traces when crashing an untainted kernel. It also gives the panic reason as "System Reset" as opposed to "Fatal exception in interrupt" (or "die oops" for fadump). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 47 ++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit bded0706434dd34fe9d39a8f1bbb518154cacd7f Author: Nicholas Piggin Date: Wed Jul 5 13:56:26 2017 +1000 powerpc/pseries/le: Work around a firmware quirk Some PowerVM firmware when delivering a system reset interrupt to a little endian OS will mess up SRR registers. They are byteswapped, and SRR1 is incorrect. An example from a crash: NIP: 14dd0900000000c0 MSR: 1000000200000080 It's possible to detect this pattern in SRR1 (that would never happen in normal operation), and at least fix the NIP. After this patch, the same interrupt reports NIP properly: NIP [c00000000009dd14] plpar_hcall_norets+0x1c/0x28 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/ras.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a3b2cb30f252b21a6f962e0dd107c8b897ca65e4 Author: Nicholas Piggin Date: Wed Jul 5 13:56:25 2017 +1000 powerpc: Do not call ppc_md.panic in fadump panic notifier If fadump is not registered, and no other crash or debug handlers are registered, the powerpc panic handler stops the guest before the generic panic code can push out debug information to the console. Currently, system reset injection causes the guest to silently stop. Stop calling ppc_md.panic in the panic notifier. crash_fadump already does rtas_os_term() to terminate the guest if fadump is registered. Remove ppc_md.panic. Move fadump panic notifier into fadump code. Signed-off-by: Nicholas Piggin Reviewed-by: Mahesh Salgaonkar 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, 22 insertions(+), 45 deletions(-) commit 70412c55d419e971785094e9f7880fdbcd690520 Author: Nicholas Piggin Date: Mon Aug 28 14:27:19 2017 +1000 powerpc/64: Fix watchdog configuration regressions This fixes a couple more bits of fallout from the new hard lockup watchdog patch. It restores the required hw_nmi_get_sample_period() function for the perf watchdog, and removes some function declarations on 64e that are only defined for 64s. This fixes the 64e build when the hardlockup detector is enabled. It restores the default behaviour of disabling the perf watchdog, and also fixes disabling the 64s watchdog when running as a guest. Fixes: 2104180a53 ("powerpc/64s: implement arch-specific hardlockup watchdog") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nmi.h | 3 +-- arch/powerpc/kernel/kvm.c | 7 ------- arch/powerpc/kernel/setup_64.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 9 deletions(-) commit b68b1d7487195d17bdd7e06f183acfb896eafcc7 Author: Nicholas Piggin Date: Sun Aug 13 11:33:43 2017 +1000 powerpc/64s/radix: Do not allocate SLB shadow structures These are unused in radix mode. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/paca.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d55071905ee1719094c66dd3c40e2a9ef5c65eaf Author: Nicholas Piggin Date: Sun Aug 13 11:33:41 2017 +1000 powerpc/64s/radix: Remove bolted-SLB address limit for per-cpu stacks Radix MMU does not take SLB or TLB interrupts when accessing kernel linear address. Remove this restriction for radix mode. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 76b42e28beb5ed615b093e2abb28a7064173f2ad Author: Nicholas Piggin Date: Sun Aug 13 11:33:39 2017 +1000 powerpc/powernv: powernv platform is not constrained by RMA Remove incorrect comment about real mode address restrictions on powernv (bare metal), and unnecessary clamping to ppc64_rma_size. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1da92afbbfcde9dcbbf85cc94ef506c986c7e4a1 Author: Anup Patel Date: Tue Aug 1 16:05:54 2017 +0530 mailbox: bcm-flexrm-mailbox: Use txdone_ack instead of txdone_poll Currently, FlexRM driver uses txdone_poll method of Linux Mailbox to model the send_data() callback. To achieve this, we have introduced "last_pending_msg" pointer for each FlexRM ring which keeps track of the message that did not fit in the FlexRM ring. This patch updates FlexRM driver to use txdone_ack method instead of txdone_poll method because txdone_poll is not efficient for FlexRM and requires additional tracking in FlexRM driver. Also, moving to txdone_ack method helps us remove "last_pending_msg" pointer and last_tx_done() callback. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 61 +++--------------------------------- 1 file changed, 4 insertions(+), 57 deletions(-) commit 1f7466c6b428fa52504e85c2df43aa8641f9294e Author: Anup Patel Date: Tue Aug 1 16:05:53 2017 +0530 mailbox: bcm-flexrm-mailbox: Use bitmap instead of IDA Currently, we are using IDA library for managing IDs on a FlexRM ring. The IDA library dynamically allocates memory for underlying data structures which can cause potential locking issue when allocating/free IDs from flexrm_new_request() and flexrm_process_completions(). To tackle this, we replace use of IDA with bitmap for each FlexRM ring and also protect the bitmap with FlexRM ring lock. Signed-off-by: Anup Patel Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 6d2061b981af165d3e45462e0804b5a1f2f4c7bc Author: Anup Patel Date: Tue Aug 1 16:05:52 2017 +0530 mailbox: bcm-flexrm-mailbox: Fix mask used in CMPL_START_ADDR_VALUE() The mask used in CMPL_START_ADDR_VALUE() should be 27bits instead of 26bits. This incorrect mask was causing completion writes to 40bits physical address fail. This patch fixes mask used in CMPL_START_ADDR_VALUE() macro. Fixes: dbc049eee730 ("mailbox: Add driver for Broadcom FlexRM ring manager") Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Cc: stable@vger.kernel.org Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acf7e50a6ba056d668de07b9eadcf6fe9395f167 Author: Anup Patel Date: Tue Aug 1 16:05:51 2017 +0530 mailbox: bcm-flexrm-mailbox: Add debugfs support This patch adds debugfs support to Broadcom FlexRM driver so that we can see FlexRM ring state when any issue happens. Signed-off-by: Anup Patel Reviewed-by: Vikram Prakash Reviewed-by: Scott Branden Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 136 ++++++++++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 2 deletions(-) commit 6ac17fe8c14aaec3940a92a6b39fe3f6389f5a4d Author: Anup Patel Date: Tue Aug 1 16:05:50 2017 +0530 mailbox: bcm-flexrm-mailbox: Set IRQ affinity hint for FlexRM ring IRQs This patch set IRQ affinity hint for FlexRM ring IRQ at time of enabling ring (i.e. flexrm_startup()). The IRQ affinity hint will allow FlexRM driver to distribute FlexRM ring IRQs across online CPUs so that all FlexRM ring IRQs don't land in CPU0 by default. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4dafecde443a3f5690d68a3a0d32202b634b2675 Merge: e3bfed1 94a04bc Author: Paul Mackerras Date: Thu Aug 31 12:37:03 2017 +1000 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in the 'ppc-kvm' topic branch from the powerpc tree in order to bring in some fixes which touch both powerpc and KVM code. Signed-off-by: Paul Mackerras commit e3bfed1df379c18f20feb06427d952b766e2c00f Author: Paul Mackerras Date: Fri Aug 25 19:53:39 2017 +1000 KVM: PPC: Book3S HV: Report storage key support to userspace This adds information about storage keys to the struct returned by the KVM_PPC_GET_SMMU_INFO ioctl. The new fields replace a pad field, which was zeroed by previous kernel versions. Thus userspace that knows about the new fields will see zeroes when running on an older kernel, indicating that storage keys are not supported. The size of the structure has not changed. The number of keys is hard-coded for the CPUs supported by HV KVM, which is just POWER7, POWER8 and POWER9. Signed-off-by: Paul Mackerras Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 8 ++++++++ include/uapi/linux/kvm.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) commit a4faf2e77a565432278430deaaba2f3295b6a2df Author: Paul Mackerras Date: Fri Aug 25 19:52:12 2017 +1000 KVM: PPC: Book3S HV: Fix case where HDEC is treated as 32-bit on POWER9 Commit 2f2724630f7a ("KVM: PPC: Book3S HV: Cope with host using large decrementer mode", 2017-05-22) added code to treat the hypervisor decrementer (HDEC) as a 64-bit value on POWER9 rather than 32-bit. Unfortunately, that commit missed one place where HDEC is treated as a 32-bit value. This fixes it. This bug should not have any user-visible consequences that I can think of, beyond an occasional unnecessary exit to the host kernel. If the hypervisor decrementer has gone negative, then the bottom 32 bits will be negative for about 4 seconds after that, so as long as we get out of the guest within those 4 seconds we won't conclude that the HDEC interrupt is spurious. Reported-by: Suraj Jitindar Singh Fixes: 2f2724630f7a ("KVM: PPC: Book3S HV: Cope with host using large decrementer mode") Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bfa33c7f71e7e9de289582d9652110daa1ec8a1 Author: Andreas Schwab Date: Tue Aug 15 14:37:01 2017 +1000 KVM: PPC: Book3S HV: Fix invalid use of register expression binutils >= 2.26 now warns about misuse of register expressions in assembler operands that are actually literals. In this instance r0 is being used where a literal 0 should be used. Signed-off-by: Andreas Schwab [mpe: Split into separate KVM patch, tweak change log] Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaac112eac8604917bc6c39680ff67a937626a96 Author: Nicholas Piggin Date: Sun Aug 13 11:33:38 2017 +1000 KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation KVM currently validates the size of the VPA registered by the client against sizeof(struct lppaca), however we align (and therefore size) that struct to 1kB to avoid crossing a 4kB boundary in the client. PAPR calls for sizes >= 640 bytes to be accepted. Hard code this with a comment. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d182b8fd6084412963cdb1a16d04c2f07234e82b Author: Ram Pai Date: Mon Jul 31 14:39:59 2017 -0700 KVM: PPC: Book3S HV: Fix setting of storage key in H_ENTER In handling a H_ENTER hypercall, the code in kvmppc_do_h_enter clobbers the high-order two bits of the storage key, which is stored in a split field in the second doubleword of the HPTE. Any storage key number above 7 hence fails to operate correctly. This makes sure we preserve all the bits of the storage key. Acked-by: Balbir Singh Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 50a1a25987146c5ab15d6c1642a5043730ace0a5 Author: Dan Carpenter Date: Thu Jul 13 10:38:49 2017 +0300 KVM: PPC: e500mc: Fix a NULL dereference We should set "err = -ENOMEM;", otherwise it means we're returning ERR_PTR(0) which is NULL. It results in a NULL pointer dereference in the caller. Signed-off-by: Dan Carpenter Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500mc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 73e77c0982fd25ddb536339906412cbed78d0b79 Author: Dan Carpenter Date: Thu Jul 13 10:38:29 2017 +0300 KVM: PPC: e500: Fix some NULL dereferences on error There are some error paths in kvmppc_core_vcpu_create_e500() where we forget to set the error code. It means that we return ERR_PTR(0) which is NULL and it results in a NULL pointer dereference in the caller. Signed-off-by: Dan Carpenter Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3515832cc61467bfb87191a30401de1700e9956a Author: Quinn Tran Date: Wed Aug 30 10:16:50 2017 -0700 scsi: qla2xxx: Reset the logo flag, after target re-login. After relogin is sucessful, "send_els_logo" flag needs to be reinitialized. This will allow next re-login to happen successfully. In target mode, this flag was not reset correctly, causing IO's failure during reset recovery and port ON/OFF test cases from initiator. Signed-off-by: Quinn Tran Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 2 ++ 2 files changed, 3 insertions(+) commit b5d1531260b9e5819edcaed8b549859e582e4ca4 Author: Quinn Tran Date: Wed Aug 30 10:16:49 2017 -0700 scsi: qla2xxx: Fix slow mem alloc behind lock Call Trace: [] dump_stack+0x6b/0xa4 [] ? print_irqtrace_events+0xd0/0xe0 [] ___might_sleep+0x183/0x240 [] __might_sleep+0x52/0x90 [] kmem_cache_alloc_trace+0x5b/0x300 [] ? __lock_acquired+0x30b/0x420 [] qla2x00_alloc_fcport+0x38/0x2a0 [qla2xxx] [] ? qla2x00_do_work+0x34/0x2b0 [qla2xxx] [] ? _raw_spin_lock_irqsave+0x7b/0x90 [] ? qla24xx_create_new_sess+0x3a/0x160 [qla2xxx] [] qla24xx_create_new_sess+0xc3/0x160 [qla2xxx] [] ? trace_hardirqs_on+0xd/0x10 [] qla2x00_do_work+0x138/0x2b0 [qla2xxx] Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_os.c | 33 ++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_target.c | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) commit 1a28faa01074f1cacc029bcb611690f086b11de2 Author: Darren Trap Date: Wed Aug 30 10:16:48 2017 -0700 scsi: qla2xxx: Clear fc4f_nvme flag Signed-off-by: Darren Trap Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 1 + 1 file changed, 1 insertion(+) commit d32041ec9524fe75a4b2418c05ff55e3250139c1 Author: Johannes Thumshirn Date: Wed Aug 30 15:12:31 2017 +0200 scsi: qla2xxx: add missing includes for qla_isr Since commit 7401bc18d1ee ("scsi: qla2xxx: Add FC-NVMe command handling") we make use of 'struct nvmefc_fcp_req' in qla24xx_nvme_iocb_entry() without including linux/nvme-fc-driver.h where it is defined. Add linux/nvme-fc-driver.h (and scsi/fc/fc_fs.h as nvme-fc-driver.h needs the definition of 'struct fc_ba_rjt' from scsi/fc/fc_fs.h) to the header files included by qla_isr.c. Fixes: 7401bc18d1ee ("scsi: qla2xxx: Add FC-NVMe command handling") Signed-off-by: Johannes Thumshirn Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 2 ++ 1 file changed, 2 insertions(+) commit e6f77540c067b48dee10f1e33678415bfcc89017 Author: Dan Carpenter Date: Wed Aug 30 16:30:35 2017 +0300 scsi: qla2xxx: Fix an integer overflow in sysfs code The value of "size" comes from the user. When we add "start + size" it could lead to an integer overflow bug. It means we vmalloc() a lot more memory than we had intended. I believe that on 64 bit systems vmalloc() can succeed even if we ask it to allocate huge 4GB buffers. So we would get memory corruption and likely a crash when we call ha->isp_ops->write_optrom() and ->read_optrom(). Only root can trigger this bug. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194061 Cc: Fixes: b7cc176c9eb3 ("[SCSI] qla2xxx: Allow region-based flash-part accesses.") Reported-by: shqking Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96676246981b8321fb7bcaf51147f3be7c436af5 Author: Nikola Pajkovsky Date: Tue Aug 29 13:59:04 2017 +0200 scsi: aacraid: report -ENOMEM to upper layer from aac_convert_sgraw2() aac_convert_sgraw2() kmalloc memory and return -1 on error, which should be -ENOMEM. However, nobody is checking return value, so with this change, -ENOMEM is propagated to upper layer. Signed-off-by: Nikola Pajkovsky Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a226032398cb03760c7a36e6be39ded86845a6cd Author: Nikola Pajkovsky Date: Tue Aug 29 13:59:03 2017 +0200 scsi: aacraid: get rid of one level of indentation unsigned long byte_count = 0; nseg = scsi_dma_map(scsicmd); if (nseg < 0) return nseg; if (nseg) { ... } return byte_count; is equal to unsigned long byte_count = 0; nseg = scsi_dma_map(scsicmd); if (nseg <= 0) return nseg; ... return byte_count; No other code has changed. [mkp: fix checkpatch complaints] Signed-off-by: Nikola Pajkovsky Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 267 +++++++++++++++++++++--------------------- 1 file changed, 131 insertions(+), 136 deletions(-) commit 913e00a5a0122df7a2ad9d53974f6c068ab5306e Author: Nikola Pajkovsky Date: Tue Aug 29 13:59:02 2017 +0200 scsi: aacraid: fix indentation errors fix stupid indent error, no rocket science here. Signed-off-by: Nikola Pajkovsky Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/comminit.c | 6 +++--- drivers/scsi/aacraid/linit.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0208eeaa650c5c866a3242201678a19e6dc4a14e Author: Long Li Date: Mon Aug 28 17:43:59 2017 -0700 scsi: storvsc: fix memory leak on ring buffer busy When storvsc is sending I/O to Hyper-v, it may allocate a bigger buffer descriptor for large data payload that can't fit into a pre-allocated buffer descriptor. This bigger buffer is freed on return path. If I/O request to Hyper-v fails due to ring buffer busy, the storvsc allocated buffer descriptor should also be freed. [mkp: applied by hand] Fixes: be0cf6ca301c ("scsi: storvsc: Set the tablesize based on the information given by the host") Cc: Signed-off-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 610526527a13e4c91e64ec3dfb4626c5043291c9 Author: Vadim Pasternak Date: Wed Aug 30 22:02:14 2017 +0000 hwmon: (pmbus) Add support for Texas Instruments tps53679 device The below lists of VOUT_MODE command readout with their related VID protocols, Digital to Analog Converter steps, supported by the device: VR12.0 mode, 5-mV DAC - 0x21 VR12.5 mode, 10-mV DAC - 0x22 VR13.0 mode, 10-mV DAC - 0x24 IMVP8 mode, 5-mV DAC - 0x25 VR13.0 mode, 5-mV DAC - 0x27 Signed-off-by: Vadim Pasternak Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/tps53679.c | 113 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) commit f9cbbd256ccebc5911cb163f1cbb59fefd173d9a Author: Bjorn Andersson Date: Sun Aug 27 22:31:42 2017 -0700 remoteproc: Stop subdevices in reverse order Subdevices might depend on earlier registered subdevices for communication purposes, as such they should be stopped in reverse order so that said communication channel is removed after the dependent subdevice is stopped. Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f5423ffa223a0beb755563beac67f741662870b Author: Bjorn Andersson Date: Wed Aug 30 16:26:23 2017 -0700 rpmsg: glink: Release idr lock before returning on error The idr_lock should be released in the case that we don't find the given channel. Fixes: 44f6df922a26 ("rpmsg: glink: Fix idr_lock from mutex to spinlock") Reported-by: Julia Lawall Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0ff4aa6f010801b2a61c203c6e09d01b110fddf Author: Oleksij Rempel Date: Thu Aug 17 09:15:26 2017 +0200 remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver Provide a basic driver to control Cortex M4 co-processor found on NXP i.MX7D and i.MX6SX. Currently it is able to resolve addresses between M4 and main CPU, start and stop the co-processor. Other functionality is not provided or test. This driver was tested on NXP i.MX7D and expected to work on i.MX6SX as well. Signed-off-by: Oleksij Rempel Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 9 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 426 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 436 insertions(+) commit 0862bff5d5c8eb52e5c67e92c2888ddc815fe5e6 Author: Oleksij Rempel Date: Thu Aug 17 09:15:25 2017 +0200 remoteproc: dt: Provide bindings for iMX6SX/7D Remote Processor Controller driver Acked-by: Rob Herring Signed-off-by: Oleksij Rempel Signed-off-by: Bjorn Andersson .../devicetree/bindings/remoteproc/imx-rproc.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit d35d6e92caa00bd44596108f2d7aa560d7057f4a Author: Haiyang Zhang Date: Wed Aug 30 13:37:22 2017 -0700 hv_netvsc: Fix typos in the document of UDP hashing There are two typos in the document, netvsc.txt, regarding UDP hashing level. This patch fixes them. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller Documentation/networking/netvsc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62f3250f3d18ea7d4b4e51ac98cdca29515683a5 Author: Eric Dumazet Date: Wed Aug 30 10:32:58 2017 -0700 xen-netfront: be more drop monitor friendly xennet_start_xmit() might copy skb with inappropriate layout into a fresh one. Old skb is freed, and at this point it is not a drop, but a consume. New skb will then be either consumed or dropped. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b3722fa9ef647eb1ae6a60a5d46f7c67ab09a33 Author: Gal Pressman Date: Sun Aug 13 16:22:38 2017 +0300 net/mlx5e: Support RSS for GRE tunneled packets Introduce a new flow table and indirect TIRs which are used to hash the inner packet headers of GRE tunneled packets. When a GRE tunneled packet is received, the TTC flow table will match the new IPv4/6->GRE rules which will forward it to the inner TTC table. The inner TTC is similar to its counterpart outer TTC table, but matching the inner packet headers instead of the outer ones (and does not include the new IPv4/6->GRE rules). The new rules will not add steering hops since they are added to an already existing flow group which will be matched regardless of this patch. Non GRE traffic will not be affected. The inner flow table will forward the packet to inner indirect TIRs which hash the inner packet and thus result in RSS for the tunneled packets. Testing 8 TCP streams bandwidth over GRE: System: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 21.3 Gbps (Single RQ) Now : 90.5 Gbps (RSS spread on 8 RQs) Signed-off-by: Gal Pressman Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 18 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 248 ++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 57 ++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 4 +- 5 files changed, 321 insertions(+), 17 deletions(-) commit 2729984149e6a23e849a40e16fc3efdc07dd3668 Author: Gal Pressman Date: Sun Aug 13 13:34:42 2017 +0300 net/mlx5e: Support TSO and TX checksum offloads for GRE tunnels Add TX offloads support for GRE tunneled packets by reporting the needed netdev features. Signed-off-by: Gal Pressman Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 51 +++++++++++++++-------- include/linux/mlx5/mlx5_ifc.h | 2 +- 2 files changed, 34 insertions(+), 19 deletions(-) commit 888fcd9cd250ca5d956776e8bd48b2632a18bf32 Author: Gal Pressman Date: Tue Aug 15 14:18:08 2017 +0300 net/mlx5e: Use IP version matching to classify IP traffic This change adds the ability for flow steering to classify IPv4/6 packets with MPLS tag (Ethertype 0x8847 and 0x8848) as standard IP packets and hit IPv4/6 classification steering rules. Since IP packets with MPLS tag header have MPLS ethertype, they missed the IPv4/6 ethertype rule and ended up hitting the default filter forwarding all the packets to the same single RQ (No RSS). Since our device is able to look past the MPLS tag and identify the next protocol we introduce this solution which replaces ethertype matching by the device's capability to perform IP version identification and matching in order to distinguish between IPv4 and IPv6. Therefore, when driver is performing flow steering configuration on the device it will use IP version matching in IP classified rules instead of ethertype matching which will cause relevant MPLS tagged packets to hit this rule as well. If the device doesn't support IP version matching the driver will fall back to use legacy ethertype matching in the steering as before. Signed-off-by: Gal Pressman Signed-off-by: Ariel Levkovich Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 33 ++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) commit 7ee8adcf271acd3baa5ab12cb804ab36fda16b3f Author: Jonathan Corbet Date: Thu Aug 24 14:27:05 2017 -0600 doc: Add documentation for the genalloc subsystem Genalloc/genpool has kerneldoc comments, but nothing has ever been pulled into the docs themselves. Here's a first attempt, repurposed from an article I wrote at https://lwn.net/Articles/729653/. Signed-off-by: Jonathan Corbet Documentation/core-api/genalloc.rst | 144 ++++++++++++++++++++++++++++++++++++ Documentation/core-api/index.rst | 1 + 2 files changed, 145 insertions(+) commit 48c40c26fc0103d40eb402fcd8fcf800302c83ca Author: Alexander Kuleshov Date: Wed Aug 23 00:39:13 2017 +0600 assoc_array: fix path to assoc_array documentation Signed-off-by: Alexander Kuleshov Signed-off-by: Jonathan Corbet lib/assoc_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90774a93ef075b39e55d31fe56fc286d71a046ac Author: Colin Ian King Date: Wed Aug 30 18:15:25 2017 +0100 bpf: test_maps: fix typos, "conenct" and "listeen" Trivial fix to typos in printf error messages: "conenct" -> "connect" "listeen" -> "listen" thanks to Daniel Borkmann for spotting one of these mistakes Signed-off-by: Colin Ian King Acked-by: John Fastabend Acked-by: Daniel Borkmann Acked-by: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_maps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e4a56139d091713b8dff93632f2149f28494ca8 Author: Colin Ian King Date: Wed Aug 30 12:40:12 2017 +0100 qed: fix spelling mistake: "calescing" -> "coalescing" Trivial fix to spelling mistake in DP_NOTICE message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 752b06946cc99534a7a4a11b7196e9a1e3d7e098 Author: Salil Mehta Date: Wed Aug 30 12:06:03 2017 +0100 net: hns3: Fixes the wrong IS_ERR check on the returned phydev value This patch removes the wrong check being done for the phy device being returned by the mdiobus_get_phy() function. This function never returns the error pointers. Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet Driver for hip08 SoC") Reported-by: Dan Carpenter Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc8007e8fa88be6d92ee6e2371d16b5860496a2d Author: Bhumika Goyal Date: Wed Aug 30 14:55:08 2017 +0530 net: bcm63xx_enet: make bcm_enetsw_ethtool_ops const Make this const as it is never modified. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5829d70b0b6cd055e7a9af3abe573927e919e30b Author: Ahmed Abdelsalam Date: Wed Aug 30 10:50:37 2017 +0200 ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200" IPv6 packet may carry more than one extension header, and IPv6 nodes must accept and attempt to process extension headers in any order and occurring any number of times in the same packet. Hence, there should be no assumption that Segment Routing extension header is to appear immediately after the IPv6 header. Moreover, section 4.1 of RFC 8200 gives a recommendation on the order of appearance of those extension headers within an IPv6 packet. According to this recommendation, Segment Routing extension header should appear after Hop-by-Hop and Destination Options headers (if they present). This patch fixes the get_srh(), so it gets the segment routing header regardless of its position in the chain of the extension headers in IPv6 packet, and makes sure that the IPv6 routing extension header is of Type 4. Signed-off-by: Ahmed Abdelsalam Acked-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_local.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 463a0fdc3e800c04ec62b31627909baf4611716a Author: Markus Heiser Date: Fri Jun 16 21:27:48 2017 +0200 kernel-doc parser mishandles declarations split into lines Reported by Johannes Berg [1]. Problem here: function process_proto_type() concatenates the striped lines of declaration without any whitespace. A one-liner of:: struct something { struct foo bar; }; has to be:: struct something {struct foo bar;}; Without the patching process_proto_type(), the result missed the space between 'foo' and 'bar':: struct something {struct foobar;}; Bugfix of process_proto_type() brings next error when blank lines between enum declaration:: warning: Enum value ' ' not described in enum 'foo' Problem here: dump_enum() does not strip leading whitespaces from the concatenated string (with the new additional space from process_proto_type). [1] https://www.mail-archive.com/linux-doc@vger.kernel.org/msg12410.html Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet scripts/kernel-doc | 4 ++++ 1 file changed, 4 insertions(+) commit 35aed4acb9cec6e4e250674dd3060044dbda6e68 Merge: d36b82b 89273bc Author: David S. Miller Date: Wed Aug 30 15:17:46 2017 -0700 Merge branch 'mvpp2-comphy' Antoine Tenart says: ==================== net: mvpp2: comphy configuration This series, following up the one one the GoP/MAC configuration, aims at stopping to depend on the firmware/bootloader configuration when using the PPv2 engine. With this series the PPv2 driver does not need to rely on a previous configuration, and dynamic reconfiguration while the kernel is running can be done (i.e. switch one port from SGMII to 10G, or the opposite). A port can now be configured in a different mode than what's done in the firmware/bootloader as well. The series first contain patches in the generic PHY framework to support what is called the comphy (common PHYs), which is an h/w block providing PHYs that can be configured in various modes ranging from SGMII, 10G to SATA and others. As of now only the SGMII and 10G modes are supported by the comphy driver. Then patches are modifying the PPv2 driver to first add the comphy initialization sequence (i.e. calls to the generic PHY framework) and to then take advantage of this to allow dynamic reconfiguration (i.e. configuring the mode of a port given what's connected, between sgmii and 10G). Note the use of the comphy in the PPv2 driver is kept optional (i.e. if not described in dt the driver still as before an relies on the firmware/bootloader configuration). Finally there are dt/defconfig patches to describe and take advantage of this. This was tested on a range of devices: 8040-db, 8040-mcbin and 7040-db. @Dave: the dt patches should go through the mvebu tree (patches 9-13). Thanks! Antoine Since v3: - Now use of_phy_simple_xlate() to retrieve the phy. - Added an owner in the phy_ops structure. - Now allow the module to be selected with COMPILE_TEST. - Removed unused parameter in the comphy set_mode functions. - Added Kishon Acked-by in patch 1. Since v2: - Kept the link mode enforcement. - Removed the netif_running() check. - Reworded the "dynamic reconfiguration of the PHY mode" commit log. - Added one patch not to force the GMAC autoneg parameters when using the XLG MAC. Since v1: - Updated the mode settings variable name in the comphy driver to have 'cp110' in it. - Documented the PHY cell argument in the dt documentation. - New patch adding comphy phandles for the 7040-db board. - Checked if the carrier_on/off functions were needed. They are. - s/PHY/generic PHY/ in commit log of patch 1. - Rebased on the latest net-next/master. ==================== Signed-off-by: David S. Miller commit 89273bc060d8c7a70999736fe15b2fb3326d0da8 Author: Antoine Tenart Date: Wed Aug 30 10:29:19 2017 +0200 net: mvpp2: dynamic reconfiguration of the comphy/GoP/MAC This patch adds logic to reconfigure the comphy/GoP/MAC when the link state is updated at runtime. This is very useful on boards where many link speed are supported: depending on what is negotiated the PPv2 driver will automatically reconfigures the link between the PHY and the MAC. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 65a2c09aea8b9b620bbb3e59f68090a2b7151865 Author: Antoine Tenart Date: Wed Aug 30 10:29:18 2017 +0200 net: mvpp2: do not set GMAC autoneg when using XLG MAC When using the XLG MAC, it does not make sense to force the GMAC autoneg parameters. This patch adds checks to only set the GMAC autoneg parameters when needed (i.e. when not using the XLG MAC). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 64 +++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 22 deletions(-) commit f55744adeee8598a05f0714b8fe9d131865ef060 Author: Antoine Tenart Date: Wed Aug 30 10:29:17 2017 +0200 net: mvpp2: improve the link management function When the link status changes, the phylib calls the link_event function in the mvpp2 driver. Before this patch only the egress/ingress transmit was enabled/disabled. This patch adds more functionality to the link status management code by enabling/disabling the port per-cpu interrupts, and the port itself. The queues are now stopped as well, and the netif carrier helpers are called. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 968b211c620b567a4d2183beb0516cbd2c73560a Author: Antoine Tenart Date: Wed Aug 30 10:29:16 2017 +0200 net: mvpp2: simplify the link_event function The link_event function is somewhat complicated. This cosmetic patch simplifies it. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 542897d987b0d16c4346952f116acb80a8e82a38 Author: Antoine Tenart Date: Wed Aug 30 10:29:15 2017 +0200 net: mvpp2: initialize the comphy On some platforms, the comphy is between the MAC GoP and the PHYs. The mvpp2 driver currently relies on the firmware/bootloader to configure the comphy. As a comphy driver was added to the generic PHY framework, this patch uses it in the mvpp2 driver to configure the comphy at boot time to avoid relying on the bootloader. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 44 +++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 9c2cbd478ee1830670e562a68d74b2336721b202 Author: Antoine Tenart Date: Wed Aug 30 10:29:14 2017 +0200 Documentation/bindings: phy: document the Marvell comphy driver The Marvell Armada 7K/8K SoCs contains an hardware block called COMPHY that provides a number of shared PHYs used by various interfaces in the SoC: network, SATA, PCIe, etc. This Device Tree binding allows to describe this COMPHY hardware block. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller .../devicetree/bindings/phy/phy-mvebu-comphy.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit d0438bd6aa097e77f50989c849dbe5f8ff0937ce Author: Antoine Tenart Date: Wed Aug 30 10:29:13 2017 +0200 phy: add the mvebu cp110 comphy driver On the CP110 unit, which can be found on various Marvell platforms such as the 7k and 8k (currently), a comphy (common PHYs) hardware block can be found. This block provides a number of PHYs which can be used in various modes by other controllers (network, SATA ...). These common PHYs must be configured for the controllers using them to work correctly either at boot time, or when the system runs to switch the mode used. This patch adds a driver for this comphy hardware block, providing callbacks for the its PHYs so that consumers can configure the modes used. As of this commit, two modes are supported by the comphy driver: sgmii and 10gkr. Signed-off-by: Antoine Tenart Acked-by: Kishon Vijay Abraham I Signed-off-by: David S. Miller drivers/phy/marvell/Kconfig | 11 + drivers/phy/marvell/Makefile | 1 + drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 644 +++++++++++++++++++++++++++ 3 files changed, 656 insertions(+) commit 5c23f2dc8eeb5a6010cb66119d942361bc8ec833 Author: Antoine Tenart Date: Wed Aug 30 10:29:12 2017 +0200 phy: add sgmii and 10gkr modes to the phy_mode enum This patch adds more generic PHY modes to the phy_mode enum, to allow configuring generic PHYs to the SGMII and/or the 10GKR mode by using the set_mode callback. Signed-off-by: Antoine Tenart Acked-by: Kishon Vijay Abraham I Signed-off-by: David S. Miller include/linux/phy/phy.h | 2 ++ 1 file changed, 2 insertions(+) commit d36b82bcdd1908450f8c3ba3f9b7a189cda8c69c Author: Stefan Sørensen Date: Wed Aug 30 08:58:47 2017 +0200 dp83640: don't hold spinlock while calling netif_rx_ni We should not hold a spinlock while pushing the skb into the networking stack, so move the call to netif_rx_ni out of the critical region to where we have dropped the spinlock. Signed-off-by: Stefan Sørensen Signed-off-by: David S. Miller drivers/net/phy/dp83640.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5823e330b58c52d74bcf4588626863994a53f6d9 Author: Jon Derrick Date: Wed Aug 30 15:05:59 2017 -0600 iommu/vt-d: Prevent VMD child devices from being remapping targets VMD child devices must use the VMD endpoint's ID as the requester. Because of this, there needs to be a way to link the parent VMD endpoint's IOMMU group and associated mappings to the VMD child devices such that attaching and detaching child devices modify the endpoint's mappings, while preventing early detaching on a singular device removal or unbinding. The reassignment of individual VMD child devices devices to VMs is outside the scope of VMD, but may be implemented in the future. For now it is best to prevent any such attempts. Prevent VMD child devices from returning an IOMMU, which prevents it from exposing an iommu_group sysfs directory and allowing subsequent binding by userspace-access drivers such as VFIO. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas drivers/iommu/intel-iommu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c37f23d44e866d079d30399cb358dd19617562a1 Author: Jon Derrick Date: Thu Aug 17 12:10:13 2017 -0600 x86/PCI: Use is_vmd() rather than relying on the domain number Use the is_vmd() predicate to identify devices below a VMD host rather than relying on the domain number. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1b0e54e16b3db7882b4158ab4a26b87841753fd Author: Jon Derrick Date: Thu Aug 17 12:10:12 2017 -0600 x86/PCI: Move VMD quirk to x86 fixups VMD currently only exists for Intel x86 products, so move the VMD quirk to arch/x86. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 17 +++++++++++++++++ drivers/pci/quirks.c | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 7674d05dd2dcf3904b3ea6beb222e020879626f1 Author: Jon Derrick Date: Thu Aug 17 12:10:11 2017 -0600 MAINTAINERS: Add Jonathan Derrick as VMD maintainer Add Jonathan Derrick as VMD maintainer. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Keith Busch MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f379fdf10b12e19080ee4e2ce27ed54d9e8806d8 Merge: c2f8a6c 65a206c Author: David S. Miller Date: Wed Aug 30 14:38:59 2017 -0700 Merge branch 'net_sched-idr' Chris Mi says: ==================== net/sched: Improve getting objects by indexes Using current TC code, it is very slow to insert a lot of rules. In order to improve the rules update rate in TC, we introduced the following two changes: 1) changed cls_flower to use IDR to manage the filters. 2) changed all act_xxx modules to use IDR instead of a small hash table But IDR has a limitation that it uses int. TC handle uses u32. To make sure there is no regression, we add several new IDR APIs to support unsigned long. v2 == Addressed Hannes's comment: express idr_alloc in terms of idr_alloc_ext and most of the other functions ==================== Signed-off-by: David S. Miller commit 65a206c01e8e7ffe971477a36419422099216eff Author: Chris Mi Date: Wed Aug 30 02:31:59 2017 -0400 net/sched: Change act_api and act_xxx modules to use IDR Typically, each TC filter has its own action. All the actions of the same type are saved in its hash table. But the hash buckets are too small that it degrades to a list. And the performance is greatly affected. For example, it takes about 0m11.914s to insert 64K rules. If we convert the hash table to IDR, it only takes about 0m1.500s. The improvement is huge. But please note that the test result is based on previous patch that cls_flower uses IDR. Signed-off-by: Chris Mi Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/act_api.h | 76 +++++--------- net/sched/act_api.c | 251 ++++++++++++++++++++++----------------------- net/sched/act_bpf.c | 17 ++- net/sched/act_connmark.c | 16 ++- net/sched/act_csum.c | 16 ++- net/sched/act_gact.c | 16 ++- net/sched/act_ife.c | 18 ++-- net/sched/act_ipt.c | 26 +++-- net/sched/act_mirred.c | 19 ++-- net/sched/act_nat.c | 16 ++- net/sched/act_pedit.c | 18 ++-- net/sched/act_police.c | 18 ++-- net/sched/act_sample.c | 17 ++- net/sched/act_simple.c | 20 ++-- net/sched/act_skbedit.c | 18 ++-- net/sched/act_skbmod.c | 18 ++-- net/sched/act_tunnel_key.c | 20 ++-- net/sched/act_vlan.c | 22 ++-- 18 files changed, 278 insertions(+), 344 deletions(-) commit c15ab236d69dd6dad24541400f460c47853803f8 Author: Chris Mi Date: Wed Aug 30 02:31:58 2017 -0400 net/sched: Change cls_flower to use IDR Currently, all filters with the same priority are linked in a doubly linked list. Every filter should have a unique handle. To make the handle unique, we need to iterate the list every time to see if the handle exists or not when inserting a new filter. It is time-consuming. For example, it takes about 5m3.169s to insert 64K rules. This patch changes cls_flower to use IDR. With this patch, it takes about 0m1.127s to insert 64K rules. The improvement is huge. But please note that in this testing, all filters share the same action. If every filter has a unique action, that is another bottleneck. Follow-up patch in this patchset addresses that. Signed-off-by: Chris Mi Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_flower.c | 55 +++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) commit 388f79fda74fd3d8700ed5d899573ec58c2e0253 Author: Chris Mi Date: Wed Aug 30 02:31:57 2017 -0400 idr: Add new APIs to support unsigned long The following new APIs are added: int idr_alloc_ext(struct idr *idr, void *ptr, unsigned long *index, unsigned long start, unsigned long end, gfp_t gfp); void *idr_remove_ext(struct idr *idr, unsigned long id); void *idr_find_ext(const struct idr *idr, unsigned long id); void *idr_replace_ext(struct idr *idr, void *ptr, unsigned long id); void *idr_get_next_ext(struct idr *idr, unsigned long *nextid); Signed-off-by: Chris Mi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/idr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++-- include/linux/radix-tree.h | 21 ++++++++++++-- lib/idr.c | 66 +++++++++++++++++++++++++------------------- lib/radix-tree.c | 6 ++-- 4 files changed, 125 insertions(+), 37 deletions(-) commit 33c2f4ec984d8a78f15b9d989968733606512bb2 Author: Josh Holland Date: Wed Aug 23 21:42:32 2017 +0100 docs: ReSTify table of contents in core.rst Sphinx will now generate the table of contents automatically, which avoids having the ToC getting out of sync with the rest of the document. Signed-off-by: Josh Holland Signed-off-by: Jonathan Corbet Documentation/security/keys/core.rst | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit f7a6dd84b47d34666e5dc394b50ed50fa1571765 Author: Randy Dunlap Date: Mon Aug 28 17:40:39 2017 -0700 docs: process: drop git snapshots from applying-patches.rst Drop all references to git daily snapshots of Linux mainline git tree since they are no longer generated. Drop the "Last update" info since 'git log' is a better source of that info and since the Last update date is not being updated. Yes, I read that this file is obsolete, but it still has some useful information in it. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/process/applying-patches.rst | 43 +----------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) commit 46a6561b29cb42c06ebf193ccec3c5b666c0fc3f Author: Keith Busch Date: Wed Aug 30 12:15:04 2017 -0400 PCI: vmd: Remove IRQ affinity so we can allocate more IRQs VMD hardware has to share its vectors among child devices in its PCI domain so we should allocate as many as possible rather than just ones that can be affinitized. pci_alloc_irq_vectors_affinity() limits the number of affinitized IRQs to the number of present CPUs (see irq_calc_affinity_vectors()). But we'd prefer to have more vectors, even if they aren't distributed across the CPUs, so use pci_alloc_irq_vectors() instead. Reported-by: Brad Goodman Signed-off-by: Keith Busch [bhelgaas: add irq_calc_affinity_vectors() reference to changelog] Signed-off-by: Bjorn Helgaas drivers/pci/host/vmd.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 7dfedbac8b9e264711904fa5168a31ea8bc8ccce Author: John de la Garza Date: Tue Aug 29 18:48:54 2017 -0700 Documentation:input: fix typo Signed-off-by: John de la Garza Signed-off-by: Jonathan Corbet Documentation/input/input.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44c07365e9e2c87c7e04d63293618c391d1480ec Author: Kuninori Morimoto Date: Thu Aug 24 00:58:07 2017 +0000 ASoC: add Component level set_jack In current ALSA SoC, Codec only has set_jack 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. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 4 ++++ sound/soc/soc-core.c | 11 +++++++++++ sound/soc/soc-jack.c | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit ef641e5d5e6c7a07748239036b786a90ba9b9a95 Author: Kuninori Morimoto Date: Thu Aug 24 00:57:51 2017 +0000 ASoC: add Component level set_pll In current ALSA SoC, Codec only has set_pll 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. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 7 +++++++ sound/soc/soc-core.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 5 deletions(-) commit 71ccef0df533cd9c8c6cbf1483a636a092088ab9 Author: Kuninori Morimoto Date: Thu Aug 24 00:57:35 2017 +0000 ASoC: add Component level set_sysclk In current ALSA SoC, Codec only has set_sysclk 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. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 11 +++++++++++ sound/soc/soc-core.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 51 insertions(+), 5 deletions(-) commit b388dc1f62a9bdd9c4758a0664e61d0f9a9da519 Merge: 6969b2b cc4a41f Author: Mark Brown Date: Wed Aug 30 22:15:31 2017 +0100 Merge tag 'v4.13-rc7' into asoc-component Linux 4.13-rc7 commit 417fb50d5516e8526769c16ff5b92de47adbe727 Author: Arvind Yadav Date: Wed Aug 23 22:47:15 2017 +0530 vfio: platform: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Alex Williamson drivers/vfio/platform/vfio_amba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6586b561a91cd80a91c8f107ed0d144feb3eadc2 Author: Alex Williamson Date: Thu Aug 17 22:10:20 2017 -0600 vfio: Stall vfio_del_group_dev() for container group detach When the user unbinds the last device of a group from a vfio bus driver, the devices within that group should be available for other purposes. We currently have a race that makes this generally, but not always true. The device can be unbound from the vfio bus driver, but remaining IOMMU context of the group attached to the container can result in errors as the next driver configures DMA for the device. Wait for the group to be detached from the IOMMU backend before allowing the bus driver remove callback to complete. Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d935ad91f07d20268fca97b1ddc56a816ac71826 Author: Eric Auger Date: Fri Aug 11 15:16:06 2017 +0200 vfio: fix noiommu vfio_iommu_group_get reference count In vfio_iommu_group_get() we want to increase the reference count of the iommu group. In noiommu case, the group does not exist and is allocated. iommu_group_add_device() increases the group ref count. However we then call iommu_group_put() which decrements it. This leads to a "refcount_t: underflow WARN_ON". Only decrement the ref count in case of iommu_group_add_device failure. Signed-off-by: Eric Auger Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1591caf2d5eafdfb3b300691f8f99e5bb97d5406 Author: Cédric Le Goater Date: Wed Aug 30 13:25:51 2017 +0200 leds: pca955x: check for I2C errors This should also allow probing to fail when a pca955x chip is not found on a I2C bus. Signed-off-by: Cédric Le Goater Signed-off-by: Jacek Anaszewski drivers/leds/leds-pca955x.c | 114 ++++++++++++++++++++++++++++++++------------ 1 file changed, 83 insertions(+), 31 deletions(-) commit c31c83c970165b9f2cb4c0ad6ae89d0a8242cf7b Author: Biju Das Date: Thu Aug 24 10:35:44 2017 +0100 PCI: rcar: Add device tree support for r8a7743/5 Add internal PCI bridge support for r8a7743/5 SoC. The Renesas RZ/G1[ME] (R8A7743/5) internal PCI bridge is identical to the R-Car Gen2 family. This doesn't change the driver, so it does nothing by itself. But it does mean that checkpatch won't complain about a future patch that adds "renesas,pci-r8a7743" to a DT, which helps ensure that shipped DTs use documented compatibility strings. Signed-off-by: Biju Das [bhelgaas: add explanatory note] Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fa3722f6496640b472bed1613e76da325211d757 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 (cherry-picked from commit 3ffff01749928ea5ffdae2cecad561898c3b0f71) Signed-off-by: Rodrigo Vivi 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 18db229d30cd19c987885b79b90344ae061e870e 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ä (cherry picked from commit 2ec4cf4057fcb98cb4cabdd57fa12357e438ae98) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8837d98d268792ab4c5a488368acd908458bcc0 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ä (cherry picked from commit 303ba6955499ef757ca5ddcc816e370cc7581cb5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_display.c | 108 +++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 44 deletions(-) commit 0168bdfc9c53a27a81bbe6c061dc118c1dd95a36 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 (cherry picked from commit b69a784f5e2308d6360a76eceae450e96751f3e4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 3b24e7e8109bcf2089b3052d2ddd301e33042034 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 (cherry picked from commit a575c6761757232ea2c7dc9f370640754b90cc69) Signed-off-by: Rodrigo Vivi 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 9c8eb2d5cbdb8a97a0b2a4da2825a2c4c0a202dc 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 (cherry picked from commit 908b6e6e8ab4c1e0c3783be4c4b437ac6fa374ea) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_fbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dbbccdc4ced015cdd4051299bd87fbe0254ad351 Author: Marcel Holtmann Date: Mon Aug 21 01:29:08 2017 -0700 Bluetooth: Add option for disabling legacy ioctl interfaces The legacy ioctl interfaces are only useful for BR/EDR operation and since Linux 3.4 no longer needed anyway. This options allows disabling them alltogether and use only management interfaces for setup and control. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/Kconfig | 10 ++++++++++ net/bluetooth/hci_sock.c | 6 ++++++ 2 files changed, 16 insertions(+) commit 67616feda99e32cb676b0907284bbb6957e45480 Author: Takashi Iwai Date: Wed Aug 30 15:39:32 2017 +0200 ALSA: pcm: Unify ioctl functions for playback and capture streams Some ioctl functions are implemented individually for both playback and capture streams although most of the codes are identical with just a few different stream-specific function calls. This patch unifies these places, removes the superfluous trivial check and flattens the call paths as a cleanup. Meanwhile, for better readability, some codes (e.g. xfer ioctls or forward/rewind ioctls) are factored out as functions. Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 5 +- sound/core/pcm_native.c | 283 ++++++++++++++++++------------------------------ 2 files changed, 105 insertions(+), 183 deletions(-) commit 7d8e8292013ab72ae1f1500cbc91f198ccb1826d Author: Takashi Iwai Date: Wed Aug 30 16:13:25 2017 +0200 ALSA: Get rid of card power_lock Currently we're taking power_lock at each card component for assuring the power-up sequence, but it doesn't help anything in the implementation at the moment: it just serializes unnecessarily the callers, but it doesn't protect about the power state change itself. It used to have some usefulness in the early days where we managed the PM manually. But now the suspend/resume core procedure is beyond our hands, and power_lock lost its meaning. This patch drops the power_lock from allover the places. There shouldn't be any issues by this change, as it's no helper regarding the power state change. Rather we'll get better performance by removing the serialization; which is the only slight concern of any behavior change, but it can't be a showstopper, after all. Signed-off-by: Takashi Iwai include/sound/core.h | 13 ---------- sound/core/control.c | 58 ++++++++++++++++++++++++--------------------- sound/core/control_compat.c | 34 ++++++++++++-------------- sound/core/init.c | 5 ---- sound/core/pcm_native.c | 30 ++++++----------------- sound/soc/soc-core.c | 2 -- 6 files changed, 53 insertions(+), 89 deletions(-) commit c2f8a6cee632cdd2e70de0089f4480ddd7998748 Merge: 2c667d4 ceed73a Author: David S. Miller Date: Wed Aug 30 11:41:14 2017 -0700 Merge branch 'add-rmnet-driver' Subash Abhinov Kasiviswanathan says: ==================== net: Add support for rmnet driver This patch series adds support for the rmnet driver which is required to support recent chipsets using Qualcomm Technologies, Inc. modems. The data from hardware follows the multiplexing and aggregation protocol (MAP). This driver can be used to register onto any physical network device in IP mode. Physical transports include USB, HSIC, PCIe and IP accelerator. rmnet driver helps to decode these packets and queue them to network stack (and encode and transmit it to the physical device). v1: Same as the RFC patch with some minor fixes for issues reported by kbuild test robot. v1->v2: Change datatypes and remove config IOCTL as mentioned by David. Also fix checkpatch issues and remove some unused code. v2->v3: Move location to drivers/net and rename to rmnet. Change the userspace - netlink communication from custom netlink to rtnl_link_ops. Refactor some code. Use a fixed config for ingress and egress. v3->v4: Move location to drivers/net/ethernet/qualcomm/. Fix comments from Stephen and Jiri - Split the ether and arp type changes into seperate patches. Remove debug and custom logging and switch to standard netdevice log. Remove module parameters. Refactor and change some code style issues. v4->v5: Rename some structs and variables. Move the initializer before the for loop start. Put the arp type in correct sequence. v5->v6: Fix comments from Dan - Use the upper link API. As a result, remove all the refcounting logic. Device refcount is explicitly held on real_dev on rx_handler registration only. Modifiy the flow control struct. Remove the unused ethernet mode handling. v6->v7: Fix comments from David - Add newline to end of Makefile. Remove inline from .c files. Move the module init/exit to rmnet config. Fix an error reported by kbuild test robot for an unused file. v7->v8: Use a smaller value for ETH_P_MAP as mentioned by David. Change netdev_info to netdev_dbg as mentioned by Andew. Fix comments from Stephen regarding netdev_priv and sparse related errors of using 0 as NULL v8->v9: Fix comments from David - Remove the CFLAG rule. Change the way rmnet devices are freed. Instead of using a workqueue to unregister devices individually, go through the list and free all devices within the rtnl_lock(). v9->v10: Actually fix the locking as mentioned by David. The locking scheme is mentioned in a comment in rmnet_config.c. Change comment near MAP type definition as mentioned by Dan. Refactor some code. v10->v11: Allow RMNET to compile as a module as mentioned by David ==================== Signed-off-by: David S. Miller commit ceed73a2cf4aff2921802aa3d21d45280677547d Author: Subash Abhinov Kasiviswanathan Date: Tue Aug 29 22:44:18 2017 -0600 drivers: net: ethernet: qualcomm: rmnet: Initial implementation RmNet driver provides a transport agnostic MAP (multiplexing and aggregation protocol) support in embedded module. Module provides virtual network devices which can be attached to any IP-mode physical device. This will be used to provide all MAP functionality on future hardware in a single consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller Documentation/networking/rmnet.txt | 82 ++++ drivers/net/ethernet/qualcomm/Kconfig | 2 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/rmnet/Kconfig | 12 + drivers/net/ethernet/qualcomm/rmnet/Makefile | 10 + drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 419 +++++++++++++++++++++ drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 56 +++ .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 271 +++++++++++++ .../net/ethernet/qualcomm/rmnet/rmnet_handlers.h | 26 ++ drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 88 +++++ .../ethernet/qualcomm/rmnet/rmnet_map_command.c | 107 ++++++ .../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 105 ++++++ .../net/ethernet/qualcomm/rmnet/rmnet_private.h | 45 +++ drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 170 +++++++++ drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 29 ++ 15 files changed, 1424 insertions(+) commit cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1 Author: Subash Abhinov Kasiviswanathan Date: Tue Aug 29 22:44:17 2017 -0600 net: arp: Add support for raw IP device Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) commit 7373ae7e8f0bf2c0718422481da986db5058b005 Author: Subash Abhinov Kasiviswanathan Date: Tue Aug 29 22:44:16 2017 -0600 net: ether: Add support for multiplexing and aggregation type Define the Qualcomm multiplexing and aggregation (MAP) ether type 0x00F9. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller include/uapi/linux/if_ether.h | 3 +++ 1 file changed, 3 insertions(+) commit c4a9d1892f1ce6fe040b717b68bd21e689cc2410 Author: Bob Peterson Date: Wed Aug 30 09:26:09 2017 -0500 GFS2: Fix non-recursive truncate bug Before this patch if you truncated a file to a smaller size it wasn't freeing all the blocks properly. There are two reasons. First, the metapath comparison was not comparing previous heights. I added a function, mp_eq_to_hgt, which checks the metapath at all heights prior to the target height. Second, in function find_nonnull_ptr, it needed to zero out all pointers for heights following the target height. Translated into decimal integer terms, this way a number like 299, when incremented, becomes 300, not 399. The 2 gets incremented to 3, and the following digits need to be reset. These two things allow the truncate state machine to properly find the blocks it needs to delete. Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 2c667d40a67a6a49343a75437b5e49d301a07a53 Merge: 0da93d2 31770e3 Author: David S. Miller Date: Wed Aug 30 11:20:09 2017 -0700 Merge branch 'tcp-readd-hp' Florian Westphal says: ==================== tcp: re-add header prediction Eric reported a performance regression caused by header prediction removal. We now call tcp_ack() much more frequently, for some workloads this brings in enough cache line misses to become noticeable. We could possibly still kill HP provided we find a different way to suppress unneeded tcp_ack, but given we're late in the cycle it seems preferable to revert. ==================== Signed-off-by: David S. Miller commit 31770e34e43d6c8dee129bfee77e56c34e61f0e5 Author: Florian Westphal Date: Wed Aug 30 19:24:58 2017 +0200 tcp: Revert "tcp: remove header prediction" This reverts commit 45f119bf936b1f9f546a0b139c5b56f9bb2bdc78. Eric Dumazet says: We found at Google a significant regression caused by 45f119bf936b1f9f546a0b139c5b56f9bb2bdc78 tcp: remove header prediction In typical RPC (TCP_RR), when a TCP socket receives data, we now call tcp_ack() while we used to not call it. This touches enough cache lines to cause a slowdown. so problem does not seem to be HP removal itself but the tcp_ack() call. Therefore, it might be possible to remove HP after all, provided one finds a way to elide tcp_ack for most cases. Reported-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/tcp.h | 6 ++ include/net/tcp.h | 23 ++++++ include/uapi/linux/snmp.h | 2 + net/ipv4/proc.c | 2 + net/ipv4/tcp.c | 4 +- net/ipv4/tcp_input.c | 188 ++++++++++++++++++++++++++++++++++++++++++++-- net/ipv4/tcp_minisocks.c | 2 + net/ipv4/tcp_output.c | 2 + 8 files changed, 223 insertions(+), 6 deletions(-) commit c1d2b4c3e204e602c97680335d082b8d012d08cd Author: Florian Westphal Date: Wed Aug 30 19:24:57 2017 +0200 tcp: Revert "tcp: remove CA_ACK_SLOWPATH" This change was a followup to the header prediction removal, so first revert this as a prerequisite to back out hp removal. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/tcp.h | 5 +++-- net/ipv4/tcp_input.c | 35 +++++++++++++++++++---------------- net/ipv4/tcp_westwood.c | 31 +++++++++++++++++++++++++++---- 3 files changed, 49 insertions(+), 22 deletions(-) commit 943fa0228252320de503b923dfe46334f755aaae Author: Jeffy Chen Date: Sat Aug 12 08:40:38 2017 +0800 ASoC: hdmi-codec: Use different name for playback streams Currently the hdmi i2s playback stream and hdmi spdif playback stream are using the same name. So when they are enabled at the same time, kernel will print this warning: [ 2.201835] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: Failed to create Playback debugfs file Assign different names to them to avoid that. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cdbf481e927278787042857e02c3944f588ad25 Author: Fabrice Gasnier Date: Wed Aug 30 17:55:28 2017 +0200 regulator: Add support for stm32-vrefbuf Add regulator driver for STM32 voltage reference buffer which can be used as voltage reference for ADCs, DACs and external components through dedicated VREF+ pin. Signed-off-by: Fabrice Gasnier Signed-off-by: Mark Brown drivers/regulator/Kconfig | 12 +++ drivers/regulator/Makefile | 1 + drivers/regulator/stm32-vrefbuf.c | 202 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 215 insertions(+) commit ef7bb293a670c7a81c7a5b8aad6b93ba32e0e9ec Author: Fabrice Gasnier Date: Wed Aug 30 17:55:27 2017 +0200 regulator: Add STM32 Voltage Reference Buffer Document STM32 VREFBUF (voltage reference buffer) which can be used as voltage reference for ADCs, DACs and external components. Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Mark Brown .../bindings/regulator/st,stm32-vrefbuf.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0da93d2ebb5d198a4601bd5ad7695f3c6fd36062 Author: Greg KH Date: Wed Aug 30 13:16:49 2017 +0200 staging: irda: fix init level for irda core When moving the IRDA code out of net/ into drivers/staging/irda/net, the link order changes when IRDA is built into the kernel. That causes a kernel crash at boot time as netfilter isn't initialized yet. To fix this, move the init call level of the irda core to be device_initcall() as the link order keeps this being initialized at the correct time. Reported-by: kernel test robot Reported-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/staging/irda/net/irmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1595de0e7f00908f344ef7bbf26da94a8263cf78 Merge: 983d7c4 6b0e06d Author: Olof Johansson Date: Wed Aug 30 09:58:03 2017 -0700 Merge tag 'sunxi-dt-for-4.14-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.14, take 3 One new board, and a revert of a patch relying on a binding not stable enough so that we can commit to it. * tag 'sunxi-dt-for-4.14-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: Revert "ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Beelink X2" ARM: sun8i: a83t: Add device tree for Sinovoip Bananapi BPI-M3 Signed-off-by: Olof Johansson commit 66a3479e12176e98a847971558ff8b795f732c8c Author: Himanshu Jha Date: Wed Aug 30 00:24:50 2017 +0530 rsi: remove memset before memcpy calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 1 - drivers/net/wireless/rsi/rsi_91x_usb.c | 1 - 2 files changed, 2 deletions(-) commit 83ec489193894e52bd395eec470f4f7c4286d4a5 Author: Stanislaw Gruszka Date: Fri Aug 25 17:04:15 2017 +0200 rt2800: fix TX_PIN_CFG setting for non MT7620 chips Since commit 41977e86c984 ("rt2x00: add support for MT7620") we do not initialize TX_PIN_CFG setting. This cause breakage at least on some RT3573 devices. To fix the problem patch restores previous behaviour for non MT7620 chips. Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1480829 Reported-and-tested-by: Jussi Eloranta Cc: Daniel Golle Signed-off-by: Stanislaw Gruszka Acked-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0270639e899e21ad0531621f23a238d4bff63653 Author: Dan Carpenter Date: Fri Aug 25 11:43:51 2017 +0300 rsi: missing unlocks on error paths There is a missing unlock if rsi_find_sta() fails in rsi_mac80211_ampdu_action() or if we hit the -EINVAL path in rsi_mac80211_sta_add(). Fixes: 3528608f3a79 ("rsi: handle station connection in AP mode") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit fc4386729491f8f1cb9516f2e3c2ff1d7af6cb4e Author: Dan Carpenter Date: Fri Aug 25 11:40:37 2017 +0300 rsi: update some comments These functions don't return -1 on failure. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2b17939d9ec4f5d8c50b6277a8e5c0e5a4a8c96b Author: Dmitry Rezvanov Date: Sun Jun 18 21:40:49 2017 +0900 ARM: dts: at91: at91sam9g45: add AC97 AT91SAM9G45 has an AC97 controller, but it is not described in the dts file. This patch adds AC97 node in device tree. Signed-off-by: Dmitry Rezvanov Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9g45.dtsi | 21 +++++++++++++++++++++ arch/arm/boot/dts/at91sam9m10g45ek.dts | 4 ++++ 2 files changed, 25 insertions(+) commit ae0b63d97d8efc377cc5b161abccc6e3586b206f Author: Vineet Gupta Date: Tue Aug 1 10:23:27 2017 +0530 ARCv2: SLC: provide a line based flush routine for debugging Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 2 ++ arch/arc/mm/cache.c | 54 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) commit 9f82e90a6668e522c7fd0e0322c52d86f29b624d Author: Alexey Brodkin Date: Tue Jul 18 17:31:24 2017 +0300 ARC: Hardcode ARCH_DMA_MINALIGN to max line length we may have Current implementation relies on L1 line length which might easily be smaller than L2 line (which is usually the case BTW). Imagine this typical case: L2 line is 128 bytes while L1 line is 64-bytes. Now we want to allocate small buffer and later use it for DMA (consider IOC is not available). kmalloc() allocates small KMALLOC_MIN_SIZE-sized, KMALLOC_MIN_SIZE-aligned That way if buffer happens to be aligned to L1 line and not L2 line we'll be flushing and invalidating extra portions of data from L2 which will cause cache coherency issues. And since KMALLOC_MIN_SIZE is bound to ARCH_DMA_MINALIGN the fix could be simple - set ARCH_DMA_MINALIGN to the largest cache line we may ever get. As of today neither L1 of ARC700 and ARC HS38 nor SLC might not be longer than 128 bytes. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51052dd21acc856d329b48d1e9d490a4a5bf20be Merge: d081a16 d7a5b3e Author: Kalle Valo Date: Wed Aug 30 19:17:44 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Last set of iwlwifi patches for 4.14 * Fix a queue hang problem due to 11w behavior * Fix a warning caused by a too long debug print * Bump API number to the latest version we support commit 78f35473508118df5ea04b9515ac3f1aaec0a980 Author: Dan Williams Date: Wed Aug 30 09:16:38 2017 -0700 dax: introduce a fs_dax_get_by_bdev() helper Add a helper that can replace the following common pattern: if (blk_queue_dax(bdev->bd_queue)) fs_dax_get_by_host(bdev->bd_disk->disk_name); This will be used to move dax_device lookup from iomap-operation time to fs-mount time. Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dan Williams drivers/dax/super.c | 10 ++++++++++ include/linux/dax.h | 6 ++++++ 2 files changed, 16 insertions(+) commit add02cfdc9bc2987b0121861d5bb0c7392865be9 Author: Joerg Roedel Date: Wed Aug 23 15:50:04 2017 +0200 iommu: Introduce Interface for IOMMU TLB Flushing With the current IOMMU-API the hardware TLBs have to be flushed in every iommu_ops->unmap() call-back. For unmapping large amounts of address space, like it happens when a KVM domain with assigned devices is destroyed, this causes thousands of unnecessary TLB flushes in the IOMMU hardware because the unmap call-back runs for every unmapped physical page. With the TLB Flush Interface and the new iommu_unmap_fast() function introduced here the need to clean the hardware TLBs is removed from the unmapping code-path. Users of iommu_unmap_fast() have to explicitly call the TLB-Flush functions to sync the page-table changes to the hardware. Three functions for TLB-Flushes are introduced: * iommu_flush_tlb_all() - Flushes all TLB entries associated with that domain. TLBs entries are flushed when this function returns. * iommu_tlb_range_add() - This will add a given range to the flush queue for this domain. * iommu_tlb_sync() - Flushes all queued ranges from the hardware TLBs. Returns when the flush is finished. The semantic of this interface is intentionally similar to the iommu_gather_ops from the io-pgtable code. Cc: Alex Williamson Cc: Will Deacon Cc: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 32 ++++++++++++++++++++++++++++---- include/linux/iommu.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 5 deletions(-) commit 18f8e6f695ac6ea879f610702d9bb04a42d1793c Author: Hans de Goede Date: Wed Aug 30 11:48:12 2017 +0200 power: supply: bq24190_charger: Get input_current_limit from our supplier On some devices the USB Type-C port power (USB PD 2.0) negotiation is done by a separate port-controller IC, while the current limit is controlled through another (charger) IC. It has been decided to model this by modelling the external Type-C power brick (adapter/charger) as a power-supply class device which supplies the charger-IC, with its voltage-now and current-max representing the negotiated voltage and max current draw. This commit adds support for this to the bq24190_charger driver by adding an external_power_changed callback and calling power_supply_set_input_current_limit_from_supplier from this callback. This callback will only get called if the bq24190 has a parent-supply. Note this replaces the functionality to get the current-limit from an extcon device, which will be removed in a follow-up commit. Signed-off-by: Hans de Goede Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit cceb84519520c775d2660ea6b878215cd116af75 Author: Arvind Yadav Date: Mon Aug 28 17:42:50 2017 +0530 iommu/s390: Constify iommu_ops iommu_ops are not supposed to change at runtime. Functions 'bus_set_iommu' working with const iommu_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Gerald Schaefer Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11b93ebfa03e1cf45d9ad508eaf2c4d3547e06ca Author: Ashok Raj Date: Tue Aug 8 13:29:28 2017 -0700 iommu/vt-d: Avoid calling virt_to_phys() on null pointer New kernels with debug show panic() from __phys_addr() checks. Avoid calling virt_to_phys() when pasid_state_tbl pointer is null To: Joerg Roedel To: linux-kernel@vger.kernel.org> Cc: iommu@lists.linux-foundation.org Cc: David Woodhouse Cc: Jacob Pan Cc: Ashok Raj Fixes: 2f26e0a9c9860 ('iommu/vt-d: Add basic SVM PASID support') Signed-off-by: Ashok Raj Acked-by: David Woodhouse Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9d8c3af31607819a61011d746e861b8096ac9761 Author: Ashok Raj Date: Tue Aug 8 13:29:27 2017 -0700 iommu/vt-d: IOMMU Page Request needs to check if address is canonical. Page Request from devices that support device-tlb would request translation to pre-cache them in device to avoid overhead of IOMMU lookups. IOMMU needs to check for canonicallity of the address before performing page-fault processing. To: Joerg Roedel To: linux-kernel@vger.kernel.org> Cc: iommu@lists.linux-foundation.org Cc: David Woodhouse Cc: Jacob Pan Cc: Ashok Raj Signed-off-by: Ashok Raj Reported-by: Sudeep Dutt Acked-by: David Woodhouse Signed-off-by: Joerg Roedel drivers/iommu/intel-svm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 66b6bef2c4e06f8c7a0030445766bf868110c5a1 Author: Hans de Goede Date: Wed Aug 30 11:48:11 2017 +0200 power: supply: bq24190_charger: Export 5V boost converter as regulator Register the 5V boost converter as a regulator named "usb_otg_vbus". This commit also adds support for bq24190_platform_data, through which non device-tree platforms can pass the regulator_init_data (containing mappings for the consumer amongst other things). Signed-off-by: Hans de Goede Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 112 +++++++++++++++++++++++++++++++++ include/linux/power/bq24190_charger.h | 18 ++++++ 2 files changed, 130 insertions(+) commit 96302d89a03524e04d46ec82c6730881bb755923 Author: Joerg Roedel Date: Wed Aug 30 15:06:43 2017 +0200 arm/tegra: Call bus_set_iommu() after iommu_device_register() The bus_set_iommu() function will call the add_device() call-back which needs the iommu to be registered. Reported-by: Jon Hunter Fixes: 0b480e447006 ('iommu/tegra: Add support for struct iommu_device') Signed-off-by: Joerg Roedel drivers/iommu/tegra-smmu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a5702e1cb3c47221419617089d59f9741cf981e4 Author: Geert Uytterhoeven Date: Wed Aug 30 12:01:06 2017 +0200 ASoC: rsnd: Drop unit-addresses without reg properties Nodes without reg properties must not have unit addresses: Warning (unit_address_vs_reg): Node .../rcar_sound,dvc/dvc@0 has a unit name, but no reg property Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown .../devicetree/bindings/sound/renesas,rsnd.txt | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) commit 1fe165b7e9c3e1b1cfa98310979db0814c7445ea Author: Jeffy Chen Date: Wed Aug 30 17:58:14 2017 +0800 ASoC: rockchip: constify snd_soc_ops structures Add const to dp/dmic snd_soc_ops. Fixes: 626d84db64d7 (ASoC: rockchip: Add support for DMIC codec) Fixes: 3313faf1053e (ASoC: rockchip: Add support for DP codec) Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8986a11978373400a7e880b413c43ca229d7a8a8 Author: Eric Jeong Date: Wed Aug 30 17:54:27 2017 +0900 regulator: pv88090: Exception handling for out of bounds This is a patch for exception handlding that the index of array is out of bounds. And the definitions have been updated to use proper device name. Signed-off-by: Eric Jeong Signed-off-by: Mark Brown drivers/regulator/pv88090-regulator.c | 11 ++++++++--- drivers/regulator/pv88090-regulator.h | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) commit 9c324afe3b90e406b15938acafaa2636a7e85ff3 Author: oder_chiou@realtek.com Date: Wed Aug 30 13:08:31 2017 +0800 ASoC: rt5663: Add delay for jack plug in Codec initialize takes some time when 3.5mm jack plugged in. Add a delay to report jack plugged event to user space to avoid pop noise. Signed-off-by: Hsinyu Chao Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 3 +++ 1 file changed, 3 insertions(+) commit 60b0fdeac19945107b956a8a2a0ba3a14827db60 Author: Bard Liao Date: Wed Aug 30 12:28:31 2017 +0800 ASoC: rt274: add acpi id Add ACPI id for Intel platform. Signed-off-by: Guneshwor Singh Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt274.c | 1 + 1 file changed, 1 insertion(+) commit b6615659827839f3031c6bd4c1599c3c705778ac Author: Dan Carpenter Date: Wed Aug 30 17:03:58 2017 +0300 regulator: da9063: Return an error code on probe failure If "regl_pdata->n_regulators == 0" is true then we accidentally return PTR_ERR() instead of an error code. I've changed it to return -ENODEV instead. Fixes: 69ca3e58d178 ("regulator: da9063: Add Dialog DA9063 voltage regulators support.") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/regulator/da9063-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f43dbebfa32041826299bdccae0352887fa007ea Author: Matan Barak Date: Thu Aug 3 16:06:56 2017 +0300 IB/core: Add support to finalize objects in one transaction The new ioctl based infrastructure either commits or rollbacks all objects of the method as one transaction. In order to do that, we introduce a notion of dealing with a collection of objects that are related to a specific method. This also requires adding a notion of a method and attribute. A method contains a hash of attributes, where each bucket contains several attributes. The attributes are hashed according to their namespace which resides in the four upper bits of the id. For example, an object could be a CQ, which has an action of CREATE_CQ. This action has multiple attributes. For example, the CQ's new handle and the comp_channel. Each layer in this hierarchy - objects, methods and attributes is split into namespaces. The basic example for that is one namespace representing the default entities and another one representing the driver specific entities. When declaring these methods and attributes, we actually declare their specifications. When a method is executed, we actually allocates some space to hold auxiliary information. This auxiliary information contains meta-data about the required objects, such as pointers to their type information, pointers to the uobjects themselves (if exist), etc. The specification, along with the auxiliary information we allocated and filled is given to the finalize_objects function. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 40 ++++++++++++++++++++++++++++ drivers/infiniband/core/rdma_core.h | 22 ++++++++++++++- include/rdma/uverbs_ioctl.h | 53 +++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 1 deletion(-) commit a0aa309c39de58b86b704654434431aeb5a8bdf1 Author: Matan Barak Date: Thu Aug 3 16:06:55 2017 +0300 IB/core: Add a generic way to execute an operation on a uobject The ioctl infrastructure treats all user-objects in the same manner. It gets objects ids from the user-space and by using the object type and type attributes mentioned in the object specification, it executes this required method. Passing an object id from the user-space as an attribute is carried out in three stages. The first is carried out before the actual handler and the last is carried out afterwards. The different supported operations are read, write, destroy and create. In the first stage, the former three actions just fetches the object from the repository (by using its id) and locks it. The last action allocates a new uobject. Afterwards, the second stage is carried out when the handler itself carries out the required modification of the object. The last stage is carried out after the handler finishes and commits the result. The former two operations just unlock the object. Destroy calls the "free object" operation, taking into account the object's type and releases the uobject as well. Creation just adds the new uobject to the repository, making the object visible to the application. In order to abstract these details from the ioctl infrastructure layer, we add uverbs_get_uobject_from_context and uverbs_finalize_object functions which corresponds to the first and last stages respectively. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 58 +++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/rdma_core.h | 17 +++++++++++ include/rdma/uverbs_ioctl.h | 52 +++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) commit ed36b4dba54a421ce5551638f6a9790b2c2116b1 Author: Christophe Jaillet Date: Sun Aug 27 08:30:34 2017 +0200 libnvdimm, btt: check memory allocation failure Check memory allocation failures and return -ENOMEM in such cases, as already done few lines below for another memory allocation. This avoids NULL pointers dereference. Cc: Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format") Signed-off-by: Christophe JAILLET Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 2 ++ 1 file changed, 2 insertions(+) commit 974c58566e0b047d785701b6cf788a810072a4c1 Author: NeilBrown Date: Wed Aug 30 13:47:12 2017 +0200 drbd: remove BIOSET_NEED_RESCUER flag from drbd_{md_,}io_bio_set Careful analysis shows that this flag is not needed. The RESCUER flag is only needed when a make_request_fn might: - allocate a bio from the bioset - submit it with generic_make_request() or similar - allocate another bio from the bioset The second allocation can block until the first bio is processed, so a rescuer is needed to ensure the first bio does get processed. With a rescuer it will only get processed when the make_request_fn completes. In drbd, allocations from drbd_io_bio_set happen from drbd_new_req() or w_restart_disk_io() which is only called to handle RESTART_FROZEN_DISK_IO. In former is called precisely once from the make_request_fn. The later is never called by within the make_request_fn. So there cannot be two allocations in the same call to the make_request_fn, so a rescuer is not needed. Allocations from drbd_md_io_bio_set are used for IO to the bitmap and the activity log. There are only accessed from worker threads and workqueues, never directly from make_request_fn. Again, the rescuer isn't needed. Signed-off-by: NeilBrown Signed-off-by: Philipp Reisner Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5fc1efd5de1a1685e68d80981c7676c4d323d93c Author: Philipp Reisner Date: Wed Aug 30 13:47:11 2017 +0200 drbd: Fix allyesconfig build, fix recent commit Globals where prefixed with drbd_, that was missed in the in #ifdef'nd code when it is built-in. Signed-off-by: Philipp Reisner Fixes: 183ece30053f ("drbd: move global variables to drbd namespace and make some static") Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9ea9df3032eff1c57853fdf3d54e276d63b4b4d Author: Bhumika Goyal Date: Wed Aug 30 18:09:02 2017 +0530 fsnotify: make dnotify_fsnotify_ops const Make this const as it is never modified. Signed-off-by: Bhumika Goyal Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a027b2c5fed78851e69fab395b02d127a7759fc7 Author: Zhoujie Wu Date: Tue Aug 29 11:54:49 2017 -0700 mmc: sdhci-xenon: add runtime pm support and reimplement standby Enable runtime pm support for xenon controller, which uses 50ms auto runtime suspend by default. Reimplement system standby based on runtime pm API. Introduce restore_needed to restore the Xenon specific registers when resume. Signed-off-by: Zhoujie Wu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 87 ++++++++++++++++++++++++++++++++++-------- drivers/mmc/host/sdhci-xenon.h | 1 + 2 files changed, 72 insertions(+), 16 deletions(-) commit 4e6fe29fb80b731b3971d335e810b27ba9ec8357 Merge: 6930125 4f16cab Author: Guenter Roeck Date: Wed Aug 30 06:32:01 2017 -0700 Merge remote-tracking branch 'lee/ib-mfd-hwmon-4.14' into hwmon-next commit 6930125858c71a62a964437c360f188e96879438 Author: Colin Ian King Date: Wed Aug 30 09:32:25 2017 +0100 hwmon: (asc7621) make several arrays static const Don't populate the arrays on the stack, instead make them static. Makes the object code smaller by over 950 bytes: Before: text data bss dec hex filename 26144 18768 352 45264 b0d0 drivers/hwmon/asc7621.o After: text data bss dec hex filename 25029 18928 352 44309 ad15 drivers/hwmon/asc7621.o Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck drivers/hwmon/asc7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5783ec2e5c102a6a04d17e07bd9d008a464ed9bc Author: Xo Wang Date: Tue Aug 29 14:21:17 2017 -0700 hwmon: (pmbus/lm25066) Add support for TI LM5066I The TI LM5066I hotswap controller is a more accurate version of the LM5066 device already supported. It has different measurement conversion coefficients than the LM5066, so it needs to be recognized as a different device. Signed-off-by: Xo Wang Signed-off-by: Guenter Roeck Documentation/hwmon/lm25066 | 9 +++++++-- drivers/hwmon/pmbus/lm25066.c | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) commit ee983171d49b4b5c957d3f94c68ee1fd7a007281 Author: Xo Wang Date: Tue Aug 29 14:21:16 2017 -0700 hwmon: (pmbus/lm25066) Offset coefficient depends on CL When converting the DIRECT format CURRENT_IN and POWER commands, make the offset coefficient ("b") predicate on the value of the current limit setting. Signed-off-by: Xo Wang Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/lm25066.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d4977c083aeb28cf72c1b019e3f9df13608126dd Author: Vadim Pasternak Date: Tue Aug 29 20:06:21 2017 +0000 hwmon: (pmbus) Add support for Intel VID protocol VR13 The below lists of VOUT_MODE command readout with their related VID protocols, Digital to Analog Converter steps: - VR13.0 mode, 10-mV DAC - 0x24 - VR13.0 mode, 5-mV DAC - 0x27 Signed-off-by: Vadim Pasternak Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus.h | 2 +- drivers/hwmon/pmbus/pmbus_core.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit d84c246b73603028a8d7b07659b942c754b34631 Author: Honghui Zhang Date: Wed Aug 30 09:19:14 2017 +0800 PCI: mediatek: Use PCI_NUM_INTX Switch from using custom INTX_NUM macro to the generic PCI_NUM_INTX definition for the number of INTx interrupts. Signed-off-by: Honghui Zhang [bhelgaas: use subject/changelog from similar patches] Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-mediatek.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 43e6409db64ddab535ae08f77923f9081c38226b Author: Honghui Zhang Date: Mon Aug 14 21:04:28 2017 +0800 PCI: mediatek: Add MSI support for MT2712 and MT7622 MT2712 and MT7622's PCIe host controller support MSI, but only 32-bit MSI addresses are supported. It connects to GIC with the same IRQ number as the INTx IRQ, so it shares the same IRQ with INTx IRQ. Add MSI support for MT2712 and MT7622. Signed-off-by: Honghui Zhang [bhelgaas: changes to follow rcar & tegra: rename to mtk_pcie_msi_alloc(), add mtk_pcie_msi_free(), free hwirq if irq_create_mapping() fails, call irq_dispose_mapping() from mtk_msi_teardown_irq()] Signed-off-by: Bjorn Helgaas Acked-by: Ryder Lee drivers/pci/host/pcie-mediatek.c | 156 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 1 deletion(-) commit db271747a04da5190b81ad120ee48c88d652b0e7 Author: Honghui Zhang Date: Mon Aug 14 21:04:27 2017 +0800 PCI: mediatek: Use bus->sysdata to get host private data 75983c6d1f38 ("PCI: mediatek: Add controller support for MT2712 and MT7622") has put the mtk_pcie * into bus->sysdata. Take advantage of that to get the private data and simplify the code. Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas Acked-by: Ryder Lee drivers/pci/host/pcie-mediatek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c2e0ba9caf6ca81f8800ed2ebcf1bfdfd70ea81b Author: Ryder Lee Date: Thu Aug 10 14:35:00 2017 +0800 dt-bindings: PCI: Add support for MT2712 and MT7622 Add controller support for MT2712/MT7622 and update related properties. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/mediatek-pcie.txt | 168 ++++++++++++++++++++- 1 file changed, 161 insertions(+), 7 deletions(-) commit b099631df160ec608cd6147f4d20a8042567a5b8 Author: Ryder Lee Date: Thu Aug 10 14:34:59 2017 +0800 PCI: mediatek: Add controller support for MT2712 and MT7622 MT2712 and MT7622 using a new IP block of Gen2 controller which has two root ports and shares the same probing flow with MT2701/MT7623. Both MT2712 and MT7622 have the same per-port control registers, but there are slight differences between them: - MT7622 has more clocks than MT2712. - MT7622 has shared control registers which are used to enable LTSSM and ASPM while MT2712 does not. Add host controller support for MT2712/MT7622. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang [bhelgaas: folded in fix from http://lkml.kernel.org/r/1502715868-17651-2-git-send-email-honghui.zhang@mediatek.com] Signed-off-by: Bjorn Helgaas drivers/pci/host/Kconfig | 5 +- drivers/pci/host/pcie-mediatek.c | 462 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 460 insertions(+), 7 deletions(-) commit a9551ba60979a2d9e4570e6eb61f87d9a654b954 Author: Ryder Lee Date: Thu Aug 10 14:34:58 2017 +0800 dt-bindings: PCI: Cleanup MediaTek binding text To accommodate other SoC generations, regroup specific properties by SoC, and remove redundant descriptions. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang [bhelgaas: split into a rename patch and a cleanup patch] Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/mediatek-pcie.txt | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d5a1092258d3f6f4410c2bcda860b64be53272a6 Author: Ryder Lee Date: Thu Aug 10 17:14:26 2017 -0500 dt-bindings: PCI: Rename MediaTek binding To accommodate other SoC generations, rename mediatek,mt7623-pcie.txt to mediatek-pcie.txt. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang [bhelgaas: split rename to separate patch so updates are obvious] Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../bindings/pci/mediatek,mt7623-pcie.txt | 130 --------------------- .../devicetree/bindings/pci/mediatek-pcie.txt | 130 +++++++++++++++++++++ 2 files changed, 130 insertions(+), 130 deletions(-) commit 1eacd7b84e0413f55fbc0c61874f745cc5e2ed9e Author: Ryder Lee Date: Thu Aug 10 14:34:57 2017 +0800 PCI: mediatek: Switch to use platform_get_resource_byname() This is a transitional patch. We currently use platfarm_get_resource() for retrieving the IOMEM resources, but there might be some chips don't have subsys/shared registers part, which depends on platform design, and these will be introduced in further patches. Switch this function to use the platform_get_resource_byname() so that the binding can be agnostic of the resource order. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-mediatek.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c681c93067b8484381653dee0fc79a6d81be7050 Author: Honghui Zhang Date: Thu Aug 10 14:34:56 2017 +0800 PCI: mediatek: Add a structure to abstract the controller generations Introduce a structure "mtk_pcie_soc" to abstract the differences between controller generations, and the .startup() hook is used to encapsulate some SoC-dependent related setting. In doing so, the common code which will be reused by future chips. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-mediatek.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 4f6f0460448d5725a647039b8891736132a01a50 Author: Honghui Zhang Date: Thu Aug 10 14:34:55 2017 +0800 PCI: mediatek: Rename port->index and mtk_pcie_parse_ports() Rename "port->index" to "port->slot" since the ports are hardwired at PCI_SLOT. Also rename "mtk_pcie_parse_ports()" to "mtk_pcie_parse_port()" since it parses one port each time. No functional change in this patch. Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-mediatek.c | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit e10b7a184ccf883a456c8683fa2e53eddd3aeb9c Author: Ryder Lee Date: Thu Aug 10 14:34:54 2017 +0800 PCI: mediatek: Use readl_poll_timeout() to wait for Gen2 training Wait for Gen2 training with readl_poll_timeout(), and simplify the hardware assert logical by merging it into a new mtk_pcie_startup_port() interface. Signed-off-by: Ryder Lee Signed-off-by: Honghui Zhang Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-mediatek.c | 52 +++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 30 deletions(-) commit 608fcac7ce31b9644bf0e71810f5a033693c17b0 Author: Philipp Zabel Date: Wed Jul 19 17:26:00 2017 +0200 PCI: mediatek: 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. Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Helgaas Cc: Ryder Lee Cc: Matthias Brugger drivers/pci/host/pcie-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3454a476f2f5d6d3cac3b3f907190ffc58c4fd6f Merge: 0be04a6 bcab3a6 Author: Takashi Iwai Date: Wed Aug 30 15:17:10 2017 +0200 Merge branch 'for-linus' into for-next commit d296b15ed58231bd991c0fb0f3592d595539bcd1 Author: Arvind Yadav Date: Wed Aug 30 07:50:03 2017 -0500 gfs2: constify rhashtable_params rhashtable_params are not supposed to change at runtime. All Functions rhashtable_* working with const rhashtable_params provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Bob Peterson fs/gfs2/glock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7023a0b16f66a2f1358c95989d23142d8191fd6e Author: Andreas Gruenbacher Date: Wed Aug 30 07:46:24 2017 -0500 GFS2: Fix gl_object warnings The following cleanup is needed to avoid spilling the syslog with false warnings. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/rgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b9a36947c6bfa4b63224e0906c743aa3314a2d3 Author: Arvind Yadav Date: Mon Aug 28 17:42:05 2017 +0530 iommu/exynos: Constify iommu_ops iommu_ops are not supposed to change at runtime. Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with const iommu_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8da4af95867e339d4aa61f9a1814bbfb2a55468e Author: Bhumika Goyal Date: Mon Aug 28 23:47:27 2017 +0530 iommu/ipmmu-vmsa: Make ipmmu_gather_ops const Make these const as they are not modified anywhere. Signed-off-by: Bhumika Goyal Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a175a67d306ab3fd0e140595f49290b80c909ae8 Author: Oleksandr Tyshchenko Date: Wed Aug 23 17:31:42 2017 +0300 iommu/ipmmu-vmsa: Rereserving a free context before setting up a pagetable Reserving a free context is both quicker and more likely to fail (due to limited hardware resources) than setting up a pagetable. What is more the pagetable init/cleanup code could require the context to be set up. Signed-off-by: Oleksandr Tyshchenko CC: Robin Murphy CC: Laurent Pinchart Reviewed-by: Robin Murphy Reviewed-by: Laurent Pinchart CC: Joerg Roedel Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 689dc7eb2ca2bd89872ef1510ff912cf31815811 Merge: 906d5ff 99c14fc Author: Ulf Hansson Date: Wed Aug 30 15:10:08 2017 +0200 Merge branch 'fixes' into next commit 28dd5cf70aaac2a12a16847ae0a978f0b0575194 Author: Omri Mann Date: Wed Aug 30 15:22:59 2017 +0300 nvmet: add support for reporting the host identifier And fix the Get/Set Log Page implementation to take all 8 bits of the feature identifier into account. Signed-off-by: Omri Mann Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig [hch: used the UUID API, updated changelog] drivers/nvme/target/admin-cmd.c | 17 +++++++++++++++-- drivers/nvme/target/fabrics-cmd.c | 1 + drivers/nvme/target/nvmet.h | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) commit 906d5ff6188953f4981df39e9999f858542df9ce Author: Adrian Hunter Date: Fri Aug 25 15:43:44 2017 +0300 mmc: core: Move mmc_start_areq() declaration mmc_start_areq() is an internal mmc core API. Move the declaration accordingly. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/core.h | 6 ++++++ include/linux/mmc/core.h | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 1ac99066225bd0dab013f7a5f3c9f55453acd481 Author: Srinivas Kandagatla Date: Wed Aug 30 14:22:12 2017 +0200 mmc: mmci: stop building qcom dml as module It does not make sense for qcom dml code to be a seperate module, as this has just 2 helper functions specific to qcom, and used directly by mmci driver, so just compile this along with main mmci driver. This would also fix issues arrising due to Kconfig combinations between mmci and qcom dml. Signed-off-by: Srinivas Kandagatla Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- drivers/mmc/host/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit c34eda69ad4c8be618ee95627b3e9ea052cf2324 Author: Maxime Ripard Date: Fri Aug 25 11:49:53 2017 +0200 mmc: sunxi: Reset the device at probe time We might be into some troubles if the bootloader misconfigured the MMC controller. We currently only de-assert the reset line at probe time, which means that if the device was already out of reset, we're going to keep whatever state was set already. Switch to a reset instead of the deassert to have a device in a pristine state when we start operating. Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 734d21ccdc29c65dac6a0d4099ddfd69184cf953 Author: Maxime Ripard Date: Fri Aug 25 11:49:52 2017 +0200 clk: sunxi-ng: Provide a default reset hook The reset hook was left implemented. Provide a dumb implementation so that client drivers can depend on it. Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/clk/sunxi-ng/ccu_reset.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d341ca88eead011c9097c0b5b1be0a1f6f975fc5 Author: Jerome Brunet Date: Mon Aug 28 16:29:15 2017 +0200 mmc: meson-gx: rework tuning function Rework tuning function of the rx phase. Now that the phase can be more precisely set using CCF, test more phase setting and find the largest working window. Then the tuning selected is the one at the center of the window. This rework allows to use new modes, such as UHS SDR50 Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 161 +++++++++++++++++++++++++++------------- 1 file changed, 111 insertions(+), 50 deletions(-) commit bac135da21878282bf1368cdd26c542db731743e Author: Jerome Brunet Date: Mon Aug 28 16:29:14 2017 +0200 mmc: meson-gx: change default tx phase Initial default tx phase was set to 0 while the datasheet recommends 270. Some cards fails to initialize with this setting and eMMC mode DDR52 does not work. Changing this setting to 270 fixes these issues, without any regression so far Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b1231b2f7305ade10694a59ffbcfa92357b49a0a Author: Jerome Brunet Date: Mon Aug 28 16:29:13 2017 +0200 mmc: meson-gx: implement voltage switch callback Implement voltage switch callback (shamelessly copied from sunxi mmc driver). This allow, with the appropriate tuning function, to use SD ultra high speed modes. Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 033d7168595b5cb2f0983221f32cd2b33e10f343 Author: Jerome Brunet Date: Mon Aug 28 16:29:12 2017 +0200 mmc: meson-gx: use CCF to handle the clock phases Several phases can be controlled on the meson-gx controller, the core, tx and rx clock phase. The tx and rx uses delays to allow more fine grained setting of the phase. To properly compute the phase using delays, accessing the clock rate is necessary. Instead of ad-hoc functions, use the common clock framework to set the clock phases (and access the clock rate while doing it). Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 217 ++++++++++++++++++++++++++++++++-------- 1 file changed, 176 insertions(+), 41 deletions(-) commit 186cd8b7f586250cc0bb20b1c2c2586895dede7e Author: Jerome Brunet Date: Mon Aug 28 16:29:11 2017 +0200 mmc: meson-gx: implement card_busy callback Implement the card_busy callback to be able to verify that the card is done dealing with voltage switch, when the support is added later on. Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 74858655cbff055a4e716634f0d656b8f1ff7a9f Author: Jerome Brunet Date: Mon Aug 28 16:29:10 2017 +0200 mmc: meson-gx: simplify interrupt handler No functional change, just improve interrupt handler readability Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 93 +++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 54 deletions(-) commit 1e03331d6b4340461efefab8b1dee874009ad950 Author: Jerome Brunet Date: Mon Aug 28 16:29:09 2017 +0200 mmc: meson-gx: work around clk-stop issue It seems that the mmc clock is also used and required, somehow, by the controller itself. It is shown during init, when writing to CFG while the divider is set to 0 will crash the SoC. During a voltage switch, the controller may crash and the card may then fail to exit busy state if the clock is stopped. To avoid this, it is best to keep the clock running for the controller, except during rate change. However, we still need to be able to gate the clock out of the SoC. Let's use the pinmux for this, and fallback to gpio mode (pulled-down) when we need to gate the clock Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 74 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) commit 844c8a75f476696e5e472d904d155d5f583f915d Author: Jerome Brunet Date: Mon Aug 28 16:29:08 2017 +0200 mmc: meson-gx: fix dual data rate mode frequencies In DDR modes, meson mmc controller requires an input rate twice as fast as the output rate Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit bd911ec467c674995ac9b8ce83dc9d7f7b55b5be Author: Jerome Brunet Date: Mon Aug 28 16:29:07 2017 +0200 mmc: meson-gx: rework clock init function Thanks to devm, carrying the clock structure around after init is not necessary. Rework the function to remove these from the controller host data. Finally, set initial mmc clock rate before enabling it, simplifying the exit condition. Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 94 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 48 deletions(-) commit f89f55df5927a55c107d06ae998a1575ad9d4c9a Author: Jerome Brunet Date: Mon Aug 28 16:29:06 2017 +0200 mmc: meson-gx: rework clk_set function Clean-up clk_set function to prepare the next changes (DDR and clk-stop) Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit c36cf1257b391c8b83055df79c8a30c39c69a7b6 Author: Jerome Brunet Date: Mon Aug 28 16:29:05 2017 +0200 mmc: meson-gx: rework set_ios function Remove conditional write of cfg register. Warn if set_clk fails for some reason. Consistently use host->dev instead of mixing with mmc_dev(mmc) Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 3c39e2ca88016fb88d767750cd254d328f84248f Author: Jerome Brunet Date: Mon Aug 28 16:29:04 2017 +0200 mmc: meson-gx: cfg init overwrite values cfg init function overwrite values set in the clk init function Remove the cfg pokes from the clk init. Actually, trying to use the CLK_AUTO, like initially tried in clk_init, would break the card initialization Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit ef5c48157e5fa6c574a7269743b68049ee3b9459 Author: Jerome Brunet Date: Mon Aug 28 16:29:03 2017 +0200 mmc: meson-gx: initialize sane clk default before clock register On boot, the clock divider value is 0 which is a weird unsupported value. For example, accessing the cfg register with this value set would crash the SoC. Previous change removed 0 as possible value for CCF but forgot to properly initialize the register before registering the clock. This leads to the CCF finding an illegal value, which it complains about. Initialize the register properly in a standalone patch so the fix can be picked up if necessary. The change this fixed is: "mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag". Reported-by: Neil Armstrong Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 88411dea0f4e01896b902568f94c03266be9f666 Author: Arvind Yadav Date: Wed Aug 23 22:00:49 2017 +0530 mmc: mmci: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7b42769ee291c7993bff392e37a768df46dabac Author: Shawn Lin Date: Wed Aug 23 15:38:31 2017 +0800 mmc: block: cast a informative log for no devidx available The intention for this patch is to help folks debug the failure like this: dwmmc_rockchip fe320000.dwmmc: IDMAC supports 32-bit address mode. dwmmc_rockchip fe320000.dwmmc: Using internal DMA controller. dwmmc_rockchip fe320000.dwmmc: Version ID is 270a dwmmc_rockchip fe320000.dwmmc: DW MMC controller at irq 28,32 bit host data width,256 deep fifo dwmmc_rockchip fe320000.dwmmc: Got CD GPIO mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0) mmc0: new high speed SDHC card at address 0007 mmcblk: probe of mmc0:0007 failed with error -28 The reason may be some buggy userspace daemon miss the disk remove uevent sometimes so it would finally make the SD card not work. So from the dmesg it only shows a errno of -28 but still don't understand what happened. For quick reproduce this, we could set max_devices to 8 and run for i in $(seq 1 9); do echo "========================" $i echo fe320000.dwmmc > /sys/bus/platform/drivers/dwmmc_rockchip/unbind sleep .5 echo fe320000.dwmmc > /sys/bus/platform/drivers/dwmmc_rockchip/bind sleep .5 mount -t vfat /dev/mmcblk0 /mnt sleep .5 done Another possible reason would be the device has more partitions than what we support, so that they have to increase their max_devices. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 83a7b32ac66d863bfbd7bfdbf29dd61db72193de Author: Masahiro Yamada Date: Wed Aug 23 13:15:03 2017 +0900 mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume This will be useful when drivers want to reuse either suspend or resume callback instead of whole of sdhci_pltfm_pmops. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 20 +------------------- drivers/mmc/host/sdhci-pltfm.c | 6 ++++-- drivers/mmc/host/sdhci-pltfm.h | 2 ++ 3 files changed, 7 insertions(+), 21 deletions(-) commit 1ab0d2d79b9a3868afd1afb172f0e084f0915892 Author: Masahiro Yamada Date: Wed Aug 23 13:15:02 2017 +0900 mmc: sdhci: enable/disable the clock in sdhci_pltfm_suspend/resume This commit provides similar cleanups as commit 83eacdfa2529 ("mmc: sdhci: disable the clock in sdhci_pltfm_unregister()") did for unregister hooks. sdhci-brcmstb.c and sdhci-sirf.c implement their own suspend/resume hooks to handle pltfm_host->clk. Move clock handling to sdhci_pltfm.c so that the drivers can reuse sdhci_pltfm_pmops. The following drivers did not previously touch pltfm_host->clk during suspend/resume, but now do: - sdhci-bcm-kona.c - sdhci-dove.c - sdhci-iproc.c - sdhci-pxav2.c - sdhci-tegra.c - sdhci-xenon.c Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Acked-by: Al Cooper Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 37 +------------------------------------ drivers/mmc/host/sdhci-pltfm.c | 22 ++++++++++++++++++++-- drivers/mmc/host/sdhci-sirf.c | 39 +-------------------------------------- 3 files changed, 22 insertions(+), 76 deletions(-) commit 3fd1d86f03cbcc7a894cf0e7a70e8758c5f12882 Author: Masahiro Yamada Date: Wed Aug 23 13:15:01 2017 +0900 mmc: sdhci-pxav2: switch to managed clk and sdhci_pltfm_unregister() The difference between sdhci_pxav2_remove() and sdhci_pltfm_unregister() is clk_put(). It will go away by using the managed resource clk, then sdhci_pltfm_unregister() can be reused. Also, rename the jump labels to say what the goto does. (Coding style suggested by Documentation/process/coding-style.rst) Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav2.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit a232a8f2d10750733c54e92ad85da7f8223b1382 Author: Masahiro Yamada Date: Wed Aug 23 13:15:00 2017 +0900 mmc: sdhci-cadence: add suspend / resume support Currently, the probe function initializes the PHY, but PHY settings are lost during the sleep state. Restore the PHY registers when resuming. To facilitate this, split sdhci_cdns_phy_init() into the DT parse part and PHY update part so that the latter can be invoked from the resume hook. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 106 +++++++++++++++++++++++++++++++++++---- 1 file changed, 97 insertions(+), 9 deletions(-) commit aab6e25a5ae1e738361ea0d94bcd5c8385664cf1 Author: Hu Ziji Date: Wed Aug 23 11:15:02 2017 -0700 mmc: sdhci-xenon: Support HS400 Enhanced Strobe feature Support HS400 Enhanced Strobe feature in Xenon. Enable Enhanced Strobe together with Data Strobe. Disable Enhanced Strobe when eMMC is not in HS400 mode. Signed-off-by: Hu Ziji Signed-off-by: Zhoujie Wu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon-phy.c | 34 ++++++++++++++++++++++++++++------ drivers/mmc/host/sdhci-xenon.h | 1 + 2 files changed, 29 insertions(+), 6 deletions(-) commit 1284c248d145926760eab7244252f695f7a7a46a Author: Kishon Vijay Abraham I Date: Mon Aug 21 13:11:29 2017 +0530 mmc: sdhci: Add quirk to indicate MMC_RSP_136 has CRC TI's implementation of sdhci controller used in DRA7 SoC's has CRC in responses with length 136 bits. Add quirk to indicate the controller has CRC in MMC_RSP_136. If this quirk is set sdhci library shouldn't shift the response present in SDHCI_RESPONSE register. Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 5 insertions(+) commit 4a5fc11945af753f3e565db61f80976bb1fcddc7 Author: Adrian Hunter Date: Mon Aug 21 13:11:28 2017 +0530 mmc: sdhci: Tidy reading 136-bit responses Read each register only once and move the code to a separate function so that it is not jammed against the 80 column margin. Signed-off-by: Adrian Hunter Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 52899b99767a34050b94d5e2d4b295def2164903 Author: Jerome Brunet Date: Mon Aug 21 18:02:48 2017 +0200 mmc: meson-gx: clean up some constants Remove unused clock rate defines. These should not be defined but requested from the clock framework. Also correct typo on the DELAY register Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 130b4bd8f94889e092b8d2fc3c3fe2b483c749a8 Author: Jerome Brunet Date: Mon Aug 21 18:02:47 2017 +0200 mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag Remove CLK_DIVIDER_ALLOW_ZERO. This flag means that a 1 based divider with a 0 value will behave as a bypass clock The mmc divider does not behave like this, a 0 value disables the clock Remove this flag so CCF never allows a 0 value on this clock Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1d04caa30ba77eef23c8263566c449751157583 Author: Jerome Brunet Date: Mon Aug 21 18:02:46 2017 +0200 mmc: meson-gx: fix mux mask definition CCF generic mux will shift the mask using the value defined in shift Define the mask accordingly Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fe20baec46caeaf1076a7f3d7cfd3e75c40205c Author: Linus Walleij Date: Sun Aug 20 23:39:11 2017 +0200 mmc: block: Reparametrize mmc_blk_ioctl_[multi]_cmd() Instead of passing a block device to mmc_blk_ioctl[_multi]_cmd(), let's pass struct mmc_blk_data() so we operate ioctl()s on the MMC block device representation rather than the vanilla block device. This saves a little duplicated code and makes it possible to issue ioctl()s not targeted for a specific block device but rather for a specific partition/area. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit 1f797edc62da59ad9b319a6b3f7c73a58047c896 Author: Linus Walleij Date: Sun Aug 20 23:39:10 2017 +0200 mmc: block: Refactor mmc_blk_part_switch() Instead of passing a struct mmc_blk_data * to mmc_blk_part_switch() let's pass the actual partition type we want to switch to. This is necessary in order not to have a block device with a backing mmc_blk_data and request queue and all for every hardware partition, such as RPMB. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 61fe0e2bdac51f94f9114ff1b2caef1c75db3679 Author: Linus Walleij Date: Sun Aug 20 23:39:09 2017 +0200 mmc: block: Move duplicate check mmc_blk_ioctl() calls either mmc_blk_ioctl_cmd() or mmc_blk_ioctl_multi_cmd() and each of these make the same check. Factor it into a new helper function, call it on both branches of the switch() statement and save a chunk of duplicate code. Cc: Shawn Lin Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 627c3ccfb46ada2583eac434127ad5d75e1ac33c Author: Linus Walleij Date: Sun Aug 20 23:39:08 2017 +0200 mmc: debugfs: Move block debugfs into block module If we don't have the block layer enabled, we do not present card status and extcsd in the debugfs. Debugfs is not ABI, and maintaining files of no relevance for non-block devices comes at a high maintenance cost if we shall support it with the block layer compiled out. The debugfs entries suffer from all the same starvation issues as the other userspace things, under e.g. a heavy dd operation. The expected number of debugfs users utilizing these two debugfs files is already low as there is an ioctl() to get the same information using the mmc-tools, and of these few users the expected number of people using it on SDIO or combo cards are expected to be zero. It is therefore logical to move this over to the block layer when it is enabled, using the new custom requests and issue it using the block request queue. On the other hand it moves some debugfs code from debugfs.c and into block.c. Tested during heavy dd load by cat:in the status file. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 143 +++++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/debugfs.c | 89 ---------------------------- drivers/mmc/core/queue.h | 4 ++ 3 files changed, 147 insertions(+), 89 deletions(-) commit 1bee324a5627ab05ff9899709a613b8739813eda Author: Linus Walleij Date: Sun Aug 20 23:39:07 2017 +0200 mmc: ops: export mmc_get_status() This function retrieves the status of the card with the default number of retries. Since the block layer wants to use this, and since the block layer is a loadable kernel module, we need to export this symbol. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_ops.c | 1 + 1 file changed, 1 insertion(+) commit 69f7599e6c55b80aa34fee18217a67d16703b906 Author: Linus Walleij Date: Sun Aug 20 23:39:06 2017 +0200 mmc: block: Anonymize the drv op data pointer We have a data pointer for the ioctl() data, but we need to pass other data along with the DRV_OP:s, so make this a void * so it can be reused. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 8 +++++--- drivers/mmc/core/queue.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit a814a14ea44d4415ee193985ecb744de320739e5 Author: Axel Lin Date: Sat Aug 19 21:06:11 2017 +0800 mmc: cavium-octeon: Convert to use module_platform_driver Get rid of boilerplate code by using module_platform_driver macro. Signed-off-by: Axel Lin Acked-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-octeon.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b773b3bf1916a368c29a19916abf0f5eca8b3c33 Author: Fabrizio Castro Date: Tue Aug 15 17:53:27 2017 +0100 dt-bindings: mmc: sh_mmcif: Document r8a7745 DT bindings Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Acked-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,mmcif.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 098dc66adeba4aaa8797124c10c2a77fd2e89584 Author: Arnd Bergmann Date: Tue Aug 15 17:11:58 2017 +0200 mmc: test: reduce stack usage in mmc_test_nonblock_transfer The new lockdep annotations for completions cause a warning in the mmc test module, in a function that now has four 150 byte structures on the stack: drivers/mmc/core/mmc_test.c: In function 'mmc_test_nonblock_transfer.constprop': drivers/mmc/core/mmc_test.c:892:1: error: the frame size of 1360 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The mmc_test_ongoing_transfer function evidently had a similar problem, and worked around it by using dynamic allocation. This generalizes the approach used by mmc_test_ongoing_transfer() and applies it to mmc_test_nonblock_transfer() as well. Fixes: cd8084f91c02 ("locking/lockdep: Apply crossrelease to completions") Signed-off-by: Arnd Bergmann Acked-by: Adrian Hunter Tested-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 97 +++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 56 deletions(-) commit 2f3110cc89c29a790c8b31c7983603d60b9ede49 Author: yangbo lu Date: Tue Aug 15 10:17:03 2017 +0800 mmc: sdhci-of-esdhc: support ESDHC_CAPABILITIES_1 accessing eSDHC is not a standard SD host controller. SDHCI_CAPABILITIES_1 register address is 0x44 while it's 0x114 (ESDHC_CAPABILITIES_1) for eSDHC. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 3 +++ drivers/mmc/host/sdhci-of-esdhc.c | 23 +++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit 501639bf2173ec142c48e67d391833a54965c912 Author: yangbo lu Date: Tue Aug 15 10:16:47 2017 +0800 mmc: sdhci: fix SDHCI_QUIRK_NO_HISPD_BIT handling SD controller with SDHCI_QUIRK_NO_HISPD_BIT quirk probably use high speed enable bit for other purpose. So this bit shouldn't be changed for high speed enabling for this type of SD controller. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 5b7f5eafb491d5e0a1be375688de266879dc5dc5 Author: Michał Mirosław Date: Mon Aug 14 22:00:26 2017 +0200 mmc: sdhci-s3c: use generic sdhci_set_bus_width() Now that sdhci_set_bus_width() supports 8-bit bus widths based on the MMC_CAP_8_BIT_DATA capability flag, replace the sdhci-s3c version with the generic sdhci version. Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Acked-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-s3c.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) commit adc1639863e6bb9e47015c5668bcdb3fa29d3608 Author: Michał Mirosław Date: Mon Aug 14 22:00:26 2017 +0200 mmc: sdhci-pci: use generic sdhci_set_bus_width() Now that sdhci_set_bus_width() supports 8-bit bus widths based on the MMC_CAP_8_BIT_DATA capability flag, replace the sdhci-pci version with the generic sdhci version. Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) commit 14b04c6a50f80f4560152486a47de97754e6466f Author: Michał Mirosław Date: Mon Aug 14 22:00:24 2017 +0200 mmc: sdhci-tegra: use generic sdhci_set_bus_width() Now that sdhci_set_bus_width() supports 8-bit bus widths based on the MMC_CAP_8_BIT_DATA capability flag, replace the tegra version with the generic sdhci version. Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Tested-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 98f94ea6d823a2605a6cbe16c943e81abd9e8690 Author: Michał Mirosław Date: Mon Aug 14 22:00:24 2017 +0200 mmc: sdhci: key 8BITBUS bit off MMC_CAP_8_BIT_DATA Hosts supporting 8-bit bus are marked accordingly. If MMC_CAP_8_BIT_DATA is not among host capabilities, 8BITBUS bit will never be set and it is not cleared in case some non-SDHCI3 host uses it for something else. Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Tested-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 34292311f0195b2113a5f30e5bea33e4c2668315 Author: Biju Das Date: Mon Aug 21 13:25:11 2017 +0100 mmc: renesas_sdhi: Add r8a7743/5 support Add support for r8a7743/5 SoC. Renesas RZ/G1[ME] (R8A7743/5) SDHI is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Reviewed-by: Wolfram Sang Acked-by: Simon Horman Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e207c8cfaa900590590d2dfdbc5be155f258d7b Author: Adrian Hunter Date: Thu Aug 10 15:08:09 2017 +0300 mmc: core: Turn off CQE before sending commands CQE needs to be off for the host controller to accept non-CQ commands. Turn off the CQE before sending commands, and ensure it is off in any reset or power management paths, or re-tuning. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d3bf68ae04c7e29ed3c30b7f4b1f0c6a4a11c7f1 Author: Adrian Hunter Date: Fri Aug 25 15:43:46 2017 +0300 mmc: host: Add CQE interface Add CQE host operations, capabilities, and host members. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson include/linux/mmc/core.h | 6 ++++++ include/linux/mmc/host.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit c4ee06251d4212a0d55e2371f2db464f6a1e0901 Author: Jin Yao Date: Mon Aug 7 21:05:15 2017 +0800 perf report: Calculate the average cycles of iterations The branch history code has a loop detection function. With this, we can get the number of iterations by calculating the removed loops. While it would be nice for knowing the average cycles of iterations. This patch adds up the cycles in branch entries of removed loops and save the result to the next branch entry (e.g. branch entry A). Finally it will display the iteration number and average cycles at the "from" of branch entry A. For example: perf record -g -j any,save_type ./div perf report --branch-history --no-children --stdio --22.63%--main div.c:42 (RET CROSS_2M) compute_flag div.c:28 (cycles:2 iter:173115 avg_cycles:2) | --10.73%--compute_flag div.c:27 (RET CROSS_2M) rand rand.c:28 (cycles:1) rand rand.c:28 (RET CROSS_2M) __random random.c:298 (cycles:1) __random random.c:297 (COND_BWD CROSS_2M) __random random.c:295 (cycles:1) __random random.c:295 (COND_BWD CROSS_2M) __random random.c:295 (cycles:1) __random random.c:295 (RET CROSS_2M) Signed-off-by: Yao Jin Reviewed-by: Andi Kleen Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1502111115-18305-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 8 +--- tools/perf/ui/stdio/hist.c | 10 ++--- tools/perf/util/callchain.c | 49 +++++++++++------------ tools/perf/util/callchain.h | 9 ++--- tools/perf/util/machine.c | 88 +++++++++++++++++++++++++----------------- 5 files changed, 85 insertions(+), 79 deletions(-) commit 63263d60e0f9f37bfd5e6a1e83a62f0e62fc459f Author: Keith Busch Date: Tue Aug 29 17:46:04 2017 -0400 nvme: Use metadata for passthrough commands The ioctls' struct allows the user to provide a metadata address and length for a passthrough command. This patch uses these values that were previously ignored and deletes the now unused wrapper function. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 485783ca63e3a47fa5a30df8c6745a6299607e4d Author: Keith Busch Date: Tue Aug 29 17:46:03 2017 -0400 nvme: Make nvme user functions static These functions are used only locally in the nvme core. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 10 +++++----- drivers/nvme/host/nvme.h | 7 ------- 2 files changed, 5 insertions(+), 12 deletions(-) commit b5d8af5b521bdb4167808979df37e9defabeb707 Author: Keith Busch Date: Tue Aug 29 17:46:02 2017 -0400 nvme/pci: Use req_op to determine DIF remapping Only read and write commands need DIF remapping. Everything else uses a passthrough integrity payload. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cad65620fecfb24cdeefa5533628a4f293783e7 Author: Christoph Hellwig Date: Tue Aug 29 17:46:01 2017 -0400 nvme: factor metadata handling out of __nvme_submit_user_cmd Keep the metadata code in a separate helper instead of making the main function more complicated. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 76 +++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 36 deletions(-) commit 489beb91e66a237254e23ac1a0fe1beac23d87c5 Author: Roland Dreier Date: Tue Aug 29 10:33:44 2017 -0700 nvme-fabrics: Convert nvmf_transports_mutex to an rwsem The mutex protects against the list of transports changing while a controller is being created, but using a plain old mutex means that it also serializes controller creation. This unnecessarily slows down creating multiple controllers - for example for the RDMA transport, creating a controller involves establishing one connection for every IO queue, which involves even more network/software round trips, so the delay can become significant. The simplest way to fix this is to change the mutex to an rwsem and only hold it for writing when the list is being mutated. Since we can take the rwsem for reading while creating a controller, we can create multiple controllers in parallel. Signed-off-by: Roland Dreier Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c0020756315eebec58310aca42cf9fb73e1322eb Author: Andy Shevchenko Date: Wed Jul 19 21:28:52 2017 +0300 efi: switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Signed-off-by: Andy Shevchenko Acked-by: Ard Biesheuvel Signed-off-by: Christoph Hellwig drivers/firmware/efi/cper.c | 10 ++--- include/linux/cper.h | 94 ++++++++++++++++++++++----------------------- include/linux/efi.h | 4 +- 3 files changed, 54 insertions(+), 54 deletions(-) commit e07127a077c781797f3dc7a873c3815e2a0e6e89 Author: Paul Burton Date: Sat Aug 12 21:36:11 2017 -0700 clocksource: mips-gic-timer: Use new GIC accessor functions Switch from calling functions exported by the GIC interrupt controller to using new accessors provided by asm/mips-gic.h. This will allow the counter-handling functionality to be removed from the interrupt controller driver, where it doesn't really belong, and also allow for inlining of the accesses to the GIC. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Daniel Lezcano Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17021/ Signed-off-by: Ralf Baechle drivers/clocksource/mips-gic-timer.c | 37 ++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit 582e2b4aecdacc0a3bd39daa63648a88cad6a26f Author: Paul Burton Date: Sat Aug 12 21:36:10 2017 -0700 MIPS: GIC: Introduce asm/mips-gic.h with accessor functions This patch introduces a new header providing accessor functions for the MIPS Global Interrupt Controller (GIC) mirroring those provided for the other 2 components of the MIPS Coherent Processing System (CPS) - the Coherence Manager (CM) & Cluster Power Controller (CPC). This header makes use of the new standardised CPS accessor macros where possible, but does require some custom accessors for cases where we have either a bit or a register per interrupt. A major advantage of this over the existing include/linux/irqchip/mips-gic.h definitions is that code performing accesses can become much simpler, for example this: gic_update_bits(GIC_REG(SHARED, GIC_SH_SET_TRIGGER) + GIC_INTR_OFS(intr), 1ul << GIC_INTR_BIT(intr), (unsigned long)trig << GIC_INTR_BIT(intr)); ...can become simply: change_gic_trig(intr, trig); The accessors handle 32 vs 64 bit in the same way as for CM & CPC code, which means that GIC code will also not need to worry about the access size in most cases. They are also accessible outside of drivers/irqchip/irq-mips-gic.c which will allow for simplification in the use of the non-interrupt portions of the GIC (eg. counters) which currently require the interrupt controller driver to expose helper functions for access. This patch doesn't change any existing code over to use the new accessors yet, since a wholesale change would be invasive & difficult to review. Instead follow-on patches will convert code piecemeal to use this new header. The one change to existing code is to rename gic_base to mips_gic_base & make it global, in order to fit in with the naming expected by the standardised CPS accessor macros. Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17020/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cps.h | 1 + arch/mips/include/asm/mips-gic.h | 293 +++++++++++++++++++++++++++++++++++++++ drivers/irqchip/irq-mips-gic.c | 13 +- 3 files changed, 300 insertions(+), 7 deletions(-) commit d2f82254e4e862662e7820953b049b7d4d660ec7 Author: Adrian Hunter Date: Thu Aug 10 15:08:07 2017 +0300 mmc: core: Add members to mmc_request and mmc_data for CQE's Most of the information needed to issue requests to a CQE is already in struct mmc_request and struct mmc_data. Add data block address, some flags, and the task id (tag), and allow for cmd being NULL which it is for CQE tasks. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson include/linux/mmc/core.h | 13 +++++++++++-- include/trace/events/mmc.h | 36 +++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 15 deletions(-) commit bf517d6fec719980fe3b7acd9670a68442a372b7 Author: Adrian Hunter Date: Thu Aug 10 15:08:06 2017 +0300 mmc: core: Add mmc_retune_hold_now() mmc_return_hold() / mmc_retune_release() are used around a group of commands to prevent re-tuning between the commands. Re-tuning can still happen before the first command. In some cases, re-tuning must be prevented entirely. Add mmc_retune_hold_now() for that purpose. It is added in preparation for CQE support where it will be used by CQE recovery. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 6 ++++++ drivers/mmc/core/host.h | 1 + 2 files changed, 7 insertions(+) commit dc8d68bb6c6f7d7fb1aeb3450c0654598e4f4e52 Author: Adrian Hunter Date: Thu Aug 10 15:08:11 2017 +0300 mmc: core: Remove unused MMC_CAP2_PACKED_CMD Packed commands support was removed but some bits got left behind. Remove them. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 23 ----------------------- include/linux/mmc/host.h | 4 ---- 2 files changed, 27 deletions(-) commit 082bb85fbfb4b87787229182db4d22e5ed9fc8e6 Author: Chen-Yu Tsai Date: Thu Aug 10 11:29:54 2017 +0800 mmc: sunxi: Fix clock rate passed to sunxi_mmc_clk_set_phase sunxi_mmc_clk_set_phase expects the actual card clock rate to be passed to it. When the internal divider code was reworked in change ("mmc: sunxi: Support MMC DDR52 transfer mode with new timing mode"), this requirement was missed, and the module clock rate was passed in instead. This broke 8 bit DDR MMC on old controllers, as the module clock rate is double the card clock rate, for which we have no valid delay settings. Fix this by applying the internal divider to the clock rate right after we configure it in hardware. Signed-off-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 41279f0197583a0af4e52575bb8480c4f811b7a9 Author: Wolfram Sang Date: Wed Aug 9 20:29:26 2017 +0200 mmc: sdhi: use maximum width for the sdbuf register Make use of the 64 bit sdbuf width on Renesas R-Car Gen3. If the registers are 8 byte apart, the width is also 64 bit. For all others, the width is 32 bit, even if the registers are only 16 bit apart. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c7825151c70071a445778b226b972d8bfbe2e42a Author: Wolfram Sang Date: Wed Aug 9 21:14:52 2017 +0200 mmc: renesas_sdhi: document version of RZ/A1 instance We don't use this new define yet, but it is helpful to document which versions we know of. Signed-off-by: Wolfram Sang Tested-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 1 + 1 file changed, 1 insertion(+) commit 92b7db8e7a7de26ece965ce934e2f072c02d9f9c Author: Wolfram Sang Date: Wed Aug 9 21:14:51 2017 +0200 mmc: renesas_sdhi: enably CBSY bit for RZ platform It is documented, so enable it to follow the recommendation in the docs and also save a few cycles. Signed-off-by: Wolfram Sang Tested-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5124b59202eb3118eba5ac2222dc00f3390549a8 Author: Wolfram Sang Date: Wed Aug 9 21:00:41 2017 +0200 mmc: renesas_sdhi: use extra flag for CBSY usage There is one SDHI instance on Gen2 which does not have the CBSY bit. So, turn CBSY usage into an extra flag and set it accordingly. This has the additional advantage that we can also set it for other incarnations later. Signed-off-by: Wolfram Sang Tested-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 6 +++++- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 3 ++- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 6 ++++-- include/linux/mfd/tmio.h | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) commit dde6256bf839e1ece2e9dcfa7dc6fedfa353b4ef Author: Arvind Yadav Date: Wed Aug 9 23:20:58 2017 +0530 mmc: vub300: 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: Ulf Hansson drivers/mmc/host/vub300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0fd95b30edb12d8be714674dbd5377b0441786b Author: Hu Ziji Date: Wed Jul 12 15:16:19 2017 -0700 mmc: sdhci-xenon: Add Xenon SDHCI specific system-level PM support Add Xenon specific system-level suspend and resume support. Especially during resume, re-configure Xenon specific registers since registers setting will be lost in suspend if Xenon is power off. Signed-off-by: Hu Ziji Signed-off-by: Zhoujie Wu Tested-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 03de19212ea3bce221e0e79dba8752ddc5b350cb Author: Addy Ke Date: Tue Jul 11 17:38:37 2017 +0800 mmc: dw_mmc: introduce timer for broken command transfer over scheme Per the databook of designware mmc controller 2.70a, table 3-2, cmd done interrupt should be fired as soon as the the cmd is sent via cmd line. And the response timeout interrupt should be generated unconditioinally as well if the controller doesn't receive the resp. However that doesn't seem to meet the fact of rockchip specified Soc platforms using dwmmc. We have continuously found the the cmd done or response timeout interrupt missed somehow which took us a long time to understand what was happening. Finally we narrow down the root to the reconstruction of sample circuit for dwmmc IP introduced by rockchip and the buggy design sweeps over all the existing rockchip Socs using dwmmc disastrously. It seems no way to work around this bug without the proper break-out mechanism so that we seek for a parallel pair the same as the handling for missing data response timeout, namely dto timer. Adding this cto timer seems easily to handle this bug but it's hard to restrict the code under the rockchip specified context. So after merging this patch, it sets up the cto timer for all the platforms using dwmmc IP which isn't ideal but at least we don't advertise new quirk here. Fortunately, no obvious performance regression was found by test and the pre-existing similar catch-all timer for sdhci has proved it's an acceptant way to make the code as robust as possible. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196321 Signed-off-by: Addy Ke Signed-off-by: Ziyuan Xu [shawn.lin: rewrite the code and the commit msg throughout] Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/dw_mmc.h | 2 ++ 2 files changed, 50 insertions(+) commit 361c7fe9b02eee7e1dd950ba70d701d03d292500 Author: liwei Date: Fri Aug 11 16:06:24 2017 +0800 mmc: dw_mmc-k3: add sd support for hi3660 Add sd card support for hi3660 soc Signed-off-by: Li Wei Signed-off-by: Chen Jun Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-k3.c | 298 +++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/dw_mmc.h | 2 + 2 files changed, 300 insertions(+) commit 941e372d89c253fda457fd6267a2c05dd7598df0 Author: liwei Date: Fri Aug 11 16:06:23 2017 +0800 mmc: dw_mmc: move controller reset before driver init This commit modifies dw_mci_probe(), it moves reset assertion before drv_data->init(host) Some driver needs to access controller registers in its .init() ops. So, in order to make such access safe, we should do controller reset before .init() being called. Signed-off-by: Wei Li Signed-off-by: Guodong Xu Signed-off-by: Chen Jun Reviewed-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a2bc74cfee87bdf0f656ada0e5deed6237f31eaf Author: Arvind Yadav Date: Tue Aug 8 11:27:43 2017 +0530 mmc: mxcmmc: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 78bb1fd7f15066ee300fa5adf3af005f4b7a365c Author: Arvind Yadav Date: Tue Aug 8 11:16:38 2017 +0530 mmc: wmt-sdmmc: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/wmt-sdmmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2a641e5374a486741869875a8b1a35dff6fcd669 Author: Srinivas Kandagatla Date: Thu Aug 3 14:46:14 2017 +0200 mmc: sdhci-msm: set sdma_boundary to zero Programming legacy HOST SDMA Buffer Boundary bits in Block Size Register (0x04) is not supported in Qualcomm sdhci controllers. Writing to this would cause the controller not to transfer last block in case block size is 4 bytes or less. This issue was noticed while testing sdio wlan card on Qcom DB410c board. Signed-off-by: Srinivas Kandagatla Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 1 + 1 file changed, 1 insertion(+) commit c846a00f72bf21b4cece98ffd8f28e80d5d7fed1 Author: Srinivas Kandagatla Date: Thu Aug 3 14:46:13 2017 +0200 mmc: sdhci: add sdma_boundary member to struct sdhci_host This patch adds sdma_boundary member to struct sdhci_host to give more flexibility to drivers to control the sdma boundary buffer value and also to fix issue on some sdhci controllers which are broken when HOST SDMA Buffer Boundary is programmed in Block Size Register (0x04) when using ADMA. Qualcomm sdhci controller is one of such type, writing to this bits is un-supported. Default value of sdma_boundary is set to SDHCI_DEFAULT_BOUNDARY_ARG. Signed-off-by: Srinivas Kandagatla Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 13 ++++++++----- drivers/mmc/host/sdhci.h | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) commit 101540680976fc4f30739edd84a134352e3aeab8 Author: Julia Lawall Date: Mon Aug 7 22:15:03 2017 +0200 mmc: renesas-sdhi: constify renesas_sdhi_internal_dmac_dma_ops The structure renesas_sdhi_internal_dmac_dma_ops is only passed as the second argument to renesas_sdhi_probe, which is const, so renesas_sdhi_internal_dmac_dma_ops can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3671967641c50820cf530f2c4cd358bb817a6c8a Author: Julia Lawall Date: Mon Aug 7 11:50:44 2017 +0200 mmc: sdhci-brcmstb: constify sdhci_pltfm_data structures The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, so the sdhci_pltfm_data structure can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a81dae3ac1f7cdd081dd7e50b72aca64ece96afd Author: Julia Lawall Date: Mon Aug 7 11:50:43 2017 +0200 mmc: sdhci-of-arasan: constify sdhci_pltfm_data and sdhci_ops structures The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, while the sdhci_ops structure is only stored in the ops field of a sdhci_pltfm_data structure, which is also const. Thus both kinds of structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Michal Simek Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1201885b7a6123f8c5c716fd34b4ddd892bd32a8 Author: Julia Lawall Date: Mon Aug 7 11:50:42 2017 +0200 mmc: sdhci-sirf: constify sdhci_pltfm_data and sdhci_ops structures The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, while the sdhci_ops structure is only stored in the ops field of a sdhci_pltfm_data structure, which is also const. Thus both kinds of structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sirf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b78f8a8c03405e508d95ab0442e88ec091926b96 Author: Julia Lawall Date: Mon Aug 7 11:50:41 2017 +0200 mmc: sdhci-bcm-kona: constify sdhci_pltfm_data and sdhci_ops structures The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, while the sdhci_ops structure is only stored in the ops field of a sdhci_pltfm_data structure, which is also const. Thus both kinds of structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-bcm-kona.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d35ade8ff7e21d2a8ac57a994cf2cef3b599e9e3 Author: Julia Lawall Date: Mon Aug 7 11:50:40 2017 +0200 mmc: sdhci: constify sdhci_pltfm_data structures The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, so the sdhci_pltfm_data structure can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pic32.c | 2 +- drivers/mmc/host/sdhci-pxav3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6ca2920d8eb7bfd6d4e1bec00eca96954319cad9 Author: Shawn Lin Date: Mon Aug 7 10:07:14 2017 +0800 mmc: core: remove the check of mmc_card_blockaddr for SD cards Per the SD physical layer simplified specification V4.10, section 4.6.2, CSD version 1.0 SD card should use taac, nsac and r2w_factor for calculating the data access time. But the taac and nsac for SDHC(CSD version 2.0) are always fixed and the software should use the recommended value for timeout. When parsing the CSD, we sanely set them to zero for SDHC(CSD version 2.0), all the calculation for timeout_ns and timeout_clk is zero as well. So what we actually want to limit here is either SDHC case or unreasonable timeout reported by the cards. In principle we should at least be able to remove the bogus check for the mmc_card_blockaddr. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70bc85ad1f32408ed92474c2e4d4db6e9714dcf3 Author: Zhoujie Wu Date: Thu Aug 3 12:28:40 2017 -0700 mmc: sdhci: ignore restoring the I/O state if MMC_POWER_OFF One issue was found on a removable high speed sd card with runtime pm enabled. When SD card is unplugged, it keep printing "Switching to 3.3V signalling voltage failed". And found below sequence triggers the error. mmc_rescan -> mmc_sd_detect -> mmc_power_off -- mmc->ios.vdd is updated to 0. -> mmc_claim_host -> sdhci_runtime_resume_host -> sdhci_start_signal_voltage_switch -> mmc_regulator_set_vqmmc -> mmc_ocrbitnum_to_vdd When mmc_ocrbitnum_to_vdd is called, the mmc->ios.vdd is 0, so it always return -EINVAL. The signal switch will always fail and print out warning. Ignore restoring the I/O state when runtime resume if MMC_POWER_OFF. Signed-off-by: Zhoujie Wu Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b939e0b73ec036dca33c920db1b60a8c1c88371e Author: Icenowy Zheng Date: Tue Aug 8 15:09:03 2017 +0800 mmc: sunxi: fix support for new timings mode only SoCs The A83T MMC support code introduces the timings mode switch, however such a switch doesn't exist on new SoCs with only new timings mode. Only execute the switch if the SoC really have the timings mode switch, to fix the regression shown on new timings mode only SoCs (A64, H5, etc). Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a646113435c9c8862a36d459079c69953ad19e8f Author: Chen-Yu Tsai Date: Tue Aug 8 15:02:44 2017 +0800 mmc: sunxi: Fix NULL pointer reference on clk_delays Some SoCs do not support clk delays for MMC in the clock control unit. These include the old controllers in A10/A10s/A13/R8, and the new eMMC controller in A64. The config structure for these controllers do not specify clk_delays, but the check for this was replaced in change "mmc: sunxi: Support controllers that can use both old and new timings". This patch adds back the check for clk_delays, and also adds comments for both checks in sunxi_mmc_clk_set_phase(). Signed-off-by: Chen-Yu Tsai Tested-by: Icenowy Zheng Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 5 +++++ 1 file changed, 5 insertions(+) commit ac98caefe18ab845f4cef6612209212c669008ce Author: Chen-Yu Tsai Date: Mon Jul 24 21:59:01 2017 +0800 mmc: sunxi: Add support for A83T eMMC (MMC2) The third MMC controller (MMC2) on the Allwinner A83T SoC is slightly different. It supports a wider 8-bit bus, has a dedicated controllable reset pin for eMMC, and a "new timing mode" which is supposed to deliver better signals and thus better performance. Add a compatible for this one to use the new timing mode not found in the other controllers. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 1 + drivers/mmc/host/sunxi-mmc.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit c903a2ae546a724a1266628d82917ce0ca994d50 Author: Chen-Yu Tsai Date: Mon Jul 24 21:59:00 2017 +0800 mmc: sunxi: Support MMC DDR52 transfer mode with new timing mode The MMC controller can support DDR52 transfers under the new timing mode. According to the BSP kernel, the module clock has to be double the card clock, regardless of the bus width. The default timings in the hardware can be used. This also reworks the code setting the internal divider, getting rid of a extra conditional. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit ff39e7f742fdb1879e06bd7fd5a1daf9b8be430d Author: Chen-Yu Tsai Date: Mon Jul 24 21:58:59 2017 +0800 mmc: sunxi: Support controllers that can use both old and new timings On the SoCs that introduced the new timing mode for MMC controllers, both the old (where the clock delays are set in the CCU) and new (where the clock delays are set in the MMC controller) timing modes are available, and we have to support them both. However there are two bits that control which mode is active. One is in the CCU, the other is in the MMC controller. The settings on both sides must be the same, or nothing will work. The sunxi-ng clock driver provides an API to query and set the active timing mode. At probe time, we try to set the active mode to the "new timing mode". If it succeeds, we can then use the MMC controller in the new mode. If not, we fall back to the old mode. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 45 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 81e911d0dcdb35203785542e0417cd8feb45df65 Author: Chen-Yu Tsai Date: Mon Jul 24 21:58:58 2017 +0800 clk: sunxi-ng: a83t: Support new timing mode for mmc2 clock The MMC2 clock supports a new timing mode. When the new mode is active, the output clock rate is halved. This patch sets the feature flag for the new timing mode, and adds a pre-divider based on the mode bit. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit dc8797e39fca777217fd4cfc9c74a5337a3daa76 Author: Chen-Yu Tsai Date: Mon Jul 24 21:58:57 2017 +0800 clk: sunxi-ng: Add MP_MMC clocks that support MMC timing modes switching All of our MMC clocks are of the MP clock type. A few MMC clocks on some SoCs, such as MMC2 on the A83T, support new/old timing mode switching. >From a clock rate point of view, when the new timing mode is active. the output clock rate is halved. This patch adds a special wrapper class of clocks, MP_MMC, around the generic MP type clocks. The rate related callbacks in ccu_mp_mmc_ops for this class look at the timing mode bit and apply the /2 post-divider when needed, before passing it through to the generic class ops, ccu_mp_ops. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/clk/sunxi-ng/ccu_mp.c | 80 +++++++++++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu_mp.h | 30 ++++++++++++++++ 2 files changed, 110 insertions(+) commit f6f64ed868d32a121f1535da9f42791c91562e4a Author: Chen-Yu Tsai Date: Mon Jul 24 21:58:56 2017 +0800 clk: sunxi-ng: Add interface to query or configure MMC timing modes. Starting with the A83T SoC, Allwinner introduced a new timing mode for its MMC clocks. The new mode changes how the MMC controller sample and output clocks are delayed to match chip and board specifics. There are two controls for this, one on the CCU side controlling how the clocks behave, and one in the MMC controller controlling what inputs to take and how to route them. In the old mode, the MMC clock had 2 child clocks providing the output and sample clocks, which could be delayed by a number of clock cycles measured from the MMC clock's parent. With the new mode, the 2 delay clocks are no longer active. Instead, the delays and associated controls are moved into the MMC controller. The output of the MMC clock is also halved. The difference in how things are wired between the modes means that the clock controls and the MMC controls must match. To achieve this in a clear, explicit way, we introduce two functions for the MMC driver to use: one queries the hardware for the current mode set, and the other allows the MMC driver to request a mode. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_common.h | 4 ++ drivers/clk/sunxi-ng/ccu_mmc_timing.c | 70 +++++++++++++++++++++++++++++++++++ include/linux/clk/sunxi-ng.h | 35 ++++++++++++++++++ 4 files changed, 110 insertions(+) commit cd09780f9925b030f12a06dacea8bd6e78ec357a Author: Simon Horman Date: Wed Aug 2 14:48:42 2017 +0200 mmc: renesas-sdhi: provide a whitelist for Gen3 SoC ES versions Provide a whitelist for Gen3 SoC ES versions for both the SYS DMAC and internal DMAC variants of the SDHI driver. This is to allow drivers to only initialise for Gen3 SoC ES versions for which they are the appropriate DMAC implementation. Currently internal DMAC is the appropriate implementation for all supported Gen3 SoC ES versions. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 15 +++++++++++++++ drivers/mmc/host/renesas_sdhi_sys_dmac.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+) commit 4406ae215b5a1dd59d941c1323b9f40d241357ac Author: Shawn Lin Date: Wed Aug 2 11:12:42 2017 +0800 mmc: core: correct taac parameter according to the specification Per the spec of JESD84-B51, section 7.3, replace tacc with taac to fix the obvious typo. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 14 +++++++------- drivers/mmc/core/mmc.c | 8 ++++---- drivers/mmc/core/sd.c | 12 ++++++------ include/linux/mmc/card.h | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) commit 30de038d79e091f24ee959e217658736db5aaefb Author: Masahiro Yamada Date: Mon Jul 31 21:00:46 2017 +0900 mmc: sdhci-msm: add static to local functions Detected by sparse. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 306d74d902e2650d8484a48008d9c623e286666e Author: Masahiro Yamada Date: Mon Jul 31 21:03:53 2017 +0900 mmc: of_mmc_spi: fix restricted cast warning of sparse Sparse reports "warning: cast to restricted __be32". Signed-off-by: Masahiro Yamada Signed-off-by: Ulf Hansson drivers/mmc/host/of_mmc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c9e89a1d602c12a4f2bd4c7a57a3315247e3f21 Author: Julia Lawall Date: Sat Jul 29 07:59:41 2017 +0200 mmc: bcm2835: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Stefan Wahren Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be7815d6886f540a6deb3b777b7ae630985c20fd Author: Julia Lawall Date: Sat Jul 29 07:59:40 2017 +0200 mmc: mediatek: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01fa235c6eccfad0ef9cf383f75a5428ef7a9e2e Author: Julia Lawall Date: Sat Jul 29 07:59:39 2017 +0200 mmc: sdricoh_cs: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sdricoh_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f8029c3a1c6d5be547d9191e1ea1f3f56164e74 Author: Julia Lawall Date: Sat Jul 29 07:59:38 2017 +0200 mmc: sunxi: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6fa577bfbe2ad8975e06988c2f3a9a7b50f28ce Author: Julia Lawall Date: Sat Jul 29 07:59:37 2017 +0200 mmc: vub300: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57e30c0c27e391b8dbcacf0bff3a5f4e1289e045 Author: Julia Lawall Date: Sat Jul 29 07:59:36 2017 +0200 mmc: usdhi6rol0: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/usdhi6rol0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 251db11d8764db73758291d23ce6673345f9bb7c Author: Julia Lawall Date: Sat Jul 29 07:59:35 2017 +0200 mmc: toshsd: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/toshsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1586cbb3547980dac326d4bcdec26fefad2a1126 Author: Julia Lawall Date: Sat Jul 29 07:59:34 2017 +0200 mmc: sh_mmcif: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc860c2071606b40971f65f51166561852456cb8 Author: Julia Lawall Date: Sat Jul 29 07:59:33 2017 +0200 mmc: moxart: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/moxart-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2463941fef17417a975f0b0211d4773f5c6f5057 Author: Julia Lawall Date: Sat Jul 29 07:59:32 2017 +0200 mmc: davinci: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/davinci_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d098afee1bf4a9ff33bc8b6c96d537ce8a1bf00 Author: Julia Lawall Date: Sat Jul 29 07:59:31 2017 +0200 mmc: s3cmci: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/s3cmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 159fe671c2aa6a5b5647dfcbbf0a1544c1443a5d Author: Julia Lawall Date: Sat Jul 29 07:59:30 2017 +0200 mmc: wmt-sdmmc: constify mmc_host_ops structures The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/wmt-sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e39220ed6bedc251763d256651c7cd0a8927300 Author: Andy Shevchenko Date: Mon Jul 24 18:07:50 2017 +0300 sdhci: pci: Fix up power if device has ACPI companion Fix up a power state in case PCI device has an ACPI companion. Do it only for Intel Merrifield for now. This is almost copy'n'paste of part of sdhci_acpi_probe() and might be split out to a helper function in the future. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit cd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe Author: Andy Shevchenko Date: Mon Jul 24 17:59:58 2017 +0300 sdhci: acpi: Use new method to get ACPI companion ACPI_COMPANION() macro reduces a code to get a companion device out of struct device. Use it instead of an old method. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 468c648335b1724fcaa0c4f2a0247f77fe4f2977 Author: Zhoujie Wu Date: Fri Jul 21 11:30:58 2017 -0700 mmc: sdhci-xenon: ignore timing DDR52 in tuning Emmc DDR52 mode uses fixed delay, return earlier if timing is MMC_TIMING_MMC_DDR52 in execute tuning function. Signed-off-by: Zhoujie Wu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2cd6c49da2c60e36a86d8e63822cba29fa26aa88 Author: Philipp Zabel Date: Wed Jul 19 17:25:45 2017 +0200 mmc: tegra: 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: Adrian Hunter Cc: Ulf Hansson Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-mmc@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5e40ddacfb4742d2c832a042129edc4356df6b20 Author: Philipp Zabel Date: Wed Jul 19 17:25:44 2017 +0200 mmc: 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: Ulf Hansson Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-mmc@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 926bbbc331eb100aaeb4733a84be69dbaf9e8ed0 Author: Philipp Zabel Date: Wed Jul 19 17:25:43 2017 +0200 mmc: sdhci-st: 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: Patrice Chotard Cc: Adrian Hunter Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a93d6f3138931457c72ebb5e241b8a09518c2dc5 Author: Philipp Zabel Date: Wed Jul 19 17:25:42 2017 +0200 mmc: dw_mmc: 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: Jaehoon Chung Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Signed-off-by: Philipp Zabel Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf892de9fb15b23e47fa4279b4595354661dfb19 Author: Rob Herring Date: Tue Jul 18 16:43:16 2017 -0500 mmc: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Ulf Hansson Cc: Ludovic Desroches Cc: Jan Glauber Cc: David Daney Cc: "Steven J. Hill" Cc: linux-mmc@vger.kernel.org Acked-by: David Daney Tested-by: Steven J. Hill Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 8 ++++---- drivers/mmc/host/atmel-mci.c | 4 ++-- drivers/mmc/host/cavium.c | 6 ++---- 3 files changed, 8 insertions(+), 10 deletions(-) commit e176c2559fc3bbdffd658eb80f91b01af2effed0 Author: Ian Molton Date: Tue Jul 18 13:19:15 2017 +0100 MMC: Remove HIGHMEM dependency from mmc-spi driver I cannot see why this is needed. kmap() should be safe in this case. Signed-off-by: Ian Molton Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adb7434aa6b5f2fea22b541f6eb36cf08ae54e5f Author: Arvind Yadav Date: Mon Jul 17 22:01:33 2017 +0530 mmc: host: via-sdmmc: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 6952 880 0 7832 1e98 drivers/mmc/host/via-sdmmc.o File size After adding 'const': text data bss dec hex filename 7032 800 0 7832 1e98 drivers/mmc/host/via-sdmmc.o Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/via-sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06ebc6010cf588423aa17c883c005c0ed2ddf46e Author: Shawn Lin Date: Wed Jul 19 15:55:49 2017 +0800 mmc: sdhci: remove CONFIG_MMC_DEBUG from the driver sdhci uses CONFIG_MMC_DEBUG for showing ADMA descriptor when occurring ADMA error. And it's also used to dump the registers whenever calling sdhci_add_host. On one hand, I don't see any burden to always print the state ADMA descriptor as it's rare and will help folks better understand what was happening when seeing ADMA error. On the other, folks may be interested in checking some registers at probe time. So we remove the sdhci_dumpregs from __sdhci_add_host and print some really useful registers in sdhci_setup_host. Suggested-by: Adrian Hunter Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 7b6bd20bc4e343094ed0ac650f4fb5d1fdb3d5da Author: Shawn Lin Date: Wed Jul 19 15:55:48 2017 +0800 mmc: wbsd: remove CONFIG_MMC_DEBUG from the driver wbsd only use this to print some unsupported command. However the pr_warn should be enough for dynamic log control and CONFIG_MMC_DEBUG seems bogus here. Remove it. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/wbsd.c | 2 -- 1 file changed, 2 deletions(-) commit 03596b927f83004e84cf131aa45c0ee3dfe31b4b Author: Shawn Lin Date: Wed Jul 19 15:55:47 2017 +0800 mmc: Kconfig: downgrade CONFIG_MMC_DEBUG for host drivers only We have removed all code depending on CONFIG_MMC_DEBUG from mmc core now. So it's safe to make CONFIG_MMC_DEBUG just for host drivers only and we expect to kill this option in the future. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/Kconfig | 7 ------- drivers/mmc/Makefile | 2 -- drivers/mmc/host/Kconfig | 9 +++++++++ 3 files changed, 9 insertions(+), 9 deletions(-) commit 69f25f9bb0cd7a59c3f1d0ecb541049c2e5fb0f9 Author: Shawn Lin Date: Wed Jul 19 15:55:46 2017 +0800 mmc: core: turn the pr_info under CONFIG_MMC_DEBUG into pr_debug There are lots of debug message in core.c which use pr_debug for better dynamic log level control. So it doesn't make sense for those print to still keep working only under CONFIG_MMC_DEBUG. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit b044b1bcc5de194688c33e5911b96ee93fd9ce48 Author: Shawn Lin Date: Wed Jul 19 15:55:45 2017 +0800 mmc: core: always check the length of sglist with total data size All the check within mmc_mrq_prep seems to be all-or-none proposition, so it doesn't make sense to only check the length of sglist only under the CONFIG_MMC_DEBUG context. I'd prefer to always keep the check there unconditionally. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1896f14006b28a7ed6881666d18a244827af0a5b Author: Shawn Lin Date: Wed Jul 19 15:50:56 2017 +0800 mmc: core: remove check of host->removed for rescan routine The intention of this check was to prevent the conflict between hotplug and removing driver for whatever reason. Currently it doesn't improve anything and the following rescan process could still saftly perform the scan flow. So these code seems pointless now and let's remove them. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 13 ------------- include/linux/mmc/host.h | 3 --- 2 files changed, 16 deletions(-) commit ccd3e4c8c23d90928c75a090c6958c080ccdc47f Author: Shawn Lin Date: Fri Jul 21 09:19:50 2017 +0800 mmc: sdhci-acpi: remove unused struct sdhci_host variable It was never used and introduce a warning drivers/mmc/host/sdhci-acpi.c: In function 'sdhci_acpi_sdio_probe_slot': drivers/mmc/host/sdhci-acpi.c:297:21: warning: variable 'host' set but not used [-Wunused-but-set-variable] Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 3 --- 1 file changed, 3 deletions(-) commit 0daf72fe34cc8d23fbaf5ea503923c9d0e516b89 Author: Jean-Francois Dagenais Date: Sun Jul 16 21:23:32 2017 -0400 mmc: sdhci-of-arasan: use io functions from sdhci.h This increases consistency of the code across the sdhci family. Signed-off-by: Jean-Francois Dagenais Acked-by: Adrian Hunter Reviewed-by: Shawn Lin Tested-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69afbb7e3ff28d210597825467b99ffb27b420c5 Author: Shawn Lin Date: Wed Jul 19 08:39:09 2017 +0800 arc: remove num-slots from arc platforms dwmmc driver deprecated num-slots and plan to get rid of it finally. Just move a step to cleanup it from DT. Reviewed-by: Jaehoon Chung Acked-by: Alexey Brodkin Acked-by: Vineet Gupta Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson arch/arc/boot/dts/axs10x_mb.dtsi | 1 - arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 1 - 2 files changed, 2 deletions(-) commit 7366419b5e72e12b705a9cdd5d18abf421668113 Author: Julia Lawall Date: Sat Jul 15 18:27:41 2017 +0200 mmc: atmel-mci: add missing of_node_put for_each_child_of_node performs an of_node_get on each iteration, so a break out the loop requires an of_node_put. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ local idexpression n; expression e,e1; iterator name for_each_child_of_node; @@ for_each_child_of_node(e1,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 1 + 1 file changed, 1 insertion(+) commit e2b372ebb9ceb22bed40572a3a5a4d86fb006b7e Author: Quentin Schulz Date: Thu Jul 13 10:04:18 2017 +0200 mmc: sdhci-of-at91: set clocks and presets after resume from deepest PM This adds deepest (Backup+Self-Refresh) PM support to the ATMEL SAMA5D2 SoC's SDHCI controller. When resuming from deepest state, it is required to restore preset registers as the registers are lost since VDD core has been shut down when entering deepest state on the SAMA5D2. The clocks need to be reconfigured as well. The other registers and init process are taken care of by the SDHCI core. Signed-off-by: Quentin Schulz Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit c8a019e7e12e1d450b5fd8e5bfb180b5a8004d9f Author: Quentin Schulz Date: Thu Jul 13 10:04:17 2017 +0200 mmc: sdhci-of-at91: factor out clks and presets setting The setting of clocks and presets is currently done in probe only but once deep PM support is added, it'll be needed in the resume function. Let's create a function for this setting. Signed-off-by: Quentin Schulz Acked-by: Ludovic Desroches Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 147 ++++++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 65 deletions(-) commit 62b1ab2a71c4d3acb59e109fadb5fec3430642ed Author: Chris Paterson Date: Wed Jul 12 11:03:23 2017 +0100 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,mmcif.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f98e0d5af9a17e046bf7d0682dec3a78ac1cdacb Author: Shawn Lin Date: Thu Jul 6 16:43:45 2017 +0800 mmc: atmel-mci: remove unused sg_len variable We got a warning: drivers/mmc/host/atmel-mci.c:1086:15: warning: variable 'sg_len' set but not used [-Wunused-but-set-variable] Ideally we should check to see if sg_len is zero but looking into the code closely, I didn't find any possible to do that as atmci_start_request didn't even deploy any error handling for its host->prepare_data hook. So even we return error value for iflags like what other host drivers did, for instance, sdhci and dwmmc, it still need some extra work to improve the code. Just remove it to silent the warning, although it isn't perfect. Signed-off-by: Shawn Lin Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a3a56aee5001390bb6073ea9b74e5b0f9a918789 Author: Shawn Lin Date: Thu Jul 6 16:15:23 2017 +0800 mmc: sdhci-xenon: remove pointless struct xenon_priv *priv It was never used and leave a long standing compile warning: drivers/mmc/host/sdhci-xenon.c: In function 'xenon_probe': drivers/mmc/host/sdhci-xenon.c:447:21: warning: variable 'priv' set but not used [-Wunused-but-set-variable] Remove it to fix the warning. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 2 -- 1 file changed, 2 deletions(-) commit 292876ef567518cbfc45b446298458c8b9ce7cb7 Author: Shawn Lin Date: Thu Jul 6 16:26:55 2017 +0800 mmc: block: remove unused struct mmc_card *card It was never used and introduced a long standing compile warning: drivers/mmc/core/block.c: In function 'power_ro_lock_store': drivers/mmc/core/block.c:191:19: warning: variable 'card' set but not used [-Wunused-but-set-variable] Remove it to fix the warning. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 -- 1 file changed, 2 deletions(-) commit 09954ea9b6d4390555b71b30c5c3b82b6c679cf3 Author: Shawn Lin Date: Thu Jul 6 16:09:12 2017 +0800 mmc: mxcmmc: check the return value of mxcmci_finish_data We got a compile warning for mxcmmc, drivers/mmc/host/mxcmmc.c: In function 'mxcmci_data_done': drivers/mmc/host/mxcmmc.c:661:6: warning: variable 'data_error' set but not used [-Wunused-but-set-variable] The easiest method is to remove the data_error. But looking into the code closely, I think we should check the return value of mxcmci_finish_data as if it got data->error(the same as data_error), we shouldn't try to read the response. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 3 +++ 1 file changed, 3 insertions(+) commit e5d0e17bb6022d8c10f7f7a193acee481c53393a Author: Shawn Lin Date: Tue Jul 4 10:30:03 2017 +0800 mmc: mmc_ops: fix a typo for comment of mmc_start_bkops Just a trivial fix for that found by reading the code. Signed-off-by: Shawn Lin Reviewed-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7b16deec958c35c2e7a2fccacf5a677564978a9 Author: Chaotian Jing Date: Mon Jul 3 14:24:56 2017 +0800 mmc: mediatek: add ops->get_cd() support if user plug out sd card slowly, finally card is plugged out but cat /proc/partitions can find that card is still exist in kernel. that's because alougth get card detect interrupt but CMD13 still can get correct response(all other pins are connected expect card detect pin). add ops->get_cd() can avoid this issue. Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 1 + 1 file changed, 1 insertion(+) commit b388dc3c9a4a418235c789bf69b6d38ac1e5c6fd Author: Colin Ian King Date: Thu Jun 29 19:12:19 2017 +0100 mmc: rtsx_usb_sdmmc: make array 'width' static const array width is on-stack and not modified and should be made static const. Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dc48a95fa20832c972c667efa5518bcf3ece6be Author: Wolfram Sang Date: Wed Jun 28 17:21:56 2017 +0200 mmc: renesas_sdhi_core: on R-Car 2+, make use of CBSY bit Most registers need to wait until the command is completed, not necessarily until the bus is free. At least, R-Car 2+ SoCs can signal that via the CBSY bit, so let's use it there instead of SCLKDIVEN to save a little bit of delay. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 01ffb1ae84dc1df6fc0c077aad0de597c6ddc05b Author: Wolfram Sang Date: Wed Jun 28 17:23:11 2017 +0200 mmc: tmio: don't wait on R-Car2+ when handling the clock Our hardware engineers confirmed that it is unnecessary to wait when turning the clock on/off. The documentation was a tad vague, so we used to play safe. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5af02d3209d08f329d46024fe24b7a9c447b3e87 Author: Wolfram Sang Date: Fri Jun 30 12:56:48 2017 +0200 mmc: tmio: no magic values when enabling DMA Use a proper define. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 2 +- drivers/mmc/host/tmio_mmc.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit c78e1694d005c1bfa4f15dd20ab4a7856a3106f0 Author: Wolfram Sang Date: Fri Jun 30 12:56:47 2017 +0200 mmc: tmio: add references to bit defines in the header When defining bits, make sure we always have a reference to the register they belong to. For now, renaming all bits properly seems too intrusive, so at least make sure we have proper documentation. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 2 ++ 1 file changed, 2 insertions(+) commit a43ff82ece7dc50cdd4daafdce9a6d8a6051b55e Author: Wolfram Sang Date: Fri Jun 30 12:56:46 2017 +0200 mmc: tmio: remove obsolete TMIO_BBS Since commit 10c7fcbd0f00a0 ("ARM: shmobile: sh7372: Remove ZBOOT MMC/SDHI support"), this define is not needed anymore. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 2 -- 1 file changed, 2 deletions(-) commit 5ea2a2ace5a0156e7c56d084a3306dc8f7015b8b Author: Wolfram Sang Date: Mon Jul 3 21:28:23 2017 +0200 mmc: tmio: fix CMD12 (STOP) handling I always anticipated this code to be not correct, but now I had a test case to prove it. According to all documentation I have, setting the TMIO_STOP_STP bit ever only worked during block transfers. This bit is like manually enforcing an autocmd12 during a so far seamless transfer. It does NOT work when the block transfer had errors. It also does NOT work with any other cmd except block commands. For all those, CMD12 has to be treated like any other command. So, basically, we could use this bit only for mrq->data->stop cmds. But for these, we happily use the autocmd12 feature using the TMIO_STOP_SEC bit. As a result, the above bit is not useful for us and we need to treat CMD12 as a regular cmd always. Just remove the special handling code. Note that the BSP recognized this issue as well yet had a more cautious solution to the problem [1]. Which is understandable but makes CMD12 handling even more complicated. Checked with a Renesas Salvator-X/M3-W which needed to send CMD12 when retuning one of my SD cards. [1] https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git/commit/?id=2838a2ff8ca776f6d18b7fbbe75f3df8dd64183a Signed-off-by: Wolfram Sang Tested-by: Jan Klötzke Tested-by: Nguyen Viet Dung Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 6 ------ 1 file changed, 6 deletions(-) commit f216c124dc769dfee14b445aec9e1c0b8852d7a2 Author: Gustavo A. R. Silva Date: Fri Jul 7 00:59:28 2017 -0500 mmc: mxcmmc: fix error return code in mxcmci_probe() platform_get_irq() returns an error code, but the mxcmmc driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f77934ab8db9368e29f1cb050af25c244710471 Author: Gustavo A. R. Silva Date: Wed Jun 28 08:55:15 2017 -0500 mmc: android-goldfish: remove logically dead code in goldfish_mmc_irq() Local variable transfer_error is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 1222110 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ulf Hansson drivers/mmc/host/android-goldfish.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2feada5bb0441c918d12778bf9449d5ff805aa7c Author: Ivan Mikhaylov Date: Fri Jun 30 14:53:30 2017 +0300 mmc: sdhci-st: add FSP2(ppc476fpe) into depends for sdhci-st shdci-st driver can be used for ppc476 fsp2 soc. Signed-off-by: Ivan Mikhaylov Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9442400486a1ec28915e9ab31517a5665ed35705 Author: Will Newton Date: Thu Jun 22 11:57:53 2017 +0100 mmc: omap_hsmmc: Reduce max_segs for reliability Reduce max_segs to 64, a value that allows allocation of an entire EDMA descriptor list within a single page - EDMA descriptors are 40 bytes and the header is much larger. This avoids doing a higher order GFP_ATOMIC allocation in edma_prep_slave_sg when setting up a transfer which can potentially fail due to fragmentation under heavy I/O load. The current value of 1024 is unusually high in comparison to other mmc host drivers which mostly use values of between 1 and 256. The EDMA driver at present splits lists above 20 segments in any case so reducing the size of lists we pass to it shouldn't add much overhead. Signed-off-by: Will Newton Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 163671845092af687ef5104ecb2e5b461f4c46d4 Author: Shawn Lin Date: Thu Jun 22 18:29:58 2017 +0800 Documentation: rockchip-dw-mshc: add description for rk3228 Add "rockchip,rk3228-dw-mshc", "rockchip,rk3288-dw-mshc" for dwmmc on rk322x platform. Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | 1 + 1 file changed, 1 insertion(+) commit 2a68ea7896e3277d875c5d5e7f34cf2937cb55c3 Author: Simon Horman Date: Wed Jun 21 16:00:29 2017 +0200 mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC Add a new variant of the SDHI driver to support R-Car Gen3 with DMA via on-chip bus mastering. Since the DMAC is in a part of the SDHI module it is not suitable to be used via DMA Engine. Clearing of DM_CM_INFO1 after DMA thanks to Dirk Behme Cc: Dirk Behme Signed-off-by: Yoshihiro Shimoda Signed-off-by: Ai Kyuse Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 19 ++ drivers/mmc/host/Makefile | 8 +- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 271 ++++++++++++++++++++++++++ drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +- drivers/mmc/host/tmio_mmc.h | 1 + 5 files changed, 299 insertions(+), 2 deletions(-) commit 92d0f925e6344a24b12a6eeb4f1030ec0e70e8d1 Author: Simon Horman Date: Wed Jun 21 16:00:28 2017 +0200 mmc: tmio, renesas-sdhi: add dataend to DMA ops Add dataend to DMA ops to allow DMAC implementation dependent handling of DMA data end. Also implement the operation for SDHI. Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 6 ++++++ drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_core.c | 10 ++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) commit 603aa14d3daaa7073bab4c472025c4963030e0cc Author: Yoshihiro Shimoda Date: Wed Jun 21 16:00:27 2017 +0200 mmc: tmio, renesas-sdhi: add max_{segs, blk_count} to tmio_mmc_data Allow TMIO and SDHI driver implementations to provide values for max_segs and max_blk_count. A follow-up patch will set these values for Renesas Gen3 SoCs the using an SDHI driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Ai Kyuse Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 2 ++ drivers/mmc/host/renesas_sdhi_core.c | 2 ++ drivers/mmc/host/tmio_mmc_core.c | 6 +++--- include/linux/mfd/tmio.h | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) commit 6bba406445e6be29a736304f7dd2773665ef6d34 Author: Arvind Yadav Date: Thu Jun 29 13:39:29 2017 +0530 mmc: omap_hsmmc: constify dev_pm_ops structures dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 11586 624 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o File size After adding 'const': text data bss dec hex filename 11778 432 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f55eb101d4a751347a0f7d8c6addcdbc513cfda Author: Arvind Yadav Date: Tue Jun 20 17:27:00 2017 +0530 mmc: sdhci-st: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-st.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit a0ffec3d4aff071534d61d8e743562223a0cf8a4 Author: James Hogan Date: Sat Aug 12 21:36:09 2017 -0700 irqchip: mips-gic: SYNC after enabling GIC region A SYNC is required between enabling the GIC region and actually trying to use it, even if the first access is a read, otherwise its possible depending on the timing (and in my case depending on the precise alignment of certain kernel code) to hit CM bus errors on that first access. Add the SYNC straight after setting the GIC base. [paul.burton@imgtec.com: Changes later in this series increase our likelihood of hitting this by reducing the amount of code that runs between enabling the GIC & accessing it.] Fixes: a7057270c280 ("irqchip: mips-gic: Add device-tree support") Signed-off-by: James Hogan Signed-off-by: Paul Burton Acked-by: Marc Zyngier Cc: Thomas Gleixner Cc: Jason Cooper Cc: James Hogan Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17019/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-gic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 72af17b9a8caa1fd373c7615cdfef5ee10e20577 Author: Antoine Tenart Date: Thu Aug 24 10:46:39 2017 +0200 arm64: dts: marvell: mcbin: enable more networking ports This patch enables the two GE/SFP ports. They are configured in 10GKR mode by default. To do this the cpm_xdmio is enabled as well, and two phy descriptions are added. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 791b0ade82a77a2db7c61971a1f154cdb2896a82 Author: Antoine Tenart Date: Thu Aug 24 10:46:38 2017 +0200 arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node The network driver on Marvell SoC (7k/8k) needs to access some registers in the system controller to configure its ports at runtime. This patch adds a phandle reference to the syscon system controller node in the ppv2 node. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 1 + 2 files changed, 2 insertions(+) commit d7a5b3e9e42ee95190742fef0d617bbde4f74d80 Author: Emmanuel Grumbach Date: Mon Jun 26 18:33:59 2017 +0300 iwlwifi: mvm: bump API to 34 for 8000 and up These devices support -34.ucode, so load it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit eb045e6e0389eabfd704dd7a76d8b2a892970e85 Author: David Spinadel Date: Thu Aug 17 17:28:22 2017 +0300 iwlwifi: mvm: Avoid deferring non bufferable frames Use bcast station for all non bufferable frames on AP and AD-HOC. The host is no longer aware of STAs PS status because of buffer station offload, so we can't rely on mac80211 to toggle on IEEE80211_TX_CTL_NO_PS_BUFFER bit. A possible issue with buffering such frames, beside the obvious spec violation, is when a station disconnects while in PS but the AP isn't aware of that. In such scenarios the AP won't be able to send probe responses or auth frames so the STA won't be able to reconnect and the AP will have a queue hang. Fixes: 3e56eadfb6a1 ("iwlwifi: mvm: implement AP/GO uAPSD support") Signed-off-by: David Spinadel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 075d8a75daedec14f2337c2881186aabd8fa4fda Author: Liad Kaufman Date: Sun Aug 20 18:10:12 2017 +0300 iwlwifi: fix long debug print There is a debug print that sometimes reaches over 110 chars, thus generating a warning in those cases. Split the print into two to prevent these cases. Fixes: 92b0f7b26b31 ("iwlwifi: split the regulatory rules when the bandwidth flags require it") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2c90e365d769877336e457b2ae6c56146b1bb0bc Author: Thomas Petazzoni Date: Wed Aug 30 11:07:45 2017 +0200 arm64: dts: marvell: add TX interrupts for PPv2.2 This commit updates the Marvell Armada 7K/8K Device Tree to describe the TX interrupts of the Ethernet controllers, in both the master and slave CP110s. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT .../boot/dts/marvell/armada-cp110-master.dtsi | 24 +++++++++++++++++++--- .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 24 +++++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) commit dd88a0a0c8615417fe6b4285769b5b772de87279 Author: Josh Poimboeuf Date: Tue Aug 29 12:51:03 2017 -0500 objtool: Handle GCC stack pointer adjustment bug Arnd Bergmann reported the following warning with GCC 7.1.1: fs/fs_pin.o: warning: objtool: pin_kill()+0x139: stack state mismatch: cfa1=7+88 cfa2=7+96 And the kbuild robot reported the following warnings with GCC 5.4.1: fs/fs_pin.o: warning: objtool: pin_kill()+0x182: return with modified stack frame fs/quota/dquot.o: warning: objtool: dquot_alloc_inode()+0x140: stack state mismatch: cfa1=7+120 cfa2=7+128 fs/quota/dquot.o: warning: objtool: dquot_free_inode()+0x11a: stack state mismatch: cfa1=7+112 cfa2=7+120 Those warnings are caused by an unusual GCC non-optimization where it uses an intermediate register to adjust the stack pointer. It does: lea 0x8(%rsp), %rcx ... mov %rcx, %rsp Instead of the obvious: add $0x8, %rsp It makes no sense to use an intermediate register, so I opened a GCC bug to track it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81813 But it's not exactly a high-priority bug and it looks like we'll be stuck with this issue for a while. So for now we have to track register values when they're loaded with stack pointer offsets. This is kind of a big workaround for a tiny problem, but c'est la vie. I hope to eventually create a GCC plugin to implement a big chunk of objtool's functionality. Hopefully at that point we'll be able to remove of a lot of these GCC-isms from the objtool code. Reported-by: Arnd Bergmann Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6a41a96884c725e7f05413bb7df40cfe824b2444.1504028945.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 94 ++++++++++++----------------------------- tools/objtool/cfi.h | 2 +- tools/objtool/check.c | 81 ++++++++++++++++++++++++++--------- tools/objtool/check.h | 1 + 4 files changed, 88 insertions(+), 90 deletions(-) commit b5fdde28d4b7731554dc9bdeab529fcddd6ba4c7 Author: Bjørn Mork Date: Tue Aug 29 10:45:13 2017 +0200 USB: serial: option: simplify 3 D-Link device entries All the vendor specific interfaces on these devices are serial functions handled by this driver, so we can use a single class match entry for each. P: Vendor=2001 ProdID=7d01 Rev= 3.00 S: Manufacturer=D-Link,Inc S: Product=D-Link DWM-156 C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA 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=cdc_mbim E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim 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=02 Prot=01 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=500us 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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(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=00 Prot=00 Driver=option E: Ad=84(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=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 169e86546f5712179709de23cd64bbb15f199fab Author: Maciej S. Szmigiero Date: Tue Aug 29 21:50:03 2017 +0200 USB: serial: option: add support for D-Link DWM-157 C1 This commit adds support (an ID, really) for D-Link DWM-157 hardware version C1 USB modem to option driver. According to manufacturer-provided Windows INF file the device has four serial ports: "D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port), "D-Link HSPA+DataCard NMEA Device" (interface 3), "D-Link HSPA+DataCard Speech Port" (interface 4), "D-Link HSPA+DataCard Debug Port" (interface 5). usb-devices output: T: Bus=05 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7d0e Rev=03.00 S: Manufacturer=D-Link,Inc S: Product=D-Link DWM-157 C: #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage Signed-off-by: Maciej S. Szmigiero Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) commit c338aa5deb2a0ea4d82ad9e6a21cc97973330bba Merge: 1df2950 c28adcb Author: Olof Johansson Date: Tue Aug 29 22:42:22 2017 -0700 Merge tag 'uniphier-dt64-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64 UniPhier ARM64 SoC DT updates for v4.14 (2nd) - add reset controller node of analog amplifier - add AIDET irqchip device nodes - fix size of sdctrl node - support new SoC PXs3 and its reference development board * tag 'uniphier-dt64-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add PXs3 SoC support arm64: dts: uniphier: fix size of sdctrl node arm64: dts: uniphier: add AIDET nodes arm64: dts: uniphier: add reset controller node of analog amplifier Signed-off-by: Olof Johansson commit 983d7c4570dfd08990fbb8fe9ad6686214173af1 Merge: 940bf1d 8a7a516 Author: Olof Johansson Date: Tue Aug 29 22:41:34 2017 -0700 Merge tag 'uniphier-dt-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt UniPhier ARM SoC DT updates for v4.14 (2nd) - add AIDET irqchip device nodes - fix size of sdctrl node - add ethernet pinmux nodes * tag 'uniphier-dt-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add pinctrl groups of ethernet phy mode ARM: dts: uniphier: fix size of sdctrl nodes ARM: dts: uniphier: add AIDET nodes Signed-off-by: Olof Johansson commit d081a16db80ef7a260fb178aa1199e01f7432625 Author: Florian Fainelli Date: Tue Aug 29 21:48:51 2017 -0700 net: bcmgenet: Do not return from void function A stray return was added in the macro bcmgenet_##name##_writel where it should not, drop it. Reported-by: kbuild test robot Fixes: 69d2ea9c7989 ("net: bcmgenet: Use correct I/O accessors") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1df295087079e2c87cc52e8aa3c6c87c62e88895 Merge: c78c4ec 47884c5 Author: Olof Johansson Date: Tue Aug 29 22:25:07 2017 -0700 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt64 Amlogic 64-bit DT updates for v4.14, round 2 - clock updates w/dependencies on clock tree - GPIO names updates * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names ARM64: dts: meson-gx: Add AO CEC nodes ARM64: dts: meson-gx: update AO clkc to new bindings dt-bindings: clock: gxbb-aoclk: Add CEC 32k clock clk: meson: gxbb: Add sd_emmc clk0 clkids clk: meson-gxbb: expose almost every clock in the bindings clk: meson8b: expose every clock in the bindings clk: meson: gxbb: fix protection against undefined clks clk: meson: meson8b: fix protection against undefined clks dt-bindings: clock: meson8b: describe the embedded reset controller Signed-off-by: Olof Johansson commit d303a86dd4a7188e49a1523a8c27d59d4851ea76 Author: Heiko Stuebner Date: Thu Aug 24 17:02:10 2017 +0200 arm64: defconfig: enable rockchip graphics Enable the graphics-related options needed by Rockchip boards. This includes the pwm-backlight which will be needed by the internal displays used on Gru Chrome-devices. Signed-off-by: Heiko Stuebner Reviewed-by: Mark yao Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit c78c4ec2f27a532094de85e9caa7c6173c720734 Merge: e9a203a bf32f2a Author: Olof Johansson Date: Tue Aug 29 22:23:22 2017 -0700 Merge tag 'mvebu-dt64-4.14-3' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.14 (part 3) Add description for a new family SoC from Marvell: Armada-8KP. * tag 'mvebu-dt64-4.14-3' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add Device Tree files for Armada-8KP Signed-off-by: Olof Johansson commit 940bf1d6f7433b654899c94ea9bdccc70e4d4622 Merge: c32e176 dfff569 Author: Olof Johansson Date: Tue Aug 29 22:21:59 2017 -0700 Merge tag 'v4.13-next-dts32' of https://github.com/mbgg/linux-mediatek into next/dt - mt7623: add mt7623n and mt7623a plattform - add mt7623 based reference boards - mt7623: add usb3, ethernet, cpufreq, - Add banana-pi board - add mt6323 pmic - mt2701: add larb-id property to smi larb * tag 'v4.13-next-dts32' of https://github.com/mbgg/linux-mediatek: arm: dts: mt7623: cleanup binding file arm: dts: mt7623: Add SD-card and EMMC to bananapi-r2 arm: dts: mediatek: add larbid property for larb arm: dts: mt7623: fix mmc interrupt assignment arm: dts: mt2701: Add usb3 device nodes arm: dts: mt2701: Add ethernet device node arm: dts: mt7623: add clock-frequency to CPU nodes arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board arm: dts: mt7623: enable the nand device on the mt7623n nand rfb arm: dts: mt7623: enable the usb device on the mt7623n rfb arm: dts: mt7623: cleanup the mt7623n rfb uart nodes arm: dts: mt7623: rename mt7623-evb.dts to arch/arm/boot/dts/mt7623n-rfb.dtsi arm: dts: mt7623: add mt6323.dtsi file dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC Platform dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards arm: dts: mt7623: fixup binding violation missing reset in ethernet node dt-bindings: net: mediatek: update documentation for reset signals Signed-off-by: Olof Johansson commit a93fae750d462ae94b83c5c4e21ffa67e4870135 Author: Robert Richter Date: Tue Aug 8 11:29:13 2017 +0200 MAINTAINERS: Update Cavium ThunderX2 entry Add Robert Richter as the primary maintainer for this platform. Signed-off-by: Jayachandran C Signed-off-by: Robert Richter Signed-off-by: Olof Johansson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit edd03602d97236e8fea13cd76886c576186aa307 Author: Paul Mackerras Date: Mon Aug 28 14:31:24 2017 +1000 KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list Al Viro pointed out that while one thread of a process is executing in kvm_vm_ioctl_create_spapr_tce(), another thread could guess the file descriptor returned by anon_inode_getfd() and close() it before the first thread has added it to the kvm->arch.spapr_tce_tables list. That highlights a more general problem: there is no mutual exclusion between writers to the spapr_tce_tables list, leading to the possibility of the list becoming corrupted, which could cause a host kernel crash. To fix the mutual exclusion problem, we add a mutex_lock/unlock pair around the list_del_rce in kvm_spapr_tce_release(). Also, this moves the call to anon_inode_getfd() inside the region protected by the kvm->lock mutex, after we have done the check for a duplicate LIOBN. This means that if another thread does guess the file descriptor and closes it, its call to kvm_spapr_tce_release() will not do any harm because it will have to wait until the first thread has released kvm->lock. With this, there are no failure points in kvm_vm_ioctl_create_spapr_tce() after the call to anon_inode_getfd(). The other things that the second thread could do with the guessed file descriptor are to mmap it or to pass it as a parameter to a KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE ioctl on a KVM device fd. An mmap call won't cause any harm because kvm_spapr_tce_mmap() and kvm_spapr_tce_fault() don't access the spapr_tce_tables list or the kvmppc_spapr_tce_table.list field, and the fields that they do use have been properly initialized by the time of the anon_inode_getfd() call. The KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE ioctl calls kvm_spapr_tce_attach_iommu_group(), which scans the spapr_tce_tables list looking for the kvmppc_spapr_tce_table struct corresponding to the fd given as the parameter. Either it will find the new entry or it won't; if it doesn't, it just returns an error, and if it does, it will function normally. So, in each case there is no harmful effect. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 88c6060f5a7f3fc1530b2722d5964945e5174358 Author: Sricharan R Date: Thu Aug 24 12:51:42 2017 +0530 rpmsg: glink: Handle remote rx done command Once the remote side sends a rx done ack, check for the intent reuse information from it and suitably discard or reuse the remote passed intent buffers. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 27b9c5b66b23edd4daaf9f455b0b3e54bcc2ae4e Author: Sricharan R Date: Thu Aug 24 12:51:41 2017 +0530 rpmsg: glink: Request for intents when unavailable While sending data, we search for suitable sized intent to map and simply fail if a intent is not found. Instead request for a intent of required size and wait till one is alloted. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 76 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit 11cb45a7f8c7a09d14a02754f96fa97938a5a1bb Author: Sricharan R Date: Thu Aug 24 12:51:40 2017 +0530 rpmsg: glink: Use the intents passed by remote While sending data, use the remote intent id buffer of suitable size that was passed by remote previously. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit dacbb35e930f8348f70f2daf58ea6eb42b140a0b Author: Sricharan R Date: Thu Aug 24 12:51:39 2017 +0530 rpmsg: glink: Receive and store the remote intent buffers Just like we allocating and sending intent ids to remote, remote side allocates and sends us the intents as well. So save the intent ids and use it later while sending data targeting the appropriate intents based on the size. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 71 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) commit 6bf68cbdf7df32d53fcf32a9615d00913eac8d23 Author: Sricharan R Date: Thu Aug 24 12:51:38 2017 +0530 rpmsg: glink: Add announce_create ops and preallocate intents Preallocate local intent buffers and pass the intent ids to the remote. This way there are some default intents available for the remote to start sending data without having to wait by sending intent requests. Do this by adding the rpmsg announce_create ops, which gets called right after the rpmsg device gets probed. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1d2ea36eead91e77e2733000a7f8e81a87d30c52 Author: Sricharan R Date: Thu Aug 24 12:51:37 2017 +0530 rpmsg: glink: Add rx done command Send RX data receive ack to remote and also inform that local intent buffer is used and freed. This informs the remote to request for next set of intent buffers before doing a send operation. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit b88eee975a26b1542c9da91571f79c110c108dd1 Author: Bjorn Andersson Date: Thu Aug 24 12:51:36 2017 +0530 rpmsg: glink: Make RX FIFO peak accessor to take an offset To fully read the received rx data from FIFO both the command and data has to be read. Currently we read command, data separately and process them. By adding an offset parameter to RX FIFO peak accessor, command and data can be read together, simplifying things. So introduce this. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 15 +++++++-------- drivers/rpmsg/qcom_glink_native.h | 2 +- drivers/rpmsg/qcom_glink_rpm.c | 5 ++++- drivers/rpmsg/qcom_glink_smem.c | 5 ++++- 4 files changed, 16 insertions(+), 11 deletions(-) commit 64f95f87920da673d84396ff1253be2098751e38 Author: Sricharan R Date: Thu Aug 24 12:51:35 2017 +0530 rpmsg: glink: Use the local intents when receiving data So previously on request from remote side, we allocated local intent buffers and passed the ids to the remote. Now when we receive data buffers from remote directed to that intent id, copy the data to the corresponding preallocated intent buffer. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 75 ++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 25 deletions(-) commit 933b45da5d1d7c06d53e523833b5f8a6a9bdfa63 Author: Sricharan R Date: Thu Aug 24 12:51:34 2017 +0530 rpmsg: glink: Add support for TX intents Intents are nothing but pre-allocated buffers of appropriate size that are allocated on the local side and communicated to the remote side and the remote stores the list of intent ids that it is informed. Later when remote side is intenting to send data, it picks up a right intent (based on the size) and sends the data buffer and the intent id. Local side receives the data and copies it to the local intent buffer. The whole idea is to avoid stalls on the transport for allocating memory, used for copy based transports. When the remote request to allocate buffers using CMD_RX_INTENT_REQ, we allocate buffers of requested size, store the buffer id locally and also communicate the intent id to the remote. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 167 +++++++++++++++++++++++++++++++++++++- drivers/rpmsg/qcom_glink_native.h | 3 +- drivers/rpmsg/qcom_glink_rpm.c | 3 +- drivers/rpmsg/qcom_glink_smem.c | 5 +- 4 files changed, 173 insertions(+), 5 deletions(-) commit 44f6df922a260f1906abca8c0771e1811fff8443 Author: Sricharan R Date: Thu Aug 24 12:51:33 2017 +0530 rpmsg: glink: Fix idr_lock from mutex to spinlock The channel members lcids, rcids synchronised using the idr_lock is accessed in both atomic/non-atomic contexts. The readers are not currently synchronised. That no correct, so add the readers as well under the lock and use a spinlock. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 62 ++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 20 deletions(-) commit d31ad615f6fb809b534f6091cd06a7e88c44393e Author: Sricharan R Date: Thu Aug 24 12:51:32 2017 +0530 rpmsg: glink: Add support for transport version negotiation G-link supports a version number and feature flags for each transport. A combination of the version number and feature flags enable/disable: (*) G-Link software updates for each edge (*) Individual features for each edge Endpoints negotiate both the version and the supported flags when the transport is opened and they cannot be changed after negotiation has been completed. Each full implementation of G-Link must support a minimum of the current version, the previous version, and the base negotiation version called v0. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 75 ++++++++++++++++++++++++++++++++++++--- drivers/rpmsg/qcom_glink_native.h | 5 +++ drivers/rpmsg/qcom_glink_rpm.c | 4 ++- drivers/rpmsg/qcom_glink_smem.c | 1 + 4 files changed, 79 insertions(+), 6 deletions(-) commit caf989c350e8e0b9584744b9005fc2c45ca30883 Author: Bjorn Andersson Date: Thu Aug 24 12:51:30 2017 +0530 rpmsg: glink: Introduce glink smem based transport The glink protocol supports different types of transports (shared memory). With the core protocol remaining the same, the way the transport's memory is probed and accessed is different. So add support for glink's smem based transports. Adding a new smem transport register function and the fifo accessors for the same. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 10 ++ drivers/rpmsg/Makefile | 1 + drivers/rpmsg/qcom_glink_native.c | 5 + drivers/rpmsg/qcom_glink_native.h | 1 + drivers/rpmsg/qcom_glink_smem.c | 311 ++++++++++++++++++++++++++++++++++++++ include/linux/rpmsg/qcom_glink.h | 27 ++++ 6 files changed, 355 insertions(+) commit 03fc6134c260930b3784fd0a06edcf44f4e39581 Author: Hou Zhiqiang Date: Fri Aug 4 14:41:34 2017 +0800 PCI: layerscape: Add support for ls1088a Add support for ls1088a. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian Documentation/devicetree/bindings/pci/layerscape-pci.txt | 1 + drivers/pci/dwc/pci-layerscape.c | 1 + 2 files changed, 2 insertions(+) commit 651a013649943710a900551ec6e03d2084e1a65a Author: Christoph Hellwig Date: Fri Aug 25 17:37:41 2017 +0200 scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough Simplify the SMP passthrough code by switching it to the generic bsg-lib helpers that abstract away the details of the request code, and gets drivers out of seeing struct scsi_request. For the libsas host SMP code there is a small behavior difference in that we now always clear the residual len for successful commands, similar to the three other SMP handler implementations. Given that there is no partial command handling in the host SMP handler this should not matter in practice. [mkp: typos and checkpatch fixes] Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/message/fusion/mptsas.c | 79 +++++------ drivers/scsi/libsas/Kconfig | 1 + drivers/scsi/libsas/sas_expander.c | 70 +++++----- drivers/scsi/libsas/sas_host_smp.c | 106 ++++++-------- drivers/scsi/libsas/sas_internal.h | 12 +- drivers/scsi/mpt3sas/mpt3sas_transport.c | 230 ++++++++++++------------------- drivers/scsi/scsi_transport_sas.c | 118 ++++------------ include/scsi/libsas.h | 3 - include/scsi/scsi_transport_sas.h | 4 +- 9 files changed, 243 insertions(+), 380 deletions(-) commit eaa79a6cd733e1f978613a5fcf5f7c1cdb38eb2a Author: Christoph Hellwig Date: Fri Aug 25 17:37:40 2017 +0200 scsi: smartpqi: remove the smp_handler stub The SAS transport class will do the right thing and not register the BSG node if now smp_handler method is present. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_sas_transport.c | 9 --------- 1 file changed, 9 deletions(-) commit 9a664f4924907300246413ba3ccd9fadb0934c29 Author: Christoph Hellwig Date: Fri Aug 25 17:37:39 2017 +0200 scsi: hpsa: remove the smp_handler stub The SAS transport class will do the right thing and not register the BSG node if now smp_handler method is present. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 9 --------- 1 file changed, 9 deletions(-) commit c1225f01af085aea9c9d094febf157de9d07d861 Author: Christoph Hellwig Date: Fri Aug 25 17:37:38 2017 +0200 scsi: bsg-lib: pass the release callback through bsg_setup_queue The SAS code will need it. Also mark the name argument const to match bsg_register_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen block/bsg-lib.c | 7 ++++--- drivers/scsi/scsi_transport_fc.c | 6 ++++-- drivers/scsi/scsi_transport_iscsi.c | 2 +- include/linux/bsg-lib.h | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) commit ccf1e0045eea8f98d60fc9327bcb14c958d2e4c7 Author: Bart Van Assche Date: Tue Aug 29 08:50:13 2017 -0700 scsi: Rework handling of scsi_device.vpd_pg8[03] Introduce struct scsi_vpd for the VPD page length, data and the RCU head that will be used to free the VPD data. Use kfree_rcu() instead of kfree() to free VPD data. Move the VPD buffer pointer check inside the RCU read lock in the sysfs code. Only annotate pointers that are shared across threads with __rcu. Use rcu_dereference() when dereferencing an RCU pointer. This patch suppresses about twenty sparse complaints about the vpd_pg8[03] pointers. This patch also fixes a race condition, namely that updating of the VPD pointers and length variables in struct scsi_device was not atomic with reference to the code reading these variables. See also "Does the update code tolerate concurrent accesses?" in Documentation/RCU/checklist.txt. Fixes: commit 09e2b0b14690 ("scsi: rescan VPD attributes") Signed-off-by: Bart Van Assche Acked-by: Hannes Reinecke Reviewed-by: Shane Seymour Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Shane Seymour Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 44 ++++++++++++++++++-------------------------- drivers/scsi/scsi_lib.c | 16 ++++++++-------- drivers/scsi/scsi_sysfs.c | 29 ++++++++++++++++++++--------- include/scsi/scsi_device.h | 18 ++++++++++++++---- 4 files changed, 60 insertions(+), 47 deletions(-) commit 1e3f720a67c29e145321ed9b4ef7a83e6416d201 Author: Bart Van Assche Date: Tue Aug 29 08:50:12 2017 -0700 scsi: Rework the code for caching Vital Product Data (VPD) Introduce the scsi_get_vpd_buf() and scsi_update_vpd_page() functions. The only functional change in this patch is that if updating page 0x80 fails that it is attempted to update page 0x83. Signed-off-by: Bart Van Assche Acked-by: Hannes Reinecke Reviewed-by: Shane Seymour Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Shane M Seymour Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 144 ++++++++++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 78 deletions(-) commit 26e3e3cb05604073f2e9969fb0f06f35eb3b3313 Author: Bart Van Assche Date: Tue Aug 29 08:50:11 2017 -0700 scsi: rcu: Introduce rcu_swap_protected() A common pattern in RCU code is to assign a new value to an RCU pointer after having read and stored the old value. Introduce a macro for this pattern. Signed-off-by: Bart Van Assche Acked-by: Paul E. McKenney Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Shane M Seymour Signed-off-by: Martin K. Petersen include/linux/rcupdate.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1ae948fa4f00f3a2823e7cb19a3049ef27dd6947 Author: Brian King Date: Tue Aug 29 10:00:29 2017 -0500 scsi: aacraid: Fix command send race condition This fixes a potential race condition observed on Power systems. Several places throughout the aacraid driver call aac_fib_send or similar to send a command to the aacraid adapter, then check the return code to determine if the command was actually sent to the adapter, then update the phase field in the scsi command scratch pad area to track that the firmware now owns this command. However, there is nothing that ensures that by the time the aac_fib_send function returns and we go to write to the scsi command, that the command hasn't already completed and the scsi command has been freed. This was causing random crashes in the TCP stack which was tracked down to be caused by memory that had been a struct request + scsi_cmnd being now used for an skbuff. Memory poisoning was enabled in the kernel to debug this which showed that the last owner of the memory that had been freed was aacraid and that it was a struct request. The memory that was corrupted was the exact data pattern of AAC_OWNER_FIRMWARE and it was at the same offset that aacraid writes, which is scsicmd->SCp.phase. The patch below resolves this issue. Cc: Signed-off-by: Brian King Tested-by: Wen Xiong Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 54 +++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) commit 02881768695da29772f6f9e0d857a8637c6b0e90 Author: Dan Williams Date: Tue Aug 29 18:28:18 2017 -0700 libnvdimm, label: fix index block size calculation The old calculation assumed that the label space was 128k and the label size is 128. With v1.2 labels where the label size is 256 this calculation will return zero. We are saved by the fact that the nsindex_size is always pre-initialized from a previous 128 byte assumption and we are lucky that the index sizes turn out the same. Fix this going forward in case we start encountering different geometries of label areas besides 128k. Since the label size can change from one call to the next, drop the caching of nsindex_size. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 30 ++++++++++++++++-------------- drivers/nvdimm/nd.h | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) commit e931d0dab4393f7195f84f42ed6fd973c26f62f1 Author: Punit Agrawal Date: Tue Aug 29 14:20:20 2017 +0100 ACPI / APEI: Suppress message if HEST not present According to the ACPI specification, firmware is not required to provide the Hardware Error Source Table (HEST). When HEST is not present, the following superfluous message is printed to the kernel boot log - [ 3.460067] GHES: HEST is not enabled! Extend hest_disable variable to track whether the firmware provides this table and if it is not present skip any log output. The existing behaviour is preserved in all other cases. Suggested-by: Borislav Petkov Signed-off-by: Punit Agrawal Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 7 ++++++- drivers/acpi/apei/hest.c | 13 +++++++------ include/acpi/apei.h | 8 +++++++- 3 files changed, 20 insertions(+), 8 deletions(-) commit caf59a5b63051f955152ec0acc64de0d5784e72e Author: Edward A. James Date: Mon Aug 21 14:46:13 2017 -0500 Documentation: hwmon: Document the IBM CFF power supply Signed-off-by: Edward A. James Signed-off-by: Guenter Roeck Documentation/hwmon/ibm-cffps | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286 Author: Rafael J. Wysocki Date: Tue Aug 29 03:14:37 2017 +0200 cpuidle: Make drivers initialize polling state Make the drivers that want to include the polling state into their states table initialize it explicitly and drop the initialization of it (which in fact is conditional, but that is not obvious from the code) from the core. Signed-off-by: Rafael J. Wysocki Tested-by: Sudeep Holla Acked-by: Daniel Lezcano drivers/acpi/processor_idle.c | 9 ++++++++- drivers/cpuidle/driver.c | 2 -- drivers/cpuidle/poll_state.c | 3 ++- drivers/idle/intel_idle.c | 1 + include/linux/cpuidle.h | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) commit 34c2f65b718d44ea7d7b3cc10777f410677455ce Author: Rafael J. Wysocki Date: Wed Aug 23 23:21:07 2017 +0200 cpuidle: Move polling state initialization code to separate file Move the polling state initialization code to a separate file built conditionally on CONFIG_ARCH_HAS_CPU_RELAX to get rid of the #ifdef in driver.c. Signed-off-by: Rafael J. Wysocki Tested-by: Sudeep Holla Acked-by: Daniel Lezcano drivers/cpuidle/Makefile | 1 + drivers/cpuidle/driver.c | 31 ------------------------------- drivers/cpuidle/poll_state.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/cpuidle.h | 6 ++++++ 4 files changed, 43 insertions(+), 31 deletions(-) commit f69316d62c7066edc4693b85c6e9f987eed62772 Author: Edward A. James Date: Mon Aug 21 14:46:12 2017 -0500 hwmon: (pmbus) Add IBM Common Form Factor (CFF) power supply driver Add the driver to monitor IBM CFF power supplies with hwmon over pmbus. Signed-off-by: Edward A. James [groeck: drop 'default n'; include bitops.h instead of jiffies.h] Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/Kconfig | 9 +++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/ibm-cffps.c | 151 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) commit dc2251bf98c66db3f4e055b751968f0871037ae4 Author: Rafael J. Wysocki Date: Wed Aug 23 23:19:57 2017 +0200 cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol On some architectures the first (index 0) idle state is a polling one and it doesn't really save energy, so there is the CPUIDLE_DRIVER_STATE_START symbol allowing some pieces of cpuidle code to avoid using that state. However, this makes the code rather hard to follow. It is better to explicitly avoid the polling state, so add a new cpuidle state flag CPUIDLE_FLAG_POLLING to mark it and make the relevant code check that flag for the first state instead of using the CPUIDLE_DRIVER_STATE_START symbol. In the ACPI processor driver that cannot always rely on the state flags (like before the states table has been set up) define a new internal symbol ACPI_IDLE_STATE_START equivalent to the CPUIDLE_DRIVER_STATE_START one and drop the latter. Signed-off-by: Rafael J. Wysocki Tested-by: Sudeep Holla Acked-by: Daniel Lezcano drivers/acpi/processor_idle.c | 10 ++++++---- drivers/cpuidle/driver.c | 1 + drivers/cpuidle/governors/ladder.c | 14 ++++++++------ drivers/cpuidle/governors/menu.c | 13 +++++-------- include/linux/cpuidle.h | 7 +------ 5 files changed, 21 insertions(+), 24 deletions(-) commit 74560e4a440891649971a11e518681b088c6a1f9 Author: Edward A. James Date: Mon Aug 21 14:46:11 2017 -0500 dt-bindings: hwmon: Document the IBM CCF power supply version 1 Signed-off-by: Edward A. James Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/ibm,cffps1.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1dad2e958a0b0e402adfd1546d15e7b628ac2c5a Author: Arvind Yadav Date: Sun Aug 20 00:56:34 2017 +0530 hwmon: (ftsteutates) 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: Guenter Roeck drivers/hwmon/ftsteutates.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaa72dc47488d599439cd0fd0f8c4f1bcb3906bb Author: Eric Dumazet Date: Tue Aug 29 15:16:01 2017 -0700 neigh: increase queue_len_bytes to match wmem_default Florian reported UDP xmit drops that could be root caused to the too small neigh limit. Current limit is 64 KB, meaning that even a single UDP socket would hit it, since its default sk_sndbuf comes from net.core.wmem_default (~212992 bytes on 64bit arches). Once ARP/ND resolution is in progress, we should allow a little more packets to be queued, at least for one producer. Once neigh arp_queue is filled, a rogue socket should hit its sk_sndbuf limit and either block in sendmsg() or return -EAGAIN. Signed-off-by: Eric Dumazet Reported-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 7 +++++-- include/net/sock.h | 10 ++++++++++ net/core/sock.c | 10 ---------- net/decnet/dn_neigh.c | 2 +- net/ipv4/arp.c | 2 +- net/ipv4/tcp_input.c | 2 +- net/ipv6/ndisc.c | 2 +- 7 files changed, 19 insertions(+), 16 deletions(-) commit 0dd5759dbb1c9a862e7d90c09d6cf398c45f1100 Author: Dave Jiang Date: Tue Aug 29 13:17:51 2017 -0700 net: remove dmaengine.h inclusion from netdevice.h Since the removal of NET_DMA, dmaengine.h header file shouldn't be needed by netdevice.h anymore. Signed-off-by: Dave Jiang Signed-off-by: David S. Miller include/linux/netdevice.h | 1 - 1 file changed, 1 deletion(-) commit 69d2ea9c798983c4a7157278ec84ff969d1cd8e8 Author: Florian Fainelli Date: Tue Aug 29 12:25:31 2017 -0700 net: bcmgenet: Use correct I/O accessors The GENET driver currently uses __raw_{read,write}l which means native I/O endian. This works correctly for an ARM LE kernel (default) but fails miserably on an ARM BE (BE8) kernel where registers are kept little endian, so replace uses with {read,write}l_relaxed here which is what we want because this is all performance sensitive code. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 75 ++++++++++++++++---------- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 13 ++++- 2 files changed, 58 insertions(+), 30 deletions(-) commit b6eb9d500087a79feab2be8adb84826ffc955690 Author: Weilin Chang Date: Tue Aug 29 12:19:57 2017 -0700 liquidio: show NIC's U-Boot version in a dev_info() message Signed-off-by: Weilin Chang Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller .../net/ethernet/cavium/liquidio/octeon_console.c | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 7e3108fab50a292e95ac8821da8b7d34b2fbb809 Author: Bhumika Goyal Date: Tue Aug 29 22:17:52 2017 +0530 net: dsa: make some structures const Make these const as they are not modified anywhere. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1dd71588c2c622d0c8c09a623c6baa39e691cb5e Author: Christoph Hellwig Date: Sun Aug 27 18:10:22 2017 +0200 MIPS: Don't use dma_cache_sync to implement fd_cacheflush The floppy drivers doesn't otherwise use the DMA API, so indirecting through it just for cache flushing in MIPS-specific code just call dma_cache_wback_inv directly. Signed-off-by: Christoph Hellwig Cc: iommu@lists.linux-foundation.org Cc: Marek Szyprowski Cc: Robin Murphy Cc: Michal Simek Cc: David Howells Cc: Guan Xuetao Cc: Chris Zankel Cc: Max Filippov Cc: x86@kernel.org Cc: linux-mips@linux-mips.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-xtensa@linux-xtensa.org Cc: linux-sh@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17183/ Signed-off-by: Ralf Baechle arch/mips/include/asm/floppy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2c03291fba35dbba1712a0d9a679a43567d36a4 Author: Paul Burton Date: Mon Aug 7 16:01:18 2017 -0700 MIPS: generic: Bump default NR_CPUS to 16 In generic_defconfig set CONFIG_NR_CPUS to 16 rather than 2, which is a rather too low limit for many modern day MIPS systems. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16949/ Signed-off-by: Ralf Baechle arch/mips/configs/generic_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8bfffc1cce1bcb469cecc5679e1a5b12fe4a16c Author: Paul Burton Date: Mon Aug 7 16:01:17 2017 -0700 MIPS: generic: Don't explicitly disable CONFIG_USB_SUPPORT Leave CONFIG_USB_SUPPORT at its default, allowing board config fragments to make use of USB drivers without needing to override it & trigger warnings from merge_config.sh. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16948/ Signed-off-by: Ralf Baechle arch/mips/configs/generic_defconfig | 1 - 1 file changed, 1 deletion(-) commit 5cbf968803ae049f501cedf87b99ee60c786c451 Author: Paul Burton Date: Mon Aug 7 16:01:16 2017 -0700 MIPS: Make CONFIG_MIPS_MT_SMP default y On systems that support MT ASE multithreading (ie. VPEs) we are very likely to want to include that support as default. Rather than setting it in various defconfigs, simply make CONFIG_MIPS_MT_SMP default y such that systems which select CONFIG_SYS_SUPPORTS_MULTITHREADING get it by default. As well as allowing us to remove the selection of CONFIG_MIPS_MT_SMP from various defconfigs, this also allows the generated generic defconfigs which derive from generic_defconfig to automatically gain support for MT ASE SMP when building for a suitable (pre-MIPSr6) ISA. For malta_kvm_guest_defconfig CONFIG_MIPS_MT_SMP is explicitly disabled since enabling SMP implicitly disables CONFIG_KVM_GUEST, which depends on CONFIG_BROKEN_ON_SMP. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16947/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/configs/malta_defconfig | 1 - arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/malta_kvm_guest_defconfig | 1 + arch/mips/configs/maltasmvp_defconfig | 1 - arch/mips/configs/maltasmvp_eva_defconfig | 1 - 6 files changed, 2 insertions(+), 4 deletions(-) commit a4c2f79787e584e3dbad3f9ecf53b79853f6cbf7 Author: Paul Burton Date: Mon Aug 7 16:01:15 2017 -0700 MIPS: Prevent direct use of generic_defconfig Using generic_defconfig directly is unlikely to be what a user actually wants to do - it doesn't specify any particular ISA revision & it doesn't enable any board or driver support, resulting in a largely useless kernel. Prevent users from using it directly, printing a helpful message to point them in the right direction if they attempt to. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16946/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9e111ee7c385eda6e866ec89c267559a06d01eee Author: Paul Burton Date: Mon Aug 7 16:01:14 2017 -0700 MIPS: NI 169445: Only include in 32r2el kernels The NI 169445 board uses a little endian MIPS32r2 CPU, and therefore including board support in kernels that are unable to run on such a CPU is pointless. Specify requirements in the board config fragment that cause the NI 169445 board support to only be included in generic kernels that target little endian MIPS32r2 CPUs. For example, NI 169445 support will be included when configuring using 32r2el_defconfig but not when using 64r6_defconfig. Signed-off-by: Paul Burton Acked-by: Nathan Sullivan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16945/ Signed-off-by: Ralf Baechle arch/mips/configs/generic/board-ni169445.config | 3 +++ 1 file changed, 3 insertions(+) commit c7a1d3d8ad330650e939d73b6dd71f2bcdfc1e56 Author: Paul Burton Date: Mon Aug 7 16:01:13 2017 -0700 MIPS: SEAD-3: Only include in 32 bit kernels by default The MIPS SEAD-3 development board has only ever been used with 32 bit CPUs, so including support for it in 64 bit kernels is wasteful since those kernels will never run on a SEAD-3. Specify a requirement in the SEAD-3 board config fragment that ensures the board support is only included in 32 bit kernels, by checking that CONFIG_32BIT=y. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16944/ Signed-off-by: Ralf Baechle arch/mips/configs/generic/board-sead-3.config | 2 ++ 1 file changed, 2 insertions(+) commit 27e0d4b0510700108341c50661f78a10969648df Author: Paul Burton Date: Mon Aug 7 16:01:12 2017 -0700 MIPS: generic: Allow filtering enabled boards by requirements Up until now when configuring a generic kernel all board config fragments have been merged by default unless boards are explicitly selected by the user specifying BOARDS=. In many cases this is sub-optimal, since some boards don't make sense to include in some kernels. For example the MIPS SEAD-3 development board has only ever been used with 32 bit CPUs, so including support for the SEAD-3 in a 64 bit kernel is wasteful. This patch introduces support for specifying requirements in board config fragments, using comments formatted like so: # require CONFIG_BLA=y For example the SEAD-3 board could specify that it should only be merged for 32 bit kernels using a requirement line like the following: # require CONFIG_32BIT=y A new generic-board-config.sh script is introduced to handle selecting the board config fragments to merge & calling merge_config.sh to merge them. In order to allow requirements to check Kconfig symbols that are implicitly selected, rather than explicitly specified by generic_defconfig or one of the ISA config fragments, an intermediate .config file is saved & used as a reference when checking requirements. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16943/ Signed-off-by: Ralf Baechle MAINTAINERS | 1 + arch/mips/Makefile | 10 +++- arch/mips/tools/generic-board-config.sh | 90 +++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) commit 1ec9dd80bedc208c00b18069cfd615a4cbfeab17 Author: Paul Burton Date: Sat Aug 12 19:49:43 2017 -0700 MIPS: CPS: Detect CPUs in secondary clusters As a first step towards supporting multi-cluster systems, detect cores & VPs in secondary clusters & record their cluster information in the cpu_data array. The "VP topology" line printed during boot is extended to display multiple clusters. On a single cluster it shows output like the following: VP topology: {4,4} This would indicate a system with 2 cores which each contain 4 VPs. We extend this to cover multiple clusters in a natural way: VP topology: {4,4},{2,2} This would indicate a system with 2 clusters. The first cluster contains 2 cores which each contain 4 VPs. The second cluster contains 2 cores which each contain 2 VPs. Actually booting these cores & VPs is left to further patches once other pieces are in place. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17017/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 80 +++++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 29 deletions(-) commit 3c9b4166213d415afa09bf2be104074f3a1161c8 Author: Paul Burton Date: Sat Aug 12 19:49:42 2017 -0700 MIPS: CPS: Cluster support for topology functions Modify the functions we use to read information about the topology of the system (the number of cores, VPs & IOCUs that it contains) in order to take into account multiple clusters, and provide a new function to determine the number of clusters in the system. Users of these functions are modified only such that they continue to build successfully - having them actually handle multiple clusters is left to further patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17016/ Patchwork: https://patchwork.linux-mips.org/patch/17218/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 3 +- arch/mips/include/asm/mips-cm.h | 30 --------- arch/mips/include/asm/mips-cps.h | 128 ++++++++++++++++++++++++++++++++++++++ arch/mips/kernel/smp-cps.c | 15 +---- arch/mips/mti-malta/malta-setup.c | 2 +- arch/mips/pci/pci-malta.c | 4 +- arch/mips/ralink/mt7621.c | 2 +- 7 files changed, 136 insertions(+), 48 deletions(-) commit e83f7e02af50c763ed9f953b565a4fbce6235fdf Author: Paul Burton Date: Sat Aug 12 19:49:41 2017 -0700 MIPS: CPS: Have asm/mips-cps.h include CM & CPC headers With Coherence Manager (CM) 3.5 information about the topology of the system, which has previously only been available through & accessed from the CM, is now also provided by the Cluster Power Controller (CPC). This includes a new CPC_CONFIG register mirroring GCR_CONFIG, and similarly a new CPC_Cx_CONFIG register mirroring GCR_Cx_CONFIG. In preparation for adjusting functions such as mips_cm_numcores(), which have previously only needed to access the CM, to also access the CPC this patch modifies the way we use the various CPS headers. Rather than having users include asm/mips-cm.h or asm/mips-cpc.h individually we instead have users include asm/mips-cps.h which in turn includes asm/mips-cm.h & asm/mips-cpc.h. This means that users will gain access to both CM & CPC registers by including one header, and most importantly it makes asm/mips-cps.h an ideal location for helper functions which need to access the various components of the CPS. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17015/ Patchwork: https://patchwork.linux-mips.org/patch/17217/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 7 ++++--- arch/mips/include/asm/mips-cpc.h | 9 ++++++--- arch/mips/include/asm/mips-cps.h | 3 +++ arch/mips/include/asm/smp-ops.h | 2 +- arch/mips/kernel/mips-cm.c | 2 +- arch/mips/kernel/mips-cpc.c | 3 +-- arch/mips/kernel/pm-cps.c | 3 +-- arch/mips/kernel/smp-cps.c | 3 +-- arch/mips/kernel/traps.c | 3 +-- arch/mips/mm/c-r4k.c | 2 +- arch/mips/mm/sc-mips.c | 2 +- arch/mips/mti-malta/malta-dtshim.c | 2 +- arch/mips/mti-malta/malta-init.c | 3 +-- arch/mips/mti-malta/malta-int.c | 1 - arch/mips/mti-malta/malta-setup.c | 2 +- arch/mips/pci/pci-malta.c | 2 +- arch/mips/pistachio/init.c | 3 +-- arch/mips/ralink/mt7621.c | 3 +-- arch/mips/vdso/gettimeofday.c | 1 - drivers/irqchip/irq-mips-gic.c | 2 +- 20 files changed, 28 insertions(+), 30 deletions(-) commit d595d423d06071bd7a4892c3c2f16bfe1d5b3a85 Author: Paul Burton Date: Sat Aug 12 19:49:40 2017 -0700 MIPS: SMP: Allow boot_secondary SMP op to return errors Allow the boot_secondary SMP op to return an error to __cpu_up(), which will in turn return it to its caller. This will allow SMP implementations to return errors quickly in cases they they know have failed, rather than relying upon __cpu_up() eventually timing out waiting for the cpu_running completion. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17014/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/smp.c | 8 ++++++-- arch/mips/include/asm/smp-ops.h | 2 +- arch/mips/kernel/smp-bmips.c | 4 +++- arch/mips/kernel/smp-cmp.c | 3 ++- arch/mips/kernel/smp-cps.c | 3 ++- arch/mips/kernel/smp-mt.c | 4 +++- arch/mips/kernel/smp-up.c | 3 ++- arch/mips/kernel/smp.c | 6 +++++- arch/mips/loongson64/loongson-3/smp.c | 3 ++- arch/mips/netlogic/common/smp.c | 4 +++- arch/mips/paravirt/paravirt-smp.c | 3 ++- arch/mips/sgi-ip27/ip27-smp.c | 3 ++- arch/mips/sibyte/bcm1480/smp.c | 3 ++- arch/mips/sibyte/sb1250/smp.c | 3 ++- 14 files changed, 37 insertions(+), 15 deletions(-) commit 68923cdc2eb34124d77bc27f7945d7ff16b236dd Author: Paul Burton Date: Sat Aug 12 19:49:39 2017 -0700 MIPS: CM: Add cluster & block args to mips_cm_lock_other() With CM >= 3.5 we have the notion of multiple clusters & can access their CM, CPC & GIC registers via the apporpriate redirect/other register blocks. In order to allow for this introduce cluster & block arguments to mips_cm_lock_other() which configures the redirect/other region to point at the appropriate cluster, core, VP & register block. Since we now have 4 arguments to mips_cm_lock_other() & a common use is likely to be to target the cluster, core & VP corresponding to a particular Linux CPU number we also add a new mips_cm_lock_other_cpu() helper function which handles that without the caller needing to manually pull out the cluster, core & VP numbers. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17013/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 45 ++++++++++++++++++++++++++++++++--------- arch/mips/kernel/mips-cm.c | 19 ++++++++++++++--- arch/mips/kernel/smp-cps.c | 10 ++++----- arch/mips/kernel/smp.c | 2 +- 4 files changed, 58 insertions(+), 18 deletions(-) commit 5616897efd1816c18231c9976a6d64392fc6cdee Author: Paul Burton Date: Sat Aug 12 19:49:38 2017 -0700 MIPS: Add CPU cluster number accessors Introduce cpu_cluster() & cpu_set_cluster() accessor functions in the same vein as cpu_core(), cpu_vpe_id() & their set variants. These will be used in further patches to allow users to get or set a CPUs cluster number. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17012/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-info.h | 11 +++++++++++ arch/mips/kernel/cpu-probe.c | 10 ++++++++++ 2 files changed, 21 insertions(+) commit fe7a38c625a2ee375870567c9fc8302e51e550f7 Author: Paul Burton Date: Sat Aug 12 19:49:37 2017 -0700 MIPS: Unify checks for sibling CPUs Up until now we have open-coded checks for whether CPUs are siblings, with slight variations on whether we consider the package ID or not. This will only get more complex when we introduce cluster support, so in preparation for that this patch introduces a cpus_are_siblings() function which can be used to check whether or not 2 CPUs are siblings in a consistent manner. By checking globalnumber with the VP ID masked out this also has the neat side effect of being ready for multi-cluster systems already. Signed-off-by: Paul Burton Acked-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17011/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-info.h | 17 +++++++++++++++++ arch/mips/kernel/smp-cps.c | 8 ++++---- arch/mips/kernel/smp.c | 12 +++++------- drivers/cpuidle/cpuidle-cps.c | 2 +- drivers/irqchip/irq-mips-cpu.c | 2 +- 5 files changed, 28 insertions(+), 13 deletions(-) commit 856fbcee6099a292f62b9d23c946704f9ffe19f3 Author: Paul Burton Date: Sat Aug 12 19:49:36 2017 -0700 MIPS: Store core & VP IDs in GlobalNumber-style variable This patch modifies the way we store core & VP IDs such that we store them in a single 32 bit integer whose format matches that of the MIPSr6 GlobalNumber register. Whereas we have previously stored core & VP IDs in separate fields, storing them in a single GlobalNumber-like field: 1) Reduces the size of struct cpuinfo_mips by 4 bytes, and will allow it to not grow when cluster support is added. 2) Gives us a natural place to store cluster number, which matches up with what the architecture provides. 3) Will be useful in the future as a parameter to the MIPSr6 GINVI instruction to specify a target CPU whose icache that instruction should operate on. The cpu_set*() accessor functions are moved out of the asm/cpu-info.h header in order to allow them to use the WARN_ON macro, which is unusable in asm/cpu-info.h due to include ordering. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17010/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-info.h | 39 +++++++++++++-------------------------- arch/mips/kernel/cpu-probe.c | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 26 deletions(-) commit f875a832d2028523f9b53c261b67e05a359bab8b Author: Paul Burton Date: Sat Aug 12 19:49:35 2017 -0700 MIPS: Abstract CPU core & VP(E) ID access through accessor functions We currently have fields in struct cpuinfo_mips for the core & VP(E) ID of a particular CPU, and various pieces of code directly access those fields. This patch abstracts such access by introducing accessor functions cpu_core(), cpu_set_core(), cpu_vpe_id() & cpu_set_vpe_id() and having code that needs to access these values call those functions rather than directly accessing the struct cpuinfo_mips fields. This prepares us for changes to the way in which those values are stored in later patches. The cpu_vpe_id() function is introduced even though we already had a cpu_vpe_id() macro for a couple of reasons: 1) It's more consistent with the core, and future cluster, accessors. 2) It ensures a sensible return type without explicit casts. 3) It's generally preferable to use functions rather than macros. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17009/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-info.h | 27 ++++++++++++++++++++++++--- arch/mips/include/asm/mips-cm.h | 2 +- arch/mips/include/asm/topology.h | 2 +- arch/mips/kernel/cpu-probe.c | 7 +++++-- arch/mips/kernel/mips-cm.c | 4 ++-- arch/mips/kernel/mips-cpc.c | 4 ++-- arch/mips/kernel/pm-cps.c | 6 +++--- arch/mips/kernel/proc.c | 6 +++--- arch/mips/kernel/smp-bmips.c | 2 +- arch/mips/kernel/smp-cps.c | 28 ++++++++++++++-------------- arch/mips/kernel/smp-mt.c | 2 +- arch/mips/kernel/smp.c | 8 ++++---- arch/mips/loongson64/loongson-3/smp.c | 11 ++++++----- arch/mips/netlogic/common/smp.c | 2 +- arch/mips/oprofile/op_model_mipsxx.c | 4 ++-- drivers/cpuidle/cpuidle-cps.c | 2 +- 16 files changed, 71 insertions(+), 46 deletions(-) commit 15e6529fc337309e699dbb71827362fcd9c616ae Author: Paul Burton Date: Sat Aug 12 19:49:34 2017 -0700 MIPS: CPS: Use GlobalNumber macros rather than magic numbers We now have definitions for the GlobalNumber register in asm/mipsregs.h, so use them in place of magic numbers in cps-vec.S. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17008/ Signed-off-by: Ralf Baechle arch/mips/kernel/cps-vec.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6593dded10e1fbbe3ec0d534ddb893714390aae Author: Paul Burton Date: Sat Aug 12 19:49:33 2017 -0700 MIPS: Add accessor & bit definitions for GlobalNumber MIPSr6 introduces a GlobalNumber register, which is required when VPs are implemented (ie. when multi-threading is supported) but otherwise optional. The register contains sufficient information to uniquely identify a VP within a system using its cluster number, core number & VP ID. In preparation for using this register & its fields, introduce an accessor macro for it & define its various bits with the typical style preprocessor macros. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17007/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mipsregs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 23cb600e3fd4068697d6fa207848d93e74ec7333 Author: Paul Burton Date: Sat Aug 12 19:49:32 2017 -0700 MIPS: CPS: Add CM/CPC 3.5 register definitions Introduce definitions & accessors for a selection of Coherence Manager (CM) & Cluster Power Controller (CPC) registers that are new with CM v3.5 & the MIPS I6500. These are primarily registers that will be used in supporting multiple CPU clusters. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17006/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 54 ++++++++++++++++++++++++++++++++++++---- arch/mips/include/asm/mips-cpc.h | 22 ++++++++++++++-- 2 files changed, 69 insertions(+), 7 deletions(-) commit 846e1913f5ccf3fb822a7aa166e5a840c8bdc61b Author: Paul Burton Date: Sat Aug 12 19:49:31 2017 -0700 MIPS: CPS: Use change_*, set_* & clear_* where appropriate Make use of the new change_*, set_* & clear_* accessor functions for CPS (CM, CPC & GIC) registers where doing so makes the code easier to read or shortens it without adversely affecting readability. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17005/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cm.c | 4 +--- arch/mips/kernel/smp-cps.c | 6 ++---- arch/mips/mm/sc-mips.c | 19 +++++-------------- 3 files changed, 8 insertions(+), 21 deletions(-) commit ed7eb5aad7d4e4945fac664c9b67d0db2a8a3db8 Author: Paul Burton Date: Sat Aug 12 19:49:30 2017 -0700 MIPS: CPS: Introduce register modify (set/clear/change) accessors For read-write registers introduce accessor functions that simplify the task of modifying a subset of bits within the register. set_* functions set bits to 1, clear_* functions clear bits to 0 & change_* functions set bits specified in a mask to an arbitrary value. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17004/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cps.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 829ca2be9c55c786d404a5129ed88a2899fe07af Author: Paul Burton Date: Sat Aug 12 19:49:29 2017 -0700 MIPS: CPC: Use BIT/GENMASK for register fields, order & drop shifts Tidy up asm/mips-cpc.h in a similar way to what "MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts" did for asm/mips-cm.h. We use BIT() & GENMASK() to simplify the definition of register fields, drop the _SHF definitions since that information can be found in the _MSK ones, and then drop the _MSK suffix. Fields definitions are moved to be next to the appropriate register definition, making it easier to link the two & keep everything ordered by register address. Comments are added including the name of each register & a brief description of its purpose which helps to understand what registers are for, link them back to hardware documentation or grep for them. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17003/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cpc.h | 79 +++++++++++++++++++++------------------- arch/mips/kernel/mips-cpc.c | 2 +- arch/mips/kernel/pm-cps.c | 2 +- arch/mips/kernel/smp-cps.c | 8 ++-- 4 files changed, 49 insertions(+), 42 deletions(-) commit 2c981e325f0c18e24ce252f16f5018b9ee805212 Author: Paul Burton Date: Sat Aug 12 19:49:28 2017 -0700 MIPS: CPC: Use common CPS accessor generation macros Switch the MIPS Cluster Power Controller (CPC) accessor functions to be generated by the new common Coherent Processing System (CPS) macros shared with the Coherence Manager (CM). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17002/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cpc.h | 63 ++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) commit c76929b3c695305c1055d7e7c935d35b5fd275be Author: Himanshu Jha Date: Tue Aug 29 19:13:18 2017 +0530 remoteproc: qcom: Use PTR_ERR_OR_ZERO Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_adsp_pil.c | 5 +---- drivers/remoteproc/qcom_common.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) commit 1b70d792cf6775fb5d0737524387893daeb5374a Author: David Ahern Date: Mon Aug 28 13:53:34 2017 -0700 ipv6: Use rt6i_idev index for echo replies to a local address Tariq repored local pings to linklocal address is failing: $ ifconfig ens8 ens8: flags=4163 mtu 1500 inet 11.141.16.6 netmask 255.255.0.0 broadcast 11.141.255.255 inet6 fe80::7efe:90ff:fecb:7502 prefixlen 64 scopeid 0x20 ether 7c:fe:90:cb:75:02 txqueuelen 1000 (Ethernet) RX packets 12 bytes 1164 (1.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 30 bytes 2484 (2.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 $ /bin/ping6 -c 3 fe80::7efe:90ff:fecb:7502%ens8 PING fe80::7efe:90ff:fecb:7502%ens8(fe80::7efe:90ff:fecb:7502) 56 data bytes Signed-off-by: David S. Miller include/net/ip6_route.h | 10 ++++++++++ net/ipv6/icmp.c | 33 ++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 13 deletions(-) commit f602b976b6b0eab8de59e438f9313da72b47a8e4 Author: Tom Lendacky Date: Mon Aug 28 15:29:34 2017 -0500 amd-xgbe: Interrupt summary bits are h/w version dependent There is a difference in the bit position of the normal interrupt summary enable (NIE) and abnormal interrupt summary enable (AIE) between revisions of the hardware. For older revisions the NIE and AIE bits are positions 16 and 15 respectively. For newer revisions the NIE and AIE bits are positions 15 and 14. The effect in changing the bit position is that newer hardware won't receive AIE interrupts in the current version of the driver. Specifically, the driver uses this interrupt to collect statistics on when a receive buffer unavailable event occurs and to restart the driver/device when a fatal bus error occurs. Update the driver to set the interrupt enable bit based on the reported version of the hardware. Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-common.h | 8 ++++++-- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 13 ++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) commit 0fc690a7c3f7053613dcbab6a7613bb6586d8ee2 Author: Gavin Shan Date: Fri Aug 11 18:19:33 2017 +1000 PCI: Disable VF decoding before pcibios_sriov_disable() updates resources A struct resource represents the address space consumed by a device. We should not modify that resource while the device is actively using the address space. For VFs, pci_iov_update_resource() enforces this by printing a warning and doing nothing if the VFE (VF Enable) and MSE (VF Memory Space Enable) bits are set. Previously, both sriov_enable() and sriov_disable() called the pcibios_sriov_disable() arch hook, which may update the struct resource, while VFE and MSE were enabled. This effectively dropped the resource update pcibios_sriov_disable() intended to do. Disable VF memory decoding before calling pcibios_sriov_disable(). Reported-by: Carol L Soto Tested-by: Carol L Soto Signed-off-by: Gavin Shan Signed-off-by: Alexey Kardashevskiy [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Cc: shan.gavin@gmail.com Cc: Benjamin Herrenschmidt Cc: Paul Mackerras drivers/pci/iov.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8f89357094e67bb09456457a00bbad4002293d15 Author: Hou Zhiqiang Date: Fri Aug 4 14:41:33 2017 +0800 PCI: layerscape: Add support for ls2088a The ls2088a PCIe controller's register addresses are different from ls2080a, so add a match entry to identify ls2088a PCIe. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian Documentation/devicetree/bindings/pci/layerscape-pci.txt | 1 + drivers/pci/dwc/pci-layerscape.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit f8045ca9019fd787ed64dddb3cdb2b765c926f0f Merge: 13a6fad c411ed8 Author: David S. Miller Date: Tue Aug 29 15:16:53 2017 -0700 Merge branch 'nsh-headers-GSO' Jiri Benc says: ==================== nsh: headers, GSO This adds header structs and helpers for NSH together with GSO support. Note there is no code in this patchset that actually manipulates the NSH headers. That was sent to netdev by Yi Yang ("[PATCH net-next v6 0/3] openvswitch: add NSH support"). The aim of this series is to lay the groundwork and ease the implementation for him. In addition to openvswitch, the NSH support should be added to tc (flower to match, act_nsh to push/pop NSH headers). That will come later. There's currently no plan to support NSH by other means than those two. The patch 3 in this patchset was written by Yi Yang, I took it from the aforementioned series and slightly modified it - see the note in the patch. ==================== Signed-off-by: David S. Miller commit c411ed854584a71b0e86ac3019b60e4789d88086 Author: Jiri Benc Date: Mon Aug 28 21:43:24 2017 +0200 nsh: add GSO support Add a new nsh/ directory. It currently holds only GSO functions but more will come: in particular, code shared by openvswitch and tc to manipulate NSH headers. For now, assume there's no hardware support for NSH segmentation. We can always introduce netdev->nsh_features later. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/Kconfig | 1 + net/Makefile | 1 + net/nsh/Kconfig | 9 ++++++ net/nsh/Makefile | 1 + net/nsh/nsh.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 103 insertions(+) commit 1f0b7744c50573df464ca33d8e5275be509f852b Author: Yi Yang Date: Mon Aug 28 21:43:23 2017 +0200 net: add NSH header structures and helpers NSH (Network Service Header)[1] is a new protocol for service function chaining, it can be handled as a L3 protocol like IPv4 and IPv6, Eth + NSH + Inner packet or VxLAN-gpe + NSH + Inner packet are two typical use cases. This patch adds NSH header structures and helpers for NSH GSO support and Open vSwitch NSH support. [1] https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/ [Jiri: added nsh_hdr() helper and renamed the header struct to "struct nshhdr" to match the usual pattern. Removed packet type defines, these are now shared with VXLAN-GPE.] Signed-off-by: Yi Yang Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/net/nsh.h | 307 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) commit fa20e0e32cb3dfc1760b6254b64977f2fb5bd851 Author: Jiri Benc Date: Mon Aug 28 21:43:22 2017 +0200 vxlan: factor out VXLAN-GPE next protocol The values are shared between VXLAN-GPE and NSH. Originally probably by coincidence but I notified both working groups about this last year and they seem to keep the values in sync since then. Hopefully they'll get a single IANA registry for the values, too. (I asked them for that.) Factor out the code to be shared by the NSH implementation. NSH and MPLS values are added in this patch, too. For MPLS, the drafts incorrectly assign only a single value, while we have two MPLS ethertypes. I raised the problem with both groups. For now, I assume the value is for unicast. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 32 +++++++------------------------- include/net/tun_proto.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ include/net/vxlan.h | 6 ------ 3 files changed, 56 insertions(+), 31 deletions(-) commit 155e6f649757c902901e599c268f8b575ddac1f8 Author: Jiri Benc Date: Mon Aug 28 21:43:21 2017 +0200 ether: add NSH ethertype The NSH draft says: An IEEE EtherType, 0x894F, has been allocated for NSH. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) commit 13a6fad89a868912bd920d7d9e0ee2353c7b1549 Merge: c965584 1d51f65 Author: David S. Miller Date: Tue Aug 29 15:14:19 2017 -0700 Merge branch 'ife-ethertype' Alexander Aring says: ==================== tc: act_ife: handle IEEE IFE ethertype as default this patch series will introduce the IFE ethertype which is registered by IEEE. If the netlink act_ife type netlink attribute is not given it will use this value by default now. At least it will introduce some UAPI testcases to check if the default type is used if not specified and vice versa. ==================== Signed-off-by: David S. Miller commit 1d51f65a36af2f9ccd74cb414517021849566d8d Author: Alexander Aring Date: Mon Aug 28 15:03:15 2017 -0400 tc-testing: add test for testing ife type This patch adds a new testcase for the IFE type setting in tc. In case of user specified the type it will check if the ife is correctly configured to react on it. If it's not specified the default IFE type should be used. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/tests.json | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit b522ed6ed665ba6a349d31136fa3f40c408f2b5a Author: Alexander Aring Date: Mon Aug 28 15:03:14 2017 -0400 act_ife: use registered ife_type as fallback This patch handles a default IFE type if it's not given by user space netlink api. The default IFE type will be the registered ethertype by IEEE for IFE ForCES. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ife.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 2804fd3af6ba5ae5737705b27146455eabe2e2f8 Author: Alexander Aring Date: Mon Aug 28 15:03:13 2017 -0400 if_ether: add forces ife lfb type This patch adds the forces IFE lfb type according to IEEE registered ethertypes. See http://standards-oui.ieee.org/ethertype/eth.txt for more information. Since there exists the IFE subsystem it can be used there. This patch also use the correct word "ForCES" instead of "FoRCES" which is a spelling error inside the IEEE ethertype specification. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) commit c965584039725283f89cb46d806c8f49be65ef2a Author: Florian Fainelli Date: Tue Aug 29 15:07:51 2017 -0700 Documentation: networking: Add blurb about patches in patchwork Explain that the patch queue in patchwork should not be touched by patch submitters. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/netdev-FAQ.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5bd0ea9107dca975dc4ba4d9de39b4938d2cb36d Author: Bhumika Goyal Date: Mon Aug 28 23:58:44 2017 +0530 sparc64: vcc: make ktermios const Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/tty/vcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5087b4233b4522f6b3a3190d7ea4237af9f896b Merge: b74fd30 be59960 Author: David S. Miller Date: Tue Aug 29 14:58:33 2017 -0700 Merge branch 'mlx4-misc-patches' Tariq Toukan says: ==================== mlx4 misc patches This patchset contains misc patches from the team to the mlx4 Core and Eth drivers. Patch 1 by Eran replaces large static allocations by dynamic ones. Patch 2 by Leon makes an explicit conversion and solves a smatch warning. In patch 3 I fix a misplaced brackets of the sizeof operation. Patch 4 by Moshe adds the ability to inform the FW regarding user mac updates. Series generated against net-next commit: 901c5d2fbfcd ARM: dts: rk3228-evb: Fix the compiling error ==================== Signed-off-by: David S. Miller commit be59960395f86991c6599c41d8c421fe4bf7a210 Author: Moshe Shemesh Date: Mon Aug 28 16:38:23 2017 +0300 net/mlx4: Add user mac FW update support Adding support for updating the FW on new port mac, when port mac change is requested by the user. This info is required by the FW as OEM management tools require this info directly from the NIC FW. Check device capability bit to verify the FW supports user mac. If the FW does support it, use set_port command to notify the FW on the new mac. The feature is relevant only to PF port mac. Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 23 +++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx4/fw.c | 5 +++++ drivers/net/ethernet/mellanox/mlx4/main.c | 3 +++ drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++ drivers/net/ethernet/mellanox/mlx4/port.c | 25 +++++++++++++++++++++++++ include/linux/mlx4/device.h | 2 ++ 6 files changed, 58 insertions(+), 2 deletions(-) commit a434f1fd2c96f44d7483d5bd789eec2d3cbb2d20 Author: Tariq Toukan Date: Mon Aug 28 16:38:22 2017 +0300 net/mlx4_core: Fix misplaced brackets of sizeof When changing the sizeof style usage in the patch cited below, one brackets misplacement was introduced. Here we fix it. Fixes: 31975e27a4b5 ("mlx4: sizeof style usage") Signed-off-by: Tariq Toukan Cc: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/eq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 187782eb58a89ea030731114c6ae37842a4472fe Author: Leon Romanovsky Date: Mon Aug 28 16:38:21 2017 +0300 net/mlx4_core: Make explicit conversion to 64bit value The "lg" variable is declared as int so in all places where this variable is used as a shift operand, the output will be int too. This produces the following smatch warning: drivers/net/ethernet/mellanox/mlx4/fw.c:1532 mlx4_map_cmd() warn: should '1 << lg' be a 64 bit type? Simple declaration of "1" to be "1ULL" will fix the issue. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Leon Romanovsky Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c73c8b1e47ca275388f774fd36560ab7e994e99e Author: Eran Ben Elisha Date: Mon Aug 28 16:38:20 2017 +0300 net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap In order to avoid temporary large structs on the stack, allocate them dynamically. Signed-off-by: Eran Ben Elisha Signed-off-by: Tal Alon Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx4/qp.c | 26 ++-- drivers/net/ethernet/mellanox/mlx4/fw.c | 12 +- drivers/net/ethernet/mellanox/mlx4/fw.h | 6 +- drivers/net/ethernet/mellanox/mlx4/main.c | 235 ++++++++++++++++-------------- drivers/net/ethernet/mellanox/mlx4/qp.c | 24 +-- include/linux/mlx4/device.h | 14 +- 6 files changed, 159 insertions(+), 158 deletions(-) commit b74fd306ef2d48781e807dd506cca818bb83d749 Author: Roopa Prabhu Date: Tue Aug 29 13:16:57 2017 -0700 bridge: fdb add and delete tracepoints A few useful tracepoints to trace bridge forwarding database updates. Signed-off-by: Roopa Prabhu Reviewed-by: Florian Fainelli Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/trace/events/bridge.h | 98 +++++++++++++++++++++++++++++++++++++++++++ net/bridge/br_fdb.c | 7 ++++ net/core/net-traces.c | 6 +++ 3 files changed, 111 insertions(+) commit a7043f65f62c1799df15a6675b28e355939f8c06 Merge: 7619de8 cb51a09 Author: David S. Miller Date: Tue Aug 29 14:42:17 2017 -0700 Merge branch 'systemport-sf2-mdio-endian' Florian Fainelli says: ==================== Endian fixes for SYSTEMPORT/SF2/MDIO While trying an ARM BE kernel for kinks, the 3 drivers below started not working and the reasons why became pretty obvious because the register space remains LE (hardwired), except for Broadcom MIPS where it follows the CPU's native endian (let's call that a feature). ==================== Signed-off-by: David S. Miller commit cb51a0916ae768ecbb246535fa68bb1ae05e8c97 Author: Florian Fainelli Date: Tue Aug 29 13:35:18 2017 -0700 net: phy: mdio-bcm-unimac: Use correct I/O accessors The driver currently uses __raw_{read,write}l which works for all platforms supported: Broadcom MIPS LE/BE (native endian), ARM LE (native endian) but not ARM BE (registers are still LE). Switch to using the proper accessors for all platforms and explain why Broadcom MIPS BE is special here, in doing so, we introduce a couple of helper functions to abstract these differences. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-bcm-unimac.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 389a06bc534ec19778598242e40c59bc73d2a87d Author: Florian Fainelli Date: Tue Aug 29 13:35:17 2017 -0700 net: systemport: Set correct RSB endian bits based on host RSB_SWAP0 needs to match the host CPU endian, and it needs to be set for LE and clear for BE. RSB_SWAP1 must always be cleared for SYSTEMPORT Lite. With these settings, we have the Receive Status Block always match the host endian and we do not need to perform any conversion. Since there is not necessarily a CONFIG_CPU_LITTLE_ENDIAN option defined, we test for !CONFIG_CPU_BIG_ENDIAN which is guaranteed to be set. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fdb71a2d1adcaca0df2f73ced7851fe0c85312f8 Author: Florian Fainelli Date: Tue Aug 29 13:35:16 2017 -0700 net: dsa: bcm_sf2: Use correct I/O accessors The Starfigther 2 driver currently uses __raw_{read,write}l which means native I/O endian. This works correctly for an ARM LE kernel (default) but fails miserably on an ARM BE (BE8) kernel where registers are kept little endian, so replace uses with {read,write}l_relaxed here which is what we want because this is all performance sensitive code. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f1dd1993dbd1b9eb3ea92fc1e7af9857d4cefe57 Author: Florian Fainelli Date: Tue Aug 29 13:35:15 2017 -0700 net: systemport: Use correct I/O accessors The SYSTEMPORT driver currently uses __raw_{read,write}l which means native I/O endian. This works correctly for an ARM LE kernel (default) but fails miserably on an ARM BE (BE8) kernel where registers are kept little endian, so replace uses with {read,write}l_relaxed here which is what we want because this is all performance sensitive code. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b015b37e6693de515982452eebd6a9d19201f0fe Author: Hou Zhiqiang Date: Mon Aug 28 18:53:01 2017 +0800 PCI: artpec6: Stop enabling writes to DBI read-only registers Previously we enabled writes to the DBI read-only registers so the Class Code fix in dw_pcie_setup_rc() would work. But now dw_pcie_setup_rc() enables write permission itself, so we don't need to do it here. Stop enabling writes to the DBI read-only registers. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pcie-artpec6.c | 6 ------ 1 file changed, 6 deletions(-) commit c3f909398827b03fad9391951b3daa4a11dcf663 Author: Hou Zhiqiang Date: Mon Aug 28 18:53:01 2017 +0800 PCI: layerscape: Remove unnecessary class code fixup Now that the Class Code fixup in dw_pcie_setup_rc() works, remove the fixup from the Layerscape driver. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 9 --------- 1 file changed, 9 deletions(-) commit 365cf663b64791e341f425385c7ae152327c7009 Author: Roland Kammerer Date: Tue Aug 29 10:20:48 2017 +0200 drbd: switch from kmalloc() to kmalloc_array() We had one call to kmalloc that actually allocates an array. Switch that one to the kmalloc_array() function. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_receiver.c | 2 +- include/linux/drbd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d3d2948f4353300e483e03be3f400dc07cf504ce Author: Roland Kammerer Date: Tue Aug 29 10:20:47 2017 +0200 drbd: abort drbd_start_resync if there is no connection This was found by a static analysis tool. While highly unlikely, be sure to return without dereferencing the NULL pointer. Reported-by: Shaobo Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_worker.c | 5 +++++ 1 file changed, 5 insertions(+) commit 183ece30053f1597120ee30174955d7a971bc146 Author: Roland Kammerer Date: Tue Aug 29 10:20:46 2017 +0200 drbd: move global variables to drbd namespace and make some static This is a follow-up to Gregs complaints that drbd clutteres the global namespace. Some of DRBD's module parameters are only used within one compilation unit. Make these static. Signed-off-by: Roland Kammerer Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 20 +++++------- drivers/block/drbd/drbd_main.c | 62 +++++++++++++++++++------------------- drivers/block/drbd/drbd_proc.c | 8 ++--- drivers/block/drbd/drbd_receiver.c | 2 +- 4 files changed, 43 insertions(+), 49 deletions(-) commit 8ab761e17efa75449db2d71dc6fabf96d110588c Author: Greg Kroah-Hartman Date: Tue Aug 29 10:20:45 2017 +0200 drbd: rename "usermode_helper" to "drbd_usermode_helper" Nothing like having a very generic global variable in a tiny driver subsystem to make a mess of the global namespace... Note, there are many other "generic" named global variables in the drbd subsystem, someone should fix those up one day before they hit a linking error. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 4 ++-- drivers/block/drbd/drbd_nl.c | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) commit cde81d99afa4112eecef3f45129b5827f6ac158e Author: Lars Ellenberg Date: Tue Aug 29 10:20:44 2017 +0200 drbd: fix race between handshake and admin disconnect/down conn_try_disconnect() could potentialy hit the BUG_ON() in _conn_set_state() where it iterates over _drbd_set_state() and "asserts" via BUG_ON() that the latter was successful. If the STATE_SENT bit was not yet visible to conn_is_valid_transition() early in _conn_request_state(), but became visible before conn_set_state() later in that call path, we could hit the BUG_ON() after _drbd_set_state(), because it returned SS_IN_TRANSIENT_STATE. To avoid that race, we better protect set_bit(SENT_STATE) with the spinlock. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_receiver.c | 3 +++ 1 file changed, 3 insertions(+) commit 33d32fa7120ed184efc9be1ea3c016109b4fea84 Author: Lars Ellenberg Date: Tue Aug 29 10:20:43 2017 +0200 drbd: fix potential deadlock when trying to detach during handshake When requesting a detach, we first suspend IO, and also inhibit meta-data IO by means of drbd_md_get_buffer(), because we don't want to "fail" the disk while there is IO in-flight: the transition into D_FAILED for detach purposes may get misinterpreted as actual IO error in a confused endio function. We wrap it all into wait_event(), to retry in case the drbd_req_state() returns SS_IN_TRANSIENT_STATE, as it does for example during an ongoing connection handshake. In that example, the receiver thread may need to grab drbd_md_get_buffer() during the handshake to make progress. To avoid potential deadlock with detach, detach needs to grab and release the meta data buffer inside of that wait_event retry loop. To avoid lock inversion between mutex_lock(&device->state_mutex) and drbd_md_get_buffer(device), introduce a new enum chg_state_flag CS_INHIBIT_MD_IO, and move the call to drbd_md_get_buffer() inside the state_mutex grabbed in drbd_req_state(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_nl.c | 25 ++-------------------- drivers/block/drbd/drbd_state.c | 46 +++++++++++++++++++++++++++++++++++++++++ drivers/block/drbd/drbd_state.h | 8 +++++++ 3 files changed, 56 insertions(+), 23 deletions(-) commit 427fd2bee0a33a670de186387e79d280a6808a66 Author: Markus Elfring Date: Tue Aug 29 10:20:42 2017 +0200 drbd: A single dot should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Roland Kammerer Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f1a1b7cbb94f5f61d55f5f8d7391a0d84824cca Author: Lars Ellenberg Date: Tue Aug 29 10:20:41 2017 +0200 drbd: fix rmmod cleanup, remove _all_ debugfs entries If there are still resources defined, but "empty", no more volumes or connections configured, they don't hold module reference counts, so rmmod is possible. To avoid DRBD leftovers in debugfs, we need to call our global drbd_debugfs_cleanup() only after all resources have been cleaned up. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit be7445a38110a4232ea6c8a589ba4cb18aceb41c Author: Geliang Tang Date: Tue Aug 29 10:20:40 2017 +0200 drbd: Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Roland Kammerer Signed-off-by: Philipp Reisner Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 7c752ed3257517fc8607ab1d19fe4e86155721e3 Author: Lars Ellenberg Date: Tue Aug 29 10:20:39 2017 +0200 drbd: fix potential get_ldev/put_ldev refcount imbalance during attach Race: drbd_adm_attach() | async drbd_md_endio() | device->ldev is still NULL. | | drbd_md_read( | .endio = drbd_md_endio; | submit; | .... | wait for done == 1; | done = 1; ); | wake_up(); .. lot of other stuff, | .. includeing taking and | ...giving up locks, | .. doing further IO, | .. stuff that takes "some time" | | while in this context, | this is the next statement. | which means this context was scheduled .. only then, finally, | away for "some time". device->ldev = nbc; | | if (device->ldev) | put_ldev() Unlikely, but possible. I was able to provoke it "reliably" by adding an mdelay(500); after the wake_up(). Fixed by moving the if (!NULL) put_ldev() before done = 1; Impact of the bug was that the resulting refcount imbalance could lead to premature destruction of the object, potentially causing a NULL pointer dereference during a subsequent detach. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_worker.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9de7e14a1a9c6bc4f9be6ccd9b951341a80dbd52 Author: Lars Ellenberg Date: Tue Aug 29 10:20:38 2017 +0200 drbd: new disk-option disable-write-same Some backend devices claim to support write-same, but would fail actual write-same requests. Allow to set (or toggle) whether or not DRBD tries to support write-same. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_nl.c | 15 ++++++++++++--- include/linux/drbd_genl.h | 3 ++- include/linux/drbd_limits.h | 8 +++++++- 3 files changed, 21 insertions(+), 5 deletions(-) commit c200d9868707150abd37853cb341b54f75461208 Author: Philipp Reisner Date: Tue Aug 29 10:20:37 2017 +0200 drbd: Fix resource role for newly created resources in events2 The conn_higest_role() (a terribly misnamed function) returns the role of the resource. It returned R_UNKNOWN as long as the resource has not a single device. Resources without devices are short living objects. But it matters for the NOTIFY_CREATE netwlink message. It makes a lot more sense to report R_SECONDARY for the newly created resource than R_UNKNOWN. I reviewd all call sites of conn_highest_role(), that change does not matter for the other call sites. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ffa7bfab40a4f3b47ee9ddd95fdef0f7f6744b8 Author: Baoyou Xie Date: Tue Aug 29 10:20:36 2017 +0200 drbd: mark symbols static where possible We get a few warnings when building kernel with W=1: drbd/drbd_receiver.c:1224:6: warning: no previous prototype for 'one_flush_endio' [-Wmissing-prototypes] drbd/drbd_req.c:1450:6: warning: no previous prototype for 'send_and_submit_pending' [-Wmissing-prototypes] drbd/drbd_main.c:924:6: warning: no previous prototype for 'assign_p_sizes_qlim' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 4 +++- drivers/block/drbd/drbd_receiver.c | 2 +- drivers/block/drbd/drbd_worker.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit e1fbc4ca9d0353a932994cb1ac38e87e5a211a9f Author: Lars Ellenberg Date: Tue Aug 29 10:20:35 2017 +0200 drbd: Send P_NEG_ACK upon write error in protocol != C In protocol != C, we forgot to send the P_NEG_ACK for failing writes. Once we no longer submit to local disk, because we already "detached", due to the typical "on-io-error detach;" config setting, we already send the neg acks right away. Only those requests that have been submitted, and have been error-completed by the local disk, would forget to send the neg-ack, and only in asynchronous replication (protocol != C). Unless this happened during resync, where we already always send acks, regardless of protocol. The primary side needs the P_NEG_ACK in order to mark the affected block(s) for resync in its out-of-sync bitmap. If the blocks in question are not re-written again, we may miss to resync them later, causing data inconsistencies. This patch will always send the neg-acks, and also at least try to persist the out-of-sync status on the local node already. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_worker.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit de6978be4407ced653dda5d6c052d67d8d768dd0 Author: Lars Ellenberg Date: Tue Aug 29 10:20:34 2017 +0200 drbd: add explicit plugging when submitting batches When submitting batches of requests which had been queued on the submitter thread, typically because they needed to wait for an activity log transactions, use explicit plugging to help potential merging of requests in the backend io-scheduler. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_req.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 9da10e8da3b3e126d82973e2147ba47767fb3b0e Author: Lars Ellenberg Date: Tue Aug 29 10:20:33 2017 +0200 drbd: change list_for_each_safe to while(list_first_entry_or_null) Two instances of list_for_each_safe can drop their tmp element, they really just peel off each element in turn from the start of the list. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_req.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c51a0ef3747a412df4a7345d939190a99bc2a0cc Author: Lars Ellenberg Date: Tue Aug 29 10:20:32 2017 +0200 drbd: introduce drbd_recv_header_maybe_unplug Recently, drbd_recv_header() was changed to potentially implicitly "unplug" the backend device(s), in case there is currently nothing to receive. Be more explicit about it: re-introduce the original drbd_recv_header(), and introduce a new drbd_recv_header_maybe_unplug() for use by the receiver "main loop". Using explicit plugging via blk_start_plug(); blk_finish_plug(); really helps the io-scheduler of the backend with merging requests. Wrap the receiver "main loop" with such a plug. Also catch unplug events on the Primary, and try to propagate. This is performance relevant. Without this, if the receiving side does not merge requests, number of IOPS on the peer can me significantly higher than IOPS on the Primary, and can easily become the bottleneck. Together, both changes should help to reduce the number of IOPS as seen on the backend of the receiving side, by increasing the chance of merging mergable requests, without trading latency for more throughput. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 5 +++- drivers/block/drbd/drbd_main.c | 13 +++++++++ drivers/block/drbd/drbd_receiver.c | 47 +++++++++++++++++++++++++++++--- drivers/block/drbd/drbd_req.c | 55 ++++++++++++++++++++++++++++++++++++++ drivers/block/drbd/drbd_req.h | 6 +++++ drivers/block/drbd/drbd_worker.c | 22 +++++++++++---- 6 files changed, 139 insertions(+), 9 deletions(-) commit 76cf11051446b4778e539536bbc4810a44be96d9 Author: Sricharan R Date: Thu Aug 24 12:51:29 2017 +0530 rpmsg: glink: Do a mbox_free_channel in remove mbox_request_channel is done in probe, so free the channel in remove. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) commit a7df9dfcfdfc7d7a0537405d4069accf51f56e49 Author: Sricharan R Date: Thu Aug 24 12:51:28 2017 +0530 rpmsg: glink: Return -EAGAIN when there is no FIFO space The TX FIFO can be full, if the remote client has not read enough data (or) reading it slowly. So its nessecary to return -EAGAIN to the local client to enable retry. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7339859da8dfa8924047a5917ceb06f479b35fcb Author: Bjorn Andersson Date: Thu Aug 24 12:51:27 2017 +0530 rpmsg: glink: Allow unaligned data access Glink protocol requires that each message is aligned on a 8 byte offset. This is purely a restriction from glink, so in order to support clients which do not adher to this, allow data packets of any size, but align the head index accordingly, effectively removing the alignment restriction. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 6 ------ drivers/rpmsg/qcom_glink_rpm.c | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) commit 835764ddd9af0d943a2ac7fb4597800e8b0871d2 Author: Bjorn Andersson Date: Thu Aug 24 12:51:26 2017 +0530 rpmsg: glink: Move the common glink protocol implementation to glink_native.c Move the common part of glink core protocol implementation to glink_native.c that can be shared with the smem based glink transport in the later patches. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 6 +- drivers/rpmsg/Makefile | 1 + drivers/rpmsg/qcom_glink_native.c | 1017 +++++++++++++++++++++++++++++++++++++ drivers/rpmsg/qcom_glink_native.h | 38 ++ drivers/rpmsg/qcom_glink_rpm.c | 995 +----------------------------------- 5 files changed, 1064 insertions(+), 993 deletions(-) commit 6799c434c27bd558e5994a515f256f70fdb19a0b Author: Bjorn Andersson Date: Thu Aug 24 12:51:25 2017 +0530 rpmsg: glink: Split rpm_probe to reuse the common code There is quite some code common in glink_rpm_probe that can reused for glink-smem based transport as well. So split the function and move the code to glink_native_probe that can be used later when we add the support for glink-smem based transport. Also reuse driver's remove as well. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_rpm.c | 85 ++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 36 deletions(-) commit e45c5dc26dfd2d524f6a82f8ab0f3cda90d67aa6 Author: Bjorn Andersson Date: Thu Aug 24 12:51:24 2017 +0530 rpmsg: glink: Associate indirections for pipe fifo accessor's With the intention of reusing the glink core protocol commands and code across both rpm and smem based transports, the only thing different is way of accessing the shared-memory of the transport (FIFO). So put the fifo accessor's of the transport's pipe (rx/tx) behind indirections, so that the rest of the code can be shared. For this, have a qcom_glink_pipe that can be used in the common code containing the indirections and wrap it with glink_rpm_pipe that contains the transport specific members. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_rpm.c | 144 ++++++++++++++++++++++++++++++----------- 1 file changed, 106 insertions(+), 38 deletions(-) commit d7101feb696f482dbe25af36bd4f40286de0a7aa Author: Bjorn Andersson Date: Thu Aug 24 12:51:23 2017 +0530 rpmsg: glink: Rename glink_rpm_xx functions to qcom_glink_xx Renaming the glink_rpm_xx functions and structs to qcom_glink_xx equivalents helps to reuse the core glink protocol while adding support for smem based glink transport in the later patches. Acked-by: Arun Kumar Neelakantam Signed-off-by: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_rpm.c | 248 +++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 120 deletions(-) commit d91dfe5054d4f2c424bd70ca34fc3328ee179f20 Author: Hou Zhiqiang Date: Mon Aug 28 18:53:00 2017 +0800 PCI: dwc: Enable write permission for Class Code, Interrupt Pin updates dw_pcie_setup_rc() contains fixes to update the Class Code and Interrupt Pin registers, but the fixes don't actually work because these registers are read-only. Enable write permission before updating the Class Code and Interrupt Pin. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto Acked-by: Roy Zang drivers/pci/dwc/pcie-designware-host.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e44abfed6fcb750d24f4438dc9d5a02eebb5fcac Author: Hou Zhiqiang Date: Mon Aug 28 18:52:59 2017 +0800 PCI: dwc: Add accessors for write permission of DBI read-only registers The read-only DBI registers can be written only when the "Write to RO Registers Using DBI" (DBI_RO_WR_EN) field of MISC_CONTROL_1_OFF is set. Add accessors to enable and disable write permission, and use them instead of accessing MISC_CONTROL_1_OFF directly. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 5 ++--- drivers/pci/dwc/pcie-designware.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) commit 4a2745d760facac895c107bed41e167e3806fced Author: Hou Zhiqiang Date: Mon Aug 28 18:52:58 2017 +0800 PCI: layerscape: Disable outbound windows configured by bootloader Disable all the outbound windows to avoid one transaction hitting multiple outbound windows. dw_pcie_setup_rc() will reconfigure the outbound windows, which may conflict with windows configured by the bootloader. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit fa92dba92c0026a8378085dbeab8a1d8ad8476c6 Author: Hou Zhiqiang Date: Mon Aug 28 18:52:57 2017 +0800 PCI: layerscape: Refactor ls1021_pcie_host_init() ls1021_pcie_host_init() duplicated the code in the generic ls_pcie_host_init(). Call ls_pcie_host_init() instead of duplicating the code. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 1b2f76d77a277bb70d38ad0991ed7f16bbc115a9 Merge: 5da382e b2f7605 Author: Ingo Molnar Date: Tue Aug 29 23:13:56 2017 +0200 Merge tag 'perf-core-for-mingo-4.14-20170829' 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: - Fix remote HITM detection for Skylake in 'perf c2c' (Jiri Olsa) - Fixes for the handling of PERF_RECORD_READ records (Jiri Olsa) - Fix kprobes blackist symbol lookup in 'perf probe' (Li Bin) - The PLT header and entry sizes are not the same in !x86, fix it for ARM and AARCH64 (Li Bin) - Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo) - Fix CC, AR, LD external definition, allow flex and bison to be externally defined and other related Makefile fixes (David Carrillo-Cisneros) - Sync CPU features kernel ABI headers with tooling headers (Arnaldo Carvalho de Melo) - Fix path to PMU formats in 'perf stat' documentation (Jack Henschel) - Fix static build with newer toolchains (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 14e1a131b5ebc4ed7d166f08d1a669d4ce6d2760 Author: Liam Breck Date: Mon Aug 28 14:23:49 2017 -0700 power: supply: bq24190_charger: Add power_supply_battery_info support Set pre-charge and charge-term current, obtained from power_supply_battery_info. Add sysfs attributes precharge_current & charge_term_current. Cc: Hans de Goede Acked-by: Tony Lindgren Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 87 ++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 8412a5bea72a787a170d5cc6902d0b8e8514c010 Author: Liam Breck Date: Mon Aug 28 14:23:48 2017 -0700 power: supply: bq24190_charger: Add property system-minimum-microvolt Set minimum system voltage limit obtained from device property. Cc: Hans de Goede Acked-by: Tony Lindgren Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a4c7590b8dc44919574fd316db89423197584350 Author: Liam Breck Date: Mon Aug 28 14:23:47 2017 -0700 power: supply: bq24190_charger: Enable devicetree config Add get_config(). Rename set_mode_host() to set_config(). Call get_config() and hw_init() after power_supply_register(). No functional changes. Cc: Hans de Goede Signed-off-by: Liam Breck Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 56 ++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 20 deletions(-) commit 3c72785a323e561dc4d1be27fb4cb46a74ec9703 Author: Liam Breck Date: Mon Aug 28 14:23:46 2017 -0700 dt-bindings: power: supply: Add docs for TI BQ24190 battery charger Document monitored-battery and ti,system-minimum-microvolt properties. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Liam Breck Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/bq24190.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 1059361fb69b6cae4464560763b594304983e229 Author: Liam Breck Date: Wed Aug 23 20:36:17 2017 -0700 power: supply: bq27xxx: Remove duplicate chip data arrays BQ2751X & BQ27510G3 have identical regs & props. BQ2750X & BQ27510G3 have identical props. BQ27500 & BQ27510G1 & BQ27510G2 have identical regs & props. BQ27500 & BQ27520G2 have identical props. Remove the duplicate arrays. No functional changes to the driver. Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 169 ++------------------------------- 1 file changed, 10 insertions(+), 159 deletions(-) commit e475842232042b0581b5488105fc17adef8fcff8 Author: Stan Drozd Date: Fri Aug 18 20:28:10 2017 +0530 tools: PCI: Add a missing option help line Add a missing option help line for performing legacy interrupt test. Signed-off-by: Stan Drozd Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas tools/pci/pcitest.c | 1 + 1 file changed, 1 insertion(+) commit 0c8a5f9d89b988ecb612a53d9439db899866bf8b Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:09 2017 +0530 misc: pci_endpoint_test: Enable/Disable MSI using module param In certain platforms like TI's DRA7 SoCs, use of legacy PCI interrupt is exclusive with use of MSI (Section 24.9.4.6.2.1 Legacy PCI Interrupts in http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf). However pci_endpoint_test driver enables MSI by default in probe. In order for pci_endpoint_test to be able to test legacy interrupt, MSI should be disabled. Add a module param 'no_msi' to disable MSI (only when legacy interrupt has to be tested). Signed-off-by: Kishon Vijay Abraham I [bhelgaas: folded in static fix from Colin Ian King ] Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cda370ec6d1f7b2567ef6f692d0df9358746ad5a Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:08 2017 +0530 misc: pci_endpoint_test: Avoid using hard-coded BAR sizes BAR sizes are hard-coded in pci_endpoint_test driver corresponding to the sizes used in pci-epf-test function driver. This might break if the sizes in pci-epf-test function driver are modified (and the corresponding change is not done in pci_endpoint_test PCI driver). To avoid hard coding BAR sizes, use pci_resource_len() API. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0b91516adc581636770ea4fb3efc022de057d074 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:07 2017 +0530 misc: pci_endpoint_test: Add support to not enable MSI interrupts Some platforms like TI's K2G have a restriction that the host side buffer address should be aligned to either 1MB/2MB/4MB or 8MB addresses depending on how it is configured in the endpoint (Ref: 11.14.4.9.1 Outbound Address Translation in K2G TRM SPRUHY8F January 2016 – Revised May 2017). This restriction also applies to the MSI addresses provided by the RC. However it's not possible for the RC to know about this restriction and it may not provide 1MB/2MB/4MB or 8MB aligned address. So MSI interrupts should be disabled even if the K2G EP has MSI capabiltiy register. Add support to not enable MSI interrupts in pci_endpoint_test driver so that it can be used to test K2G EP. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 13107c60681f19fec25af93de86442ac9373e43f Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:06 2017 +0530 misc: pci_endpoint_test: Add support to provide aligned buffer addresses Some platforms like TI's K2G have a restriction that the host side buffer address should be aligned to either 1MB/2MB/4MB or 8MB (Ref: 11.14.4.9.1 Outbound Address Translation in K2G TRM SPRUHY8F January 2016 – Revised May 2017) addresses depending on how it is configured in the endpoint. Add support to provide such aligned address here so that pci_endpoint_test driver can be used to test K2G EP. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 91 +++++++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 15 deletions(-) commit 834b9051992580ac8fd3966d023b911ad77d5b8d Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:05 2017 +0530 misc: pci_endpoint_test: Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR pci_endpoint_test driver assumes the PCI_ENDPOINT_TEST registers will always be mapped to BAR_0. This need not always be the case like in TI's K2G where BAR_0 is mapped to PCI controller application registers. Add support so that PCI_ENDPOINT_TEST registers can be mapped to any BAR. Change the bar_size used for BAR test accordingly. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 1d36eb58c34d0557b056e3724fd9de25e1ec90be Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:04 2017 +0530 PCI: designware-ep: Do not disable BARs during initialization Some platforms like K2G has reserved use of BAR_0 which shouldn't be disabled by software. Avoid disabling all BARs during initialization. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware-ep.c | 4 ---- 1 file changed, 4 deletions(-) commit 85aa13997444d7ac83da4094be513ad3fa2384b1 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:03 2017 +0530 PCI: dra7xx: Reset all BARs during initialization dra7xx has all base address registers (BAR) enabled by default. Reset all BARs during initialization and so that BARs are enabled only if they are actually used. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a937fe087aa1de5df35c31a261b0f5f6808a7052 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:02 2017 +0530 PCI: dwc: designware: Provide page_size to pci_epc_mem Use the newly introduced __pci_epc_mem_init() instead of pci_epc_mem_init() to provide page_size to pci_epc_mem. This is in preparation for adding EP support to K2G which has a restriction that the address region should be either divided into 1MB/2MB/4MB or 8MB sizes (Ref: 11.14.4.9.1 Outbound Address Translation in K2G TRM SPRUHY8F January 2016 – Revised May 2017). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware-ep.c | 3 ++- drivers/pci/dwc/pcie-designware.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 2ca93ffa93122324ce3b0e728d6e80671ea53f17 Author: Shawn Lin Date: Fri Aug 18 20:28:01 2017 +0530 PCI: endpoint: Remove the ->remove() callback epf_test is allocated using devm_kzalloc(). Hence it's not required to explicitly free it in remove() callback. Since ->remove() callback doesn't do anything other than freeing epf_test, remove the ->remove() callback. Signed-off-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/functions/pci-epf-test.c | 9 --------- 1 file changed, 9 deletions(-) commit 702a3ed9d6ea8c9fe438725c32bfe7d967959070 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:28:00 2017 +0530 PCI: endpoint: Add support to poll early for host commands Certain platforms like TI's K2G doesn't support link-up notification. Add support to poll early (without waiting for the linkup notification) for commands from the host. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/functions/pci-epf-test.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 3235b994950d84d64dd7c60a1dfe05b51a1533bf Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:27:59 2017 +0530 PCI: endpoint: Add support to use _any_ BAR to map PCI_ENDPOINT_TEST regs pci_epf_test always maps the PCI_ENDPOINT_TEST registers to BAR_0. But if BAR_0 is reserved for some other purpose (like in TI's K2G BAR_0 is mapped to application registers and cannot be used to map any other regions), PCI_ENDPOINT_TEST registers cannot be mapped making pci_epf_test unusable. Add support to use any BAR to map PCI_ENDPOINT_TEST registers. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/functions/pci-epf-test.c | 60 +++++++++++++++++++-------- 1 file changed, 42 insertions(+), 18 deletions(-) commit 3ecf3232c54cf76a21e552879285be2f313b2e06 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:27:58 2017 +0530 PCI: endpoint: Do not reset *command* inadvertently pci_epf_test_cmd_handler() is the delayed work function which reads *command* (set by the host) and performs various actions requested by the host periodically. If the value in *command* is '0', it goes to the reset_handler where it resets *command* to '0' and queues pci_epf_test_cmd_handler(). However if the host writes a value to the *command* just after the pci-epf-test driver checks *command* for '0' and before the control goes to reset_handler, the *command* will be reset to '0' and the pci-epf-test driver won't be able to perform the actions requested by the host. Fix it here by not resetting the *command* in the reset_handler. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/functions/pci-epf-test.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 09232c7acbd451c6da555ffdebad82661bf3d0be Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:27:57 2017 +0530 PCI: endpoint: Add "volatile" to pci_epf_test_reg struct pci_epf_test_reg is the MEMSPACE of pci-epf-test function driver that will be accessed by the "host" for programming the pci-epf-test device. So this structure shouldn't be subjected to compiler optimization in pci_epf_test_cmd_handler() since the values can be changed by code outside the scope of current code at any time. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52c9285d47459cf241e144c7d8ef15941ba1b181 Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:27:56 2017 +0530 PCI: endpoint: Add support for configurable page size pci-epc-mem uses a page size equal to *PAGE_SIZE* (usually 4KB) to manage the address space. However certain platforms like TI's K2G have a restriction that this address space should be either divided into 1MB/2MB/4MB or 8MB sizes (Ref: 11.14.4.9.1 Outbound Address Translation in K2G TRM SPRUHY8F January 2016 – Revised May 2017). Add support to handle different page sizes here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/pci-epc-mem.c | 59 ++++++++++++++++++++++++++++++++------ include/linux/pci-epc.h | 8 +++++- 2 files changed, 57 insertions(+), 10 deletions(-) commit 28daeff66990db85022c6a8b410e5b78dc78ff6a Author: Kishon Vijay Abraham I Date: Fri Aug 18 20:27:55 2017 +0530 PCI: endpoint: Make ->remove() callback optional Make ->remove() callback optional so that endpoint function drivers don't have to populate empty ->remove() callback functions. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/pci-epf-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2601a0032f0ef5a0592a8ee4e4e12bb00ec19aeb Author: Arvind Yadav Date: Wed Aug 23 22:50:50 2017 +0530 i2c: nomadik: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89c22d59eee15fad0ee740308dae94668d12330 Author: Bhumika Goyal Date: Mon Aug 21 18:58:37 2017 +0530 i2c: versatile: Make i2c_algo_bit_data const Make this const as it is only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-versatile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae3923a284cc696311294022e9b1a49058f07387 Author: Bhumika Goyal Date: Mon Aug 21 17:42:04 2017 +0530 i2c: busses: make i2c_adapter_quirks const Make these const as they are only stored as a reference in the quirks field of an i2c_adapter structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91.c | 2 +- drivers/i2c/busses/i2c-cpm.c | 2 +- drivers/i2c/busses/i2c-mlxcpld.c | 2 +- drivers/i2c/busses/i2c-opal.c | 2 +- drivers/i2c/busses/i2c-powermac.c | 2 +- drivers/i2c/busses/i2c-qup.c | 2 +- drivers/i2c/busses/i2c-tegra.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit ba95a82e31490b2415e9fe967c6997f5dac8fe31 Author: Hou Zhiqiang Date: Mon Aug 28 18:52:56 2017 +0800 PCI: layerscape: Move generic init functions earlier in file We will use the generic ls_pcie_link_up() and ls_pcie_host_init() from device-specific routines. Move the generic functions earlier in the file so we won't need forward declarations. This is strictly a code move with no functional change intended. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 5da39bf0919b6e129010f1554e639940be5bcdce Author: Hou Zhiqiang Date: Mon Aug 28 18:52:55 2017 +0800 PCI: layerscape: Add class code and multifunction fixups for ls1021a The current code depends on class code and multifunction fixups done by the bootloader. Perform these fixups in ls1021_pcie_host_init() to remove this dependency. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 5 +++++ 1 file changed, 5 insertions(+) commit 02232343349e606c8809e2555985a806d615e4ee Author: Hou Zhiqiang Date: Mon Aug 28 18:52:54 2017 +0800 PCI: layerscape: Move STRFMR1 access out from the DBI write-enable bracket The STRFMR1 is not a DBI read-only register, so move it out from the write-enable bracket. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 329430ccfc9ff864315974cf2fe7a35b00be5e9f Author: Bhumika Goyal Date: Sat Aug 19 16:04:12 2017 +0530 i2c: busses: make i2c_adapter const Make these const as they are only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: David Daney Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-kempld.c | 2 +- drivers/i2c/busses/i2c-ocores.c | 2 +- drivers/i2c/busses/i2c-octeon-platdrv.c | 2 +- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- drivers/i2c/busses/i2c-xiic.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit ad3caf8abc385b974d863b7a7a2950f4b089fee8 Author: Bhumika Goyal Date: Fri Aug 18 21:36:57 2017 +0530 i2c: busses: make i2c_algorithm const Make these const as they are only stored in the algo field of i2c_adapter structure, which is const. Signed-off-by: Bhumika Goyal Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pnx.c | 2 +- drivers/i2c/busses/i2c-puv3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a36deff6d13da8e146ad02cf38c0b81752efb305 Author: Hou Zhiqiang Date: Mon Aug 28 18:52:53 2017 +0800 PCI: layerscape: Call dw_pcie_setup_rc() from ls_pcie_host_init() We called dw_pcie_setup_rc() from the ls1021a host init function, but not from the common ls_pcie_host_init() function, so platforms other than ls1021a still depended on initialization by the bootloader. Call dw_pcie_setup_rc() from ls_pcie_host_init() to reduce dependencies on the bootloader. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/dwc/pci-layerscape.c | 2 ++ 1 file changed, 2 insertions(+) commit 602c8f4485cd1e6de67e41c78db96fa4f6808e53 Author: Greg Ungerer Date: Tue Jul 11 14:22:11 2017 +1000 spi: imx: fix use of native chip-selects with devicetree The commonly used mechanism of specifying the hardware or native chip-select on an SPI device in devicetree (that is "cs-gpios = <0>") does not result in the native chip-select being configured for use. So external SPI devices that require use of the native chip-select will not work. You can successfully specify native chip-selects if using a platform setup by specifying the cs-gpio as negative offset by 32. And that works correctly. You cannot use the same method in devicetree. The logic in the spi-imx.c driver during probe uses core spi function of_spi_register_master() in spi.c to parse the "cs-gpios" devicetree tag. For valid GPIO values that will be recorded for use, all other entries in the cs_gpios list will be set to -ENOENT. So entries like "<0>" will be set to -ENOENT in the cs_gpios list. When the SPI device registers are setup the code will use the GPIO listed in the cs_gpios list for the desired chip-select. If the cs_gpio is less then 0 then it is intended to be for a native chip-select, and its cs_gpio value is added to 32 to get the chipselect number to use. Problem is that with devicetree this can only ever be -ENOENT (which is -2), and that alone results in an invalid chip-select number. But also doesn't allow selection of the native chip-select at all. To fix, if the cs_gpio specified for this spi device is not a valid GPIO then use the "chip_select" (that is the native chip-select number) for hardware setup. Signed-off-by: Greg Ungerer Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1bb7cb68feb73a8106546cbd3379590297b0a950 Author: Oskar Schirmer Date: Fri Aug 25 21:36:56 2017 +0000 ASoC: tas2552: Fix fraction overflow in PLL calculation Setting the PLL involves the calculation of a fixed point ratio with 4 decimal digits fraction, referred to as "J.D". The fraction "D" is stored separately from the integer part "J" and is limited to 0..9999. The current algorithm uses integer registers to calculate the fraction part, but failed to compensate for rounding errors, resulting in values larger than 9999 for the fraction part occasionally, e.g. for 44.1kHz audio rate and pll_clkin = 3763400 it would set J to 11 and D to 10002, which will at best result in wrong pitch. The critical part is the "pll_clkin / 10000", which would be ok with real numbers, but using integer arithmetic the rounding decreases the divisor, thus increasing the final quotient. The issue is solved by linear interpolation over the reciprocal function between the two adjacent points with integer divisor, i.e. pll_clkin / 10000 and pll_clkin / 10000 + 1, and doing all rounding to the lower result. As a side effect to the bug fix, the approximation to the desired frequency is much better, for the above mentioned example we get 11.9993, while the true ratio is 11.9993623. Signed-off-by: Oskar Schirmer Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e78e661fae3296c4e20a029d6bd04c5e925c72de Author: Sinan Kaya Date: Tue Aug 29 14:45:45 2017 -0500 PCI: Warn periodically while waiting for non-CRS ("device ready") status Add a print statement in pci_bus_wait_crs() so that user observes the progress of device polling instead of silently waiting for timeout to be reached. Signed-off-by: Sinan Kaya [bhelgaas: check for timeout first so we don't print "waiting, giving up", always print time we've slept (not the actual timeout, print a "ready" message if we've printed a "waiting" message] Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 821cdad5c46cae94ce65b9a98614c70a6ff021f8 Author: Sinan Kaya Date: Tue Aug 29 14:45:45 2017 -0500 PCI: Wait up to 60 seconds for device to become ready after FLR Sporadic reset issues have been observed with an Intel 750 NVMe drive while assigning the physical function to the guest machine. The sequence of events observed is as follows: - perform a Function Level Reset (FLR) - sleep up to 1000ms total - read ~0 from PCI_COMMAND (CRS completion for config read) - warn that the device didn't return from FLR - touch the device before it's ready - device drops config writes when we restore register settings (there's no mechanism for software to learn about CRS completions for writes) - incomplete register restore leaves device in inconsistent state - device probe fails because device is in inconsistent state After reset, an endpoint may respond to config requests with Configuration Request Retry Status (CRS) to indicate that it is not ready to accept new requests. See PCIe r3.1, sec 2.3.1 and 6.6.2. Increase the timeout value from 1 second to 60 seconds to cover the period where device responds with CRS and also report polling progress. Signed-off-by: Sinan Kaya [bhelgaas: include the mandatory 100ms in the delays we print] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) commit 6a802ef0af94e7148c3fef71f5502654b65ed46a Author: Sinan Kaya Date: Tue Aug 29 14:45:44 2017 -0500 PCI: Factor out pci_bus_wait_crs() Configuration Request Retry Status (CRS) was previously hidden inside pci_bus_read_dev_vendor_id(). We want to add support for CRS in other situations, such as waiting for a device to become ready after a Function Level Reset. Move CRS handling into pci_bus_wait_crs() so it can be called from other places. Signed-off-by: Sinan Kaya [bhelgaas: pass pointer, not value, to pci_bus_wait_crs() so caller gets correct Vendor ID] Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 62bc6a6f7468bc6d6cb39177504e79df401aea76 Author: Sinan Kaya Date: Tue Aug 29 14:45:44 2017 -0500 PCI: Add pci_bus_crs_vendor_id() to detect CRS response data Add pci_bus_crs_vendor_id() to determine whether data returned for a config read of the Vendor ID indicates a Configuration Request Retry Status (CRS) response. Per PCIe r3.1, sec 2.3.2, this data is only returned if: - CRS Software Visibility is enabled, - a config read includes both bytes of the Vendor ID, and - the read receives a CRS completion Signed-off-by: Sinan Kaya [bhelgaas: changelog, change name to pci_bus_crs_vendor_id(), make static in probe.c, use it in pci_bus_read_dev_vendor_id()] Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9f98275671a58516f87b7eb02a3497635861930a Author: Bjorn Helgaas Date: Tue Aug 29 14:45:43 2017 -0500 PCI: Always check for non-CRS response before timeout While waiting for a device to become ready (i.e., to return a non-CRS completion to a read of its Vendor ID), if we got a valid response to the very last read before timing out, we printed a warning and gave up on the device even though it was actually ready. For a typical 60s timeout, we wait about 65s (it's not exact because of the exponential backoff), but we treated devices that became ready between 33s and 65s as though they failed. Move the Device ID read later so we check whether the device is ready before checking for a timeout. Thanks to Sinan Kaya , reorder reads so we always check device presence after sleep, since it's pointless to sleep unless we recheck afterwards. Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit aa71fba41b6fdcfe7d7772b057b76177304775dd Author: Jeffy Chen Date: Thu Aug 24 12:52:27 2017 +0800 ASoC: rockchip: Update description of rockchip, codec Update description for newly added optional audio codecs. Signed-off-by: Jeffy Chen Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 626d84db64d746f63eadf5e241fc2211419e11b8 Author: Jeffy Chen Date: Thu Aug 24 12:52:26 2017 +0800 ASoC: rockchip: Add support for DMIC codec Add support for optional dmic codec. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 1 + sound/soc/rockchip/rk3399_gru_sound.c | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit f5808ac158f2b16b686a3d3c0879c5d6048aba14 Author: Andrew Jeffery Date: Mon Aug 28 09:47:11 2017 +0930 leds: gpio: Allow LED to retain state at shutdown In some systems, such as Baseboard Management Controllers (BMCs), we want to retain the state of LEDs across a reboot of the BMC (whilst the host remains up). Implement support for the retain-state-shutdown devicetree property in leds-gpio. Signed-off-by: Andrew Jeffery Acked-by: Pavel Machek Tested-by: Brandon Wyman Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 7 ++++++- include/linux/leds.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 0f34f958768c48037ce19cdc5d863a7316a86d44 Author: Andrew Jeffery Date: Mon Aug 28 09:47:10 2017 +0930 dt-bindings: leds: gpio: Add optional retain-state-shutdown property On Baseboard Management Controller (BMC) systems it's sometimes necessary for a LED to retain its state across a BMC reset (which is independent of the host system state). Add a devicetree property to describe this behaviour. The property would typically be used in conjunction with 'default-state = "keep"'. Signed-off-by: Andrew Jeffery Acked-by: Pavel Machek Tested-by: Brandon Wyman Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/leds/leds-gpio.txt | 3 +++ 1 file changed, 3 insertions(+) commit 30f21ef22b7b7e1156cc2a7f9e714c002938f056 Author: Markus Elfring Date: Sun Aug 27 22:00:22 2017 +0200 leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create() 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 Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-powernv.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 34b558a5ed21ff97186265d0d753a3425744d7eb Author: Colin Ian King Date: Thu Aug 24 14:00:55 2017 +0100 leds: lp8501: make several arrays static const Don't populate the arrays on the stack, instead make them static const. Makes the object code smaller by 50 bytes: Before: text data bss dec hex filename 5058 1552 64 6674 1a12 drivers/leds/leds-lp8501.o After: text data bss dec hex filename 4788 1776 64 6628 19e4 drivers/leds/leds-lp8501.o Signed-off-by: Colin Ian King Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp8501.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 85775013ec49b3d114adfbd618d721247bf1b431 Author: Colin Ian King Date: Thu Aug 24 14:00:54 2017 +0100 leds: lp5562: make several arrays static const Don't populate the arrays on the stack, instead make them static const. Makes the object code smaller by over 150 bytes: Before: text data bss dec hex filename 7725 2448 64 10237 27fd drivers/leds/leds-lp5562.o After: text data bss dec hex filename 7184 2832 64 10080 2760 drivers/leds/leds-lp5562.o Signed-off-by: Colin Ian King Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp5562.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f01a59ef7ada971698972ec6ecdf4719119bb0ac Author: Colin Ian King Date: Thu Aug 24 14:00:53 2017 +0100 leds: lp5521: make several arrays static const Don't populate the arrays on the stack, instead make them static const. Makes the object code smaller by over 120 bytes: Before: text data bss dec hex filename 8999 4176 64 13239 33b7 drivers/leds/leds-lp5521.o After: text data bss dec hex filename 8554 4496 64 13114 333a drivers/leds/leds-lp5521.o Signed-off-by: Colin Ian King Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp5521.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 17224244bbbe2ac91bc2645b5198f742a63e1d82 Author: Colin Ian King Date: Thu Aug 24 14:00:52 2017 +0100 leds: aat1290: make array max_mm_current_percent static const Don't populate the array max_mm_current_percent on the stack, instead make it static const. Makes the object code smaller by over 280 bytes: Before: text data bss dec hex filename 7225 1936 64 9225 2409 ./drivers/leds/leds-aat1290.o After: text data bss dec hex filename 6847 2032 64 8943 22ef ./drivers/leds/leds-aat1290.o` Signed-off-by: Colin Ian King Signed-off-by: Jacek Anaszewski drivers/leds/leds-aat1290.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 390c97dc6e346b65df61c18fade67577896382fd Author: Jacek Anaszewski Date: Thu Aug 17 22:16:48 2017 +0200 leds: pca955x: Prevent crippled LED device name In case platform data provided empty LED name string the resulting LED class device name would be crippled. Use corresponding LED chip bit in place of "function" segment of LED class device name then to make the LEDs at least distinguishable. Signed-off-by: Jacek Anaszewski Reported-by: Colin King Reported-by: Dan Carpenter Suggested-by: Nate Case drivers/leds/leds-pca955x.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 430e48ecf31f4f897047f22e02abdfa75730cad8 Author: Amitoj Kaur Chawla Date: Thu Aug 10 12:28:09 2017 -0400 leds: lm3533: constify attribute_group structure Functions working with attribute_groups provided by work with const attribute_group. These attribute_group structures do not change at runtime so mark them as const. File size before: text data bss dec hex filename 8272 4608 64 12944 3290 drivers/leds/leds-lm3533.o File size after: text data bss dec hex filename 8368 4512 64 12944 3290 drivers/leds/leds-lm3533.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-lm3533.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15201b5de9d62fd6ece51ba9005c441d588fcb94 Author: Cédric Le Goater Date: Tue Aug 8 15:42:40 2017 +0200 dt-bindings: leds: add pca955x This adds the devicetree bindings for the PCA955x I2C LED blinkers. Signed-off-by: Cédric Le Goater Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-pca955x.txt | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 3313faf1053ee6cb90045f6877f11e2f61ead63a Author: Jeffy Chen Date: Thu Aug 24 12:52:25 2017 +0800 ASoC: rockchip: Add support for DP codec Add support for optional cdn dp codec. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 1 + sound/soc/rockchip/rk3399_gru_sound.c | 59 +++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) commit 0d52954ffe80b051ab79a105bd801485c4bbe20a Author: Jeffy Chen Date: Thu Aug 24 12:52:24 2017 +0800 ASoC: rockchip: Parse dai links from dts Refactor rockchip_sound_probe, parse dai links from dts instead of hard coding them. 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 | 140 ++++++++++++++++++++++------------ 1 file changed, 91 insertions(+), 49 deletions(-) commit 72cfb0f20c75c1e580597c164b9d74426e583f37 Author: Jeffy Chen Date: Thu Aug 24 12:52:21 2017 +0800 ASoC: rockchip: Use codec of_node and dai_name for rt5514 dsp Currently we are using codec name for rt5514 dsp dai link, use codec of_node instead. 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 | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit 50dad5fb59d12dc9a5a0e96073ee1e5857ac45a2 Author: Himanshu Jha Date: Wed Aug 30 00:33:35 2017 +0530 drm/amdkfd: remove memset before memcpy calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 - 1 file changed, 1 deletion(-) commit 64220b9d10a5546b6dd1154ccaf43522ae7d02fc Author: Naveen Manohar Date: Sat Aug 26 03:21:39 2017 +0530 ASoC: Intel: kbl: Add map for Maxim IV Feedback MAX98927 provides IV feedback on the capture widget. Here we are connecting the capture widget to SSP0_RX and SSP0_RX to the algorithm running on host. Signed-off-by: Naveen M Signed-off-by: Sathya Prakash M R Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 5 +++++ sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 5 +++++ 2 files changed, 10 insertions(+) commit eb33869c720656c16e614ea40a175a014f60007b Author: Hsin-Yu Chao Date: Mon Aug 28 15:13:50 2017 +0800 ASoC: rt5514: Guard Hotword Model bytes loading If the rt5514-spi driver is not enabled in kernel, hotword model will not be loaded when "DSP Voice Wake Up" is set to turn on DSP mode, and an error is logged instead. Signed-off-by: Hsin-Yu Chao Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b1dc00abcf18d27b36de500c150be88022c82270 Author: Rob Herring Date: Tue Aug 29 07:37:55 2017 -0500 ASoC: fsl_dma: remove dma_object path member dma_object.path is unused, so rather than fix it to work with DT full_name changes, just remove it. Signed-off-by: Rob Herring Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3a13347f05fdba9d889891245f154816197868f4 Author: Naveen M Date: Sat Aug 26 04:04:10 2017 +0530 ASoC: Intel: kbl: Add jack port initialize in kbl machine drivers After the pcm jack is created, create and initialize the pin switch widget for each port. For hdmi audio, invoke hdac_hdmi_jack_port_init func() in rt5663_max98927 & rt5663_rt5514_max98927 to enable the pin, when monitor is connected. Signed-off-by: Naveen M Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 7 ++++++- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit c20252cf9230eb7abd8bce9fdb2ce9bdd6743689 Author: Naveen M Date: Sat Aug 26 04:04:09 2017 +0530 ASoC: Intel: kbl: Add MST route change to kbl machine drivers To support MST hdmi audio, modify the current routes to be based on port in rt5663_max98927 & rt5663_rt5514_max98927 machine. Signed-off-by: Naveen M Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 8 +++----- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 7 ++----- 2 files changed, 5 insertions(+), 10 deletions(-) commit cecaf5cdfcf14f83ac8f311f3822dccbcf6589e4 Author: Jeffy Chen Date: Wed Aug 23 15:03:39 2017 +0800 PCI: rockchip: Umap IO space if probe fails Call pci_unmap_iospace() to clean up if probe fails. Signed-off-by: Jeffy Chen Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7b15b85927d6b04d0d8f1caf217bc6312486fdd5 Author: Jeffy Chen Date: Wed Aug 23 15:03:31 2017 +0800 PCI: rockchip: Remove IRQ domain if probe fails Call irq_domain_remove() to clean up if probe fails. Signed-off-by: Jeffy Chen Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit efee827d3ddb8bd219392cbedc5e5afc6ccfd617 Author: Jeffy Chen Date: Wed Aug 23 15:03:17 2017 +0800 PCI: rockchip: Disable vpcie0v9 if resume_noirq fails Disable vpcie0v9 regulator if resume_noirq fails. Signed-off-by: Jeffy Chen Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8c595dd1fd97d8e241c7a8c2f9fe9b08867b1d4a Author: Shawn Lin Date: Wed Aug 23 15:03:07 2017 +0800 PCI: rockchip: Clean up PHY if driver probe or resume fails We observed that the clk_pciephy_ref is still enabled when we fail to probe the driver. root@linaro-alip:~# grep pcie /sys/kernel/debug/clk/clk_summary clk_pciephy_ref 1 1 24000000 0 0 clk_pcie_pm 0 0 24000000 0 0 clk_pcie_core_cru 0 0 125000000 0 0 clk_pciephy_ref100m 0 0 100000000 0 0 aclk_pcie 0 0 148500000 0 0 aclk_perf_pcie 0 0 148500000 0 0 pclk_pcie 0 0 37125000 0 0 clk_pcie_core 0 0 0 0 0 clk_pciephy_ref is used by the PHY driver and we need to properly disable it for this case. Add error handling in rockchip_pcie_init_port() and rockchip_pcie_resume_noirq() to fix this issue. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 46 +++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit de8473f51470805cfd3132cc91598471bb9c5151 Author: Shawn Lin Date: Wed Aug 23 15:02:49 2017 +0800 PCI: rockchip: Factor out rockchip_pcie_deinit_phys() Factor out rockchip_pcie_deinit_phys() so it can be reused by rockchip_pcie_suspend_noirq() and rockchip_pcie_remove(). No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 41b70b2c6f10de4a3fcf1954bf00c8e620aed67d Author: Shawn Lin Date: Wed Aug 23 15:02:28 2017 +0800 PCI: rockchip: Factor out rockchip_pcie_disable_clocks() Factor out rockchip_pcie_disable_clocks() so it can be reused by other functions. No functional change intended, but it does change the order of unpreparing clocks in the rockchip_pcie_resume_noirq() error path so it matches the other paths. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 09df7bc40a15823e1b3e30135fc0f22eb97a0abb Author: Shawn Lin Date: Wed Aug 23 15:02:19 2017 +0800 PCI: rockchip: Factor out rockchip_pcie_enable_clocks() Factor out rockchip_pcie_enable_clocks() so it can be reused by rockchip_pcie_resume_noirq() and rockchip_pcie_probe(). No functional change intended, but it does change the order of unpreparing clocks in the rockchip_pcie_resume_noirq() error path. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 90 ++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit 6341f8052ea41c8fa9e28bb2f12864b90f470360 Author: Shawn Lin Date: Wed Aug 23 15:02:05 2017 +0800 PCI: rockchip: Factor out rockchip_pcie_setup_irq() Factor out rockchip_pcie_setup_irq() to prepare for future bug fixes. No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 82 +++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 35 deletions(-) commit bf2b3312edf182518577d1a28636bd4e9ae00858 Author: Fabio Estevam Date: Sun Aug 27 21:25:57 2017 -0300 PCI: rockchip: Use gpiod_set_value_cansleep() to allow reset via expanders The reset GPIO can be connected to a I2C or SPI IO expander, which may sleep, so it is safer to use the gpiod_set_value_cansleep() variant instead. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62f9ee98e14521166954e1e0d9fc1ee4ff2a5615 Author: Paul Burton Date: Tue Aug 15 16:27:29 2017 -0500 PCI: rockchip: Use PCI_NUM_INTX Use the PCI_NUM_INTX macro to indicate the number of PCI INTx interrupts rather than the magic number 4. This makes it clearer where the number comes from & what it relates to. Signed-off-by: Paul Burton Signed-off-by: Bjorn Helgaas Cc: Heiko Stuebner Cc: Shawn Lin drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18aca19722aa8a80a5dabb01dfc24bb146d3f1f6 Author: Philipp Zabel Date: Wed Jul 19 17:25:58 2017 +0200 PCI: rockchip: 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. Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 05b57273acb360d9fe5f8b8029890487e819871b Author: Shawn Lin Date: Wed Jul 19 17:57:58 2017 +0800 dt-bindings: phy-rockchip-pcie: Convert to per-lane PHY model Deprecate the legacy Rockchip PCIe PHY and encourage users to use per-lane PHY mode by setting #phy-cells to 1. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Rob Herring Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7a55b57031b3e97bbdfe8d378e4c6989341de7be Author: Shawn Lin Date: Wed Jul 19 17:57:57 2017 +0800 dt-bindings: PCI: rockchip: Convert to per-lane PHY model Deprecate legacy PHY model and encourage per-lane PHY model. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Rob Herring .../devicetree/bindings/pci/rockchip-pcie.txt | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit e9a60cac89ab75fad51c12912b489043087beb90 Author: Shawn Lin Date: Wed Jul 19 17:57:56 2017 +0800 arm64: dts: rockchip: convert PCIe to use per-lane PHYs for rk3339 Convert all RK3399 platforms to use per-lane PHY model in order to save more power by idling unused lane(s). Tested-by: Jeffy Chen Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7619de85d0654d33fb7dd06210adc1e00ccc35fc Merge: 22eac91 5307eca Author: David S. Miller Date: Tue Aug 29 11:04:43 2017 -0700 Merge tag 'wireless-drivers-next-for-davem-2017-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.14 rsi driver is getting a lot of new features lately, but as usual active development happening on iwlwifi as well as other drivers. I pulled wireless-drivers to fix multiple conflicts in iwlwifi and to make it easier further development. Major changes: ath10k * initial UBS bus support (no full support yet) * add tdls support for 10.4 firmware ath9k * add Dell Wireless 1802 wil6210 * support FW RSSI reporting rsi * support legacy power save, U-APSD, rf-kill and AP mode * RTS threshold configuration brcmfmac * support CYW4373 SDIO/USB chipset iwlwifi * some more code moved to a new directory * add new PCI ID for 7265D ==================== Signed-off-by: David S. Miller commit 22eac913fe27c5970a9e3815cf3fac8c36a7b35c Author: Arvind Yadav Date: Mon Aug 28 11:22:20 2017 +0530 net: stmmac: constify clk_div_table clk_div_table are not supposed to change at runtime. meson8b_dwmac structure is working with const clk_div_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d4dae1a64f7abc5d40faef08f7c7de2a5ece79 Merge: d0fcece 3ffab54 Author: David S. Miller Date: Tue Aug 29 10:51:29 2017 -0700 Merge branch 'XDP-redirect-tracepoints' Jesper Dangaard Brouer says: ==================== XDP redirect tracepoints I feel this is as far as I can take the tracepoint infrastructure to assist XDP monitoring. Tracepoints comes with a base overhead of 25 nanosec for an attached bpf_prog, and 48 nanosec for using a full perf record. This is problematic for the XDP use-case, but it is very convenient to use the existing perf infrastructure. From a performance perspective, the real solution would be to attach another bpf_prog (that understand xdp_buff), but I'm not sure we want to introduce yet another bpf attach API for this. One thing left is to standardize the possible err return codes, to a limited set, to allow easier (and faster) mapping into a bpf map. ==================== Signed-off-by: David S. Miller commit 3ffab54602644f69485632435ef154a442ae7189 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:38:11 2017 +0200 samples/bpf: xdp_monitor tool based on tracepoints This tool xdp_monitor demonstrate how to use the different xdp_redirect tracepoints xdp_redirect{,_map}{,_err} from a BPF program. The default mode is to only monitor the error counters, to avoid affecting the per packet performance. Tracepoints comes with a base overhead of 25 nanosec for an attached bpf_prog, and 48 nanosec for using a full perf record (with non-matching filter). Thus, default loading the --stats mode could affect the maximum performance. This version of the tool is very simple and count all types of errors as one. It will be natural to extend this later with the different types of errors that can occur, which should help users quickly identify common mistakes. Because the TP_STRUCT was kept in sync all the tracepoints loads the same BPF code. It would also be natural to extend the map version to demonstrate how the map information could be used. Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/xdp_monitor_kern.c | 88 ++++++++++++ samples/bpf/xdp_monitor_user.c | 295 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 387 insertions(+) commit 306da4e685b415f5c875cef275001b5cdc182da9 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:38:06 2017 +0200 samples/bpf: xdp_redirect load XDP dummy prog on TX device For supporting XDP_REDIRECT, a device driver must (obviously) implement the "TX" function ndo_xdp_xmit(). An additional requirement is you cannot TX out a device, unless it also have a xdp bpf program attached. This dependency is caused by the driver code need to setup XDP resources before it can ndo_xdp_xmit. Update bpf samples xdp_redirect and xdp_redirect_map to automatically attach a dummy XDP program to the configured ifindex_out device. Use the XDP flag XDP_FLAGS_UPDATE_IF_NOEXIST on the dummy load, to avoid overriding an existing XDP prog on the device. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/xdp_redirect_kern.c | 11 ++++++++++- samples/bpf/xdp_redirect_map_kern.c | 11 ++++++++++- samples/bpf/xdp_redirect_map_user.c | 22 +++++++++++++++------- samples/bpf/xdp_redirect_user.c | 21 +++++++++++++++------ 4 files changed, 50 insertions(+), 15 deletions(-) commit 59a308967589f5b3f1f42793ab49bc2e18069769 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:38:01 2017 +0200 xdp: separate xdp_redirect tracepoint in map case Creating as specific xdp_redirect_map variant of the xdp tracepoints allow users to write simpler/faster BPF progs that get attached to these tracepoints. Goal is to still keep the tracepoints in xdp_redirect and xdp_redirect_map similar enough, that a tool can read the top part of the TP_STRUCT and produce similar monitor statistics. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 46 ++++++++++++++++++++++++++++++++++++++-------- net/core/filter.c | 4 ++-- 2 files changed, 40 insertions(+), 10 deletions(-) commit f5836ca5e9867fa6ab88cadb9873af56d9ceb589 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:37:56 2017 +0200 xdp: separate xdp_redirect tracepoint in error case There is a need to separate the xdp_redirect tracepoint into two tracepoints, for separating the error case from the normal forward case. Due to the extreme speeds XDP is operating at, loading a tracepoint have a measurable impact. Single core XDP REDIRECT (ethtool tuned rx-usecs 25) can do 13.7 Mpps forwarding, but loading a simple bpf_prog at the tracepoint (with a return 0) reduce perf to 10.2 Mpps (CPU E5-1650 v4 @ 3.60GHz, driver: ixgbe) The overhead of loading a bpf-based tracepoint can be calculated to cost 25 nanosec ((1/13782002-1/10267937)*10^9 = -24.83 ns). Using perf record on the tracepoint event, with a non-matching --filter expression, the overhead is much larger. Performance drops to 8.3 Mpps, cost 48 nanosec ((1/13782002-1/8312497)*10^9 = -47.74)) Having a separate tracepoint for err cases, which should be less frequent, allow running a continuous monitor for errors while not affecting the redirect forward performance (this have also been verified by measurements). Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/trace/events/xdp.h | 22 ++++++++++++++++++---- net/core/filter.c | 37 ++++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 17 deletions(-) commit b06337dfdb16bc3f668326b6a618c472c671182a Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:37:51 2017 +0200 xdp: make xdp tracepoints report bpf prog id instead of prog_tag Given previous patch expose the map_id, it seems natural to also report the bpf prog id. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 8d3b778ff544b369f0847e6c15f3e73057298aa4 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:37:45 2017 +0200 xdp: tracepoint xdp_redirect also need a map argument To make sense of the map index, the tracepoint user also need to know that map we are talking about. Supply the map pointer but only expose the map->id. The 'to_index' is renamed 'to_ifindex'. In the xdp_redirect_map case, this is the result of the devmap lookup. The map lookup key is exposed as map_index, which is needed to troubleshoot in case the lookup failed. The 'to_ifindex' is placed after 'err' to keep TP_STRUCT as common as possible. This also keeps the TP_STRUCT similar enough, that userspace can write a monitor program, that doesn't need to care about whether bpf_redirect or bpf_redirect_map were used. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 38 ++++++++++++++++++++++++++++++-------- net/core/filter.c | 6 +++--- 2 files changed, 33 insertions(+), 11 deletions(-) commit c31e5a4876cdfbfcc28c4fb201ad872c65671067 Author: Jesper Dangaard Brouer Date: Tue Aug 29 16:37:40 2017 +0200 xdp: remove redundant argument to trace_xdp_redirect Supplying the action argument XDP_REDIRECT to the tracepoint xdp_redirect is redundant as it is only called in-case this action was specified. Remove the argument, but keep "act" member of the tracepoint struct and populate it with XDP_REDIRECT. This makes it easier to write a common bpf_prog processing events. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 6 +++--- net/core/filter.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit c27d88e10b24baa931f3e0b74f7d3695f422bae7 Author: Baruch Siach Date: Wed Aug 23 09:11:00 2017 +0300 dt-binding: net/phy: fix interrupts description Commit b053dc5a722ea (powerpc: Refactor device tree binding) split the Ethernet PHY binding documentation out of the big booting-without-of.txt file, leaving a dangling reference to "section 2" in the 'interrupts' property description. Drop that reference, and make the description look more like the rest. While at it, make the example interrupt-parent phandle look more like a real world phandle, and use an IRQ_TYPE_ macro for the 'interrupts' type. Signed-off-by: Baruch Siach Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/phy.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 774e1b78a0f90a7e81f7a23d9ebfa8b8233c1ffa Author: Chao Yu Date: Wed Aug 23 18:23:25 2017 +0800 f2fs: trigger fdatasync for non-atomic_write file Sqlite only cares about synchronization of file data instead of other data unrelated attribute of inode, so in commit flow, call fdatasync is enough. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73ac2f4e8256b9605c84364011322f015b31f499 Author: Chao Yu Date: Wed Aug 23 18:23:24 2017 +0800 f2fs: fix to avoid race in between aio and gc We won't wait DIO synchronously when doing AIO, so there will be potential IO reorder in between AIO and GC, which will cause data corruption. This patch adds inode_dio_wait to serialize aio and data GC to avoid this issue. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 3 +++ 1 file changed, 3 insertions(+) commit 01983c715ad0e78842a885f361ad927a3a985994 Author: Jaegeuk Kim Date: Tue Aug 22 21:15:43 2017 -0700 f2fs: wake up discard_thread iff there is a candidate This patch fixes to avoid needless wake ups. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 +-- fs/f2fs/segment.h | 25 +++++++++++++++++++++++++ fs/f2fs/sysfs.c | 6 +----- 3 files changed, 27 insertions(+), 7 deletions(-) commit adb6dc197187e2a5f5a7bed01e722f46a58676af Author: Jaegeuk Kim Date: Mon Aug 21 13:51:32 2017 -0700 f2fs: return error when accessing insane flie offset If file offset is insane, we have to return error instead of kernel panic. Reported-by: Eric Zhang Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0adf6a1b796777f5d19a9b7442172016aeb8020a Author: Chao Yu Date: Fri Aug 18 16:20:33 2017 +0800 f2fs: trigger normal fsync for non-atomic_write file If file was not opened with atomic write mode, but user uses atomic write ioctl to fsync datas, in the flow, we should not fsync that file with atomic write mode. Fixes: 608514deba38 ("f2fs: set fsync mark only for the last dnode") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84a23fbe96b4e307eb749046a74515329119b08d Author: Chao Yu Date: Fri Aug 18 23:37:36 2017 +0800 f2fs: clear FI_HOT_DATA correctly This patch fixes to clear FI_HOT_DATA correctly in below path: - error handling in f2fs_ioc_start_atomic_write - after commit atomic write in f2fs_ioc_commit_atomic_write - after drop atomic write in drop_inmem_pages Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 ++ fs/f2fs/segment.c | 1 + 2 files changed, 3 insertions(+) commit 6f890df0a7efe3181aceb5d8bcd4af7deb2abce5 Author: Chao Yu Date: Mon Aug 21 22:53:45 2017 +0800 f2fs: fix out-of-order execution in f2fs_issue_flush In f2fs_issue_flush, due to out-of-order execution of CPU, wake_up can be called before we insert issue_list, result in long latency of wait_for_completion. Fix this by adding smp_mb() to force the order of related codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5f656541ff6e4f58b4ab5b4ae59badb97a9ff749 Author: Jaegeuk Kim Date: Tue Aug 15 21:27:19 2017 -0700 f2fs: issue discard commands if gc_urgent is set It's time to issue all the discard commands, if user sets the idle time. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 +++++- fs/f2fs/sysfs.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit c529594f93ae64de2a84e7fff903ae6844664912 Author: Christoph Hellwig Date: Tue Aug 29 18:48:38 2017 +0200 bsg: remove #if 0'ed code Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bsg.c | 7 ------- 1 file changed, 7 deletions(-) commit 7de967e76fce652f9e8f3594c97ae132e3a0833a Author: Ben Hutchings Date: Sun Aug 13 18:03:15 2017 +0100 mq-deadline: Enable auto-loading when built as module The block core requests modules with the "-iosched" name suffix, but mq-deadline does not have that suffix. Add an alias. Fixes: 945ffb60c11d ("mq-deadline: add blk-mq adaptation of the deadline ...") Reviewed-by: Ming Lei Signed-off-by: Ben Hutchings Signed-off-by: Jens Axboe block/mq-deadline.c | 1 + 1 file changed, 1 insertion(+) commit 26b4cf2497e380c5cc64b9ad6a7b84a8648320cd Author: Ben Hutchings Date: Sun Aug 13 18:02:19 2017 +0100 bfq: Re-enable auto-loading when built as a module The block core requests modules with the "-iosched" name suffix, but bfq no longer has that suffix. Add an alias. Fixes: ea25da48086d ("block, bfq: split bfq-iosched.c into multiple ...") Reviewed-by: Ming Lei Signed-off-by: Ben Hutchings Signed-off-by: Jens Axboe block/bfq-iosched.c | 1 + 1 file changed, 1 insertion(+) commit d0fcece7704c935a9c8740bddff21575048f27ba Merge: 3d86e35 c038a58 Author: David S. Miller Date: Tue Aug 29 09:42:48 2017 -0700 Merge tag 'rxrpc-next-20170829' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Miscellany Here are a number of patches that make some changes/fixes and add a couple of extensions to AF_RXRPC for kernel services to use. The changes and fixes are: (1) Use time64_t rather than u32 outside of protocol or UAPI-representative structures. (2) Use the correct time stamp when loading a key from an XDR-encoded Kerberos 5 key. (3) Fix IPv6 support. (4) Fix some places where the error code is being incorrectly made positive before returning. (5) Remove some white space. And the extensions: (6) Add an end-of-Tx phase notification, thereby allowing kAFS to transition the state on its own call record at the correct point, rather than having to do it in advance and risk non-completion of the call in the wrong state. (7) Allow a kernel client call to be retried if it fails on a network error, thereby making it possible for kAFS to iterate over a number of IP addresses without having to reload the Tx queue and re-encrypt data each time. ==================== Signed-off-by: David S. Miller commit 3d86e352c077152a9719ae5ccdf89f1ae616ff6c Merge: 6c766db a6f5702 Author: David S. Miller Date: Tue Aug 29 09:41:56 2017 -0700 Merge branch 'addrlabel-no-rtnl-locking' Florian Westphal says: ==================== addrlabel: don't use rtnl locking addrlabel doesn't appear to require rtnl lock as the addrlabel table uses a spinlock to serialize add/delete operations. Also, entries are reference counted so it should be safe to call the rtnl ops without the rtnl mutex. ==================== Signed-off-by: David S. Miller commit a6f57028d60328c06ea23982464de2f2e4a9ea3f Author: Florian Westphal Date: Tue Aug 29 13:29:42 2017 +0200 addrlabel: add/delete/get can run without rtnl There appears to be no need to use rtnl, addrlabel entries are refcounted and add/delete is serialized by the addrlabel table spinlock. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/addrlabel.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 34504029b51ad96abfeb919ea196cb18f06dddac Author: Florian Westphal Date: Tue Aug 29 13:29:41 2017 +0200 selftests: add addrlabel add/delete to rtnetlink.sh Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 6c766db60b6179f251812437d44e9c1b4e236f36 Author: Greg Kroah-Hartman Date: Tue Aug 29 09:09:29 2017 +0200 staging: irda: update MAINTAINERS Now that the IRDA code has moved under drivers/staging/irda/, update the MAINTAINERS file with the new location. Reported-by: Joe Perches Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: David S. Miller MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f143647a02825038d8d6251422e1d0ebdcb6d9ea Author: Sathya Perla Date: Tue Aug 29 11:45:03 2017 +0530 bnxt_en: add a dummy definition for bnxt_vf_rep_get_fid() When bnxt VF-reps are not compiled in (CONFIG_BNXT_SRIOV is off) bnxt_tc.c needs a dummy definition of the routine bnxt_vf_rep_get_fid(). Reported-by: kbuild test robot Fixes: 2ae7408fedfe ("bnxt_en: bnxt: add TC flower filter offload support") Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2d2a2b8c080ad8feab7ca87769dedb3c7a83a375 Author: Lothar Waßmann Date: Tue Aug 29 12:17:13 2017 +0200 mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized chip->bits_per_cell which is used to determine the NAND cell type (SLC/MLC) should always have a value != 0. Complain loudly if the value is 0 in nand_is_slc() to catch use before correct initialization. Signed-off-by: Lothar Waßmann Signed-off-by: Boris Brezillon include/linux/mtd/rawnand.h | 2 ++ 1 file changed, 2 insertions(+) commit 69fc01296c92814b62dbfba1600fe7ed2ed304f5 Author: Lothar Waßmann Date: Tue Aug 29 12:17:12 2017 +0200 mtd: nand: make Samsung SLC NAND usable again commit c51d0ac59f24 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c") introduced a regression for Samsung SLC NAND chips. Prior to this commit chip->bits_per_cell was initialized by calling nand_get_bits_per_cell() before using nand_is_slc(). With the offending commit this call is skipped, leaving chip->bits_per_cell cleared to zero when the manufacturer specific '.detect' function calls nand_is_slc() which in turn interprets bits_per_cell != 1 as indication for an MLC chip. The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as MLC NAND with 4KiB page size rather than SLC with 2KiB page size. Add a call to nand_get_bits_per_cell() before calling the .detect hook function in nand_manufacturer_detect(), so that the nand_is_slc() calls in the manufacturer specific code will return correct results. Fixes: c51d0ac59f24 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c") Cc: Signed-off-by: Lothar Waßmann Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5034435c84bea5e92c6a7dee70b51f0c0e441a51 Author: Damien Le Moal Date: Tue Aug 29 11:54:37 2017 +0900 block: Make blk_dequeue_request() static The only caller of this function is blk_start_request() in the same file. Fix blk_start_request() description accordingly. Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-core.c | 5 +---- block/blk.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) commit 6fd5b91dab08106822f3c95a343e6724e88f0951 Author: Bart Van Assche Date: Tue Aug 29 08:32:10 2017 -0700 skd: Let the block layer core choose .nr_requests Since blk_mq_init_queue() initializes .nr_requests to the tag set size and since that value is a good default for the skd driver, do not overwrite the value set by blk_mq_init_queue(). This change doubles the default value of .nr_requests. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 1 - 1 file changed, 1 deletion(-) commit bf231981bef52eb4130d30ffc06a6fe256866602 Author: Bart Van Assche Date: Tue Aug 29 08:32:09 2017 -0700 skd: Remove blk_queue_bounce_limit() call Since sTec s1120 devices support 64-bit DMA it is not necessary to request data buffer bouncing. Hence remove the blk_queue_bounce_limit() call. Suggested-by: Christoph Hellwig Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 1 - 1 file changed, 1 deletion(-) commit 2b76da95638010a70435f8455913133acc26e93f Merge: cd996fb 1d5df6a Author: Jens Axboe Date: Tue Aug 29 09:09:11 2017 -0600 Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-4.14/block-postmerge Pull NVMe changes from Christoph: "Below is the current set of NVMe updates for Linux 4.14, now against your postmerge branch, and with three more patches. The biggest bit comes from Sagi and refactors the RDMA driver to prepare for more code sharing in the setup and teardown path. But we have various features and bug fixes from a lot of people as well." commit 1935222dc2f22ea885e7a7ece6d1be586aafe4a1 Author: David Hildenbrand Date: Tue Aug 29 16:31:08 2017 +0200 KVM: s390: we are always in czam mode Independent of the underlying hardware, kvm will now always handle SIGP SET ARCHITECTURE as if czam were enabled. Therefore, let's not only forward that bit but always set it. While at it, add a comment regarding STHYI. Signed-off-by: David Hildenbrand Message-Id: <20170829143108.14703-1-david@redhat.com> Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 4 ++++ arch/s390/tools/gen_facilities.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) commit b2f7605076d6cdd68162c42c34caadafbbe4c69f Author: Li Bin Date: Mon Jun 5 08:34:09 2017 +0800 perf symbols: Fix plt entry calculation for ARM and AARCH64 On x86, the plt header size is as same as the plt entry size, and can be identified from shdr's sh_entsize of the plt. But we can't assume that the sh_entsize of the plt shdr is always the plt entry size in all architecture, and the plt header size may be not as same as the plt entry size in some architecure. On ARM, the plt header size is 20 bytes and the plt entry size is 12 bytes (don't consider the FOUR_WORD_PLT case) that refer to the binutils implementation. The plt section is as follows: Disassembly of section .plt: 000004a0 <__cxa_finalize@plt-0x14>: 4a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4a4: e59fe004 ldr lr, [pc, #4] ; 4b0 <_init+0x1c> 4a8: e08fe00e add lr, pc, lr 4ac: e5bef008 ldr pc, [lr, #8]! 4b0: 00008424 .word 0x00008424 000004b4 <__cxa_finalize@plt>: 4b4: e28fc600 add ip, pc, #0, 12 4b8: e28cca08 add ip, ip, #8, 20 ; 0x8000 4bc: e5bcf424 ldr pc, [ip, #1060]! ; 0x424 000004c0 : 4c0: e28fc600 add ip, pc, #0, 12 4c4: e28cca08 add ip, ip, #8, 20 ; 0x8000 4c8: e5bcf41c ldr pc, [ip, #1052]! ; 0x41c On AARCH64, the plt header size is 32 bytes and the plt entry size is 16 bytes. The plt section is as follows: Disassembly of section .plt: 0000000000000560 <__cxa_finalize@plt-0x20>: 560: a9bf7bf0 stp x16, x30, [sp,#-16]! 564: 90000090 adrp x16, 10000 <__FRAME_END__+0xf8a8> 568: f944be11 ldr x17, [x16,#2424] 56c: 9125e210 add x16, x16, #0x978 570: d61f0220 br x17 574: d503201f nop 578: d503201f nop 57c: d503201f nop 0000000000000580 <__cxa_finalize@plt>: 580: 90000090 adrp x16, 10000 <__FRAME_END__+0xf8a8> 584: f944c211 ldr x17, [x16,#2432] 588: 91260210 add x16, x16, #0x980 58c: d61f0220 br x17 0000000000000590 <__gmon_start__@plt>: 590: 90000090 adrp x16, 10000 <__FRAME_END__+0xf8a8> 594: f944c611 ldr x17, [x16,#2440] 598: 91262210 add x16, x16, #0x988 59c: d61f0220 br x17 NOTES: In addition to ARM and AARCH64, other architectures, such as s390/alpha/mips/parisc/poperpc/sh/sparc/xtensa also need to consider this issue. Signed-off-by: Li Bin Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: David Tolnay Cc: Hanjun Guo Cc: Hemant Kumar Cc: Masami Hiramatsu Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: zhangmengting@huawei.com Link: http://lkml.kernel.org/r/1496622849-21877-1-git-send-email-huawei.libin@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit fa41ba0d08de7c975c3e94d0067553f9b934221f Author: Christian Borntraeger Date: Thu Aug 24 12:55:08 2017 +0200 s390/mm: avoid empty zero pages for KVM guests to avoid postcopy hangs Right now there is a potential hang situation for postcopy migrations, if the guest is enabling storage keys on the target system during the postcopy process. For storage key virtualization, we have to forbid the empty zero page as the storage key is a property of the physical page frame. As we enable storage key handling lazily we then drop all mappings for empty zero pages for lazy refaulting later on. This does not work with the postcopy migration, which relies on the empty zero page never triggering a fault again in the future. The reason is that postcopy migration will simply read a page on the target system if that page is a known zero page to fault in an empty zero page. At the same time postcopy remembers that this page was already transferred - so any future userfault on that page will NOT be retransmitted again to avoid races. If now the guest enters the storage key mode while in postcopy, we will break this assumption of postcopy. The solution is to disable the empty zero page for KVM guests early on and not during storage key enablement. With this change, the postcopy migration process is guaranteed to start after no zero pages are left. As guest pages are very likely not empty zero pages anyway the memory overhead is also pretty small. While at it this also adds proper page table locking to the zero page removal. Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank Cc: stable@vger.kernel.org Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 2 +- arch/s390/mm/gmap.c | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 8 deletions(-) commit 28b841b3a7cb07a4bfd436a15b31bc88509dcf9a Author: Jan Höppner Date: Thu Jun 30 13:28:57 2016 +0200 s390/dasd: Add discard support for FBA devices The z/VM hypervisor provides virtual disks (VDISK) which are backed by main memory of the hypervisor. Those devices are seen as DASD FBA disks within the Linux guest. Whenever data is written to such a device, memory is allocated on-the-fly by z/VM accordingly. This memory, however, is not being freed if data on the device is deleted by the guest OS. In order to make memory usable after deletion again, add discard support to the FBA discipline. While at it, update comments regarding the DASD_FEATURE_* flags. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/dasd.h | 6 +- drivers/s390/block/dasd.c | 19 +++- drivers/s390/block/dasd_devmap.c | 1 + drivers/s390/block/dasd_fba.c | 202 +++++++++++++++++++++++++++++++++++++- drivers/s390/block/dasd_int.h | 3 + 5 files changed, 226 insertions(+), 5 deletions(-) commit 8b94dd9e0d4439f83fcc55f1f8020c86e79b623d Author: Bhumika Goyal Date: Fri Aug 25 18:40:29 2017 +0530 s390/zcrypt: make CPRBX const Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_msgtype6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d66bf801e0219ca9495fdb92574f842ba5462e04 Author: Martin Schwidefsky Date: Mon Aug 21 14:47:04 2017 +0200 s390/uaccess: avoid mvcos jump label If the kernel is compiled for z10 or later machines the uaccess code inlines the mvcos instruction. The facility bit 27 which indicates the availability of MVCOS has to be set. The have_mvcos jump label will always be true. Make the generation of the have_mvcos jump label conditional on !CONFIG_HAVE_MARCH_Z10_FEATURES. Signed-off-by: Martin Schwidefsky arch/s390/lib/uaccess.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 8e58ab5c6563e3cc94029853471a36b87b4716eb Author: Martin Schwidefsky Date: Wed Aug 23 12:13:51 2017 +0200 s390/mm: use generic mm_hooks With git commit 3446c13b268af86391d06611327006b059b8bab1 "s390/mm: four page table levels vs. fork" s390 dropped its architecture specific version of arch_dup_mmap. Now all functions defined by include/asm-generic/mm_hooks.h are identical to the s390 versions. Use the generic header. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) commit ba7944114ad3c2273611c95d6571c0924010a105 Author: Heiko Carstens Date: Fri Aug 18 09:02:01 2017 +0200 s390/facilities: fix typo There really is no "general extension" facility available. Use the correct name "general instructions extension" facility instead. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/tools/gen_facilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb304e800d491d5168df61a999beebe8042e7e58 Author: Heiko Carstens Date: Fri Aug 18 08:35:33 2017 +0200 s390/vmcp: simplify vmcp_response_free() Get rid of the goto and "out" label within vmcp_response_free() which I added. This just makes the code harder to read than necessary. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/vmcp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 687abc0f77c239dc4cc93ea5cd27cfad76ddd038 Author: Ryder Lee Date: Fri Aug 18 09:13:08 2017 +0800 dt-bindings: ata: add DT bindings for MediaTek SATA controller Add DT bindings for the onboard SATA controller present on the MediaTek SoCs. Signed-off-by: Ryder Lee Acked-by: Rob Herring Signed-off-by: Tejun Heo Documentation/devicetree/bindings/ata/ahci-mtk.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 2c29461e273abaf149cf8220c3403e9d67dd8b61 Author: Li Bin Date: Tue Aug 29 20:57:23 2017 +0800 perf probe: Fix kprobe blacklist checking condition The commit 9aaf5a5f479b ("perf probe: Check kprobes blacklist when adding new events"), 'perf probe' supports checking the blacklist of the fuctions which can not be probed. But the checking condition is wrong, that the end_addr of the symbol which is the start_addr of the next symbol can't be included. Committer notes: IOW make it match its kernel counterpart in kernel/kprobes.c: bool within_kprobe_blacklist(unsigned long addr) Each entry have as its end address not its end address, but the first address _outside_ that symbol, which for related functions, is the first address of the next symbol, like these from kernel/trace/trace_probe.c: 0xffffffffbd198df0-0xffffffffbd198e40 print_type_u8 0xffffffffbd198e40-0xffffffffbd198e90 print_type_u16 0xffffffffbd198e90-0xffffffffbd198ee0 print_type_u32 0xffffffffbd198ee0-0xffffffffbd198f30 print_type_u64 0xffffffffbd198f30-0xffffffffbd198f80 print_type_s8 0xffffffffbd198f80-0xffffffffbd198fd0 print_type_s16 0xffffffffbd198fd0-0xffffffffbd199020 print_type_s32 0xffffffffbd199020-0xffffffffbd199070 print_type_s64 0xffffffffbd199070-0xffffffffbd1990c0 print_type_x8 0xffffffffbd1990c0-0xffffffffbd199110 print_type_x16 0xffffffffbd199110-0xffffffffbd199160 print_type_x32 0xffffffffbd199160-0xffffffffbd1991b0 print_type_x64 But not always: 0xffffffffbd1997b0-0xffffffffbd1997c0 fetch_kernel_stack_address (kernel/trace/trace_probe.c) 0xffffffffbd1c57f0-0xffffffffbd1c58b0 __context_tracking_enter (kernel/context_tracking.c) Signed-off-by: Li Bin Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: zhangmengting@huawei.com Fixes: 9aaf5a5f479b ("perf probe: Check kprobes blacklist when adding new events") Link: http://lkml.kernel.org/r/1504011443-7269-1-git-send-email-huawei.libin@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55e18b18335132cb21d815e09c376fca891f5af2 Author: Rob Herring Date: Tue Jun 6 16:45:15 2017 -0500 virt: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring drivers/virt/fsl_hypervisor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 985541f6c01e67bcdce433847d1b56fe8f523bf0 Author: Rob Herring Date: Tue Jun 6 16:28:24 2017 -0500 macintosh: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org drivers/macintosh/macio_sysfs.c | 2 +- drivers/macintosh/rack-meter.c | 4 ++-- drivers/macintosh/smu.c | 8 ++++---- drivers/macintosh/via-cuda.c | 4 ++-- drivers/macintosh/windfarm_fcu_controls.c | 4 ++-- drivers/macintosh/windfarm_lm87_sensor.c | 4 ++-- drivers/macintosh/windfarm_smu_sat.c | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) commit 066cf01dbf7a970796b6cb9532a5b9bf7380d5d7 Author: Rob Herring Date: Tue Jun 6 16:24:43 2017 -0500 ide: pmac: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Acked-by: David S. Miller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-ide@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org drivers/ide/pmac.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f2b8ae0ec356dc28bba745168894e34455546e5b Author: Rob Herring Date: Tue Jun 6 15:57:36 2017 -0500 microblaze: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Michal Simek arch/microblaze/kernel/timer.c | 2 +- arch/microblaze/pci/pci-common.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit ebbe266509d8a5453f51f77277da65d870125b72 Author: Markus Elfring Date: Sun Aug 27 21:38:13 2017 +0200 clocksource/drivers/bcm2835: Remove message for a memory allocation failure The bcm2835_timer_init() function emits an error message in case of a memory allocation failure. This is pointless as the mm core does that already. Remove this message. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Daniel Lezcano drivers/clocksource/bcm2835_timer.c | 1 - 1 file changed, 1 deletion(-) commit 93c5bba575cedbeb50c9e1b0676230139b0d1be1 Author: Paul Burton Date: Sat Aug 12 19:49:27 2017 -0700 MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts There's no reason for us not to use BIT() & GENMASK() in asm/mips-cm.h when declaring macros corresponding to register fields. This patch modifies our definitions to do so. The *_SHF definitions are removed entirely - they duplicate information found in the masks, are infrequently used & can be replaced with use of __ffs() where needed. The *_MSK definitions then lose their _MSK suffix which is now somewhat redundant, and users are modified to match. The field definitions are moved to follow the appropriate register's accessor functions, which helps to keep the field definitions in order & to find the appropriate fields for a given register. Whilst here a comment is added describing each register & including its name, which is helpful both for linking the register back to hardware documentation & for grepping purposes. This also cleans up a couple of issues that became obvious as a result of making the changes described above: - We previously had definitions for GCR_Cx_RESET_EXT_BASE & a phony copy of that named GCR_RESET_EXT_BASE - a register which does not exist. The bad definitions were added by commit 497e803ebf98 ("MIPS: smp-cps: Ensure secondary cores start with EVA disabled") and made use of from boot_core(), which is now modified to use the GCR_Cx_RESET_EXT_BASE definitions. - We had a typo in CM_GCR_ERROR_CAUSE_ERRINGO_MSK - we now correctly define this as inFo rather than inGo. Now that we don't duplicate field information between _SHF & _MSK definitions, and keep the fields next to the register accessors, it will be much easier to spot & prevent any similar oddities being introduced in the future. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner arch/mips/include/asm/mips-cm.h | 311 ++++++++++++++++--------------------- arch/mips/kernel/mips-cm.c | 48 +++--- arch/mips/kernel/mips-cpc.c | 8 +- arch/mips/kernel/pm-cps.c | 4 +- arch/mips/kernel/smp-cps.c | 10 +- arch/mips/kernel/traps.c | 8 +- arch/mips/mm/sc-mips.c | 36 ++--- arch/mips/mti-malta/malta-dtshim.c | 2 +- drivers/irqchip/irq-mips-gic.c | 4 +- 9 files changed, 190 insertions(+), 241 deletions(-) commit b025d51873d5fe6f05f8e94174282cb00ef1f489 Author: Paul Burton Date: Sat Aug 12 19:49:26 2017 -0700 MIPS: CM: Specify register size when generating accessors Some CM registers are always 32 bits, or at least only use bits in the lower 32 bits of the register. For these registers it is wasteful for us to generate accessors which bother to check mips_cm_is64 & perform 64 bit accesses. This patch modifies the accessor generation to take into account the size of the register, and for 32 bit registers we generate accessors which only ever perform 32 bit accesses. For 64 bit registers we either perform a 64 bit access or two 32 bit accesses, depending upon the value of mips_cm_is64. Doing this saves us ~1.5KiB of code in a generic 64r6el kernel, and perhaps more importantly simplifies various code paths. This removes the read64_gcr_* accessors, so mips_cm_error_report() is modified to stop using them & instead use the regular read_gcr_* accessors which will return 64 bit values from the 64 bit registers. The new accessor macros are placed in asm/mips-cps.h such that they can be shared by CPC & GIC code in later patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17000/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 154 ++++++++++++--------------------------- arch/mips/include/asm/mips-cps.h | 87 ++++++++++++++++++++++ arch/mips/kernel/mips-cm.c | 9 +-- 3 files changed, 135 insertions(+), 115 deletions(-) commit abe852ea3ad1c9ada6d053ae8f9eedb9722d0e90 Author: Paul Burton Date: Sat Aug 12 19:49:25 2017 -0700 MIPS: CM: Rename mips_cm_base to mips_gcr_base We currently have a mips_cm_base variable which holds the base address of the Coherence Manager (CM) Global Configuration Registers (GCRs), and accessor functions which use the GCR in their names. This works fine, but gets in the way of sharing the code to generate the accessor functions with other blocks (ie. CPC & GIC) because that code would then need to separately handle the name of the base address variable & the name used in the accessor functions. In order to prepare for sharing the accessor generation code between CM, CPC & GIC code this patch renames mips_cm_base to mips_gcr_base such that the "gcr" portion is common to both the base address variable & the accessor function names. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16999/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 6 +++--- arch/mips/kernel/mips-cm.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit 454854ace22f5a9fdd369a4e428493159a02f029 Author: Aleksandar Markovic Date: Mon Aug 21 14:24:52 2017 +0200 MIPS: math-emu: Add FP emu debugfs stats for individual instructions Add FP emulation debugfs statistics for individual instructions. The debugfs files that contain counter values are placed in a separate directory called "instructions". This means that the default path for these new stat is "/sys/kernel/debug/mips/fpuemustats/instructions". Each instruction counter is mapped to the debugfs file that has the same name as instruction name. The lowercase is choosen as more commonly used case for instruction names. One example of usage: mips_host::/sys/kernel/debug/mips/fpuemustats/instructions # grep "" * The shortened output of this command is: abs.d:34 abs.s:5711 add.d:10401 add.s:399307 bc1eqz:3199 ... ... ... sub.s:167211 trunc.l.d:375 trunc.l.s:8054 trunc.w.d:421 trunc.w.s:27032 The limitation of this patch is that it handles R6 FP emulation instructions only. There are altogether 114 handled instructions. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17145/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu_emulator.h | 115 ++++++++++++++ arch/mips/math-emu/cp1emu.c | 258 ++++++++++++++++++++++++++++++++ arch/mips/math-emu/me-debugfs.c | 281 ++++++++++++++++++++++++++++++++++- 3 files changed, 650 insertions(+), 4 deletions(-) commit 25ad8db632ec54c60daad9107ddf25a2a608a450 Author: Aleksandar Markovic Date: Mon Aug 21 14:24:51 2017 +0200 MIPS: math-emu: Add FP emu debugfs clear functionality Add capability for the user to clear all FP emu debugfs counters. This is achieved by having a special debugfs file "fpuemustats_clear" (under default location "/sys/kernel/debug/mips"). Each access to the file results in setting all counters to zero (it is enough, let's say, to issue a "cat /sys/kernel/debug/mips/fpuemustats_clear"). This functionality already exists for R2 emulation statistics, but was missing for FP emulation statistics. The implementation in this patch is consistent with its R2 emulation counterpart. 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 Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17144/ Signed-off-by: Ralf Baechle arch/mips/math-emu/me-debugfs.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit ae5f3f5b81dd2c776f0ad49d6d121ce1255b35eb Author: Aleksandar Markovic Date: Mon Aug 21 14:24:50 2017 +0200 MIPS: math-emu: Add FP emu debugfs statistics for branches Add FP emu debugfs counter for branches. The new counter is displayed the same way as existing counter, and its default path is /sys/kernel/debug/mips/fpuemustats/. The limitation of this counter is that it counts only R6 branch instructions BC1NEZ and BC1EQZ. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17143/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu_emulator.h | 1 + arch/mips/math-emu/cp1emu.c | 1 + arch/mips/math-emu/me-debugfs.c | 1 + 3 files changed, 3 insertions(+) commit e1231dd6b1cfbed9dfda5de488ce23c2414e1f04 Author: Aleksandar Markovic Date: Mon Aug 21 14:24:49 2017 +0200 MIPS: math-emu: CLASS.D: Zero bits 32-63 of the result Fix content of CLASS.D output bits 32-63 to match hardware behavior. Prior to this patch, bits 32-63 of CLASS.D output were not initialized, causing different 32-63 bits content of CLASS.D, based on circumstances. However, the hardware consistently returns all these bits zeroed. The documentation is not clear whether these bits should be zero or unpredictable. Since technically "all zero" case still can be viewed as belonging to "unpredictable" class of results, it is better to zero bits 32-63. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17142/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ec404d88cefbe42d96a46f20f554f8366d64c33 Author: Aleksandar Markovic Date: Mon Aug 21 14:24:48 2017 +0200 MIPS: math-emu: RINT.: Fix several problems by reimplementation Reimplement RINT. kernel emulation so that all RINT. specifications are met. For the sake of simplicity, let's analyze RINT.S only. Prior to this patch, RINT.S emulation was essentially implemented as (in pseudocode) = ieee754sp_flong(ieee754sp_tlong()), where ieee754sp_tlong() and ieee754sp_flong() are functions providing conversion from double to integer, and from integer to double, respectively. On surface, this implementation looks correct, but actually fails in many cases. Following problems were detected: 1. NaN and infinity cases will not be handled properly. The function ieee754sp_flong() never returns NaN nor infinity. 2. For RINT.S, for all inputs larger than LONG_MAX, and smaller than FLT_MAX, the result will be wrong, and the overflow exception will be erroneously set. A similar problem for negative inputs exists as well. 3. For some rounding modes, for some negative inputs close to zero, the return value will be zero, and should be -zero. This is because ieee754sp_flong() never returns -zero. This patch removes the problems above by implementing dedicated functions for RINT. emulation. The core of the new function functionality is adapted version of the core of the function ieee754sp_tlong(). However, there are many details that are implemented to match RINT. specification. It should be said that the functionality of ieee754sp_tlong() actually closely corresponds to CVT.L.S instruction, and it is used while emulating CVT.L.S. However, RINT.S and CVT.L.S instructions differ in many aspects. This patch fulfills missing support for RINT.. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: David S. Miller Cc: Douglas Leung Cc: Greg Kroah-Hartman Cc: Hans Verkuil Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Mauro Carvalho Chehab Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: Randy Dunlap Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17141/ Signed-off-by: Ralf Baechle MAINTAINERS | 7 ++++ arch/mips/math-emu/Makefile | 6 ++- arch/mips/math-emu/cp1emu.c | 6 +-- arch/mips/math-emu/dp_rint.c | 89 +++++++++++++++++++++++++++++++++++++++++++ arch/mips/math-emu/ieee754.h | 2 + arch/mips/math-emu/sp_rint.c | 90 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 194 insertions(+), 6 deletions(-) commit 1ff8560ac9db1cbffcd700b70e1661f2fcc2e5d7 Author: Aleksandar Markovic Date: Mon Aug 21 14:24:47 2017 +0200 MIPS: math-emu: CMP.Sxxx.: Prevent occurrences of SIGILL crashes Fix CMP.Sxxx. SIGILL crashes by fixing main switch/case statement in fpu_emul() function so that inadvertent fall-troughs are prevented. Consider, let's say, CMP.SAF.S instruction when one of inputs is zero and another input is a signaling NaN. The desired output is zero, and the exception flag "invalid operation" set. For such case, the main portion of the implementation is within "d_fmt" case of the main "switch/case" statement in fpu_emul() function. The execution will follow one of "if-else" branches that doesn't contain "goto cop1scr;" statement, and will therefore reach the end of "d_fmt" case. It will subsequently fall through to the next case, "l_fmt". After following similar pattern, the execution will fall through to the succeeding case, which is "default". The "default" case contains "return SIGILL;" statement only. This means that the caller application will crash with "illegal instruction" message. It is obvious that above described fall-throughs are unnecessary and harmful. This patch rectifies that behavior by providing "break;" statements at the end of cases "d_fmt" and "l_fmt". There are 22 instructions affected by this problem: CMP... Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17140/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 3 +++ 1 file changed, 3 insertions(+) commit 2cfa58259f4b65b33ebe8f167019a1f89c6c3289 Author: Douglas Leung Date: Thu Jul 27 18:08:59 2017 +0200 MIPS: math-emu: .D: Fix accuracy (64-bit case) Implement fused multiply-add with correct accuracy. Fused multiply-add operation has better accuracy than respective sequential execution of multiply and add operations applied on the same inputs. This is because accuracy errors accumulate in latter case. This patch implements fused multiply-add with the same accuracy as it is implemented in hardware, using 128-bit intermediate calculations. One test case example (raw bits) that this patch fixes: MADDF.D fd,fs,ft: fd = 0x00000ca000000000 fs = ft = 0x3f40624dd2f1a9fc 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") Signed-off-by: Douglas Leung Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: Bo Hu Cc: James Hogan Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16891/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 133 +++++++++++++++++++++++++++++------------- 1 file changed, 94 insertions(+), 39 deletions(-) commit b3b8e1eb27c523e32b6a8aa7ec8ac4754456af57 Author: Douglas Leung Date: Thu Jul 27 18:08:58 2017 +0200 MIPS: math-emu: .S: Fix accuracy (32-bit case) Implement fused multiply-add with correct accuracy. Fused multiply-add operation has better accuracy than respective sequential execution of multiply and add operations applied on the same inputs. This is because accuracy errors accumulate in latter case. This patch implements fused multiply-add with the same accuracy as it is implemented in hardware, using 64-bit intermediate calculations. One test case example (raw bits) that this patch fixes: MADDF.S fd,fs,ft: fd = 0x22575225 fs = ft = 0x3727c5ac 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") Signed-off-by: Douglas Leung Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: Bo Hu Cc: James Hogan Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16890/ Signed-off-by: Ralf Baechle arch/mips/math-emu/ieee754sp.h | 4 ++ arch/mips/math-emu/sp_maddf.c | 116 ++++++++++++++++------------------------- 2 files changed, 50 insertions(+), 70 deletions(-) commit ae11c0619973ffd73a496308d8a1cb5e1a353737 Author: Aleksandar Markovic Date: Thu Jul 27 18:08:57 2017 +0200 MIPS: math-emu: .: Clean up "maddf_flags" enumeration Fix definition and usage of "maddf_flags" enumeration. Avoid duplicate definition and apply more common capitalization. This patch does not change any scenario. It just makes MADDF and MSUBF emulation code more readable and easier to maintain, and hopefully prevents future bugs as well. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16889/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 19 ++++++++----------- arch/mips/math-emu/ieee754int.h | 4 ++++ arch/mips/math-emu/sp_maddf.c | 19 ++++++++----------- 3 files changed, 20 insertions(+), 22 deletions(-) commit 7cf64ce4d37f1b4f44365fcf77f565d523819dcd Author: Aleksandar Markovic Date: Thu Jul 27 18:08:56 2017 +0200 MIPS: math-emu: .: Fix some cases of zero inputs Fix the cases of . when any of two multiplicands is +0 or -0, and the third input is also +0 or -0. Depending on the signs of inputs, certain special cases must be handled. A relevant example: MADDF.S fd,fs,ft: If fs contains +0.0, ft contains -0.0, and fd contains 0.0, fd is going to contain +0.0 (without this patch, it used to contain -0.0). 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") Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16888/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 18 +++++++++++++++++- arch/mips/math-emu/sp_maddf.c | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) commit 0c64fe6348687f0e1cea9a608eae9d351124a73a Author: Aleksandar Markovic Date: Thu Jul 27 18:08:55 2017 +0200 MIPS: math-emu: .: Fix some cases of infinite inputs Fix the cases of . when any of two multiplicands is infinity. The correct behavior in such cases is affected by the nature of third input. Cases of addition of infinities with opposite signs and subtraction of infinities with same signs may arise and must be handles separately. Also, the value od flags argument (that determines whether the instruction is MADDF or MSUBF) affects the outcome. Relevant examples: MADDF.S fd,fs,ft: If fs contains +inf, ft contains +inf, and fd contains -inf, fd is going to contain indef (without this patch, it used to contain -inf). MSUBF.S fd,fs,ft: If fs contains +inf, ft contains 1.0, and fd contains +0.0, fd is going to contain -inf (without this patch, it used to contain +inf). 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") Signed-off-by: Douglas Leung Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Douglas Leung Cc: Bo Hu Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16887/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 22 +++++++++++++++++++++- arch/mips/math-emu/sp_maddf.c | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) commit e840be6e7057757befc3581e1699e30fe7f0dd51 Author: Aleksandar Markovic Date: Thu Jul 27 18:08:54 2017 +0200 MIPS: math-emu: .: Fix NaN propagation Fix the cases of . when any of three inputs is any NaN. Correct behavior of . fd, fs, ft is following: - if any of inputs is sNaN, return a sNaN using following rules: if only one input is sNaN, return that one; if more than one input is sNaN, order of precedence for return value is fd, fs, ft - if no input is sNaN, but at least one of inputs is qNaN, return a qNaN using following rules: if only one input is qNaN, return that one; if more than one input is qNaN, order of precedence for return value is fd, fs, ft The previous code contained correct handling of some above cases, but not all. Also, such handling was scattered into various cases of "switch (CLPAIR(xc, yc))" statement, and elsewhere. With this patch, this logic is placed in one place, and "switch (CLPAIR(xc, yc))" is significantly simplified. A relevant example: MADDF.S fd,fs,ft: If fs contains qNaN1, ft contains qNaN2, and fd contains qNaN3, fd is going to contain qNaN3 (without this patch, it used to contain qNaN1). 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") Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.7+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16886/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 66 +++++++++++++------------------------------ arch/mips/math-emu/sp_maddf.c | 66 ++++++++++++++----------------------------- 2 files changed, 41 insertions(+), 91 deletions(-) commit 304bfe473e70523e591fb1c9223289d355e0bdcb Author: Aleksandar Markovic Date: Thu Jul 27 18:08:53 2017 +0200 MIPS: math-emu: MINA.: Fix some cases of infinity and zero inputs Fix following special cases for MINA>.: - if one of the inputs is zero, and the other is subnormal, normal, or infinity, the value of the former should be returned (that is, a zero). - if one of the inputs is infinity, and the other input is normal, or subnormal, the value of the latter should be returned. The previous implementation's logic for such cases was incorrect - it appears as if it implements MAXA, and not MINA instruction. A relevant example: MINA.S fd,fs,ft: If fs contains 100.0, and ft contains 0.0, fd is going to contain 0.0 (without this patch, it used to contain 100.0). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16885/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmin.c | 4 ++-- arch/mips/math-emu/sp_fmin.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3444c4eb534c20e44f0d6670b34263efaf8b531f Author: Aleksandar Markovic Date: Thu Jul 27 18:08:52 2017 +0200 MIPS: math-emu: .: Fix cases of both infinite inputs Fix the value returned by . fd,fs,ft, if both inputs are infinite. The previous implementation returned always the value contained in ft in such cases. The correct behavior is specified in Mips instruction set manual and is as follows: fs ft MAXA MINA --------------------------------- inf inf inf inf inf -inf inf -inf -inf inf inf -inf -inf -inf -inf -inf A relevant example: MAXA.S fd,fs,ft: If fs contains +inf, and ft contains -inf, fd is going to contain +inf (without this patch, it used to contain -inf). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16884/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmax.c | 4 +++- arch/mips/math-emu/dp_fmin.c | 4 +++- arch/mips/math-emu/sp_fmax.c | 4 +++- arch/mips/math-emu/sp_fmin.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) commit 1a41b3b441508ae63b1a9ec699ec94065739eb60 Author: Aleksandar Markovic Date: Thu Jul 27 18:08:51 2017 +0200 MIPS: math-emu: .: Fix cases of input values with opposite signs Fix the value returned by ., if the inputs are normal fp numbers of the same absolute value, but opposite signs. A relevant example: MAXA.S fd,fs,ft: If fs contains -3.0, and ft contains +3.0, fd is going to contain +3.0 (without this patch, it used to contain -3.0). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16883/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmax.c | 8 ++++++-- arch/mips/math-emu/dp_fmin.c | 6 +++++- arch/mips/math-emu/sp_fmax.c | 8 ++++++-- arch/mips/math-emu/sp_fmin.c | 6 +++++- 4 files changed, 22 insertions(+), 6 deletions(-) commit aabf5cf02e22ebc4e541adf835910f388b6c3e65 Author: Aleksandar Markovic Date: Thu Jul 27 18:08:50 2017 +0200 MIPS: math-emu: .: Fix cases of both inputs negative Fix the value returned by ., if both inputs are negative normal fp numbers. The previous logic did not take into account that if both inputs have the same sign, there should be separate treatment of the cases when both inputs are negative and when both inputs are positive. A relevant example: MAX.S fd,fs,ft: If fs contains -5.0, and ft contains -7.0, fd is going to contain -5.0 (without this patch, it used to contain -7.0). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16882/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmax.c | 32 ++++++++++++++++++++++++-------- arch/mips/math-emu/dp_fmin.c | 32 ++++++++++++++++++++++++-------- arch/mips/math-emu/sp_fmax.c | 32 ++++++++++++++++++++++++-------- arch/mips/math-emu/sp_fmin.c | 32 ++++++++++++++++++++++++-------- 4 files changed, 96 insertions(+), 32 deletions(-) commit 15560a58bfd4ff82cdd16b2270d4ef9b06d2cc4d Author: Aleksandar Markovic Date: Thu Jul 27 18:08:49 2017 +0200 MIPS: math-emu: .: Fix cases of both inputs zero Fix the value returned by ., if both inputs are zeros. The right behavior in such cases is stated in instruction reference manual and is as follows: fs ft MAX MIN MAXA MINA --------------------------------------------- 0 0 0 0 0 0 0 -0 0 -0 0 -0 -0 0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 Prior to this patch, some of the above cases were yielding correct results. However, for the sake of code consistency, all such cases are rewritten in this patch. A relevant example: MAX.S fd,fs,ft: If fs contains +0.0, and ft contains -0.0, fd is going to contain +0.0 (without this patch, it used to contain -0.0). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16881/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmax.c | 8 ++------ arch/mips/math-emu/dp_fmin.c | 8 ++------ arch/mips/math-emu/sp_fmax.c | 8 ++------ arch/mips/math-emu/sp_fmin.c | 8 ++------ 4 files changed, 8 insertions(+), 24 deletions(-) commit e78bf0dc4789bdea1453595ae89e8db65918e22e Author: Aleksandar Markovic Date: Thu Jul 27 18:08:48 2017 +0200 MIPS: math-emu: .: Fix quiet NaN propagation Fix the value returned by . fd,fs,ft, if both inputs are quiet NaNs. The . specifications state that the returned value in such cases should be the quiet NaN contained in register fs. A relevant example: MAX.S fd,fs,ft: If fs contains qNaN1, and ft contains qNaN2, fd is going to contain qNaN1 (without this patch, it used to contain qNaN2). 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: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Bo Hu Cc: Douglas Leung Cc: Jin Qian Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: # 4.3+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16880/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_fmax.c | 32 ++++++++++++++++++++++++++++---- arch/mips/math-emu/dp_fmin.c | 32 ++++++++++++++++++++++++++++---- arch/mips/math-emu/sp_fmax.c | 32 ++++++++++++++++++++++++++++---- arch/mips/math-emu/sp_fmin.c | 32 ++++++++++++++++++++++++++++---- 4 files changed, 112 insertions(+), 16 deletions(-) commit b7fc2cc59aa5f49ecd1eae4f90ec229a7e52c47c Author: Paul Burton Date: Wed Aug 23 11:17:54 2017 -0700 MIPS: Declare various variables & functions static We currently have various variables & functions which are only used within a single translation unit, but which we don't declare static. This causes various sparse warnings of the form: arch/mips/kernel/mips-r2-to-r6-emul.c:49:1: warning: symbol 'mipsr2emustats' was not declared. Should it be static? arch/mips/kernel/unaligned.c:1381:11: warning: symbol 'reg16to32st' was not declared. Should it be static? arch/mips/mm/mmap.c:146:15: warning: symbol 'arch_mmap_rnd' was not declared. Should it be static? Fix these & others by declaring various affected variables & functions static, avoiding the sparse warnings & redundant symbols. [ralf@linux-mips.org: Add Marcin's build fix.] Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17176/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-probe.c | 2 +- arch/mips/kernel/mips-r2-to-r6-emul.c | 8 +++++--- arch/mips/kernel/pm-cps.c | 2 +- arch/mips/kernel/unaligned.c | 2 +- arch/mips/mm/dma-default.c | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) commit 7d630e83fcc14a6d9154d345a542ed3fbacdf5c5 Author: Paul Burton Date: Wed Aug 23 11:17:53 2017 -0700 MIPS: Remove plat_timer_setup() The plat_timer_setup() function is entirely unused - nothing calls it, and no platforms provide it. Perhaps our dummy implementation was once useful as an aid in forward porting platforms, but its time has long since passed so let's remove the dead code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17175/ Signed-off-by: Ralf Baechle arch/mips/kernel/time.c | 14 -------------- 1 file changed, 14 deletions(-) commit fbdce1daea22a2753ca85b1e44414aee3d91a1fe Author: Paul Burton Date: Wed Aug 23 11:17:52 2017 -0700 MIPS: Remove __invalidate_kernel_vmap_range The __invalidate_kernel_vmap_range function pointer global variable isn't used anywhere. Remove it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17174/ Signed-off-by: Ralf Baechle arch/mips/mm/cache.c | 1 - 1 file changed, 1 deletion(-) commit 445a58ce34ae59cd098f2f2a27275df40487716a Author: Paul Burton Date: Wed Aug 23 11:17:51 2017 -0700 MIPS: math-emu: Correct user fault_addr type The fault_addr argument to fpu_emulator_cop1Handler(), fpux_emu() and cop1Emulate() has up until now been declared as: void *__user *fault_addr This is essentially a pointer in user memory which points to a pointer to void. This is not the intent for our code, which is actually operating on a pointer to a pointer to void where the pointer to void is pointing at user memory. ie. the pointer is in kernel memory & points to user memory. This mismatch produces a lot of sparse warnings that look like this: arch/mips/math-emu/cp1emu.c:1485:45: warning: incorrect type in assignment (different address spaces) expected void *[noderef] got unsigned int [noderef] [usertype] *[assigned] va Fix these by modifying the declaration of the fault_addr argument to: void __user **fault_addr Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17173/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu_emulator.h | 2 +- arch/mips/math-emu/cp1emu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 2aa7687c3cf2764a5dffcd214c18cc9b1cf2be1d Author: Paul Burton Date: Wed Aug 23 11:17:50 2017 -0700 MIPS: Include linux/initrd.h for free_initrd_mem() arch/mips/mm/init.c provides our implementation of free_initrd_mem(), but doesn't include the linux/initrd.h header which declares them. This leads to a warning from sparse: arch/mips/mm/init.c:501:6: warning: symbol 'free_initrd_mem' was not declared. Should it be static? Fix this by including linux/initrd.h to get the declaration of free_initrd_mem(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17172/ Signed-off-by: Ralf Baechle arch/mips/mm/init.c | 1 + 1 file changed, 1 insertion(+) commit db3fb45ab38dde10bf0a728a45530f22ef8ce41c Author: Paul Burton Date: Wed Aug 23 11:17:49 2017 -0700 MIPS: Include elf-randomize.h for arch_mmap_rnd() & arch_randomize_brk() arch/mips/mm/mmap.c provides our implementations of the arch_mmap_rnd() & arch_randomize_brk() functions, but doesn't include the linux/elf-randomize.h header which declares them. This leads to warnings from sparse: arch/mips/mm/mmap.c:146:15: warning: symbol 'arch_mmap_rnd' was not declared. Should it be static? arch/mips/mm/mmap.c:190:15: warning: symbol 'arch_randomize_brk' was not declared. Should it be static? Fix this by including linux/elf-randomize.h to get the declarations of arch_mmap_rnd() & arch_randomize_brk(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17171/ Signed-off-by: Ralf Baechle arch/mips/mm/mmap.c | 1 + 1 file changed, 1 insertion(+) commit c2c09742171c785292c3680f6723c8df996fc713 Author: Paul Burton Date: Wed Aug 23 11:17:48 2017 -0700 MIPS: Include asm/delay.h for __{,n,u}delay() arch/mips/lib/delay.c provides our implementations of the __delay(), __ndelay() & __udelay() functions, but doesn't include the asm/delay.h header which declares them. This leads to warnings from sparse: arch/mips/lib/delay.c:26:6: warning: symbol '__delay' was not declared. Should it be static? arch/mips/lib/delay.c:50:6: warning: symbol '__udelay' was not declared. Should it be static? arch/mips/lib/delay.c:58:6: warning: symbol '__ndelay' was not declared. Should it be static? To keep checkpatch happy was well, include rather than directly to get the declarations of __delay(), __ndelay() & __udelay(). [ralf@linux-mips.org: Fixed to include Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17170/ Signed-off-by: Ralf Baechle arch/mips/lib/delay.c | 1 + 1 file changed, 1 insertion(+) commit 91955e3ef5a247fa96908822d4021072106edca8 Author: Paul Burton Date: Wed Aug 23 11:17:47 2017 -0700 MIPS: Include linux/cpu.h for arch_cpu_idle() arch/mips/kernel/idle.c provides our implementation of the arch_cpu_idle() function, but doesn't include the linux/cpu.h header which declares it. This leads to a warning from sparse: arch/mips/kernel/idle.c:256:6: warning: symbol 'arch_cpu_idle' was not declared. Should it be static? Fix this by including linux/cpu.h to get the declaration of arch_cpu_idle(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17169/ Signed-off-by: Ralf Baechle arch/mips/kernel/idle.c | 1 + 1 file changed, 1 insertion(+) commit 699394246968150cdcbd10749538bd67b50c5326 Author: Paul Burton Date: Wed Aug 23 11:17:46 2017 -0700 MIPS: Include asm/setup.h for cpu_cache_init() arch/mips/mm/cache.c provides our implementation of the cpu_cache_init() function, but doesn't include the asm/setup.h header which declares it. This leads to a warning from sparse: arch/mips/mm/cache.c:274:6: warning: symbol 'cpu_cache_init' was not declared. Should it be static? Fix this by including asm/setup.h to get the declaration of cpu_cache_init(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17168/ Signed-off-by: Ralf Baechle arch/mips/mm/cache.c | 1 + 1 file changed, 1 insertion(+) commit 2904cdba3e621d4ca0effe61720a04ed9d272c07 Author: Paul Burton Date: Wed Aug 23 11:17:45 2017 -0700 MIPS: generic: Include asm/time.h for get_c0_*_int() arch/mips/generic/irq.c provides implementations of the get_c0_compare_int() & get_c0_perfcount_int() functions, but doesn't include the asm/time.h header which declares them. This leads to warnings from sparse: arch/mips/generic/irq.c:36:5: warning: symbol 'get_c0_perfcount_int' was not declared. Should it be static? arch/mips/generic/irq.c:52:14: warning: symbol 'get_c0_compare_int' was not declared. Should it be static? Fix this by including asm/time.h to get the declarations of get_c0_compare_int() & get_c0_perfcount_int(). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17167/ Signed-off-by: Ralf Baechle arch/mips/generic/irq.c | 1 + 1 file changed, 1 insertion(+) commit b47e9c62f2312066df5719cfc3a6104bf854071a Author: Paul Burton Date: Wed Aug 23 11:17:44 2017 -0700 MIPS: generic: Include asm/bootinfo.h for plat_fdt_relocated() arch/mips/generic/init.c provides an implementation of the plat_fdt_relocated() function, but doesn't include the asm/bootinfo.h header which declares it. This leads to a warning from sparse: arch/mips/generic/init.c:94:13: warning: symbol 'plat_fdt_relocated' was not declared. Should it be static? Fix this by including asm/bootinfo.h to get the declaration of plat_fdt_relocated(). We also #ifdef our definition of plat_fdt_relocated() such that it is only provided when CONFIG_RELOCATABLE is set, matching the header & avoiding the redundant function for non-relocatable kernels. Signed-off-by: Paul Burton Cc: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17166/ Signed-off-by: Ralf Baechle arch/mips/generic/init.c | 5 +++++ 1 file changed, 5 insertions(+) commit c59435a617a7c442d5253e42c351135672417803 Author: Christoph Hellwig Date: Fri Aug 25 17:07:12 2017 +0200 MIPS: Consolidate coherent and non-coherent dma_alloc code Besides eliminating lots of duplication this also allows allocations with the DMA_ATTR_NON_CONSISTENT to use the CMA allocator. Signed-off-by: Christoph Hellwig Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17181/ Signed-off-by: Ralf Baechle arch/mips/mm/dma-default.c | 42 +++--------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) commit 077b14e1a9b79d7b940de0a39fa3ad155d5e3399 Author: Harvey Hunt Date: Mon Aug 21 11:55:31 2017 +0100 MIPS: configs: Add Onion Omega2+ defconfig Create a defconfig for the Omega2+ that reaches userspace and allows use of the USB port. Signed-off-by: Harvey Hunt Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17138/ Signed-off-by: Ralf Baechle arch/mips/configs/omega2p_defconfig | 129 ++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) commit 323ac96d6dc396802c16d4fc44d0f65c02399e61 Author: Harvey Hunt Date: Mon Aug 21 11:55:30 2017 +0100 MIPS: Add Onion Omega2+ board The Onion Omega2+ is an MT7688A based board that has 128MB RAM and multiple peripherals. The MT7688A is pin compatible with the MT7628A, although the former supports a 1T1R antenna whereas the MT7628A supports a 2R2T antenna. Signed-off-by: Harvey Hunt Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17137/ Signed-off-by: Ralf Baechle MAINTAINERS | 6 ++++++ arch/mips/boot/dts/ralink/Makefile | 1 + arch/mips/boot/dts/ralink/omega2p.dts | 18 ++++++++++++++++++ arch/mips/ralink/Kconfig | 5 +++++ 4 files changed, 30 insertions(+) commit df8d6c357d9ac01d909f96da3e4df6fc2e94ad21 Author: Harvey Hunt Date: Mon Aug 21 11:54:47 2017 +0100 MIPS: configs: Add VoCore2 defconfig Enabled supported drivers, including: - USB PHY - EHCI - UART Signed-off-by: Harvey Hunt Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17135/ Signed-off-by: Ralf Baechle arch/mips/configs/vocore2_defconfig | 129 ++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) commit d48faef7eded0c9d08f704e1eff78ef9289c1364 Author: Harvey Hunt Date: Mon Aug 21 11:54:46 2017 +0100 MIPS: dts: Add Vocore2 board The VoCore2 board is a low cost MT7628A based board with 128MB RAM, 16MB flash and multiple external peripherals. This initial DTS provides enough support to get to userland and use the USB port. Signed-off-by: Harvey Hunt Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17134/ Signed-off-by: Ralf Baechle MAINTAINERS | 6 ++++++ arch/mips/boot/dts/ralink/Makefile | 1 + arch/mips/boot/dts/ralink/vocore2.dts | 18 ++++++++++++++++++ arch/mips/ralink/Kconfig | 5 +++++ 4 files changed, 30 insertions(+) commit d73d783b95bbbdebf3be65eb7c71a4fae4fb47a5 Author: Harvey Hunt Date: Mon Aug 21 11:54:45 2017 +0100 dt-bindings: vendors: Add VoCore as a vendor VoCore are a manufacturer of devices such as the VoCore2. Signed-off-by: Harvey Hunt Acked-by: Rob Herring Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17132/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 7d4ad2e71d175bf7688e0a9f60e8df12591c9abd Author: Harvey Hunt Date: Mon Aug 21 11:54:44 2017 +0100 MIPS: dts: ralink: Add Mediatek MT7628A SoC The MT7628A is the successor to the MT7620 and pin compatible with the MT7688A, although the latter supports only a 1T1R antenna rather than a 2T2R antenna. This commit adds support for the following features: - UART - USB PHY - EHCI - Interrupt controller - System controller - Memory controller - Reset controller Signed-off-by: Harvey Hunt Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: john@phrozen.org Cc: Harvey Hunt Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/17133/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/mips/ralink.txt | 1 + arch/mips/boot/dts/ralink/mt7628a.dtsi | 126 ++++++++++++++++++++++ 2 files changed, 127 insertions(+) commit cc10815e2fb050c5a69472377d339e94bdc033c5 Author: Manuel Lauss Date: Tue Feb 14 13:03:28 2017 +0100 MIPS: Alchemy: Threaded carddetect irqs for devboards This introduces threaded carddetect irqs for the db1200/db1300 boards. Main benefit is that the broken insertion/ejection interrupt pairs can now be better supported and debounced in software. Signed-off-by: Manuel Lauss Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15287/ Signed-off-by: Ralf Baechle arch/mips/alchemy/devboards/db1200.c | 64 ++++++++++++++++++++---------------- arch/mips/alchemy/devboards/db1300.c | 31 +++++++++-------- drivers/pcmcia/db1xxx_ss.c | 33 +++++++++++-------- 3 files changed, 72 insertions(+), 56 deletions(-) commit 60d5973c3c1c868f012d0b62faa44b7c28d56d33 Author: Manuel Lauss Date: Tue Feb 14 13:03:27 2017 +0100 MIPS: Alchemy: update cpu feature overrides No advanced MIPS features for Alchemy. This patch shaves additional 43kB off the DB1300 kernel (~0.5% size reduction). Signed-off-by: Manuel Lauss Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15286/ Signed-off-by: Ralf Baechle .../asm/mach-au1x00/cpu-feature-overrides.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit c7f78c4ae70bae7f277f585066f4a859a5144739 Author: Manuel Lauss Date: Tue Feb 14 13:03:26 2017 +0100 MIPS: Alchemy: Add devboard machine type to cpuinfo Prints the devboard name in cpuinfo "machine" line. Signed-off-by: Manuel Lauss Cc: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15285/ Signed-off-by: Ralf Baechle arch/mips/alchemy/devboards/db1xxx.c | 2 ++ 1 file changed, 2 insertions(+) commit 8535f2ba0a9b971df62a5890699b9dfe2e0d5580 Author: Manuel Lauss Date: Mon Aug 14 12:21:48 2017 +0200 MIPS: math-emu: do not use bools for arithmetic GCC-7 complains about a boolean value being used with an arithmetic AND: arch/mips/math-emu/cp1emu.c: In function 'cop1Emulate': arch/mips/math-emu/cp1emu.c:838:14: warning: '~' on a boolean expression [-Wbool-operation] fpr = (x) & ~(cop1_64bit(xcp) == 0); \ ^ arch/mips/math-emu/cp1emu.c:1068:3: note: in expansion of macro 'DITOREG' DITOREG(dval, MIPSInst_RT(ir)); ^~~~~~~ arch/mips/math-emu/cp1emu.c:838:14: note: did you mean to use logical not? fpr = (x) & ~(cop1_64bit(xcp) == 0); \ Since cop1_64bit() returns and int, just flip the LSB. Suggested-by: Maciej W. Rozycki Signed-off-by: Manuel Lauss Reviewed-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17058/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fec55391bf2bb1df5594a645a64850c8529dc73 Author: Harvey Hunt Date: Fri Jul 7 17:12:08 2017 +0100 MIPS: dts: Ci20: Add ethernet and fixed-regulator nodes Add devicetree nodes for the DM9000 and the ethernet power regulator. Additionally, add a new pinctrl node for the ethernet chip's pins. Signed-off-by: Harvey Hunt Cc: Zubair Lutfullah Kakakhel Cc: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: Paul Cercueil Cc: Linus Walleij Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16752/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/ingenic/ci20.dts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit c84655822dd6a20f39b93cc966f2ebfee8e1a045 Author: Harvey Hunt Date: Fri Jul 7 17:12:07 2017 +0100 MIPS: Ci20: Enable GPIO driver Update the Ci20's defconfig to enable the JZ4780's GPIO driver. Signed-off-by: Harvey Hunt Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16751/ Signed-off-by: Ralf Baechle arch/mips/configs/ci20_defconfig | 1 + 1 file changed, 1 insertion(+) commit 04a85e087ad6cdcb7d06f10c114b8256fdfac783 Author: Paul Burton Date: Mon Aug 7 15:37:23 2017 -0700 MIPS: generic: Move NI 169445 FIT image source to its own file Move the NI 169445 board flattened image tree source into its own file which is concatenated into the final image tree source used to build the flattened image tree. Separating boards into different files will help us to avoid conflicts as boards are added. Signed-off-by: Paul Burton Cc: Nathan Sullivan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16940/ Signed-off-by: Ralf Baechle arch/mips/generic/Platform | 1 + arch/mips/generic/board-ni169445.its.S | 22 ++++++++++++++++++++++ arch/mips/generic/vmlinux.its.S | 25 ------------------------- 3 files changed, 23 insertions(+), 25 deletions(-) commit 13d1ff2c8580eaa719e41a9bb22a953658e11d1d Author: Paul Burton Date: Mon Aug 7 15:37:22 2017 -0700 MIPS: generic: Move Boston FIT image source to its own file Move the Boston board flattened image tree source into its own file which is concatenated into the final image tree source used to build the flattened image tree. Separating boards into different files will help us to avoid conflicts as boards are added. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16939/ Signed-off-by: Ralf Baechle arch/mips/generic/Platform | 1 + arch/mips/generic/board-boston.its.S | 22 ++++++++++++++++++++++ arch/mips/generic/vmlinux.its.S | 25 ------------------------- 3 files changed, 23 insertions(+), 25 deletions(-) commit 436c6a4452cb610e6293ba3fda2310cf09461fc1 Author: Paul Burton Date: Mon Aug 7 15:37:21 2017 -0700 MIPS: Allow platform to specify multiple its.S files In preparation for splitting arch/mips/generic/vmlinux.its.S into multiple files such that it doesn't become a conflict magnet as boards are added, allow platforms to specify a list of image tree source files which will be concatenated to form the final source used to build the image tree. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16938/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 3 ++- arch/mips/boot/Makefile | 16 +++++++++++----- arch/mips/generic/Platform | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) commit 846fbcfe6ffdcc86720df347e919f0389a69e6a0 Author: Petar Jovanovic Date: Wed Mar 15 18:59:11 2017 +0100 MIPS: Octeon: Expose support for mips32r1, mips32r2 and mips64r1 Define Cavium Octeon as a CPU that has support for mips32r1, mips32r2 and mips64r1. This will affect show_cpuinfo() that will now correctly expose mips32r1, mips32r2 and mips64r1 as supported ISAs. Signed-off-by: Petar Jovanovic Reviewed-by: Maciej W. Rozycki Acked-by: David Daney Cc: petar.jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15749/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b123718b105bb837a0463823404505b04d8f0586 Author: Ralf Baechle Date: Mon Aug 7 21:14:18 2017 +0200 MIPS: signal: Remove unreachable code from force_fcr31_sig(). Based on discussion with Linus remove the impossible to reach code rather than replacing it with a BUG(). Signed-off-by: Ralf Baechle Link: http://lkml.kernel.org/r/20170718140651.15973-4-ebiederm@xmission.com arch/mips/kernel/traps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7aacf86b75bc5523d20fd9127104384fce51ce9c Author: Nathan Sullivan Date: Tue Jul 18 13:29:09 2017 -0500 MIPS: NI 169445 board support Support the National Instruments 169445 board. Signed-off-by: Nathan Sullivan Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16782/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/mips/ni.txt | 7 ++ arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/ni/169445.dts | 100 ++++++++++++++++++++++++ arch/mips/boot/dts/ni/Makefile | 7 ++ arch/mips/configs/generic/board-ni169445.config | 27 +++++++ arch/mips/generic/Kconfig | 6 ++ arch/mips/generic/vmlinux.its.S | 25 ++++++ 7 files changed, 173 insertions(+) commit 0c4037b9dd8b021f6cac0c51edc8873bf10d6567 Author: Philipp Zabel Date: Wed Jul 19 17:25:07 2017 +0200 MIPS: pci-mt7620: 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. Signed-off-by: Philipp Zabel Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16785/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 897c0e77b688f6bb74c387290d78692a122972ee Author: Matt Redfearn Date: Tue Jul 11 16:55:40 2017 +0100 MIPS: pistachio: Enable Root FS on NFS in defconfig When the upstream kernel pistachio_defconfig is built & tested on the ci40 platform the current lack of these options leads to essentially false failures when the RFS fails to mount. Signed-off-by: Matt Redfearn Cc: James Hartley Cc: Ionela Voinescu Cc: James Hartley Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16763/ Signed-off-by: Ralf Baechle arch/mips/configs/pistachio_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 42f1e641aaafeb2c1ac38c2dff24617f08122c1a Author: Dou Liyang Date: Wed Jul 26 21:34:29 2017 +0800 MIPS: NUMA: Remove the unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node(). The parent_node() macros in both IP27 and Loongson64 are unnecessary. Remove it for cleanup. Reported-by: Michael Ellerman Signed-off-by: Dou Liyang Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16873/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ip27/topology.h | 1 - arch/mips/include/asm/mach-loongson64/topology.h | 1 - 2 files changed, 2 deletions(-) commit f922bc0ad08bd897230aa3f3a1ca021854cc0bbb Author: Steven J. Hill Date: Wed Jul 19 14:30:22 2017 -0500 MIPS: Octeon: cavium_octeon_defconfig: Enable more drivers Compile USB driver statically, enable EDAC driver, and remove deprecated options. Signed-off-by: Steven J. Hill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16795/ Signed-off-by: Ralf Baechle arch/mips/configs/cavium_octeon_defconfig | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit df4c87f5a3d81c7c5518ab08f8642e828e00d469 Author: Paul Burton Date: Mon Jun 5 11:21:30 2017 -0700 MIPS: Remove unused ST_OFF from r2300_switch.S Commit 1a3d59579b9f ("MIPS: Tidy up FPU context switching") removed usage of ST_OFF, leaving it behind as dead code. Commit 828d1e4e9865 ("MIPS: Remove dead define of ST_OFF") then removed the definition of ST_OFF from r4k_switch.S as a cleanup. However the unused definition of ST_OFF has been left behind in r2300_switch.S. Remove it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16239/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_switch.S | 6 ------ 1 file changed, 6 deletions(-) commit 423fb0d50890dd48907298e7453faaeb5185b814 Author: Paul Burton Date: Mon Jun 5 11:21:29 2017 -0700 MIPS: Move r2300 FP code from r2300_switch.S to r2300_fpu.S Move _save_fp(), _restore_fp() & _init_fpu() out of r2300_switch.S & into r2300_fpu.S. This logically places all FP-related asm code into r2300_fpu.S & provides consistency with R4K after the preceding commit. Besides cleaning up this will be useful for later patches which disable FP support. [ralf@linux-mips.org: Fixed build issues reported by Arnd Bergmann ] Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16238/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 80 ++++++++++++++++++++++++++++++++++++++++- arch/mips/kernel/r2300_switch.S | 75 -------------------------------------- 2 files changed, 79 insertions(+), 76 deletions(-) commit a2aea699b1dde309f189ab41af41fae2d3345783 Author: Paul Burton Date: Mon Jun 5 11:21:28 2017 -0700 MIPS: Move r4k FP code from r4k_switch.S to r4k_fpu.S Move _save_fp(), _restore_fp(), _save_msa(), _restore_msa(), _init_msa_upper() & _init_fpu() out of r4k_switch.S & into r4k_fpu.S. This allows us to clean up the way in which Octeon includes the default r4k implementations of these FP functions despite replacing resume(), and makes CONFIG_R4K_FPU more straightforwardly represent all configurations that have an R4K-style FPU, including Octeon. Besides cleaning up this will be useful for later patches which disable FP support. [ralf@linux-mips.org: Fixed build issues reported by Arnd Bergmann ] Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16237/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 2 +- arch/mips/kernel/Makefile | 13 ++- arch/mips/kernel/octeon_switch.S | 11 ++- arch/mips/kernel/r4k_fpu.S | 196 +++++++++++++++++++++++++++++++++++++ arch/mips/kernel/r4k_switch.S | 203 --------------------------------------- 5 files changed, 212 insertions(+), 213 deletions(-) commit 3b2db173f01229410129f438d2f261c16a360eef Author: Paul Burton Date: Mon Jun 5 11:21:27 2017 -0700 MIPS: Remove unused R6000 support The kernel contains a small amount of incomplete code aimed at supporting old R6000 CPUs. This is: - Unused, as no machine selects CONFIG_SYS_HAS_CPU_R6000. - Broken, since there are glaring errors such as r6000_fpu.S moving the FCSR register to t1, then ignoring it & instead saving t0 into struct sigcontext... - A maintenance headache, since it's code that nobody can test which nevertheless imposes constraints on code which it shares with other machines. Remove this incomplete & broken R6000 CPU support in order to clean up and in preparation for changes which will no longer need to consider dragging the pretense of R6000 support along with them. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16236/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 17 ++----- arch/mips/Makefile | 1 - arch/mips/include/asm/cpu-type.h | 5 -- arch/mips/include/asm/cpu.h | 5 -- arch/mips/include/asm/module.h | 2 - arch/mips/kernel/Makefile | 1 - arch/mips/kernel/cpu-probe.c | 18 -------- arch/mips/kernel/r6000_fpu.S | 99 ---------------------------------------- arch/mips/kernel/traps.c | 15 ------ arch/mips/mm/tlbex.c | 5 -- 10 files changed, 3 insertions(+), 165 deletions(-) commit 114c370845111d4f2e31f9c6d4eedd9e4fc01f86 Author: Matt Redfearn Date: Tue Feb 14 14:37:06 2017 +0000 MIPS: R6: Constify r2_decoder_tables The r2_decoder_tables are never modified. They are arrays of constant values and as such should be declared const. This change saves 256 bytes of kernel text, and 128 bytes of kernel data (384 bytes total) on a 32r6el_defconfig (with SMP disabled) Before: text data bss dec hex filename 5576221 1080804 267040 6924065 69a721 vmlinux After: text data bss dec hex filename 5575965 1080676 267040 6923681 69a5a1 vmlinux Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15289/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-r2-to-r6-emul.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ff2c8252bfbf069dda1e53353a63b560f1369f59 Author: Matt Redfearn Date: Wed Jul 19 09:21:03 2017 +0100 MIPS: SMP: Constify smp ops smp_ops providers do not modify their ops structures, so they should be made const for robustness. Since currently the MIPS kernel is not mapped with memory protection, this does not in itself provide any security benefit, but it still makes sense to make this change. There are also slight code size efficincies from the structure being made read-only, saving 128 bytes of kernel text on a pistachio_defconfig. Before: text data bss dec hex filename 7187239 1772752 470224 9430215 8fe4c7 vmlinux After: text data bss dec hex filename 7187111 1772752 470224 9430087 8fe447 vmlinux Signed-off-by: Matt Redfearn Cc: Sebastian Andrzej Siewior Cc: Arnd Bergmann Cc: Marcin Nowakowski Cc: Bart Van Assche Cc: Masahiro Yamada Cc: Huacai Chen Cc: Paul Gortmaker Cc: Kevin Cernekee Cc: Thomas Gleixner Cc: Doug Ledford Cc: James Hogan Cc: Joe Perches Cc: Florian Fainelli Cc: Ingo Molnar Cc: Paul Burton Cc: Andrew Morton Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16784/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/smp.c | 6 +++--- arch/mips/fw/arc/init.c | 2 +- arch/mips/include/asm/bmips.h | 4 ++-- arch/mips/include/asm/mach-loongson64/loongson.h | 2 +- arch/mips/include/asm/netlogic/common.h | 2 +- arch/mips/include/asm/smp-ops.h | 12 ++++++------ arch/mips/include/asm/smp.h | 10 +++++----- arch/mips/kernel/smp-bmips.c | 4 ++-- arch/mips/kernel/smp-cmp.c | 2 +- arch/mips/kernel/smp-cps.c | 4 ++-- arch/mips/kernel/smp-mt.c | 2 +- arch/mips/kernel/smp-up.c | 2 +- arch/mips/kernel/smp.c | 4 ++-- arch/mips/loongson64/loongson-3/smp.c | 2 +- arch/mips/netlogic/common/smp.c | 2 +- arch/mips/paravirt/paravirt-smp.c | 2 +- arch/mips/paravirt/setup.c | 2 +- arch/mips/sgi-ip27/ip27-smp.c | 2 +- arch/mips/sibyte/bcm1480/smp.c | 2 +- arch/mips/sibyte/common/cfe.c | 4 ++-- arch/mips/sibyte/sb1250/smp.c | 2 +- 21 files changed, 37 insertions(+), 37 deletions(-) commit b879c801b38318d4c8fb13069d7aea0ffca49c59 Author: Krzysztof Kozlowski Date: Mon Jul 17 07:45:38 2017 +0200 MIPS: defconfig: Cleanup from non-existing options Remove options which do not exist anymore: - CPU_FREQ_DEBUG is gone since commit 2d06d8c49afd ("[CPUFREQ] use dynamic debug instead of custom infrastructure"). - ECONET is gone since commit 349f29d841db ("econet: remove ancient bug ridden protocol"); - IPDDP_DECAP is gone since commit 9b5645b51384 ("appletalk: remove "config IPDDP_DECAP""); Signed-off-by: Krzysztof Kozlowski Cc: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16770/ Signed-off-by: Ralf Baechle arch/mips/configs/gpr_defconfig | 4 ---- arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/mtx1_defconfig | 4 ---- arch/mips/configs/nlm_xlp_defconfig | 1 - arch/mips/configs/nlm_xlr_defconfig | 4 ---- 5 files changed, 14 deletions(-) commit 7f27b5b8ed1f77427811d13788fbdb2f53ce94a4 Author: Rob Herring Date: Tue Jul 18 16:42:45 2017 -0500 MIPS: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16783/ Signed-off-by: Ralf Baechle arch/mips/ath79/clock.c | 9 ++++----- arch/mips/pci/pci-legacy.c | 2 +- arch/mips/pci/pci-rt3883.c | 11 +++++------ 3 files changed, 10 insertions(+), 12 deletions(-) commit 1bab1c02aff73eb5c3001e97f48e64ab6a80988a Author: Claudio Imbrenda Date: Mon Aug 29 15:56:55 2016 +0200 KVM: s390: expose no-DAT to guest and migration support The STFLE bit 147 indicates whether the ESSA no-DAT operation code is valid, the bit is not normally provided to the host; the host is instead provided with an SCLP bit that indicates whether guests can support the feature. This patch: * enables the STFLE bit in the guest if the corresponding SCLP bit is present in the host. * adds support for migrating the no-DAT bit in the PGSTEs * fixes the software interpretation of the ESSA instruction that is used when migrating, both for the new operation code and for the old "set stable", as per specifications. Signed-off-by: Claudio Imbrenda Reviewed-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/include/asm/page-states.h | 2 +- arch/s390/kvm/kvm-s390.c | 8 ++++++-- arch/s390/kvm/priv.c | 6 +++++- arch/s390/mm/pgtable.c | 6 +++++- 4 files changed, 17 insertions(+), 5 deletions(-) commit 631aebfee8261d66597ce0f88ba046c77a0e415e Author: Heiko Carstens Date: Thu Aug 3 13:05:40 2017 +0200 KVM: s390: sthyi: remove invalid guest write access handle_sthyi() always writes to guest memory if the sthyi function code is zero in order to fault in the page that later is written to. However a function code of zero does not necessarily mean that a write to guest memory happens: if the KVM host is running as a second level guest under z/VM 6.2 the sthyi instruction is indicated to be available to the KVM host, however if the instruction is executed it will always return with a return code that indicates "unsupported function code". In such a case handle_sthyi() must not write to guest memory. This means that the prior write access to fault in the guest page may result in invalid guest exceptions, and/or invalid data modification. In order to be architecture compliant simply remove the write_guest() call. Given that the guest assumed a write access anyway, this fix does not qualify for -stable. This just makes sure the sthyi handler is architecture compliant. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Reviewed-by: Janosch Frank Signed-off-by: Heiko Carstens Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/sthyi.c | 8 -------- 1 file changed, 8 deletions(-) commit 8fa1696ea78162ca3112a26879d9379483443c85 Author: Collin L. Walling Date: Tue Jul 26 15:29:44 2016 -0400 KVM: s390: Multiple Epoch Facility support Allow for the enablement of MEF and the support for the extended epoch in SIE and VSIE for the extended guest TOD-Clock. A new interface is used for getting/setting a guest's extended TOD-Clock that uses a single ioctl invocation, KVM_S390_VM_TOD_EXT. Since the host time is a moving target that might see an epoch switch or STP sync checks we need an atomic ioctl and cannot use the exisiting two interfaces. The old method of getting and setting the guest TOD-Clock is still retained and is used when the old ioctls are called. Signed-off-by: Collin L. Walling Reviewed-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Jason J. Herne Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/vm.txt | 14 ++++- arch/s390/include/asm/kvm_host.h | 6 +- arch/s390/include/uapi/asm/kvm.h | 6 ++ arch/s390/kvm/kvm-s390.c | 101 +++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 2 + arch/s390/kvm/vsie.c | 10 +++ arch/s390/tools/gen_facilities.c | 1 + 7 files changed, 138 insertions(+), 2 deletions(-) commit d82fed75294229abc9d757f08a4817febae6c4f4 Author: Peter Zijlstra Date: Mon Aug 28 14:42:45 2017 +0200 locking/lockdep/selftests: Fix mixed read-write ABBA tests Commit: e91498589746 ("locking/lockdep/selftests: Add mixed read-write ABBA tests") adds an explicit FAILURE to the locking selftest but overlooked the fact that this kills lockdep. Fudge the test to avoid this. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/20170828124245.xlo2yshxq2btgmuf@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar lib/locking-selftest.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ec81048cc340bb03334e6ca62661ecc0a684897a Author: Boqun Feng Date: Wed Aug 23 23:25:38 2017 +0800 sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK() In theory, COMPLETION_INITIALIZER_ONSTACK() should never affect the stack allocation of the caller. However, on some compilers, a temporary structure was allocated for the return value of COMPLETION_INITIALIZER_ONSTACK(). For example in write_journal() with LOCKDEP_COMPLETIONS=y (GCC is 7.1.1): io_comp.comp = COMPLETION_INITIALIZER_ONSTACK(io_comp.comp); 2462: e8 00 00 00 00 callq 2467 2467: 48 8d 85 80 fd ff ff lea -0x280(%rbp),%rax 246e: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 2475: 48 c7 c2 00 00 00 00 mov $0x0,%rdx x->done = 0; 247c: c7 85 90 fd ff ff 00 movl $0x0,-0x270(%rbp) 2483: 00 00 00 init_waitqueue_head(&x->wait); 2486: 48 8d 78 18 lea 0x18(%rax),%rdi 248a: e8 00 00 00 00 callq 248f if (commit_start + commit_sections <= ic->journal_sections) { 248f: 41 8b 87 a8 00 00 00 mov 0xa8(%r15),%eax io_comp.comp = COMPLETION_INITIALIZER_ONSTACK(io_comp.comp); 2496: 48 8d bd e8 f9 ff ff lea -0x618(%rbp),%rdi 249d: 48 8d b5 90 fd ff ff lea -0x270(%rbp),%rsi 24a4: b9 17 00 00 00 mov $0x17,%ecx 24a9: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) if (commit_start + commit_sections <= ic->journal_sections) { 24ac: 41 39 c6 cmp %eax,%r14d io_comp.comp = COMPLETION_INITIALIZER_ONSTACK(io_comp.comp); 24af: 48 8d bd 90 fd ff ff lea -0x270(%rbp),%rdi 24b6: 48 8d b5 e8 f9 ff ff lea -0x618(%rbp),%rsi 24bd: b9 17 00 00 00 mov $0x17,%ecx 24c2: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) We can obviously see the temporary structure allocated, and the compiler also does two meaningless memcpy with "rep movsq". And according to: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement-Exprs The return value of a statement expression is returned by value, so the temporary variable is created in COMPLETION_INITIALIZER_ONSTACK(), and that's why the temporary structures are allocted. To fix this, make the brace block in COMPLETION_INITIALIZER_ONSTACK() return a pointer and dereference it outside the block rather than return the whole structure, in this way, we are able to teach the compiler not to do the unnecessary stack allocation. This could also reduce the stack size even if !LOCKDEP, for example in write_journal(), compiled with gcc 7.1.1, the result of command: objdump -d drivers/md/dm-integrity.o | ./scripts/checkstack.pl x86 before: 0x0000246a write_journal [dm-integrity.o]: 696 after: 0x00002b7a write_journal [dm-integrity.o]: 296 Reported-by: Arnd Bergmann Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Acked-by: Arnd Bergmann Cc: Andrew Morton Cc: Byungchul Park Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: walken@google.com Cc: willy@infradead.org Link: http://lkml.kernel.org/r/20170823152542.5150-3-boqun.feng@gmail.com Signed-off-by: Ingo Molnar include/linux/completion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c322ac06d9af7ea259098ae5dc977855207d335 Author: Boqun Feng Date: Thu Aug 24 22:22:36 2017 +0800 acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse COMPLETION_INITIALIZER_ONSTACK() is supposed to be used as an initializer, in other words, it should only be used in assignment expressions or compound literals. So the usage in drivers/acpi/nfit/core.c: COMPLETION_INITIALIZER_ONSTACK(flush.cmp); ... is inappropriate. Besides, this usage could also break the build for another fix that reduces stack sizes caused by COMPLETION_INITIALIZER_ONSTACK(), because that fix changes COMPLETION_INITIALIZER_ONSTACK() from rvalue to lvalue, and usage as above will report the following error: drivers/acpi/nfit/core.c: In function 'acpi_nfit_flush_probe': include/linux/completion.h:77:3: error: value computed is not used [-Werror=unused-value] (*({ init_completion(&work); &work; })) This patch fixes this by replacing COMPLETION_INITIALIZER_ONSTACK() with init_completion() in acpi_nfit_flush_probe(), which does the same initialization without any other problems. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Acked-by: Dan Williams Acked-by: Arnd Bergmann Cc: Andrew Morton Cc: Byungchul Park Cc: Len Brown Cc: Linus Torvalds Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: walken@google.com Cc: willy@infradead.org Link: http://lkml.kernel.org/r/20170824142239.15178-1-boqun.feng@gmail.com Signed-off-by: Ingo Molnar drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34d54f3d6917f519693dbe873ee59cd06fb515ed Author: Waiman Long Date: Mon Aug 14 16:07:02 2017 -0400 locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures All the locking related cmpxchg's in the following functions are replaced with the _acquire variants: - pv_queued_spin_steal_lock() - trylock_clear_pending() This change should help performance on architectures that use LL/SC. The cmpxchg in pv_kick_node() is replaced with a relaxed version with explicit memory barrier to make sure that it is fully ordered in the writing of next->lock and the reading of pn->state whether the cmpxchg is a success or failure without affecting performance in non-LL/SC architectures. On a 2-socket 12-core 96-thread Power8 system with pvqspinlock explicitly enabled, the performance of a locking microbenchmark with and without this patch on a 4.13-rc4 kernel with Xinhui's PPC qspinlock patch were as follows: # of thread w/o patch with patch % Change ----------- --------- ---------- -------- 8 5054.8 Mop/s 5209.4 Mop/s +3.1% 16 3985.0 Mop/s 4015.0 Mop/s +0.8% 32 2378.2 Mop/s 2396.0 Mop/s +0.7% Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Andrea Parri Cc: Boqun Feng Cc: Linus Torvalds Cc: Pan Xinhui Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1502741222-24360-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/qspinlock_paravirt.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 966a967116e699762dbf4af7f9e0d1955c25aa37 Author: Ying Huang Date: Tue Aug 8 12:30:00 2017 +0800 smp: Avoid using two cache lines for struct call_single_data struct call_single_data is used in IPIs to transfer information between CPUs. Its size is bigger than sizeof(unsigned long) and less than cache line size. Currently it is not allocated with any explicit alignment requirements. This makes it possible for allocated call_single_data to cross two cache lines, which results in double the number of the cache lines that need to be transferred among CPUs. This can be fixed by requiring call_single_data to be aligned with the size of call_single_data. Currently the size of call_single_data is the power of 2. If we add new fields to call_single_data, we may need to add padding to make sure the size of new definition is the power of 2 as well. Fortunately, this is enforced by GCC, which will report bad sizes. To set alignment requirements of call_single_data to the size of call_single_data, a struct definition and a typedef is used. To test the effect of the patch, I used the vm-scalability multiple thread swap test case (swap-w-seq-mt). The test will create multiple threads and each thread will eat memory until all RAM and part of swap is used, so that huge number of IPIs are triggered when unmapping memory. In the test, the throughput of memory writing improves ~5% compared with misaligned call_single_data, because of faster IPIs. Suggested-by: Peter Zijlstra Signed-off-by: Huang, Ying [ Add call_single_data_t and align with size of call_single_data. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Aaron Lu Cc: Borislav Petkov Cc: Eric Dumazet Cc: Juergen Gross Cc: Linus Torvalds Cc: Michael Ellerman Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/87bmnqd6lz.fsf@yhuang-mobile.sh.intel.com Signed-off-by: Ingo Molnar arch/mips/kernel/smp.c | 6 ++-- block/blk-softirq.c | 2 +- drivers/block/null_blk.c | 2 +- drivers/cpuidle/coupled.c | 10 +++---- drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 2 +- include/linux/blkdev.h | 2 +- include/linux/netdevice.h | 2 +- include/linux/smp.h | 8 ++++-- kernel/sched/sched.h | 2 +- kernel/smp.c | 32 ++++++++++++---------- kernel/up.c | 2 +- 12 files changed, 39 insertions(+), 33 deletions(-) commit f52be5708076b75a045ac52c6fef3fffb8300525 Author: Peter Zijlstra Date: Tue Aug 29 10:59:39 2017 +0200 locking/lockdep: Untangle xhlock history save/restore from task independence Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to ensure the temporal IRQ events don't interact with task state, the XHLOCK_PROC is a fundament different beast that just happens to share the interface. The purpose of XHLOCK_PROC is to annotate independent execution inside one task. For example workqueues, each work should appear to run in its own 'pristine' 'task'. Remove XHLOCK_PROC in favour of its own interface to avoid confusion. Signed-off-by: Peter Zijlstra (Intel) Cc: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: david@fromorbit.com Cc: johannes@sipsolutions.net Cc: kernel-team@lge.com Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/20170829085939.ggmb6xiohw67micb@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/linux/irqflags.h | 4 +-- include/linux/lockdep.h | 7 +++-- kernel/locking/lockdep.c | 79 +++++++++++++++++++++++------------------------- kernel/workqueue.c | 9 +++--- 4 files changed, 48 insertions(+), 51 deletions(-) commit 5da382eb6ea37e2c49ef521c636d73f6ecc3fa81 Author: Peter Zijlstra Date: Mon Aug 28 12:46:50 2017 +0200 perf/x86: Fix caps/ for !Intel Move the 'max_precise' capability into generic x86 code where it belongs. This fixes a sysfs splat on !Intel systems where we fail to set x86_pmu_caps_group.atts. Reported-and-tested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Fixes: 22688d1c20f5 ("x86/perf: Export some PMU attributes in caps/ directory") Link: http://lkml.kernel.org/r/20170828104650.2u3rsim4jafyjzv2@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/events/core.c | 33 ++++++++++++++++++++++++++++----- arch/x86/events/intel/core.c | 14 ++------------ 2 files changed, 30 insertions(+), 17 deletions(-) commit fc7ce9c74c3ad232b084d80148654f926d01ece7 Author: Kan Liang Date: Mon Aug 28 20:52:49 2017 -0400 perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR For understanding how the workload maps to memory channels and hardware behavior, it's very important to collect address maps with physical addresses. For example, 3D XPoint access can only be found by filtering the physical address. Add a new sample type for physical address. perf already has a facility to collect data virtual address. This patch introduces a function to convert the virtual address to physical address. The function is quite generic and can be extended to any architecture as long as a virtual address is provided. - For kernel direct mapping addresses, virt_to_phys is used to convert the virtual addresses to physical address. - For user virtual addresses, __get_user_pages_fast is used to walk the pages tables for user physical address. - This does not work for vmalloc addresses right now. These are not resolved, but code to do that could be added. The new sample type requires collecting the virtual address. The virtual address will not be output unless SAMPLE_ADDR is applied. For security, the physical address can only be exposed to root or privileged user. Tested-by: Madhavan Srinivasan Signed-off-by: Kan Liang 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: acme@kernel.org Cc: mpe@ellerman.id.au Link: http://lkml.kernel.org/r/1503967969-48278-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/powerpc/perf/core-book3s.c | 3 ++- arch/x86/events/intel/ds.c | 2 +- arch/x86/events/perf_event.h | 2 +- include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c | 46 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 55 insertions(+), 4 deletions(-) commit 8d4e6c4caa12dafbcba138e5450b7af17b0b2194 Author: Alexander Shishkin Date: Thu Mar 30 18:39:56 2017 +0300 perf/core, pt, bts: Get rid of itrace_started I just noticed that hw.itrace_started and hw.config are aliased to the same location. Now, the PT driver happens to use both, which works out fine by sheer luck: - STORE(hw.itrace_start) is ordered before STORE(hw.config), in the program order, although there are no compiler barriers to ensure that, - to the perf_log_itrace_start() hw.itrace_start looks set at the same time as when it is intended to be set because both stores happen in the same path, - hw.config is never reset to zero in the PT driver. Now, the use of hw.config by the PT driver makes more sense (it being a HW PMU) than messing around with itrace_started, which is an awkward API to begin with. This patch replaces hw.itrace_started with an attach_state bit and an API call for the PMU drivers to use to communicate the condition. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170330153956.25994-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/bts.c | 2 +- arch/x86/events/intel/pt.c | 5 +++-- include/linux/perf_event.h | 5 ++--- kernel/events/core.c | 7 ++++++- 4 files changed, 12 insertions(+), 7 deletions(-) commit e0563e049531973e665db853e825a4efed9f881d Merge: b00233b 75e8387 Author: Ingo Molnar Date: Tue Aug 29 15:09:03 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 0be04a695b8ca111bc74efcd395b5b82e29753ae Author: Rob Herring Date: Mon Aug 7 18:29:19 2017 -0500 ALSA: aoa: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Signed-off-by: Takashi Iwai sound/aoa/codecs/tas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82fb342460362ce81cce2068eb4d9bf7f9e94be2 Author: Artemy Kovalyov Date: Thu Aug 17 15:52:12 2017 +0300 Documentation: Hardware tag matching Add document providing definitions of terms and core explanations for tag matching (TM) protocols, eager and rendezvous, TM application header, tag list manipulations and matching process. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford Documentation/infiniband/tag_matching.txt | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 3fd3307ef34fc9f7198af9249c763cf7a4ac653f Author: Artemy Kovalyov Date: Thu Aug 17 15:52:11 2017 +0300 IB/mlx5: Support IB_SRQT_TM Pass to mlx5_core flag to enable rendezvous offload, list_size and CQ when SRQ created with IB_SRQT_TM. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 9 +++++++-- drivers/infiniband/hw/mlx5/srq.c | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) commit 5b3ec3fcb6bbe081279c73fb574af8c72f14cea0 Author: Artemy Kovalyov Date: Thu Aug 17 15:52:10 2017 +0300 net/mlx5: Add XRQ support Add support to new XRQ(eXtended shared Receive Queue) hardware object. It supports SRQ semantics with addition of extended receive buffers topologies and offloads. Currently supports tag matching topology and rendezvouz offload. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/srq.c | 150 ++++++++++++++++++++++++-- include/linux/mlx5/driver.h | 1 + include/linux/mlx5/srq.h | 5 + 3 files changed, 146 insertions(+), 10 deletions(-) commit eb761894351d0372248f2636c213d7b822e8775f Author: Artemy Kovalyov Date: Thu Aug 17 15:52:09 2017 +0300 IB/mlx5: Fill XRQ capabilities Provide driver specific values for XRQ capabilities. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 10 ++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 +++++ 2 files changed, 15 insertions(+) commit 8d50505ada728258fcdce99120b937ce68298c4e Author: Artemy Kovalyov Date: Thu Aug 17 15:52:08 2017 +0300 IB/uverbs: Expose XRQ capabilities Make XRQ capabilities available via ibv_query_device() verb. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 10 ++++++++++ include/uapi/rdma/ib_user_verbs.h | 15 +++++++++++++++ 2 files changed, 25 insertions(+) commit 38eb44fac71729fabdef71166e72bee5964c10d6 Author: Artemy Kovalyov Date: Thu Aug 17 15:52:07 2017 +0300 IB/uverbs: Add new SRQ type IB_SRQT_TM Add new SRQ type capable of new tag matching feature. When SRQ receives a message it will search through the matching list for the corresponding posted receive buffer. The process of searching the matching list is called tag matching. In case the tag matching results in a match, the received message will be placed in the address specified by the receive buffer. In case no match was found the message will be placed in a generic buffer until the corresponding receive buffer will be posted. These messages are called unexpected and their set is called an unexpected list. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9382d4e1d3c09fe20fa53eb12b51ef01ad40774f Author: Artemy Kovalyov Date: Thu Aug 17 15:52:06 2017 +0300 IB/uverbs: Add XRQ creation parameter to UAPI Add tm_list_size parameter to struct ib_uverbs_create_xsrq. If SRQ type is tag-matching this field defines maximum size of tag matching list. Otherwise, it is expected to be zero. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/uapi/rdma/ib_user_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c2c849625cf779e0fac41c8be3c163df4b80c14 Author: Artemy Kovalyov Date: Thu Aug 17 15:52:05 2017 +0300 IB/core: Add new SRQ type IB_SRQT_TM This patch adds new SRQ type - IB_SRQT_TM. The new SRQ type supports tag matching and rendezvous offloads for MPI applications. When SRQ receives a message it will search through the matching list for the corresponding posted receive buffer. The process of searching the matching list is called tag matching. In case the tag matching results in a match, the received message will be placed in the address specified by the receive buffer. In case no match was found the message will be placed in a generic buffer until the corresponding receive buffer will be posted. These messages are called unexpected and their set is called an unexpected list. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1a56ff6daab1e062aadec582eb10e7090f0b370a Author: Artemy Kovalyov Date: Thu Aug 17 15:52:04 2017 +0300 IB/core: Separate CQ handle in SRQ context Before this change CQ attached to SRQ was part of XRC specific extension. Moving CQ handle out makes it available to other types extending SRQ functionality. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 27 +++++++++++++++++---------- drivers/infiniband/core/verbs.c | 16 +++++++++------- drivers/infiniband/hw/mlx4/srq.c | 4 ++-- drivers/infiniband/hw/mlx5/main.c | 10 +++++----- drivers/infiniband/hw/mlx5/srq.c | 11 +++++++---- include/rdma/ib_verbs.h | 31 ++++++++++++++++++++----------- 6 files changed, 60 insertions(+), 39 deletions(-) commit 6938fc1ee07e54c057430005f8dcaccabce027c3 Author: Artemy Kovalyov Date: Thu Aug 17 15:52:03 2017 +0300 IB/core: Add XRQ capabilities This patch adds following TM XRQ capabilities: * max_rndv_hdr_size - Max size of rendezvous request message * max_num_tags - Max number of entries in tag matching list * max_ops - Max number of outstanding list operations * max_sge - Max number of SGE in tag matching entry * flags - the following flags are currently defined: - IB_TM_CAP_RC - Support tag matching on RC transport Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 6e44636aeab19259f804c8abca57a95ddc01df66 Author: Artemy Kovalyov Date: Tue Aug 15 11:59:02 2017 +0300 net/mlx5: Update HW layout definitions * add offload_type field to mlx5_ifc_qpc_bits * update mlx5_ifc_xrqc_bits layout Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/linux/mlx5/mlx5_ifc.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 746a272e44141af24a02f6c9b0f65f4c4598ed42 Author: Mark Rutland Date: Tue Aug 22 11:36:17 2017 +0100 ARM: 8692/1: mm: abort uaccess retries upon fatal signal When there's a fatal signal pending, arm's do_page_fault() implementation returns 0. The intent is that we'll return to the faulting userspace instruction, delivering the signal on the way. However, if we take a fatal signal during fixing up a uaccess, this results in a return to the faulting kernel instruction, which will be instantly retried, resulting in the same fault being taken forever. As the task never reaches userspace, the signal is not delivered, and the task is left unkillable. While the task is stuck in this state, it can inhibit the forward progress of the system. To avoid this, we must ensure that when a fatal signal is pending, we apply any necessary fixup for a faulting kernel instruction. Thus we will return to an error path, and it is up to that code to make forward progress towards delivering the fatal signal. Signed-off-by: Mark Rutland Reviewed-by: Steve Capper Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f26fee5f111d7221b5b0724a1a54a066dc8cf410 Author: Hoeun Ryu Date: Mon Aug 7 06:49:19 2017 +0100 ARM: 8690/1: lpae: build TTB control register value from scratch in v7_ttb_setup Reading TTBCR in early boot stage might return the value of the previous kernel's configuration, especially in case of kexec. For example, if normal kernel (first kernel) had run on a configuration of PHYS_OFFSET <= PAGE_OFFSET and crash kernel (second kernel) is running on a configuration PHYS_OFFSET > PAGE_OFFSET, which can happen because it depends on the reserved area for crash kernel, reading TTBCR and using the value to OR other bit fields might be risky because it doesn't have a reset value for TTBCR. Suggested-by: Robin Murphy Signed-off-by: Hoeun Ryu Signed-off-by: Russell King arch/arm/mm/proc-v7-3level.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a49c3feeb84e4b44d3022b8b1a303ea2e4eeeab9 Author: Bhumika Goyal Date: Tue Aug 29 10:49:52 2017 +0200 mux: 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: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72b0d51d973beab5a06c97279b61a0a58ccf33c8 Author: Nicholas Piggin Date: Fri Aug 25 14:30:35 2017 +1000 powerpc/64s: idle POWER9 can execute stop in virtual mode The hardware can execute stop in any context, and KVM does not require real mode because siblings do not share MMU state. This saves a switch to real-mode when going idle. Acked-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 65dbbe812fc2bec99cea89f498b7cdd32bcf8e1c Author: Nicholas Piggin Date: Tue Aug 29 21:40:35 2017 +1000 powerpc/64s: Drop no longer used IDLE_STATE_ENTER_SEQ There are no longer any callers of IDLE_STATE_ENTER_SEQ, all callers use IDLE_STATE_ENTER_SEQ_NORET. So drop the former. Signed-off-by: Nicholas Piggin [mpe: Split out of larger patch, write change log] Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 56ee52408ed0bd4af400c04ad60f9811c82e5343 Author: Nicholas Piggin Date: Tue Aug 29 21:34:40 2017 +1000 powerpc/64s: POWER9 can execute stop without a sync sequence We don't need to use IDLE_STATE_ENTER_SEQ_NORET on Power9. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit aafc8a8300ec0f20b99c72e5a10e22535cb99dd1 Author: Nicholas Piggin Date: Tue Aug 29 21:36:35 2017 +1000 powerpc/64s: Move IDLE_STATE_ENTER_SEQ[_NORET] into idle_book3s.S This macro is only used in idle_book3s.S, move it in there and add a more descriptive comment. Signed-off-by: Nicholas Piggin [mpe: Split out of larger patch and write change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 16 ---------------- arch/powerpc/kernel/idle_book3s.S | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) commit 3308376a914b9c3f57a12072c063814403d983a8 Author: Colin Ian King Date: Fri Aug 25 17:32:06 2017 +0100 x86/platform/intel-mid: Make several arrays static, to make code smaller Don't populate arrays on the stack, instead make them static. Makes the object code smaller by 76 bytes: Before: text data bss dec hex filename 4217 1540 128 5885 16fd arch/x86/platform/intel-mid/pwr.o After: text data bss dec hex filename 3981 1700 128 5809 16b1 arch/x86/platform/intel-mid/pwr.o Signed-off-by: Colin Ian King Reviewed-by: Andy Shevchenko Cc: Bjorn Helgaas Cc: Linus Torvalds Cc: Lukas Wunner Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170825163206.23250-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/pwr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82b7fcc0055dcc1aa9a7b51c7fbc31ad8d89fffa Merge: 12c15a7 94a04bc Author: Michael Ellerman Date: Tue Aug 29 21:26:30 2017 +1000 Merge branch 'topic/ppc-kvm' into next Merge Nicks commit to rework the KVM thread management, shared with the KVM tree via the ppc-kvm topic branch. commit 499934898fcd15e4337dc858be6c09cd9fd74e85 Author: Jiri Slaby Date: Thu Aug 24 10:06:24 2017 +0200 x86/entry/64: Use ENTRY() instead of ALIGN+GLOBAL for stub32_clone() ALIGN+GLOBAL is effectively what ENTRY() does, so use ENTRY() which is dedicated for exactly this purpose -- global functions. Note that stub32_clone() is a C-like leaf function -- it has a standard call frame -- it only switches one argument and continues by jumping into C. Since each ENTRY() should be balanced by some END*() marker, we add a corresponding ENDPROC() to stub32_clone() too. Besides that, x86's custom GLOBAL macro is going to die very soon. Signed-off-by: Jiri Slaby 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/20170824080624.7768-2-jslaby@suse.cz Signed-off-by: Ingo Molnar arch/x86/entry/entry_64_compat.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd6be579a79c6d824fd8e24f168f372062fd15d6 Author: Jiri Slaby Date: Thu Aug 24 10:06:23 2017 +0200 x86/fpu/math-emu: Add ENDPROC to functions Functions in math-emu are annotated as ENTRY() symbols, but their ends are not annotated at all. But these are standard functions called from C, with proper stack register update etc. Omitting the ends means: * the annotations are not paired and we cannot deal with such functions e.g. in objtool * the symbols are not marked as functions in the object file * there are no sizes of the functions in the object file So fix this by adding ENDPROC() to each such case in math-emu. Signed-off-by: Jiri Slaby 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/20170824080624.7768-1-jslaby@suse.cz Signed-off-by: Ingo Molnar arch/x86/math-emu/div_Xsig.S | 1 + arch/x86/math-emu/div_small.S | 2 +- arch/x86/math-emu/mul_Xsig.S | 4 +++- arch/x86/math-emu/polynom_Xsig.S | 1 + arch/x86/math-emu/reg_norm.S | 2 ++ arch/x86/math-emu/reg_round.S | 2 ++ arch/x86/math-emu/reg_u_add.S | 1 + arch/x86/math-emu/reg_u_div.S | 2 ++ arch/x86/math-emu/reg_u_mul.S | 1 + arch/x86/math-emu/reg_u_sub.S | 1 + arch/x86/math-emu/round_Xsig.S | 4 ++-- arch/x86/math-emu/shr_Xsig.S | 1 + arch/x86/math-emu/wm_shrx.S | 2 ++ arch/x86/math-emu/wm_sqrt.S | 1 + 14 files changed, 21 insertions(+), 4 deletions(-) commit 9e085cefc61155e45b87a277440f96682e7921f1 Author: Jiri Slaby Date: Thu Aug 24 09:33:27 2017 +0200 x86/boot/64: Extract efi_pe_entry() from startup_64() Similarly to the 32-bit code, efi_pe_entry body() is somehow squashed into startup_64(). In the old days, we forced startup_64() to start at offset 0x200 and efi_pe_entry() to start at 0x210. But this requirement was removed long time ago, in: 99f857db8857 ("x86, build: Dynamically find entry points in compressed startup code") The way it is now makes the code less readable and illogical. Given we can now safely extract the inlined efi_pe_entry() body from startup_64() into a separate function, we do so. We also annotate the function appropriatelly by ENTRY+ENDPROC. ABI offsets are preserved: 0000000000000000 T startup_32 0000000000000200 T startup_64 0000000000000390 T efi64_stub_entry On the top-level, it looked like: .org 0x200 ENTRY(startup_64) #ifdef CONFIG_EFI_STUB ; start of inlined jmp preferred_addr GLOBAL(efi_pe_entry) ... ; a lot of assembly (efi_pe_entry) leaq preferred_addr(%rax), %rax jmp *%rax preferred_addr: #endif ; end of inlined ... ; a lot of assembly (startup_64) ENDPROC(startup_64) And it is now converted into: .org 0x200 ENTRY(startup_64) ... ; a lot of assembly (startup_64) ENDPROC(startup_64) #ifdef CONFIG_EFI_STUB ENTRY(efi_pe_entry) ... ; a lot of assembly (efi_pe_entry) leaq startup_64(%rax), %rax jmp *%rax ENDPROC(efi_pe_entry) #endif Signed-off-by: Jiri Slaby Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: David Woodhouse Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: ard.biesheuvel@linaro.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170824073327.4129-2-jslaby@suse.cz Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 112 ++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 59 deletions(-) commit f4dee0bb65752a1b5c9f7912bea8216f03667209 Author: Jiri Slaby Date: Thu Aug 24 09:33:26 2017 +0200 x86/boot/32: Extract efi_pe_entry() from startup_32() The efi_pe_entry() body is somehow squashed into startup_32(). In the old days, we forced startup_32() to start at offset 0x00 and efi_pe_entry() to start at 0x10. But this requirement was removed long time ago, in: 99f857db8857 ("x86, build: Dynamically find entry points in compressed startup code") The way it is now makes the code less readable and illogical. Given we can now safely extract the inlined efi_pe_entry() body from startup_32() into a separate function, we do so and we separate it to two functions as they are marked already: efi_pe_entry() + efi32_stub_entry(). We also annotate the functions appropriatelly by ENTRY+ENDPROC. ABI offset is preserved: 0000 128 FUNC GLOBAL DEFAULT 6 startup_32 0080 60 FUNC GLOBAL DEFAULT 6 efi_pe_entry 00bc 68 FUNC GLOBAL DEFAULT 6 efi32_stub_entry On the top-level, it looked like this: ENTRY(startup_32) #ifdef CONFIG_EFI_STUB ; start of inlined jmp preferred_addr ENTRY(efi_pe_entry) ... ; a lot of assembly (efi_pe_entry) ENTRY(efi32_stub_entry) ... ; a lot of assembly (efi32_stub_entry) leal preferred_addr(%eax), %eax jmp *%eax preferred_addr: #endif ; end of inlined ... ; a lot of assembly (startup_32) ENDPROC(startup_32) And it is now converted into: ENTRY(startup_32) ... ; a lot of assembly (startup_32) ENDPROC(startup_32) #ifdef CONFIG_EFI_STUB ENTRY(efi_pe_entry) ... ; a lot of assembly (efi_pe_entry) ENDPROC(efi_pe_entry) ENTRY(efi32_stub_entry) ... ; a lot of assembly (efi32_stub_entry) leal startup_32(%eax), %eax jmp *%eax ENDPROC(efi32_stub_entry) #endif Signed-off-by: Jiri Slaby Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: David Woodhouse Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: ard.biesheuvel@linaro.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170824073327.4129-1-jslaby@suse.cz Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_32.S | 129 ++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 65 deletions(-) commit 7b3d61cc73a1abe4c2c7eaf00093b338c8b233b0 Author: Ingo Molnar Date: Tue Aug 29 13:10:35 2017 +0200 locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being Mike Galbraith bisected a boot crash back to the following commit: 7a46ec0e2f48 ("locking/refcounts, x86/asm: Implement fast refcount overflow protection") The crash/hang pattern is: > Symptom is a few splats as below, with box finally hanging. Network > comes up, but neither ssh nor console login is possible. > > ------------[ cut here ]------------ > WARNING: CPU: 4 PID: 0 at net/netlink/af_netlink.c:374 netlink_sock_destruct+0x82/0xa0 > ... > __sk_destruct() > rcu_process_callbacks() > __do_softirq() > irq_exit() > smp_apic_timer_interrupt() > apic_timer_interrupt() We are at -rc7 already, and the code has grown some dependencies, so instead of a plain revert disable the config temporarily, in the hope of getting real fixes. Reported-by: Mike Galbraith Tested-by: Mike Galbraith Cc: Arnd Bergmann Cc: Davidlohr Bueso Cc: Elena Reshetova Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/tip-7a46ec0e2f4850407de5e1d19a44edee6efa58ec@git.kernel.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05045379b2740686020618c8cfd4b517cff9f918 Author: Liam Breck Date: Wed Aug 23 20:36:15 2017 -0700 power: supply: bq27xxx: Enable data memory update for certain chips Support data memory update on BQ27425. Parameters from TI datasheets are also provided for BQ27500, 545, 421, 441, 621; however these are commented out, as they are not tested. Add BQ27XXX_O_CFGUP & _O_RAM for use in bq27xxx_chip_data[n].opts and by data memory update functions. Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 175 ++++++++++++++++++++++++--------- include/linux/power/bq27xxx_battery.h | 1 - 2 files changed, 126 insertions(+), 50 deletions(-) commit 3a731c6414c94012328f485b4b1bb88ed841f9eb Author: Liam Breck Date: Wed Aug 23 20:36:14 2017 -0700 power: supply: bq27xxx: Add chip IDs for previously shadowed chips For the existing features, these chips act like others already ID'd, so they had false but functional IDs. We will be adding features which require correct IDs, so the following IDs are added: BQ2752X, 531, 542, 546, 742, 425, 441, 621 Chip-specific features are now tracked by BQ27XXX_O_* flags in di->opts. No functional changes to the driver. Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 120 +++++++++++++++++------------ drivers/power/supply/bq27xxx_battery_i2c.c | 16 ++-- include/linux/power/bq27xxx_battery.h | 9 +++ 3 files changed, 86 insertions(+), 59 deletions(-) commit 9aade6d8f9d0fd086068fc390c6f6c0ce98ea07a Author: Liam Breck Date: Wed Aug 23 20:36:13 2017 -0700 power: supply: bq27xxx: Create single chip data table To support new features which require different data for each chip, we unify the bq27xxx_regs and bq27xxx_battery_props tables into a single one. No functional changes to the driver. Signed-off-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 121 ++++++++++++++++----------------- 1 file changed, 60 insertions(+), 61 deletions(-) commit 64b46b7b87fc44081f320ce0bb0c5278489cfc0e Author: Liam Breck Date: Mon Aug 28 14:23:45 2017 -0700 power: supply: bq24190_charger: Add ti,bq24192i to devicetree table bq24192i was previously only in ID table, so add it to DT table. Cc: Tony Lindgren Cc: Hans de Goede Signed-off-by: Liam Breck Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 1 + 1 file changed, 1 insertion(+) commit 74229f938434a8a48c01a39ab9f82ffc27faa7da Author: Hans de Goede Date: Tue Aug 15 22:04:58 2017 +0200 power: supply: bq24190_charger: Add input_current_limit property Export the input current limit of the charger as a POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT property on the charger power_supply class device. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit c3142dd8bedb8b78ee13c885dd92093fc8a50277 Author: Hans de Goede Date: Tue Aug 15 22:04:56 2017 +0200 power: supply: Add power_supply_set_input_current_limit_from_supplier helper On some devices the USB Type-C port power (USB PD 2.0) negotiation is done by a separate port-controller IC, while the current limit is controlled through another (charger) IC. It has been decided to model this by modelling the external Type-C power brick (adapter/charger) as a power-supply class device which supplies the charger-IC, with its voltage-now and current-max representing the negotiated voltage and max current draw. This commit adds a power_supply_set_input_current_limit_from_supplier helper function which charger power-supply drivers can call to get the max-current from their supplier and have this applied through their set_property call-back to their input-current-limit. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 41 ++++++++++++++++++++++++++++++++ include/linux/power_supply.h | 2 ++ 2 files changed, 43 insertions(+) commit 8b9ec0719834fe66146d138d62ed66cef025c864 Author: Baolin Wang Date: Tue Aug 29 11:35:04 2017 +0800 i2c: Add Spreadtrum I2C controller driver This patch adds the I2C controller driver for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 7 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-sprd.c | 646 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 654 insertions(+) commit 4058f6dc3b8ec631865f63e59fb79e86145243a4 Author: Baolin Wang Date: Tue Aug 29 11:35:03 2017 +0800 dt-bindings: i2c: Add Spreadtrum I2C controller documentation This patch adds the binding documentation for Spreadtrum I2C controller device. Signed-off-by: Baolin Wang Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-sprd.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 5ca21c13c9f4d180e673bcbc36fd0d9128b7f63e Author: Colin Ian King Date: Wed Aug 16 10:16:59 2017 +0100 i2c-cht-wc: make cht_wc_i2c_adap_driver static The structure cht_wc_i2c_adap_driver is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'cht_wc_i2c_adap_driver' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cht-wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit facaa3e3c813848e6b49ee37a42a3688832e63cd Author: Thomas Gleixner Date: Mon Aug 28 08:47:59 2017 +0200 x86/idt: Hide set_intr_gate() set_intr_gate() is an internal function of the IDT code. The only user left is the KVM code which replaces the pagefault handler eventually. Provide an explicit update_intr_gate() function and make set_intr_gate() static. While at it replace the magic number 14 in the KVM code with the proper trap define. Signed-off-by: Thomas Gleixner Acked-by: Paolo Bonzini 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: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.663008004@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 +- arch/x86/kernel/idt.c | 33 ++++++++++++++++++++------------- arch/x86/kernel/kvm.c | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) commit 4447ac1195a845b18f2f427686f116ab77c5b268 Author: Thomas Gleixner Date: Mon Aug 28 08:47:58 2017 +0200 x86/idt: Simplify alloc_intr_gate() The only users of alloc_intr_gate() are hypervisors, which both check the used_vectors bitmap whether they have allocated the gate already. Move that check into alloc_intr_gate() and simplify the users. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Reviewed-by: K. Y. Srinivasan Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.580830286@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mshyperv.c | 9 ++------- arch/x86/kernel/idt.c | 6 +++--- drivers/xen/events/events_base.c | 6 ++---- 3 files changed, 7 insertions(+), 14 deletions(-) commit db18da78f9a8bbab1bdc5968ba47ace788b5061f Author: Thomas Gleixner Date: Mon Aug 28 08:47:57 2017 +0200 x86/idt: Deinline setup functions None of this is performance sensitive in any way - so debloat the kernel. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.502052875@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 37 ++----------------------------------- arch/x86/kernel/idt.c | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 44 deletions(-) commit 485fa57bd73a0b79987d144e15bdc582f926701d Author: Thomas Gleixner Date: Mon Aug 28 08:47:56 2017 +0200 x86/idt: Remove unused functions/inlines The IDT related inlines are not longer used. Remove them. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.422083717@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit dc20b2d526539344d7175a2a83221337302596b8 Author: Thomas Gleixner Date: Mon Aug 28 08:47:55 2017 +0200 x86/idt: Move interrupt gate initialization to IDT code Move the gate intialization from interrupt init to the IDT code so all IDT related operations are at a single place. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.340209198@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/idt.c | 18 ++++++++++++++++++ arch/x86/kernel/irqinit.c | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) commit 636a7598f65938e1dbacafec74c2e3acdc66bd4d Author: Thomas Gleixner Date: Mon Aug 28 08:47:54 2017 +0200 x86/idt: Move APIC gate initialization to tables Replace the APIC/SMP vector gate initialization with the table based mechanism. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.260177013@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 1 + arch/x86/kernel/idt.c | 48 +++++++++++++++++++++++++++++++ arch/x86/kernel/irqinit.c | 69 +-------------------------------------------- 3 files changed, 50 insertions(+), 68 deletions(-) commit b70543a0b2b680f8953b6917a83b9203b20d7abd Author: Thomas Gleixner Date: Mon Aug 28 08:47:53 2017 +0200 x86/idt: Move regular trap init to tables Initialize the regular traps with a table. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.182128165@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 1 + arch/x86/kernel/idt.c | 51 +++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/traps.c | 41 +----------------------------------- 3 files changed, 53 insertions(+), 40 deletions(-) commit 90f6225fba0c732f3f5f9f5e265bdefa021ff12d Author: Thomas Gleixner Date: Mon Aug 28 08:47:52 2017 +0200 x86/idt: Move IST stack based traps to table init Initialize the IST based traps via a table. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.091328949@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 ++ arch/x86/kernel/idt.c | 22 ++++++++++++++++++++++ arch/x86/kernel/traps.c | 9 +-------- 3 files changed, 25 insertions(+), 8 deletions(-) commit 0a30908b9149b2b332ccf817261125a634765566 Author: Thomas Gleixner Date: Mon Aug 28 08:47:51 2017 +0200 x86/idt: Move debug stack init to table based Add the debug_idt init table and make use of it. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064959.006502252@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 ++ arch/x86/kernel/idt.c | 23 +++++++++++++++++++++++ arch/x86/kernel/traps.c | 6 +----- 3 files changed, 26 insertions(+), 5 deletions(-) commit 433f8924fa8e55a50ce57f3b8a33ed095c405644 Author: Thomas Gleixner Date: Mon Aug 28 08:47:50 2017 +0200 x86/idt: Switch early trap init to IDT tables Add the initialization table for the early trap setup and replace the early trap init code. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.929139008@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/idt.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/setup.c | 4 ++-- arch/x86/kernel/traps.c | 27 ------------------------- 3 files changed, 55 insertions(+), 29 deletions(-) commit 3318e9744244a415ee9481ca7e54234caf5e12c5 Author: Thomas Gleixner Date: Mon Aug 28 08:47:49 2017 +0200 x86/idt: Prepare for table based init The IDT setup code is handled in several places. All of them use variants of set_intr_gate() inlines. This can be done with a table based initialization, which allows to reduce the inline zoo and puts all IDT related code and information into a single place. Add the infrastructure. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.849877032@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/idt.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 87e81786b13b267c4355e0d23e33c7e4c08fa63f Author: Thomas Gleixner Date: Mon Aug 28 08:47:48 2017 +0200 x86/idt: Move early IDT setup out of 32-bit asm The early IDT setup can be done in C code like it's done on 64-bit kernels. Reuse the 64-bit version. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.757980775@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/segment.h | 1 + arch/x86/kernel/head32.c | 4 ++++ arch/x86/kernel/head_32.S | 36 ++---------------------------------- arch/x86/kernel/idt.c | 4 ++++ 4 files changed, 11 insertions(+), 34 deletions(-) commit 588787fde7aa346f345e1a7600f84d88039fc9df Author: Thomas Gleixner Date: Mon Aug 28 08:47:47 2017 +0200 x86/idt: Move early IDT handler setup to IDT code The early IDT handler setup is done in C entry code on 64-bit kernels and in ASM entry code on 32-bit kernels. Move the 64-bit variant to the IDT code so it can be shared with 32-bit in the next step. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.679561404@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 9 +++++++++ arch/x86/kernel/head64.c | 6 +----- arch/x86/kernel/idt.c | 12 ++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) commit e802a51ede91350438c051da2f238f5e8c918ead Author: Thomas Gleixner Date: Mon Aug 28 08:47:46 2017 +0200 x86/idt: Consolidate IDT invalidation kexec and reboot have both code to invalidate IDT. Create a common function and use it. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.600953282@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 3 +++ arch/x86/kernel/idt.c | 11 +++++++++++ arch/x86/kernel/machine_kexec_32.c | 14 +------------- arch/x86/kernel/reboot.c | 4 +--- 4 files changed, 16 insertions(+), 16 deletions(-) commit 8f55868f9e42fea56021b17421914b9e4fda4960 Author: Thomas Gleixner Date: Mon Aug 28 08:47:45 2017 +0200 x86/idt: Remove unused set_trap_gate() This inline is not used at all. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.522053134@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 12 ------------ 1 file changed, 12 deletions(-) commit 16bc18d895cee95f12bd722e5a3016676dfcf084 Author: Thomas Gleixner Date: Mon Aug 28 08:47:44 2017 +0200 x86/idt: Move 32-bit idt_descr to C code 32-bit kernels have the idt_descr defined in the low level assembly entry code, but there is no good reason for that. Move it into the C file and use the 64-bit version of it. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.445862201@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/head_32.S | 6 ------ arch/x86/kernel/idt.c | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) commit d8ed9d48266a27ab02a4bbcb81e755d63aec108a Author: Thomas Gleixner Date: Mon Aug 28 08:47:43 2017 +0200 x86/idt: Create file for IDT related code IDT related code lives scattered around in various places. Create a new source file in arch/x86/kernel/idt.c to hold it. Move the idt_tables and descriptors to it for a start. Follow up patches will gradually move more code over. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.367081121@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/cpu/common.c | 9 --------- arch/x86/kernel/idt.c | 26 ++++++++++++++++++++++++++ arch/x86/kernel/traps.c | 6 ------ 4 files changed, 27 insertions(+), 16 deletions(-) commit 87cc037674342cbf6213829b2cc59bb71be60777 Author: Thomas Gleixner Date: Mon Aug 28 08:47:42 2017 +0200 x86/ldttss: Clean up 32-bit descriptors Like the IDT descriptors, the LDT/TSS descriptors are pointlessly different on 32 and 64 bit kernels. Unify them and get rid of the duplicated code. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.289634692@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 26 +++----------------------- arch/x86/include/asm/desc_defs.h | 27 ++++++++++++--------------- 2 files changed, 15 insertions(+), 38 deletions(-) commit 38e9e81f4c81c75799b002d5811de7241b307676 Author: Thomas Gleixner Date: Mon Aug 28 08:47:41 2017 +0200 x86/gdt: Use bitfields for initialization The GDT entry related code uses two ways to access entries via union fields: - bitfields - macros which initialize the two 16-bit parts of the entry by magic shift and mask operations. Clean it up and only use the bitfields to initialize and access entries. ( The old access patterns were partly done due to GCC optimizing bitfield accesses in a horrible way - that's mostly fixed these days and clarity of code in such low level accessors is very important. ) Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.197673367@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vma.c | 2 +- arch/x86/include/asm/desc.h | 26 +++++++++++++++--------- arch/x86/include/asm/desc_defs.h | 44 ++++++++++++++++++---------------------- arch/x86/math-emu/fpu_system.h | 2 +- 4 files changed, 38 insertions(+), 36 deletions(-) commit 9a98e7780022aa7cd201eb8a88a4f1d607b73cde Author: Thomas Gleixner Date: Mon Aug 28 08:47:40 2017 +0200 x86/asm: Replace access to desc_struct:a/b fields The union inside of desc_struct which allows access to the raw u32 parts of the descriptors. This raw access part is about to go away. Replace the few code parts which access those fields. Signed-off-by: Thomas Gleixner Reviewed-by: Boris Ostrovsky Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.120214366@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/xen/hypercall.h | 6 ++++-- arch/x86/kernel/tls.c | 2 +- arch/x86/xen/enlighten_pv.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit 718f5d0030da8669404dab873336b16c169b430b Author: Thomas Gleixner Date: Mon Aug 28 08:47:39 2017 +0200 x86/fpu: Use bitfield accessors for desc_struct desc_struct is a union of u32 fields and bitfields. The access to the u32 fields is done with magic macros. Convert it to use the bitfields and replace the macro magic with parseable inline functions. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.042406718@linutronix.de Signed-off-by: Ingo Molnar arch/x86/math-emu/fpu_entry.c | 11 +++++----- arch/x86/math-emu/fpu_system.h | 48 +++++++++++++++++++++++++++++++---------- arch/x86/math-emu/get_address.c | 17 ++++++++------- 3 files changed, 51 insertions(+), 25 deletions(-) commit 1dd439fe97e1a32cbb980c180f1bcb54bb6a2a55 Author: Thomas Gleixner Date: Mon Aug 28 08:47:38 2017 +0200 x86/percpu: Use static initializer for GDT entry The IDT cleanup is about to remove pack_descriptor(). The GDT setup for the per-cpu storage can be achieved with the static initializer as well. Replace it. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.954214927@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/setup_percpu.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 64b163fab684e3de47aa8db6cc08ae7d2e194373 Author: Thomas Gleixner Date: Mon Aug 28 08:47:37 2017 +0200 x86/idt: Unify gate_struct handling for 32/64-bit kernels The first 32 bits of gate struct are the same for 32 and 64 bit kernels. The 32-bit version uses desc_struct and no designated data structure, so we need different accessors for 32 and 64 bit kernels. Aside of that the macros which are necessary to build the 32-bit gate descriptor are horrible to read. Unify the gate structs and switch all code fiddling with it over. Signed-off-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 Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.861974317@linutronix.de Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 8 +++--- arch/x86/include/asm/desc.h | 45 ++++++++++++++----------------- arch/x86/include/asm/desc_defs.h | 57 ++++++++++++++++++++++++++-------------- arch/x86/kvm/vmx.c | 2 +- arch/x86/xen/enlighten_pv.c | 12 ++++----- 5 files changed, 67 insertions(+), 57 deletions(-) commit 73285527804402befe5d5140aeede21c16544b4c Author: Thomas Gleixner Date: Mon Aug 28 08:47:36 2017 +0200 x86/tracing: Build tracepoints only when they are used The tracepoint macro magic emits code for all tracepoints in a event header file. That code stays around even if the tracepoint is not used at all. The linker does not discard it. Build the various irq_vector tracepoints dependent on the appropriate CONFIG switches. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.770651777@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/trace/irq_vectors.h | 36 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) commit d596f2b8b4cb0451087992796974aa9f076a7fc7 Author: Hans de Goede Date: Mon Aug 28 18:40:29 2017 +0200 MAINTAINERS: Add entry for drivers/i2c/busses/i2c-cht-wc.c Add an entry for drivers/i2c/busses/i2c-cht-wc.c and add myself as maintainer of this driver. Signed-off-by: Hans de Goede Signed-off-by: Wolfram Sang MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 4f1e0cb78810afab889fc407ff18c112663a1579 Author: Hans de Goede Date: Tue Aug 29 11:27:28 2017 +0200 power: supply: max17042_battery: Fix compiler warning Fix drivers/power/supply/max17042_battery.c:1059:6: warning: 'acpi_id' may be used uninitialized in this function. No idea why my gcc version did not catch this. Reported-by: kbuild test robot Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c038a58ccfd6704d4d7d60ed3d6a0fca13cf13a4 Author: David Howells Date: Tue Aug 29 10:19:01 2017 +0100 rxrpc: Allow failed client calls to be retried Allow a client call that failed on network error to be retried, provided that the Tx queue still holds DATA packet 1. This allows an operation to be submitted to another server or another address for the same server without having to repackage and re-encrypt the data so far processed. Two new functions are provided: (1) rxrpc_kernel_check_call() - This is used to find out the completion state of a call to guess whether it can be retried and whether it should be retried. (2) rxrpc_kernel_retry_call() - Disconnect the call from its current connection, reset the state and submit it as a new client call to a new address. The new address need not match the previous address. A call may be retried even if all the data hasn't been loaded into it yet; a partially constructed will be retained at the same point it was at when an error condition was detected. msg_data_left() can be used to find out how much data was packaged before the error occurred. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 45 ++++++++++++++++ include/net/af_rxrpc.h | 16 ++++++ net/rxrpc/af_rxrpc.c | 69 +++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 19 +++---- net/rxrpc/call_object.c | 102 +++++++++++++++++++++++++++++++++++-- net/rxrpc/conn_client.c | 17 +++++-- net/rxrpc/sendmsg.c | 24 +++++---- 7 files changed, 261 insertions(+), 31 deletions(-) commit e833251ad813168253fef9915aaf6a8c883337b0 Author: David Howells Date: Tue Aug 29 10:18:56 2017 +0100 rxrpc: Add notification of end-of-Tx phase Add a callback to rxrpc_kernel_send_data() so that a kernel service can get a notification that the AF_RXRPC call has transitioned out the Tx phase and is now waiting for a reply or a final ACK. This is called from AF_RXRPC with the call state lock held so the notification is guaranteed to come before any reply is passed back. Further, modify the AFS filesystem to make use of this so that we don't have to change the afs_call state before sending the last bit of data. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 12 +++++++++- fs/afs/rxrpc.c | 46 +++++++++++++++++++++++++++++--------- include/net/af_rxrpc.h | 5 ++++- net/rxrpc/sendmsg.c | 34 ++++++++++++++++++++++------ 4 files changed, 77 insertions(+), 20 deletions(-) commit 3ec0efde582e7e86a1a853ef96468aff86090d20 Author: David Howells Date: Tue Aug 29 10:18:50 2017 +0100 rxrpc: Remove some excess whitespace Remove indentation from some blank lines. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd2db2d231b4a9daccdba6712c3113e650260c6c Author: David Howells Date: Tue Aug 29 10:18:43 2017 +0100 rxrpc: Don't negate call->error before returning it call->error is stored as 0 or a negative error code. Don't negate this value (ie. make it positive) before returning it from a kernel function (though it should still be negated before passing to userspace through a control message). Signed-off-by: David Howells net/rxrpc/sendmsg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7b674e390e513ea443c5a0f27ec95e93fb8a94fa Author: David Howells Date: Tue Aug 29 10:18:37 2017 +0100 rxrpc: Fix IPv6 support Fix IPv6 support in AF_RXRPC in the following ways: (1) When extracting the address from a received IPv4 packet, if the local transport socket is open for IPv6 then fill out the sockaddr_rxrpc struct for an IPv4-mapped-to-IPv6 AF_INET6 transport address instead of an AF_INET one. (2) When sending CHALLENGE or RESPONSE packets, the transport length needs to be set from the sockaddr_rxrpc::transport_len field rather than sizeof() on the IPv4 transport address. (3) When processing an IPv4 ICMP packet received by an IPv6 socket, set up the address correctly before searching for the affected peer. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 4 ++-- net/rxrpc/call_accept.c | 2 +- net/rxrpc/conn_object.c | 2 +- net/rxrpc/local_event.c | 2 +- net/rxrpc/output.c | 2 +- net/rxrpc/peer_event.c | 6 ++++-- net/rxrpc/rxkad.c | 8 ++++---- net/rxrpc/utils.c | 23 +++++++++++++++++------ 8 files changed, 31 insertions(+), 18 deletions(-) commit 0a3785855edcdb326ebf052c4f92ebc2710614c6 Author: David Howells Date: Tue Aug 29 10:15:40 2017 +0100 rxrpc: Use correct timestamp from Kerberos 5 ticket When an XDR-encoded Kerberos 5 ticket is added as an rxrpc-type key, the expiry time should be drawn from the k5 part of the token union (which was what was filled in), rather than the kad part of the union. Reported-by: Arnd Bergmann Signed-off-by: David Howells net/rxrpc/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a45525b5b47c10c0446eda21227792b39af233dc Author: Thomas Gleixner Date: Mon Aug 28 08:47:35 2017 +0200 x86/irq_work: Make it depend on APIC The irq work interrupt vector is only installed when CONFIG_X86_LOCAL_APIC is enabled, but the interrupt handler is compiled in unconditionally. Compile the cruft out when the APIC is disabled. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.691909010@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/irq_work.h | 8 ++++++++ arch/x86/kernel/irq_work.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 0428e01a2f13a6b7dae8289fb10030dbea336dee Author: Thomas Gleixner Date: Mon Aug 28 08:47:34 2017 +0200 x86/ipi: Make platform IPI depend on APIC The platform IPI vector is only installed when the local APIC is enabled. All users of it depend on the local APIC anyway. Make the related code conditional on CONFIG_X86_LOCAL_APIC=y. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.615286163@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/entry_arch.h | 3 +-- arch/x86/kernel/irq.c | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 809547472edae0bc68f2b5abc37b92c8a988bc8a Author: Thomas Gleixner Date: Mon Aug 28 08:47:33 2017 +0200 x86/tracing: Disentangle pagefault and resched IPI tracing key The pagefault and the resched IPI handler are the only ones where it is worth to optimize the code further in case tracepoints are disabled. But it makes no sense to have a single static key for both. Seperate the static keys so the facilities are handled seperately. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.536699116@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/trace/common.h | 15 ++++++++------- arch/x86/include/asm/trace/exceptions.h | 6 ++++-- arch/x86/include/asm/trace/irq_vectors.h | 29 +++++++++++++++++++++++------ arch/x86/kernel/smp.c | 2 +- arch/x86/kernel/tracepoint.c | 27 ++++++++++++++++++++++----- arch/x86/mm/fault.c | 2 +- 6 files changed, 59 insertions(+), 22 deletions(-) commit 6f54f3ec6c5d866c0517e9cf444bed762c2a05b7 Author: Thomas Gleixner Date: Mon Aug 28 08:47:32 2017 +0200 x86/idt: Clean up the i386 low level entry macros Some of the entry function defines for i386 were explictely using the BUILD_INTERRUPT3() macro to prevent that the extra trace entry got added via BUILD_INTERRUPT(). No that the trace cruft is gone, the file can be cleaned up and converted to use BUILD_INTERRUPT() which avoids the ugly line breaks. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.456815006@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/entry_arch.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 4b9a8dca0e58b6fee229795f77e902a4dfd116fe Author: Thomas Gleixner Date: Mon Aug 28 08:47:31 2017 +0200 x86/idt: Remove the tracing IDT completely No more users of the tracing IDT. All exception tracepoints have been moved into the regular handlers. Get rid of the mess which shouldn't have been created in the first place. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.378851687@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 12 ++----- arch/x86/entry/entry_64.S | 13 ------- arch/x86/include/asm/desc.h | 82 ++++-------------------------------------- arch/x86/include/asm/hw_irq.h | 20 ----------- arch/x86/include/asm/segment.h | 3 -- arch/x86/kernel/tracepoint.c | 43 ---------------------- arch/x86/kernel/traps.c | 6 +--- 7 files changed, 9 insertions(+), 170 deletions(-) commit 3cd788c1eec4b3659671aa13d335a15102ac4d06 Author: Thomas Gleixner Date: Mon Aug 28 08:47:30 2017 +0200 x86/smp: Use static key for reschedule interrupt tracing It's worth to avoid the extra irq_enter()/irq_exit() pair in the case that the reschedule interrupt tracepoints are disabled. Use the static key which indicates that exception tracing is enabled. For now this key is global. It will be optimized in a later step. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170828064957.299808677@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 2 +- arch/x86/kernel/smp.c | 40 +++++++++++++++------------------------- 2 files changed, 16 insertions(+), 26 deletions(-) commit 85b77cdd8fbd163d65f340e3f6578c50031af960 Author: Thomas Gleixner Date: Mon Aug 28 08:47:29 2017 +0200 x86/smp: Remove pointless duplicated interrupt code Two NOP5s are really a good tradeoff vs. the unholy IDT switching mess, which duplicates code all over the place. The rescheduling interrupt gets optimized in a later step. Make the ordering of function call and statistics increment the same as in other places. Calculate stats first, then do the function call. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.222101344@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/kernel/smp.c | 43 +++++++------------------------------------ 2 files changed, 9 insertions(+), 38 deletions(-) commit 0f42ae283c9b3ebfa34cac6d86c335aa1ebe8ac1 Author: Thomas Gleixner Date: Mon Aug 28 08:47:28 2017 +0200 x86/mce: Remove duplicated tracing interrupt code Machine checks are not really high frequency events. The extra two NOP5s for the disabled tracepoints are noise vs. the heavy lifting which needs to be done in the MCE handler. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.144301907@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 6 +++--- arch/x86/kernel/cpu/mcheck/mce_amd.c | 16 ++-------------- arch/x86/kernel/cpu/mcheck/therm_throt.c | 20 +++----------------- arch/x86/kernel/cpu/mcheck/threshold.c | 16 ++-------------- 4 files changed, 10 insertions(+), 48 deletions(-) commit daabb8eb9a55af90d0a55d93547a51cc6921389f Author: Thomas Gleixner Date: Mon Aug 28 08:47:27 2017 +0200 x86/irqwork: Get rid of duplicated tracing interrupt code Two NOP5s are a reasonable tradeoff to avoid duplicated code and the requirement to switch the IDT. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.064746737@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 2 +- arch/x86/kernel/irq_work.c | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) commit 61069de7a3252be0b1f567fe9e0b4723f1d2814f Author: Thomas Gleixner Date: Mon Aug 28 08:47:26 2017 +0200 x86/apic: Remove the duplicated tracing versions of interrupts The error and the spurious interrupt are really rare events and not at all performance sensitive: two NOP5s can be tolerated when tracing is disabled. Remove the complication. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170828064956.986009402@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/kernel/apic/apic.c | 43 ++++++++++--------------------------------- 2 files changed, 12 insertions(+), 35 deletions(-) commit 8a17116b1fddc1f414cd4dd5e86fa239fcdb5208 Author: Thomas Gleixner Date: Mon Aug 28 08:47:25 2017 +0200 x86/irq: Get rid of duplicated trace_x86_platform_ipi() code Two NOP5s are really a good tradeoff vs. the unholy IDT switching mess, which duplicates code all over the place. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170828064956.907209383@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 2 +- arch/x86/kernel/irq.c | 25 +++++-------------------- 2 files changed, 6 insertions(+), 21 deletions(-) commit 3bec6def39e32609e01a68b43476ee1f1c512eaa Author: Thomas Gleixner Date: Mon Aug 28 08:47:24 2017 +0200 x86/apic: Use this_cpu_ptr() in local_timer_interrupt() Accessing the per cpu data via per_cpu(, smp_processor_id()) is pointless. Use this_cpu_ptr() instead. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.829552757@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 302a98f896bbd2feb1393d98e8b9febeb101db6e Author: Thomas Gleixner Date: Mon Aug 28 08:47:23 2017 +0200 x86/apic: Remove the duplicated tracing version of local_timer_interrupt() The two NOP5s are noise in the rest of the work which is done by the timer interrupt and modern CPUs are pretty good in optimizing NOPs anyway. Get rid of the interrupt handler duplication and move the tracepoints into the regular handler. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170828064956.751247330@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hw_irq.h | 2 +- arch/x86/kernel/apic/apic.c | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) commit 11a7ffb01703c3bbb1e9b968893f4487a1b0b5a8 Author: Thomas Gleixner Date: Mon Aug 28 08:47:22 2017 +0200 x86/traps: Simplify pagefault tracing logic Make use of the new irqvector tracing static key and remove the duplicated trace_do_pagefault() implementation. If irq vector tracing is disabled, then the overhead of this is a single NOP5, which is a reasonable tradeoff to avoid duplicated code and the unholy macro mess. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.672965407@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 8 -------- arch/x86/entry/entry_64.S | 13 +----------- arch/x86/include/asm/traps.h | 10 +-------- arch/x86/kernel/kvm.c | 2 +- arch/x86/mm/fault.c | 49 ++++++++++++-------------------------------- 5 files changed, 16 insertions(+), 66 deletions(-) commit 2feb1b316d48004d905278c02a55902cab0be8be Author: Thomas Gleixner Date: Mon Aug 28 08:47:21 2017 +0200 x86/tracing: Introduce a static key for exception tracing Switching the IDT just for avoiding tracepoints creates a completely impenetrable macro/inline/ifdef mess. There is no point in avoiding tracepoints for most of the traps/exceptions. For the more expensive tracepoints, like pagefaults, this can be handled with an explicit static key. Preparatory patch to remove the tracing IDT. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.593094539@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/trace/common.h | 15 +++++++++++++++ arch/x86/include/asm/trace/exceptions.h | 4 +--- arch/x86/include/asm/trace/irq_vectors.h | 4 +--- arch/x86/kernel/tracepoint.c | 9 ++++++++- 4 files changed, 25 insertions(+), 7 deletions(-) commit f7eaf6e00fd581043bb540dfe865f1d81769b189 Author: Thomas Gleixner Date: Mon Aug 28 08:47:20 2017 +0200 x86/boot: Move EISA setup to a separate file EISA has absolutely nothing to do with traps, so move it out of traps.c into its own eisa.c file. Furthermore, the EISA bus detection does not need to run during very early boot, it's good enough to run it before the EISA bus and drivers are initialized. I.e. instead of calling it from the very early trap_init() code, make it a subsys_initcall(). Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.515322409@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/Makefile | 1 + arch/x86/kernel/eisa.c | 18 ++++++++++++++++++ arch/x86/kernel/traps.c | 13 ------------- 3 files changed, 19 insertions(+), 13 deletions(-) commit 9aec458ff07323f6593fd718cc33b1bca2f64597 Author: Thomas Gleixner Date: Mon Aug 28 08:47:19 2017 +0200 x86/irq: Remove duplicated used_vectors definition Also remove the unparseable comment in the other place while at it. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.436711634@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 1 - arch/x86/include/asm/irq.h | 3 --- 2 files changed, 4 deletions(-) commit 05161b9cbe553c41cf775ac41bb5120d94347e5c Author: Thomas Gleixner Date: Mon Aug 28 08:47:18 2017 +0200 x86/irq: Get rid of the 'first_system_vector' indirection bogosity This variable is beyond pointless. Nothing allocates a vector via alloc_gate() below FIRST_SYSTEM_VECTOR. So nothing can change first_system_vector. If there is a need for a gate below FIRST_SYSTEM_VECTOR then it can be added to the vector defines and FIRST_SYSTEM_VECTOR can be adjusted accordingly. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.357109735@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 5 ++--- arch/x86/kernel/apic/apic.c | 2 -- arch/x86/kernel/apic/vector.c | 2 +- arch/x86/kernel/irq.c | 2 +- arch/x86/kernel/irqinit.c | 5 +---- 5 files changed, 5 insertions(+), 11 deletions(-) commit fa4ab5774dfe58fd5e99462f625253659d41df09 Author: Thomas Gleixner Date: Mon Aug 28 08:47:17 2017 +0200 x86/irq: Unexport used_vectors[] No modular users. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.278375986@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 1 - 1 file changed, 1 deletion(-) commit 69de72ec6db950c436e36b94cf05eeb9e11ee144 Author: Thomas Gleixner Date: Mon Aug 28 08:47:16 2017 +0200 x86/irq: Remove vector_used_by_percpu_irq() Last user (lguest) is gone. Remove it. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.201432430@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/irq.h | 1 - arch/x86/kernel/irq.c | 2 -- arch/x86/kernel/irqinit.c | 12 ------------ 3 files changed, 15 deletions(-) commit 416b0c0faf634abc09568885cb95266ce669c606 Merge: c0bb80c 9c3a815 Author: Ingo Molnar Date: Tue Aug 29 11:42:07 2017 +0200 Merge branch 'linus' into x86/apic, to pick up fixes Signed-off-by: Ingo Molnar commit 10674a03c633379fadb5b314abde975fba270058 Author: Baolin Wang Date: Tue Aug 29 10:15:40 2017 +0100 net: rxrpc: Replace time_t type with time64_t type Since the 'expiry' variable of 'struct key_preparsed_payload' has been changed to 'time64_t' type, which is year 2038 safe on 32bits system. In net/rxrpc subsystem, we need convert 'u32' type to 'time64_t' type when copying ticket expires time to 'prep->expiry', then this patch introduces two helper functions to help convert 'u32' to 'time64_t' type. This patch also uses ktime_get_real_seconds() to get current time instead of get_seconds() which is not year 2038 safe on 32bits system. Signed-off-by: Baolin Wang Signed-off-by: David Howells include/keys/rxrpc-type.h | 23 +++++++++++++++++++++++ net/rxrpc/ar-internal.h | 2 +- net/rxrpc/key.c | 22 ++++++++++++++-------- net/rxrpc/rxkad.c | 14 +++++++------- 4 files changed, 45 insertions(+), 16 deletions(-) commit 4e18111ff38f066422c05f904b3bb4fea981d48e Author: Magnus Damm Date: Mon Mar 14 23:24:45 2016 +0900 devicetree: bindings: Remove deprecated properties The deprecated DT properties are part of the GIT history, no need to keep them around any longer. Signed-off-by: Magnus Damm Acked-by: Rob Herring Acked-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.txt | 4 ---- 1 file changed, 4 deletions(-) commit 203bb3479958c48ac84ed015061f5d9746f1e3fc Author: Magnus Damm Date: Mon Mar 14 23:24:34 2016 +0900 devicetree: bindings: Remove unused 32-bit CMT bindings Remove the 32-bit CMT compat strings to reduce maintenance burden. It should be fine to break DT compatibility because the 32-bit CMT DT binding was never part of any upstream DTS file. Signed-off-by: Magnus Damm Acked-by: Rob Herring Acked-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.txt | 16 ---------------- 1 file changed, 16 deletions(-) commit 63d9e8ca0dd4bfa4cb917b8cfb22311a3808ece3 Author: Magnus Damm Date: Mon Mar 14 23:24:24 2016 +0900 devicetree: bindings: Deprecate property, update example Deprecate "renesas,channels-mask" and update the r8a7790 CMT example. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/renesas,cmt.txt | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 7f03a0ecfdc786c1fefac988c128218edbbf3b44 Author: Magnus Damm Date: Mon Mar 14 23:24:13 2016 +0900 devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings Update SoC-specific bindings for r8a73a4 and R-Car Gen2 CMT0 and CMT1. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/renesas,cmt.txt | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 6f54cc1adcc8957f4e017068ea1a76e3300a78bf Author: Magnus Damm Date: Mon Mar 14 23:24:03 2016 +0900 devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings Add documentation for new separate CMT0 and CMT1 DT compatible strings for R-Car Gen2. These compat strings allow us to enable CMT1-specific features in the driver. The old compat strings will be deprecated in the not so distant future. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.txt | 3 +++ 1 file changed, 3 insertions(+) commit 46f6c0479784f87e532fae6aa37826e1565e584d Author: Magnus Damm Date: Mon Mar 14 23:23:53 2016 +0900 devicetree: bindings: Remove sh7372 CMT binding Remove the sh7372 CMT compat string to reduce maintenance burden. It should be fine to break DT compatibility because: 1) The sh7372 SoC support has been removed from upstream 2) The sh7372 CMT DT binding was never part of upstream DTS 3) The CMT driver never matches on the sh7372 binding Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 059ab7b82eecfc23bc58c491d72ee6b424163578 Author: Dong Aisheng Date: Tue Aug 1 16:40:17 2017 +0800 clocksource/drivers/imx-tpm: Add imx tpm timer support IMX Timer/PWM Module (TPM) supports both timer and pwm function while this patch only adds the timer support. PWM would be added later. The TPM counter, compare and capture registers are clocked by an asynchronous clock that can remain enabled in low power modes. NOTE: We observed in a very small probability, the bus fabric contention between GPU and A7 may results a few cycles delay of writing CNT registers which may cause the min_delta event got missed, so we need add a ETIME check here in case it happened. Cc: Daniel Lezcano Cc: Arnd Bergmann Cc: Thomas Gleixner Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-imx-tpm.c | 239 ++++++++++++++++++++++++++++++++++++ 3 files changed, 248 insertions(+) commit 34b0c26cd5458a991626bc8424e029562dceed21 Author: Dong Aisheng Date: Tue Aug 1 16:40:16 2017 +0800 dt-bindings: timer: Add nxp tpm timer binding doc Adding NXP Low Power Timer/Pulse Width Modulation Module (TPM) binding doc. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Shawn Guo Cc: Bai Ping Acked-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit aa78c1ccfab6018289bc2bfd0092d516d0a49ec5 Author: Borislav Petkov Date: Fri Aug 25 12:04:56 2017 +0200 x86/microcode/intel: Improve microcode patches saving flow Avoid potentially dereferencing a NULL pointer when saving a microcode patch for early loading on the application processors. While at it, drop the IS_ERR() checking in favor of simpler, NULL-ptr checks which are sufficient and rename __alloc_microcode_buf() to memdup_patch() to more precisely denote what it does. No functionality change. Reported-by: Dan Carpenter Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170825100456.n236w3jebteokfd6@pd.tnic arch/x86/kernel/cpu/microcode/intel.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 6e0b52d406f64d2bd65731968a072387b91b44d2 Author: Borislav Petkov Date: Sun Aug 27 18:39:24 2017 +0200 x86/mm: Fix SME encryption stack ptr handling sme_encrypt_execute() stashes the stack pointer on entry into %rbp because it allocates a one-page stack in the non-encrypted area for the encryption routine to use. When the latter is done, it restores it from %rbp again, before returning. However, it uses the FRAME_* macros partially but restores %rsp from %rbp explicitly with a MOV. And this is fine as long as the macros *actually* do something. Unless, you do a !CONFIG_FRAME_POINTER build where those macros are empty. Then, we still restore %rsp from %rbp but %rbp contains *something* and this leads to a stack corruption. The manifestation being a triple-fault during early boot when testing SME. Good luck to me debugging this with the clumsy endless-loop-in-asm method and narrowing it down gradually. :-( So, long story short, open-code the frame macros so that there's no monkey business and we avoid subtly breaking SME depending on the .config. Fixes: 6ebcb060713f ("x86/mm: Add support to encrypt the kernel in-place") Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Tom Lendacky Cc: Brijesh Singh Link: http://lkml.kernel.org/r/20170827163924.25552-1-bp@alien8.de arch/x86/mm/mem_encrypt_boot.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1d5df6af8c7469f9ae3e66e7bed0782cfe4f95db Author: Christoph Hellwig Date: Thu Aug 17 14:10:00 2017 +0200 nvme: don't blindly overwrite identifiers on disk revalidate Instead validate that these identifiers do not change, as that is prohibited by the specification. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit cdbff4f26bd9fab11bfac22097f836892a5c3612 Author: Christoph Hellwig Date: Wed Aug 16 16:14:47 2017 +0200 nvme: remove nvme_revalidate_ns The function is used in two places, and the shared code for those will diverge later in this series. Instead factor out a new helper to get the ids for a namespace, simplify the calling conventions for nvme_identify_ns and just open code the sequence. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 100 +++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 47 deletions(-) commit 57eeaf8ec67d5c5dee0ee9bb5b19866b8eef780d Author: Christoph Hellwig Date: Wed Aug 16 15:47:37 2017 +0200 nvme: remove unused struct nvme_ns fields And move the flags for the flags field near that field while touching this area. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/nvme.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0a72bbba493bebd53fa78e6741b86a3003f070d6 Author: Christoph Hellwig Date: Tue Aug 22 11:42:24 2017 +0200 nvme: allow calling nvme_change_ctrl_state from irq context Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a751da33945a2c94a0449d1005c3c973e5acfefb Author: Christoph Hellwig Date: Tue Aug 22 10:17:03 2017 +0200 nvme: report more detailed status codes to the block layer Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2fd523c57e520899e05ec663d04743005bcef5b2 Author: Christoph Hellwig Date: Fri Aug 25 17:06:13 2017 +0200 dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent No users left, everyone switched to the _attrs versions. Signed-off-by: Christoph Hellwig Documentation/DMA-API.txt | 30 ++++++++++++++++-------------- arch/metag/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/dma-mapping.h | 2 +- arch/tile/include/asm/dma-mapping.h | 4 ++-- include/linux/dma-mapping.h | 14 -------------- 5 files changed, 20 insertions(+), 32 deletions(-) commit 7f683b920479530150cafbed9dc02eeafb90486b Author: Christoph Hellwig Date: Wed Jun 14 10:33:48 2017 +0200 i825xx: switch to switch to dma_alloc_attrs This way we can always pass DMA_ATTR_NON_CONSISTENT, the SNI mips version will simply ignore the flag. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller drivers/net/ethernet/i825xx/lasi_82596.c | 6 ++---- drivers/net/ethernet/i825xx/lib82596.c | 9 +++++---- drivers/net/ethernet/i825xx/sni_82596.c | 6 ++---- 3 files changed, 9 insertions(+), 12 deletions(-) commit ae9f608f07e7828801430a00f67882fc386b33d5 Author: Christoph Hellwig Date: Wed Jun 14 10:29:47 2017 +0200 au1000_eth: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d64bfe9f70e265ed7dd5453e0a31a9ecc9ca475f Author: Christoph Hellwig Date: Wed Jun 14 10:27:43 2017 +0200 sgiseeq: switch to dma_alloc_attrs Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig Acked-by: Ralf Baechle Acked-by: David S. Miller drivers/net/ethernet/seeq/sgiseeq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6ec6e80d11783c00bb96794688d0d51d0481c8d3 Author: Bhumika Goyal Date: Tue Aug 29 00:00:31 2017 +0530 tty: hvcs: make ktermios const Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal Reviewed-by: Tyrel Datwyler Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa75936544fafc830ac3cc03458b771f3048a50f Author: Christian Lamparter Date: Mon Aug 28 19:11:15 2017 +0200 usb: core: usbport: fix "BUG: key not in .data" when lockdep is enabled This patch fixes a splat that happens if CONFIG_DEBUG_LOCK_ALLOC is enabled and the ledtrig_usbport is loaded. (on a device that has some usb ports). [ 60.695479] BUG: key c53f8420 not in .data! [ 60.695521] ------------[ cut here ]------------ [ 60.698542] WARNING: CPU: 1 PID: 854 at kernel/locking/lockdep.c:3134 __kernfs_create_file+0x5c/0xc0 [ 60.703355] DEBUG_LOCKS_WARN_ON(1) [ 60.712534] Modules linked in: [ 60.944078] CPU: 1 PID: 854 Comm: S96led Not tainted 4.9.44 #0 [ 60.944329] Hardware name: Generic DT based system [ 60.950106] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 60.954878] [] (show_stack) from [] (dump_stack+0x7c/0x9c) [ 60.962772] [] (dump_stack) from [] (__warn+0xbc/0xec) [ 60.969799] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) [ 60.976656] [] (warn_slowpath_fmt) [ 60.984210] [] (__kernfs_create_file) [ 60.992712] [] (sysfs_add_file_mode_ns) [ 61.002090] [] (sysfs_add_file) from [ 61.010619] [] (sysfs_add_file_to_group) [ 61.019263] [] (usbport_trig_add_usb_dev_ports [ledtrig_usbport]) [ 61.031002] [] (bus_for_each_dev) [ 61.042106] [] (usb_for_each_dev) [ 61.050375] [] (usbport_trig_activate [ledtrig_usbport]) [ 61.060685] [] (led_trigger_set) from [] [...] Signed-off-by: Christian Lamparter Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/ledtrig-usbport.c | 1 + 1 file changed, 1 insertion(+) commit 423a8a6eac2432a50e7ca4e4342a41ad3cf951e7 Author: Simo Koskinen Date: Mon Aug 28 15:01:32 2017 +0200 staging: comedi: coding style fixes found by checkpatch.pl The patch removes "WARNING: Prefer using '"%s...", __func__' to using 'xxxxxxxx', this function's name, in a string" warnings reported by checkpatch.pl script. Signed-off-by: Simo Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d894e25b5265d5999dc0ac12ee6b047773c7be3a Author: Jonathan Whitaker Date: Mon Aug 28 17:35:22 2017 -0600 Staging: ks7010: Fix alignment should match open parenthesis. This commit fixes alignment styling as reported by checkpatch.pl. Signed-off-by: Jonathan Whitaker Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b98ee3325c91a2e1c58e1f02db4b0f90a324f1c Author: Himanshu Jha Date: Mon Aug 28 19:09:54 2017 +0530 staging: rtl8723bs: hal: 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. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 14 +++---- drivers/staging/rtl8723bs/hal/hal_com.c | 4 +- drivers/staging/rtl8723bs/hal/odm.c | 46 +++++++++++------------ drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 20 +++++----- drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- 8 files changed, 46 insertions(+), 46 deletions(-) commit 67e3e07e82f8657d4fe702fc9c96a513db9bdce1 Author: Himanshu Jha Date: Mon Aug 28 18:57:36 2017 +0530 staging: rtl8723bs: os_dep: 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. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 4 ++-- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 2 +- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +- drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 529d87b44da7778db077c3dcfa54644ff4f7e7af Author: Himanshu Jha Date: Mon Aug 28 18:04:38 2017 +0530 staging: rtl8723bs: core: 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. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 2ad05de99f3958283d25c7147be3aaa677e95c14 Author: Himanshu Jha Date: Mon Aug 28 16:36:02 2017 +0530 staging: rtl8188eu: 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. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 -- 2 files changed, 5 deletions(-) commit 30207d7b640cd27a814abbc657c911121160dc10 Author: Himanshu Jha Date: Mon Aug 28 16:15:32 2017 +0530 staging: rtlwifi: remove memset before memcpy calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 1 - 1 file changed, 1 deletion(-) commit 56277035c294ec4877aabc97febcf55a2b3ef397 Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:22 2017 -0700 staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp is detected on CC, TCPM switches the port to SNK_UNATTACHED state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which makes the partner(source) to think that it is connected. To overcome this issue, force the port into PORT_RESET state to make sure the CC lines are open. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f451ac9e4c6dd2c9ee5397a28a60084fc77f63d7 Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:21 2017 -0700 staging: typec: tcpm: Do not send PING msgs in TCPM PING messages are used to monitor the connect/disconnect. However, when PD is carried over CC, so this is not required. Also, the spec does not clearly say if PD is possible when Type-c is connected to Type-A/B. So, removing sending PING messages altogether. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b965b6317ff147d379c7a60c852f6027a724634f Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:20 2017 -0700 staging: typec: tcpm: typec: tcpm: Wait for CC debounce before PD excg Once, Rp or Rd is switched, wait for PD_T_CC_DEBOUNCE. If not the PS_RDY message transmitted might result in failure. Also, Only wait for PD_T_SRCSWAPSTDBY while in PR_SWAP_SRC_SNK_TRANSITION_OFF. PD_T_PS_SOURCE_OFF is the overall time after which the initial sink would issue hard reset. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/pd.h | 2 ++ drivers/staging/typec/tcpm.c | 25 ++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) commit f3b73364a1f2ac1a54f58c2387e6593b3d49c965 Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:19 2017 -0700 staging: typec: tcpm: add cc change handling in src states In the case that the lower layer driver reports a cc change directly from SINK state to SOURCE state, TCPM doesn't handle these cc change in SRC_SEND_CAPABILITIES, SRC_READY states. And with SRC_ATTACHED state, the change is not handled as the port is still considered connected. [49606.131672] state change DRP_TOGGLING -> SRC_ATTACH_WAIT [49606.131701] pending state change SRC_ATTACH_WAIT -> SRC_ATTACHED @ 200 ms [49606.329952] state change SRC_ATTACH_WAIT -> SRC_ATTACHED [delayed 200 ms] [49606.329978] polarity 0 [49606.329989] Requesting mux mode 1, config 0, polarity 0 [49606.349416] vbus:=1 charge=0 [49606.372274] pending state change SRC_ATTACHED -> SRC_UNATTACHED @ 480 ms [49606.372431] VBUS on [49606.372488] state change SRC_ATTACHED -> SRC_STARTUP ... (the lower layer driver reports a direct change from source to sink) [49606.536927] pending state change SRC_SEND_CAPABILITIES -> SRC_SEND_CAPABILITIES @ 150 ms [49606.547244] CC1: 2 -> 5, CC2: 0 -> 0 [state SRC_SEND_CAPABILITIES, polarity 0, connected] This can happen when the lower layer driver and/or the hardware handles a portion of the Type-C state machine work, and quietly goes through the unattached state. Originally-from: Yueyao Zhu Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 13cb492cd0ceda6e3f5dd7647ca6964309dd6cf8 Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:18 2017 -0700 staging: typec: tcpm: Consider port_type while determining unattached_state While performing PORT_RESET, upon receiving the cc disconnect signal from the underlaying tcpc device, TCPM transitions into unattached state. Consider the current type of port while determining the unattached state. In the below logs, although the port_type was set to sink, TCPM transitioned into SRC_UNATTACHED. [ 762.290654] state change SRC_READY -> PORT_RESET [ 762.324531] Setting voltage/current limit 0 mV 0 mA [ 762.327912] polarity 0 [ 762.334864] cc:=0 [ 762.347193] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [ 762.347200] VBUS off [ 762.347203] CC1: 2 -> 0, CC2: 0 -> 0 [state PORT_RESET, polarity 0, disconnected] [ 762.347206] state change PORT_RESET -> SRC_UNATTACHED Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit af450ebb500ad2ba6f0bc85e3af315c3ea9a4efb Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:17 2017 -0700 staging: typec: tcpm: Comply with TryWait.SNK State According to the spec: "4.5.2.2.10.2 Exiting from TryWait.SNK State The port shall transition to Attached.SNK after tCCDebounce if or when VBUS is detected. Note the Source may initiate USB PD communications which will cause brief periods of the SNK.Open state on both the CC1 and CC2 pins, but this event will not exceed tPDDebounce. The port shall transition to Unattached.SNK when the state of both of the CC1 and CC2 pins is SNK.Open for at least tPDDebounce." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 58 +++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit 131c7d12ef21e16697098b282f65fcf20792eafe Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:16 2017 -0700 staging: typec: tcpm: Follow Try.SRC exit requirements According to spec: " 4.5.2.2.9.2 Exiting from Try.SRC State: The port shall transition to Attached.SRC when the SRC.Rd state is detected on exactly one of the CC1 or CC2 pins for at least tPDDebounce. The port shall transition to TryWait.SNK after tDRPTry and the SRC.Rd state has not been detected." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit a0a3e04e6b2c7cee376511be1524127cdfed264d Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:15 2017 -0700 staging: typec: tcpm: Check for Rp for tPDDebounce According the spec, the following is the conditions for exiting Try.SNK state: "The port shall wait for tDRPTry and only then begin monitoring the CC1 and CC2 pins for the SNK.Rp state. The port shall then transition to Attached.SNK when the SNK.Rp state is detected on exactly one of the CC1 or CC2 pins for at least tPDDebounce and V BUS is detected. Alternatively, the port shall transition to TryWait.SRC if SNK.Rp state is not detected for tPDDebounce." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 68 ++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 44 deletions(-) commit 02d5be466b68f65acc3263790ff2feb1c7ff2baf Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:14 2017 -0700 staging: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT According to the spec the following is the condition for exiting TryWait.SRC: "The port shall transition to Attached.SRC when V BUS is at vSafe0V and the SRC.Rd state is detected on exactly one of the CC pins for at least tCCDebounce. The port shall transition to Unattached.SNK after tDRPTry if neither of the CC1 or CC2 pins are in the SRC.Rd state" TCPM at present keeps re-entering the SRC_TRYWAIT and keeps restarting tDRPTry if the CC presents Rp and disconnects within tCCDebounce. For example: [ 447.164308] pending state change SRC_TRYWAIT -> SRC_ATTACHED @ 200 ms [ 447.164386] CC1: 2 -> 0, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, disconnected] [ 447.164406] state change SRC_TRYWAIT -> SRC_TRYWAIT [ 447.164573] cc:=3 [ 447.191408] pending state change SRC_TRYWAIT -> SRC_TRYWAIT_UNATTACHED @ 100 ms [ 447.191478] CC1: 0 -> 0, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, disconnected] [ 447.207261] CC1: 0 -> 2, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, connected] [ 447.207306] state change SRC_TRYWAIT -> SRC_TRYWAIT [ 447.207485] cc:=3 [ 447.237283] pending state change SRC_TRYWAIT -> SRC_ATTACHED @ 200 ms [ 447.237357] CC1: 2 -> 0, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, disconnected] [ 447.237379] state change SRC_TRYWAIT -> SRC_TRYWAIT [ 447.237532] cc:=3 [ 447.263219] pending state change SRC_TRYWAIT -> SRC_TRYWAIT_UNATTACHED @ 100 ms [ 447.263289] CC1: 0 -> 0, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, disconnected] [ 447.280926] CC1: 0 -> 2, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, connected] [ 447.280970] state change SRC_TRYWAIT -> SRC_TRYWAIT [ 447.281158] cc:=3 [ 447.307767] pending state change SRC_TRYWAIT -> SRC_ATTACHED @ 200 ms [ 447.307838] CC1: 2 -> 0, CC2: 0 -> 0 [state SRC_TRYWAIT, polarity 0, disconnected] [ 447.307858] state change SRC_TRYWAIT -> SRC_TRYWAIT In TCPM, tDRPTry is set tp 100ms (min 75ms and max 150ms) and tCCdebounce is set to 200ms (min 100ms and max 200ms). To overcome the issue, record the time at which the port enters TryWait.SRC(SRC_TRYWAIT) and re-enter SRC_TRYWAIT only when CC keeps debouncing within tDRPTry. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 45 ++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit ff6c8cb172269cb9102a1f247d093ae628f3f23b Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:13 2017 -0700 staging: typec: tcpm: Check for port type for Try.SRC/Try.SNK Enable Try.SRC or Try.SNK only when port_type is DRP. Try.SRC or Try.SNK state machines are not valid for SRC only or SNK only ports. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9b0ae69909c2813e61f5c747a1508497ce35d71b Author: Badhri Jagan Sridharan Date: Mon Aug 28 10:23:12 2017 -0700 staging: typec: tcpm: set port type callback The port type callback call enquires the tcpc_dev if the requested port type is supported. If supported, then performs a tcpm reset if required after setting the tcpm internal port_type variable. Check against the tcpm port_type instead of checking against caps.type as port_type reflects the current configuration. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 52 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 11 deletions(-) commit 94a04bc25a2c6296bd0c5e82c10e8231c2b11f77 Author: Nicholas Piggin Date: Fri Aug 25 14:30:33 2017 +1000 KVM: PPC: Book3S HV: POWER9 does not require secondary thread management POWER9 CPUs have independent MMU contexts per thread, so KVM does not need to quiesce secondary threads, so the hwthread_req/hwthread_state protocol does not have to be used. So patch it away on POWER9, and patch away the branch from the Linux idle wakeup to kvm_start_guest that is never used. Add a warning and error out of kvmppc_grab_hwthread in case it is ever called on POWER9. This avoids a hwsync in the idle wakeup path on POWER9. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras [mpe: Use WARN(...) instead of WARN_ON()/pr_err(...)] 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, 48 insertions(+), 12 deletions(-) commit c8488a8ad7c284b1159973baf536ca58fba0ad36 Author: Vitaly Kuznetsov Date: Mon Aug 28 15:16:05 2017 +0200 hinic: don't build the module by default We probably don't want to enable code supporting particular hardware by default e.g. when someone does 'make defconfig'. Other ethernet modules don't do it. Signed-off-by: Vitaly Kuznetsov Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Kconfig | 1 - 1 file changed, 1 deletion(-) commit a4e89ffb59235fd11d27107dea3efa4562ac0a12 Author: Matt Weber Date: Wed Jun 28 11:14:29 2017 -0500 powerpc/e6500: Update machine check for L1D cache err This patch updates the machine check handler of Linux kernel to handle the e6500 architecture case. In e6500 core, L1 Data Cache Write Shadow Mode (DCWS) register is not implemented but L1 data cache always runs in write shadow mode. So, on L1 data cache parity errors, hardware will automatically invalidate the data cache but will still log a machine check interrupt. Signed-off-by: Ronak Desai Signed-off-by: Matthew Weber Signed-off-by: Scott Wood arch/powerpc/kernel/traps.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6084fc2ec478dbe5ab027c8dc233ead57b6032d8 Author: Stefan Roese Date: Sat Aug 26 09:59:07 2017 +0200 dmaengine: altera: Use macros instead of structs to describe the registers This patch moves from a struct declaration for the DMA controller registers to macros with offests to the base address. This is mainly done to remove the sparse warnings, since the function parameter of ioread32/iowrite32 is "void __iomem *" instead of a pointer to struct members. With this patch applied, no sparse warning is seen anymore. Please note that the struct for the descriptors is still kept in place, as the code largely accesses the struct members as internal variables before the complete struct is copied into the descriptor FIFO of the DMA controller. Additionally this patch also removes two warnings "variable xxx set but not used" seen when compiling with "W=1". The registers need to be read to flush the response FIFO, but nothing needs to be done with them. So the code is correct here and the warning is a false one. Signed-off-by: Stefan Roese Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 80 ++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 45 deletions(-) commit fbf252335f8e2bd39d4ce59b1db0836a40ab227b Author: Hannes Reinecke Date: Mon Aug 28 10:14:26 2017 +0200 scsi: qlogicpti: fixup qlogicpti_reset() definition A merge error crept in when formatting commit af167bc ("scsi: qlogicpti: move bus reset to host reset") Fixes: af167bc ("scsi: qlogicpti: move bus reset to host reset") Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/qlogicpti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa2d9d6e894e096678a50ef0f65f7a8c3d8a40b8 Author: Dan Carpenter Date: Fri Aug 25 13:36:57 2017 +0300 scsi: qedi: off by one in qedi_get_cmd_from_tid() The > here should be >= or we end up reading one element beyond the end of the qedi->itt_map[] array. The qedi->itt_map[] array is allocated in qedi_alloc_itt(). Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Cc: # v4.10+ Signed-off-by: Dan Carpenter Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7846b12fe0b5feab5446d892f41b5140c1419109 Merge: 7ebdb0d d78acfe Author: Dave Airlie Date: Tue Aug 29 10:38:14 2017 +1000 Merge branch 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux into drm-next vmwgfx add fence fd support. * 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Bump the version for fence FD support drm/vmwgfx: Add export fence to file descriptor support drm/vmwgfx: Add support for imported Fence File Descriptor drm/vmwgfx: Prepare to support fence fd drm/vmwgfx: Fix incorrect command header offset at restart drm/vmwgfx: Support the NOP_ERROR command drm/vmwgfx: Restart command buffers after errors drm/vmwgfx: Move irq bottom half processing to threads drm/vmwgfx: Don't use drm_irq_[un]install commit 7ebdb0dd52404907b8eac2bab476b43a8b8aa9f1 Merge: 095e2d0 5b7b1b7 Author: Dave Airlie Date: Tue Aug 29 10:37:36 2017 +1000 Merge tag 'exynos-drm-next-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - Provide NV12MT pixel format support of Mixer driver in generic way. - Refactor Exynos KMS drivers . Refactoring to panel detection way . Refactoring to setting up possible_crtcs . Refactoring to video and command mode support - Some cleanups * tag 'exynos-drm-next-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: simplify set_pixfmt() in DECON and FIMD drivers drm/exynos: consistent use of cpp drm/exynos: mixer: remove src offset from mixer_graph_buffer() drm/exynos: mixer: simplify mixer_graph_buffer() drm/exynos: mixer: simplify vp_video_buffer() drm/exynos: mixer: enable NV12MT support for the video plane drm/exynos: mixer: fix chroma comment in vp_video_buffer() arm64: dts: exynos: remove i80-if-timings nodes dt-bindings: exynos5433-decon: remove i80-if-timings property drm/exynos/decon5433: use mode info stored in CRTC to detect i80 mode drm/exynos: add mode_valid callback to exynos_drm drm/exynos/decon5433: refactor irq requesting code drm/exynos/mic: use mode info stored in CRTC to detect i80 mode drm/exynos/dsi: propagate info about command mode from panel drm/exynos/dsi: refactor panel detection logic drm/exynos: use helper to set possible crtcs drm/exynos/decon5433: use readl_poll_timeout helpers commit 095e2d04f9fa88a7c6923734ab4162833ff4f230 Merge: ffa9443 f44d853 Author: Dave Airlie Date: Tue Aug 29 10:36:06 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc into drm-next UAPI Changes: - Rename u32 to __u32 in struct drm_format_modifier_blob (Lionel) Cc: Lionel Landwerlin * tag 'drm-misc-next-fixes-2017-08-28' of git://anongit.freedesktop.org/git/drm-misc: drm: rename u32 in __u32 in uapi commit ffa9443fb3d3eddf0fdf6ac473dc8b5c87f08f15 Author: Jason Ekstrand Date: Mon Aug 28 14:10:28 2017 -0700 drm/syncobj: Add a signal ioctl (v3) This IOCTL provides a mechanism for userspace to trigger a sync object directly. There are other ways that userspace can trigger a syncobj such as submitting a dummy batch somewhere or hanging on to a triggered sync_file and doing an import. This just provides an easy way to manually trigger the sync object without weird hacks. The motivation for this IOCTL is Vulkan fences. Vulkan lets you create a fence already in the signaled state so that you can wait on it immediatly without stalling. We could also handle this with a new create flag to ask the driver to create a syncobj that is already signaled but the IOCTL seemed a bit cleaner and more generic. v2: - Take an array of sync objects (Dave Airlie) v3: - Throw -EINVAL if pad != 0 Signed-off-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/drm_internal.h | 2 ++ drivers/gpu/drm/drm_ioctl.c | 2 ++ drivers/gpu/drm/drm_syncobj.c | 36 ++++++++++++++++++++++++++++++++++++ include/uapi/drm/drm.h | 1 + 4 files changed, 41 insertions(+) commit aa4035d2c7683d2f2fb0ffe8087abd9eabf6d54a Author: Jason Ekstrand Date: Mon Aug 28 14:10:27 2017 -0700 drm/syncobj: Add a reset ioctl (v3) This just resets the dma_fence to NULL so it looks like it's never been signaled. This will be useful once we add the new wait API for allowing wait on "submit and signal" behavior. v2: - Take an array of sync objects (Dave Airlie) v3: - Throw -EINVAL if pad != 0 Signed-off-by: Jason Ekstrand Reviewed-by: Christian König (v1) Signed-off-by: Dave Airlie drivers/gpu/drm/drm_internal.h | 2 ++ drivers/gpu/drm/drm_ioctl.c | 2 ++ drivers/gpu/drm/drm_syncobj.c | 33 +++++++++++++++++++++++++++++++++ include/uapi/drm/drm.h | 7 +++++++ 4 files changed, 44 insertions(+) commit acae4b48856838d71d548ab6610a99d8e32653e4 Merge: 33b86ba d7bc730 Author: David S. Miller Date: Mon Aug 28 16:57:10 2017 -0700 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates. Various changes including updated firmware interface, improved TX ring allocation scheme, improved out-of-memory logic in NAPI loop, reduced default rings on multi-port devices, new PCI IDs. Of particular note, CPU affinity hints from Vasundhara Volam. TC Flower eswitch support from Sathya Perla. ==================== Signed-off-by: David S. Miller commit d7bc73053024eecb239a5b8644a05c7745fd87a1 Author: Sathya Perla Date: Mon Aug 28 13:40:35 2017 -0400 bnxt_en: add code to query TC flower offload stats This patch adds code to implement TC_CLSFLOWER_STATS TC-cmd and the required FW code to query the stats from the HW. Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 95 ++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit db1d36a27324d51e62944f702a4d2d50548896ee Author: Sathya Perla Date: Mon Aug 28 13:40:34 2017 -0400 bnxt_en: add TC flower offload flow_alloc/free FW cmds This patch adds the hwrm_cfa_flow_alloc/free() routines that are needed to issue the FW cmds needed for TC flower 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 | 141 ++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 2 deletions(-) commit 2ae7408fedfee979e01ed3801223c632bb124c46 Author: Sathya Perla Date: Mon Aug 28 13:40:33 2017 -0400 bnxt_en: bnxt: add TC flower filter offload support This patch adds support for offloading TC based flow rules and actions for the 'flower' classifier in the bnxt_en driver. It includes logic to parse flow rules and actions received from the TC subsystem, store them and issue the corresponding hwrm_cfa_flow_alloc/free FW cmds. L2/IPv4/IPv6 flows and drop, redir, vlan push/pop actions are supported in this patch. In this patch the hwrm_cfa_flow_xxx routines are just stubs. The code for these routines is introduced in the next patch for easier review. Also, the code to query the TC/flower action stats will be introduced in a subsequent patch. Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 9 + drivers/net/ethernet/broadcom/bnxt/Makefile | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 39 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 23 + drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 602 ++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 158 +++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 18 + drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h | 8 + 8 files changed, 850 insertions(+), 9 deletions(-) commit 70855603e0a129d1c810947a4e4dd7ecd6f4560d Author: Sathya Perla Date: Mon Aug 28 13:40:32 2017 -0400 bnxt_en: fix clearing devlink ptr from bnxt struct The routine bnxt_link_bp_to_dl() is used to set the devlink ptr in bnxt struct (bp) and also to set the bnxt back ptr in the devlink struct. If devlink_register() fails, bp->dl must be cleared which is not happening currently. This patch fixes bnxt_link_bp_to_dl() to clear bp->dl by passing a NULL dl ptr. Fixes: 4ab0c6a8ffd7 ("bnxt_en: add support to enable VF-representors") Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) commit d5430d31ca72ec37fd539fd1c5230859509be4ef Author: Michael Chan Date: Mon Aug 28 13:40:31 2017 -0400 bnxt_en: Reduce default rings on multi-port cards. Reduce default rings from 8 to 4 on multi-port cards to reduce memory usage. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 +++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) commit 903649e718f80da2ba4b65a0adf6930219b4b2e5 Author: Michael Chan Date: Mon Aug 28 13:40:30 2017 -0400 bnxt_en: Improve -ENOMEM logic in NAPI poll loop. If we cannot allocate RX buffers in the NAPI poll loop when processing an RX event, the current code does not count that event towards the NAPI budget. This can cause us to potentially loop forever in NAPI if we consistently cannot allocate new buffers. Improve it by counting -ENOMEM event as 1 towards the NAPI budget. Cc: Martin KaFai Lau Signed-off-by: Michael Chan Reported-by: Martin KaFai Lau Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 27573a7d905a49dc756fda9c0e148372136356e6 Author: Scott Branden Date: Mon Aug 28 13:40:29 2017 -0400 bnxt: initialize board_info values with proper enums initialize board_info values with proper enums for defensive programming purposes. This will avoid any errors of the enums being declared not lining up with the board_info array. Signed-off-by: Scott Branden Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 4a58139b8493624c6c6223b58a9e70ebbdf56338 Author: Ray Jui Date: Mon Aug 28 13:40:28 2017 -0400 bnxt: Add PCIe device IDs for bcm58802/bcm58808 Add PCIe device ID for bcm58802 and bcm58808. Also add chip number update to declare bcm588xx as chip class phase 4 and later Signed-off-by: Ray Jui Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 +++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 56f0fd80d1886479a42ac07ed239538eb145a669 Author: Vasundhara Volam Date: Mon Aug 28 13:40:27 2017 -0400 bnxt_en: assign CPU affinity hints to bnxt_en IRQs This patch provides hints to irqbalance to map bnxt_en device IRQs to specific CPU cores. cpumask_local_spread() is used, which first maps IRQs to near NUMA cores; when those cores are exhausted, IRQs are mapped to far NUMA cores. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 25 ++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +++- 2 files changed, 27 insertions(+), 2 deletions(-) commit 98fdbe73bfb809b1f8eec9f27a36e737caed3a44 Author: Michael Chan Date: Mon Aug 28 13:40:26 2017 -0400 bnxt_en: Improve tx ring reservation logic. When the number of TX rings is changed (e.g. ethtool -L, enabling XDP TX rings, etc), the current code tries to reserve the new number of TX rings before closing and re-opening the NIC. If we are unable to reserve the new TX rings, we abort the operation and keep the current TX rings. The problem is that the firmware will disable the current TX rings even when it cannot reserve the new set of TX rings. We fix it as follows: 1. Instead of reserving the new set of TX rings, just ask the firmware to check if the new set of TX rings is available. There is a flag in the firmware message to do that. If not available, abort and the current TX rings will not be disabled. 2. Do the actual TX ring reservation in the path that opens the NIC. We keep the number of TX rings currently successfully reserved. If the number of TX rings is different than the reserved TX rings, we call firmware and reserve again. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 46 +++++++++++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 +- 4 files changed, 44 insertions(+), 14 deletions(-) commit 6a17eb27bf7ece364627fcf16ad50c24b793300b Author: Michael Chan Date: Mon Aug 28 13:40:25 2017 -0400 bnxt_en: Update firmware interface spec. to 1.8.1.4. Flow APIs are added in this firmware interface. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 186 +++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 5 deletions(-) commit 33b86ba0572b539239cde8d6b3e7835bb6fc3516 Merge: a74e344 5156458 Author: David S. Miller Date: Mon Aug 28 16:49:49 2017 -0700 Merge branch 'NCSI-vlan-filtering' Samuel Mendoza-Jonas says: ==================== NCSI VLAN Filtering Support This series (mainly patch 2) adds VLAN filtering to the NCSI implementation. A fair amount of code already exists in the NCSI stack for VLAN filtering but none of it is actually hooked up. This goes the final mile and fixes a few bugs in the existing code found along the way (patch 1). Patch 3 adds the appropriate flag and callbacks to the ftgmac100 driver to enable filtering as it's a large consumer of NCSI (and what I've been testing on). v3: - Add comment describing change to ncsi_find_filter() - Catch NULL in clear_one_vid() from ncsi_get_filter() - Simplify state changes when kicking updated channel ==================== Signed-off-by: David S. Miller commit 51564585d8c6de28931ceff51f73eb800147221d Author: Samuel Mendoza-Jonas Date: Mon Aug 28 16:18:43 2017 +1000 ftgmac100: Support NCSI VLAN filtering when available Register the ndo_vlan_rx_{add,kill}_vid callbacks and set the NETIF_F_HW_VLAN_CTAG_FILTER if NCSI is available. This allows the VLAN core to notify the NCSI driver when changes occur so that the remote NCSI channel can be properly configured to filter on the set VLAN tags. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 5 +++++ 1 file changed, 5 insertions(+) commit 21acf63013ed3d6fce3176cc34b74064052a31b4 Author: Samuel Mendoza-Jonas Date: Mon Aug 28 16:18:42 2017 +1000 net/ncsi: Configure VLAN tag filter Make use of the ndo_vlan_rx_{add,kill}_vid callbacks to have the NCSI stack process new VLAN tags and configure the channel VLAN filter appropriately. Several VLAN tags can be set and a "Set VLAN Filter" packet must be sent for each one, meaning the ncsi_dev_state_config_svf state must be repeated. An internal list of VLAN tags is maintained, and compared against the current channel's ncsi_channel_filter in order to keep track within the state. VLAN filters are removed in a similar manner, with the introduction of the ncsi_dev_state_config_clear_vids state. The maximum number of VLAN tag filters is determined by the "Get Capabilities" response from the channel. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller include/net/ncsi.h | 2 + net/ncsi/internal.h | 11 ++ net/ncsi/ncsi-manage.c | 308 ++++++++++++++++++++++++++++++++++++++++++++++++- net/ncsi/ncsi-rsp.c | 9 +- 4 files changed, 326 insertions(+), 4 deletions(-) commit 8579a67e139b77a6881c405f9272afb9a7891201 Author: Samuel Mendoza-Jonas Date: Mon Aug 28 16:18:41 2017 +1000 net/ncsi: Fix several packet definitions Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-cmd.c | 10 +++++----- net/ncsi/ncsi-pkt.h | 2 +- net/ncsi/ncsi-rsp.c | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) commit a74e344a996406b0617b7f4eb28181bdf77684ac Merge: cde66f2 742c987 Author: David S. Miller Date: Mon Aug 28 16:46:25 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-08-27 This series contains updates to i40e and i40evf only. Sudheer updates code comments and state variable so that adminq_subtask will have accutate information whenever it gets scheduled. Mariusz stores information about FEC modes, to be used to printing link states information, so that we do not need to call admin queue when reporting link status. Adds VF support for controlling VLAN tag stripping via ethtool. Jake provides the majority of changes in this series, starting with increasing the size of the prefix buffer so that it can hold enough characters for every possible input, which prevents snprintf truncation. Fixed other string truncation errors/warnings produced by GCC 7.x. Removed an unnecessary workaround for resetting XPS. Fixed an issue where there is a mismatched affinity mask value, so initialize the value to cpu_possible_mask and invert the logic for checking incorrect CPU vs IRQ affinity so that the exceptional case is handled at the check. Removed ULTRA latency mode due to several issues found and will be looking at better solution for small packet workloads. Akeem fixes an issue where the incorrect flag was being used to set promiscuous mode for unicast, which was enabling promiscuous mode only for multicast instead of unicast. Carolyn fixes an issue where an error return value is set, but this value can be overwritten before we actually do exit the function. So remove the error code assignment and add code comments for better understanding on why we do not need to set and return the error. ==================== Signed-off-by: David S. Miller commit cde66f24c3bf42123647c5233447c5790d92557f Author: Aviad Krawczyk Date: Mon Aug 28 01:35:30 2017 +0800 net-next/hinic: fix comparison of a uint16_t type with -1 Remove the search for index of constant buffer size Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 37 +----------------------- drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 21 ++++++++++++++ 2 files changed, 22 insertions(+), 36 deletions(-) commit 52f31422d462d1a0cb3ed3f2de7d9d34d1a6e46a Author: Aviad Krawczyk Date: Mon Aug 28 01:20:26 2017 +0800 net-next/hinic: Fix MTU limitation Fix the hw MTU limitation by setting max_mtu Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 + 1 file changed, 1 insertion(+) commit 70f5c98228e3f790be50962294ea21eceecde115 Merge: 9d8c7e5 333b3d0 Author: David S. Miller Date: Mon Aug 28 16:42:57 2017 -0700 Merge branch 'irda-move-to-staging' Greg Kroah-Hartman says: ==================== irda: move it to drivers/staging so we can delete it The IRDA code has long been obsolete and broken. So, to keep people from trying to use it, and to prevent people from having to maintain it, let's move it to drivers/staging/ so that we can delete it entirely from the kernel in a few releases. ==================== Signed-off-by: David S. Miller commit 333b3d070f703c1c433ed04d7e9458f60cec4dc2 Author: Greg Kroah-Hartman Date: Sun Aug 27 17:03:34 2017 +0200 staging: irda: add a TODO file. The irda code will be deleted in a future kernel release, so no need to have anyone do any new work on it. Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/staging/irda/TODO | 4 ++++ 1 file changed, 4 insertions(+) commit 5bf916ee0ab638c86edeaf4caeeade9ddf44d95d Author: Greg Kroah-Hartman Date: Sun Aug 27 17:03:33 2017 +0200 irda: move include/net/irda into staging subdirectory And finally, move the irda include files into drivers/staging/irda/include/net/irda. Yes, it's a long path, but it makes it easy for us to just add a Makefile directory path addition and all of the net and drivers code "just works". Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/staging/irda/drivers/Makefile | 2 + drivers/staging/irda/include/net/irda/af_irda.h | 87 ++++++ drivers/staging/irda/include/net/irda/crc.h | 29 ++ drivers/staging/irda/include/net/irda/discovery.h | 95 +++++++ .../staging/irda/include/net/irda/ircomm_core.h | 106 +++++++ .../staging/irda/include/net/irda/ircomm_event.h | 83 ++++++ drivers/staging/irda/include/net/irda/ircomm_lmp.h | 36 +++ .../staging/irda/include/net/irda/ircomm_param.h | 147 ++++++++++ drivers/staging/irda/include/net/irda/ircomm_ttp.h | 37 +++ drivers/staging/irda/include/net/irda/ircomm_tty.h | 121 ++++++++ .../irda/include/net/irda/ircomm_tty_attach.h | 92 ++++++ drivers/staging/irda/include/net/irda/irda.h | 115 ++++++++ .../staging/irda/include/net/irda/irda_device.h | 285 +++++++++++++++++++ drivers/staging/irda/include/net/irda/iriap.h | 108 +++++++ .../staging/irda/include/net/irda/iriap_event.h | 85 ++++++ .../staging/irda/include/net/irda/irias_object.h | 108 +++++++ .../staging/irda/include/net/irda/irlan_client.h | 42 +++ .../staging/irda/include/net/irda/irlan_common.h | 230 +++++++++++++++ drivers/staging/irda/include/net/irda/irlan_eth.h | 32 +++ .../staging/irda/include/net/irda/irlan_event.h | 81 ++++++ .../staging/irda/include/net/irda/irlan_filter.h | 35 +++ .../staging/irda/include/net/irda/irlan_provider.h | 52 ++++ drivers/staging/irda/include/net/irda/irlap.h | 311 +++++++++++++++++++++ .../staging/irda/include/net/irda/irlap_event.h | 129 +++++++++ .../staging/irda/include/net/irda/irlap_frame.h | 167 +++++++++++ drivers/staging/irda/include/net/irda/irlmp.h | 295 +++++++++++++++++++ .../staging/irda/include/net/irda/irlmp_event.h | 98 +++++++ .../staging/irda/include/net/irda/irlmp_frame.h | 62 ++++ drivers/staging/irda/include/net/irda/irmod.h | 109 ++++++++ drivers/staging/irda/include/net/irda/irqueue.h | 96 +++++++ drivers/staging/irda/include/net/irda/irttp.h | 210 ++++++++++++++ drivers/staging/irda/include/net/irda/parameters.h | 100 +++++++ drivers/staging/irda/include/net/irda/qos.h | 101 +++++++ drivers/staging/irda/include/net/irda/timer.h | 105 +++++++ drivers/staging/irda/include/net/irda/wrapper.h | 58 ++++ drivers/staging/irda/net/Makefile | 2 + include/net/irda/af_irda.h | 87 ------ include/net/irda/crc.h | 29 -- include/net/irda/discovery.h | 95 ------- include/net/irda/ircomm_core.h | 106 ------- include/net/irda/ircomm_event.h | 83 ------ include/net/irda/ircomm_lmp.h | 36 --- include/net/irda/ircomm_param.h | 147 ---------- include/net/irda/ircomm_ttp.h | 37 --- include/net/irda/ircomm_tty.h | 121 -------- include/net/irda/ircomm_tty_attach.h | 92 ------ include/net/irda/irda.h | 115 -------- include/net/irda/irda_device.h | 285 ------------------- include/net/irda/iriap.h | 108 ------- include/net/irda/iriap_event.h | 85 ------ include/net/irda/irias_object.h | 108 ------- include/net/irda/irlan_client.h | 42 --- include/net/irda/irlan_common.h | 230 --------------- include/net/irda/irlan_eth.h | 32 --- include/net/irda/irlan_event.h | 81 ------ include/net/irda/irlan_filter.h | 35 --- include/net/irda/irlan_provider.h | 52 ---- include/net/irda/irlap.h | 311 --------------------- include/net/irda/irlap_event.h | 129 --------- include/net/irda/irlap_frame.h | 167 ----------- include/net/irda/irlmp.h | 295 ------------------- include/net/irda/irlmp_event.h | 98 ------- include/net/irda/irlmp_frame.h | 62 ---- include/net/irda/irmod.h | 109 -------- include/net/irda/irqueue.h | 96 ------- include/net/irda/irttp.h | 210 -------------- include/net/irda/parameters.h | 100 ------- include/net/irda/qos.h | 101 ------- include/net/irda/timer.h | 105 ------- include/net/irda/wrapper.h | 58 ---- 70 files changed, 3851 insertions(+), 3847 deletions(-) commit 6c391ff758eb9f41e11c6143fd5bdb3b3324bf9f Author: Greg Kroah-Hartman Date: Sun Aug 27 17:03:32 2017 +0200 irda: move drivers/net/irda to drivers/staging/irda/drivers Move the irda drivers from drivers/net/irda/ to drivers/staging/irda/drivers as they will be deleted in a future kernel release. Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/net/Makefile | 1 - drivers/net/irda/Kconfig | 398 ---- drivers/net/irda/Makefile | 42 - drivers/net/irda/act200l-sir.c | 250 -- drivers/net/irda/actisys-sir.c | 245 -- drivers/net/irda/ali-ircc.c | 2218 ------------------ drivers/net/irda/ali-ircc.h | 227 -- drivers/net/irda/au1k_ir.c | 989 -------- drivers/net/irda/bfin_sir.c | 817 ------- drivers/net/irda/bfin_sir.h | 93 - drivers/net/irda/donauboe.c | 1732 -------------- drivers/net/irda/donauboe.h | 362 --- drivers/net/irda/esi-sir.c | 157 -- drivers/net/irda/girbil-sir.c | 252 -- drivers/net/irda/irda-usb.c | 1914 ---------------- drivers/net/irda/irda-usb.h | 174 -- drivers/net/irda/irtty-sir.c | 570 ----- drivers/net/irda/irtty-sir.h | 34 - drivers/net/irda/kingsun-sir.c | 634 ------ drivers/net/irda/ks959-sir.c | 912 -------- drivers/net/irda/ksdazzle-sir.c | 813 ------- drivers/net/irda/litelink-sir.c | 199 -- drivers/net/irda/ma600-sir.c | 253 --- drivers/net/irda/mcp2120-sir.c | 224 -- drivers/net/irda/mcs7780.c | 987 -------- drivers/net/irda/mcs7780.h | 165 -- drivers/net/irda/nsc-ircc.c | 2410 -------------------- drivers/net/irda/nsc-ircc.h | 281 --- drivers/net/irda/old_belkin-sir.c | 146 -- drivers/net/irda/pxaficp_ir.c | 1076 --------- drivers/net/irda/sa1100_ir.c | 1150 ---------- drivers/net/irda/sh_sir.c | 810 ------- drivers/net/irda/sir-dev.h | 191 -- drivers/net/irda/sir_dev.c | 987 -------- drivers/net/irda/sir_dongle.c | 133 -- drivers/net/irda/smsc-ircc2.c | 3026 ------------------------- drivers/net/irda/smsc-ircc2.h | 191 -- drivers/net/irda/smsc-sio.h | 100 - drivers/net/irda/stir4200.c | 1134 --------- drivers/net/irda/tekram-sir.c | 225 -- drivers/net/irda/toim3232-sir.c | 358 --- drivers/net/irda/via-ircc.c | 1593 ------------- drivers/net/irda/via-ircc.h | 846 ------- drivers/net/irda/vlsi_ir.c | 1872 --------------- drivers/net/irda/vlsi_ir.h | 757 ------- drivers/net/irda/w83977af.h | 53 - drivers/net/irda/w83977af_ir.c | 1285 ----------- drivers/net/irda/w83977af_ir.h | 198 -- drivers/staging/Makefile | 1 + drivers/staging/irda/drivers/Kconfig | 398 ++++ drivers/staging/irda/drivers/Makefile | 42 + drivers/staging/irda/drivers/act200l-sir.c | 250 ++ drivers/staging/irda/drivers/actisys-sir.c | 245 ++ drivers/staging/irda/drivers/ali-ircc.c | 2218 ++++++++++++++++++ drivers/staging/irda/drivers/ali-ircc.h | 227 ++ drivers/staging/irda/drivers/au1k_ir.c | 989 ++++++++ drivers/staging/irda/drivers/bfin_sir.c | 817 +++++++ drivers/staging/irda/drivers/bfin_sir.h | 93 + drivers/staging/irda/drivers/donauboe.c | 1732 ++++++++++++++ drivers/staging/irda/drivers/donauboe.h | 362 +++ drivers/staging/irda/drivers/esi-sir.c | 157 ++ drivers/staging/irda/drivers/girbil-sir.c | 252 ++ drivers/staging/irda/drivers/irda-usb.c | 1914 ++++++++++++++++ drivers/staging/irda/drivers/irda-usb.h | 174 ++ drivers/staging/irda/drivers/irtty-sir.c | 570 +++++ drivers/staging/irda/drivers/irtty-sir.h | 34 + drivers/staging/irda/drivers/kingsun-sir.c | 634 ++++++ drivers/staging/irda/drivers/ks959-sir.c | 912 ++++++++ drivers/staging/irda/drivers/ksdazzle-sir.c | 813 +++++++ drivers/staging/irda/drivers/litelink-sir.c | 199 ++ drivers/staging/irda/drivers/ma600-sir.c | 253 +++ drivers/staging/irda/drivers/mcp2120-sir.c | 224 ++ drivers/staging/irda/drivers/mcs7780.c | 987 ++++++++ drivers/staging/irda/drivers/mcs7780.h | 165 ++ drivers/staging/irda/drivers/nsc-ircc.c | 2410 ++++++++++++++++++++ drivers/staging/irda/drivers/nsc-ircc.h | 281 +++ drivers/staging/irda/drivers/old_belkin-sir.c | 146 ++ drivers/staging/irda/drivers/pxaficp_ir.c | 1076 +++++++++ drivers/staging/irda/drivers/sa1100_ir.c | 1150 ++++++++++ drivers/staging/irda/drivers/sh_sir.c | 810 +++++++ drivers/staging/irda/drivers/sir-dev.h | 191 ++ drivers/staging/irda/drivers/sir_dev.c | 987 ++++++++ drivers/staging/irda/drivers/sir_dongle.c | 133 ++ drivers/staging/irda/drivers/smsc-ircc2.c | 3026 +++++++++++++++++++++++++ drivers/staging/irda/drivers/smsc-ircc2.h | 191 ++ drivers/staging/irda/drivers/smsc-sio.h | 100 + drivers/staging/irda/drivers/stir4200.c | 1134 +++++++++ drivers/staging/irda/drivers/tekram-sir.c | 225 ++ drivers/staging/irda/drivers/toim3232-sir.c | 358 +++ drivers/staging/irda/drivers/via-ircc.c | 1593 +++++++++++++ drivers/staging/irda/drivers/via-ircc.h | 846 +++++++ drivers/staging/irda/drivers/vlsi_ir.c | 1872 +++++++++++++++ drivers/staging/irda/drivers/vlsi_ir.h | 757 +++++++ drivers/staging/irda/drivers/w83977af.h | 53 + drivers/staging/irda/drivers/w83977af_ir.c | 1285 +++++++++++ drivers/staging/irda/drivers/w83977af_ir.h | 198 ++ drivers/staging/irda/net/Kconfig | 2 +- 97 files changed, 33485 insertions(+), 33485 deletions(-) commit 1ca163afb6fd569b6efdc221954177cba5a02cbc Author: Greg Kroah-Hartman Date: Sun Aug 27 17:03:31 2017 +0200 irda: move net/irda/ to drivers/staging/irda/net/ It's time to get rid of IRDA. It's long been broken, and no one seems to use it anymore. So move it to staging and after a while, we can delete it from there. To start, move the network irda core from net/irda to drivers/staging/irda/net/ Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/irda/net/Kconfig | 96 + drivers/staging/irda/net/Makefile | 15 + drivers/staging/irda/net/af_irda.c | 2695 ++++++++++++++++++++ drivers/staging/irda/net/discovery.c | 417 +++ drivers/staging/irda/net/ircomm/Kconfig | 12 + drivers/staging/irda/net/ircomm/Makefile | 8 + drivers/staging/irda/net/ircomm/ircomm_core.c | 563 ++++ drivers/staging/irda/net/ircomm/ircomm_event.c | 246 ++ drivers/staging/irda/net/ircomm/ircomm_lmp.c | 350 +++ drivers/staging/irda/net/ircomm/ircomm_param.c | 501 ++++ drivers/staging/irda/net/ircomm/ircomm_ttp.c | 350 +++ drivers/staging/irda/net/ircomm/ircomm_tty.c | 1329 ++++++++++ .../staging/irda/net/ircomm/ircomm_tty_attach.c | 987 +++++++ drivers/staging/irda/net/ircomm/ircomm_tty_ioctl.c | 291 +++ drivers/staging/irda/net/irda_device.c | 316 +++ drivers/staging/irda/net/iriap.c | 1085 ++++++++ drivers/staging/irda/net/iriap_event.c | 496 ++++ drivers/staging/irda/net/irias_object.c | 555 ++++ drivers/staging/irda/net/irlan/Kconfig | 14 + drivers/staging/irda/net/irlan/Makefile | 7 + drivers/staging/irda/net/irlan/irlan_client.c | 559 ++++ .../staging/irda/net/irlan/irlan_client_event.c | 511 ++++ drivers/staging/irda/net/irlan/irlan_common.c | 1176 +++++++++ drivers/staging/irda/net/irlan/irlan_eth.c | 340 +++ drivers/staging/irda/net/irlan/irlan_event.c | 60 + drivers/staging/irda/net/irlan/irlan_filter.c | 240 ++ drivers/staging/irda/net/irlan/irlan_provider.c | 408 +++ .../staging/irda/net/irlan/irlan_provider_event.c | 233 ++ drivers/staging/irda/net/irlap.c | 1207 +++++++++ drivers/staging/irda/net/irlap_event.c | 2316 +++++++++++++++++ drivers/staging/irda/net/irlap_frame.c | 1407 ++++++++++ drivers/staging/irda/net/irlmp.c | 1996 +++++++++++++++ drivers/staging/irda/net/irlmp_event.c | 886 +++++++ drivers/staging/irda/net/irlmp_frame.c | 476 ++++ drivers/staging/irda/net/irmod.c | 199 ++ drivers/staging/irda/net/irnet/Kconfig | 13 + drivers/staging/irda/net/irnet/Makefile | 7 + drivers/staging/irda/net/irnet/irnet.h | 522 ++++ drivers/staging/irda/net/irnet/irnet_irda.c | 1885 ++++++++++++++ drivers/staging/irda/net/irnet/irnet_irda.h | 178 ++ drivers/staging/irda/net/irnet/irnet_ppp.c | 1189 +++++++++ drivers/staging/irda/net/irnet/irnet_ppp.h | 116 + drivers/staging/irda/net/irnetlink.c | 162 ++ drivers/staging/irda/net/irproc.c | 96 + drivers/staging/irda/net/irqueue.c | 911 +++++++ drivers/staging/irda/net/irsysctl.c | 258 ++ drivers/staging/irda/net/irttp.c | 1891 ++++++++++++++ drivers/staging/irda/net/parameters.c | 584 +++++ drivers/staging/irda/net/qos.c | 771 ++++++ drivers/staging/irda/net/timer.c | 231 ++ drivers/staging/irda/net/wrapper.c | 492 ++++ net/Kconfig | 1 - net/Makefile | 1 - net/irda/Kconfig | 96 - net/irda/Makefile | 15 - net/irda/af_irda.c | 2695 -------------------- net/irda/discovery.c | 417 --- net/irda/ircomm/Kconfig | 12 - net/irda/ircomm/Makefile | 8 - net/irda/ircomm/ircomm_core.c | 563 ---- net/irda/ircomm/ircomm_event.c | 246 -- net/irda/ircomm/ircomm_lmp.c | 350 --- net/irda/ircomm/ircomm_param.c | 501 ---- net/irda/ircomm/ircomm_ttp.c | 350 --- net/irda/ircomm/ircomm_tty.c | 1329 ---------- net/irda/ircomm/ircomm_tty_attach.c | 987 ------- net/irda/ircomm/ircomm_tty_ioctl.c | 291 --- net/irda/irda_device.c | 316 --- net/irda/iriap.c | 1085 -------- net/irda/iriap_event.c | 496 ---- net/irda/irias_object.c | 555 ---- net/irda/irlan/Kconfig | 14 - net/irda/irlan/Makefile | 7 - net/irda/irlan/irlan_client.c | 559 ---- net/irda/irlan/irlan_client_event.c | 511 ---- net/irda/irlan/irlan_common.c | 1176 --------- net/irda/irlan/irlan_eth.c | 340 --- net/irda/irlan/irlan_event.c | 60 - net/irda/irlan/irlan_filter.c | 240 -- net/irda/irlan/irlan_provider.c | 408 --- net/irda/irlan/irlan_provider_event.c | 233 -- net/irda/irlap.c | 1207 --------- net/irda/irlap_event.c | 2316 ----------------- net/irda/irlap_frame.c | 1407 ---------- net/irda/irlmp.c | 1996 --------------- net/irda/irlmp_event.c | 886 ------- net/irda/irlmp_frame.c | 476 ---- net/irda/irmod.c | 199 -- net/irda/irnet/Kconfig | 13 - net/irda/irnet/Makefile | 7 - net/irda/irnet/irnet.h | 522 ---- net/irda/irnet/irnet_irda.c | 1885 -------------- net/irda/irnet/irnet_irda.h | 178 -- net/irda/irnet/irnet_ppp.c | 1189 --------- net/irda/irnet/irnet_ppp.h | 116 - net/irda/irnetlink.c | 162 -- net/irda/irproc.c | 96 - net/irda/irqueue.c | 911 ------- net/irda/irsysctl.c | 258 -- net/irda/irttp.c | 1891 -------------- net/irda/parameters.c | 584 ----- net/irda/qos.c | 771 ------ net/irda/timer.c | 231 -- net/irda/wrapper.c | 492 ---- 106 files changed, 31656 insertions(+), 31655 deletions(-) commit 5e9323219410eaecd36937a4c9c5f8de45dab412 Author: Toshi Kani Date: Wed Aug 23 16:54:44 2017 -0600 intel_pstate: convert to use acpi_match_platform_list() Convert to use acpi_match_platform_list() for the platform check. There is no change in functionality. Signed-off-by: Toshi Kani Acked-by: Srinivas Pandruvada Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 64 +++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 39 deletions(-) commit 5aa5911a0ed9355ebb02f83de4be9ba435a45a2c Author: Toshi Kani Date: Wed Aug 23 16:54:43 2017 -0600 ACPI / blacklist: add acpi_match_platform_list() ACPI OEM ID / OEM Table ID / Revision can be used to identify a platform based on ACPI firmware info. acpi_blacklisted(), intel_pstate_platform_pwr_mgmt_exists(), and some other funcs, have been using similar check to detect a list of platforms that require special handlings. Move the platform check in acpi_blacklisted() to a new common utility function, acpi_match_platform_list(), so that other drivers do not have to implement their own version. There is no change in functionality. Signed-off-by: Toshi Kani Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/blacklist.c | 83 ++++++++---------------------------------------- drivers/acpi/utils.c | 36 +++++++++++++++++++++ include/linux/acpi.h | 19 +++++++++++ 3 files changed, 69 insertions(+), 69 deletions(-) commit 9d8c7e5a87b175c3a956cd36989022be978ea1d4 Merge: 0df4958 52600dc Author: David S. Miller Date: Mon Aug 28 16:41:01 2017 -0700 Merge branch 'dpaa_eth-rss' Madalin Bucur says: ==================== Add RSS to DPAA 1.x Ethernet driver This patch set introduces Receive Side Scaling for the DPAA Ethernet driver. Documentation is updated with details related to the new feature and limitations that apply. Added also a small fix. v2: removed a C++ style comment v3: move struct fman to header file to avoid exporting a function v4: addressed compilation issues introduced in v3 ==================== Signed-off-by: David S. Miller commit 52600dcc9e3ac4c023edd48984f3005ab8191e71 Author: Madalin Bucur Date: Sun Aug 27 16:13:43 2017 +0300 dpaa_eth: check allocation result Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +++ 1 file changed, 3 insertions(+) commit 0659191630bd386d4ca76fdaa9b556cbdda48278 Author: Madalin Bucur Date: Sun Aug 27 16:13:42 2017 +0300 Documentation: networking: add RSS information Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller Documentation/networking/dpaa.txt | 68 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 056057e288e70755a423ddfd2e45b97cd147a411 Author: Madalin Bucur Date: Sun Aug 27 16:13:41 2017 +0300 dpaa_eth: add NETIF_F_RXHASH Set the skb hash when then FMan Keygen hash result is available. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 23 +++++++++++++++++++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 1 + drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 9 +++++++-- drivers/net/ethernet/freescale/fman/fman_port.c | 11 +++++++++++ drivers/net/ethernet/freescale/fman/fman_port.h | 2 ++ 5 files changed, 41 insertions(+), 5 deletions(-) commit bcf0994b23fed62cfd55e922e74b0dd43958e6fd Author: Madalin Bucur Date: Sun Aug 27 16:13:40 2017 +0300 dpaa_eth: enable Rx hashing control Allow ethtool control of the Rx flow hashing. By default RSS is enabled, this allows to turn it off by bypassing the FMan Keygen block and sending all traffic on the default Rx frame queue. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 3150b7c20b862896b1ac9467440a2febe1d11bc0 Author: Madalin Bucur Date: Sun Aug 27 16:13:39 2017 +0300 dpaa_eth: use multiple Rx frame queues Add a block of 128 Rx frame queues per port. The FMan hardware will send traffic on one of these queues based on the FMan port Parse Classify Distribute setup. The hash computed by the FMan Keygen block will select the Rx FQ. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 50 +++++++++++++++++++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 1 + .../net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c | 3 ++ 3 files changed, 47 insertions(+), 7 deletions(-) commit 7472f4f281d0f7c9cf66494b70a64c5ea5ca67da Author: Iordache Florinel-R70177 Date: Sun Aug 27 16:13:38 2017 +0300 fsl/fman: enable FMan Keygen Add support for the FMan Keygen with a hardcoded scheme to spread incoming traffic on a FQ range based on source and destination IPs and ports. Signed-off-by: Iordache Florinel Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Makefile | 2 +- drivers/net/ethernet/freescale/fman/fman.c | 8 + drivers/net/ethernet/freescale/fman/fman.h | 2 + drivers/net/ethernet/freescale/fman/fman_keygen.c | 783 ++++++++++++++++++++++ drivers/net/ethernet/freescale/fman/fman_keygen.h | 46 ++ drivers/net/ethernet/freescale/fman/fman_port.c | 40 +- drivers/net/ethernet/freescale/fman/fman_port.h | 5 + 7 files changed, 884 insertions(+), 2 deletions(-) commit ca58ce576662eab2dc71f6af120dd07d8e11a925 Author: Madalin Bucur Date: Sun Aug 27 16:13:37 2017 +0300 fsl/fman: move struct fman to header file Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 80 +------------------------ drivers/net/ethernet/freescale/fman/fman.h | 75 +++++++++++++++++++++++ drivers/net/ethernet/freescale/fman/fman_port.c | 8 +-- 3 files changed, 82 insertions(+), 81 deletions(-) commit 5c50f1d18f6bdd8ff8d274479b8bf0d89ab5a47d Author: Andrew Boyer Date: Mon Aug 28 16:11:59 2017 -0400 IB/rxe: Handle NETDEV_CHANGE events Without this fix, ports configured on top of ixgbe miss link up notifications. ibv_query_port() will continue to return IBV_PORT_DOWN even though the port is up and working. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 13eb1e21d6198c9068eab7e7cb68c6d5c6834d1b Author: Andrew Boyer Date: Mon Aug 28 16:11:58 2017 -0400 IB/rxe: Avoid ICRC errors by copying into the skb first The current process is to first calculate the CRC and then copy the client data into the packet. This leaves a window in which the packet contents and CRC can get out of sync, if the client changes the data after the CRC is calculated but before the data is copied. By copying the data into the packet and then calculating the CRC directly from the packet contents we eliminate the window. This can be seen with qperf's ud_bi_bw test. This seems like very strange/reckless client behavior, but whether the client has mangled its data or not RXE should be able to transfer it reliably. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_mr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1223a1af75a85356ec5f5e5a097b60d26f25ff15 Author: Andrew Boyer Date: Mon Aug 28 16:11:57 2017 -0400 IB/rxe: Another fix for broken receive queue draining This fixes another path in rxe_requester() that might overlook stale SKBs, preventing cleanup. Fixes: 1217197142d1 ("rxe: fix broken receive queue draining") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2418adaed1ab614438d7995c500b1d219b138add Author: Andrew Boyer Date: Mon Aug 28 16:11:56 2017 -0400 IB/rxe: Remove unneeded initialization in prepare6() Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 825a51a4af82fd90c1fd98b080439d8593972457 Author: Andrew Boyer Date: Mon Aug 28 16:11:55 2017 -0400 IB/rxe: Fix up rxe_qp_cleanup() Replace sk_dst_get()/dst_release() in rxe_qp_cleanup() with sk_dst_reset(). sk_dst_get() takes a new reference on dst, so the dst_release() doesn't actually release the original reference, which was the design intent. Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_qp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 48c22be4abaf3925e8ff74fb3ce5214b082ca989 Author: Andrew Boyer Date: Mon Aug 28 16:11:54 2017 -0400 IB/rxe: Add dst_clone() in prepare_ipv6_hdr() Otherwise the reference count goes negative as IPv6 packets complete. Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9109b7ddb13a52b379c3e57d9b1d74d7445e94d Author: Andrew Boyer Date: Mon Aug 28 16:11:53 2017 -0400 IB/rxe: Fix destination cache for IPv6 To successfully match an IPv6 path, the path cookie must match. Store it in the QP so that the IPv6 path can be reused. Replace open-coded version of dst_check() with the actual call, fixing the logic. The open-coded version skips the check call if dst->obsolete is 0 (DST_OBSOLETE_NONE), proceeding to replace the route. DST_OBSOLETE_NONE means that the route may continue to be used, though. Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 7 ++++++- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit d45d29567f87492e467ec854e0e81ad847c9b840 Author: Andrew Boyer Date: Mon Aug 28 16:11:52 2017 -0400 IB/rxe: Fix up the responder's find_resources() function The resource array is sized by max_dest_rd_atomic, not max_rd_atomic. Iterating over max_rd_atomic entries of qp->resp.resources[] will cause incorrect behavior when the two attributes are different (or even crash if max_rd_atomic is larger). Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cffec53daf9f9a87e4e532da1dfaac4bbfcc2e29 Author: Andrew Boyer Date: Mon Aug 28 16:11:51 2017 -0400 IB/rxe: Remove dangling prototype Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer Acked-by: Moni Shoua Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_loc.h | 2 -- 1 file changed, 2 deletions(-) commit bfc3ae05660e928b34034e668a82c334111c0c22 Author: Andrew Boyer Date: Mon Aug 28 16:11:50 2017 -0400 IB/rxe: Disable completion upcalls when a CQ is destroyed This prevents the stack from accessing userspace objects while they are being torn down. One possible sequence of events: - Userspace program exits - ib_uverbs_cleanup_ucontext() runs, calling ib_destroy_qp(), ib_destroy_cq(), etc. and releasing/freeing the UCQ - The QP still has tasklets running, so it isn't destroyed yet - The CQ is referenced by the QP, so the CQ isn't destroyed yet - The UCQ is kfree()'d anyway - A send work request completes - rxe_send_complete() calls cq->ibcq.comp_handler() - ib_uverbs_comp_handler() runs and crashes; the event queue is checked for is_closed, but it has no way to check the ib_ucq_object before accessing it The reference counting on the CQ doesn't protect against this since the CQ hasn't been destroyed yet. There's no available interface to deregister the UCQ from the CQ, and it didn't appear that attempting to add reference counting to the UCQ was going to be a good way to go since this solution is much simpler. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_cq.c | 19 +++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_loc.h | 2 ++ drivers/infiniband/sw/rxe/rxe_verbs.c | 2 ++ drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 4 files changed, 24 insertions(+) commit 9eb7f8e44d13cd2a565a5f088c8a842810270757 Author: Andrew Boyer Date: Mon Aug 28 16:11:49 2017 -0400 IB/rxe: Move refcounting earlier in rxe_send() The network stack will call nskb's destructor, rxe_skb_tx_dtor(), if the packet gets dropped by ip_local_out()/ip6_local_out(). Thus we need to add the QP ref before output to avoid extra dereferences during network congestion. This could lead to unwanted destruction of the QP. Fix up the skb_out accounting, too. Fixes: fda85ce91240 ("IB/rxe: Fix kernel panic from skb destructor") Signed-off-by: Andrew Boyer Acked-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0208da90def5776cef940f9de4ffe6ecef346207 Author: Mike Marciniszyn Date: Mon Aug 28 11:24:10 2017 -0700 IB/rdmavt: Handle dereg of inuse MRs properly A destroy of an MR prior to destroying the QP can cause the following diagnostic if the QP is referencing the MR being de-registered: hfi1 0000:05:00.0: hfi1_0: rvt_dereg_mr timeout mr ffff8808562108 00 pd ffff880859b20b00 The solution is to when the a non-zero refcount is encountered when the MR is destroyed the QPs needs to be iterated looking for QPs in the same PD as the MR. If rvt_qp_mr_clean() detects any such QP references the rkey/lkey, the QP needs to be put into an error state via a call to rvt_qp_error() which will trigger the clean up of any stuck references. This solution is as specified in IBTA 1.3 Volume 1 11.2.10.5. [This is reproduced with the 0.4.9 version of qperf and the rc_bw test] Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mr.c | 121 ++++++++++++++++++++++++++++++++------ drivers/infiniband/sw/rdmavt/qp.c | 112 +++++++++++++++++++++++++++++++++-- include/rdma/rdmavt_mr.h | 3 + include/rdma/rdmavt_qp.h | 1 + 4 files changed, 216 insertions(+), 21 deletions(-) commit 557fafe1bfecb50c3da0bc4948ebcbc4d19f1619 Author: Mike Marciniszyn Date: Mon Aug 28 11:24:04 2017 -0700 IB/qib: Convert qp_stats debugfs interface to use new iterator API Continue porting copy/paste code into rdmavt from qib. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_debugfs.c | 18 +++++------- drivers/infiniband/hw/qib/qib_qp.c | 51 +++++---------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 10 ++----- 3 files changed, 16 insertions(+), 63 deletions(-) commit e5c197ac35950659a44b2032d6b31defbe631bf9 Author: Mike Marciniszyn Date: Mon Aug 28 11:23:58 2017 -0700 IB/hfi1: Convert qp_stats debugfs interface to use new iterator API Continue moving copy/paste code into rdmavt. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 15 +++---- drivers/infiniband/hw/hfi1/qp.c | 83 +++--------------------------------- drivers/infiniband/hw/hfi1/qp.h | 23 +--------- 3 files changed, 14 insertions(+), 107 deletions(-) commit dff2fe7e8cd92435a93555b29d9d95fed955c558 Author: Mike Marciniszyn Date: Mon Aug 28 11:23:51 2017 -0700 IB/hfi1: Convert hfi1_error_port_qps() to use new QP iterator Change hfi1_error_port_qps() to use the new rvt_qp_iter() in its QP scanning. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 79 +++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 38 deletions(-) commit 4734b4f417126e8773b3983122ca935d02af80de Author: Mike Marciniszyn Date: Mon Aug 28 11:23:45 2017 -0700 IB/rdmavt: Add QP iterator API for QPs There are currently 3 spots in the qib and hfi1 driver that have knowledge of the internal QP hash list that should only be in scope to rdmavt QP code. Add an iterator API for processing all QPs to hide the nature of the RCU hashlist. The API consists of: - rvt_qp_iter_init() * For iterating QPs one at a time for seq_file semantics - rvt_qp_iter_next() * For iterating QPs one at a time for seq_file semantics - rvt_qp_iter() * For iterating all QPs The first two are used for things like seq_file prints. The last is for code that just needs to iterate all QPs in the system. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 144 ++++++++++++++++++++++++++++++++++++++ include/rdma/rdmavt_qp.h | 29 ++++++++ 2 files changed, 173 insertions(+) commit 4b9796b0a6fbb6e4678002b3f09392192502fd14 Author: Kaike Wan Date: Mon Aug 28 11:23:39 2017 -0700 IB/hfi1: Use accessor to determine ring size The qp_stats print will soon be moving to rdmavt, so use the proper accessor to get the ring size rather than a driver supplied constant. Fixes: Commit ff8d836efe06 ("IB/hfi1: Add receiving queue info to qp_stats") Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6167a5b4b5f97d9fc09a99842bd3aa149654ffcf Author: Kamenee Arumugam Date: Mon Aug 28 11:23:33 2017 -0700 IB/qib: Stricter bounds checking for copy to buffer Replace 'strcpy' with 'strncpy' to restrict the number of bytes copied to the buffer. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34ab4de77fe512ba3aeabdcdc97504bd19791511 Author: Michael J. Ruhl Date: Mon Aug 28 11:23:27 2017 -0700 IB/hif1: Remove static tracing from SDMA hot path The hfi1_cdbg() macro can be instantiated in the hot path even when it is not in use. This shows up on perf profiles. Rework the macros (for SDMA and MMU), to use the trace interface directly to eliminate this performance hit. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 3 +- drivers/infiniband/hw/hfi1/mmu_rb.c | 13 ++-- drivers/infiniband/hw/hfi1/trace.h | 3 +- drivers/infiniband/hw/hfi1/trace_mmu.h | 95 +++++++++++++++++++++++ drivers/infiniband/hw/hfi1/trace_tx.h | 136 ++++++++++++++++++++++++++++++++- drivers/infiniband/hw/hfi1/user_sdma.c | 31 ++++---- drivers/infiniband/hw/hfi1/user_sdma.h | 3 - 7 files changed, 255 insertions(+), 29 deletions(-) commit ba81a427c35c827bb220f1a87231b3460e0bd879 Author: Jan Sokolowski Date: Mon Aug 28 11:23:21 2017 -0700 IB/hfi1: Acquire QSFP cable information on loopback Currently, QSFP information is not queried in cases where loopback was set up and QSFP module is present. Acquire QSFP information in case of loopback. Reviewed-by: Dennis Dalessandro Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/platform.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cfeca08faf452acaf807576859275968cdb7e7a2 Author: Bhumika Goyal Date: Mon Aug 28 21:51:23 2017 +0530 i40iw: make some structures const Make some structures const as they are only used during a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_uk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 733da3bcb3a1293fab1e7703982540dde847d716 Author: Arvind Yadav Date: Mon Aug 28 09:59:28 2017 +0530 IB/hfi1: constify vm_operations_struct vm_operations_struct are not supposed to change at runtime. vm_area_struct structure working with const vm_operations_struct. So mark the non-const vm_operations_struct structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d72d6c4ec1e3761e8cfc69d58d498b2dbe46341 Author: Himanshu Jha Date: Fri Aug 25 21:41:02 2017 +0530 RDMA/bnxt_re: 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. Signed-off-by: Himanshu Jha Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 -- 1 file changed, 2 deletions(-) commit d518a44d317d92f4c297ea26a308b1ac1a980d33 Author: Dan Carpenter Date: Fri Aug 25 11:43:59 2017 +0300 IB/usnic: check for allocation failure usnic_uiom_get_dev_list() can return ERR_PTR(-ENOMEM) so we should check for that. Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver") Signed-off-by: Dan Carpenter Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 280ad49a97ee7adf5c86f70f7ea1ff60a755b294 Author: Mike Marciniszyn Date: Mon Aug 21 18:27:48 2017 -0700 IB/hfi1: Add opcode states to qp_stats These fields allow for debugging send engine processing. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 642aaab5a63c043c593ba9e9a86aadd388313e56 Author: Kaike Wan Date: Mon Aug 21 18:27:41 2017 -0700 IB/hfi1: Add received request info to qp_stats The rvt_ack_entry pointed to by s_tail_ack_queue provides important info about the request that has just been processed or is being processed on the responder side of a RC connection. This patch adds this info to the qp_stats to assist debugging. Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d68e68e5fb7134427c6d79c58beaaf869543f3f7 Author: Kamenee Arumugam Date: Mon Aug 21 18:27:35 2017 -0700 IB/hfi1: Fix whitespace alignment issue for MAD Fix a tab alignment issue present in pr_err_ratelimited error message. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32500f2763906602725006f1dc833c8ea28dfd07 Author: Harish Chegondi Date: Mon Aug 21 18:27:29 2017 -0700 IB/hfi1: Move structure and MACRO definitions in user_sdma.c to user_sdma.h Clean up user_sdma.c by moving the structure and MACRO definitions into the header file user_sdma.h Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 168 --------------------------------- drivers/infiniband/hw/hfi1/user_sdma.h | 166 ++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+), 168 deletions(-) commit 637f4600a8d3be44146ad7fbb5188484c3b0a1d4 Author: Harish Chegondi Date: Mon Aug 21 18:27:23 2017 -0700 IB/hfi1: Move structure definitions from user_exp_rcv.c to user_exp_rcv.h Clean up user_exp_rcv.c file by moving structure definitions into header file user_exp_rcv.h. Since these structure definitions depend on the structure definitions in mmu_rb.h, move #include "mmu_rb.h" above the include "user_exp_rcv.h" or include of header files that include user_exp_rcv.h Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 2 +- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 18 +----------------- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 16 ++++++++++++++++ drivers/infiniband/hw/hfi1/user_sdma.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) commit ddd3affb50015c3c7ee218b83e73e646aa48e212 Author: Harish Chegondi Date: Mon Aug 21 18:27:16 2017 -0700 IB/hfi1: Remove duplicate definitions of num_user_pages() function num_user_pages() function has been defined in both user_exp_rcv.c file and user_sdma.c file. Move the function definition to a header file so there is only one definition in the source repo. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5 ----- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 9 +++++++++ drivers/infiniband/hw/hfi1/user_sdma.c | 18 +++--------------- 3 files changed, 12 insertions(+), 20 deletions(-) commit 04a646df12766e4e11ecf09cd0336dab69d75034 Author: Harish Chegondi Date: Mon Aug 21 18:27:09 2017 -0700 IB/hfi1: Fix the bail out code in pin_vector_pages() function In pin_vector_pages() function, if there is any error while pinning the pages or while adding a pinned buffer to the cache, the bail out code needs to unpin any pinned pages that are not in the cache and adjust the n_locked counter that counts the total pages pinned. The current bail out code doesn't seem to be doing it right in two cases: 1. Before pinning required pages for a buffer, the SDMA pinned buffer cache is searched to see if the virtual address range that needs to be pinned is already pinned. If there isn't a hit in the cache, a new node is created for the buffer and is added to the cache after the buffer is pinned. If adding the new node to the cache fails, the n_locked count is decremented properly but the pinned pages are not freed. This commit fixes this issue. 2. If there is a hit in the SDMA cache, but the cached buffer doesn't have enough pages to cover the entire address range that needs to be pinned, the node for the cached buffer is extracted from the cache, remaining pages needed are pinned and added to the node. The node is finally added back into the cache. If there is an error pinning the extra pages, the bail out code frees all the pages in the node but the n_locked count is not being decremented by the no of pages in the node that are freed. This commit fixes this issue. This commit fixes the above two issues by creating a new function that frees the pages in a node and decrements the n_locked count by the number of pages freed. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 4c6c9aa6cbb0574c96635f3e4e1c5791e8fafca7 Author: Harish Chegondi Date: Mon Aug 21 18:27:03 2017 -0700 IB/hfi1: Clean up pin_vector_pages() function Clean up pin_vector_pages() function by moving page pinning related code to a separate function since it really stands on its own. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 79 +++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 34 deletions(-) commit 624b9ac15c3cf0896721e76f4e23ab0d25148119 Author: Harish Chegondi Date: Mon Aug 21 18:26:57 2017 -0700 IB/hfi1: Clean up user_sdma_send_pkts() function user_sdma_send_pkts() function is unnecessarily long. Clean it up by moving some of its code into separate functions. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 141 +++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 59 deletions(-) commit 9dc117095570e7a230f8f9229a70713c335d9e2a Author: Harish Chegondi Date: Mon Aug 21 18:26:51 2017 -0700 IB/hfi1: Clean up hfi1_user_exp_rcv_setup function Clean up hfi1_user_exp_rcv_setup function by moving page pinning and unpinning related code to separate functions. In order to reduce the number of parameters passed between functions, a new data structure struct tid_user_buf is defined and used. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_exp_rcv.c | 232 ++++++++++++++++++------------ drivers/infiniband/hw/hfi1/user_exp_rcv.h | 9 ++ 2 files changed, 153 insertions(+), 88 deletions(-) commit 7956371ea48bd00956219a82fd3af655dd216073 Author: Michael J. Ruhl Date: Mon Aug 21 18:26:45 2017 -0700 IB/hfi1: Improve local kmem_cache_alloc performance Performance analysis shows that the cache callback function sdma_kmem_cache_ctor contributes to 1/2 of the kmem_cache_allocs time. Since all of the fields in the allocated data structure are initialized in the code path, remove the _ctor function. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 9 +-------- drivers/infiniband/hw/hfi1/verbs_txreq.c | 11 ++--------- drivers/infiniband/hw/hfi1/vnic_sdma.c | 13 +++---------- 3 files changed, 6 insertions(+), 27 deletions(-) commit de42de80d7bb4f82e30d16f5c64da90e64b6c644 Author: Grzegorz Morys Date: Mon Aug 21 18:26:38 2017 -0700 IB/hfi1: Ratelimit prints from sdma_interrupt Ratelimit error prints from sdma_interrupt function that could swarm dmesg otherwise. Reviewed-by: Dennis Dalessandro Signed-off-by: Grzegorz Morys Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++-- drivers/infiniband/hw/hfi1/hfi.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 27147273a68ecf5738ef87ccc6cd4bb8883fca84 Author: Kamenee Arumugam Date: Mon Aug 21 18:26:32 2017 -0700 IB/qib: Stricter bounds checking for copy and array access Added checking on index value of array 'guids' in qib_ruc.c. Pass in corrrect size of array for memset operation in qib_mad.c. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_mad.c | 4 ++-- drivers/infiniband/hw/qib/qib_ruc.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 3b7169338c1caad4d17ed5d9ed412f813c919cd2 Author: Kamenee Arumugam Date: Mon Aug 21 18:26:26 2017 -0700 IB/qib: Remove unnecessary memory allocation for boardname Remove all the memory allocation implemented for boardname and directly assign the defined string literal. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba6120.c | 20 ++++++----------- drivers/infiniband/hw/qib/qib_iba7220.c | 22 +++++++----------- drivers/infiniband/hw/qib/qib_iba7322.c | 40 ++++++++++++++------------------- drivers/infiniband/hw/qib/qib_init.c | 1 - 4 files changed, 32 insertions(+), 51 deletions(-) commit 5b0ef650bd0f820e922fcc42f1985d4621ae19cf Author: Mike Marciniszyn Date: Mon Aug 21 18:26:20 2017 -0700 IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation Section 9.7.7.2.5 of the 1.3 IBTA spec clearly says that receive credits should never apply to RDMA write. qib and hfi1 were doing that. The following situation will result in a QP hang: - A prior SEND or RDMA_WRITE with immmediate consumed the last credit for a QP using RC receive buffer credits - The prior op is acked so there are no more acks - The peer ULP fails to post receive for some reason - An RDMA write sees that the credits are exhausted and waits - The peer ULP posts receive buffers - The ULP posts a send or RDMA write that will be hung The fix is to avoid the credit test for the RDMA write operation. Cc: Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 3 ++- drivers/infiniband/hw/qib/qib_rc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 3aaee8ab47a2485ad53c0a2d94945f0105d9feab Author: Mike Marciniszyn Date: Mon Aug 21 18:26:14 2017 -0700 IB/rdmavt: Use rvt_put_swqe() in rvt_clear_mr_ref() hfi1 and qib were converted in previous patches, do the same for rdmavt. Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0df49584ed6f0e99f3e16d6b10acef32fe21ce0d Author: Himanshu Jha Date: Sun Aug 27 01:47:47 2017 +0530 net: ethernet: broadcom: 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: David S. Miller drivers/net/ethernet/broadcom/sb1250-mac.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit f9ab7425b312f8a41339389e83b238c3242e8429 Author: Gao Feng Date: Sat Aug 26 22:58:58 2017 +0800 sched: sfq: drop packets after root qdisc lock is released The commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock is released) made a big change of tc for performance. But there are some points which are not changed in SFQ enqueue operation. 1. Fail to find the SFQ hash slot; 2. When the queue is full; Now use qdisc_drop instead free skb directly. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/sched/sch_sfq.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 4154bb821f0bc63eab4de67f59058c5c2a718862 Author: Arvind Yadav Date: Sat Aug 26 16:58:48 2017 +0530 sparc: leon: grpci1: constify of_device_id of_device_id are not supposed to change at runtime. All functions working with of_device_id provided by work with const of_device_ids. So mark the const and __initconst. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/leon_pci_grpci1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03949b1cb9f1aa34379ad34d388668e40e79fb9b Author: Arvind Yadav Date: Sat Aug 26 16:58:34 2017 +0530 sparc: leon: grpci2: constify of_device_id of_device_id are not supposed to change at runtime. All functions working with of_device_id provided by work with const of_device_ids. So mark the const and __initconst. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller arch/sparc/kernel/leon_pci_grpci2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7423eea52770935e3c36fafe511ef9aa5e0fc6d Merge: ae0078f 18fed7e Author: David S. Miller Date: Mon Aug 28 15:41:15 2017 -0700 Merge branch 'mlxsw-dpipe-fixes' Jiri Pirko says: ==================== mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs Arkadi Sharshevsky (1): mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko (1): mlxsw: spectrum: compile-in dpipe support only if devlink is enabled ==================== Signed-off-by: David S. Miller commit 18fed7e15d8fd38747819ee8e66c8771e0281226 Author: Arkadi Sharshevsky Date: Sat Aug 26 08:35:39 2017 +0200 mlxsw: spectrum_dpipe: Fix host table dump During the neighbor traversal the neighbors from different families should be ignored. Fixes: c58035a74aba ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump") Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 +++ 1 file changed, 3 insertions(+) commit 10bfec0a2b4b9d3b81e09b43266ebe370bb17760 Author: Jiri Pirko Date: Sat Aug 26 08:35:38 2017 +0200 mlxsw: spectrum: compile-in dpipe support only if devlink is enabled Makes no sense to have dpipe compiled in when devlink is not enabled, because the devlink dpipe registation is noop function. So don't compile it in. This also fixes missing extern structs errors. Reported-by: kbuild test robot Fixes: a86f030915f2 ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit c6b4ee9eba97b64750d5e8be31c04b70592592b7 Author: Dan Carpenter Date: Sat Aug 26 09:12:05 2017 +0300 sparc64: vcc: Check for IS_ERR() instead of NULL The tty_alloc_driver() function never returns NULL, it returns error pointers on error. Fixes: ce808b746325 ("sparc64: vcc: TTY driver initialization and cleanup") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/tty/vcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae0078fcf0a5eb3a8623bfb5f988262e0911fdb9 Author: Dexuan Cui Date: Sat Aug 26 04:52:43 2017 +0000 hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It uses VMBus ringbuffer as the transportation layer. With hv_sock, applications between the host (Windows 10, Windows Server 2016 or newer) and the guest can talk with each other using the traditional socket APIs. More info about Hyper-V Sockets is available here: "Make your own integration services": https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service The patch implements the necessary support in Linux guest by introducing a new vsock transport for AF_VSOCK. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Andy King Cc: Dmitry Torokhov Cc: George Zhang Cc: Jorgen Hansen Cc: Reilly Grant Cc: Asias He Cc: Stefan Hajnoczi Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Rolf Neugebauer Cc: Marcelo Cerri Signed-off-by: David S. Miller MAINTAINERS | 1 + net/vmw_vsock/Kconfig | 12 + net/vmw_vsock/Makefile | 3 + net/vmw_vsock/hyperv_transport.c | 904 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 920 insertions(+) commit 7cadf2cbe8051dd43cb340d02d0d30960f061ac2 Author: Jakub Kicinski Date: Fri Aug 25 14:39:57 2017 -0700 selftests/bpf: check the instruction dumps are populated Add a basic test for checking whether kernel is populating the jited and xlated BPF images. It was used to confirm the behaviour change from commit d777b2ddbecf ("bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()"), which made bpf_obj_get_info_by_fd() usable for retrieving the image dumps. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_progs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 1d5d820b8fe83b5f859d1ebb028a09ada426447e Author: Yazen Ghannam Date: Mon Aug 28 13:13:14 2017 -0500 ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources ACPI defines a number of instructions to use for triggering errors. However we are currently removing the address resources from the trigger resources for only the WRITE_REGISTER_VALUE instruction. This leads to a resource conflict for any other valid instruction. Check that the instruction is less than or equal to the WRITE_REGISTER_VALUE instruction. This allows all valid memory access instructions and protects against invalid instructions. Fixes: b4e008dc53a3 (ACPI, APEI, EINJ, Refine the fix of resource conflict) Signed-off-by: Yazen Ghannam Acked-by: Tony Luck Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/einj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a9f429ffbac64b6d1b7c478f9c049cd3badbaa1 Merge: cc4a41f 9e14de1 Author: Rafael J. Wysocki Date: Tue Aug 29 00:27:12 2017 +0200 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq Pull devfreq changes for v4.14 from MyungJoo Ham. * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Fix memory leak when fail to register device PM / devfreq: Add dependency on PM_OPP PM / devfreq: Move private devfreq_update_stats() into devfreq PM / devfreq: Convert to using %pOF instead of full_name commit f740c34ee5cf62e1fff5ebec6d0e63efcc3cdfe9 Author: Dan Carpenter Date: Fri Aug 25 23:27:14 2017 +0300 bpf: fix oops on allocation failure "err" is set to zero if bpf_map_area_alloc() fails so it means we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting NULL returns and will oops. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: Dan Carpenter Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 1 + 1 file changed, 1 insertion(+) commit fded5fc8412a0bfadd2b130433109a5be7ffdf82 Author: Leonard Crestez Date: Mon Aug 28 14:05:18 2017 +0300 cpufreq: imx6q: Fix imx6sx low frequency support This patch contains the minimal changes required to support imx6sx OPP of 198 Mhz. Without this patch cpufreq still reports success but the frequency is not changed, the "arm" clock will still be at 396000000 in clk_summary. In order to do this PLL1 needs to be still kept enabled while changing the ARM clock. This is a hardware requirement: when ARM_PODF is changed in CCM we need to check the busy bit of CCM_CDHIPR bit 16 arm_podf_busy, and this bit is sync with PLL1 clock, so if PLL1 NOT enabled, this bit will never get clear. Keep pll1_sys explicitly enabled until after the rate is change to deal with this. Otherwise from the clk framework perspective pll1_sys is unused and gets turned off. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 843791bb6c76b1f808951b284be5c10ee47fd245 Author: Colin Ian King Date: Fri Aug 25 18:00:16 2017 +0100 cpufreq: speedstep-lib: make several arrays static, makes code smaller Don't populate arrays on the stack, instead make them static. Makes the object code smaller by over 860 bytes: Before: text data bss dec hex filename 10716 5196 0 15912 3e28 drivers/cpufreq/speedstep-lib.o After: text data bss dec hex filename 9690 5356 0 15046 3ac6 drivers/cpufreq/speedstep-lib.o Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/cpufreq/speedstep-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28923f6b74060b183207a373ddae4ce4948cabea Author: Liav Rehana Date: Thu Jun 15 11:44:00 2017 +0300 ARC: [plat-eznps] handle extra aux regs #2: kernel/entry exit Preserve eflags and gpa1 aux during entry/exit into kernel as these could be modified by kernel mode These registers used by compare exchange instructions. - GPA1 is used for compare value, - EFLAGS got bit reflects atomic operation response. EFLAGS is zeroed for each new user task so it won't get its parent value. Signed-off-by: Liav Rehana Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-compact.h | 24 ++++++++++++++++++++++++ arch/arc/include/asm/ptrace.h | 5 +++++ arch/arc/kernel/process.c | 4 ++++ 3 files changed, 33 insertions(+) commit 5b2189ab6ee0717babac912f779dcd440e942173 Author: Noam Camus Date: Thu Jun 15 11:43:59 2017 +0300 ARC: [plat-eznps] handle extra aux regs #1: save/restore on context switch save EFLAGS, and GPA1 auxiliary registers during context switch, since they may be changed by the new task in kernel mode, while using atomic ops e.g. cmpxchg. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/include/asm/processor.h | 10 ++++++++++ arch/arc/include/asm/switch_to.h | 9 +++++++++ arch/arc/plat-eznps/Makefile | 2 +- arch/arc/plat-eznps/ctop.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) commit 3f9cd874dcc8705b53c03431f0ae46c94e572349 Author: Elad Kanfi Date: Thu Jun 15 11:44:01 2017 +0300 ARC: [plat-eznps] avoid toggling of DPC register HW bug description: in case of HW thread context switch the dpc configuration of the exiting thread is dragged one cycle into the next thread. In order to avoid the consequences of this bug, the DPC register is set to an initial value, and not changed afterwards. Signed-off-by: Elad Kanfi Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/plat-eznps/include/plat/ctop.h | 1 + arch/arc/plat-eznps/mtm.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit abd8926bff32df82d0fb8322b9fe382774f630b5 Author: Liav Rehana Date: Thu Jun 15 11:43:58 2017 +0300 ARC: [plat-eznps] Update the init sequence of aux regs per cpu. This commit add new configuration that enables us to distinguish between building the kernel for platforms that have a different set of auxiliary registers for each cpu and platforms that have a shared set of auxiliary registers across every thread in each core. On platforms that implement a different set of auxiliary registers disabling this configuration insures that we initialize registers on every cpu and not just for the first thread of the core. Example for non shared registers is working with EZsim (non silicon) Signed-off-by: Liav Rehana Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/plat-eznps/Kconfig | 11 +++++++++++ arch/arc/plat-eznps/entry.S | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) commit 35b55ef2b8f5aeedf349a1fe2ad8b11d5974f3f1 Author: Noam Camus Date: Thu Jun 15 11:43:57 2017 +0300 ARC: [plat-eznps] new command line argument for HW scheduler at MTM We add ability for all cores at NPS SoC to control the number of cycles HW thread can execute before it is replace with another eligible HW thread within the same core. The replacement is done by the HW scheduler. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta [vgupta: simplified handlign of out of range argument value] Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ arch/arc/plat-eznps/mtm.c | 27 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) commit 18ee4becb5a9f52d0808347279bece447ef5a217 Author: Noam Camus Date: Thu Jun 15 11:43:51 2017 +0300 ARC: set boot print log level to PR_INFO Some of the boot printing code had printk() w/o explicit log level. This patch introduces consistency allowing platforms to switch to less verbose console logging using cmdline. NPS400 with 4K CPUs needs to avoid the cpu info printing for faster bootup. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 6 +++--- arch/arc/mm/cache.c | 2 +- arch/arc/mm/tlb.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 983394959f5edff6b39bcd10317badaaf33efa99 Author: Noam Camus Date: Tue Jun 13 17:03:45 2017 +0300 ARC: [plat-eznps] Handle user memory error same in simulation and silicon On ARC700 (and nSIM), user mode memory error triggers an L2 interrupt which is handled gracefully by kernel (or it tries to despite this being imprecise, and error could get charged to kernel itself). The offending task is killed and kernel moves on. NPS hardware however raises a Machine Check exception for same error which is NOT recoverable by kernel. This patch aligns kernel handling for nSIM case, to same as hardware by overriding the default user space bus error handler. Signed-off-by: Noam Camus Signed-off-by: Elad Kanfi [vgupta: rewrote changelog] Signed-off-by: Vineet Gupta arch/arc/kernel/traps.c | 2 +- arch/arc/plat-eznps/Kconfig | 11 +++++++++++ arch/arc/plat-eznps/mtm.c | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) commit 644fa02b392e25d7592951da2b2b64b4d533d1be Author: Noam Camus Date: Sun May 28 09:52:06 2017 +0300 ARC: [plat-eznps] use schd.wft instruction instead of sleep at idle task When HW threads are active we want CPU to enter idle state only for the calling HW thread and not to put on sleep all HW threads sharing this core. For this need the NPS400 got dedicated instruction so only calling thread is entring sleep and all other are still awake and can execute instructions. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta [vgupta: reworked patch to not use inline ifdef but a new function itself] arch/arc/kernel/process.c | 13 ++++++++++++- arch/arc/plat-eznps/include/plat/ctop.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) commit 64f42cec84deb32fdaf24649481c72fcd7800dc1 Author: Vineet Gupta Date: Fri Jun 2 11:49:10 2017 -0700 ARC: create cpu specific version of arch_cpu_idle() This paves way for creating a 3rd variant needed for NPS ARC700 without littering ifdey'ery all over the place Signed-off-by: Vineet Gupta arch/arc/include/asm/irqflags-arcv2.h | 3 --- arch/arc/include/asm/irqflags-compact.h | 2 -- arch/arc/kernel/process.c | 18 ++++++++++++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) commit 1112c3b2ce5281a7118606648bb8cc010b2499ca Author: Noam Camus Date: Sun May 28 09:52:05 2017 +0300 ARC: [plat-eznps] spinlock aware for MTM This way when we execute "ex" during trying to hold lock we can switch to other HW thread and utilize the core intead of just spinning on a lock. We noticed about 10% improvement of execution time with hackbench test. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/include/asm/spinlock.h | 6 ++++++ 1 file changed, 6 insertions(+) commit c2bdac146b4f12d3f0065b865d5d36529c2cbfaa Author: Vineet Gupta Date: Sat Oct 17 15:29:59 2015 +0530 ARC: spinlock: Document the EX based spin_unlock Signed-off-by: Vineet Gupta arch/arc/include/asm/spinlock.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ab1e8660c1bb2aa6ca3fbbc7e97cc2a5ffe1599b Author: Noam Camus Date: Sun May 28 09:52:04 2017 +0300 ARC: [plat-eznps] disabled stall counter due to a HW bug This counter represents threshold for consecutive stall which would trigger HW threads scheduling. However when enabled, low threshhold values cause performance degradation and in the worst case even livelock. So disable it by resorting to HW reset value Signed-off-by: Noam Camus Reviewed-by: Alexey Brodkin Signed-off-by: Vineet Gupta [vgupta: fixed changelog] arch/arc/plat-eznps/mtm.c | 2 -- 1 file changed, 2 deletions(-) commit 30b7af252e8fef6bf2fc311ca654c40bd0552220 Author: Noam Camus Date: Sun May 28 09:52:03 2017 +0300 ARC: [plat-eznps] Fix TLB Errata Due to a HW bug in NPS400 we get from time to time false TLB miss. Workaround this by validating each miss. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/mm/tlbex.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9e9395525b8e948ae0630368c87b0b3ede5fab7a Author: Noam Camus Date: Sun May 28 09:52:02 2017 +0300 ARC: [plat-eznps] typo fix at Kconfig Signed-off-by: Noam Camus Reviewed-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/plat-eznps/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94055304690acfa256c39e36d0eb80294d1a7d65 Author: Liav Rehana Date: Sun May 28 09:52:01 2017 +0300 ARC: typos fix in kernel/entry-compact.S Signed-off-by: Liav Rehana Signed-off-by: Noam Camus Reviewed-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/kernel/entry-compact.S | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit ddf720f86efe38cb3ef88b2eaad9ea8ad7c6f798 Author: Liav Rehana Date: Sun May 28 09:52:00 2017 +0300 ARC: typo fix in mm/fault.c Signed-off-by: Liav Rehana Signed-off-by: Noam Camus Reviewed-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8e3bb347d8c32c25830af55466e08979df4e2be Author: David Ahern Date: Mon Aug 28 15:14:20 2017 -0700 net: Add comment that early_demux can change via sysctl Twice patches trying to constify inet{6}_protocol have been reverted: 39294c3df2a8 ("Revert "ipv6: constify inet6_protocol structures"") to revert 3a3a4e3054137 and then 03157937fe0b5 ("Revert "ipv4: make net_protocol const"") to revert aa8db499ea67. Add a comment that the structures can not be const because the early_demux field can change based on a sysctl. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/af_inet.c | 6 ++++++ net/ipv6/tcp_ipv6.c | 3 +++ net/ipv6/udp.c | 3 +++ 3 files changed, 12 insertions(+) commit 7aa7a0360a6632beca86229db9369fd289fcc6bf Author: Rafael J. Wysocki Date: Sun Aug 20 18:06:04 2017 +0200 PM: docs: Delete the obsolete states.txt document The Documentation/power/states.txt document is now redundant and sonewhat outdated, so delete it. Signed-off-by: Rafael J. Wysocki Documentation/power/states.txt | 127 ----------------------------------------- 1 file changed, 127 deletions(-) commit cba630b6f5cf6bb468f5c2da77f3dee2125bd0c1 Merge: 0c0b6b7 726fb6b Author: Rafael J. Wysocki Date: Tue Aug 29 00:15:47 2017 +0200 Merge branch 'pm-sleep' into pm-docs commit 0c0b6b7bc427caed77b172916edc3c36cd1ab79d Author: Rafael J. Wysocki Date: Mon Aug 21 15:14:56 2017 +0200 PM: docs: Describe high-level PM strategies and sleep states Reorganize the power management part of admin-guide by adding a description of major power management strategies supported by the kernel (system-wide and working-state power management) to it and dividing the rest of the material into the system-wide PM and working-state PM chapters. On top of that, add a description of system sleep states to the system-wide PM chapter. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukas Wunner Documentation/admin-guide/pm/index.rst | 12 +- Documentation/admin-guide/pm/sleep-states.rst | 245 +++++++++++++++++++++++++ Documentation/admin-guide/pm/strategies.rst | 52 ++++++ Documentation/admin-guide/pm/system-wide.rst | 8 + Documentation/admin-guide/pm/working-state.rst | 9 + 5 files changed, 317 insertions(+), 9 deletions(-) commit cc8737a5fe9051b7fa052b08c57ddb9f539c389a Author: Willem de Bruijn Date: Fri Aug 25 13:10:43 2017 -0400 xen-netback: update ubuf_info initialization to anonymous union The xen driver initializes struct ubuf_info fields using designated initializers. I recently moved these fields inside a nested anonymous struct inside an anonymous union. I had missed this use case. This breaks compilation of xen-netback with older compilers. >From kbuild bot with gcc-4.4.7: drivers/net//xen-netback/interface.c: In function 'xenvif_init_queue': >> drivers/net//xen-netback/interface.c:554: error: unknown field 'ctx' specified in initializer >> drivers/net//xen-netback/interface.c:554: warning: missing braces around initializer drivers/net//xen-netback/interface.c:554: warning: (near initialization for '(anonymous).') >> drivers/net//xen-netback/interface.c:554: warning: initialization makes integer from pointer without a cast >> drivers/net//xen-netback/interface.c:555: error: unknown field 'desc' specified in initializer Add double braces around the designated initializers to match their nested position in the struct. After this, compilation succeeds again. Fixes: 4ab6c99d99bb ("sock: MSG_ZEROCOPY notification coalescing") Reported-by: kbuild bot Signed-off-by: Willem de Bruijn Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5a915b978c41396933dcd840b6f09f358ee2383 Merge: 0315793 ef88f89 Author: David S. Miller Date: Mon Aug 28 15:04:52 2017 -0700 Merge branch 'gre-add-collect_md-mode-for-ERSPAN-tunnel' William Tu says: ==================== gre: add collect_md mode for ERSPAN tunnel This patch series provide collect_md mode for ERSPAN tunnel. The fist patch refactors the existing gre_fb_xmit function by exacting the route cache portion into a new function called prepare_fb_xmit. The second patch introduces the collect_md mode for ERSPAN tunnel, by calling the prepare_fb_xmit function and adding ERSPAN specific logic. The final patch adds the test case using bpf_skb_{set,get}_tunnel_{key,opt}. ==================== Signed-off-by: David S. Miller commit ef88f89c830f4832e58c454dc8bd1d759373adc4 Author: William Tu Date: Fri Aug 25 09:21:29 2017 -0700 samples/bpf: extend test_tunnel_bpf.sh with ERSPAN Extend existing tests for vxlan, gre, geneve, ipip to include ERSPAN tunnel. Signed-off-by: William Tu Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/tcbpf2_kern.c | 63 +++++++++++++++++++++++++++++++++++++++++- samples/bpf/test_tunnel_bpf.sh | 29 +++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) commit 1a66a836da630cd70f3639208da549b549ce576b Author: William Tu Date: Fri Aug 25 09:21:28 2017 -0700 gre: add collect_md mode to ERSPAN tunnel Similar to gre, vxlan, geneve, ipip tunnels, allow ERSPAN tunnels to operate in 'collect metadata' mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. OVS can use it as well in the future. Signed-off-by: William Tu Signed-off-by: David S. Miller include/net/ip_tunnels.h | 4 +- net/ipv4/ip_gre.c | 102 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 101 insertions(+), 5 deletions(-) commit 862a03c35ed76c50a562f7406ad23315f7862642 Author: William Tu Date: Fri Aug 25 09:21:27 2017 -0700 gre: refactor the gre_fb_xmit The patch refactors the gre_fb_xmit function, by creating prepare_fb_xmit function for later ERSPAN collect_md mode patch. Signed-off-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 15 deletions(-) commit 39b7a4ff930143f17d05cd769ba2099f9249e898 Author: Oza Pawandeep Date: Mon Aug 28 16:43:30 2017 -0500 PCI: iproc: Work around Stingray CRS defects Configuration Request Retry Status ("CRS") completions are a required part of PCIe. A PCIe device may respond to config a request with a CRS completion to indicate that it needs more time to initialize. A Root Port that receives a CRS completion may automatically retry the request, or it may treat the request as a failed transaction. For a failed read, it will likely synthesize all 1's data, i.e., 0xffffffff, to complete the read to the CPU. CRS Software Visibility ("CRS SV") is an optional feature. Per PCIe r3.1, sec 2.3.2, if supported and enabled, a Root Port that receives a CRS completion for a config read of the Vendor ID will synthesize 0x0001 data (an invalid Vendor ID) instead of retrying or failing the transaction. The 0x0001 data makes the CRS completion visible to software, so it can perform other tasks while waiting for the device. The iProc "Stingray" PCIe controller does not support CRS completions correctly. From the Stingray PCIe Controller spec: 4.7.3.3. Retry Status On Configuration Cycle Endpoints are allowed to generate retry status on configuration cycles. In this case, the RC needs to re-issue the request. The IP does not handle this because the number of configuration cycles needed will probably be less than the total number of non-posted operations needed. When a retry status is received on the User RX interface for a configuration request that was sent on the User TX interface, it will be indicated with a completion with the CMPL_STATUS field set to 2=CRS, and the user will have to find the address and data values and send a new transaction on the User TX interface. When the internal configuration space returns a retry status during a configuration cycle (user_cscfg = 1) on the Command/Status interface, the pcie_cscrs will assert with the pcie_csack signal to indicate the CRS status. When the CRS Software Visibility Enable register in the Root Control register is enabled, the IP will return the data value to 0x0001 for the Vendor ID value and 0xffff (all 1’s) for the rest of the data in the request for reads of offset 0 that return with CRS status. This is true for both the User RX Interface and for the Command/Status interface. When CRS Software Visibility is enabled, the CMPL_STATUS field of the completion on the User RX Interface will not be 2=CRS and the pcie_cscrs signal will not assert on the Command/Status interface. The Stingray hardware never reissues configuration requests when it receives CRS completions. Contrary to what sec 4.7.3.3 above says, when it receives a CRS completion, it synthesizes 0xffff0001 data regardless of the address of the read or the value of the CRS SV enable bit. This is broken in two ways: 1) When CRS SV is disabled, the Root Port should never synthesize the 0x0001 value. If it receives a CRS completion, it should fail the transaction and synthesize all 1's data. 2) When CRS SV is enabled, the Root Port should only synthesize 0x0001 data if it receives a CRS completion for a read of the Vendor ID. If it receives a CRS completion for any other read, it should fail the transaction and synthesize all 1's data. This breaks pci_flr_wait(), which reads the Command register and expects to see all 1's data if the read fails because of CRS completions. On Stingray, it sees the incorrect 0xffff0001 data instead. It also breaks config registers that contain the 0xffff0001 value. If we read such a register, software can't distinguish a CRS completion from the actual value read from the device. On Stingray, if we read 0xffff0001 data, assume this indicates a CRS completion and retry the read for 500ms. If we time out, return all 1's (0xffffffff) data. Note that this corrupts registers that happen to contain 0xffff0001. Stingray advertises CRS SV support in its Root Capabilities register, and the CRS SV enable bit is writable (even though the hardware ignores it). Mask out PCI_EXP_RTCAP_CRSVIS so software doesn't try to use CRS SV. Signed-off-by: Oza Pawandeep [bhelgaas: changelog, add probe-time warning about corruption, don't advertise CRS SV support, remove duplicate pci_generic_config_read32(), fix alignment based on patch from Arnd Bergmann ] Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 82 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit d005045bcf4234cc537ee6138b91830e6e5019f0 Author: Oza Pawandeep Date: Mon Aug 28 16:43:24 2017 -0500 PCI: iproc: Factor out memory-mapped config access address calculation Factor out the address calculation for memory-mapped config accesses as a separate function. No functional change intended. Signed-off-by: Oza Pawandeep Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 0c3014f22dec0e1d14c8298551bfb6434638bdd9 Author: Arvind Yadav Date: Sat Aug 26 16:17:35 2017 +0530 selinux: constify nf_hook_ops nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks and nf_unregister_net_hooks are working with const nf_hook_ops. So mark the non-const nf_hook_ops structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Paul Moore security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03157937fe0b5ef0431509106c096e50612fa70d Author: David Ahern Date: Mon Aug 28 13:23:09 2017 -0700 Revert "ipv4: make net_protocol const" This reverts commit aa8db499ea67cff1f5f049033810ffede2fe5ae4. Early demux structs can not be made const. Doing so results in: [ 84.967355] BUG: unable to handle kernel paging request at ffffffff81684b10 [ 84.969272] IP: proc_configure_early_demux+0x1e/0x3d [ 84.970544] PGD 1a0a067 [ 84.970546] P4D 1a0a067 [ 84.971212] PUD 1a0b063 [ 84.971733] PMD 80000000016001e1 [ 84.972669] Oops: 0003 [#1] SMP [ 84.973065] Modules linked in: ip6table_filter ip6_tables veth vrf [ 84.973833] CPU: 0 PID: 955 Comm: sysctl Not tainted 4.13.0-rc6+ #22 [ 84.974612] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 84.975855] task: ffff88003854ce00 task.stack: ffffc900005a4000 [ 84.976580] RIP: 0010:proc_configure_early_demux+0x1e/0x3d [ 84.977253] RSP: 0018:ffffc900005a7dd0 EFLAGS: 00010246 [ 84.977891] RAX: ffffffff81684b10 RBX: 0000000000000001 RCX: 0000000000000000 [ 84.978759] RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000000 [ 84.979628] RBP: ffffc900005a7dd0 R08: 0000000000000000 R09: 0000000000000000 [ 84.980501] R10: 0000000000000001 R11: 0000000000000008 R12: 0000000000000001 [ 84.981373] R13: ffffffffffffffea R14: ffffffff81a9b4c0 R15: 0000000000000002 [ 84.982249] FS: 00007feb237b7700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [ 84.983231] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 84.983941] CR2: ffffffff81684b10 CR3: 0000000038492000 CR4: 00000000000406f0 [ 84.984817] Call Trace: [ 84.985133] proc_tcp_early_demux+0x29/0x30 I think this is the second time such a patch has been reverted. Cc: Bhumika Goyal Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/af_inet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dfbde55249032db6e93ab76a91c3b2e46308f52e Author: Bhumika Goyal Date: Mon Aug 21 17:13:08 2017 +0530 nbd: make device_attribute const Make this const as is 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: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c3051220f3e2a576ba8008c4a87b7d4c8a35e8 Author: Jens Axboe Date: Mon Aug 28 15:06:31 2017 -0600 null_blk: use available 'dev' in nullb_device_power_store() We already have this pointer, no need to use to_nullb_device() again. Signed-off-by: Jens Axboe drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 060fd198a3e113047da456f15889579067e6b75f Author: Shaohua Li Date: Mon Aug 28 13:49:31 2017 -0700 block/nullb: delete unnecessary memory free Commit 2984c86(nullb: factor disk parameters) has a typo. The nullb_device allocation/free is done outside of null_add_dev. The commit accidentally frees the nullb_device in error code path. Reported-by: Dan Carpenter Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 1 - 1 file changed, 1 deletion(-) commit 3e6fb72d6cef6a46f8531a01ed290785952fe25b Author: Jason Ekstrand Date: Fri Aug 25 10:52:26 2017 -0700 drm/syncobj: Add a syncobj_array_find helper The wait ioctl has a bunch of code to read an syncobj handle array from userspace and turn it into an array of syncobj pointers. We're about to add two new IOCTLs which will need to work with arrays of syncobj handles so let's make some helpers. Signed-off-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 89 ++++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 31 deletions(-) commit e7aca5031a2fb51b6120864d0eff5478c95e6651 Author: Jason Ekstrand Date: Fri Aug 25 10:52:24 2017 -0700 drm/syncobj: Allow wait for submit and signal behavior (v5) Vulkan VkFence semantics require that the application be able to perform a CPU wait on work which may not yet have been submitted. This is perfectly safe because the CPU wait has a timeout which will get triggered eventually if no work is ever submitted. This behavior is advantageous for multi-threaded workloads because, so long as all of the threads agree on what fences to use up-front, you don't have the extra cross-thread synchronization cost of thread A telling thread B that it has submitted its dependent work and thread B is now free to wait. Within a single process, this can be implemented in the userspace driver by doing exactly the same kind of tracking the app would have to do using posix condition variables or similar. However, in order for this to work cross-process (as is required by VK_KHR_external_fence), we need to handle this in the kernel. This commit adds a WAIT_FOR_SUBMIT flag to DRM_IOCTL_SYNCOBJ_WAIT which instructs the IOCTL to wait for the syncobj to have a non-null fence and then wait on the fence. Combined with DRM_IOCTL_SYNCOBJ_RESET, you can easily get the Vulkan behavior. v2: - Fix a bug in the invalid syncobj error path - Unify the wait-all and wait-any cases v3: - Unify the timeout == 0 case a bit with the timeout > 0 case - Use wait_event_interruptible_timeout v4: - Use proxy fence v5: - Revert to a combination of v2 and v3 - Don't use proxy fences - Don't use wait_event_interruptible_timeout because it just adds an extra layer of callbacks Signed-off-by: Jason Ekstrand Cc: Dave Airlie Cc: Chris Wilson Cc: Christian König Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 252 ++++++++++++++++++++++++++++++++++-------- include/uapi/drm/drm.h | 1 + 2 files changed, 208 insertions(+), 45 deletions(-) commit 1fc08218ed2a42c86af5c905fe4c00885376a07e Author: Jason Ekstrand Date: Fri Aug 25 10:52:25 2017 -0700 drm/syncobj: Add a CREATE_SIGNALED flag This requests that the driver create the sync object such that it already has a signaled dma_fence attached. Because we don't need anything in particular (just something signaled), we use a dummy null fence. This is useful for Vulkan which has a similar flag that can be passed to vkCreateFence. Signed-off-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 57 ++++++++++++++++++++++++++++++++++++++++--- include/uapi/drm/drm.h | 1 + 2 files changed, 55 insertions(+), 3 deletions(-) commit 9c19fb10a5893d6501df4d0fb93d954d5fc1d91b Author: Jason Ekstrand Date: Mon Aug 28 07:39:25 2017 -0700 drm/syncobj: Add a callback mechanism for replace_fence (v3) It is useful in certain circumstances to know when the fence is replaced in a syncobj. Specifically, it may be useful to know when the fence goes from NULL to something valid. This does make syncobj_replace_fence a little more expensive because it has to take a lock but, in the common case where there is no callback list, it spends a very short amount of time inside the lock. v2: - Don't lock in drm_syncobj_fence_get. We only really need to lock around fence_replace to make the callback work. v3: - Fix the cb_list comment to make kbuild happy Signed-off-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 60 +++++++++++++++++++++++++++++++++++++++++-- include/drm/drm_syncobj.h | 39 ++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 2 deletions(-) commit 5e60a10eaebab93f823295cd7ec3848ba3b6e553 Author: Dave Airlie Date: Fri Aug 25 10:52:22 2017 -0700 drm/syncobj: add sync obj wait interface. (v8) This interface will allow sync object to be used to back Vulkan fences. This API is pretty much the vulkan fence waiting API, and I've ported the code from amdgpu. v2: accept relative timeout, pass remaining time back to userspace. v3: return to absolute timeouts. v4: absolute zero = poll, rewrite any/all code to have same operation for arrays return -EINVAL for 0 fences. v4.1: fixup fences allocation check, use u64_to_user_ptr v5: move to sec/nsec, and use timespec64 for calcs. v6: use -ETIME and drop the out status flag. (-ETIME is suggested by ickle, I can feel a shed painting) v7: talked to Daniel/Arnd, use ktime and ns everywhere. v8: be more careful in the timeout calculations use uint32_t for counter variables so we don't overflow graciously handle -ENOINT being returned from dma_fence_wait_timeout Signed-off-by: Dave Airlie Reviewed-by: Jason Ekstrand Acked-by: Christian König Signed-off-by: Dave Airlie drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c | 2 + drivers/gpu/drm/drm_syncobj.c | 142 +++++++++++++++++++++++++++++++++++++++++ include/uapi/drm/drm.h | 12 ++++ 4 files changed, 158 insertions(+) commit afca4216b8b1085f3a53a27b732d95be257ecffb Author: Jason Ekstrand Date: Fri Aug 25 10:52:21 2017 -0700 i915: Use drm_syncobj_fence_get Signed-off-by: Jason Ekstrand Signed-off-by: Dave Airlie drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 309a5482fa9eb7bc754bf95a2cd89091b01c33d2 Author: Jason Ekstrand Date: Fri Aug 25 10:52:20 2017 -0700 drm/syncobj: Add a race-free drm_syncobj_fence_get helper (v2) The atomic exchange operation in drm_syncobj_replace_fence is sufficient for the case where it races with itself. However, if you have a race between a replace_fence and dma_fence_get(syncobj->fence), you may end up with the entire replace_fence happening between the point in time where the one thread gets the syncobj->fence pointer and when it calls dma_fence_get() on it. If this happens, then the reference may be dropped before we get a chance to get a new one. The new helper uses dma_fence_get_rcu_safe to get rid of the race. This is also needed because it allows us to do a bit more than just get a reference in drm_syncobj_fence_get should we wish to do so. v2: - RCU isn't that scary - Call rcu_read_lock/unlock - Don't rename fence to _fence - Make the helper static inline Signed-off-by: Jason Ekstrand Acked-by: Christian König (v1) Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 2 +- include/drm/drm_syncobj.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit afaf59237843bf89823c33143beca6b262dff0ca Author: Jason Ekstrand Date: Fri Aug 25 10:52:19 2017 -0700 drm/syncobj: Rename fence_get to find_fence The function has far more in common with drm_syncobj_find than with any in the get/put functions. Signed-off-by: Jason Ekstrand Acked-by: Christian König (v1) Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/drm_syncobj.c | 10 +++++----- include/drm/drm_syncobj.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit 07fbd32a6b215d8b2fc01ccc89622207b9b782fd Author: Martin K. Petersen Date: Fri Aug 25 19:14:50 2017 -0400 nvme: honor RTD3 Entry Latency for shutdowns If an NVMe controller reports RTD3 Entry Latency larger than shutdown_timeout, up to a maximum of 60 seconds, use that value to set the shutdown timer. Otherwise fall back to the module parameter which defaults to 5 seconds. Signed-off-by: Martin K. Petersen Reviewed-by: Sagi Grimberg [hch: removed do_div, made transition time local scope] Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 16 +++++++++++++++- drivers/nvme/host/nvme.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 5228b3280b9bb8fa6aef59f891cca64a028e9b36 Author: Jan H. Schönherr Date: Sun Aug 27 15:56:37 2017 +0200 nvme: fix uninitialized prp2 value on small transfers The value of iod->first_dma ends up as prp2 in NVMe commands. In case there is not enough data to cross a page boundary, iod->first_dma is never initialized and contains random data. Comply with the NVMe specification and fill in 0 in that case. Signed-off-by: Jan H. Schönherr Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a7b7c7a105a528e6c2a0a2581b814a5acacb4c38 Author: Max Gurtovoy Date: Mon Aug 14 15:29:26 2017 +0300 nvme-rdma: Use unlikely macro in the fast path This patch slightly improves performance (mainly for small block sizes). Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 17c39d053a46b300fee786857458857086a4844e Author: Martin Wilck Date: Mon Aug 14 22:12:39 2017 +0200 nvmet: use memcpy_and_pad for identify sn/fr This changes the earlier patch "nvmet: don't report 0-bytes in serial number" to use the memcpy_and_pad() helper introduced in a previous patch. Signed-off-by: Martin Wilck Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 01f33c336e2d298ea5d4ce5d6e5bcd12865cc30f Author: Martin Wilck Date: Mon Aug 14 22:12:38 2017 +0200 string.h: add memcpy_and_pad() This helper function is useful for the nvme subsystem, and maybe others. Note: the warnings reported by the kbuild test robot for this patch are actually generated by the use of CONFIG_PROFILE_ALL_BRANCHES together with __FORTIFY_INLINE. Signed-off-by: Martin Wilck Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig include/linux/string.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 48fa362b6c3f4d69bdb6310b46626049092475e0 Author: James Smart Date: Mon Jul 31 13:21:14 2017 -0700 nvmet-fc: simplify sg list handling The existing nvmet_fc sg list handling has 2 faults: a) the request between LLDD and transport has too large of an sg list (256 elements), which is normally 256k (64 elements). b) sglist handling doesn't optimize on the fact that each element is a page. This patch removes the static sg list in the request and uses the dynamic list already present in the nvmet_fc transport. It also simplies the handling of the sg list on multiple sequences to take advantage of the per-page divisions. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 48 +++++++++--------------------------------- include/linux/nvme-fc-driver.h | 2 +- 2 files changed, 11 insertions(+), 39 deletions(-) commit 5533d42480d6ced6765401c55a3622b4c437d7eb Author: James Smart Date: Mon Jul 31 13:20:30 2017 -0700 nvme-fc: Reattach to localports on re-registration If the LLDD resets or detaches from an fc port, the LLDD will deregister all remoteports seen by the fc port and deregister the localport associated with the fc port. The teardown of the localport structure will be held off due to reference counting until all the remoteports are removed (and they are held off until all controllers/associations to terminated). Currently, if the fc port is reinit/reattached and registered again as a localport it is treated as an independent entity from the prior localport and all prior remoteports and controllers cannot be revived. They are created as new and separate entities. This patch changes the localport registration to look at the known localports that are waiting to be torndown. If they are the same port based on wwn's, the local port is transitioned out of the teardown state. This allows the remote ports and controller connections to be reestablished and resumed as long as the localport can also be reregistered within the timeout windows. The patch adds a new routine nvme_fc_attach_to_unreg_lport() with the functionality and moves the lport get/put routines to avoid forward references. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 144 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 106 insertions(+), 38 deletions(-) commit 60b43f627a71aaf233ef5af90f72e207c29781b4 Author: Max Gurtovoy Date: Sun Aug 13 19:21:07 2017 +0300 nvme: rename AMS symbolic constants to fit specification Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- include/linux/nvme.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit ad4e05b24c428d6125f6f10bd300600cae5079d4 Author: Max Gurtovoy Date: Sun Aug 13 19:21:06 2017 +0300 nvme: add symbolic constants for CC identifiers Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 14 +++++++------- include/linux/nvme.h | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) commit caaa15c5097d58545075a8bbdf208078b87d5f28 Author: Sagi Grimberg Date: Tue Aug 15 12:24:05 2017 +0300 nvme: fix identify namespace logging Use ctrl->device and lose the func name. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b483da15dd0c94b62ae4e789b37dfff4410f45e Author: Guan Junxiong Date: Thu Aug 3 21:40:26 2017 +0800 nvme-fabrics: log a warning if hostid is invalid This helps users to quickly spot the reason of why connection fails if the hostid is not compliant with the uuid format. Signed-off-by: Guan Junxiong Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 1 + 1 file changed, 1 insertion(+) commit 09fdc23b29618127709711606d4fa439a6839852 Author: Sagi Grimberg Date: Mon Jul 10 09:22:39 2017 +0300 nvme-rdma: call ops->reg_read64 instead of nvmf_reg_read64 To make the nvme_rdma_configure_admin_queue generic in preparation of moving it to common code. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 370ae6e450260c8bd3e1ea75c1390f746d3c71ee Author: Sagi Grimberg Date: Mon Jul 10 09:22:38 2017 +0300 nvme-rdma: cleanup error path in controller reset No need to queue an extra work to indirect controller removal, just call the ctrl remove routine. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit 68e16fcfaf9bbde573e89f783cf1ca60acb49cf5 Author: Sagi Grimberg Date: Mon Jul 10 09:22:37 2017 +0300 nvme-rdma: introduce nvme_rdma_start_queue This should pair with nvme_rdma_stop_queue. While this is not a complete inverse, it still pairs up pretty well because in fabrics we don't have a disconnect capsule (yet) but we simply teardown the transport association. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 41e8cfa117cee46a732436dd303de4772c60965c Author: Sagi Grimberg Date: Mon Jul 10 09:22:36 2017 +0300 nvme-rdma: rename nvme_rdma_init_queue to nvme_rdma_alloc_queue Give it a name symmetric to nvme_rdma_free_queue. Also pass in the ctrl sqsize+1 and not the opts queue_size. And suppress a superflous failure message. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 148b4e7ff31e4bb90cf7851ad1bcd305c292be2c Author: Sagi Grimberg Date: Mon Jul 10 09:22:35 2017 +0300 nvme-rdma: stop queues instead of simply flipping their state If we move the queues from LIVE state, we might as well stop them (drain for rdma). Do it after we stop the request queues to prevent a stray request sneaking in .queue_rq after we stop the queue. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a57bd54122232b32414748fc8b14634bfd74a7ff Author: Sagi Grimberg Date: Mon Aug 28 21:41:10 2017 +0200 nvme-rdma: introduce configure/destroy io queues Make a symmetrical handling with admin queue. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 162 +++++++++++++++++++++++------------------------ 1 file changed, 81 insertions(+), 81 deletions(-) commit 31fdf18401703df246e20fc0382ed3594e6cf8d8 Author: Sagi Grimberg Date: Mon Aug 28 21:40:06 2017 +0200 nvme-rdma: reuse configure/destroy_admin_queue No need to open-code it. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 3f02fffb74ae7486232fef6ca4341c5e9719c759 Author: Sagi Grimberg Date: Mon Jul 10 09:22:32 2017 +0300 nvme-rdma: don't free tagset on resets We're not supposed to do that. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 49 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit 83bc9c371eaf21466f43b12d942b66c3f0d60ae5 Author: Arnaldo Carvalho de Melo Date: Mon Aug 28 11:47:11 2017 -0300 perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments Reuse 'mprotect' beautifiers for 'pkey_mprotect'. System wide tracing pkey_alloc, pkey_free and pkey_mprotect calls, with backtraces: # perf trace -e pkey_alloc,pkey_mprotect,pkey_free --max-stack=5 0.000 ( 0.011 ms): pkey/7818 pkey_alloc(init_val: DISABLE_ACCESS|DISABLE_WRITE) = -1 EINVAL Invalid argument syscall (/usr/lib64/libc-2.25.so) pkey_alloc (/home/acme/c/pkey) 0.022 ( 0.003 ms): pkey/7818 pkey_mprotect(start: 0x7f28c3890000, len: 4096, prot: READ|WRITE, pkey: -1) = 0 syscall (/usr/lib64/libc-2.25.so) pkey_mprotect (/home/acme/c/pkey) 0.030 ( 0.002 ms): pkey/7818 pkey_free(pkey: -1 ) = -1 EINVAL Invalid argument syscall (/usr/lib64/libc-2.25.so) pkey_free (/home/acme/c/pkey) The tools/include/uapi/asm-generic/mman-common.h file is used to find the access rights defines for the pkey_alloc syscall second argument. Since we have the detector of changes for the tools/include header files versus its kernel origin (include/uapi/asm-generic/mman-common.h), we'll get whatever new flag appears for that argument automatically. This method should be used in other cases where it is easy to generate those flags tables because the header has properly namespaced defines like PKEY_DISABLE_ACCESS and PKEY_DISABLE_WRITE. Cc: Adrian Hunter Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-3xq5312qlks7wtfzv2sk3nct@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 12 +++++- tools/perf/builtin-trace.c | 8 ++++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 ++ tools/perf/trace/beauty/pkey_alloc.c | 50 ++++++++++++++++++++++ .../perf/trace/beauty/pkey_alloc_access_rights.sh | 10 +++++ 6 files changed, 83 insertions(+), 1 deletion(-) commit a2105f8a9c38f8298f501cf1cd3218407ecdb1a1 Author: Arnaldo Carvalho de Melo Date: Mon Aug 28 11:26:14 2017 -0300 tools headers: Sync cpu features kernel ABI headers with tooling headers These changes made the tools/arch/x86/include/ headers to drift from its kernel origins: 910448bbed06 ("perf/x86/amd/uncore: Rename cpufeatures macro for cache counters") 5442c2699552 ("x86/cpufeature, kvm/svm: Rename (shorten) the new "virtualized VMSAVE/VMLOAD" CPUID flag") cba4671af755 ("x86/mm: Disable PCID on 32-bit kernels") Which was detected while building perf: make: Entering directory '/home/acme/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' This sync causes just these perf object files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And the changes in the above changesets don't entail any need for change in the above 'perf bench' files. Cc: Adrian Hunter Cc: Andy Lutomirski Cc: Borislav Petkov Cc: David Ahern Cc: Janakarajan Natarajan Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-456aafouj911a4x4zwt8stkm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 5 ++--- tools/arch/x86/include/asm/disabled-features.h | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) commit 70ff7c6caa2f2cee4a7621f5cb3b73b0a38327f1 Author: David Carrillo-Cisneros Date: Sun Aug 27 00:54:42 2017 -0700 perf tools: Pass full path of FEATURES_DUMP When building with an external FEATURES_DUMP, bpf complains that features dump file is not found. Fix it by passing full file path. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Paul Turner Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170827075442.108534-7-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3866058ef15b6ae6f4ff48e088428b46bcc43fa1 Author: David Carrillo-Cisneros Date: Sun Aug 27 00:54:40 2017 -0700 perf tools: Robustify detection of clang binary Prior to this patch, make scripts tested for CLANG with ifeq ($(CC), clang), failing to detect CLANG binaries with different names. Fix it by testing for the existence of __clang__ macro in the list of compiler defined macros. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Paul Turner Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170827075442.108534-5-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 2 +- tools/lib/subcmd/Makefile | 2 +- tools/perf/Makefile.config | 4 ++-- tools/perf/util/intel-pt-decoder/Build | 2 +- tools/scripts/Makefile.include | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) commit 12024aacb0170779cd0b976b06d2e9b1767cf142 Author: David Carrillo-Cisneros Date: Sun Aug 27 00:54:39 2017 -0700 tools lib: Allow external definition of CC, AR and LD Use already defined values for CC, AR and LD when available. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Paul Turner Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170827075442.108534-4-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39a59f1e3ea541035637432db39158a461f29146 Author: David Carrillo-Cisneros Date: Sun Aug 27 00:54:38 2017 -0700 perf tools: Allow external definition of flex and bison binary names Allow user to define flex and bison binary names by passing FLEX and BISON variables. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Paul Turner Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170827075442.108534-3-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba5d1a48aab56a2677113d071b5b1446877b9a1a Author: David Carrillo-Cisneros Date: Sun Aug 27 00:54:37 2017 -0700 tools build tests: Don't hardcode gcc name Use $(CC) instead of harcoded gcc binary name. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Paul Turner Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170827075442.108534-2-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/tests/ex/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9933183e365f7dd3a79507f1ffb4bcf9433a73ee Author: Jiri Olsa Date: Thu Aug 24 18:27:36 2017 +0200 perf report: Group stat values on global event id There's no big value on displaying counts for every event ID, which is one per every CPU. Rather than that, displaying the whole sum for the event. $ perf record -c 100000 -e cycles:u -s test $ perf report -T Before: # PID TID cycles:u cycles:u cycles:u cycles:u ... [20 more columns of 'cycles:u'] 3339 3339 0 0 0 0 3340 3340 0 0 0 0 3341 3341 0 0 0 0 3342 3342 0 0 0 0 Now: # PID TID cycles:u 3339 3339 19678 3340 3340 18744 3341 3341 17335 3342 3342 26414 Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 2 +- tools/perf/util/values.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a1834fc938344dd3015a1df64ee7f2af70ded147 Author: Jiri Olsa Date: Thu Aug 24 18:27:35 2017 +0200 perf values: Zero value buffers We need to make sure the array of value pointers are zero initialized, because we use them in realloc later on and uninitialized non zero value will cause allocation error and aborted execution. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/values.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f4ef3b7c184c4c269f953f226f7158347d007622 Author: Jiri Olsa Date: Thu Aug 24 18:27:34 2017 +0200 perf values: Fix allocation check Bailing out in case the allocation failed, not the other way round. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/values.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64eed1deb6d87f4c0efe03297f50367a3689eb56 Author: Jiri Olsa Date: Thu Aug 24 18:27:33 2017 +0200 perf values: Fix thread index bug We are taking wrong index (+1) for first thread, which leaves thread with index 0 unused and uninitialized. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/values.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dac7f6b7ed1c8601358357f60e9764a4c6a68d71 Author: Jiri Olsa Date: Thu Aug 24 18:27:32 2017 +0200 perf report: Add dump_read function Adding dump_read function to gather all the dump output of read function. Adding output of enabled and running times and id if enabled (3 new lines with '...' prefix below). $ perf record -s ... $ perf report -D 958358311769 0x91f8 [0x40]: PERF_RECORD_READ: 3339 3339 cycles:u 0 ... time enabled : 958358313731 ... time running : 958358313731 ... id : 80 Committer note: Do not use 'read' as a variable name as it breaks the build on older systems, such as RHEL6: CC /tmp/build/perf/util/session.o cc1: warnings being treated as errors util/session.c: In function 'dump_read': util/session.c:1132: error: declaration of 'read' shadows a global declaration /usr/include/bits/unistd.h:35: error: shadowed declaration is here mv: cannot stat `/tmp/build/perf/util/.session.o.tmp': No such file or directory Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 4 ---- tools/perf/util/session.c | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) commit 18398af2dcca3044c74fd2697f1d5b624b7848fe Author: Sagi Grimberg Date: Mon Jul 10 09:22:31 2017 +0300 nvme-rdma: disable the controller on resets Mimic the pci driver as a controller disable might be more lightweight than a shutdown. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b28a308ee7774341312de28405e53a4a30cb7d31 Author: Sagi Grimberg Date: Mon Jul 10 09:22:30 2017 +0300 nvme-rdma: move tagset allocation to a dedicated routine We always pair tagset allocation with rdma device reference and it shares some code, centralize it with an argument if its an admin or IO tagset. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 131 +++++++++++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 56 deletions(-) commit 34b6c2315eb66e6411261aa440f6e3c4cded3506 Author: Sagi Grimberg Date: Mon Jul 10 09:22:29 2017 +0300 nvme: Add admin_tagset pointer to nvme_ctrl Will be used when we centralize control flows. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 1 + drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 1 + drivers/nvme/host/rdma.c | 1 + drivers/nvme/target/loop.c | 1 + 5 files changed, 5 insertions(+) commit 90af35123d3be8b011a8a3f69ce46fd431c55b25 Author: Sagi Grimberg Date: Mon Jul 10 09:22:28 2017 +0300 nvme-rdma: move nvme_rdma_configure_admin_queue code location We will call it from other places so avoid having to forward declare it. Also move it next to nvme_rdma_destroy_admin_queue. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 185 ++++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 91 deletions(-) commit 4897ad4e0812c358c8bdd7aa25fdc2201ae2de0b Author: Johannes Thumshirn Date: Thu Aug 3 11:28:47 2017 +0200 nvme-rdma: remove NVME_RDMA_MAX_SEGMENT_SIZE NVME_RDMA_MAX_SEGMENT_SIZE is not used anywhere, zap it. Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 -- 1 file changed, 2 deletions(-) commit 1c35be8c8a13fa714c1c783f14653ca9d3e3721f Author: Johannes Thumshirn Date: Thu Aug 3 11:28:48 2017 +0200 nvmet-fcloop: remove ALL_OPTS define ALL_OPTS isn't used anywhere, remove it. Signed-off-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 3 --- 1 file changed, 3 deletions(-) commit 130c24b5be80512be973e3a614abda75f5896b42 Author: Guan Junxiong Date: Fri Aug 4 17:27:47 2017 +0800 nvmet: fix the return error code of target if host is not allowed nvmf target shall return NVME_SC_CONNECT_INVALID_HOST instead of the gereal code INVALID_PARAM when the given host nqn is not allowed to connect. Refer to the 2.2.1 section of the NVMe over Fabrics Spec. Signed-off-by: Guan Junxiong Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 1 + 1 file changed, 1 insertion(+) commit 1645d5036f9201bd0925aff099fa92fbe7afaff4 Author: Christoph Hellwig Date: Tue Jul 18 19:46:36 2017 +0200 nvmet: use NVME_NSID_ALL Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Max Gurtovoy drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/configfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dbf86b39005d26b21c52a23720e15fb850d71cdc Author: Jon Derrick Date: Wed Aug 16 09:51:29 2017 +0200 nvme: add support for NVMe 1.3 Timestamp Feature NVME's Timestamp feature allows controllers to be aware of the epoch time in milliseconds. This patch adds the set features hook for various transports through the identify path, so that resets and resumes can update the controller as necessary. Signed-off-by: Jon Derrick [hch: rebased on top of nvme-4.13 error handling changes, changed nvme_configure_timestamp to return the status] Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 21 +++++++++++++++++++++ include/linux/nvme.h | 2 ++ 2 files changed, 23 insertions(+) commit 62346eaeb2f1a0524b35eaa2f479596f40491165 Author: Arnav Dawn Date: Wed Jul 12 16:11:53 2017 +0530 nvme: define NVME_NSID_ALL Define the constant "0xffffffff" (used as nsid for all namespaces) as NVME_NSID_ALL. Signed-off-by: Arnav Dawn Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 6 +++--- include/linux/nvme.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit b6dccf7fae4331b0ea41cf087e3f02d5db9161dc Author: Arnav Dawn Date: Wed Jul 12 16:10:40 2017 +0530 nvme: add support for FW activation without reset This patch adds support for handling Fw activation without reset On completion of FW-activation-starting AER, all queues are paused till CSTS.PP is cleared or timed out (exceeds max time for fw activtion MTFA). If device fails to clear CSTS.PP within MTFA, driver issues reset controller. Signed-off-by: Arnav Dawn Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 2 ++ include/linux/nvme.h | 9 ++++++ 3 files changed, 86 insertions(+) commit 71f23543d3026d835ca1741e57e7eb4baeca63dc Author: John Stultz Date: Tue Aug 22 11:42:26 2017 -0700 drm: kirin: Add mode_valid logic to avoid mode clocks we can't generate Currently the hikey dsi logic cannot generate accurate byte clocks values for all pixel clock values. Thus if a mode clock is selected that cannot match the calculated byte clock, the device will boot with a blank screen. This patch uses the new mode_valid callback (many thanks to Jose Abreu for upstreaming it!) to ensure we don't select modes we cannot generate. Also, since the ade crtc code will adjust the mode in mode_set, this patch also adds a mode_fixup callback which we use to make sure we are validating the mode clock that will eventually be used. Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: Rob Clark Cc: Xinliang Liu Cc: Xinliang Liu Cc: Rongrong Zou Cc: Xinwei Kong Cc: Chen Feng Cc: Jose Abreu Cc: Archit Taneja Cc: dri-devel@lists.freedesktop.org Reviewed-by: Sean Paul Signed-off-by: John Stultz Reviewed-by: Xinliang Liu Signed-off-by: Dave Airlie drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 67 +++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 14 ++++++ 2 files changed, 81 insertions(+) commit cd996fb47c360320cf25ac9503c16de085ea9cfc Merge: e9a823f cc4a41f Author: Jens Axboe Date: Mon Aug 28 13:00:44 2017 -0600 Merge tag 'v4.13-rc7' into for-4.14/block-postmerge Linux 4.13-rc7 Signed-off-by: Jens Axboe commit d01c3289e7d68162e32bc08c2b65dd1a216a7ef8 Author: Masatake YAMATO Date: Tue Jul 18 06:27:59 2017 +0900 pty: show associative slave of ptmx in fdinfo This patch adds "tty-index" field to /proc/PID/fdinfo/N if N specifies /dev/ptmx. The field shows the index of associative slave pts. Though a minor number is given for each pts instance, ptmx is not. It means there is no way in user-space to know the association between file descriptors for pts/n and ptmx. (n = 0, 1, ...) This is different from pipe. About pipe such association can be solved by inode of pipefs. Providing the way to know the association between pts/n and ptmx helps users understand the status of running system. lsof can utilize this field. Signed-off-by: Masatake YAMATO Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 8 +++++++- drivers/tty/tty_io.c | 9 +++++++++ include/linux/tty_driver.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) commit 199e717f252be0e31c97b9c7861dd6e2abfaa936 Author: Lars Poeschel Date: Tue Aug 15 13:58:27 2017 +0200 tty: n_gsm: Add compat_ioctl To use this driver with 32 bit userspace applications on 64 bit kernels a compat_ioctl is needed. Signed-off-by: Lars Poeschel Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a846c3e5f338206c84e292a57abde0b06f1777c8 Author: Arvind Yadav Date: Thu Aug 17 19:04:23 2017 +0530 tty: hvcs: 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: Greg Kroah-Hartman drivers/tty/hvc/hvcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7298bd1d7b07b55fe3fe9c84906f2eb065913701 Author: Arvind Yadav Date: Thu Aug 17 19:04:22 2017 +0530 tty: hvc_vio: 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: Greg Kroah-Hartman drivers/tty/hvc/hvc_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4941f063285b598b123352f7f234dcec3c71810 Author: Arvind Yadav Date: Fri Aug 25 23:44:11 2017 +0530 tty: mips_ejtag_fdc: constify mips_cdmm_device_id mips_cdmm_device_id are not supposed to change at runtime. mips_cdmm_driver is working with const 'id_table'. So mark the non-const mips_cdmm_device_id structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/mips_ejtag_fdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 562e6ef81f9b3dadeb7d05a6055e502d43caa830 Author: Michael Moese Date: Wed Aug 2 09:58:53 2017 +0200 Introduce 8250_men_mcb This patch introduces the 8250_men_mcb driver for the MEN 16Z125 IP-Core. This is a 16550-type UART with a 60 byte FIFO. Due to strange old hardware, every board using this IP core requires different values for uartclk. A reasonable default is included in addition to the support of three boards. Additional values for other boards will be added later. This v2 has some whitespace fixes, I screwed this up yesterday. Signed-off-by: Michael Moese Reviewed-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_men_mcb.c | 118 +++++++++++++++++++++++++++++++++ drivers/tty/serial/8250/Kconfig | 11 +++ drivers/tty/serial/8250/Makefile | 1 + 3 files changed, 130 insertions(+) commit 2ce8008711e4837c11e99a94df55406085d0d098 Author: Johannes Thumshirn Date: Wed Aug 2 09:58:52 2017 +0200 mcb: introduce mcb_get_resource() Introduce mcb_get_resource() as a common accessor to a mcb device's memory or IRQ resources. Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 20 +++++++++++++++++++- include/linux/mcb.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) commit 5aabd3b0077e0577f60a1ca6b8bdad62f23353d8 Author: Ian Jamison Date: Mon Aug 28 09:02:29 2017 +0100 serial: imx: Avoid post-PIO cleanup if TX DMA is started The imx_transmit_buffer function should return if TX DMA has already been started and not just skip over the buffer PIO write loop. (Which did fix the initial problem, but could have unintentional side-effects) Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232. Cc: Clemens Gruber Cc: Uwe-Kleine König Cc: Greg Kroah-Hartman Cc: Fabio Estevam Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a DMA has been started") Signed-off-by: Ian Jamison Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 81b289cc14ba349cc4707cf664aa1c72d7dff1d7 Author: Maxim Yu. Osipov Date: Mon Aug 14 16:27:49 2017 +0200 tty: serial: imx: disable irq after suspend If any key on console is pressed when board is suspended, board hangs. Driver's interrupt handler must be guaranteed not to run while resume/suspend_noirq() are being executed. See include/linux/pm.h for details. Tested on i.MX6 based board. The idea of this fix is based on commit in official i.MX kernel tree: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git commit 81e8e7d91d81 ("tty: serial: imx: disable irq after suspend") Disable rx irq after suspend to avoid interrupt coming in early resume. Signed-off-by: Fugang Duan Signed-off-by: Maxim Yu. Osipov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d16ddc13c5e56726d05b4eceb766b06483e3686 Author: Masahiro Yamada Date: Tue Aug 8 22:48:43 2017 +0900 serial: 8250_uniphier: add suspend/resume support Add suspend/resume support for UniPhier serial driver. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d3a9184773c5cde483e249096ae7c7f98f310e20 Author: Masahiro Yamada Date: Tue Aug 8 22:48:42 2017 +0900 serial: 8250_uniphier: use CHAR register for canary to detect power-off The 8250 core uses the SCR as a canary to discover if the console has been powered-off. This hardware does not have SCR at offset 7, but an unused register CHAR at a different offset. As long as the character interrupt is disabled, the register access has no impact, so it is useful as an alternative scratch register. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 39be40ce066da4d5d59bf53f72b914018bc84029 Author: Masahiro Yamada Date: Tue Aug 8 22:48:41 2017 +0900 serial: 8250_uniphier: fix serial port index in private data serial8250_register_8250_port() may allocate a different port index than requested. The driver needs to remember the returned value of serial8250_register_8250_port() for later use. Otherwise, the .remove hook may unregister a different port. Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniPhier serial driver") Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c16ae65e2502da05310b2ec56b3a1fd3efe6f4d Author: Sean Wang Date: Mon Aug 21 01:17:56 2017 +0800 serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC MediaTek BTIF controller is the serial interface similar to UART but it works only as the digital device which is mainly used to communicate with the connectivity module called CONNSYS inside the SoC which could be mostly found on those MediaTek SoCs with Bluetooth feature such as MT7622 and MT7623 SoCs. And the controller is made as being compatible with the 8250 register layout with extra registers such as DMA enablement so it tends to be integrated with reusing 8250 OF driver. However, DMA mode is not being supported yet in the current driver. Signed-off-by: Sean Wang Suggested-by: Andy Shevchenko Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 2 ++ drivers/tty/serial/8250/8250_port.c | 8 ++++++++ include/uapi/linux/serial_core.h | 3 +++ 3 files changed, 13 insertions(+) commit 785704d29197732b8a77ee440d0c138ca9544580 Author: Sean Wang Date: Mon Aug 21 01:17:55 2017 +0800 dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings Document the devicetree bindings in 8250.txt for MediaTek BTIF controller which could be found on MT7622 and MT7623 SoC. Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 2 ++ 1 file changed, 2 insertions(+) commit 447ef990ad9e909443ec16edb837c6e37664f5ba Author: Jeffy Chen Date: Sat Aug 19 09:43:17 2017 +0800 serial: earlycon: Only try fdt when specify 'earlycon' exactly When moving earlycon early_param handling to serial, the devicetree earlycons enable condition changed slightly. We used to only do that for 'console'/'earlycon', but now would also for 'console='/'earlycon='. Fix it by using the same condition like before. Fixes: d503187b6cc4 (of/serial: move earlycon early_param handling to serial) Signed-off-by: Jeffy Chen Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/earlycon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 454d23797a61c2c7424fb737ec417db7dd22bc60 Author: Julia Lawall Date: Sun Aug 13 08:21:50 2017 +0200 serial: mux: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bfdbe0737b6bf6e4553e36279cf6fd80295a859 Author: Julia Lawall Date: Sun Aug 13 08:21:43 2017 +0200 serial: sunsu: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: David S. Miller Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunsu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f137a751cd968b5ddd27a5d99eefa83f73d3390 Author: Julia Lawall Date: Sun Aug 13 08:21:49 2017 +0200 serial: mpc52xx: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mpc52xx_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb939456f81878cda1f31ba0ef1a3b1d7be07e8 Author: Julia Lawall Date: Sun Aug 13 08:21:48 2017 +0200 serial: m32r_sio: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/m32r_sio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5848eeaec620e6df962b171081e725e6ea854f1f Author: Julia Lawall Date: Sun Aug 13 08:21:47 2017 +0200 serial: cpm_uart: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57495265e90c79d3395a5a2fff3149c91af7c6c2 Author: Julia Lawall Date: Sun Aug 13 08:21:46 2017 +0200 serial: apbuart: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/apbuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a607d31b264b930b986bc24958b4a840167f346 Author: Julia Lawall Date: Sun Aug 13 08:21:42 2017 +0200 serial: sunsab: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: David S. Miller Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunsab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccb47a339dabace57c71ab41e6d7cd5f9b8d6746 Author: Julia Lawall Date: Sun Aug 13 08:21:45 2017 +0200 serial: 21285: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/21285.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8162ae5c47977c3f13910b5c1718081d30e8a65a Author: Julia Lawall Date: Sun Aug 13 08:21:44 2017 +0200 serial: uuc_uart: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ucc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 829374f544b3b9499300f48c741cbc085ce06c14 Author: Arvind Yadav Date: Sat Aug 19 23:24:56 2017 +0530 tty: mux: constify parisc_device_id parisc_device_id are not supposed to change at runtime. All functions working with parisc_device_id provided by work with const parisc_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d474f7fad3b20a51394f5eb19d08b49d4e9ebc8 Author: Arvind Yadav Date: Sat Aug 19 23:24:55 2017 +0530 tty: 8250: constify parisc_device_id parisc_device_id are not supposed to change at runtime. All functions working with parisc_device_id provided by work with const parisc_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_gsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2d23edaef9e022df26e9d46a49c2ecfc960cc8b Author: Franklin S Cooper Jr Date: Wed Aug 16 15:55:36 2017 -0500 serial: 8250_of: Add basic PM runtime support 66AK2G UART instances are not apart of the ALWAYS_ON power domain. Therefore, pm_runtime calls must be made to properly insure the appropriate power domains needed by UART are on. Keep legacy clk api calls since other users of this driver may not support PM runtime. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 5c98e9cd459bd80232a5b007c3b9a618d8a96ea6 Author: Sergei Shtylyov Date: Sun Aug 20 19:51:55 2017 +0300 serial: 8250_of: use of_property_read_bool() Use slightly more compact of_property_read_bool() calls for the boolean properties instead of of_find_property() calls. Signed-off-by: Sergei Shtylyov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e0a5de2136b26bd0b3501f2f362abfffeb47d1e Author: Rafael Gago Date: Mon Jul 31 10:46:43 2017 +0200 serial: 8250: Use hrtimers for rs485 delays Previously the timers where based on the classic timers, giving a too coarse resolution on systems with configs of less than 1000 HZ. This patch changes the rs485 timers to hrtimers. Signed-off-by: Rafael Gago Castano Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 63 +++++++++++++++++++++++-------------- include/linux/serial_8250.h | 7 +++-- 2 files changed, 44 insertions(+), 26 deletions(-) commit a6845e1e1b781933ed7f54919f5ea4a108d1b9f2 Author: Rafael Gago Date: Mon Jul 31 10:46:42 2017 +0200 serial: core: Consider rs485 settings to drive RTS Previously the rs485 settings weren't considered when setting the RTS line, so e.g. closing and reopening a port made serial_core to drive the line as if rs485 was disabled. This patch fixes those issues. Signed-off-by: Rafael Gago Castano Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit d77dc47fce23daf57f60cb407698108229a33e8c Author: Himanshu Jha Date: Sun Aug 27 12:01:41 2017 +0530 tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dde68266ba0da457954cf13c907494ab899ea714 Author: Geert Uytterhoeven Date: Thu Aug 17 13:16:28 2017 +0200 dt-bindings: serial: sh-sci: Add support for r8a77995 (H)SCIF Document support for the (H)SCIF serial ports in the Renesas R-Car D3 (r8a77995) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+) commit 43c61286839761a5275c889364fc2588a756f197 Author: Sergei Shtylyov Date: Sun Aug 13 22:11:24 2017 +0300 serial: sh-sci: use of_property_read_bool() Use more compact of_property_read_bool() call for a boolean property instead of of_find_property() call in sci_parse_dt(). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ee1c90cc2cea80638f559c552371ee6893ca9d9e Author: Andy Shevchenko Date: Tue Aug 22 16:58:22 2017 +0300 serial: Fix port type numbering for TI DA8xx The UAPI has a global list of unique numbers for different port types. The commit a2d6a987bfe4 ("serial: 8250: Add new port type for TI DA8xx/66AK2x") introduced a new port type and brought the collision with two other port types. Reuse 95 for it instead. Fixes: a2d6a987bfe4 ("serial: 8250: Add new port type for TI DA8xx/66AK2x") Cc: David Lechner Cc: Sekhar Nori Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman include/uapi/linux/serial_core.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3f3dac7e4d815cb7f929c0ed98c3a45a86852e53 Author: Andy Shevchenko Date: Tue Aug 22 16:58:21 2017 +0300 serial: Remove unused port type PORT_MFD is not in use since commit 1bd187de5364 ("x86, intel-mid: remove Intel MID specific serial support") Remove leftover. Fixes: 1bd187de5364 ("x86, intel-mid: remove Intel MID specific serial support") Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman include/uapi/linux/serial_core.h | 3 --- 1 file changed, 3 deletions(-) commit 63e8d4394a2d226803f47abd7287dbb6d21bf8e4 Author: Andy Shevchenko Date: Tue Aug 22 16:58:20 2017 +0300 serial: pch_uart: Make port type explicit It used to be a gap in port definitions after PORT_MAX_8250. Since the new drivers are coming the gap become shorter and shorter until the commit a2d6a987bfe4 ("serial: 8250: Add new port type for TI DA8xx/66AK2x") completely removed it. So, while type here is just a formality, make things a little bit more explicit for this driver and move port types to UAPI header. Note, it uses two types for now. Fixes: fddceb8b5399 ("tty: 8250: Add 64byte UART support for FSL platforms") Cc: Priyanka Jain Cc: Poonam Aggrwal Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 35 +++++++++++++++-------------------- include/uapi/linux/serial_core.h | 5 ++++- 2 files changed, 19 insertions(+), 21 deletions(-) commit aef3ad103a686f21b746977d4ed21cc1af36f589 Author: Andy Shevchenko Date: Sun Aug 13 17:47:42 2017 +0300 serial: core: remove unneeded irq_wake flag There is no need to duplicate a flag which IRQ core takes care of. Replace custom flag by IRQ core API that retrieves its state. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 9 +++------ include/linux/serial_core.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) commit 29d60981db522ce301e06e18d9edf8b31b233b89 Author: Andy Shevchenko Date: Sun Aug 13 17:47:41 2017 +0300 serial: stm32-usart: Avoid using irq_wake flag There is no need to duplicate a flag which IRQ core takes care of. Replace custom flag by IRQ core API that retrieves its state. Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b8a0353f39d579a654d5920e656f2f91006b6c1 Author: Andy Shevchenko Date: Sun Aug 13 17:47:40 2017 +0300 serial: st-asc: Avoid using irq_wake flag There is no need to duplicate a flag which IRQ core takes care of. Replace custom flag by IRQ core API that retrieves its state. Cc: Patrice Chotard Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d6bcddf5490e86f2fb384329ce6bb8c36dc69a0 Author: Andy Shevchenko Date: Sun Aug 13 17:47:39 2017 +0300 serial: fsl_lpuart: Avoid using irq_wake flag There is no need to duplicate a flag which IRQ core takes care of. Replace custom flag by IRQ core API that retrieves its state. Cc: Bhuvanchandra DV Cc: Dong Aisheng Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 4d691f75924171787bce2853eb236f89b62ec736 Author: Neeraj Upadhyay Date: Mon Aug 7 11:51:25 2017 +0530 tty: serial: msm: Move request_irq to the end of startup Move the request_irq() call to the end of the msm_startup(), so that we don't handle interrupts while msm_startup() is running. This avoids potential races while initialization is in progress. For example, consider below scenario where rx handler reads the intermediate value of dma->chan, set in msm_request_rx_dma(), and tries to do dma mapping, which results in data abort. uart_port_startup() msm_startup() request_irq() ... msm_request_rx_dma() ... dma->chan = dma_request_slave_channel_reason(dev, "rx"); msm_uart_irq() msm_handle_rx_dm() msm_start_rx_dma() dma->desc = dma_map_single() Signed-off-by: Neeraj Upadhyay Reviewd-by: Andy Gross Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 62f466ee0398d9c67e7a867090324794afff1525 Author: Fabio Estevam Date: Mon Aug 7 14:44:11 2017 -0300 serial: pch_uart: Remove unneeded NULL check There is no need to do a NULL check for debugfs_remove(). Quoting Documentation/filesystems/debugfs.txt: "The dentry value can be NULL, in which case nothing will be removed." , so remove the unneeded NULL check. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ec085c5a51b768947ca481f90b66653e36b3c566 Author: Gustavo A. R. Silva Date: Tue Aug 8 17:42:46 2017 -0500 tty: serial: sprd: fix error return code in sprd_probe() platform_get_irq() returns an error code, but the sprd_serial driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Also, notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sprd_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 921469f7fb972f7c6146a6a82693bd45b3beec21 Author: Julia Lawall Date: Sun Aug 13 08:21:40 2017 +0200 serial: meson: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5a74707314fbb4ef685d6e218073064f47315e2 Author: Julia Lawall Date: Sun Aug 13 08:21:41 2017 +0200 serial: owl: constify uart_ops structures These uart_ops structures are only stored in the ops field of a uart_port structure and this fields is const, so the uart_ops structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/owl-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a61d9e6e30d48b67fe864ba4bb9babac7b178312 Author: Gerald Baeza Date: Mon Jul 31 09:31:52 2017 +0000 serial: stm32: fix pio transmit timeout 100µs was too short for low speed transmission (9600bps) Signed-off-by: Gerald Baeza Signed-off-by: Bich Hemon Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a704ddc2504610ba4227d1ae036e962e530c8c0b Author: Arvind Yadav Date: Wed Aug 23 22:18:21 2017 +0530 serial: pl011: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5337e5490fa2e6056849228335f0fb168f3b35bc Author: Arvind Yadav Date: Wed Aug 23 22:17:58 2017 +0530 serial: pl010: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d054b3acb71862c297b923ca24120788c40261e3 Author: Julia Lawall Date: Fri Aug 11 13:47:28 2017 +0200 tty: amba-pl011: constify vendor_data structures These vendor_data structures are only stored in the vendor field of the uart_amba_port structure, as defined in the same file, and this field is declared as const. Thus the vendor_data structures can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f06c6c41e6ccf9c1ec61f640cc9090308b8a63fd Author: Shawn Lin Date: Wed Jul 19 17:55:15 2017 +0800 PCI: rockchip: Idle inactive PHY(s) Check the status of all lanes and idle the inactive one(s). Tested-by: Jeffy Chen Signed-off-by: Shawn Lin [bhelgaas: always set lanes_map, even for legacy_phy case] Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Kishon Vijay Abraham I drivers/pci/host/pcie-rockchip.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit 90a7612d070d5caf023b34864028ccce5bffd6ce Author: Shawn Lin Date: Wed Jul 19 17:55:14 2017 +0800 phy: rockchip-pcie: Reconstruct driver to support per-lane PHYs Reconstruct the whole driver to support per-lane PHYs. Note that we could also support the legacy PHY if you don't provide argument to rockchip_pcie_phy_of_xlate(). Tested-by: Jeffy Chen Signed-off-by: Shawn Lin [bhelgaas: use postincrement/decrement when order doesn't matter, uninline to_pcie_phy() so decl fits on one line] Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-pcie.c | 131 +++++++++++++++++++++++++++---- 1 file changed, 117 insertions(+), 14 deletions(-) commit 9e87240c460637620d9b4b8c6475a53b48267dc6 Author: Shawn Lin Date: Fri Aug 25 15:59:01 2017 -0500 PCI: rockchip: Add per-lane PHY support We distinguish the legacy PHY from newer per-lane PHYs by adding legacy_phy flag. Note that the legacy PHY is still the first option to be searched in order not to break the backward compatibility of DTB. Tested-by: Jeffy Chen Signed-off-by: Shawn Lin [bhelgaas: tidy rockchip_pcie_get_phys()] Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Kishon Vijay Abraham I drivers/pci/host/pcie-rockchip.c | 78 +++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 20 deletions(-) commit 8209432a5e60f6e8b5ea1eda91c51c427d57c10c Author: Bhumika Goyal Date: Fri Aug 25 19:51:45 2017 +0530 RDS: make rhashtable_params const Make this const as it is either used during a copy operation or passed to a const argument of the function rhltable_init Signed-off-by: Bhumika Goyal Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa8db499ea67cff1f5f049033810ffede2fe5ae4 Author: Bhumika Goyal Date: Fri Aug 25 19:51:44 2017 +0530 ipv4: make net_protocol const Make these const as they are only passed to a const argument of the function inet_add_protocol. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller net/ipv4/af_inet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb73ddebe992200586bcead3e2ff2889ef8d2575 Author: Bhumika Goyal Date: Fri Aug 25 19:51:42 2017 +0530 bridge: make ebt_table const Make this const as it is only passed to a const argument of the function ebt_register_table. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller net/bridge/netfilter/ebtable_nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a483899b599a93870ac11a61801acdba116b713 Merge: 901c5d2 3f0d6a1 Author: David S. Miller Date: Mon Aug 28 11:13:22 2017 -0700 Merge branch 'sockmap-uapi-updates-and-fixes' John Fastabend says: ==================== sockmap UAPI updates and fixes This series updates sockmap UAPI, adds additional test cases and provides a couple fixes. First the UAPI changes. The original API added two sockmap specific API artifacts (a) a new map_flags field with a sockmap specific update command and (b) a new sockmap specific attach field in the attach data structure. After this series instead of attaching programs with a single command now two commands are used to attach programs to maps individually. This allows us to add new programs easily in the future and avoids any specific sockmap data structure additions. The map_flags field is also removed and instead we allow socks to be added to multiple maps that may or may not have programs attached. This allows users to decide if a sock should run a SK_SKB program type on receive based on the map it is attached to. This is a nice improvement. See patches for specific details. More test cases were added to test above changes and also stress test the interface. Finally two fixes/improvements were made. First a missing rcu section was added. Second now sockmap can build without KCM being used to trigger 'y' on CONFIG_STREAM_PARSER by selecting a new BPF config option. ==================== Signed-off-by: David S. Miller commit 3f0d6a16989da252d4014c3fb7334369c891f91e Author: John Fastabend Date: Mon Aug 28 07:12:41 2017 -0700 bpf: test_maps add sockmap stress test Sockmap is a bit different than normal stress tests that can run in parallel as is. We need to reuse the same socket pool and map pool to get good stress test cases. Signed-off-by: John Fastabend Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_maps.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 08848246639218ae58acdf3321bc7b693062f31c Author: John Fastabend Date: Mon Aug 28 07:12:21 2017 -0700 bpf: sockmap requires STREAM_PARSER add Kconfig entry SOCKMAP uses strparser code (compiled with Kconfig option CONFIG_STREAM_PARSER) to run the parser BPF program. Without this config option set sockmap wont be compiled. However, at the moment the only way to pull in the strparser code is to enable KCM. To resolve this create a BPF specific config option to pull only the strparser piece in that sockmap needs. This also allows folks who want to use BPF/syscall/maps but don't need sockmap to easily opt out. Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 78aeaaef997db7096a17d0d3572a7940ffa5c9a0 Author: John Fastabend Date: Mon Aug 28 07:12:01 2017 -0700 bpf: sockmap indicate sock events to listeners After userspace pushes sockets into a sockmap it may not be receiving data (assuming stream_{parser|verdict} programs are attached). But, it may still want to manage the socks. A common pattern is to poll/select for a POLLRDHUP event so we can close the sock. This patch adds the logic to wake up these listeners. Also add TCP_SYN_SENT to the list of events to handle. We don't want to break the connection just because we happen to be in this state. Signed-off-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 81374aaa2693f8d3cd6cf3656a02ac8cf5c7ebea Author: John Fastabend Date: Mon Aug 28 07:11:43 2017 -0700 bpf: harden sockmap program attach to ensure correct map type When attaching a program to sockmap we need to check map type is correct. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 3 +++ tools/testing/selftests/bpf/sockmap_verdict_prog.c | 7 ++++++ tools/testing/selftests/bpf/test_maps.c | 27 ++++++++++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) commit ed85054d34e2dfb5e9fac95980cf038ecf19225c Author: John Fastabend Date: Mon Aug 28 07:11:24 2017 -0700 bpf: more SK_SKB selftests Tests packet read/writes and additional skb fields. Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 98 +++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 6fd28865c2a7e5ea12cb1f7ef3edee5a2042905e Author: John Fastabend Date: Mon Aug 28 07:11:05 2017 -0700 bpf: additional sockmap self tests Add some more sockmap tests to cover, - forwarding to NULL entries - more than two maps to test list ops - forwarding to different map Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/sockmap_parse_prog.c | 6 +- tools/testing/selftests/bpf/sockmap_verdict_prog.c | 23 ++++- tools/testing/selftests/bpf/test_maps.c | 113 ++++++++++++++------- 3 files changed, 96 insertions(+), 46 deletions(-) commit d26e597d87635d90128fafb3f6bb0a14d972d952 Author: John Fastabend Date: Mon Aug 28 07:10:45 2017 -0700 bpf: sockmap add missing rcu_read_(un)lock in smap_data_ready References to psock must be done inside RCU critical section. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/sockmap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2f857d04601a1bb56958b95a9f180bce0e91e5e6 Author: John Fastabend Date: Mon Aug 28 07:10:25 2017 -0700 bpf: sockmap, remove STRPARSER map_flags and add multi-map support The addition of map_flags BPF_SOCKMAP_STRPARSER flags was to handle a specific use case where we want to have BPF parse program disabled on an entry in a sockmap. However, Alexei found the API a bit cumbersome and I agreed. Lets remove the STRPARSER flag and support the use case by allowing socks to be in multiple maps. This allows users to create two maps one with programs attached and one without. When socks are added to maps they now inherit any programs attached to the map. This is a nice generalization and IMO improves the API. The API rules are less ambiguous and do not need a flag: - When a sock is added to a sockmap we have two cases, i. The sock map does not have any attached programs so we can add sock to map without inheriting bpf programs. The sock may exist in 0 or more other maps. ii. The sock map has an attached BPF program. To avoid duplicate bpf programs we only add the sock entry if it does not have an existing strparser/verdict attached, returning -EBUSY if a program is already attached. Otherwise attach the program and inherit strparser/verdict programs from the sock map. This allows for socks to be in a multiple maps for redirects and inherit a BPF program from a single map. Also this patch simplifies the logic around BPF_{EXIST|NOEXIST|ANY} flags. In the original patch I tried to be extra clever and only update map entries when necessary. Now I've decided the complexity is not worth it. If users constantly update an entry with the same sock for no reason (i.e. update an entry without actually changing any parameters on map or sock) we still do an alloc/release. Using this and allowing multiple entries of a sock to exist in a map the logic becomes much simpler. Note: Now that multiple maps are supported the "maps" pointer called when a socket is closed becomes a list of maps to remove the sock from. To keep the map up to date when a sock is added to the sockmap we must add the map/elem in the list. Likewise when it is removed we must remove it from the list. This results in searching the per psock list on delete operation. On TCP_CLOSE events we walk the list and remove the psock from all map/entry locations. I don't see any perf implications in this because at most I have a psock in two maps. If a psock were to be in many maps its possibly this might be noticeable on delete but I can't think of a reason to dup a psock in many maps. The sk_callback_lock is used to protect read/writes to the list. This was convenient because in all locations we were taking the lock anyways just after working on the list. Also the lock is per sock so in normal cases we shouldn't see any contention. Suggested-by: Alexei Starovoitov Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 3 - kernel/bpf/sockmap.c | 269 +++++++++++++++++++++++++++++------------------ 2 files changed, 165 insertions(+), 107 deletions(-) commit 464bc0fd6273d518aee79fbd37211dd9bc35d863 Author: John Fastabend Date: Mon Aug 28 07:10:04 2017 -0700 bpf: convert sockmap field attach_bpf_fd2 to type In the initial sockmap API we provided strparser and verdict programs using a single attach command by extending the attach API with a the attach_bpf_fd2 field. However, if we add other programs in the future we will be adding a field for every new possible type, attach_bpf_fd(3,4,..). This seems a bit clumsy for an API. So lets push the programs using two new type fields. BPF_SK_SKB_STREAM_PARSER BPF_SK_SKB_STREAM_VERDICT This has the advantage of having a readable name and can easily be extended in the future. Updates to samples and sockmap included here also generalize tests slightly to support upcoming patch for multiple map support. Signed-off-by: John Fastabend Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Suggested-by: Alexei Starovoitov Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 10 +- include/uapi/linux/bpf.h | 9 +- kernel/bpf/sockmap.c | 25 ++-- kernel/bpf/syscall.c | 38 ++---- samples/sockmap/sockmap_kern.c | 6 +- samples/sockmap/sockmap_user.c | 12 +- tools/include/uapi/linux/bpf.h | 9 +- tools/lib/bpf/bpf.c | 14 +-- tools/lib/bpf/bpf.h | 4 - tools/testing/selftests/bpf/bpf_helpers.h | 3 +- tools/testing/selftests/bpf/sockmap_parse_prog.c | 2 +- tools/testing/selftests/bpf/sockmap_verdict_prog.c | 2 +- tools/testing/selftests/bpf/test_maps.c | 133 +++++++++------------ 13 files changed, 116 insertions(+), 151 deletions(-) commit 47269605aa3bc191bdce6d2f6dec2e73d56b9c3b Author: Ryder Lee Date: Fri Aug 18 09:13:07 2017 +0800 ata: mediatek: add support for MediaTek SATA controller This adds support the AHCI-compliant Serial ATA controller present on MediaTek SoCs. Signed-off-by: Ryder Lee Acked-by: Tejun Heo Signed-off-by: Tejun Heo drivers/ata/Kconfig | 10 +++ drivers/ata/Makefile | 1 + drivers/ata/ahci_mtk.c | 196 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+) commit be1dc3fb290beb394551b8cee45d03e6375b28e6 Author: Sergei Shtylyov Date: Sun Aug 27 22:55:09 2017 +0300 pata_octeon_cf: use of_property_read_{bool|u32}() The Octeon CF driver basically open-codes of_property_read_{bool|u32}() using of_{find|get}_property() calls in its probe() method. Using the modern DT APIs saves 2 LoCs and 16 bytes of object code (MIPS gcc 3.4.3). Signed-off-by: Sergei Shtylyov Signed-off-by: Tejun Heo drivers/ata/pata_octeon_cf.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 9ee0a0558819e63d189426c953668fe1ce7cb637 Author: Danilo Krummrich Date: Mon Aug 28 09:59:20 2017 -0700 Input: PS/2 gpio bit banging driver for serio bus This driver provides PS/2 serio bus support by implementing bit banging with the GPIO API. The GPIO pins, data and clock, can be configured with a node in the device tree or by generic device properties (GDP). Writing to a device is supported as well, though it is possible timings can not be halt as they are tough and difficult to reach with bit banging. Therefore it can be configured (also in DT and GDP) whether the serio write function should be available for clients. This driver is for development purposes and not recommended for productive use. However, this driver can be useful e.g. when no USB port is available or using old peripherals is desired as PS/2 controller chips getting rare. This driver was tested on bcm2825 and on Kirin 960 and it worked well together with the atkbd and psmouse driver. Signed-off-by: Danilo Krummrich Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/serio/ps2-gpio.txt | 23 ++ Documentation/gpio/drivers-on-gpio.txt | 5 + drivers/input/serio/Kconfig | 11 + drivers/input/serio/Makefile | 1 + drivers/input/serio/ps2-gpio.c | 453 +++++++++++++++++++++ 5 files changed, 493 insertions(+) commit 0ca0681002587d56ebadc16a6c6653028c3c5cbf Author: Liang Yan Date: Mon Aug 28 09:41:08 2017 -0700 Input: xen-kbdfront - enable auto repeat for xen keyboard frontend driver Long pressed key could not show right in XEN vncviewer after tigervnc client changed the way how to send repeat keys, from "Down Up Down Up ..." to "Down Down ... Up". This will report autorepeat to input by checking if same key being pressed, and let handler process it finally. Signed-off-by: Liang Yan Signed-off-by: Dmitry Torokhov drivers/input/misc/xen-kbdfront.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e9a823fb34a8b0fcba6e112aa1003258a1a5af50 Author: David Jeffery Date: Mon Aug 28 10:52:44 2017 -0600 block: fix warning when I/O elevator is changed as request_queue is being removed There is a race between changing I/O elevator and request_queue removal which can trigger the warning in kobject_add_internal. A program can use sysfs to request a change of elevator at the same time another task is unregistering the request_queue the elevator would be attached to. The elevator's kobject will then attempt to be connected to the request_queue in the object tree when the request_queue has just been removed from sysfs. This triggers the warning in kobject_add_internal as the request_queue no longer has a sysfs directory: kobject_add_internal failed for iosched (error: -2 parent: queue) ------------[ cut here ]------------ WARNING: CPU: 3 PID: 14075 at lib/kobject.c:244 kobject_add_internal+0x103/0x2d0 To fix this warning, we can check the QUEUE_FLAG_REGISTERED flag when changing the elevator and use the request_queue's sysfs_lock to serialize between clearing the flag and the elevator testing the flag. Signed-off-by: David Jeffery Tested-by: Ming Lei Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/blk-sysfs.c | 2 ++ block/elevator.c | 4 ++++ 2 files changed, 6 insertions(+) commit 1e743997fb9a56cbb34591f5fe88a74c14b8688d Author: Markus Elfring Date: Sat Aug 26 19:22:32 2017 +0200 power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies() 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 Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c023b90699c820452093e7f24fb9058900971fda Author: Bhumika Goyal Date: Mon Aug 21 17:13:12 2017 +0530 power: supply: make device_attribute const Make these const as they are 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: Sebastian Reichel drivers/power/supply/olpc_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2f6721b42bd503e2cced065f7dfbe8e79d59a09 Author: Alexander Smirnov Date: Thu Aug 24 17:02:59 2017 +0300 dmaengine: ti-dma-crossbar: Fix dra7 reserve function DMA crossbar uses 'xbar->dma_inuse' variable to manage allocated routes. Each bit represents respective DMA channel. If the channel is free, bit is set to '0', if channel is allocated, bit should be set to '1'. In reserve function, the bits for requested DMA channels are cleared, so they are not really reserved, but freed and become ready for allocation. Signed-off-by: Alexander Smirnov Acked-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/ti-dma-crossbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a865a155568fcfbc51cf16ad150834e1443b5d2a Author: Hans de Goede Date: Mon Aug 14 22:18:11 2017 +0200 power: supply: max17042_battery: Fix ACPI interrupt issues On some x86/ACPI boards the DSDT defines an ACPI event handler for the max17047 IRQ, this causes several problems: 1) We need to share the IRQ to avoid an error getting it 2) Even of we are willing to share, we may fail to share because some DSDTs claim it exclusivly 3) If we are unable to share the IRQ, or the IRQ is only listed as an ACPI event source and not in the max1704 firmware node, then the charge threshold IRQ (which is used to give an IRQ every 1 percent charge change) becomes a problem, the ACPI event handler will not update this to the next 1 percent threshold, so the IRQ keeps firing and we get an IRQ storm pegging 1 CPU core. This happens despite the max17042 driver not setting the charge threshold because Windows uses it and leaves it set on reboot. So if we are unable to get the IRQ we need to reprogram the charge threshold to its disabled setting. This commit fixes al of the above, while at it it also makes the error msg when being unable to get the IRQ consistent with other messages. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e21162029a57d3fe657e1eae12283702360cd5c5 Author: Hans de Goede Date: Mon Aug 14 22:18:10 2017 +0200 power: supply: max17042_battery: Add support for ACPI enumeration Some x86 devices enumerate a max17047 fuel-gauge through a MAX17047 ACPI firmware-node, add support for this. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 1aff64715edb8565e99337b842d814d636641b50 Author: Florian Westphal Date: Mon Aug 28 17:00:12 2017 +0200 netfilter: rt: account for tcp header size too This needs to accout for the ipv4/ipv6 header size and the tcp header without options. Fixes: 6b5dc98e8fac0 ("netfilter: rt: add support to fetch path mss") Reported-by: Matteo Croce Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_rt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d11dd6cdc3883f3c74f841f4d40dfe57c0b9756c Author: Davide Caratti Date: Mon Aug 28 11:52:07 2017 +0200 netfilter: conntrack: remove unused code in nf_conntrack_proto_generic.c L4 protocol helpers for DCCP, SCTP and UDPlite can't be built as kernel modules anymore, so we can remove code enclosed in #ifdef CONFIG_NF_CT_PROTO_{DCCP,SCTP,UDPLITE}_MODULE Signed-off-by: Davide Caratti Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_generic.c | 12 ------------ 1 file changed, 12 deletions(-) commit b38cf90133e5b86c26633c1041c2cdc7360cb346 Author: Varsha Rao Date: Mon Aug 28 18:05:26 2017 +0200 netfilter: Remove NFDEBUG() Remove NFDEBUG and use pr_debug() instead of it. Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_internals.h | 6 ------ net/netfilter/nf_sockopt.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) commit 95fd3ad9cd5f8a4bb01215b846a3c8e6adefe21c Author: Andrew Jeffery Date: Tue Aug 15 16:51:02 2017 +0930 i2c: aspeed: Retain delay/setup/hold values when configuring bus frequency In addition to the base, low and high clock configuration, the AC timing register #1 on the AST2400 houses fields controlling: 1. tBUF: Minimum delay between Stop and Start conditions 2. tHDSTA: Hold time for the Start condition 3. tACST: Setup time for Start and Stop conditions, and hold time for the Repeated Start condition These values are defined in hardware on the AST2500 and therefore don't need to be set. aspeed_i2c_init_clk() was performing a direct write of the generated clock values rather than a read/mask/modify/update sequence to retain tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST fields on the AST2400. This resulted in a delay/setup/hold time of 1 base clock, which in some configurations is not enough for some devices (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired bus speed of 100kHz). Signed-off-by: Andrew Jeffery Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5ffa70b2a38befadb920b85fe87f5da2b4cff623 Merge: 75864b3 cc4a41f Author: Boris Brezillon Date: Mon Aug 28 18:04:15 2017 +0200 Merge tag 'v4.13-rc7' into mtd/next Merge v4.13-rc7 back to resolve merge conflicts in drivers/mtd/nand/nandsim.c and include/asm-generic/vmlinux.lds.h. commit 7521621e600aeefe5ffcc1f90ae26a42fc20c452 Author: Michal Suchanek Date: Fri Aug 11 15:44:43 2017 +0200 Do not disable driver and bus shutdown hook when class shutdown hook is set. As seen from the implementation of the single class shutdown hook this is not very sound design. Rename the class shutdown hook to shutdown_pre to make it clear it runs before the driver shutdown hook. Signed-off-by: Michal Suchanek Reviewed-by: Jarkko Sakkinen Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 9 +++++---- drivers/char/tpm/tpm-chip.c | 11 ++--------- include/linux/device.h | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) commit 235f8da119351ae583abfbbf577eb61a8b564203 Author: weiping zhang Date: Fri Aug 25 01:11:33 2017 +0800 block, scheduler: convert xxx_var_store to void The last parameter "count" never be used in xxx_var_store, convert these functions to void. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/bfq-iosched.c | 33 +++++++++++++++++---------------- block/cfq-iosched.c | 13 ++++++------- block/deadline-iosched.c | 9 ++++----- block/mq-deadline.c | 9 ++++----- 4 files changed, 31 insertions(+), 33 deletions(-) commit ac317e276700a613057c34f10b2dc714c17d1b15 Author: Arvind Yadav Date: Wed Aug 2 16:51:08 2017 +0530 char: virtio: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/char/virtio_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c26bbb3ca9c4c58b886497efbeccac7cbd9e98a4 Author: Srinivas Kandagatla Date: Wed Jul 26 12:09:02 2017 +0200 Documentation/ABI: document the nvmem sysfs files NVMEM has been in kernel since v4.2 but the ABI document was missing since then. userspace interface did not change since then and seems stable, so this patch documents the nvmem ABI. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-bus-nvmem | 19 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 20 insertions(+) commit e2f387d2df0ece6d4418bb09bef7802cfaf7142d Author: Florian Westphal Date: Fri Aug 25 02:59:41 2017 +0200 netfilter: conntrack: don't log "invalid" icmpv6 connections When enabling logging for invalid connections we currently also log most icmpv6 types, which we don't track intentionally (e.g. neigh discovery). "invalid" should really mean "invalid", i.e. short header or bad checksum. We don't do any logging for icmp(v4) either, its just useless noise. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 5 ----- 1 file changed, 5 deletions(-) commit d78acfe934e3b9f533f72ee3dde0982935fc2b32 Author: Sinclair Yeh Date: Wed Jul 5 01:51:42 2017 -0700 drm/vmwgfx: Bump the version for fence FD support Minor version bump to indicate support for fence FD Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c906965dee22d5e95d0651759ba107b420212a9f Author: Sinclair Yeh Date: Wed Jul 5 01:49:32 2017 -0700 drm/vmwgfx: Add export fence to file descriptor support Added code to link a fence to a out_fence_fd file descriptor and thread out_fence_fd down to vmw_execbuf_copy_fence_user() so it can be copied into the IOCTL reply and be passed back up the the user. v2: Make sure to sync and clean up in case of failure Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 8 +++- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 69 +++++++++++++++++++++++++++++---- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 4 files changed, 70 insertions(+), 11 deletions(-) commit 585851164660e8dff961178a9533857b21d63975 Author: Sinclair Yeh Date: Wed Jul 5 01:45:40 2017 -0700 drm/vmwgfx: Add support for imported Fence File Descriptor This allows vmwgfx to wait on a fence created by another device. v2: * Remove special handling for vmwgfx fence and just use dma_fence_wait() * Use interruptible waits * Added function documentation Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 24 ++++++++++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 45 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 4 +++ 3 files changed, 71 insertions(+), 2 deletions(-) commit 2cfa0bb25d25aa183ea29f1f9c2bc65f3f2c2264 Author: Sinclair Yeh Date: Wed Jul 5 01:37:55 2017 -0700 drm/vmwgfx: Prepare to support fence fd Make the fields and flags available. Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 5 ----- include/uapi/drm/vmwgfx_drm.h | 11 ++++++++--- 2 files changed, 8 insertions(+), 8 deletions(-) commit df44d30d28cb7dd4f3dc105d843a4a01f5dfc860 Author: Arvind Yadav Date: Wed Aug 2 19:36:20 2017 +0530 base: topology: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ef2541f268f56a4b93acb0f921c8fc4b74bfc9f Author: Rob Herring Date: Tue Jul 18 16:42:49 2017 -0500 base: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf0dec6674c1e2a7ba326cfbbe7f05a70458afc9 Author: Eric Biggers Date: Thu Jun 22 11:33:47 2017 -0700 dm ioctl: constify ioctl lookup table Constify the lookup table for device-mapper ioctls so that it is placed in .rodata. Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5916a22b83041b07d63191fe06206ae0fff6ec7a Author: Eric Biggers Date: Thu Jun 22 11:32:45 2017 -0700 dm: constify argument arrays The arrays of 'struct dm_arg' are never modified by the device-mapper core, so constify them so that they are placed in .rodata. (Exception: the args array in dm-raid cannot be constified because it is allocated on the stack and modified.) Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 4 ++-- drivers/md/dm-crypt.c | 2 +- drivers/md/dm-flakey.c | 4 ++-- drivers/md/dm-integrity.c | 2 +- drivers/md/dm-mpath.c | 10 +++++----- drivers/md/dm-switch.c | 2 +- drivers/md/dm-table.c | 7 ++++--- drivers/md/dm-thin.c | 2 +- drivers/md/dm-verity-target.c | 2 +- include/linux/device-mapper.h | 4 ++-- 10 files changed, 20 insertions(+), 19 deletions(-) commit 3f2e539359bd0e709eb35127dc04df6bf8c3e8de Author: Mikulas Patocka Date: Fri Jul 21 12:00:00 2017 -0400 dm integrity: count and display checksum failures This changes DM integrity to count the number of checksum failures and report the counter in response to STATUSTYPE_INFO request (via 'dmsetup status'). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1e3b21c6fb671a5ce9d77a05a8bde805d8908467 Author: Mikulas Patocka Date: Sun Apr 30 17:31:22 2017 -0400 dm integrity: optimize writing dm-bufio buffers that are partially changed Rather than write the entire dm-bufio buffer when only a subset is changed, improve dm-bufio (and dm-integrity) by only writing the subset of the buffer that changed. Update dm-integrity to make use of dm-bufio's new dm_bufio_mark_partial_buffer_dirty() interface. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 95 +++++++++++++++++++++++++++++++++-------------- drivers/md/dm-bufio.h | 9 +++++ drivers/md/dm-integrity.c | 2 +- 3 files changed, 77 insertions(+), 29 deletions(-) commit 917c8c2570e1c106ad68ee3d00eb28351b923b0a Author: Colin Ian King Date: Fri Aug 18 16:34:59 2017 +0100 lkdtm: fix spelling mistake: "incremeted" -> "incremented" Trivial fix to spelling mistake in pr_info message Signed-off-by: Colin Ian King Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_refcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3ad2c17b4047747bcec074814c08b00795afc85 Author: Florian Westphal Date: Wed Aug 23 17:26:27 2017 +0200 netfilter: core: batch nf_unregister_net_hooks synchronize_net calls re-add batching in nf_unregister_net_hooks(). Similar as before, just store an array with to-be-free'd rule arrays on stack, then call synchronize_net once per batch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) commit 2420b79f8c18a75ee2417cace381f4604b9b4365 Author: Florian Westphal Date: Wed Aug 23 17:26:26 2017 +0200 netfilter: debug: check for sorted array Make sure our grow/shrink routine places them in the correct order. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 960632ece6949be1ab6f7a911faa4fa6e8305f4a Author: Aaron Conole Date: Thu Aug 24 00:08:32 2017 +0200 netfilter: convert hook list to an array This converts the storage and layout of netfilter hook entries from a linked list to an array. After this commit, hook entries will be stored adjacent in memory. The next pointer is no longer required. The ops pointers are stored at the end of the array as they are only used in the register/unregister path and in the legacy br_netfilter code. nf_unregister_net_hooks() is slower than needed as it just calls nf_unregister_net_hook in a loop (i.e. at least n synchronize_net() calls), this will be addressed in followup patch. Test setup: - ixgbe 10gbit - netperf UDP_STREAM, 64 byte packets - 5 hooks: (raw + mangle prerouting, mangle+filter input, inet filter): empty mangle and raw prerouting, mangle and filter input hooks: 353.9 this patch: 364.2 Signed-off-by: Aaron Conole Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netdevice.h | 2 +- include/linux/netfilter.h | 45 +++--- include/linux/netfilter_ingress.h | 4 +- include/net/netfilter/nf_queue.h | 2 +- include/net/netns/netfilter.h | 2 +- net/bridge/br_netfilter_hooks.c | 19 ++- net/netfilter/core.c | 297 ++++++++++++++++++++++++++++---------- net/netfilter/nf_internals.h | 3 +- net/netfilter/nf_queue.c | 67 +++++---- 9 files changed, 307 insertions(+), 134 deletions(-) commit 5fd02ebe6537a7567f060ed36fb0dda64c5b63d8 Author: Florian Westphal Date: Mon Aug 21 16:19:26 2017 +0200 netfilter: fix a few (harmless) sparse warnings net/netfilter/nft_payload.c:187:18: warning: incorrect type in return expression (expected bool got restricted __sum16 [usertype] check) net/netfilter/nft_exthdr.c:222:14: warning: cast to restricted __be32 net/netfilter/nft_rt.c:49:23: warning: incorrect type in assignment (different base types expected unsigned int got restricted __be32) net/netfilter/nft_rt.c:70:25: warning: symbol 'nft_rt_policy' was not declared. Should it be static? Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 2 +- net/netfilter/nft_payload.c | 2 +- net/netfilter/nft_rt.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit b753351ec8f4c6a25c6d9b5c4eccce62e448a571 Author: Arvind Yadav Date: Wed Aug 23 21:57:31 2017 +0530 dmaengine: pl330: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Vinod Koul drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b80fa1217c3c2ad634e3d92ae8bfc6d442ffaeae Author: Arvind Yadav Date: Wed Aug 23 21:57:12 2017 +0530 dmaengine: pl08x: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f1a36cc4d4986a800018f1d3eed94a4e92a576f Author: Thomas Hellstrom Date: Thu Aug 24 08:06:31 2017 +0200 drm/vmwgfx: Fix incorrect command header offset at restart Sometimes it appears like the device modifies the command header offset member. So explicitly clear it when restarting after an error. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 1 + 1 file changed, 1 insertion(+) commit 5f55be5f306a619e0cdc58104f06a564f5bb30d5 Author: Thomas Hellstrom Date: Thu Aug 24 08:06:30 2017 +0200 drm/vmwgfx: Support the NOP_ERROR command Can be used by user-space applications to test and verify the kernel command buffer error recovery functionality. Malicious user-space apps could potentially use this command to slow down graphics processing somewhat, but they could also accomplish the same thing using a random malformed command so this should be considered safe. At least as safe as it gets. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 ++ 1 file changed, 2 insertions(+) commit 65b97a2bec2fc75e9137e8a17954cb66809215bf Author: Thomas Hellstrom Date: Thu Aug 24 08:06:29 2017 +0200 drm/vmwgfx: Restart command buffers after errors Previously we skipped the command buffer and added an extra fence to avoid hangs due to skipped fence commands. Now we instead restart the command buffer after the failing command, if there are any commands left. In addition we print out some information about the failing command and its location in the command buffer. Testing Done: ran glxgears using mesa modified to send the NOP_ERROR command before each 10th clear and verified that we detected the device error properly and that there were no other device errors caused by incorrectly ordered command buffers. Also ran the piglit "quick" test suite which generates a couple of device errors and verified that they were handled as intended. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 183 +++++++++++++++++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 48 ++++++++- 3 files changed, 206 insertions(+), 27 deletions(-) commit ef369904aaf717e0390b483efd47daba9ba8ddf2 Author: Thomas Hellstrom Date: Thu Aug 24 08:06:28 2017 +0200 drm/vmwgfx: Move irq bottom half processing to threads This gets rid of the irq bottom half tasklets and instead performs the work needed in process context. We also convert irq-disabling spinlocks to ordinary spinlocks. This should decrease system latency for other system components, like sound for example but has the potential to increase latency for processes that wait on the GPU. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 58 ++++++++++------------------- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 20 ++++++---- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 57 ++++++++++++---------------- drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 68 ++++++++++++++++++++++++++++------ 4 files changed, 112 insertions(+), 91 deletions(-) commit e300173f06160d65d383d54fdd48027ecd052af3 Author: Thomas Hellstrom Date: Thu Aug 24 08:06:27 2017 +0200 drm/vmwgfx: Don't use drm_irq_[un]install We're not allowed to change the upstream version of the drm_irq_install function to be able to incorporate threaded irqs. So roll our own irq install- and uninstall functions instead of relying on the drm core ones. Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 11 +++------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 45 ++++++++++++++++++++++++++++--------- 3 files changed, 40 insertions(+), 21 deletions(-) commit 2f13f8c50ae21ce70a437149a0e221755e554912 Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:03 2017 +0200 dt-bindings: i2c: eeprom: Document vendor to be used and deprecated ones 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. Document in the Device Tree binding document that this manufacturer should be used as the generic fallback. Also document the deprecated vendors. Suggested-by: Wolfram Sang Suggested-by: Rob Herring Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/eeprom/eeprom.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit df770ff0586a494fabe68ffbe2898d7df5666663 Author: Mike Leach Date: Wed Aug 2 10:22:19 2017 -0600 perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file The value passed into the perf.data file for the CONFIGR register in ETMv4 was incorrectly being set to the command line options/ETMv3 value. Adds bit definitions and function to remap this value to the correct ETMv4 CONFIGR bit values for all selected options. Signed-off-by: Mike Leach Signed-off-by: Greg Kroah-Hartman include/linux/coresight-pmu.h | 5 +++++ tools/include/linux/coresight-pmu.h | 5 +++++ tools/perf/arch/arm/util/cs-etm.c | 28 +++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) commit 4da69f49e73e3c79f079de62ea940cabbbf15ae7 Author: Srinivas Kandagatla Date: Wed Jul 26 11:34:48 2017 +0200 nvmem: include linux/err.h from header missing err.h header file can cause simillar errors like below in some configurations. "error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]" This adds the missing include to ensure we can always include the header. Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman include/linux/nvmem-consumer.h | 3 +++ 1 file changed, 3 insertions(+) commit fd08611317a3397d8dd54c68e98afc8396fa11f7 Author: Dan Carpenter Date: Wed Jul 26 11:34:47 2017 +0200 nvmem: core: remove unneeded NULL check "p" is the list iterator so it can't be NULL. Static checkers complain about this unnecessary check because we dereference the list iterator to get the next item in the list so we'd be in trouble if it really was NULL. I have removed the check. Signed-off-by: Dan Carpenter Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d026d70a2e9460dc701d20b48672b80a2656006d Author: Leonard Crestez Date: Wed Jul 26 11:34:46 2017 +0200 nvmem: core: Add nvmem_cell_read_u32 This function does a quick and easy read of an u32 value without any kind of resource management code on the consumer side. Signed-off-by: Leonard Crestez Reviewed-by: Shawn Guo Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/nvmem-consumer.h | 7 +++++++ 2 files changed, 44 insertions(+) commit 5f214ccdd1cab5cdfbd15bf08124d456c7fd8eec Author: Rob Herring Date: Wed Jul 26 11:34:44 2017 +0200 nvmem: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aed0c46e325840d404d8020cd4b20dec0d4d96f4 Author: Philipp Zabel Date: Wed Jul 26 11:34:43 2017 +0200 nvmem: lpc18xx-eeprom: 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: Srinivas Kandagatla Cc: Joachim Eastwood Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Philipp Zabel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/lpc18xx_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfd4473b850c8cfaa1cdf56b8ef52fae4e8a6ee5 Author: Qiuxu Zhuo Date: Tue Aug 15 00:04:50 2017 +0800 i2c: i801: Restore the presence state of P2SB PCI device after reading BAR Sun, Yunying reported the following failure on Denverton micro-server: EDAC DEBUG: pnd2_init: EDAC DEBUG: pnd2_probe: EDAC DEBUG: dnv_rd_reg: Read b_cr_tolud_pci=00000000_80000000 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_lo_pci=00000000_80000000 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_hi_pci=00000000_00000004 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region0_mchbar=00000000_00000000 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region1_mchbar=00000000_00000000 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_base_mchbar=00000000_00000000 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_mask_mchbar=00000000_00000000 EDAC pnd2: Failed to register device with error -19. On Denverton micro-server, the presence of the P2SB bridge PCI device is enabled or disabled by the item 'RelaxSecConf' in BIOS setup menu. When 'RelaxSecConf' is enabled, the P2SB PCI device is present and the pnd2_edac EDAC driver also uses it to get BAR. Hiding the P2SB PCI device caused the pnd2_edac EDAC driver failed to get BAR then reported the above failure. Therefor, store the presence state of P2SB PCI device before unhiding it for reading BAR and restore the presence state after reading BAR. Signed-off-by: Qiuxu Zhuo Reported-by: Yunying Sun Tested-by: Yunying Sun Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ed779b275b27bea231dae0aebd048d72ff5a010d Author: Anton Vasilyev Date: Sat Aug 12 22:45:50 2017 +0100 parport: use release_mem_region instead of release_resource Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_ax88796.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit df4c756e5f6bf08bd7bc63bbfd7fa921a855f241 Author: Carlos Palminha Date: Sat Aug 12 22:45:49 2017 +0100 parport: cleanup statics initialization to NULL or 0 based on checkpatch, cleanup the "do not initialise statics to" 0 or NULL. Signed-off-by: Carlos Palminha Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/daisy.c | 2 +- drivers/parport/parport_atari.c | 2 +- drivers/parport/parport_ip32.c | 2 +- drivers/parport/parport_mfc3.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6979b928cd53613c86dcb8e997abd26a5dcb45d3 Author: Mikulas Patocka Date: Sat Aug 12 22:45:48 2017 +0100 parport_pc: use pr_cont The kernel adds newline automatically between printk calls, we must use pr_cont if we want multiple printk strings on the same line. Signed-off-by: Mikulas Patocka Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_pc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit f6887531c0c6b106dbe9aa5ed6eaa166d93df52e Author: Andrew Worsley Date: Sun Aug 27 21:34:23 2017 +1000 drivers: w1: Add 1w slave driver for DS28E05 EEPROM Add a one wire driver for the DS28E05 one wire slave chip. This chip requires OverDrive support to talk to it. Signed-off-by: Andrew Worsley Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/Kconfig | 8 ++ drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2805.c | 313 ++++++++++++++++++++++++++++++++++++++++++ drivers/w1/w1.c | 2 + 4 files changed, 324 insertions(+) commit 54865314f5a1bfade1555ca6b26653729a0f3e23 Author: Andrew Worsley Date: Sun Aug 27 21:34:22 2017 +1000 drivers: w1: Extend 1W master driver DS2482 with module option to support PPM/SPU/1WS features Extend the one wire DS2482 master driver with a module option that allows support for PPM/SPU/1WS interface modes to be requested. This allows support of chips that require one or more of these features such as the DS28E05. Signed-off-by: Andrew Worsley Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds2482.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e5cf84e8224c49f335aec6b69b3e373bbbe4641a Author: Colin Ian King Date: Sat Aug 12 22:34:03 2017 +0100 w1: ds2438: make several functions static The functions w1_ds2438_get_page, w1_ds2438_get_temperature, w1_ds2438_change_config_bit and w1_ds2438_get_voltage are local to the source and do not need to be in global scope, so make it static. Cleans up sparse warnings: symbol 'w1_ds2438_get_page' was not declared. Should it be static? symbol 'w1_ds2438_get_temperature' was not declared. Should it be static? symbol 'w1_ds2438_change_config_bit' was not declared. Should it be static? symbol 'w1_ds2438_get_voltage' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2438.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c64163e2373a709ccf06aa6ff8f338112be1d481 Author: Johannes Poehlmann Date: Tue Jul 25 13:27:15 2017 +0200 w1: ds1wm: add messages to make incorporation in mfd-drivers easier w1: ds1wm: add messages to make incorporation in mfd-drivers easier Signed-off-by: Johannes Poehlmann Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds1wm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 1d925f45d8301f6bf6a66d31fcd30b9580479c93 Author: Johannes Poehlmann Date: Tue Jul 25 13:27:14 2017 +0200 w1: ds1wm: silence interrupts on HW before claiming the interrupt w1: ds1wm: silence interrupts on HW before claiming the interrupt. This way avoid possible invalid interrupts in the initialization phase. Signed-off-by: Johannes Poehlmann Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds1wm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c3248f0ee0615f7f43d3ad0f27006854b2bd325f Author: Johannes Poehlmann Date: Tue Jul 25 13:27:13 2017 +0200 w1: ds1wm: add level interrupt modes w1: ds1wm: add level interrupt modes Signed-off-by: Johannes Poehlmann Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds1wm.c | 4 ++++ 1 file changed, 4 insertions(+) commit baa8055de0293a91f87bef5f32296d9ddcba9c56 Author: Johannes Poehlmann Date: Tue Jul 25 13:27:12 2017 +0200 w1: ds1wm: make endian clean and use standard io memory accessors o Make endian clean, make HW-endianness configurable. o Use ioread*, iowrite* instead of __raw_readb,__raw_writeb to also use memory-barriers when accessing HW-registers. We do not want reordering to happen here. Both changes are tightly coupled, so I do them in one patch Signed-off-by: Johannes Poehlmann Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds1wm.c | 60 ++++++++++++++++++++++++++++++++++++++++++++-- include/linux/mfd/ds1wm.h | 5 ++++ 2 files changed, 63 insertions(+), 2 deletions(-) commit 242b476f821b055ed0fb70a8eb6defa85baada9c Author: Johannes Poehlmann Date: Tue Jul 25 13:27:11 2017 +0200 w1: ds1wm: fix register offset (bus shift) calculation Replace incorrect register offsett calculation by direct configuration of bus_shift in mfd-cell. Indirect definition of address-shift by resource size was unobvious and was wrong (should have used a binary log). Signed-off-by: Johannes Poehlmann Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds1wm.c | 23 +++++++++++++++++++---- include/linux/mfd/ds1wm.h | 24 +++++++++++++++++------- 2 files changed, 36 insertions(+), 11 deletions(-) commit d7b3cf892abd94423af02e03f2d6e4a671617328 Author: Arvind Yadav Date: Sat Aug 12 14:08:02 2017 +0530 w1: ds2490: constify usb_device_id and fix space before '[' error 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. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/ds2490.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0faef109bdac1328b529342bfc8c3d34005a56fe Author: Arvind Yadav Date: Wed Aug 2 16:49:05 2017 +0530 char: tlclk: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/char/tlclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a890d56a9d9e4a8345c08f9212504bbc396bb7dd Author: Arvind Yadav Date: Fri Jul 28 16:00:42 2017 +0530 w1: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47a6623b2d678bc5ce6d3fefbb26b4392bec4929 Author: Edward A. James Date: Thu Jul 20 09:55:32 2017 -0500 drivers/fsi/scom: Remove reset before every putscom Reset causes problems for operations requiring multiple scoms (e.g. i2c over scom). Instead, reset scom engine during probe. Signed-off-by: Edward A. James Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-scom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 061c0958de2e5994c81991852f5a33ffe9da810a Author: Bhumika Goyal Date: Wed Aug 2 19:39:32 2017 +0530 drivers/fsi: add const to bin_attribute structures Declare bin_attribute structures as const as they are only passed as an argument to the function device_create_bin_file. This argument is of type const, so declare the structure as const. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c28adcb536109f54ddf349ee2fd9beef084d4d88 Author: Masahiro Yamada Date: Mon Aug 28 21:33:07 2017 +0900 arm64: dts: uniphier: add PXs3 SoC support Initial support for PXs3 SoC and its reference development board. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/Makefile | 3 +- .../arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 62 ++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 367 +++++++++++++++++++++ 3 files changed, 431 insertions(+), 1 deletion(-) commit 8f3addf1b451784104ba3593d80702b4815d5a94 Author: Peter Rosin Date: Tue Aug 22 08:27:08 2017 +0200 mux: zap mux- prefix from the source files Preserve the module names with Makefile additions. Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/Makefile | 5 + drivers/mux/adg792a.c | 157 +++++++++++++ drivers/mux/core.c | 547 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/mux/gpio.c | 114 ++++++++++ drivers/mux/mmio.c | 141 ++++++++++++ drivers/mux/mux-adg792a.c | 157 ------------- drivers/mux/mux-core.c | 547 ---------------------------------------------- drivers/mux/mux-gpio.c | 114 ---------- drivers/mux/mux-mmio.c | 141 ------------ 9 files changed, 964 insertions(+), 959 deletions(-) commit d3cc8ca3ab6c1d78c26102870313fa36c48ea247 Author: Ulrich Hecht Date: Tue Aug 22 08:27:07 2017 +0200 mux: include compiler.h from mux/consumer.h Required for __must_check. Signed-off-by: Ulrich Hecht Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman include/linux/mux/consumer.h | 2 ++ 1 file changed, 2 insertions(+) commit c398bc9b05a84ceadacbc405fe33535fd4826c6c Author: Rob Herring Date: Tue Aug 22 08:27:06 2017 +0200 mux: convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/mux-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2c9c4ae6573a3f4c270e8a35cd71700d3b802ea8 Author: Arvind Yadav Date: Tue Aug 1 21:31:57 2017 +0530 applicom: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/char/applicom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cb95fae7a326f164751782114981e48bf284258 Author: Nava kishore Manne Date: Fri Jul 28 15:17:26 2017 +0200 char: xilinx_hwicap: Fix warnings in the driver This patch fixes the below warning --> Use #include instead of --> Use #include instead of --> please, no space before tabs --> Block comments use a trailing */ on a separate line --> Possible unnecessary 'out of memory' message --> Block comments use * on subsequent lines --> Block comments use a trailing */ on a separate line --> braces {} are not necessary for any arm of this statement --> DT compatible string "xlnx,opb-hwicap-1.00.b" appears un-documented --> DT compatible string "xlnx,xps-hwicap-1.00.a" appears un-documented Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/xilinx.txt | 2 ++ drivers/char/xilinx_hwicap/xilinx_hwicap.c | 35 ++++++++++++++-------------- drivers/char/xilinx_hwicap/xilinx_hwicap.h | 6 +++-- 3 files changed, 23 insertions(+), 20 deletions(-) commit ef2b56df5a8abd4036a19870b93ac9f0b1514573 Author: Nava kishore Manne Date: Fri Jul 28 15:17:25 2017 +0200 char: xilinx_hwicap: Fix kernel doc warnings This patch fixes the kernel doc warnings in the driver. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/char/xilinx_hwicap/xilinx_hwicap.c | 4 ++++ drivers/char/xilinx_hwicap/xilinx_hwicap.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 9f57ed095ff82eb4463c2913b22966a8c7d06bc6 Merge: 981b467 4243c408 Author: Greg Kroah-Hartman Date: Mon Aug 28 17:01:04 2017 +0200 Merge tag 'extcon-next-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 4.14 Detailed description for this pull request: 1. Add new 'extcon-usbc-cros-ec.c' driver - ChromeOS Embedded Controller extcon driver supports the detection of the Display Port (EXTCON_DISP_DP) through USB C-type and contol it. 2. Update extcon core - Modify the description for both functions and structures in order to improve the readability and give the more correct guide about the role of functions because there are different explanation even if the same arguments. - Keep the indentation with tab instead of space - Remove the following deprecated extcon API. The deprecated API are exchanged on all of linux tree. : extcon_get_cable_state_() -> extcon_get_state() : extcon_set_cable_state_() -> extcon_set_state_sync() 3. Include the two immutable branch as following: - ib-extcon-mfd-4.14 for the 'extcon-ubsc-cros-ec.c' driver because the patches of 'extcon-ubsc-cros-ec.c' touch the MFD directory. - ib-extcon-usb-phy-4.14 for removing the deprecated extcon API because the usb/phy driver usese the deprecated extcon API. So, this immutable branch alters the extcon API and then remove them from extcon. 4. Fix minor issue of extcon driver - Fix the MHL detection on extcon-max77693.c - Convert to using %pOF instead of full_name on extcon.c - Add 'const' kerywod for acpi_device_id on extcon-intel-int3496.c commit 8a7a516afaed2ee6b5da551a01c573eba3b69c16 Author: Kunihiko Hayashi Date: Mon Aug 28 11:11:45 2017 +0900 ARM: dts: uniphier: add pinctrl groups of ethernet phy mode Add pinctrl groups of ethenet phy mode, such as "ether_rgmii", "ether_rmii", and "ether_mii". Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 7b8330d28c63807fbdfe9884e65d5ab482a4b3ad Author: Masahiro Yamada Date: Sun Aug 27 21:02:31 2017 +0900 ARM: dts: uniphier: fix size of sdctrl nodes All registers are located within 0x400 size from the base address. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pro5.dtsi | 2 +- arch/arm/boot/dts/uniphier-pxs2.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 80a687041a212c75cebf874b3c4b54a3f3da291d Author: Masahiro Yamada Date: Sun Aug 27 21:02:30 2017 +0900 ARM: dts: uniphier: add AIDET nodes Add UniPhier AIDET (ARM Interrupt Detector) nodes to support active low interrupts. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 7 +++++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 7 +++++++ arch/arm/boot/dts/uniphier-pro5.dtsi | 7 +++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 7 +++++++ arch/arm/boot/dts/uniphier-sld8.dtsi | 7 +++++++ 5 files changed, 35 insertions(+) commit 981b4677364dee053763a4c542ed9eb6d94c246c Merge: 234b7f8 a0e7df3 Author: Greg Kroah-Hartman Date: Mon Aug 28 16:58:19 2017 +0200 Merge tag 'stm-for-greg-20170825' of git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm into char-misc-next Alexander writes: stm class / intel_th: Updates for 4.14 Intel TH: * Updated subdevice management code to better fit host mode * Added support for Low Power Path (LPP) output type * Fixed memory allocation with IOMMU enabled (DMAR tables) * Added Cannon Lake PCH PCI IDs * Added a quirk to force time sync on devices that need it STM: * Fixed potential read overflow in ioctl() * Documented stm_ftrace source. commit 555861fb4859e3debe96e19172f157d54abb7056 Author: Masahiro Yamada Date: Sun Aug 27 21:03:07 2017 +0900 arm64: dts: uniphier: fix size of sdctrl node All registers are located within 0x400 size from the base address. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dfc6e982910c9fef4a924477b5f41a1257dd90f Author: Masahiro Yamada Date: Sun Aug 27 21:03:06 2017 +0900 arm64: dts: uniphier: add AIDET nodes Add UniPhier AIDET (ARM Interrupt Detector) nodes to support active low interrupts. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 7 +++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 7 +++++++ 2 files changed, 14 insertions(+) commit 234b7f8d3bf2738024b155b87303ed1218e620fa Author: Gustavo A. R. Silva Date: Thu Aug 17 20:43:10 2017 -0500 vmci: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1226762 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_queue_pair.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 006dbb38d7469d7465b4ffcbf5beac961cee70df Author: Arvind Yadav Date: Mon Aug 21 22:13:25 2017 +0530 misc: apds9802als: 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: Greg Kroah-Hartman drivers/misc/apds9802als.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8dbb5024b5e62704caac6915f0f5f33448b8b05 Author: Arvind Yadav Date: Mon Aug 21 22:13:26 2017 +0530 misc: hmc6352: 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: Greg Kroah-Hartman drivers/misc/hmc6352.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07e4049ae0b2abc6b9c7226af5eb802380976bae Author: Arvind Yadav Date: Mon Aug 21 22:13:27 2017 +0530 misc: isl29020: 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: Greg Kroah-Hartman drivers/misc/isl29020.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34d0eb50bd7c0c6431a67faf2e00b1316f886d45 Author: Rob Herring Date: Tue Jul 18 16:43:15 2017 -0500 misc: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 8 ++++---- drivers/misc/sram.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) commit 579e9a307256e550fe918485b828517ea3c5f2fb Author: Arvind Yadav Date: Fri Aug 4 12:07:52 2017 +0530 misc: apds9802als: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/apds9802als.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68b9e993745ffed2b39afadfe4813e104b3eba94 Author: Arvind Yadav Date: Fri Aug 4 12:07:53 2017 +0530 misc: apds990x: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/apds990x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0690ee2b01898ff2eacc8520d43a16dfc26de2ec Author: Arvind Yadav Date: Fri Aug 4 12:07:54 2017 +0530 misc: bh1770glc: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/bh1770glc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64e6d2c187d8ca78629e7206e7efd67773c9a0cb Author: Arvind Yadav Date: Fri Aug 4 12:07:55 2017 +0530 misc: isl29020: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/isl29020.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27c0823fd9a3aad44f00e0e4dfa9d1b3ce3841a6 Author: Arvind Yadav Date: Fri Aug 4 12:07:56 2017 +0530 misc: lis3lv02d: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/lis3lv02d/lis3lv02d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9045f18209b77e899f5d6ad9463f8a858f0e8535 Author: Arvind Yadav Date: Fri Aug 4 12:07:57 2017 +0530 misc: ti-st: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/ti-st/st_kim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57daedf812f1fe8b02fab1628b6f4e639466136c Author: Bhumika Goyal Date: Wed Aug 2 14:40:06 2017 +0530 MISC: add const to bin_attribute structures Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file. The arguments passed are of type const, so declare the structures to be const. Done using Coccinelle. @m disable optional_qualifier@ identifier s; position p; @@ static struct bin_attribute s@p={...}; @okay1@ position p; identifier m.s; @@ ( sysfs_create_bin_file(...,&s@p,...) | sysfs_remove_bin_file(...,&s@p,...) ) @bad@ position p!={m.p,okay1.p}; identifier m.s; @@ s@p @change depends on !bad disable optional_qualifier@ identifier m.s; @@ static +const struct bin_attribute s={...}; Signed-off-by: Bhumika Goyal Reviewed-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman drivers/misc/ds1682.c | 2 +- drivers/misc/eeprom/eeprom.c | 2 +- drivers/misc/eeprom/max6875.c | 2 +- drivers/misc/pch_phub.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit e3b9c5cea38bd3735dcc7dea571d1f57cf510ae9 Author: Arvind Yadav Date: Sun Jul 30 10:56:34 2017 +0530 misc: pch_phub: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/pch_phub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8efa6fb50696cecacb22af2410f2db34fb37b9c3 Author: Arvind Yadav Date: Sun Jul 30 10:56:35 2017 +0530 misc: hpilo: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/hpilo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 404147ba158af1c8b14739972fa5de7558e5458c Author: Arvind Yadav Date: Sun Jul 30 10:56:36 2017 +0530 misc: tifm: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. checkpatch ERROR: space prohibited before open square bracket '[' Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/tifm_7xx1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6dacf6ad484050a5afd0cd207dda49d7ed13689 Author: Arvind Yadav Date: Sun Jul 30 10:56:37 2017 +0530 misc: ioc4: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/misc/ioc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0552573575ef43daaee5b1a139952d6127f088c Author: Fabio Estevam Date: Wed Jul 19 23:35:29 2017 -0300 misc: eeprom_93xx46: Include eeprom_93xx46_platform_data struct has a 'struct gpio_desc' type member, so it is better to include , which provides 'struct gpio_desc' type. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman include/linux/eeprom_93xx46.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 54ec602370c4c818a9e9d8c4ef2a68ff8126997c Author: Fabio Estevam Date: Wed Jul 19 23:35:28 2017 -0300 misc: eeprom_93xx46: Simplify the usage of gpiod API Commit 3ca9b1ac28398c ("misc: eeprom_93xx46: Add support for a GPIO 'select' line.") introduced the optional usage of 'select-gpios' by using the gpiod API in a convoluted way. Rewrite the gpiod handling to make the code simpler. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/eeprom_93xx46.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 75e5bae6ddf74740dd6ee35bc2d33ac9018037f4 Author: Pan Bian Date: Fri Aug 11 07:13:13 2017 +0800 firmware: vpd: use memunmap instead of iounmap In functions vpd_sections_init() and vpd_section_init(), iounmap() is used to unmap memory. However, in these cases, memunmap() should be used. Signed-off-by: Pan Bian Reviewed-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 39bf04db6b2b13eeb2aa565930034dc9d4198d93 Author: Waiman Long Date: Thu Aug 17 11:49:56 2017 -0400 kernfs: Clarify lockdep name for kn->count The reference count in kernfs_node structure is treated like a rwsem by using lockdep instrumentation code. The lockdep name, however, is still "s_active" which is carried over from the old sysfs code. As s_active is no longer the variable name, its use may confuse users on where the lock is when it is reported by lockdep. So it is changed to "kn->count" which is how this variable is normally referenced in kernfs code. Signed-off-by: Waiman Long Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e41e164c3cdff632f7e4372d1d5a0df35338c370 Author: Sherry Yang Date: Wed Aug 23 08:46:43 2017 -0700 android: binder: Add shrinker tracepoints Add tracepoints in binder transaction allocator to record lru hits and alloc/free page. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 27 +++++++++++++++++++-- drivers/android/binder_trace.h | 55 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) commit f2517eb76f1f2f7f89761f9db2b202e89931738c Author: Sherry Yang Date: Wed Aug 23 08:46:42 2017 -0700 android: binder: Add global lru shrinker to binder Hold on to the pages allocated and mapped for transaction buffers until the system is under memory pressure. When that happens, use linux shrinker to free pages. Without using shrinker, patch "android: binder: Move buffer out of area shared with user space" will cause a significant slow down for small transactions that fit into the first page because free list buffer header used to be inlined with buffer data. In addition to prevent the performance regression for small transactions, this patch improves the performance for transactions that take up more than one page. Modify alloc selftest to work with the shrinker change. Test: Run memory intensive applications (Chrome and Camera) to trigger shrinker callbacks. Binder frees memory as expected. Test: Run binderThroughputTest with high memory pressure option enabled. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 + drivers/android/binder_alloc.c | 172 +++++++++++++++++++++++++++----- drivers/android/binder_alloc.h | 23 ++++- drivers/android/binder_alloc_selftest.c | 68 ++++++++++--- 4 files changed, 225 insertions(+), 40 deletions(-) commit 74310e06be4d74dcf67cd108366710dee5c576d5 Author: Sherry Yang Date: Wed Aug 23 08:46:41 2017 -0700 android: binder: Move buffer out of area shared with user space Binder driver allocates buffer meta data in a region that is mapped in user space. These meta data contain pointers in the kernel. This patch allocates buffer meta data on the kernel heap that is not mapped in user space, and uses a pointer to refer to the data mapped. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 144 +++++++++++++++++++------------- drivers/android/binder_alloc.h | 2 +- drivers/android/binder_alloc_selftest.c | 11 ++- 3 files changed, 90 insertions(+), 67 deletions(-) commit 4175e2b46fd4b9021ef81f18f1be9474b2f45d4a Author: Sherry Yang Date: Wed Aug 23 08:46:40 2017 -0700 android: binder: Add allocator selftest binder_alloc_selftest tests that alloc_new_buf handles page allocation and deallocation properly when allocate and free buffers. The test allocates 5 buffers of various sizes to cover all possible page alignment cases, and frees the buffers using a list of exhaustive freeing order. Test: boot the device with ANDROID_BINDER_IPC_SELFTEST config option enabled. Allocator selftest passes. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/Kconfig | 10 ++ drivers/android/Makefile | 1 + drivers/android/binder.c | 2 + drivers/android/binder_alloc.h | 5 + drivers/android/binder_alloc_selftest.c | 271 ++++++++++++++++++++++++++++++++ 5 files changed, 289 insertions(+) commit e21762196118c272321532fe64c512efaa088b7e Author: Sherry Yang Date: Wed Aug 23 08:46:39 2017 -0700 android: binder: Refactor prev and next buffer into a helper function Use helper functions buffer_next and buffer_prev instead of list_entry to get the next and previous buffers. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 675dc2ccc27c02449da45e1a03234104c2449f68 Author: Pawel Baldysiak Date: Wed Aug 16 17:13:46 2017 +0200 raid5-ppl: Recovery support for multiple partial parity logs Search PPL buffer in order to find out the latest PPL header (the one with largest generation number) and use it for recovery. The PPL entry format and recovery algorithm are the same as for single PPL approach. Signed-off-by: Pawel Baldysiak Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 128 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 90 insertions(+), 38 deletions(-) commit ddc088238cd6988bb4ac3776f403d7ff9d3c7a63 Author: Pawel Baldysiak Date: Wed Aug 16 17:13:45 2017 +0200 md: Runtime support for multiple ppls Increase PPL area to 1MB and use it as circular buffer to store PPL. The entry with highest generation number is the latest one. If PPL to be written is larger then space left in a buffer, rewind the buffer to the start (don't wrap it). Signed-off-by: Pawel Baldysiak Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/md.c | 16 +++++++++++++--- drivers/md/md.h | 1 + drivers/md/raid0.c | 3 ++- drivers/md/raid1.c | 3 ++- drivers/md/raid5-ppl.c | 43 +++++++++++++++++++++++++++++++++++++++--- drivers/md/raid5.c | 1 + include/uapi/linux/raid/md_p.h | 4 +++- 7 files changed, 62 insertions(+), 9 deletions(-) commit b5f0dc7b4f30d08cb56c3a14f555083846ebd2fc Author: Greg Kroah-Hartman Date: Wed Jul 19 14:51:19 2017 +0200 fbdev: uvesafb: remove DRIVER_ATTR() usage It's better to be explicit and use the DRIVER_ATTR_RW() macro when defining a driver's sysfs file. Bonus is this fixes up a checkpatch.pl warning. This is part of a series to drop DRIVER_ATTR() from the tree entirely. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman drivers/video/fbdev/uvesafb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0538dcb0171aad2155db405a5416d9df563e1187 Author: Greg Kroah-Hartman Date: Wed Jul 19 16:43:44 2017 +0200 xen: xen-pciback: remove DRIVER_ATTR() usage It's better to be explicit and use the DRIVER_ATTR_RW() and DRIVER_ATTR_RO() macros when defining a driver's sysfs file. Bonus is this fixes up a checkpatch.pl warning. This is part of a series to drop DRIVER_ATTR() from the tree entirely. Reviewed-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman drivers/xen/xen-pciback/pci_stub.c | 44 +++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 24 deletions(-) commit 6a7a81761bee2a6694c0a5fb1a16b263c96241c1 Author: Jonathan Corbet Date: Thu Aug 24 16:09:10 2017 -0600 driver core: Document struct device:dma_ops Commit 5657933dbb6e (treewide: Move dma_ops from struct dev_archdata into struct device) added the dma_ops field to struct device, but did not update the kerneldoc comment, yielding this warning: ./include/linux/device.h:969: warning: No description found for parameter 'dma_ops' Add a description and bring a little peace to the world. Signed-off-by: Jonathan Corbet Reviewed-by: Bart Van Assche Signed-off-by: Greg Kroah-Hartman include/linux/device.h | 1 + 1 file changed, 1 insertion(+) commit b697e435aeee99b7f5b2d8f8dbb51f791be99b16 Author: Jason J. Herne Date: Fri Feb 24 10:01:30 2017 -0500 KVM: s390: Support Configuration z/Architecture Mode kvm has always supported the concept of starting in z/Arch mode so let's reflect the feature bit to the guest. Also, we change sigp set architecture to reject any request to change architecture modes. Signed-off-by: Jason J. Herne Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/sigp.c | 36 +++++++++++++++++------------------- arch/s390/tools/gen_facilities.c | 1 + 2 files changed, 18 insertions(+), 19 deletions(-) commit 9c0dda14951e9ed30b6f04e14bf64a3c69686c5b Author: Federico Vaga Date: Tue Jul 18 08:33:24 2017 +0200 drivers/fmc: carrier can program FPGA on registration The initial FPGA may require programming before it is useful. Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman drivers/fmc/fmc-core.c | 18 +++++++++++++++--- drivers/fmc/fmc-sdb.c | 24 ++++++++++++++++++++++++ include/linux/fmc.h | 4 ++++ 3 files changed, 43 insertions(+), 3 deletions(-) commit 15b1b0f0d87e34a87172d9b83bd260543a991c2e Author: Federico Vaga Date: Tue Jul 18 08:33:13 2017 +0200 drivers/fmc: change registration prototype Permit use of either fmc_device_register_n or fmc_device_register_n_gw depending on the type of device in use. Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman drivers/fmc/fmc-core.c | 15 ++++++++++++++- include/linux/fmc.h | 13 +++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) commit 2071a3e94abd34d65bd40f1ff845f9cea300dfa6 Author: Federico Vaga Date: Tue Jul 18 08:33:03 2017 +0200 drivers/fmc: The only way to dump the SDB is from debugfs Driver should not call fmc_sdb_dump() anymore. (actually they can but the operation is not supported, so it will print an error message) Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman drivers/fmc/Makefile | 1 + drivers/fmc/fmc-core.c | 7 +- drivers/fmc/fmc-debug.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/fmc/fmc-dump.c | 41 ----------- drivers/fmc/fmc-private.h | 9 +++ drivers/fmc/fmc-sdb.c | 99 +------------------------- include/linux/fmc.h | 4 +- 7 files changed, 195 insertions(+), 139 deletions(-) commit 9f757f415210a7c85e2784e4a1733ea78b2e4e88 Author: Federico Vaga Date: Tue Jul 18 08:32:53 2017 +0200 drivers/fmc: hide fmc operations behind helpers This gave us more freedom to change/add/remove operations without recompiling all device driver. Typically, Carrier board implement the fmc operations, so they will not use these helpers. Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman drivers/fmc/fmc-chardev.c | 3 +-- drivers/fmc/fmc-core.c | 55 ++++++++++++++++++++++++++++++++++++++++++ drivers/fmc/fmc-match.c | 2 +- drivers/fmc/fmc-trivial.c | 20 ++++++--------- drivers/fmc/fmc-write-eeprom.c | 8 +++--- include/linux/fmc.h | 18 ++++++++++++++ 6 files changed, 87 insertions(+), 19 deletions(-) commit 8e12381bd7637dcf61a0503b566d5d9ab5b5e1b3 Author: Federico Vaga Date: Tue Jul 18 08:32:42 2017 +0200 drivers/fmc: remove unused variable Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman drivers/fmc/fru-parse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dc6364b5170dc446fca076d6523aaebc339d6511 Author: Ming Lei Date: Thu Aug 24 20:19:52 2017 +0800 dm rq: do not update rq partially in each ending bio We don't need to update the original dm request partially when ending each cloned bio: just update original dm request once when the whole cloned request is finished. This still allows full support for partial completion because a new 'completed' counter accounts for incremental progress as the clone bios complete. Partial request update can be a bit expensive, so we should try to avoid it, especially because it is run in softirq context. Avoiding all the partial request updates fixes both hard lockup and soft lockups that were easily reproduced while running Laurence's test[1] on IB/SRP. BTW, after d4acf3650c7c ("block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time"), we need to make the test more aggressive for reproducing the lockup: 1) run hammer_write.sh 32 or 64 concurrently. 2) write 8M each time [1] https://marc.info/?l=linux-block&m=150220185510245&w=2 Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 18 +++++++----------- drivers/md/dm-rq.h | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) commit 02729d17b1b818cc38a6b6319231a0cd86b132e4 Author: Dan Carpenter Date: Wed Aug 16 11:54:17 2017 +0300 thunderbolt: Fix reset response_type There is a mistake here where we accidentally use sizeof(TB_CFG_PKG_RESET) instead of just TB_CFG_PKG_RESET. The size of an int is 4 so it's the same as TB_CFG_PKG_NOTIFY_ACK. Fixes: d7f781bfdbf4 ("thunderbolt: Rework control channel to be more reliable") Reported-by: Colin King Signed-off-by: Dan Carpenter Acked-by: Mika Westerberg Cc: stable # 4.13 Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e545f0d8a54a9594fe604d67d80ca6fddf72ca59 Author: Bernat, Yehezkel Date: Tue Aug 15 08:19:20 2017 +0300 thunderbolt: Allow clearing the key If secure authentication of a devices fails, either because the device already has another key uploaded, or there is some other error sending challenge to the device, and the user only wants to approve the device just once (without a new key being uploaded to the device) the current implementation does not allow this because the key cannot be cleared once set even if we allow it to be changed. Make this scenario possible and allow clearing the key by writing empty string to the key sysfs file. Signed-off-by: Yehezkel Bernat Acked-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-thunderbolt | 2 ++ drivers/thunderbolt/switch.c | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) commit 0956e41169222822d3557871fcd1d32e4fa7e934 Author: Bernat, Yehezkel Date: Tue Aug 15 08:19:12 2017 +0300 thunderbolt: Make key root-only accessible Non-root user may read the key back after root wrote it there. This removes read access to everyone but root. Signed-off-by: Yehezkel Bernat Acked-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fdd6ab36197ad891233572c57781b1f537da0ac Author: Bernat, Yehezkel Date: Tue Aug 15 08:19:01 2017 +0300 thunderbolt: Remove superfluous check The key size is tested by hex2bin() already (as '\0' isn't an hex digit) Suggested-by: Andy Shevchenko Signed-off-by: Yehezkel Bernat Acked-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/switch.c | 3 --- 1 file changed, 3 deletions(-) commit 00ee84159020728cbdbfc569b42c036ef20c6e55 Author: sayli karnik Date: Fri Jun 16 15:39:38 2017 +0530 mod_devicetable: Remove excess description from structured comment Remove excess member description to fix following warnings in sphinx build: Excess struct/union/enum/typedef member 'ver_major' description in 'fsl_mc_device_id' Excess struct/union/enum/typedef member 'ver_minor' description in 'fsl_mc_device_id' Signed-off-by: sayli karnik CC: Stuart Yoder Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman include/linux/mod_devicetable.h | 2 -- 1 file changed, 2 deletions(-) commit a033c3b10a2bec387ccd9e39fadd94eef6519626 Author: Okash Khawaja Date: Thu Jul 20 08:22:38 2017 +0100 tty: undo export of tty_open_by_driver Since we have tty_kopen, we no longer need to export tty_open_by_driver. This patch makes this function static. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 3 +-- include/linux/tty.h | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) commit 084a473532a499eff5a14cbba82f43600df8f992 Author: Okash Khawaja Date: Thu Jul 20 08:22:37 2017 +0100 staging: speakup: use tty_kopen and tty_kclose This patch replaces call to tty_open_by_driver with a tty_kopen and uses tty_kclose instead of tty_release_struct to close it. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a09ac3974d0c0b25dfa70f8076546bc4876dd7a8 Author: Okash Khawaja Date: Thu Jul 20 08:22:36 2017 +0100 tty: resolve tty contention between kernel and user space The commit 12e84c71b7d4 ("tty: export tty_open_by_driver") exports tty_open_by_device to allow tty to be opened from inside kernel which works fine except that it doesn't handle contention with user space or another kernel-space open of the same tty. For example, opening a tty from user space while it is kernel opened results in failure and a kernel log message about mismatch between tty->count and tty's file open count. This patch makes kernel access to tty exclusive, so that if a user process or kernel opens a kernel opened tty, it gets -EBUSY. It does this by adding TTY_KOPENED flag to tty->flags. When this flag is set, tty_open_by_driver returns -EBUSY. Instead of overloading tty_open_by_driver for both kernel and user space, this patch creates a separate function tty_kopen which closely follows tty_open_by_driver. tty_kclose closes the tty opened by tty_kopen. To address the mismatch between tty->count and #fd's, this patch adds #kopen's to the count before comparing it with tty->count. That way check_tty_count reflects correct usage count. Returning -EBUSY on tty open is a change in the interface. I have tested this with minicom, picocom and commands like "echo foo > /dev/ttyS0". They all correctly report "Device or resource busy" when the tty is already kernel opened. Signed-off-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++--- include/linux/tty.h | 21 +++++++++++ 2 files changed, 116 insertions(+), 5 deletions(-) commit 0875957e4bdd61d7969c47e29dab8769c9ab2cf9 Author: Arvind Yadav Date: Thu Aug 24 22:05:57 2017 +0530 coresight: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5959f3d7973c41a9f82e2477e8c6e881db7ad967 Author: Arvind Yadav Date: Thu Aug 24 22:05:58 2017 +0530 coresight: etb10: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a13f6f917600985264ff3ef2bf75a14cf353b52f Author: Arvind Yadav Date: Thu Aug 24 22:05:59 2017 +0530 coresight: etm3x: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5520c93c78ff30903422e9a8be8ef297bc6496f Author: Arvind Yadav Date: Thu Aug 24 22:06:00 2017 +0530 coresight: etm4x: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87c89af76397b86ecd8250f6c9ce3d0d0e220763 Author: Arvind Yadav Date: Thu Aug 24 22:06:01 2017 +0530 coresight: funnel: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-funnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c214f76213f9112c04077bc22c659dc2781d4029 Author: Arvind Yadav Date: Thu Aug 24 22:06:02 2017 +0530 coresight: replicator: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-dynamic-replicator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44d5af088b2e454ede49bc77eeec2ce5d0b9f079 Author: Arvind Yadav Date: Thu Aug 24 22:06:03 2017 +0530 coresight: stm: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f964e7c175cafa65862f7a884cea49c023a0e90 Author: Arvind Yadav Date: Thu Aug 24 22:06:04 2017 +0530 coresight: tmc: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74bf16d0ded97fd6c52a69cfbfd868e9fae0a0bd Author: Arvind Yadav Date: Thu Aug 24 22:06:05 2017 +0530 coresight: tpiu: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tpiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b786843589be374c1ba617be9f2d44429584e8 Author: Stephen Boyd Date: Wed Aug 2 10:22:20 2017 -0600 coresight: STM: Clean up __iomem type usage The casting and other things here is odd, and causes sparse to complain: drivers/hwtracing/coresight/coresight-stm.c:279:35: warning: incorrect type in argument 1 (different address spaces) drivers/hwtracing/coresight/coresight-stm.c:279:35: expected void [noderef] *addr drivers/hwtracing/coresight/coresight-stm.c:279:35: got struct stm_drvdata *drvdata drivers/hwtracing/coresight/coresight-stm.c:327:17: warning: incorrect type in argument 2 (different address spaces) drivers/hwtracing/coresight/coresight-stm.c:327:17: expected void volatile [noderef] *addr drivers/hwtracing/coresight/coresight-stm.c:327:17: got void *addr drivers/hwtracing/coresight/coresight-stm.c:330:17: warning: incorrect type in argument 2 (different address spaces) drivers/hwtracing/coresight/coresight-stm.c:330:17: expected void volatile [noderef] *addr drivers/hwtracing/coresight/coresight-stm.c:330:17: got void *addr drivers/hwtracing/coresight/coresight-stm.c:333:17: warning: incorrect type in argument 2 (different address spaces) drivers/hwtracing/coresight/coresight-stm.c:333:17: expected void volatile [noderef] *addr drivers/hwtracing/coresight/coresight-stm.c:333:17: got void *addr >From what I can tell, we don't really need to treat ch_addr as anything besides a pointer, and we can just do pointer math instead of ORing in the bits of the offset and achieve the same thing. Also, we were passing a drvdata pointer to the coresight_timeout() function, but we really wanted to pass the address of the register base. Luckily the base is the first member of the structure, so everything works out, but this is quite unsafe if we ever change the structure layout. Clean this all up so sparse stops complaining on this code. Reported-by: Satyajit Desai Signed-off-by: Stephen Boyd Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3d1afa08d2a25386ed0fdb538910586eb4b17f1f Author: Suzuki K Poulose Date: Wed Aug 2 10:22:18 2017 -0600 coresight: Add support for Coresight SoC 600 components Add the peripheral ids for the Coresight SoC 600 TPIU, replicator and funnel. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-dynamic-replicator.c | 5 +++++ drivers/hwtracing/coresight/coresight-funnel.c | 5 +++++ drivers/hwtracing/coresight/coresight-tpiu.c | 5 +++++ 3 files changed, 15 insertions(+) commit 6495892c9194001936a9ef0d30638c36f431636f Author: Suzuki K Poulose Date: Wed Aug 2 10:22:17 2017 -0600 coresight tmc: Add support for Coresight SoC 600 TMC The coresight SoC 600 supports ETR save-restore which allows us to restore a trace session by retaining the RRP/RWP/STS.Full values when the TMC leaves the Disabled state. However, the TMC doesn't have a scatter-gather unit in built. Also, TMCs have different PIDs in different configurations (ETF, ETB & ETR), unlike the previous generation. While the DEVID exposes some of the features/changes in the TMC, it doesn't explicitly advertises the new save-restore feature as described above. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 16 ++++++++++++++++ drivers/hwtracing/coresight/coresight-tmc.h | 4 ++++ 2 files changed, 20 insertions(+) commit f2e931a2deab1ab426085f0357285410644f2945 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:16 2017 -0600 coresight tmc: Support for save-restore in ETR The Coresight SoC 600 TMC ETR supports save-restore feature, where the values of the RRP/RWP and STS.Full are retained when it leaves the Disabled state. Hence, we must program the RRP/RWP and STS.Full to a proper value. For now, set the RRP/RWP to the base address of the buffer and clear the STS.Full register. This can be later exploited for proper save-restore of ETR trace contexts (e.g, perf). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 13 ++++++++++++- drivers/hwtracing/coresight/coresight-tmc.h | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit ebab6a7db2c599b5c29d033f3a20f86016d9a9b8 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:15 2017 -0600 coresight tmc etr: Setup AXI cache encoding for read transfers If the ETR supports split cache encoding (i.e, separate bits for read and write transfers) unlike the older version (where read and write transfers use the same encoding in AXICTL[2-5]). This feature is not advertised and has to be described by the static mask associated with the device id. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 6 ++++++ drivers/hwtracing/coresight/coresight-tmc.h | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit cd407abd5efd6f36b6372d615fbab486936e90f4 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:14 2017 -0600 coresight tmc etr: Cleanup AXICTL register handling This patch cleans up how we setup the AXICTL register on TMC ETR. At the moment we don't set the CacheCtrl bits, which drives the arcache and awcache bits on AXI bus specifying the cacheablitiy. Set this to Write-back Read and Write-allocate. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 10 +++------- drivers/hwtracing/coresight/coresight-tmc.h | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 8 deletions(-) commit ff11f5bc5a42f2cfc9705481eedf1b4d470ade2c Author: Suzuki K Poulose Date: Wed Aug 2 10:22:13 2017 -0600 coresight tmc etr: Detect address width at runtime TMC in Coresight SoC-600 advertises the AXI address width in the device configuration register. Bit 16 - AXIAW_VALID 0 - AXI Address Width not valid 1 - Valid AXI Address width in Bits[23-17] Bits [23-17] - AXIAW. If AXIAW_VALID = b01 then 0x20 - 32bit AXI address bus 0x28 - 40bit AXI address bus 0x2c - 44bit AXI address bus 0x30 - 48bit AXI address bus 0x34 - 52bit AXI address bus Use the address bits from the device configuration register, if available. Otherwise, default to 40bit. Cc: Mathieu Poirier Cc: Robin Murphy Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 26 +++++++++++++++++++++++--- drivers/hwtracing/coresight/coresight-tmc.h | 4 ++++ 2 files changed, 27 insertions(+), 3 deletions(-) commit 2e21934568c0f9fcd2e01060007506a74d49152b Author: Suzuki K Poulose Date: Wed Aug 2 10:22:12 2017 -0600 coresight tmc: Detect support for scatter gather The SG unit in the TMC has been removed in Coresight SoC-600. This is however advertised by DEVID:Bit 24 = 0b1. On the previous generation, the bit is RES0, hence we can rely on the DEVID to detect the support. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 2 ++ drivers/hwtracing/coresight/coresight-tmc.h | 5 +++++ 2 files changed, 7 insertions(+) commit 2884132ae8e4424c2d025deef48d937337e97db7 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:11 2017 -0600 coresight tmc etr: Add capabilitiy information With new version of TMC ETR, there are differing set of features supported by the TMC. Add the capability of a given TMC ETR for making safer decisions at runtime. The device configuration register of the TMC (DEVID) lists some of the capabilities. So, we can detect some of them at probe. However, some of the features (or changes in behavior) are not advertised and we have to depend on the PID to infer the features. So we use a static description of the "unadvertised" capabilities attached to the PID. Combining both, the static and the dynamic capabilities, we maintain a bitmask of the available features which can be later checked to take appropriate actions. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 20 +++++++++++++++----- drivers/hwtracing/coresight/coresight-tmc.h | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) commit 99ac6f120986430993285e3e3f8ecf590d04ba2c Author: Suzuki K Poulose Date: Wed Aug 2 10:22:10 2017 -0600 coresight tmc: Handle configuration types properly Coresight SoC 600 defines a new configuration for TMC, Embedded Trace Streamer (ETS), indicated by 0x3 in MODE:CONFIG_TYPE. This would break the existing driver which will treat anything other than ETR/ETB as an ETF. Fix the driver to check the configuration type properly and also add a warning if we encounter an unsupported configuration (ETS). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 79d29bb93bd846f71f617bc06a80444ba6ba08b5 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:09 2017 -0600 coresight replicator: Expose replicator management registers Expose the idfilter* registers of the programmable replicator. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman .../coresight/coresight-dynamic-replicator.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 2b4553399b5fee1306817284b54ea22b108ba9cf Author: Suzuki K Poulose Date: Wed Aug 2 10:22:08 2017 -0600 coresight tmc: Expose DBA and AXICTL Expose DBALO,DBAHI and AXICTL registers Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6f6ab4fce56bbb0385d3d2d62d8c9f688618d5ac Author: Suzuki K Poulose Date: Wed Aug 2 10:22:07 2017 -0600 coresight tmc: Add helpers for accessing 64bit registers Coresight TMC splits 64bit registers into a pair of 32bit registers (e.g DBA, RRP, RWP). Provide helpers to read/write to these registers. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-priv.h | 8 ++++++++ drivers/hwtracing/coresight/coresight-tmc-etf.c | 8 ++++---- drivers/hwtracing/coresight/coresight-tmc-etr.c | 8 ++++---- drivers/hwtracing/coresight/coresight-tmc.h | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 8 deletions(-) commit 47675f6a46ff3106f86f97907f59542e3c5aa289 Author: Suzuki K Poulose Date: Wed Aug 2 10:22:06 2017 -0600 coresight: Use the new helper for defining registers Use the new helpers for exposing coresight component registers, choosing the 64bit variants for appropriate registers. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 22 ++++++++-------- .../hwtracing/coresight/coresight-etm3x-sysfs.c | 26 +++++++++---------- .../hwtracing/coresight/coresight-etm4x-sysfs.c | 24 ++++++++--------- drivers/hwtracing/coresight/coresight-stm.c | 30 +++++++++++----------- drivers/hwtracing/coresight/coresight-tmc.c | 30 ++++++++++++---------- 5 files changed, 67 insertions(+), 65 deletions(-) commit b4523c87c09eb6e4fd56ba876ee956e6330cf9fe Author: Suzuki K Poulose Date: Wed Aug 2 10:22:05 2017 -0600 coresight: Add support for reading 64bit registers Add support for reading a lower and upper 32bits of a register as a single 64bit register. Also add simplified macros for direct register accesses. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-priv.h | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 1c8859848dbb07c96a0d31bbbf55b2d0b86e7a3b Author: Suzuki K Poulose Date: Wed Aug 2 10:22:04 2017 -0600 coresight replicator: Cleanup programmable replicator naming The Linux coresight drivers define the programmable ATB replicator as Qualcomm replicator, while this is designed by ARM. This can cause confusion to a user selecting the driver. Cleanup all references to make it explicitly clear. This patch : 1) Replace the compatible string for the replicator : qcom,coresight-replicator1x => arm,coresight-dynamic-replicator 2) Changes the Kconfig symbol (since this is not part of any defconfigs) CORESIGHT_QCOM_REPLICATOR => CORESIGHT_DYNAMIC_REPLICATOR 3) Improves the help message in the Kconfig. 4) Changes the name of the driver and the file : coresight-replicator-qcom => coresight-dynamic-replicator Cc: Pratik Patel Cc: Ivan T. Ivanov Cc: Mathieu Poirier Cc: devicetree@vger.kernel.org Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/arm/coresight.txt | 4 +- drivers/hwtracing/coresight/Kconfig | 10 +- drivers/hwtracing/coresight/Makefile | 2 +- .../coresight/coresight-dynamic-replicator.c | 194 ++++++++++++++++++++ .../coresight/coresight-replicator-qcom.c | 196 --------------------- 5 files changed, 202 insertions(+), 204 deletions(-) commit 27b8f6673a53a63531922bd4c96623c2b8299cc2 Author: Mike Leach Date: Wed Aug 2 10:22:03 2017 -0600 coresight: etm4x: Adds trace return stack option programming for ETMv4. Adds handling to program the return stack option into ETMv4 hardware if specified in the perf command line. If option is not supported by the hardware then it will be ignored. This allows capture to move between core/ETM combinations that have the hardware support to those that do not. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 4 ++++ 1 file changed, 4 insertions(+) commit 557587bede858929eef14c6c2447fe140161bf5a Author: Mike Leach Date: Wed Aug 2 10:22:02 2017 -0600 coresight: ptm: Adds trace return stack option programming for PTM. Adds handling to program the return stack option into PTM hardware if specified in the perf command line. If option is not supported by the hardware then it will be ignored. This allows capture to move between core/ETM combinations that have the hardware support to those that do not. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm.h | 1 + drivers/hwtracing/coresight/coresight-etm3x.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) commit b97971bee55dc45420e0fe352d0b4df6e74716d4 Author: Mike Leach Date: Wed Aug 2 10:22:01 2017 -0600 coresight: pmu: Adds return stack option to perf coresight pmu Return stack is a programmable option on some ETM and PTM hardware. Adds the option flags to enable this from the perf event command line. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 2 ++ include/linux/coresight-pmu.h | 1 + tools/include/linux/coresight-pmu.h | 1 + 3 files changed, 4 insertions(+) commit 89f00a1ae596876412c9b74e1c96453e9702a0cc Author: Arvind Yadav Date: Wed Aug 2 10:22:00 2017 -0600 hwtracing: coresight: 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 2573 288 296 3157 c55 coresight-etm-perf.o File size After adding 'const': text data bss dec hex filename 2613 224 296 3133 c3d coresight-etm-perf.o Signed-off-by: Arvind Yadav Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af36103e48c0146d9af9403f0d994f30ca17a4d8 Author: Mathieu Poirier Date: Wed Aug 2 10:21:59 2017 -0600 coresight: etm3x: Set synchronisation frequencty to TRM default Register ETMSYNCFR holds the number of by that need to be generated before periodic synchronisation packets are inserted in the trace stream. By zeroing out the config structure, the current code effectively disable periodic synchronization. This patch simply initialise the recommended value for this register as specified in the technical reference manual. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 2 ++ 1 file changed, 2 insertions(+) commit 1655a3d6f3174f359bc0bf25312fa4057dc81c72 Author: Mathieu Poirier Date: Wed Aug 2 10:21:58 2017 -0600 coresight: etb10: Move etb_disable_hw() outside of lock Function etb_disable_hw() is already taking care of unlocking and locking the coresight access register and as such doesn't need to be placed within the unlock/lock of function etb_update_buffer(). Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c3fc4d5fa26092853278145aca9b21fa52a3e93 Author: Mathieu Poirier Date: Wed Aug 2 10:21:57 2017 -0600 coresight: Add barrier packet for synchronisation When a buffer overflow happens the synchronisation patckets usually present at the beginning of the buffer are lost, a situation that prevents the decoder from knowing the context of the traces being decoded. This patch adds a barrier packet to be used by sink IPs when a buffer overflow condition is detected. These barrier packets are then used by the decoding library as markers to force re-synchronisation. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 22 +++++++++++++++++++-- drivers/hwtracing/coresight/coresight-priv.h | 2 ++ drivers/hwtracing/coresight/coresight-tmc-etf.c | 26 ++++++++++++++++++++++++- drivers/hwtracing/coresight/coresight-tmc-etr.c | 12 ++++++++++++ drivers/hwtracing/coresight/coresight.c | 8 ++++++++ 5 files changed, 67 insertions(+), 3 deletions(-) commit 4f871a9f0f6fbb8ab023cca1f0099bf152a5d618 Author: Mathieu Poirier Date: Wed Aug 2 10:21:56 2017 -0600 coresight: etb10: Remove useless conversion to LE Internal CoreSight components are rendering trace data in little-endian format. As such there is no need to convert the data once more, hence removing the extra step. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit cfd9f6306f105977bbe8ff793c4a4bc7a912f040 Author: Mathieu Poirier Date: Wed Aug 2 10:21:55 2017 -0600 coresight: Correct buffer lost increment Many conditions may cause synchronisation to be lost when updating the perf ring buffer but the end result is still the same: synchronisation is lost. As such there is no need to increment the lost count for each condition, just once will suffice. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 10 +++++++--- drivers/hwtracing/coresight/coresight-tmc-etf.c | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) commit a17f06978769735ab5c7598c46881fa201e9b1a2 Author: Jiri Olsa Date: Thu Aug 24 18:27:31 2017 +0200 perf record: Set read_format for inherit_stat Set read_format for what we expect to get from read event generated by perf_event_attr::inherit_stat. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824162737.7813-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 12c15302dd4b768105d4b7a487ed4858ccab94fc Author: Jiri Olsa Date: Thu Aug 24 10:57:32 2017 +0200 perf c2c: Fix remote HITM detection for Skylake Skylake introduced new mem_remote bit in union perf_mem_data_src [1]. It applies to any other memory level to express Remote unknown level, as is reported by Skylake. Adding this extra check to c2c_decode_stats to properly decode remote HITMs on Skylake. [1] http://lkml.kernel.org/r/20170816222156.19953-4-andi@firstfloor.org Signed-off-by: Jiri Olsa Acked-by: Andi Kleen Cc: Alexander Shishkin Cc: David Ahern Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170824085732.28481-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mem-events.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6bd76b8fabe157233e498931c3f9298ee7128a28 Author: Jiri Olsa Date: Fri Aug 25 15:45:10 2017 -0300 perf tools: Fix static build with newer toolchains We can't pass --dynamic-list list into static build anymore, because compilers starts to scream about that. Fedora 26 started to fail build with following error: $ make LDFLAGS=-static ... /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/libc.a(strcmp.o +)' can not be used when making an executable; recompile with -fPIE and relink with -pie There's no sense for --dynamic-list in static build, because there's no .dynsym table in static binary. Consequently the traceevent plugins have never worked with static build, but it was quietly passed by. To fix this in future I think we should add support to compile plugins within the perf binary directly for static build. Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Link: http://lkml.kernel.org/n/tip-jeg6a7ff9j9hlqn8k4gllzvv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 726647d0526c5c2f3472010677122b89d9e4ef88 Author: Jack Henschel Date: Thu Aug 24 15:20:22 2017 +0200 perf stat: Fix path to PMU formats in documentation As defined in tools/perf/util/pmu.c, the EVENT_SOURCE_DEVICE_PATH is /sys/bus/event_source/devices/ (no traling 's' in event_source) This patch corrects the path in the perf stat documentation Signed-off-by: Jack Henschel Cc: Alexander Shishkin Cc: Jack Henschel Cc: Peter Zijlstra Cc: trivial@kernel.org Link: http://lkml.kernel.org/r/20170824132022.10934-1-jackdev@mailbox.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5c27f3ffbc2ee2d2f74ebfa1b2d789f67e9b3f1 Author: Bart Van Assche Date: Wed Aug 9 11:32:16 2017 -0700 dm rq: make dm-sq requeuing behavior consistent with dm-mq behavior DM_MAPIO_DELAY_REQUEUE causes dm-mq to requeue after a delay but causes dm-sq to requeue immediately. Make the behavior of dm-sq consistent with that of dm-mq. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9157c8d3e2d318581ecc8bdf34367d57f19c5380 Author: Bart Van Assche Date: Wed Aug 9 11:32:14 2017 -0700 dm mpath: complain about unsupported __multipath_map_bio() return values WARN_ONCE() if __multipath_map_bio() returns an unsupported return value. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7b06e09a6d81868309f68069a6dca7ff62d47beb Author: Bart Van Assche Date: Wed Aug 9 11:32:13 2017 -0700 dm mpath: avoid that building with W=1 causes gcc 7 to complain about fall-through Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 1 + 1 file changed, 1 insertion(+) commit 8439a69e72888daa7d2667980efaf20d8bbe7b20 Merge: b9920ca cc4a41f Author: Greg Kroah-Hartman Date: Mon Aug 28 15:26:48 2017 +0200 Merge 4.13-rc7 into staging-next We want the staging and iio fixes in here to handle the merge issues. Signed-off-by: Greg Kroah-Hartman commit 12c15a7e706772293694e63482a99a8f7259e164 Author: Michael Ellerman Date: Wed Aug 23 15:38:06 2017 +1000 powerpc/configs/6xx: Drop removed CONFIG_USB_LED In commit a335aaf3125c ("usb: misc: remove outdated USB LED driver") CONFIG_USB_LED was removed, so drop it from our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit b1f9a827e4e4a914146fa160469feb09dbb69695 Author: Michael Ellerman Date: Wed Aug 23 15:38:05 2017 +1000 powerpc/configs/6xx: Drop no longer selectable CONFIG_BT_HCIUART_LL Since commit 76c4969fecb1 ("Bluetooth: hci_uart: fix kconfig dependency") we can no longer select CONFIG_BT_HCIUART_LL. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 8f67600f211d966a751c9bc3604fe82e61c80afd Author: Michael Ellerman Date: Wed Aug 23 15:38:04 2017 +1000 powerpc/configs/c2k: Switch CONFIG_GEN_RTC from =m to =y In commit 835ea93e9d26 ("char/genrtc: remove powerpc support"), CONFIG_GEN_RTC switch from tristate to bool, update the defconfig to match. Signed-off-by: Michael Ellerman arch/powerpc/configs/c2k_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d8b1ca3d9b14d826e366b87f5d1dd84dfb982e6 Author: Michael Ellerman Date: Wed Aug 23 15:38:03 2017 +1000 powerpc/configs/6xx: Switch CONFIG_USB_EHCI_FSL to =m In commit ca07e1c1e4a6 ("drivers:usb:fsl:Make fsl ehci drv an independent driver module"), CONFIG_USB_EHCI_FSL was switched from built-in to modular. Update the defconfig. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcb59561544ecdbb05949f2673bb43ce8f30b2fc Author: Michael Ellerman Date: Wed Aug 23 15:38:02 2017 +1000 powerpc/configs/6xx: Drop no longer needed CONFIG_BT_HCIUART_H4 Since commit 943cc592195e ("Bluetooth: bpa10x: Use h4_recv_buf helper for frame reassembly") we no longer need to set CONFIG_BT_HCIUART_H4 in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit c29f9b31bbe09b5593aecdd618651bac336decae Author: Michael Ellerman Date: Wed Aug 23 15:38:01 2017 +1000 powerpc/configs/6xx: Drop no longer needed CONFIG_NETFILTER_XT_MATCH_SOCKET Since commit 8db4c5be88f6 ("netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c") we no longer need to set CONFIG_NETFILTER_XT_MATCH_SOCKET in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 6946d5e1fa1ba5db51f20caef106a2a205202549 Author: Michael Ellerman Date: Wed Aug 23 15:38:00 2017 +1000 powerpc/configs/6xx: Reinstate CONFIG_CPU_FREQ_STAT In commit 1aefc75b2449 ("cpufreq: stats: Make the stats code non-modular"), the CPU_FREQ_STAT code was made non-modular. Our defconfig still said =m though, which meant we no longer got the code at all. Switch the defconfig to =y. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 886a3bacb7f004cc82e96a9e2c308424db4af397 Author: Michael Ellerman Date: Wed Aug 23 15:37:59 2017 +1000 powerpc/configs/6xx: Drop no longer needed CONFIG_NF_CONNTRACK_PROC_COMPAT Since commit adf0516845bc ("netfilter: remove ip_conntrack* sysctl compat code") we no longer need to set CONFIG_NF_CONNTRACK_PROC_COMPAT in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 1d66e404b957df16d5f33d460c98a305c090531d Author: Michael Ellerman Date: Wed Aug 23 15:37:58 2017 +1000 powerpc/configs/6xx: Drop removed CONFIG_BLK_DEV_HD In commit 8e14be53f470 ("remove the obsolete hd driver") the CONFIG_BLK_DEV_HD symbol was removed, so drop it from the defconfig. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 533141ae0e730c8a1af6a7b8bc4aa3f43d466dae Author: Michael Ellerman Date: Wed Aug 23 15:37:57 2017 +1000 powerpc/configs/6xx: Clean up duplicate CONFIG_EXT4 values We had two values for CONFIG_EXT4, =m and =y, just use =y. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f623a54e83ffb934c3d44a88a34dfe283e9ab708 Author: Michael Ellerman Date: Wed Aug 23 15:37:56 2017 +1000 powerpc/configs/6xx: Drop no longer needed CONFIG_TIMER_STATS Since commit dfb4357da6dd ("time: Remove CONFIG_TIMER_STATS") we no longer need to set CONFIG_TIMER_STATS in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit f963937a162d8407da41421d5e5bac3169f68f58 Author: Michael Ellerman Date: Wed Aug 23 15:37:55 2017 +1000 powerpc/configs/6xx: Turn CONFIG_DRM_RADEON back on In commit d92d9c3a1448 ("drm: hide legacy drivers with CONFIG_DRM_LEGACY") CONFIG_DRM_RADEON was moved behind CONFIG_DRM_LEGACY meaning it stopped being enabled by ppc6xx_defconfig. Although no one has noticed, given this is basically a legacy platform, it seems anyone who is using it probably still wants this driver. So turn it back on for now. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22220b16dfcb0ca59575be6dbcfa7d28efe8817f Author: Michael Ellerman Date: Wed Aug 23 15:37:54 2017 +1000 powerpc/configs/mpc5200: Drop no longer needed CONFIG_FB Since commit a03fdcb18632 ("drm: Add top level Kconfig option for DRM fbdev emulation") we no longer need to set CONFIG_FB in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/mpc5200_defconfig | 2 -- 1 file changed, 2 deletions(-) commit edff6940870a0d146c84fadd084f03c3f411b7d6 Author: Michael Ellerman Date: Wed Aug 23 15:37:52 2017 +1000 powerpc/configs: Update for CONFIG_INPUT_MOUSEDEV=n In commit 73d8ef76006b ("Input: mousedev - stop offering PS/2 to userspace by default") the symbol INPUT_MOUSEDEV went from being 'default y' to 'default n' (implied). That means we no longer need to explicitly disable it in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/83xx/asp8347_defconfig | 1 - arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 1 - arch/powerpc/configs/83xx/sbc834x_defconfig | 1 - arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - arch/powerpc/configs/85xx/mpc8540_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc8560_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | 1 - arch/powerpc/configs/85xx/sbc8548_defconfig | 1 - arch/powerpc/configs/85xx/tqm8540_defconfig | 1 - arch/powerpc/configs/85xx/tqm8541_defconfig | 1 - arch/powerpc/configs/85xx/tqm8548_defconfig | 1 - arch/powerpc/configs/85xx/tqm8555_defconfig | 1 - arch/powerpc/configs/85xx/tqm8560_defconfig | 1 - arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/gamecube_defconfig | 1 - arch/powerpc/configs/holly_defconfig | 1 - arch/powerpc/configs/mpc7448_hpc2_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - 26 files changed, 26 deletions(-) commit f6fe7a1583c0971ce4e492dbe9ae6359c5f1a461 Author: Michael Ellerman Date: Wed Aug 23 15:37:51 2017 +1000 powerpc/configs: Drop removed CONFIG_LOGFS In commit 1d0fd57a50aa ("logfs: remove from tree"), logfs was removed from the tree, so we can drop it from our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc44x_defconfig | 1 - 1 file changed, 1 deletion(-) commit dc3f5d21680bd7950cc12a4e4bd3b5095226dc71 Author: Michael Ellerman Date: Wed Aug 23 15:37:50 2017 +1000 powerpc/configs: Turn CONFIG_R128 back in pmac32_defconfig In commit d92d9c3a1448 ("drm: hide legacy drivers with CONFIG_DRM_LEGACY") CONFIG_R128 was moved behind CONFIG_DRM_LEGACY meaning it stopped being enabled by pmac32_defconfig. Although no one has noticed, given this is basically a legacy platform, it seems anyone who is using it probably still wants this driver. So turn it back on for now. Signed-off-by: Michael Ellerman arch/powerpc/configs/pmac32_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 641f656db0b641c4f01a6284f359679dbe57a314 Author: Michael Ellerman Date: Wed Aug 23 15:37:49 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_LIBCRC32C Since commit 300ae149468f ("netfilter: select LIBCRC32C together with SCTP conntrack") we no longer need to set CONFIG_LIBCRC32C in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/pmac32_defconfig | 1 - 1 file changed, 1 deletion(-) commit ab306d1811d0e8809fb61cb28bb641adc06085e6 Author: Michael Ellerman Date: Wed Aug 23 15:37:48 2017 +1000 powerpc/configs: Drop unnecessary CONFIG_EDAC from ppc64e There are no EDAC drivers for ppc64e. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc64e_defconfig | 1 - 1 file changed, 1 deletion(-) commit 5593edb1766c6b3ff49775846092a14fa4a47097 Author: Michael Ellerman Date: Wed Aug 23 15:37:47 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_SCSI Since commit 67f6d6655993 ("powerpc: convert amigaone_defconfig to use libata PATA drivers") we no longer need to set CONFIG_SCSI in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/amigaone_defconfig | 1 - 1 file changed, 1 deletion(-) commit 72ac99688d4d8584f7578a71ca49dda5e7a350d7 Author: Michael Ellerman Date: Wed Aug 23 15:37:46 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_IPV6 Since commit de551f2eb22a ("net: Build IPv6 into kernel by default") we no longer need to set CONFIG_IPV6 in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - 2 files changed, 2 deletions(-) commit aad004a9452342ea370f1746499c95fa97ccbcfb Author: Michael Ellerman Date: Wed Aug 23 15:37:45 2017 +1000 powerpc/configs: Add CONFIG_RAS now required for CONFIG_EDAC In commit e3c4ff6d8c94 ("EDAC: Remove EDAC_MM_EDAC") CONFIG_EDAC grew a dependency on CONFIG_RAS. Some of our defconfigs don't have the latter, which means we lose CONFIG_EDAC, so add CONFIG_RAS to fix that. Signed-off-by: Michael Ellerman arch/powerpc/configs/pasemi_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + 2 files changed, 2 insertions(+) commit f3a45e560f0c826ef6628653f56c68fff17607dc Author: Michael Ellerman Date: Wed Aug 23 15:37:44 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_AUDITSYSCALL Since commit cb74ed278f80 ("audit: always enable syscall auditing when supported and audit is enabled") we no longer need to set CONFIG_AUDITSYSCALL in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/pseries_defconfig | 1 - 1 file changed, 1 deletion(-) commit 599f959fcfbaa253522aadb549875f31bbb7da4e Author: Michael Ellerman Date: Wed Aug 23 15:37:43 2017 +1000 powerpc/configs: Drop CONFIG_SERIAL_TXX9_* from cell/ppc64 In commit bf4981a00636 ("powerpc: Remove the celleb support") we dropped the celleb support, which made these symbols unselectable because we no longer select HAS_TX99_SERIAL. So drop them from the defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/cell_defconfig | 2 -- arch/powerpc/configs/ppc64_defconfig | 1 - 2 files changed, 3 deletions(-) commit e9cb40a7d63ee256e32cf28b8b77a711956933ca Author: Michael Ellerman Date: Wed Aug 23 15:37:42 2017 +1000 powerpc/configs: Drop MEMORY_HOTREMOVE from ppc64/cell xxxx In commit 577ec789a79e ("powerpc/cell: Drop select of MEMORY_HOTPLUG") we removed the last traces of any dependency between Signed-off-by: Michael Ellerman arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - 2 files changed, 2 deletions(-) commit 5a73b1a18a5c87b36e3b8ff4c11b905f7d5be61b Author: Michael Ellerman Date: Wed Aug 23 15:37:41 2017 +1000 powerpc/configs: Drop unnecessary CONFIG_POWERNV_OP_PANEL In commit 43a1dd9b5fc6 ("powerpc/powernv: Add driver for operator panel on FSP machines") we added CONFIG_POWERNV_OP_PANEL=m to the powernv defconfig, but it's default m so that's no necessary. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - 1 file changed, 1 deletion(-) commit 8b2ee33d88fdbc9dca99a8c5767c3da7acb85d5e Author: Michael Ellerman Date: Wed Aug 23 15:37:40 2017 +1000 powerpc/configs: Drop no longer needed PCI_MSI on powernv In commit a311e738b6d8 ("powerpc/powernv: Make PCI non-optional") we made PCI (and therefore PCI_MSI) non-optional on powernv, so it doesn't need to be in the defconfig anymore. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - 1 file changed, 1 deletion(-) commit 4ca2ddfc478ab44efa78b38510e3c7e42b69e18e Author: Michael Ellerman Date: Wed Aug 23 15:37:39 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_SMP for pseries/ppc64/powernv In commit 40e275653e2c ("powerpc/powernv: Always enable SMP when building powernv") and 270e2dc9b803 ("powerpc/pseries: Always enable SMP when building pseries") we forced CONFIG_SMP on for some configs. Therefore we don't need to set it in those configs anymore. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - 3 files changed, 3 deletions(-) commit b9bc4bbc7ccc24f2ce45b44fbb734c24e2553389 Author: Michael Ellerman Date: Wed Aug 23 15:37:38 2017 +1000 powerpc/configs: Drop unnecessary CONFIG_UPROBE_EVENT In commit 6b0b7551428e ("perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS") it was renamed to CONFIG_UPROBE_EVENTS. Additionally it's default y, and we have the prerequisites enabled, so we don't need it in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - 3 files changed, 3 deletions(-) commit 93a4a4ffeb1e769362b903a112865b8c4e88e8a6 Author: Michael Ellerman Date: Wed Aug 23 15:37:37 2017 +1000 powerpc/configs: Drop unnecessary CONFIG_NUMA_BALANCING_DEFAULT_ENABLED In commit 9654f95a081a ("powerpc: Enable NUMA balancing in pseries[_le]_defconfig") we added CONFIG_NUMA_BALANCING_DEFAULT_ENABLED to our defconfigs. But it's already enabled by default, so drop it. Signed-off-by: Michael Ellerman arch/powerpc/configs/pseries_defconfig | 1 - 1 file changed, 1 deletion(-) commit 76869cb5697ca485d539e3e81985c7b857d76e6f Author: Michael Ellerman Date: Wed Aug 23 15:37:36 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_DEVPTS_MULTIPLE_INSTANCES Since commit eedf265aa003 ("devpts: Make each mount of devpts an independent filesystem.") we no longer need to set CONFIG_DEVPTS_MULTIPLE_INSTANCES in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - 2 files changed, 2 deletions(-) commit cd67a20f772ca55a65069dd2a766c3c2bd041057 Author: Michael Ellerman Date: Wed Aug 23 15:37:35 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_GCM Since commit 00b9cfa3ff38 ("mac80111: Add GCMP and GCMP-256 ciphers") we no longer need to set CONFIG_CRYPTO_GCM in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc6xx_defconfig | 1 - 1 file changed, 1 deletion(-) commit f0297310e55f6b2517b9c9cd4472e1d0536ae304 Author: Michael Ellerman Date: Wed Aug 23 15:37:34 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_NULL in g5 / c2k Since commit 3491244c6298 ("crypto: echainiv - Set Kconfig default to m") we no longer need to set CONFIG_CRYPTO_NULL in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/c2k_defconfig | 1 - arch/powerpc/configs/g5_defconfig | 1 - 2 files changed, 2 deletions(-) commit 60ac25ba059440810c241d7158d7ecf538d5fbed Author: Michael Ellerman Date: Wed Aug 23 15:37:33 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_NULL Since commit 00b9cfa3ff38 ("mac80111: Add GCMP and GCMP-256 ciphers") we no longer need to set CONFIG_CRYPTO_NULL in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/pmac32_defconfig | 1 - 1 file changed, 1 deletion(-) commit 7cf5775cd0643de0b97a3c4a9222d8f1d3950e11 Author: Michael Ellerman Date: Wed Aug 23 15:37:32 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_SHA256 Since commit 826775bbf38f ("crypto: drbg - Add select on sha256") we no longer need to set CONFIG_CRYPTO_SHA256 in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - 4 files changed, 4 deletions(-) commit 813f41352a9c0e20b69efb2b9b0817b5c08c8a52 Author: Michael Ellerman Date: Wed Aug 23 15:37:31 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_ECB Since commit 12cb3a1c4184 ("crypto: xts - Add ECB dependency") we no longer need to set CONFIG_CRYPTO_ECB in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - 2 files changed, 2 deletions(-) commit 8f56939009283d03bdb27757bc48df9d5fe6fe6c Author: Michael Ellerman Date: Wed Aug 23 15:37:30 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_HMAC Since commit 401e4238f35c ("crypto: rng - Make DRBG the default RNG") we no longer need to set CONFIG_CRYPTO_HMAC in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - 2 files changed, 2 deletions(-) commit 8f3e6bdf8c3ad5cf116d56361f9f2b4ca989298c Author: Michael Ellerman Date: Wed Aug 23 15:37:29 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_CRYPTO_DEV_VMX_ENCRYPT Since commit ccf5c442a1b8 ("crypto: vmx - Convert to CPU feature based module autoloading") we no longer need to set CONFIG_CRYPTO_DEV_VMX_ENCRYPT in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - 3 files changed, 3 deletions(-) commit b8465a6ae5cde49fe76180a35f7863eb17c32ba2 Author: Michael Ellerman Date: Wed Aug 23 15:37:28 2017 +1000 powerpc/configs: Update for CONFIG_NF_CT_PROTO_(SCTP|UDPLITE)=y In commit a85406afeb3e ("netfilter: conntrack: built-in support for SCTP"), NF_CT_PROTO_SCTP switched from tristate to bool and became default y. Similarly in commit 9b91c96c5d1f ("netfilter: conntrack: built-in support for UDPlite"), NF_CT_PROTO_UDPLITE switched from tristate to bool and became default y. We had a few configs which set them to =m, which is no longer valid. We don't need to change them to =y because both symbols are default y and are enabled automatically based on the other symbols in the affected defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/linkstation_defconfig | 1 - arch/powerpc/configs/mvme5100_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - 3 files changed, 3 deletions(-) commit 360426fb8cb42c6d7f2ced20eace81f487ac5d27 Author: Michael Ellerman Date: Wed Aug 23 15:37:27 2017 +1000 powerpc/configs: Update for CONFIG_FIXED_PHY being selected by CONFIG_OF_MDIO In commit a5e4bd991362 ("of_mdio: select fixed phy support unconditionally"), CONFIG_OF_MDIO began selecting CONFIG_FIXED_PHY. That means we no longer need to set it some of our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/52xx/tqm5200_defconfig | 1 - arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 1 - arch/powerpc/configs/mgcoge_defconfig | 1 - arch/powerpc/configs/mpc512x_defconfig | 1 - arch/powerpc/configs/mpc5200_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - arch/powerpc/configs/mpc866_ads_defconfig | 1 - arch/powerpc/configs/tqm8xx_defconfig | 1 - 10 files changed, 10 deletions(-) commit e5d2f4b275874e0a4ce0628a691bacc07e2f6cb9 Author: Michael Ellerman Date: Wed Aug 23 15:37:26 2017 +1000 powerpc/configs: Update for CONFIG_DEBUG_FS being selected via CONFIG_RCU_TRACE In commit 961518259b3b ("rcu: Enable RCU tracepoints by default to aid in debugging"), CONFIG_RCU_TRACE was made default y (if CONFIG_TREE_RCU=y, which it is for some of our configs). That in turn causes CONFIG_TREE_RCU_TRACE to be enabled, which selects CONFIG_DEBUG_FS. The end result is that CONFIG_DEBUG_FS is forced on, meaning we don't have to enable it in some of our configs. Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/44x/currituck_defconfig | 1 - arch/powerpc/configs/44x/fsp2_defconfig | 1 - arch/powerpc/configs/44x/iss476-smp_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/ps3_defconfig | 1 - 9 files changed, 9 deletions(-) commit 05cb48b00a2aa1ac9c2f2c033d3dff8ed5587c1b Author: Michael Ellerman Date: Wed Aug 23 15:37:25 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_DEVKMEM Since commit e334cd69fa65 ("Move CONFIG_DEVKMEM default to n") we no longer need to set CONFIG_DEVKMEM in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/40x/klondike_defconfig | 1 - arch/powerpc/configs/83xx/kmeter1_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 1 - arch/powerpc/configs/gamecube_defconfig | 1 - arch/powerpc/configs/mpc512x_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/wii_defconfig | 1 - 7 files changed, 7 deletions(-) commit 5c26bdfae9a8cdaf4c66ce4045051eaaa4791486 Author: Michael Ellerman Date: Wed Aug 23 15:37:24 2017 +1000 powerpc/configs: Drop no longer needed CONFIG_FHANDLE Since commit f76be61755c5 ("Make CONFIG_FHANDLE default y") we no longer need to set CONFIG_FHANDLE in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/maple_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ps3_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - 9 files changed, 9 deletions(-) commit f9065c83ccf4a6c1ff5419d216ad8276e99bee6c Author: Michael Ellerman Date: Wed Aug 23 15:37:23 2017 +1000 powerpc/configs: Explicitly drop CONFIG_INPUT_MOUSEDEV In commit 73d8ef76006b ("Input: mousedev - stop offering PS/2 to userspace by default") (Jan 2017), CONFIG_INPUT_MOUSEDEV was switched from default y to default n, with the explanation: Evdev interface has been available for many years and by now everyone is switched to using it, so let's stop offering /dev/input/mouseN and /dev/psaux by default. We had a number of configs which had it enabled, but going by the above explanation probably don't need it enabled anymore. So drop the last remnants of it from our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/44x/icon_defconfig | 2 -- arch/powerpc/configs/85xx/socrates_defconfig | 2 -- arch/powerpc/configs/85xx/stx_gp3_defconfig | 2 -- arch/powerpc/configs/c2k_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/linkstation_defconfig | 1 - arch/powerpc/configs/maple_defconfig | 3 --- arch/powerpc/configs/mpc512x_defconfig | 1 - arch/powerpc/configs/mvme5100_defconfig | 1 - arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/ps3_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/configs/wii_defconfig | 3 --- 17 files changed, 24 deletions(-) commit 5ee5d80833dc267db902ea2ae39c8026cb3be0d8 Author: Michael Ellerman Date: Wed Aug 23 15:37:22 2017 +1000 powerpc/configs: Drop unneeded CONFIG_CRYPTO_ANSI_CPRNG Since commit 401e4238f35c ("crypto: rng - Make DRBG the default RNG") we no longer need to set CONFIG_CRYPTO_ANSI_CPRNG in our defconfigs. Signed-off-by: Michael Ellerman arch/powerpc/configs/40x/acadia_defconfig | 1 - arch/powerpc/configs/40x/ep405_defconfig | 1 - arch/powerpc/configs/40x/kilauea_defconfig | 1 - arch/powerpc/configs/40x/makalu_defconfig | 1 - arch/powerpc/configs/40x/obs600_defconfig | 1 - arch/powerpc/configs/40x/virtex_defconfig | 1 - arch/powerpc/configs/40x/walnut_defconfig | 1 - arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/44x/bamboo_defconfig | 1 - arch/powerpc/configs/44x/currituck_defconfig | 1 - arch/powerpc/configs/44x/ebony_defconfig | 1 - arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/icon_defconfig | 1 - arch/powerpc/configs/44x/iss476-smp_defconfig | 1 - arch/powerpc/configs/44x/katmai_defconfig | 1 - arch/powerpc/configs/44x/rainier_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - arch/powerpc/configs/44x/sequoia_defconfig | 1 - arch/powerpc/configs/44x/taishan_defconfig | 1 - arch/powerpc/configs/44x/virtex5_defconfig | 1 - arch/powerpc/configs/44x/warp_defconfig | 1 - arch/powerpc/configs/52xx/cm5200_defconfig | 1 - arch/powerpc/configs/52xx/lite5200b_defconfig | 1 - arch/powerpc/configs/52xx/motionpro_defconfig | 1 - arch/powerpc/configs/52xx/tqm5200_defconfig | 1 - arch/powerpc/configs/83xx/asp8347_defconfig | 1 - arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 1 - arch/powerpc/configs/83xx/sbc834x_defconfig | 1 - arch/powerpc/configs/85xx/ge_imp3a_defconfig | 1 - arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - arch/powerpc/configs/85xx/mpc8540_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc8560_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | 1 - arch/powerpc/configs/85xx/sbc8548_defconfig | 1 - arch/powerpc/configs/85xx/socrates_defconfig | 1 - arch/powerpc/configs/85xx/stx_gp3_defconfig | 1 - arch/powerpc/configs/85xx/tqm8540_defconfig | 1 - arch/powerpc/configs/85xx/tqm8541_defconfig | 1 - arch/powerpc/configs/85xx/tqm8548_defconfig | 1 - arch/powerpc/configs/85xx/tqm8555_defconfig | 1 - arch/powerpc/configs/85xx/tqm8560_defconfig | 1 - arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/amigaone_defconfig | 1 - arch/powerpc/configs/c2k_defconfig | 1 - arch/powerpc/configs/chrp32_defconfig | 1 - arch/powerpc/configs/ep8248e_defconfig | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/linkstation_defconfig | 1 - arch/powerpc/configs/maple_defconfig | 1 - arch/powerpc/configs/mgcoge_defconfig | 1 - arch/powerpc/configs/mpc512x_defconfig | 1 - arch/powerpc/configs/mpc5200_defconfig | 1 - arch/powerpc/configs/mpc7448_hpc2_defconfig | 1 - arch/powerpc/configs/mpc8272_ads_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - arch/powerpc/configs/mpc866_ads_defconfig | 1 - arch/powerpc/configs/mvme5100_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/ppc40x_defconfig | 1 - arch/powerpc/configs/ppc44x_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/pq2fads_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/configs/wii_defconfig | 1 - 77 files changed, 77 deletions(-) commit 980b4503b9efd97bcb51d5508d82fbf3ccb6aadb Author: Michael Ellerman Date: Wed Aug 23 15:37:21 2017 +1000 powerpc/configs: Update for symbol movement only Update defconfigs for symbols that have moved around, without their value changing. Signed-off-by: Michael Ellerman arch/powerpc/configs/40x/virtex_defconfig | 2 +- arch/powerpc/configs/44x/virtex5_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 14 ++++++------ arch/powerpc/configs/83xx/mpc832x_mds_defconfig | 2 +- arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 4 ++-- arch/powerpc/configs/83xx/mpc836x_mds_defconfig | 2 +- arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 2 +- arch/powerpc/configs/83xx/mpc837x_mds_defconfig | 2 +- arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 2 +- arch/powerpc/configs/83xx/sbc834x_defconfig | 2 +- arch/powerpc/configs/85xx/ge_imp3a_defconfig | 2 +- arch/powerpc/configs/85xx/ksi8560_defconfig | 2 +- arch/powerpc/configs/85xx/mpc8540_ads_defconfig | 2 +- arch/powerpc/configs/85xx/mpc8560_ads_defconfig | 4 ++-- arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | 2 +- arch/powerpc/configs/85xx/sbc8548_defconfig | 2 +- arch/powerpc/configs/85xx/tqm8540_defconfig | 2 +- arch/powerpc/configs/85xx/tqm8541_defconfig | 2 +- arch/powerpc/configs/85xx/tqm8555_defconfig | 2 +- arch/powerpc/configs/85xx/tqm8560_defconfig | 2 +- arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 +- arch/powerpc/configs/adder875_defconfig | 2 +- arch/powerpc/configs/cell_defconfig | 2 +- arch/powerpc/configs/chrp32_defconfig | 2 +- arch/powerpc/configs/ep88xc_defconfig | 2 +- arch/powerpc/configs/g5_defconfig | 6 ++--- arch/powerpc/configs/holly_defconfig | 2 +- arch/powerpc/configs/maple_defconfig | 4 ++-- arch/powerpc/configs/mpc512x_defconfig | 24 ++++++++++---------- arch/powerpc/configs/mpc7448_hpc2_defconfig | 2 +- arch/powerpc/configs/mpc83xx_defconfig | 6 ++--- arch/powerpc/configs/mpc866_ads_defconfig | 2 +- arch/powerpc/configs/mpc86xx_basic_defconfig | 12 +++++----- arch/powerpc/configs/mpc885_ads_defconfig | 2 +- arch/powerpc/configs/pmac32_defconfig | 4 ++-- arch/powerpc/configs/powernv_defconfig | 6 ++--- arch/powerpc/configs/ppc40x_defconfig | 2 +- arch/powerpc/configs/ppc44x_defconfig | 2 +- arch/powerpc/configs/ppc64_defconfig | 24 ++++++++++---------- arch/powerpc/configs/ppc64e_defconfig | 6 ++--- arch/powerpc/configs/ppc6xx_defconfig | 24 ++++++++++---------- arch/powerpc/configs/pseries_defconfig | 30 ++++++++++++------------- arch/powerpc/configs/tqm8xx_defconfig | 2 +- 44 files changed, 114 insertions(+), 114 deletions(-) commit a6036100edd1d8e024beb4b97c1f15c114660c6c Author: Michael Ellerman Date: Wed Aug 23 23:56:24 2017 +1000 powerpc/oops: Line up NIP & MSR with other rows This is purely cosmetic, but does look nicer IMHO: Before: task: c000000001453400 task.stack: c000000001c6c000 NIP: c000000000a0fbfc LR: c000000000a0fbf4 CTR: c000000000ba6220 REGS: c0000001fffef820 TRAP: 0300 Not tainted (4.13.0-rc6-gcc-6.3.1-00234-g423af27f7d81) MSR: 8000000000009033 CR: 88088242 XER: 00000000 CFAR: c0000000000b3488 DAR: 0000000000000000 DSISR: 42000000 SOFTE: 0 After: task: c000000001453400 task.stack: c000000001c6c000 NIP: c000000000a0fbfc LR: c000000000a0fbf4 CTR: c000000000ba6220 REGS: c0000001fffef820 TRAP: 0300 Not tainted (4.13.0-rc6-gcc-6.3.1-00234-g423af27f7d81-dirty) MSR: 8000000000009033 CR: 88088242 XER: 00000000 CFAR: c0000000000b34a4 DAR: 0000000000000000 DSISR: 42000000 SOFTE: 0 Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6fc73fb965f6c1fd7ad75aabfdee6b1af0f7093 Author: Michael Ellerman Date: Wed Aug 23 23:56:23 2017 +1000 powerpc/oops: Print CR/XER on same line as MSR Somehow we missed this when the pr_cont() changes went in. Fix CR/XER to go on the same line as MSR, as they have historically, eg: MSR: 8000000000009032 CR: 4804408a XER: 20000000 Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c56cd8ee945abdf955ad28a1f5c7576cd288be2 Author: Michael Ellerman Date: Wed Aug 23 23:56:22 2017 +1000 powerpc/oops: Use IS_ENABLED() for oops markers Just because it looks less gross. Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 2e82ca3c3978d441ab272a7a964d03c6d2ee2bf3 Author: Michael Ellerman Date: Wed Aug 23 23:56:21 2017 +1000 powerpc/oops: Print the kernel's endian in the oops Although the MSR tells you what endian you're in it's possible that isn't the same endian the kernel was built for, and if that happens you're usually having a very bad day. So print a marker to make it 100% clear which endian the kernel was built for. Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 72c0d9ee4abc44c82a00eadebe08a740645ad8a0 Author: Michael Ellerman Date: Wed Aug 23 23:56:20 2017 +1000 powerpc/oops: Fix the oops markers to use pr_cont() When we oops we print a few markers for significant config options such as PREEMPT, SMP etc. Currently these appear on separate lines because we're not using pr_cont() properly. Fix it. Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6538ac30841638b2fd345725a9fd155c6fe1768a Author: LABBE Corentin Date: Wed Aug 16 14:34:44 2017 +0200 powerpc/powernv: Fix build error in opal-imc.c when NUMA=n When building a random powerpc kernel I hit this build error: arch/powerpc/platforms/powernv/opal-imc.c:130:13: error : assignment discards « const » qualifier from pointer target type [-Werror=discarded-qualifiers] l_cpumask = cpumask_of_node(nid); ^ This happens because when CONFIG_NUMA=n cpumask_of_node() returns a const pointer. This patch simply adds const to l_cpumask to fix this issue. Signed-off-by: Corentin Labbe Reviewed-by: Madhavan Srinivasan [mpe: Flesh out change log] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-imc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f84c2624a2d75c9f69214ed83f11dd30a8ae83d Author: Rashmica Gupta Date: Thu Jun 1 15:34:40 2017 +1000 Add documentation for the powerpc memtrace debugfs files CONFIG_PPC_MEMTRACE must be set to use this feature. This can only be used on powernv platforms. Signed-off-by: Rashmica Gupta [mpe: Update dates and kernel versions, mention size is in bytes] Signed-off-by: Michael Ellerman Documentation/ABI/testing/ppc-memtrace | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 2fb4f2581d3ab3513fe44d35f9b9e79d89b1f521 Author: Kiran Gunda Date: Wed Aug 23 18:16:26 2017 +0530 spmi: pmic-arb: Move the ownership check to irq_chip callback Check the irq ownership in the irq_request_resources callback instead of checking it during the irq mapping. This can prevent installing the flow handler for the interrupt that is not owned by the EE and allow the irq translation during the gpio driver probe. Signed-off-by: Kiran Gunda Tested-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit e55fe64a198d2657e24f9fca5cd6e7e7f13e0b2f Author: Rob Herring Date: Tue Jul 18 16:43:32 2017 -0500 spmi: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 53d296b594645697df5885995d6318a083554d93 Author: Fenglin Wu Date: Fri Jul 28 12:40:47 2017 +0530 spmi: pmic-arb: Remove checking opc value not less than 0 The opc parameter in pmic_arb_write_cmd() function is defined with type u8 and it's always greater than or equal to 0. Checking that it's not less than 0 is redundant and it can cause a forbidden warning during compilation. Remove the check. Signed-off-by: Fenglin Wu Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40f318f0ed674e0cd12e2dfcb5af71577ea58b4e Author: David Collins Date: Fri Jul 28 12:40:46 2017 +0530 spmi: pmic-arb: add support for HW version 5 Add support for version 5 of the SPMI PMIC arbiter. It utilizes different offsets for registers than those found on version 3. Also, the procedure to determine if writing and IRQ access is allowed for a given PPID changes for version 5. Signed-off-by: David Collins Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 236 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 214 insertions(+), 22 deletions(-) commit 000e1a43d3d2d4541f10be997c1609b69beb22d5 Author: Kiran Gunda Date: Fri Jul 28 12:40:45 2017 +0530 spmi: pmic-arb: fix a possible null pointer dereference If "core" memory resource is not specified, then the driver could end up dereferencing a null pointer. Fix this issue. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e95d073c8ce397a8e77c36a208be978060bb214f Author: Kiran Gunda Date: Fri Jul 28 12:40:44 2017 +0530 spmi: pmic-arb: return __iomem pointer instead of offset Modify the pmic_arb version ops to return an __iomem pointer to the address instead of an offset. That way we do not need to care about the base address changes in the new HW version. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 93 ++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 42 deletions(-) commit cdeef07a8dd5ea45b2f2ec4169d2669dddd24e6c Author: Kiran Gunda Date: Fri Jul 28 12:40:43 2017 +0530 spmi: pmic-arb: use irq_chip callback to set spmi irq wakeup capability Currently the driver sets the pmic arbiter core interrupt as wakeup capable irrespective of the child irqs which causes the system to wakeup unnecessarily. To fix this, set the core interrupt as wakeup capable only if any of the child irqs request for it. Do this by marking it as wakeup capable in the irq_set_wake callback. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ff615ed91b5dffa0f1977ee1d703f697e2b4d62f Author: Kiran Gunda Date: Fri Jul 28 12:40:42 2017 +0530 spmi: pmic-arb: return the value instead of passing by pointer Returning the output value from a function, when it is possible, is the better and cleaner way than passing it by the pointer. Hence, modify the ppid_to_apid mapping function to return apid instead of passing it by a pointer. While at it, pass the ppid as function parameter to ppid_to_apid mapping function instead of passing the sid and addr. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 82 +++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 42 deletions(-) commit 9f7a9a448da7cf7951fb9e33eadd4dea173000fe Author: Kiran Gunda Date: Fri Jul 28 12:40:41 2017 +0530 spmi: pmic-arb: replace the writel_relaxed with __raw_writel Replace the writel_relaxed with __raw_writel to avoid byte swapping in pmic_arb_write_data() function. That way the code is independent of the CPU endianness. Fixes: 111a10bf3e53 ("spmi: pmic-arb: rename spmi_pmic_arb_dev to spmi_pmic_arb") Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4788e613a65df19dbfc481473859c70b23eb5404 Author: Kiran Gunda Date: Fri Jul 28 12:40:40 2017 +0530 spmi: pmic-arb: fix memory allocation for mapping_table Allocate the correct memory size (max_pmic_peripherals) for the mapping_table that holds the apid to ppid mapping. Also use a local variable for mapping_table for better alignment of the code. Fixes: 987a9f128b8a ("spmi: pmic-arb: Support more than 128 peripherals") Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 325255bc9554504a2545284655d4fd8e74c06c22 Author: Kiran Gunda Date: Fri Jul 28 12:40:39 2017 +0530 spmi: pmic-arb: optimize qpnpint_irq_set_type function Optimize the qpnpint_irq_set_type() by using a local variable to hold the handler type. Also clean up other variable usage. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit f2f3156472b09aed3c7f3ec38db4d09f15a58f0d Author: Kiran Gunda Date: Fri Jul 28 12:40:38 2017 +0530 spmi: pmic-arb: clean up pmic_arb_find_apid function Clean up the pmic_arb_find_apid() by using the local variables to improve the code readability. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 02abec3616c1b2027efc7e08abf7fc0d2436a837 Author: Kiran Gunda Date: Fri Jul 28 12:40:37 2017 +0530 spmi: pmic-arb: rename pa_xx to pmic_arb_xx and other cleanup This patch cleans up the following. - Rename the "pa" to "pmic_arb". - Rename the spmi_pmic_arb *dev to spmi_pmic_arb *pmic_arb. - Rename the pa_{read,write}_data() functions to pmic_arb_{read,write}_data(). - Rename channel to APID. - Rename the HWIRQ_*() macros to hwirq_to_*(). Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 418 +++++++++++++++++++++---------------------- 1 file changed, 209 insertions(+), 209 deletions(-) commit b319b5922db204a328e02797a50a3898576bf1fc Author: Kiran Gunda Date: Fri Jul 28 12:40:36 2017 +0530 spmi: pmic-arb: remove the read/write access checks The access mode checks for peripheral ownership for read/write permissions should not be required. Every peripheral enabled for this master is expected to have a read/write permissions. If there is any such invalid access due to wrong configuration in boot loader or device tree files, then it should be fixed in those locations. Hence, remove the access mode checks from the driver. Signed-off-by: Kiran Gunda Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 75 +++----------------------------------------- 1 file changed, 5 insertions(+), 70 deletions(-) commit ccc59f47b6f9770ef768ada0ac5993de5f608d11 Merge: 962734f 857b8de Author: Christian Borntraeger Date: Mon Aug 28 13:46:32 2017 +0200 Merge tag 'kvm-s390-master-4.13-2' into kvms390/next Additional fixes on top of these two - missing inline assembly constraint - wrong exception handling are necessary commit ecbf9ef15a891a1e716c1ea611cae9fa5ef37522 Author: Anup Patel Date: Tue Aug 22 15:27:06 2017 +0530 dmaengine: bcm-sba-raid: Remove redundant SBA_REQUEST_STATE_COMPLETED The SBA_REQUEST_STATE_COMPLETED state was added to keep track of sba_request which got completed but cannot be freed because underlying Async Tx descriptor was not ACKed by DMA client. Instead of above, we can free the sba_request with non-ACKed Async Tx descriptor and sba_alloc_request() will ensure that it always allocates sba_request with ACKed Async Tx descriptor. This alternate approach makes SBA_REQUEST_STATE_COMPLETED state redundant hence this patch removes it. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 63 +++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 46 deletions(-) commit 29e0f486d975fabbadb770f957adeb75d73ab2d0 Author: Anup Patel Date: Tue Aug 22 15:27:05 2017 +0530 dmaengine: bcm-sba-raid: Explicitly ACK mailbox message after sending We should explicitly ACK mailbox message because after sending message we can know the send status via error attribute of brcm_message. This will also help SBA-RAID to use "txdone_ack" method whenever mailbox controller supports it. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8529a927e2fcaab010e9c3ed261b96e6ec1f375b Author: Anup Patel Date: Tue Aug 22 15:27:04 2017 +0530 dmaengine: bcm-sba-raid: Add debugfs support This patch adds debugfs support to report stats via debugfs which in-turn will help debug hang or error situations. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit b99c238669a7abdfc54d14494687c13856280a50 Author: Anup Patel Date: Tue Aug 22 15:27:03 2017 +0530 dmaengine: bcm-sba-raid: Remove redundant SBA_REQUEST_STATE_RECEIVED The SBA_REQUEST_STATE_RECEIVED state is now redundant because received sba_request are immediately freed or moved to completed list in sba_process_received_request(). This patch removes redundant SBA_REQUEST_STATE_RECEIVED state. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit d6ffd2395a9225f89ab7e07b4ee5216018aa7787 Author: Anup Patel Date: Tue Aug 22 15:27:02 2017 +0530 dmaengine: bcm-sba-raid: Re-factor sba_process_deferred_requests() Currently, sba_process_deferred_requests() handles both pending and completed sba_request which is unnecessary overhead for sba_issue_pending() because completed sba_request handling is not required in sba_issue_pending(). This patch breaks sba_process_deferred_requests() into two parts sba_process_received_request() and _sba_process_pending_requests(). The sba_issue_pending() will only process pending sba_request by calling _sba_process_pending_requests(). This will improve sba_issue_pending(). The sba_receive_message() will only process received sba_request by calling sba_process_received_request() for each received sba_request. The sba_process_received_request() will also call _sba_process_pending_requests() after handling received sba_request because we might have pending sba_request not submitted by previous call to sba_issue_pending(). Signed-off-by: Anup Patel Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 109 +++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 62 deletions(-) commit fd8eb5395fa992983581301541e428eb0bd8fbf2 Author: Anup Patel Date: Tue Aug 22 15:27:01 2017 +0530 dmaengine: bcm-sba-raid: Pre-ack async tx descriptor We should pre-ack async tx descriptor at time of allocating sba_request (just like other RAID drivers). Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 1 + 1 file changed, 1 insertion(+) commit 6df8f913d229e459730fffff7e78ac331140955e Author: Anup Patel Date: Tue Aug 22 15:27:00 2017 +0530 dmaengine: bcm-sba-raid: Peek mbox when we have no free requests When setting up RAID array on several NVMe disks we observed that sba_alloc_request() start failing (due to no free requests left) and RAID array setup becomes very slow. To improve performance, we do mbox channel peek when we have no free requests. This improves performance of RAID array setup because mbox requests that were completed but not processed by mbox completion worker will be processed immediately by mbox channel peek. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit eb67744b9af736073d6dffb7fb139f3f05d7e6a8 Author: Anup Patel Date: Tue Aug 22 15:26:59 2017 +0530 dmaengine: bcm-sba-raid: Alloc resources before registering DMA device We should allocate DMA channel resources before registering the DMA device in sba_probe() because we can get DMA request soon after registering the DMA device. If DMA channel resources are not allocated before first DMA request then SBA-RAID driver will crash. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit f83385142c3a0864e4ac82d852dd0fdb54742ce3 Author: Anup Patel Date: Tue Aug 22 15:26:58 2017 +0530 dmaengine: bcm-sba-raid: Improve sba_issue_pending() run duration The pending sba_request list can become very long in real-life usage (e.g. setting up RAID array) which can cause sba_issue_pending() to run for long duration. This patch adds common sba_process_deferred_requests() to process few completed and pending requests so that it finishes in short duration. We use this common sba_process_deferred_requests() in both sba_issue_pending() and sba_receive_message(). Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 234 ++++++++++++++++++++++++--------------------- 1 file changed, 125 insertions(+), 109 deletions(-) commit 5346aafcefb5300921e3bc2d48e48f2103943d58 Author: Anup Patel Date: Tue Aug 22 15:26:57 2017 +0530 dmaengine: bcm-sba-raid: Increase number of free sba_request Currently, we have only 1024 free sba_request created by sba_prealloc_channel_resources(). This is too low and the prep_xxx() callbacks start failing more often at time of RAID array setup over NVMe disks. This patch sets number of free sba_request created by sba_prealloc_channel_resources() to be: x 8192 Due to above, we will have sufficient number of free sba_request and prep_xxx() callbacks failing is very unlikely. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 5655e00f5cde2c856c80eb10d0e6c911b7d880f2 Author: Anup Patel Date: Tue Aug 22 15:26:56 2017 +0530 dmaengine: bcm-sba-raid: Allow arbitrary number free sba_request Currently, we cannot have any arbitrary number of free sba_request because sba_prealloc_channel_resources() allocates an array of sba_request using devm_kcalloc() and kcalloc() cannot provide memory beyond certain size. This patch removes "reqs" (sba_request array) from sba_device and makes "cmds" as variable array (instead of pointer) in sba_request. This helps sba_prealloc_channel_resources() to allocate sba_request and associated SBA command in one allocation which in-turn allows arbitrary number of free sba_request. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit abfa251afe27ee7820c3a082fe573ec5bedb3488 Author: Anup Patel Date: Tue Aug 22 15:26:55 2017 +0530 dmaengine: bcm-sba-raid: Remove reqs_free_count from sba_device The reqs_free_count member of sba_device is not used anywhere hence no point in tracking number of free sba_request. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e7ae72aa65a1241bc3eec0ad5906e64da1158623 Author: Anup Patel Date: Tue Aug 22 15:26:54 2017 +0530 dmaengine: bcm-sba-raid: Remove redundant resp_dma from sba_request Both resp and resp_dma are redundant in sba_request because resp is unused and resp_dma carries same information present in tx.phys of sba_request. This patch removes both resp and resp_dma from sba_request. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 10f1a33080258626e6ada567953d6a0bdadf5502 Author: Anup Patel Date: Tue Aug 22 15:26:53 2017 +0530 dmaengine: bcm-sba-raid: Remove redundant next_count from sba_request The next_count in sba_request is redundant because same information is captured by next_pending_count. This patch removes next_count from sba_request. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 57a285085985c80ee0c7baa9938f28cf7e6d69fe Author: Anup Patel Date: Tue Aug 22 15:26:52 2017 +0530 dmaengine: bcm-sba-raid: Common flags for sba_request state and fence This patch merges sba_request state and fence into common sba_request flags. The sba_request flags not only saves memory but it can also be extended in-future without adding new members. We also make each sba_request state as separate bit in sba_request flags to help debugging situations where a sba_request is accidently in two states. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 66 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit e4274cfa422b50c5b74434f4f23d9163626a01f4 Author: Anup Patel Date: Tue Aug 22 15:26:51 2017 +0530 dmaengine: bcm-sba-raid: Reduce locking context in sba_alloc_request() We don't require to hold "sba->reqs_lock" for long-time in sba_alloc_request() because lock protection is not required when initializing members of "struct sba_request". Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e897091ab9e022a1adb98ba56dfc5a8d9600f6c4 Author: Anup Patel Date: Tue Aug 22 15:26:50 2017 +0530 dmaengine: bcm-sba-raid: Minor improvments in comments This patch does following improvments to comments: 1. Make section comments consistent across the driver by avoiding " SBA " in some of the comments 2. Add/update few more section comments Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 749d0d4bbb077e9a9e25a910e1cd285a0f0050ef Author: Abhishek Sahu Date: Tue Aug 1 19:41:44 2017 +0530 dmaengine: qcom: bam_dma: add command descriptor flag If DMA_PREP_CMD flag is passed in prep_slave_sg then peripheral driver has passed the data is in BAM command descriptor format and BAM driver should set CMD bit for each of the HW descriptors. Signed-off-by: Abhishek Sahu Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit dfebb055f73a24e2c8756b837d9ce1a06457f5d7 Author: Abhishek Sahu Date: Tue Aug 1 19:41:43 2017 +0530 dmaengine: qcom: bam_dma: wrapper functions for command descriptor QCOM BAM also supports command descriptor which allows the SW to create descriptors of type command which does not generate any data transmissions but configures registers in the peripheral. In command descriptor the 32bit address point to the start of the command block which holds the command elements and the 16bit size define the size of the command block. Each Command Element is structured by 4 words: Write command: address + cmd register data register mask reserved Read command: address + cmd read data result address, reserved reserved This patch creates a new header file for BAM driver which contains the structures and wrapper functions for command descriptor. This file will be used by different QCOM peripheral drivers for forming the command descriptor Signed-off-by: Abhishek Sahu Signed-off-by: Vinod Koul include/linux/dma/qcom_bam_dma.h | 79 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 3e00ab4ac51c2ed47c28fd5000c47399f1a11cf5 Author: Abhishek Sahu Date: Tue Aug 1 19:41:42 2017 +0530 dmaengine: add DMA_PREP_CMD for non-Data descriptors. Some of the DMA controllers are capable of issuing the commands to peripheral by the DMA. These commands can be list of register reads/writes and its different from normal data reads/writes. This patch adds new flag DMA_PREP_CMD in DMA API which tells the driver that the data passed to DMA API is command data and DMA controller driver will form descriptor in the required format. This flag can be used by any DMA controller driver which requires the descriptor in different format for non-Data descriptors. Signed-off-by: Abhishek Sahu Signed-off-by: Vinod Koul Documentation/dmaengine/provider.txt | 7 +++++++ include/linux/dmaengine.h | 4 ++++ 2 files changed, 11 insertions(+) commit b8d01b7fbaa3b9d5887ec6c6fea36fb57bbc4d6b Author: Bhumika Goyal Date: Sat Aug 19 13:52:16 2017 +0530 mei: 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: Greg Kroah-Hartman drivers/misc/mei/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49ca2eff5758eb73cc906dbea74ce54b7c99e4d1 Author: Christophe JAILLET Date: Fri Aug 25 07:22:53 2017 +0200 usb: chipidea: usb2: check memory allocation failure Check memory allocation failure and return -ENOMEM in such a case, as already done few lines below for another memory allocation. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_usb2.c | 2 ++ 1 file changed, 2 insertions(+) commit a1279ef74eeeb5f627f091c71d80dd7ac766c99d Author: Dmitry Fleytman Date: Fri Aug 25 10:38:35 2017 +0300 usb: Add device quirk for Logitech HD Pro Webcam C920-C Commit e0429362ab15 ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") introduced quirk to workaround an issue with some Logitech webcams. Apparently model C920-C has the same issue 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 f624ec70b464cb603efb9707234f59b6a502056d Author: Jack Pham Date: Wed Aug 23 00:35:30 2017 -0700 usb: misc: lvstest: add entry to place port in compliance mode Add support for the SuperSpeed Link Layer test case TD.7.34 which requires the operator to place the port into compliance mode, and to subsequently bring it out via reset. Historically according to the (now deprecated) USB 3.0 specification a SuperSpeed host downstream port would automatically transition to Compliance mode from the Polling state if LFPS polling times out. However the language in USB 3.1 as well as xHCI 1.1 states it may be required to explicitly enable this transition. For such hosts this is done by sending a SET_FEATURE(PORT_LINK_STATE) with the state set to Compliance to the root hub port. Similar to the other supported commands, to do this via sysfs: echo > /sys/bus/usb/devices/2-0\:1.0/enable_compliance According to xHCI 1.1 section 4.19.1.2.4.1, this enables the transition to compliance mode upon LFPS timeout. Note that this can only be issued when the port is in disconnected state. And in order to disable this behavior on subsequent transitions, a warm reset should be issued. So add another entry to do that: echo > /sys/bus/usb/devices/2-0\:1.0/warm_reset In general these attributes can also be useful for other USB SuperSpeed compliance tests such as electrical and eye diagram testing which require CPn patterns to be transmitted. Signed-off-by: Jack Pham Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-usb-lvstest | 13 ++++++++ drivers/usb/misc/lvstest.c | 41 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 4b562bd2b1862dd90f76baba06250d83e90d9261 Author: Jack Pham Date: Wed Aug 23 00:35:29 2017 -0700 usb: xhci: Support enabling of compliance mode for xhci 1.1 To perform SuperSpeed compliance testing the port should first be placed into compliance mode. For xHCI 1.0 and prior this transition happens automatically when the port is in Training and encounters an LFPS timeout. Thus running compliance tests against a test appliance may simply just work by simply plugging in to the downstream port. However starting with xHCI 1.1 the transition from Polling.LFPS to compliance mode may be disabled by default and needs to be explicitly enabled by writing to the PLS field of the PORTSC register, which sets an internal 'CTE' (Compliance Transition Enabled) flag so that the port will perform the transition the next time it encounters LFPS timeout. Whether this is disabled or not is determined by the 'CTC' (Compliance Transition Capability) bit in the HCCPARAMS2 capability register. In order to allow a test operator to change this if needed, allow a test driver (such as drivers/usb/misc/lvstest.c) to send a SET_FEATURE(PORT_LINK_STATE) control message to the root hub to update the link state prior to connecting to the port. Subsequently, placing the port in warm reset would then disable the flag. Signed-off-by: Jack Pham Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit e6b422b88b46353cf596e0db6dc0e39d50d90d6e Author: Sandeep Singh Date: Thu Aug 24 09:57:15 2017 +0530 usb:xhci:Fix regression when ATI chipsets detected The following commit cause a regression on ATI chipsets. 'commit e788787ef4f9 ("usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume")' This causes pinfo->smbus_dev to be wrongly set to NULL on systems with the ATI chipset that this function checks for first. Added conditional check for AMD chipsets to avoid the overwriting pinfo->smbus_dev. Reported-by: Ben Hutchings Fixes: e788787ef4f9 ("usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume") cc: Nehal Shah cc: Signed-off-by: Sandeep Singh Signed-off-by: Shyam Sundar S K Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit de3af5bf259d7a0bfaac70441c8568ab5998d80c Author: Kai-Heng Feng Date: Wed Aug 16 10:53:20 2017 +0800 usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard Corsair Strafe RGB keyboard has trouble to initialize: [ 1.679455] usb 3-6: new full-speed USB device number 4 using xhci_hcd [ 6.871136] usb 3-6: unable to read config index 0 descriptor/all [ 6.871138] usb 3-6: can't read configurations, error -110 [ 6.991019] usb 3-6: new full-speed USB device number 5 using xhci_hcd [ 12.246642] usb 3-6: unable to read config index 0 descriptor/all [ 12.246644] usb 3-6: can't read configurations, error -110 [ 12.366555] usb 3-6: new full-speed USB device number 6 using xhci_hcd [ 17.622145] usb 3-6: unable to read config index 0 descriptor/all [ 17.622147] usb 3-6: can't read configurations, error -110 [ 17.742093] usb 3-6: new full-speed USB device number 7 using xhci_hcd [ 22.997715] usb 3-6: unable to read config index 0 descriptor/all [ 22.997716] usb 3-6: can't read configurations, error -110 Although it may work after several times unpluging/pluging: [ 68.195240] usb 3-6: new full-speed USB device number 11 using xhci_hcd [ 68.337459] usb 3-6: New USB device found, idVendor=1b1c, idProduct=1b20 [ 68.337463] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 68.337466] usb 3-6: Product: Corsair STRAFE RGB Gaming Keyboard [ 68.337468] usb 3-6: Manufacturer: Corsair [ 68.337470] usb 3-6: SerialNumber: 0F013021AEB8046755A93ED3F5001941 Tried three quirks: USB_QUIRK_DELAY_INIT, USB_QUIRK_NO_LPM and USB_QUIRK_DEVICE_QUALIFIER, user confirmed that USB_QUIRK_DELAY_INIT alone can workaround this issue. Hence add the quirk for Corsair Strafe RGB. BugLink: https://bugs.launchpad.net/bugs/1678477 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 2ab3c34c9c75331143d67042e826bdcde4d6ab37 Author: Bhumika Goyal Date: Sun Aug 13 18:13:11 2017 +0530 usb: gadget: make snd_pcm_hardware const Make this const as it is only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 334007d52597ebb079766ab34711728677130068 Author: Sergei Shtylyov Date: Sun Aug 20 21:06:52 2017 +0300 usb: common: use of_property_read_bool() Use more compact of_property_read_bool() calls for the boolean properties instead of of_find_property() calls in of_usb_host_tpl_support() and of_usb_update_otg_caps(). Signed-off-by: Sergei Shtylyov Signed-off-by: Greg Kroah-Hartman drivers/usb/common/common.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b64d47ae62e5f56727ad6dc2088e13dfab524a83 Author: Arvind Yadav Date: Thu Aug 24 16:47:09 2017 +0530 USB: core: constify vm_operations_struct vm_operations_struct are not supposed to change at runtime. All functions working with const vm_operations_struct. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0688a09990986cd8c2fda26afb04ce0a599ced3f Author: Joerg Roedel Date: Wed Aug 23 15:50:03 2017 +0200 iommu/amd: Rename a few flush functions Rename a few iommu cache-flush functions that start with iommu_ to start with amd_iommu now. This is to prevent name collisions with generic iommu code later on. Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ec62b1ab0f4ccbc48aa8b9852cc25b38a1f12d1e Author: Baoquan He Date: Thu Aug 24 21:13:57 2017 +0800 iommu/amd: Check if domain is NULL in get_domain() and return -EBUSY In get_domain(), 'domain' could be NULL before it's passed to dma_ops_domain() to dereference. And the current code calling get_domain() can't deal with the returned 'domain' well if its value is NULL. So before dma_ops_domain() calling, check if 'domain' is NULL, If yes just return ERR_PTR(-EBUSY) directly. Reported-by: Dan Carpenter Fixes: df3f7a6e8e85 ('iommu/amd: Use is_attach_deferred call-back') Signed-off-by: Baoquan He Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 3 +++ 1 file changed, 3 insertions(+) commit 419399804382d1aa7a3fc652915e8f3b61aff941 Author: Yong Wu Date: Thu Aug 24 15:42:12 2017 +0800 iommu/mediatek: Fix a build warning of BIT(32) in ARM The commit ("iommu/mediatek: Enlarge the validate PA range for 4GB mode") introduce the following build warning while ARCH=arm: drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_iova_to_phys': include/linux/bitops.h:6:24: warning: left shift count >= width of type [-Wshift-count-overflow] #define BIT(nr) (1UL << (nr)) ^ >> drivers/iommu/mtk_iommu.c:407:9: note: in expansion of macro 'BIT' pa |= BIT(32); drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_probe': include/linux/bitops.h:6:24: warning: left shift count >= width of type [-Wshift-count-overflow] #define BIT(nr) (1UL << (nr)) ^ drivers/iommu/mtk_iommu.c:589:35: note: in expansion of macro 'BIT' data->enable_4GB = !!(max_pfn > (BIT(32) >> PAGE_SHIFT)); Use BIT_ULL instead of BIT. Reported-by: kernel test robot Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f1c8ea16b643be339f0e80b3535bc5b5fe8f9a3 Author: Yong Wu Date: Thu Aug 24 15:42:11 2017 +0800 iommu/mediatek: Fix a build fail of m4u_type The commit ("iommu/mediatek: Enlarge the validate PA range for 4GB mode") introduce the following build error: drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_hw_init': >> drivers/iommu/mtk_iommu.c:536:30: error: 'const struct mtk_iommu_data' has no member named 'm4u_type'; did you mean 'm4u_dom'? if (data->enable_4GB && data->m4u_type != M4U_MT8173) { This patch fix it, use "m4u_plat" instead of "m4u_type". Reported-by: kernel test robot Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ce5b0f22d6061b33aaf302f73302f402fea0c17 Author: Arnd Bergmann Date: Wed Aug 23 15:42:45 2017 +0200 iommu: qcom: annotate PM functions as __maybe_unused The qcom_iommu_disable_clocks() function is only called from PM code that is hidden in an #ifdef, causing a harmless warning without CONFIG_PM: drivers/iommu/qcom_iommu.c:601:13: error: 'qcom_iommu_disable_clocks' defined but not used [-Werror=unused-function] static void qcom_iommu_disable_clocks(struct qcom_iommu_dev *qcom_iommu) drivers/iommu/qcom_iommu.c:581:12: error: 'qcom_iommu_enable_clocks' defined but not used [-Werror=unused-function] static int qcom_iommu_enable_clocks(struct qcom_iommu_dev *qcom_iommu) Replacing that #ifdef with __maybe_unused annotations lets the compiler drop the functions silently instead. Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") Acked-by: Rob Clark Signed-off-by: Arnd Bergmann Signed-off-by: Joerg Roedel drivers/iommu/qcom_iommu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d527d1ea5d12aafbd0373b5e6547464c370ea18c Author: Gustavo A. R. Silva Date: Sat Aug 12 20:12:32 2017 -0500 usb: misc: ftdi-elan: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) commit ed62ca2f4f51c17841ea39d98c0c409cb53a3e10 Author: Douglas Anderson Date: Thu Aug 10 15:42:22 2017 -0700 USB: core: Avoid race of async_completed() w/ usbdev_release() While running reboot tests w/ a specific set of USB devices (and slub_debug enabled), I found that once every few hours my device would be crashed with a stack that looked like this: [ 14.012445] BUG: spinlock bad magic on CPU#0, modprobe/2091 [ 14.012460] lock: 0xffffffc0cb055978, .magic: ffffffc0, .owner: cryption contexts: %lu/%lu [ 14.012460] /1025536097, .owner_cpu: 0 [ 14.012466] CPU: 0 PID: 2091 Comm: modprobe Not tainted 4.4.79 #352 [ 14.012468] Hardware name: Google Kevin (DT) [ 14.012471] Call trace: [ 14.012483] [<....>] dump_backtrace+0x0/0x160 [ 14.012487] [<....>] show_stack+0x20/0x28 [ 14.012494] [<....>] dump_stack+0xb4/0xf0 [ 14.012500] [<....>] spin_dump+0x8c/0x98 [ 14.012504] [<....>] spin_bug+0x30/0x3c [ 14.012508] [<....>] do_raw_spin_lock+0x40/0x164 [ 14.012515] [<....>] _raw_spin_lock_irqsave+0x64/0x74 [ 14.012521] [<....>] __wake_up+0x2c/0x60 [ 14.012528] [<....>] async_completed+0x2d0/0x300 [ 14.012534] [<....>] __usb_hcd_giveback_urb+0xc4/0x138 [ 14.012538] [<....>] usb_hcd_giveback_urb+0x54/0xf0 [ 14.012544] [<....>] xhci_irq+0x1314/0x1348 [ 14.012548] [<....>] usb_hcd_irq+0x40/0x50 [ 14.012553] [<....>] handle_irq_event_percpu+0x1b4/0x3f0 [ 14.012556] [<....>] handle_irq_event+0x4c/0x7c [ 14.012561] [<....>] handle_fasteoi_irq+0x158/0x1c8 [ 14.012564] [<....>] generic_handle_irq+0x30/0x44 [ 14.012568] [<....>] __handle_domain_irq+0x90/0xbc [ 14.012572] [<....>] gic_handle_irq+0xcc/0x18c Investigation using kgdb() found that the wait queue that was passed into wake_up() had been freed (it was filled with slub_debug poison). I analyzed and instrumented the code and reproduced. My current belief is that this is happening: 1. async_completed() is called (from IRQ). Moves "as" onto the completed list. 2. On another CPU, proc_reapurbnonblock_compat() calls async_getcompleted(). Blocks on spinlock. 3. async_completed() releases the lock; keeps running; gets blocked midway through wake_up(). 4. proc_reapurbnonblock_compat() => async_getcompleted() gets the lock; removes "as" from completed list and frees it. 5. usbdev_release() is called. Frees "ps". 6. async_completed() finally continues running wake_up(). ...but wake_up() has a pointer to the freed "ps". The instrumentation that led me to believe this was based on adding some trace_printk() calls in a select few functions and then using kdb's "ftdump" at crash time. The trace follows (NOTE: in the trace below I cheated a little bit and added a udelay(1000) in async_completed() after releasing the spinlock because I wanted it to trigger quicker): <...>-2104 0d.h2 13759034us!: async_completed at start: as=ffffffc0cc638200 mtpd-2055 3.... 13759356us : async_getcompleted before spin_lock_irqsave mtpd-2055 3d..1 13759362us : async_getcompleted after list_del_init: as=ffffffc0cc638200 mtpd-2055 3.... 13759371us+: proc_reapurbnonblock_compat: free_async(ffffffc0cc638200) mtpd-2055 3.... 13759422us+: async_getcompleted before spin_lock_irqsave mtpd-2055 3.... 13759479us : usbdev_release at start: ps=ffffffc0cc042080 mtpd-2055 3.... 13759487us : async_getcompleted before spin_lock_irqsave mtpd-2055 3.... 13759497us!: usbdev_release after kfree(ps): ps=ffffffc0cc042080 <...>-2104 0d.h2 13760294us : async_completed before wake_up(): as=ffffffc0cc638200 To fix this problem we can just move the wake_up() under the ps->lock. There should be no issues there that I'm aware of. Signed-off-by: Douglas Anderson Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53ec7f2733745f35f78ea1bab1e73b30e7667e8b Author: Bhumika Goyal Date: Sat Aug 19 13:52:26 2017 +0530 usb: 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 Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b0e06df5cadba8471524266cc472dbbda55146b Author: Maxime Ripard Date: Mon Aug 28 10:49:50 2017 +0200 Revert "ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Beelink X2" This reverts commit ddb56254ae52acff7bd7fbd8f963e79bffc324d4. The EMAC bindings have not stabilized yet, so we can't commit to keeping them stable. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 706d61b243d954d49fa839dcbcaace930e219271 Author: Johan Hovold Date: Thu Aug 24 11:38:37 2017 -0500 USB: musb: dsps: add explicit runtime resume at suspend The musb_dsps driver is special in that the parent (glue) device's driver is accessing registers mapped by the child. The clock is however shared and is managed by the grandparent device. Since commit 869c59782981 ("usb: musb: dsps: add support for suspend and resume") the dsps driver has been accessing these registers as part of suspend and resume. The parent driver obviously cannot runtime resume the child during system suspend and is currently relying on the fact that the child will be RPM_ACTIVE throughout suspend. The suspend implementation also makes sure to check that the child is indeed present (and hence the clock enabled) before accessing the registers. Let's add an explicit runtime resume of the glue device itself to enable the clock before doing the register accesses in case these assumptions ever change (i.e. if the child is left runtime suspended). Note that the glue-timer cancellation is moved after the child-presence check to keep error handling simple. This should be fine as the timer is not setup until the controller is being registered and at that time glue->musb and its driver data have already been initialised. Cc: Alan Stern Cc: Daniel Mack Cc: Tony Lindgren Signed-off-by: Johan Hovold Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 082df8be455ade361748f0385aa6c9c8d07be167 Author: Johan Hovold Date: Thu Aug 24 11:38:36 2017 -0500 USB: musb: fix external abort on suspend Make sure that the controller is runtime resumed when system suspending to avoid an external abort when accessing the interrupt registers: Unhandled fault: external abort on non-linefetch (0x1008) at 0xd025840a ... [] (musb_default_readb) from [] (musb_disable_interrupts+0x84/0xa8) [] (musb_disable_interrupts) from [] (musb_suspend+0x38/0xb8) [] (musb_suspend) from [] (platform_pm_suspend+0x3c/0x64) This is easily reproduced on a BBB by enabling the peripheral port only (as the host port may enable the shared clock) and keeping it disconnected so that the controller is runtime suspended. (Well, you would also need to the not-yet-merged am33xx-suspend patches by Dave Gerlach to be able to suspend the BBB.) This is a regression that was introduced by commit 1c4d0b4e1806 ("usb: musb: Remove pm_runtime_set_irq_safe") which allowed the parent glue device to runtime suspend and thereby exposed a couple of older issues: Register accesses without explicitly making sure the controller is runtime resumed during suspend was first introduced by commit c338412b5ded ("usb: musb: unconditionally save and restore the context on suspend") in 3.14. Commit a1fc1920aaaa ("usb: musb: core: make sure musb is in RPM_ACTIVE on resume") later started setting the RPM status to active during resume, and this was also implicitly relying on the parent always being active. Since commit 71723f95463d ("PM / runtime: print error when activating a child to unactive parent") this now also results in the following warning: musb-hdrc musb-hdrc.0: runtime PM trying to activate child device musb-hdrc.0 but parent (47401400.usb) is not active This patch has been verified on 4.13-rc2, 4.12 and 4.9 using a BBB (the dsps glue would always be active also in 4.8). Fixes: c338412b5ded ("usb: musb: unconditionally save and restore the context on suspend") Fixes: a1fc1920aaaa ("usb: musb: core: make sure musb is in RPM_ACTIVE on resume") Fixes: 1c4d0b4e1806 ("usb: musb: Remove pm_runtime_set_irq_safe") Cc: stable # 4.8+ Cc: Alan Stern Cc: Daniel Mack Cc: Dave Gerlach Cc: Rafael J. Wysocki Cc: Sebastian Andrzej Siewior Cc: Tony Lindgren Signed-off-by: Johan Hovold Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 55aad53fb3f6c7c3c37e296a3bfdd96ca93f6a1f Author: Bin Liu Date: Thu Aug 24 11:38:35 2017 -0500 usb: musb: fix endpoint fifo allocation for 4KB fifo memory The fifo memory allocation in mode_2_cfg[] doesn't utilize all the 4KB memory. Increse some endpoint fifo buffers to fully use all the 4KB memory. Now we can support more webcam usecases on DA8xx. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1bff25eafa451c6210d6dfdff63e39c55c96a3e3 Author: Bin Liu Date: Thu Aug 24 11:38:34 2017 -0500 usb: musb: print an error message when high bandwidth is unsupported There are multiple places in usb core or controller driver which returns -EMSGSIZE when a class driver queueing urb failed, so the "Message too long" log doesn't help much for understanding the error. Let the musb driver to specifically print a error message when musb_urb_enqueue() returns -EMSGSIZE. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 4 ++++ 1 file changed, 4 insertions(+) commit a2f656060b88241a22afb5927e433a126f1e151e Author: Bin Liu Date: Thu Aug 24 11:38:33 2017 -0500 usb: musb: print an error message when hwep alloc failed Print an error message with qh maxpacket size and hb_mult when hwep allocation failed, so we have a better idea why it is failed. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0ccbadafb4130407dc594395577e9e40f5b03ad6 Author: Bin Liu Date: Thu Aug 24 11:38:32 2017 -0500 usb: musb: add helper function musb_ep_xfertype_string Add helper function musb_ep_xfertype_string() to return the ep transfer type string. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.h | 24 ++++++++++++++++++++++++ drivers/usb/musb/musb_gadget.c | 6 +----- 2 files changed, 25 insertions(+), 5 deletions(-) commit 17e15f6fbcf17bc5a9a86e3fe553264db2088221 Merge: e593bea dfebb5f Author: Greg Kroah-Hartman Date: Mon Aug 28 10:50:22 2017 +0200 Merge tag 'usb-ci-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Chipidea changes for v4.14-rc1 - Add chipidea support at Nvidia SoCs - Improvement for extcon support - Some code refines commit e8d2ed7db7c3cfbe92923c49cc5e830b0a0ee374 Author: Jisheng Zhang Date: Fri Aug 25 08:39:51 2017 +0800 Revert "staging: Fix build issues with new binder API" This reverts commit d0bdff0db809 ("staging: Fix build issues with new binder API"), because commit e38361d032f1 ("ARM: 8091/2: add get_user() support for 8 byte types") has added the 64bit __get_user_asm_* implementation. Signed-off-by: Jisheng Zhang Signed-off-by: Greg Kroah-Hartman drivers/android/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9920ca3b53728aaa836f138f74ebb37776b9f57 Author: Bhumika Goyal Date: Sat Aug 26 17:00:36 2017 +0530 staging: bcm2835-camera: make video_device const Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d162f80ab635ce8160a634317c7d1dae8e180d0b Author: Hans de Goede Date: Fri Aug 25 16:06:22 2017 +0200 staging: vboxvideo: Use fbdev helpers where possible This results in a nice cleanup, and fixes link errors when fbdev support is disabled. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/vboxvideo/vbox_fb.c | 150 +++--------------------------------- 1 file changed, 9 insertions(+), 141 deletions(-) commit e79e01254d02ff7c460851c773135db35bd2abb6 Author: Joe Perches Date: Fri Aug 25 12:11:28 2017 -0700 staging: typec: Add __printf verification Adding __printf verification can help avoid format/argument mismatches. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 5 +++++ 1 file changed, 5 insertions(+) commit b21bb6d483a6973f8fd034e3aebcce42e64c3463 Author: Alex Briskin Date: Fri Aug 25 19:25:06 2017 +0300 staging: unisys: visorinput: Add module_driver driver registration 1. Remove module_init()/module_exit() macroes and visorbus_register_visor_driver/visorbus_unregister_visor_driver functions. 2. Replace with a short module_driver macro Signed-off-by: Alex Briskin Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 8eff21bcc6baa1303241ad4c0c8087de0f5022ae Author: Dan Carpenter Date: Fri Aug 25 11:42:06 2017 +0300 staging: r8822be: remove some dead code "hdr" can't be NULL. We take skb->data which is non-NULL and add an offset to get "hdr". Signed-off-by: Dan Carpenter Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/trx.c | 7 ------- 1 file changed, 7 deletions(-) commit ee26e23616f0ea1c82516cfc5ae05e671597a546 Author: Cihangir Akturk Date: Fri Aug 25 11:21:02 2017 +0300 staging: pi433: fix interrupt handler signatures Remove "struct pt_regs *" parameter from interrupt handlers, since it is no longer passed to interrupt handlers. Also, convert return types to irqreturn_t. Additionally, move DIO_irq_handler variable into the setup_GPIO function, as it's not used outside of this function. Signed-off-by: Cihangir Akturk Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 19e60c42caeb29b4584dc46e873955059859ba84 Author: Shurong Zhang Date: Thu Aug 24 23:33:10 2017 +0800 staging: olpc_dcon: remove pointless debug printk in dcon_freeze_store() This printk doesn't really add anything worthwhile. Signed-off-by: Shurong Zhang Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 2 -- 1 file changed, 2 deletions(-) commit 1919b0562bfcd383caf87a13c346d65ce6d519aa Author: Colin Ian King Date: Wed Aug 23 16:07:10 2017 +0100 staging: r8822be: fix null pointer dereference with a null driver_adapter The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on the null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null driver_adapter is passed instead. Detected by CoverityScan, CID#1454613 ("Explicit null dereferenced") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver") Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ffabf50bd0038acc0e92fe78915610a7fded182 Author: Colin Ian King Date: Wed Aug 23 15:34:33 2017 +0100 staging: r8822be: fix memory leak of eeprom_map on error exit return A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx fails. Fix this by kfree'ing it before returning. Detected by CoverityScan, CID#1454569 ("Resource leak") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit faff950c80dde6738deb213eb8810c14266e5a42 Author: Dan Carpenter Date: Sat Aug 26 09:04:46 2017 +0300 staging: lustre: obdclass: fix checking for obd_init_checks() The obd_init_checks() function can either return -EOVERFLOW or -EINVAL but we accidentally ignore -EINVAL returns. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 092c3def24bb68a00ff58c76ed67b9ff448387ce Author: Dan Carpenter Date: Sat Aug 26 09:04:18 2017 +0300 staging: lustre: obdclass: return -EFAULT if copy_from_user() fails The copy_from_user() function returns the number of bytes which we weren't able to copy. We don't want to return that to the user but instead we want to return -EFAULT. Fixes: d7e09d0397e8 ("staging: add Lustre file system client support") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ca121c2f4be85f3fbf398583bc8c42a145e3533 Author: Dan Carpenter Date: Sat Aug 26 09:02:55 2017 +0300 staging: lustre: obdclass: return -EFAULT if copy_to_user() fails We recently changed from using obd_ioctl_popdata() to calling copy_to_user() directly. This if statement was supposed to be deleted but it was over looked. "err" is zero at this point so it means we return success. Fixes: b03679f6a41a ("staging: lustre: uapi: remove obd_ioctl_popdata() wrapper") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/class_obd.c | 1 - 1 file changed, 1 deletion(-) commit 9749c37275cb1f72d309e676642f45eb92724190 Merge: 4f9adc8 cc4a41f Author: Greg Kroah-Hartman Date: Mon Aug 28 10:19:01 2017 +0200 Merge 4.13-rc7 into char-misc-next We want the binder fix in here as well for testing and merge issues. Signed-off-by: Greg Kroah-Hartman commit 9c8e28df4457e6734237013adb577dbb265df15d Author: Himanshu Jha Date: Mon Aug 28 01:43:31 2017 +0530 staging: rtl8723bs: remove memset before memcpy calling memcpy immediately after memset with the same region of memory makes memset redundant. Build successfully. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 1 - drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 -- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 2 -- 3 files changed, 5 deletions(-) commit b55ade192b51c67db34b0a62c28fe294b2107fb7 Author: Larry Finger Date: Thu Aug 24 16:28:08 2017 -0500 staging: rtlwifi: Improve debugging by using debugfs The changes in this commit are also being sent to the main rtlwifi drivers in wireless-next; however, these changes will also be useful for any debugging of r8822be before it gets moved into the main tree. Use debugfs to dump register and btcoex status, and also write registers and h2c. We create topdir in /sys/kernel/debug/rtlwifi/, and use the MAC address as subdirectory with several entries to dump mac_reg, bb_reg, rf_reg etc. An example is /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0 This change permits examination of device registers in a dynamic manner, a feature not available with the current debug mechanism. We use seq_file to replace RT_TRACE to dump status, then we can use 'cat' to access btcoex's status through debugfs. (i.e. /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/btcoex) Other related changes are 1. implement btc_disp_dbg_msg() to access btcoex's common status. 2. remove obsolete field bt_exist 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: Greg Kroah-Hartman drivers/staging/rtlwifi/debug.c | 226 ++++++++++++++++++++++++---------------- 1 file changed, 135 insertions(+), 91 deletions(-) commit dc33bd4309d2e51950904e8d8f1d333a429c3371 Author: Dan Carpenter Date: Thu Aug 24 13:08:32 2017 +0300 staging: rtlwifi: check for array overflow Smatch is distrustful of the "capab" value and marks it as user controlled. I think it actually comes from the firmware? Anyway, I looked at other drivers and they added a bounds check and it seems like a harmless thing to have so I have added it here as well. Signed-off-by: Dan Carpenter Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 4 ++++ 1 file changed, 4 insertions(+) commit cec8bb22fb311033b0f30c5a18511de38b162a40 Author: Janani Sankara Babu Date: Thu Aug 24 14:44:48 2017 +0530 staging:rtl8188eu:core Fix add spaces around & This patch is created to solve the following coding style issue reported by the checkpatch script. CHECK: spaces preffered around that '&' (ctx:VxV) Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2a19de1f01445d3b96a6e2becf1693ec9b65952b Author: Janani Sankara Babu Date: Thu Aug 24 14:30:47 2017 +0530 staging:rtl8188eu:core Fix coding style Issues This patch solves the following warning shown by the checkpatch script WARNING: Comparisons should place the 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_ioctl_set.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1e13c7fb49ed11f598ce62077fae2286b385558f Author: Philipp Zabel Date: Wed Jul 19 17:26:17 2017 +0200 remoteproc: st: 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: Patrice Chotard Cc: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Andersson drivers/remoteproc/st_remoteproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5acbf7e5207090285340f3cc636129d13605e345 Author: Philipp Zabel Date: Wed Jul 19 17:26:16 2017 +0200 remoteproc: qcom: 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: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f5f98654a28eb86c97ff0d9b487d97cbc97ae855 Author: Philipp Zabel Date: Wed Jul 19 17:26:15 2017 +0200 remoteproc/keystone: 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: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org Acked-by: Suman Anna Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Andersson drivers/remoteproc/keystone_remoteproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9ea557ee9b9c4e0446851d955c1283bd76a9ce8 Author: Byungchul Park Date: Mon Aug 7 17:45:39 2017 +0900 fput: Don't reinvent the wheel but use existing llist API Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park Reviewed-by: Oleg Nesterov Signed-off-by: Al Viro fs/file_table.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 29785735788be2450c5f3b1fda61864aaeca38fd Author: Byungchul Park Date: Mon Aug 7 17:44:45 2017 +0900 namespace.c: Don't reinvent the wheel but use existing llist API Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park Signed-off-by: Al Viro fs/namespace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3eeb5156362bd756859e8c84ceb2c22e1d4ef652 Author: Vinod Koul Date: Sun Aug 27 16:55:32 2017 +0530 dmaengine: remove BUG_ON while registering devices DMAengine core has BUG_ON to check for mandatory operations and ones based on capabilities, but they use BUG_ON, so remove and move to error returns and logging the errors gracefully Acked-by: Dan Williams Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 101 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 22 deletions(-) commit 9e14de1077e9c34f141cf98bdba60cdd5193d962 Author: Chanwoo Choi Date: Thu Aug 24 10:42:48 2017 +0900 PM / devfreq: Fix memory leak when fail to register device When the devfreq_add_device fails to register deivce, the memory leak of devfreq instance happen. So, this patch fix the memory leak issue. Before freeing the devfreq instance checks whether devfreq instance is NULL or not because the device_unregister() frees the devfreq instance when jumping to the 'err_init'. It is to prevent the duplicate the kfee(devfreq). Cc: stable@vger.kernel.org Fixes: ac4b281176a5 ("PM / devfreq: fix duplicated kfree on devfreq pointer") Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b9c69e043266db96f21024d819be3f7a842fc8eb Author: Chanwoo Choi Date: Thu Aug 24 10:42:51 2017 +0900 PM / devfreq: Add dependency on PM_OPP The devfreq ues the OPP library to handle the voltage and frequency for the device basically. This patch adds the dependency on CONFIG_PM_OPP in order to prevent either the build break or the unknow behavior. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f75b0afa190d041c142bdc3f0c6022f61340b8a3 Author: Chanwoo Choi Date: Thu Aug 24 10:42:50 2017 +0900 PM / devfreq: Move private devfreq_update_stats() into devfreq THe devfreq_update_stats() updates the 'struct devfreq_dev_status' in order to get current status of devfreq device. It is only used for the governors. This patch moves the devfreq_update_stats() into devfreq directory. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/governor.h | 4 ++++ include/linux/devfreq.h | 13 ------------- 2 files changed, 4 insertions(+), 13 deletions(-) commit 8a1943492bd629b7eae64535a96fcb959a01bbd0 Author: Alexandre Belloni Date: Thu Aug 24 16:34:07 2017 +0200 m68knommu: remove dead code As CONFIG_RTC_DRV_M5441x doesn't exist because the driver never made it upstream, there is no device to register. Remove code that is never compiled and init_BSP() as it doesn't do anything. Signed-off-by: Alexandre Belloni Signed-off-by: Greg Ungerer arch/m68k/coldfire/m5441x.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) commit 94b282267c2f3af725b154c91275ed374c1f11de Author: Jonas Gorski Date: Tue Jul 18 12:17:25 2017 +0200 m68k: allow NULL clock for clk_get_rate Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: facdf0ed4f59 ("m68knommu: introduce basic clk infrastructure") Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Cc: linux-kernel@vger.kernel.org Reported-by: Mathias Kresin Signed-off-by: Jonas Gorski Signed-off-by: Greg Ungerer arch/m68k/coldfire/clk.c | 3 +++ 1 file changed, 3 insertions(+) commit e8305d408f7873f5a640c74f09d5665771acc369 Author: Rob Herring Date: Tue Jul 18 16:42:57 2017 -0500 PM / devfreq: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham Cc: Kyungmin Park Cc: linux-pm@vger.kernel.org drivers/devfreq/devfreq-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 901c5d2fbfcdc5d1d49a7a835b9ce9be5eee6393 Author: David Wu Date: Tue Aug 22 17:24:25 2017 +0800 ARM: dts: rk3228-evb: Fix the compiling error This patch solves the following error: arch/arm/boot/dts/rk3228-evb.dtb: ERROR (phandle_references): Reference to non-existent node or label "phy0" Fixess db40f15b53e4 ("ARM: dts: rk3228-evb: Enable the integrated PHY for gmac") Signed-off-by: David Wu Reported-by: Stephen Rothwell Signed-off-by: David S. Miller arch/arm/boot/dts/rk3228-evb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 742c9875759c1858c3312442a78a80f3e93d82c4 Author: Jacob Keller Date: Fri Jul 14 09:10:13 2017 -0400 i40e/i40evf: avoid dynamic ITR updates when polling or low packet rate The dynamic ITR algorithm depends on a calculation of usecs which assumes that the interrupts have been firing constantly at the interrupt throttle rate. This is not guaranteed because we could have a low packet rate, or have been polling in software. We'll estimate whether this is the case by using jiffies to determine if we've been too long. If the time difference of jiffies is larger we are guaranteed to have an incorrect calculation. If the time difference of jiffies is smaller we might have been polling some but the difference shouldn't affect the calculation too much. This ensures that we don't get stuck in BULK latency during certain rare situations where we receive bursts of packets that force us into NAPI polling. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 22 +++++++++++++++++----- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 22 +++++++++++++++++----- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 + 4 files changed, 36 insertions(+), 10 deletions(-) commit 0a2c7722be1705edca34458bd9de2f97188f9636 Author: Jacob Keller Date: Fri Jul 14 09:10:12 2017 -0400 i40e/i40evf: remove ULTRA latency mode Since commit c56625d59726 ("i40e/i40evf: change dynamic interrupt thresholds") a new higher latency ITR setting called I40E_ULTRA_LATENCY was added with a cryptic comment about how it was meant for adjusting Rx more aggressively when streaming small packets. This mode was attempting to calculate packets per second and then kick in when we have a huge number of small packets. Unfortunately, the ULTRA setting was kicking in for workloads it wasn't intended for including single-thread UDP_STREAM workloads. This wasn't caught for a variety of reasons. First, the ip_defrag routines were improved somewhat which makes the UDP_STREAM test still reasonable at 10GbE, even when dropped down to 8k interrupts a second. Additionally, some other obvious workloads appear to work fine, such as TCP_STREAM. The number 40k doesn't make sense for a number of reasons. First, we absolutely can do more than 40k packets per second. Second, we calculate the value inline in an integer, which sometimes can overflow resulting in using incorrect values. If we fix this overflow it makes it even more likely that we'll enter ULTRA mode which is the opposite of what we want. The ULTRA mode was added originally as a way to reduce CPU utilization during a small packet workload where we weren't keeping up anyways. It should never have been kicking in during these other workloads. Given the issues outlined above, let's remove the ULTRA latency mode. If necessary, a better solution to the CPU utilization issue for small packet workloads will be added in a future patch. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 17 ----------------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 - drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 17 ----------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 - 4 files changed, 36 deletions(-) commit 6d9777298b54bf1212fcaa6ee6679a430ceca452 Author: Jacob Keller Date: Fri Jul 14 09:10:11 2017 -0400 i40e: invert logic for checking incorrect cpu vs irq affinity In commit 96db776a3682 ("i40e/vf: fix interrupt affinity bug") we added some code to force exit of polling in case we did not have the correct CPU. This is important since it was possible for the IRQ affinity to be changed while the CPU is pegged at 100%. This can result in the polling routine being stuck on the wrong CPU until traffic finally stops. Unfortunately, the implementation, "if the CPU is correct, exit as normal, otherwise, fall-through to the end-polling exit" is incredibly confusing to reason about. In this case, the normal flow looks like the exception, while the exception actually occurs far away from the if statement and comment. We recently discovered and fixed a bug in this code because we were incorrectly initializing the affinity mask. Re-write the code so that the exceptional case is handled at the check, rather than having the logic be spread through the regular exit flow. This does end up with minor code duplication, but the resulting code is much easier to reason about. The new logic is identical, but inverted. If we are running on a CPU not in our affinity mask, we'll exit polling. However, the code flow is much easier to understand. Note that we don't actually have to check for MSI-X, because in the MSI case we'll only have one q_vector, but its default affinity mask should be correct as it includes all CPUs when it's initialized. Further, we could at some point add code to setup the notifier for the non-MSI-X case and enable this workaround for that case too, if desired, though there isn't much gain since its unlikely to be the common case. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 31 +++++++++++++-------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 30 +++++++++++++------------- 2 files changed, 30 insertions(+), 31 deletions(-) commit 759dc4a7e605e0dc21708b0a6e0816ed0ac82641 Author: Jacob Keller Date: Fri Jul 14 09:10:10 2017 -0400 i40e: initialize our affinity_mask based on cpu_possible_mask On older kernels a call to irq_set_affinity_hint does not guarantee that the IRQ affinity will be set. If nothing else on the system sets the IRQ affinity this can result in a bug in the i40e_napi_poll() routine where we notice that our interrupt fired on the "wrong" CPU according to our internal affinity_mask variable. This results in a bug where we continuously tell NAPI to stop polling to move the interrupt to a new CPU, but the CPU never changes because our affinity mask does not match the actual mask setup for the IRQ. The root problem is a mismatched affinity mask value. So lets initialize the value to cpu_possible_mask instead. This ensures that prior to the first time we get an IRQ affinity notification we'll have the mask set to include every possible CPU. We use cpu_possible_mask instead of cpu_online_mask since the former is almost certainly never going to change, while the later might change after we've made a copy. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++----- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 7 +++++-- 2 files changed, 12 insertions(+), 7 deletions(-) commit 9254c0e34e4253c41fdcd4670b754506ce20d3eb Author: Jacob Keller Date: Fri Jul 14 09:10:09 2017 -0400 i40e: move enabling icr0 into i40e_update_enable_itr If we don't have MSI-X enabled, we handle interrupts on all icr0. This is a special case, so let's move the conditional into i40e_update_enable_itr() in order to make i40e_napi_poll easier to read about. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ba4460d45a6ec04e29e55e6c97edc0e842c18999 Author: Jacob Keller Date: Fri Jul 14 09:10:08 2017 -0400 i40e: remove workaround for resetting XPS Since commit 3ffa037d7f78 ("i40e: Set XPS bit mask to zero in DCB mode") we've tried to reset the XPS settings by building a custom empty CPU mask. This workaround is not necessary because we're not really removing the XPS setting, but simply setting it so that no CPU is valid. Second, we shorten the code further by using zalloc_cpumask_var instead of a separate call to bitmap_zero(). 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, 5 insertions(+), 12 deletions(-) commit 19279235bea221798e3307a8bec2c02559cab0c5 Author: Carolyn Wyborny Date: Fri Jul 14 09:10:07 2017 -0400 i40e: Fix for unused value issue found by static analysis This patch fixes an issue where an error return value is set, but without an immediate exit, the value can be overwritten by the following code execution. The condition at this point is not fatal, so remove the error assignment and comment the intent for future code maintainers Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 68e49702a1216bbf098ebfff954eeb8f6fd96415 Author: Mariusz Stachura Date: Wed Jul 12 05:46:14 2017 -0400 i40e: 25G FEC status improvements This patch improves the system log message. The log message will be expanded to include the FEC mode the FW requested before link was established. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 8774370d268f2f43d8487d230e0d4fa1647759b3 Author: Mariusz Stachura Date: Mon Jul 17 22:09:45 2017 -0700 i40e/i40evf: support for VF VLAN tag stripping control This patch gives VF capability to control VLAN tag stripping via ethtool. As rx-vlan-offload was fixed before, now the VF is able to change it using "ethtool --offload rxvlan on/off" settings. Signed-off-by: Mariusz Stachura Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 60 ++++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40evf.h | 4 ++ drivers/net/ethernet/intel/i40evf/i40evf_main.c | 33 ++++++++++++ .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 40 +++++++++++++++ include/linux/avf/virtchnl.h | 5 ++ 5 files changed, 142 insertions(+) commit 8c9eb350aa7b66ab06f3e378dab3c7875a0bf83a Author: Jacob Keller Date: Wed Jul 12 05:46:12 2017 -0400 i40e: force VMDQ device name truncation In new versions of GCC since 7.x a new warning exists which warns when a string is truncated before all of the format can be completed. When we setup VMDQ netdev names we are copying a pre-existing interface name which could be up to 15 characters in length. Since we also add 4 bytes, v, the literal %, the d and a \0 null, we would overrun the available size unless snprintf truncated for us. The snprintf call will of course truncate on the end, so lets instead modify the code to force truncation of the copied netdev name by 4 characters, to create enough space for the 4 bytes we're adding. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 696ac80aa11fb80e641068123412cd397b460a0b Author: Jacob Keller Date: Wed Jul 12 05:46:11 2017 -0400 i40evf: fix possible snprintf truncation of q_vector->name The q_vector names are based on the interface name with a driver prefix, the type of q_vector setup, and the queue number. We previously set the size of this variable to IFNAMSIZ + 9, which is incorrect, because we actually include a minimum of 14 characters extra beyond the interface name size. New versions of GCC since 7 include a new warning that detects this possible truncation and complains. We can fix this by increasing the size in case our interface name is too large to avoid truncation. We don't need to go beyond 14 because the compiler is smart enough to realize our values can never exceed size of 1. We do go up to 15 here because possible future changes may increase the number of queues beyond one digit. While we are here, also change some variables to be unsigned (since they are never negative) and stop using an extra unnecessary %s format specifier. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 2 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) commit e53b382f3a207690fc0411a3b39fbd21d7470cfc Author: Akeem G Abodunrin Date: Wed Jul 12 05:46:10 2017 -0400 i40e: Use correct flag to enable egress traffic for unicast promisc Albeit, we usually set true promiscuous mode for both multicast and unicast at the same time - however, it is possible to set it individually, so using allmulti flag which is only for allmulticast might caused unwanted behavior in mirroring egress traffic promiscuous for unicast in VF. Signed-off-by: Akeem G Abodunrin 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 b5d5504aa1e961fc1f87ee7b092bf5ce1a7bf0de Author: Jacob Keller Date: Wed Jul 12 05:46:09 2017 -0400 i40e: prevent snprintf format specifier truncation Increase the size of the prefix buffer so that it can hold enough characters for every possible input. Although 20 is enough for all expected inputs, it is possible for the values to be larger than expected, resulting in a possibly truncated string. Additionally, lets use sizeof(prefix) in order to ensure we use the correct size if we need to change the array length in the future. New versions of GCC starting at 7 now include warnings to prevent truncation unless you handle the return code. At most 27 bytes can be written here, so lets just increase the buffer size even if for all expected hw->bus.* values we only needed 20. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++-- drivers/net/ethernet/intel/i40evf/i40e_common.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ed601f660131be6bb9a8a109b0f2bf031786100f Author: Mariusz Stachura Date: Wed Jul 12 05:46:08 2017 -0400 i40e: Store the requested FEC information Store information about FEC modes, that were requested. It will be used in printing link status information function and this way there is no need to call admin queue there. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++++ drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 + 3 files changed, 6 insertions(+) commit 167d52edc4991e81012ef571643d0307aa2bb916 Author: Sudheer Mogilappagari Date: Sun Aug 27 15:07:47 2017 -0700 i40e: Update state variable for adminq subtask During NVM update, state machine gets into unrecoverable state because i40e_clean_adminq_subtask can get scheduled after the admin queue command but before other state variables are updated. This causes incorrect input to i40e_nvmupd_check_wait_event and state transitions don't happen. This fix updates the state variables so that adminq_subtask will have accurate information whenever it gets scheduled. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9a45bf28bc39ff6ed45a008f7201289c8e9e60a6 Author: Fabio Estevam Date: Sun Aug 27 12:30:35 2017 -0400 media: max2175: Propagate the real error on devm_clk_get() failure When devm_clk_get() fails we should return the real error code instead of always returning -ENODEV. This allows defer probe to happen in the case the clock provider has not been enabled by the time max2175 driver gets probed. Signed-off-by: Fabio Estevam Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82cf5f4f6b08975bffddaa60e1d8ddcf46776494 Author: Matthias Schwarzott Date: Sun Aug 27 08:26:07 2017 -0400 media: cx23885: Explicitly list Hauppauge model numbers of HVR-4400 and HVR-5500 Add two new model numbers to suppress this message in kernel log: cx23885: cx23885[0]: warning: unknown hauppauge model #121029 Add these model numbers: * Model 121019 - WinTV-HVR4400 * Model 121029 - WinTV-HVR5500 For WinTV-HVR4400 the documentation and my hardware differ: Documentation says it supports DVB-S/S2 and DVB-T, but my hardware also supports DVB-C. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 61e220adf68553b6e5f61b9339ce9d3e92df27cb Author: Javier Martinez Canillas Date: Wed Aug 9 05:37:30 2017 -0400 media: i2c: adv748x: Export I2C device table entries as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, and the driver is only exporting the OF ID table entries as module aliases. So if the driver is built as module, autoload won't work since udev/kmod won't be able to match the registered OF device with its driver module. Before this patch: $ modinfo drivers/media/i2c/adv748x/adv748x.ko | grep alias alias: of:N*T*Cadi,adv7482C* alias: of:N*T*Cadi,adv7482 alias: of:N*T*Cadi,adv7481C* alias: of:N*T*Cadi,adv7481 After this patch: modinfo drivers/media/i2c/adv748x/adv748x.ko | grep alias alias: of:N*T*Cadi,adv7482C* alias: of:N*T*Cadi,adv7482 alias: of:N*T*Cadi,adv7481C* alias: of:N*T*Cadi,adv7481 alias: i2c:adv7482 alias: i2c:adv7481 Signed-off-by: Javier Martinez Canillas Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-core.c | 1 + 1 file changed, 1 insertion(+) commit 537b5c840c2f53991fcb00164ee09dfd8cfc2099 Author: Arnd Bergmann Date: Mon Aug 7 06:49:18 2017 -0400 media: staging/imx: always select VIDEOBUF2_DMA_CONTIG I ran into a rare build error during randconfig testing: drivers/staging/media/imx/imx-media-capture.o: In function `capture_stop_streaming': imx-media-capture.c:(.text+0x224): undefined reference to `vb2_buffer_done' drivers/staging/media/imx/imx-media-capture.o: In function `imx_media_capture_device_register': imx-media-capture.c:(.text+0xe60): undefined reference to `vb2_queue_init' imx-media-capture.c:(.text+0xfa0): undefined reference to `vb2_dma_contig_memops' While VIDEOBUF2_DMA_CONTIG was already selected by the camera driver, it wasn't necessarily there with just the base driver enabled. This moves the 'select' statement to the top-level option to make sure it's always available. Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface") Signed-off-by: Arnd Bergmann Reviewed-by: Steve Longerbeam Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 651ac1290f49b46fbd4277dcba8b4f27f941152f Author: Bhumika Goyal Date: Thu Aug 3 06:00:32 2017 -0400 media: dw2102: make dvb_usb_device_description structures const dvb_usb_device_description structures are only used during a copy operation. Therefore, declare them as const. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2fb0e047f98f4dc9320857e86076191188829bcd Author: Olli Salonen Date: Sun Jul 30 08:34:49 2017 -0400 media: mn88473: reset stream ID reg if no PLP given If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88473.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07d45a42fa21b54d83e563565699d25bde9f8cbe Author: Olli Salonen Date: Sun Jul 30 08:34:48 2017 -0400 media: mn88472: reset stream ID reg if no PLP given If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 450694c3b9f47b826a002089c463b9454b4bbe42 Author: Colin Ian King Date: Fri Jul 21 12:01:00 2017 -0400 media: dvb_frontend: initialize variable s with FE_NONE instead of 0 GIT_AUTHOR_NAME=Colin King GIT_AUTHOR_EMAIL=colin.king@canonical.com In a previous commit, we added FE_NONE as an unknown fe_status. Initialize variable s to FE_NONE instead of the more opaque value 0. Signed-off-by: Colin Ian King Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae64fe26acdc1837e4b1c87dc0e5187900a66708 Author: Colin Ian King Date: Fri Jul 21 12:12:38 2017 -0400 media: docs-next: update the fe_status documentation for FE_NONE Recently added FE_NONE to the enum fe_status, so update the documentation accordingly. [mchehab@s-opensource.com: change description to actually reflect what FE_NONE means: no lock of any kind] Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/fe-read-status.rst | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit a9e4998073d49a762a154a6b48a332ec6cb8e6b1 Author: Colin Ian King Date: Thu Jul 20 18:12:07 2017 -0400 media: dvb_frontend: ensure that inital front end status initialized The fe_status variable s is not initialized meaning it can have any random garbage status. This could be problematic if fe->ops.tune is false as s is not updated by the call to fe->ops.tune() and a subsequent check on the change status will using a garbage value. Fix this by adding FE_NONE to the enum fe_status and initializing s to this. Detected by CoverityScan, CID#112887 ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 2 +- include/uapi/linux/dvb/frontend.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 4d506758295a897acd81fe746370303c826da1b8 Author: Himanshu Jha Date: Sun Aug 27 02:17:04 2017 +0530 staging: rtl8723bs: remove null check before kfree Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 3687994a032115e6e4f89c5715304f5361d13cfb Author: Himanshu Jha Date: Sun Aug 27 18:53:56 2017 +0530 staging: r8822be: 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. Build and tested it. Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 -- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 5 ----- 2 files changed, 7 deletions(-) commit b9d7adc45d8837040a9f2cea584b4e0ef25ca271 Author: Alex Briskin Date: Sun Aug 27 08:22:10 2017 +0300 staging: most: hdm_usb: Driver registration with module_driver macro Register with module_driver macro instead of module_init/module_exit. Signed-off-by: Alex Briskin Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 83b2a3c2ab24561cb6de45e6b155e3a7c4c1c91b Author: Pierre-Hugues Husson Date: Sun Aug 27 15:58:31 2017 +0200 regulator: rn5t618: add RC5T619 PMIC support Extend the driver to support Ricoh RC5T619. Support the additional regulators and slightly different voltage ranges. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Mark Brown drivers/regulator/Kconfig | 4 ++-- drivers/regulator/rn5t618-regulator.c | 35 +++++++++++++++++++++++++++++++---- include/linux/mfd/rn5t618.h | 6 ++++++ 3 files changed, 39 insertions(+), 6 deletions(-) commit b505ae158309ab39c423b5a484031526ca4b7372 Author: Wolfram Sang Date: Sun Aug 13 17:34:31 2017 +0200 MAINTAINERS: drop entry for Blackfin I2C and Sonic's email Sonic's email address bounced, so remove it from MAINTAINERS. Since there was no I2C/TWI maintenance activity for 3 years now, drop that whole entry. Signed-off-by: Wolfram Sang MAINTAINERS | 9 --------- 1 file changed, 9 deletions(-) commit a1cc5a57e49e871ce5e610597af1bd6bea06cb5c Author: Wolfram Sang Date: Sun Aug 13 16:21:17 2017 +0200 blackfin: merge the two TWI header files There seems to be no need for separate ones since all users include both files anyhow. Merge them because include/linux/i2c is to be deprecated. Signed-off-by: Wolfram Sang arch/blackfin/include/asm/bfin_twi.h | 134 +++++++++++++++++++++++++++++++- arch/blackfin/kernel/debug-mmrs.c | 1 - drivers/i2c/busses/i2c-bfin-twi.c | 1 - include/linux/i2c/bfin_twi.h | 145 ----------------------------------- 4 files changed, 133 insertions(+), 148 deletions(-) commit cc209ac81cce0109e03af23f68ea06b549a4a2ed Author: Franklin S Cooper Jr Date: Wed Aug 16 17:17:13 2017 -0500 i2c: davinci: Preserve return value of devm_clk_get The i2c driver can run into driver dependency issues if its loaded before a clock driver it depends on. Therefore, EPROBE_DEFER may be returned by devm_clk_get and should be returned in probe to allow the kernel to reprobe the driver at a later time. This patch allows the error value returned by devm_clk_get to be passed through and not overwritten. Signed-off-by: Franklin S Cooper Jr Reviewed-by: Grygorii Strashko Acked-by: Sekhar Nori Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1304fe0916eeb67c78309e54eb819f8b4932ed33 Author: Jun Gao Date: Mon Aug 21 11:36:54 2017 +0800 i2c: mediatek: Add i2c compatible for MediaTek MT7622 Add i2c compatible for MT7622. Compare to MT8173 i2c controller, MT7622 limits message numbers to 255, and does not support 4GB DMA mode. Signed-off-by: Jun Gao Reviewed-by: Yingjoe Chen Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c50b2e9379df66eadc1b8b780dd4c287aba8da8f Author: Jun Gao Date: Mon Aug 21 11:36:53 2017 +0800 dt-bindings: i2c: Add MediaTek MT7622 i2c binding Add MT7622 i2c binding to binding file. Compare to MT8173 i2c controller, MT7622 limits message numbers to 255, and does not support 4GB DMA mode. Signed-off-by: Jun Gao Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 + 1 file changed, 1 insertion(+) commit 7a53df0357f5137359f01b24cdeb891e2e5cf998 Author: Jun Gao Date: Mon Aug 21 11:36:52 2017 +0800 dt-bindings: i2c: modify information formats Use common name MediaTek and modify the compatible information formats of all SoCs to the same. Signed-off-by: Jun Gao Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f3ee363fc16c56ec3d56e03948dc1f57f692c3f6 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:14 2017 -0400 media: dvbproperty.rst: minor editorial changes Do some minor editorial changes to make this chapter visually better, and the example a little bit clearer. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dvbproperty.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 1e1d9c9679e12d7e821f44ad7fddf22f49d44965 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:13 2017 -0400 media: dvbproperty.rst: improve notes about legacy frontend calls The description of the DVBv5 API was written a long time ago, where the API was still new, and there were not apps using it. Now that the API is stable and used by new applications, clarify that DVBv3 calls should not be used and why. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dvbproperty.rst | 39 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 14 deletions(-) commit e9dc0f827f53aafb578afd49897c96cfa0ef6275 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:12 2017 -0400 media: frontend.rst: mention MMT at the documentation The ATSC 3.0 uses MPEG Media Transport, with is not currently supported. Yet, we'll need to implement it sooner or later. So, mention about it at the specs. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/frontend.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2258ee775f962d0ee9fa4b9beb86be78177fe975 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:11 2017 -0400 media: frontend.rst: convert SEC note into footnote The description of what SEC means fits well as a footnote. That makes the need of saying that SEC is only for Satellite when it was mentioned, as the footnote already says that. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/frontend.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 3430b8e9aa9cc12bac8a7c2322579b4c3e7f62a7 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:10 2017 -0400 media: frontend.rst: fix supported delivery systems The introduction for the frontend chapter is not quite correct: - it tells that it supports only three types of delivery systems, in opposite to three *groups*; - It adds ISDB-C to the list of supported systems, but, this is not true. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/frontend.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e5707c9abfed046ffca52ad3a57baedf3a540b25 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:07:09 2017 -0400 media: dvb/intro.rst: Use verbatim font where needed The device numbering for DVB uses "M" and "N" as vars for the number of the device, but sometimes this is printed using normal font instead of verbatim. While here, remove an extra space after quotation marks. This is a minor cleanup with no changes at the text. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/intro.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ce0436789b006622fcb6baea0c29b99385612dd Merge: ed10940 fabf08a Author: Wolfram Sang Date: Sun Aug 27 15:14:49 2017 +0200 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.14 commit 1fbfd8c13a5706be7f082c6a6ad2efe6eb870ba7 Author: Markus Elfring Date: Sat Aug 26 16:22:13 2017 -0400 media: usbvision: Improve a size determination in usbvision_alloc() 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: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4cdcf9f1ef06033050bce86f4bdebddf1a05461 Author: Markus Elfring Date: Sat Aug 26 16:16:52 2017 -0400 media: usbvision: Adjust eight 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: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3e7e9755c956d7d1dbe763cc62145e67d5ca32a9 Author: Markus Elfring Date: Sat Aug 26 16:06:05 2017 -0400 media: usbvision: Delete an error message for a failed memory allocation in usbvision_probe() 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: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 1 - 1 file changed, 1 deletion(-) commit b104729e12aeecc818144d95e3d600c5f276a0c2 Author: Bhumika Goyal Date: Sat Aug 26 07:32:53 2017 -0400 media: Staging: media: radio-bcm2048: make video_device const Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96cc6956c6f097bae8f143f700a2795959b20a44 Author: Bhumika Goyal Date: Sat Aug 26 04:43:43 2017 -0400 media: radio: make video_device const Make these const as they are only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-tea5764.c | 2 +- drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/radio/si4713/radio-platform-si4713.c | 2 +- drivers/media/radio/wl128x/fmdrv_v4l2.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 47bdf7c6d607335f79deead3aba481c3baf04971 Author: Dan Carpenter Date: Sat Aug 26 02:18:41 2017 -0400 media: dib8000: remove some bogus dead code This function is broken. It sets the wrong front_end to NULL. But it's not used, so let's just delete it. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib8000.c | 18 ------------------ drivers/media/dvb-frontends/dib8000.h | 1 - 2 files changed, 19 deletions(-) commit 5af478341fa3b2c35a7062ad80581751bf388977 Author: Dan Carpenter Date: Sat Aug 26 02:18:16 2017 -0400 media: dib9000: delete some unused broken code The dib9000_remove_slave_frontend() function isn't used. I was reviewing it because my static checker claims it writes one element beyond the end of the array. That's a false positive. What it actually does is, if there are two or more front ends, then it prints a debug message to say that it removed the first one, stored in state->fe[1], and then it "removes" (scare quotes on purpose) the second one, stored in state->fe[2]. Deleting a front end from the middle is not really supported and breaks code like dib9000_release() which assumes the first NULL front end marks the end of the list. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib9000.c | 18 ------------------ drivers/media/dvb-frontends/dib9000.h | 7 ------- 2 files changed, 25 deletions(-) commit cd3bef00c2528666c30a71c0cc9175721db9f9d1 Author: Bhumika Goyal Date: Sat Aug 26 02:15:53 2017 -0400 media: staging: omap4iss: make v4l2_file_operations const Make this const as it is only stored in a const field of a video_device structure. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe9619a7b583b5d5d9d7fc64c83e498e8f814696 Author: Bhumika Goyal Date: Sat Aug 26 02:13:46 2017 -0400 media: usbtv: make v4l2_file_operations const Make this const as it is only stored in a const field of a video_device structure. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e66fb184e749d70358df0e849e5f6ca2b5dabfc9 Author: Bhumika Goyal Date: Sat Aug 26 02:02:08 2017 -0400 media: cx18: make v4l2_file_operations const Make this const as it is only stored in a const field of a video_device structure. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-streams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 868449422081f8f4b5d2969709c0aa9021184167 Author: Bhumika Goyal Date: Sat Aug 26 09:11:30 2017 -0400 media: usb: make video_device const Make these const as they are only used during a copy operation. Signed-off-by: Bhumika Goyal Acked-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/airspy/airspy.c | 2 +- drivers/media/usb/cpia2/cpia2_v4l.c | 2 +- drivers/media/usb/go7007/go7007-v4l2.c | 2 +- drivers/media/usb/hackrf/hackrf.c | 2 +- drivers/media/usb/msi2500/msi2500.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 +- drivers/media/usb/pwc/pwc-if.c | 2 +- drivers/media/usb/s2255/s2255drv.c | 2 +- drivers/media/usb/stk1160/stk1160-v4l.c | 2 +- drivers/media/usb/stkwebcam/stk-webcam.c | 2 +- drivers/media/usb/zr364xx/zr364xx.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 507e190946297c34a27d9366b0661d5e506fdd03 Author: Bhumika Goyal Date: Sat Aug 26 09:08:11 2017 -0400 media: pci: make video_device const Make these const as they are either used during a copy operation or passed to a const argument of the function cx88_vdev_init. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/dt3155/dt3155.c | 2 +- drivers/media/pci/meye/meye.c | 2 +- drivers/media/pci/saa7134/saa7134-empress.c | 2 +- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 2 +- drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +- drivers/media/pci/tw68/tw68-video.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 5303135c178c2f51044ddbc30037af9f030e6017 Author: Bhumika Goyal Date: Sat Aug 26 08:57:26 2017 -0400 media: platform: make video_device const Make these const as they are only used during a copy operation. Done using Coccinelle: @match disable optional_qualifier@ identifier s; @@ static struct video_device s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ identifier match.s; expression list[3] es; position ref.p; @@ cx88_vdev_init(es,&s@p,...) @good2@ 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 && !good2@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct video_device s; Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/fsl-viu.c | 2 +- drivers/media/platform/m2m-deinterlace.c | 2 +- drivers/media/platform/marvell-ccic/mcam-core.c | 2 +- drivers/media/platform/mx2_emmaprp.c | 2 +- drivers/media/platform/s5p-g2d/g2d.c | 2 +- drivers/media/platform/ti-vpe/cal.c | 2 +- drivers/media/platform/ti-vpe/vpe.c | 2 +- drivers/media/platform/via-camera.c | 2 +- drivers/media/platform/vim2m.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit 3db4b68e4693bc2421a0cbb7777bd7e60e412549 Author: Arnd Bergmann Date: Thu Aug 24 18:22:28 2017 -0400 media: au0828: fix RC_CORE dependency When RC_CORE is a loadable module, and au0828 is built-in including the RC support, we get a link error: drivers/media/usb/au0828/au0828-input.o: In function `au0828_get_key_au8522': au0828-input.c:(.text+0x474): undefined reference to `ir_raw_event_store' drivers/media/usb/au0828/au0828-input.o: In function `au0828_rc_register': au0828-input.c:(.text+0x7c8): undefined reference to `rc_allocate_device' au0828-input.c:(.text+0x8f8): undefined reference to `rc_register_device' This adds an additional dependency, similar to the one for em28xx, to ensure the broken configuration is never used. Fixes: 2fcfd317f66c ("[media] au0828: add support for IR on HVR-950Q") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4243e0457c9b1fe5e96fba19296469466eb24b1d Author: Christophe Jaillet Date: Sun Aug 27 08:46:50 2017 +0200 ASoC: davinci-mcasp: check memory allocation failure Check memory allocation failures and return -ENOMEM in such cases, as already done above for another memory allocation. This avoids NULL pointers dereference. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 87c014867181c3ec6e20bf3e71db37939d1782c7 Author: Gustavo A. R. Silva Date: Thu Aug 17 21:23:44 2017 -0400 media: dib0090: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1226795 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/dib0090.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit d4e192cc44914787cfe1231e2f1f9d0e8855f77b Author: Fabio Estevam Date: Thu Aug 17 17:12:05 2017 -0400 media: mx2_emmaprp: Check for platform_get_irq() error platform_get_irq() 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: Mauro Carvalho Chehab drivers/media/platform/mx2_emmaprp.c | 2 ++ 1 file changed, 2 insertions(+) commit 3cdb977ec878b23eb6e3380d262985b6a7c93c54 Author: Sakari Ailus Date: Wed Aug 16 08:20:18 2017 -0400 media: docs-rst: media: Document broken frame handling in stream stop for CSI-2 Some CSI-2 transmitters will finish an ongoing frame whereas others will not. Document that receiver drivers should not assume a particular behaviour but to work in both cases. Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/csi2.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c67215263e0b41d35067c77f9ac6cb2873317912 Author: Daniel Scheller Date: Mon Aug 14 13:39:37 2017 -0400 media: dvb-frontends/stv0367: remove QAM_AUTO from ddb_fe_ops Since the cab_* codepath doesn't recognize QAM_AUTO, don't announce that it is supported when it really isn't. Fixes ie. w_scan from unconditionally using QAM_AUTO on DVB-C scans. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d60908759c459774b0c0f637bdf19ddf1d137e3a Author: Cihangir Akturk Date: Sun Aug 13 14:39:38 2017 -0400 media: imx: use setup_timer Use setup_timer function instead of initializing timer with the function and data fields. Generated by: scripts/coccinelle/api/setup_timer.cocci. Signed-off-by: Cihangir Akturk Reviewed-by: Philipp Zabel Reviewed-by: Steve Longerbeam Tested-by: Steve Longerbeam Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 5 ++--- drivers/staging/media/imx/imx-media-csi.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 87e9201108b7d63cc4a50faca3baad48c4ec99f8 Author: Eugeniu Rosca Date: Sun Aug 13 06:06:29 2017 -0400 media: mxl111sf: Fix potential null pointer dereference Reviewing the delta between cppcheck output of v4.9.39 and v4.9.40 stable updates, I stumbled on the new warning: mxl111sf.c:80: (warning) Possible null pointer dereference: rbuf Since copying state->rcvbuf into rbuf is not needed in the 'write-only' scenario (i.e. calling mxl111sf_ctrl_msg() from mxl111sf_i2c_send_data() or from mxl111sf_write_reg()), bypass memcpy() in this case. Fixes: d90b336f3f65 ("[media] mxl111sf: Fix driver to use heap allocate buffers for USB messages") Signed-off-by: Eugeniu Rosca Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/mxl111sf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9793e1d214dc62a2685fa33dd0dc59b7f5e838b6 Author: Gustavo A. R. Silva Date: Sat Aug 12 13:30:59 2017 -0400 media: au0828: fix unbalanced lock/unlock in au0828_usb_probe Call mutex_unlock and free dev on failure. Reported-by: Julia Lawall Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 2 ++ 1 file changed, 2 insertions(+) commit be90cc8e4ac08bcb4ca517cd4ae25aa8441e2d88 Author: Anton Vasilyev Date: Thu Aug 10 11:27:44 2017 -0400 media: dvb-usb: Add memory free on error path in dw2102_probe() If dw2102_probe() fails on dvb_usb_device_init(), then memleak occurs. The patch adds deallocation to the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Reviewed-by: Enrico Mioso Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 39 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit e5d9ce4ddea934d1243747bfc142749ba6ff0c5a Author: Daniel Scheller Date: Wed Aug 23 12:10:02 2017 -0400 media: dvb-frontends/stv0910: change minsymrate to 100Ksyms/s The demodulator supports symbol rates as low as 100Ksyms/s - the demod setup in start() already handles such low symbol rates and reviewers of stv0910 equipped cards even found and tested transponders with SRs in that range. So, announce this in the fe_ops. Cc: Ralph Metzler Cc: Richard Scobie Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b64e4de39c791fa12cd7ec0307f01609d4b7f1b Author: Daniel Scheller Date: Wed Aug 23 12:10:01 2017 -0400 media: staging/cxd2099: Add module parameter for buffer mode The buffer mode of the cxd2099 driver requires more work regarding error handling and thus can cause issues in some cases, so disable it by default and make that mode of operation controllable by users via a module parameter (ie. 'modprobe cxd2099 buffermode=1' enables current behaviour). The upstream codebase also has the buffer mode disabled by default, so we should match this (but users still can test things out using the modparm). Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cxd2099/cxd2099.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit b5967860c6dae3fd64dd87371eef97e2f2e25490 Author: Daniel Scheller Date: Wed Aug 23 12:10:00 2017 -0400 media: ddbridge: fix sparse warnings Fix several drivers/media/pci/ddbridge/ddbridge-core.c: warning: symbol ... was not declared. Should it be static? drivers/media/pci/ddbridge/ddbridge-core.c: warning: Using plain integer as NULL pointer drivers/media/pci/ddbridge/ddbridge-io.h: warning: cast removes address space of expression drivers/media/pci/ddbridge/ddbridge-io.h: warning: incorrect type in argument 1 (different address spaces) at multiple places. Cc: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 26 +++++++++++++------------- drivers/media/pci/ddbridge/ddbridge-io.h | 12 ++++++------ 2 files changed, 19 insertions(+), 19 deletions(-) commit 1502efd2d5960c11593c5f002278cdc1e14c4520 Author: Daniel Scheller Date: Wed Aug 23 12:09:59 2017 -0400 media: ddbridge: fix teardown/deregistration order in ddb_input_detach() Brought to attention by Matthias Schwarzott by fixing possible use-after-free faults in some demod drivers: In ddb_input_detach(), the i2c_client is unregistered and removed before dvb frontends are unregistered and detached. While no use-after-free issue was observed so far, there is another issue with this: dvb->attached keeps track of the state of the input/output registration, and the i2c_client unregistration takes place only if everything was successful (dvb->attached == 0x31). If for some reason an error occurred during the frontend setup, that value stays at 0x20. In the following error handling and cleanup, ddb_input_detach() will skip down to that state, leaving the i2c_client registered, causing refcount issues. Fix this by moving the i2c_client deregistration down to case 0x20. Cc: Matthias Schwarzott Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6b852620fa75d3137929538b4a9aec2f953ff03c Author: Daniel Scheller Date: Wed Aug 23 12:09:58 2017 -0400 media: dvb-frontends/stv0910: release lock on gate_ctrl() failure Whenever write_reg() fails to open/close the demod's I2C gate, release the lock to avoid deadlocking situations. If I2c gate open failed, there's no need to hold a lock, and if close fails, the mutex_unlock() at the end of the function is never reached, leaving the mutex_lock in locked state, which in turn will cause potential for deadlocks. Thus, release the lock on failure. While we're touching gate_ctrl(), add some explanation about the need for locking and the shared I2C bus/gate. Cc: Julia Lawall Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0910.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit e59eb4adf0d79fe7692c08c07445ec9efc8ddc1c Author: Matthias Schwarzott Date: Wed Aug 2 12:46:00 2017 -0400 media: cx231xx: fix use-after-free when unregistering the i2c_client for the dvb demod Calling i2c_unregister_device for a demod driver destroys the frontend object. Later it is accessed by calling dvb_unregister_frontend and dvb_frontend_detach. In some cases this leads to a general protection fault with this callstack: dvb_unregister_frontend+0x25/0x50 [dvb_core] dvb_fini+0xdb/0x160 [cx231xx_dvb] cx231xx_unregister_extension+0x3d/0xb0 [cx231xx] cx231xx_dvb_unregister+0x10/0x809 [cx231xx_dvb] SyS_delete_module+0x18a/0x240 ? exit_to_usermode_loop+0x7b/0x80 entry_SYSCALL_64_fastpath+0x17/0x98 Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 412b16d623cf4fd794713f314db5aad10c46ad87 Author: Matthias Schwarzott Date: Wed Aug 2 12:45:59 2017 -0400 media: cx23885: Fix use-after-free when unregistering the i2c_client for the dvb demod Unregistering the i2c_client of the demod driver destroys the frontend object. Calling vb2_dvb_unregister_bus later accesses the frontend (and with the refcount_t) conversion the refcount_t code complains: kernel: ------------[ cut here ]------------ kernel: WARNING: CPU: 0 PID: 7883 at lib/refcount.c:128 refcount_sub_and_test+0x70/0x80 kernel: refcount_t: underflow; use-after-free. kernel: Modules linked in: bluetooth si2165(O) a8293(O) tda10071(O) tea5767(O) tuner(O) cx23885(O-) tda18271(O) videobuf2_dvb(O) videobuf2_dma_sg(O) m88ds3103(O) tveeprom(O) cx2341x(O) v4l2_common(O) dvb_core(O) rc_core(O) videobuf2_memops(O) videobuf2_v4l2(O) ums_realtek videobuf2_core(O) uas videodev(O) media(O) rtl8192cu i2c_mux usb_storage rtl_usb rtl8192c_common rtlwifi snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core x86_pkg_temp_thermal kvm_intel kvm irqbypass kernel: CPU: 0 PID: 7883 Comm: rmmod Tainted: G W O 4.11.3-gentoo #3 kernel: Hardware name: MEDION E2050 2391/H81H3-EM2, BIOS H81EM2W08.308 08/25/2014 kernel: Call Trace: kernel: dump_stack+0x4d/0x66 kernel: __warn+0xc6/0xe0 kernel: warn_slowpath_fmt+0x46/0x50 kernel: ? kobject_put+0x2f/0x60 kernel: refcount_sub_and_test+0x70/0x80 kernel: refcount_dec_and_test+0x11/0x20 kernel: dvb_unregister_frontend+0x42/0x60 [dvb_core] kernel: vb2_dvb_dealloc_frontends+0x9e/0x100 [videobuf2_dvb] kernel: vb2_dvb_unregister_bus+0xd/0x20 [videobuf2_dvb] kernel: cx23885_dvb_unregister+0xc3/0x110 [cx23885] kernel: cx23885_dev_unregister+0xea/0x150 [cx23885] kernel: cx23885_finidev+0x4f/0x70 [cx23885] kernel: pci_device_remove+0x34/0xb0 kernel: device_release_driver_internal+0x150/0x200 kernel: driver_detach+0x33/0x70 kernel: bus_remove_driver+0x47/0xa0 kernel: driver_unregister+0x27/0x50 kernel: pci_unregister_driver+0x34/0x90 kernel: cx23885_fini+0x10/0x12 [cx23885] kernel: SyS_delete_module+0x166/0x220 kernel: ? exit_to_usermode_loop+0x7b/0x80 kernel: entry_SYSCALL_64_fastpath+0x17/0x98 kernel: RIP: 0033:0x7f5901680b07 kernel: RSP: 002b:00007ffdf6cdb028 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 kernel: RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f5901680b07 kernel: RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000000001500258 kernel: RBP: 00000000015001f0 R08: 0000000000000000 R09: 1999999999999999 kernel: R10: 0000000000000884 R11: 0000000000000206 R12: 00007ffdf6cda010 kernel: R13: 0000000000000000 R14: 00000000015001f0 R15: 00000000014ff010 kernel: ---[ end trace c3a4659b89086061 ]--- Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0b56d1c8fd8991b0ae5255151c54ed20deb49a28 Author: Dan Carpenter Date: Thu Aug 10 08:23:34 2017 -0400 media: staging: atomisp: fix bounds checking in mt9m114_s_exposure_selection() These clamp_t() calls are no-ops because we don't save the results. It leads to an array out of bounds bug. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/mt9m114.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ceb25b3cf622f439f3c1c8e321fd5c35efe79e97 Author: Harold Gomez Date: Thu Aug 10 04:28:24 2017 -0400 media: staging: media: atomisp: ap1302: Remove FSF postal address Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. remove the unnecessary paragraph Signed-off-by: Harold Gomez Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ap1302.c | 5 ----- 1 file changed, 5 deletions(-) commit 4a3039e26eba2f25cf66cb0f4b30e17a6ab13511 Author: Arnd Bergmann Date: Mon Aug 7 06:51:47 2017 -0400 media: staging: atomisp: imx: remove dead code Making some functions 'static' has uncovered a few functions that have no caller, through the gcc warnings: atomisp/i2c/imx/imx.c:1111:12: error: 'imx_t_focus_vcm' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1103:12: error: 'imx_vcm_init' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1095:12: error: 'imx_vcm_power_down' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1087:12: error: 'imx_vcm_power_up' defined but not used [-Werror=unused-function] All four of these can be removed. Since they call indirect functions, I also looked at how those are used in turn: - The power_up/power_down callbacks are called from other functions and are still needed. - The t_focus_vcm callbacks pointers are completely unused and can be removed in both imx and ov8858. Some of the handlers are called directly and can now be marked static, the others are dummy implemntations that we can remove. - vcm_init is unused in imx, but dw9718_vcm_init is used in ov8858, but is not used in imx, so that one needs to stay around. The callback pointers in imx can be removed. Fixes: 9a5a6911aa3f ("staging: imx: fix non-static declarations") Signed-off-by: Arnd Bergmann Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/imx/ad5816g.c | 11 +------- drivers/staging/media/atomisp/i2c/imx/drv201.c | 11 +------- drivers/staging/media/atomisp/i2c/imx/dw9714.c | 14 +--------- drivers/staging/media/atomisp/i2c/imx/dw9718.c | 5 ---- drivers/staging/media/atomisp/i2c/imx/dw9719.c | 11 -------- drivers/staging/media/atomisp/i2c/imx/imx.c | 32 ----------------------- drivers/staging/media/atomisp/i2c/imx/imx.h | 29 -------------------- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- drivers/staging/media/atomisp/i2c/ov8858.h | 3 --- drivers/staging/media/atomisp/i2c/ov8858_btns.h | 3 --- 10 files changed, 4 insertions(+), 117 deletions(-) commit d726a0dcdfd8d65560f74b1d930f0d4793145afc Author: Sakari Ailus Date: Sun May 3 17:14:28 2015 -0400 media: arm: dts: omap3: N9/N950: Add AS3645A camera flash Add the as3645a flash controller to the DT source. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/omap3-n950-n9.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a56ba8fbcb55f3c5fc06f803469e7412f9e13c18 Author: Sakari Ailus Date: Sun Apr 26 17:56:54 2015 -0400 media: leds: as3645a: Add LED flash class driver Add a LED flash class driver for the as3654a flash controller. A V4L2 flash driver for it already exists (drivers/media/i2c/as3645a.c), and this driver is based on that. Signed-off-by: Sakari Ailus Acked-by: Jacek Anaszewski Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 6 + drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-as3645a.c | 763 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 778 insertions(+) commit 535a218d26bed1f565adbb6921226b213e4574d1 Author: Sakari Ailus Date: Sat Jun 6 07:10:59 2015 -0400 media: dt: bindings: Document DT bindings for Analog devices as3645a Document DT bindings for Analog Devices as3645a flash LED controller which also supports an indicator LED. Signed-off-by: Sakari Ailus Acked-by: Jacek Anaszewski Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/leds/ams,as3645a.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 40cefffd35f62618210d9d598f2c362095693ffd Author: Sakari Ailus Date: Wed Jul 19 18:38:36 2017 -0400 media: v4l2-flash-led-class: Document v4l2_flash_init() references The v4l2_flash_init() keeps a reference to the ops struct but not to the config struct (nor anything it contains). Document this. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-flash-led-class.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 503dd28af108888c505e8d6a86f4acf5eb20f3b7 Author: Sakari Ailus Date: Tue Jul 18 09:26:59 2017 -0400 media: v4l2-flash-led-class: Create separate sub-devices for indicators The V4L2 flash interface allows controlling multiple LEDs through a single sub-devices if, and only if, these LEDs are of different types. This approach scales badly for flash controllers that drive multiple flash LEDs or for LED specific associations. Essentially, the original assumption of a LED driver chip that drives a single flash LED and an indicator LED is no longer valid. Address the matter by registering one sub-device per LED. Signed-off-by: Sakari Ailus Reviewed-by: Jacek Anaszewski Acked-by: Pavel Machek Reviewed-by: Rui Miguel Silva (for greybus/light) Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/leds/leds-aat1290.c | 4 +- drivers/leds/leds-max77693.c | 4 +- drivers/media/v4l2-core/v4l2-flash-led-class.c | 113 +++++++++++++++---------- drivers/staging/greybus/light.c | 23 +++-- include/media/v4l2-flash-led-class.h | 40 ++++++--- 5 files changed, 117 insertions(+), 67 deletions(-) commit 428359cbfe086f43cb84b7ab7b48e7e7862700e2 Author: Rui Miguel Silva Date: Wed Aug 2 12:52:57 2017 -0400 media: staging: greybus: light: fix memory leak in v4l2 register We are allocating memory for the v4l2 flash configuration structure and leak it in the normal path. Just use the stack for this as we do not use it outside of this function. Also use IS_ERR() instead of IS_ERR_OR_NULL() to check return value from v4l2_flash_init() for it never returns NULL. Fixes: 2870b52bae4c ("greybus: lights: add lights implementation") Reported-by: Sakari Ailus Signed-off-by: Rui Miguel Silva Reviewed-by: Viresh Kumar Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/greybus/light.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit b7aaf8220aee35490751cd43861a3f61d63bda67 Author: Mauro Carvalho Chehab Date: Sat Aug 26 20:16:51 2017 -0400 media: uapi book: Fix a few Sphinx warnings Solve the following issues: Documentation/media/uapi/v4l/dev-sliced-vbi.rst:208: ERROR: Content block expected for the "raw" directive; none found. Documentation/media/uapi/v4l/dev-sliced-vbi.rst:216: ERROR: Content block expected for the "raw" directive; none found. Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst:645: ERROR: Content block expected for the "raw" directive; none found. Fixes: 70b074df4ed1 ("media: fix pdf build with Spinx 1.6") Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 72c901582c366da670181b9a13dea28d2078b905 Author: Christophe JAILLET Date: Thu Aug 24 01:58:39 2017 -0400 media: smiapp: check memory allocation failure Check memory allocation failure and return -ENOMEM in such a case. Signed-off-by: Christophe JAILLET Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 5160fb4bbd7add491b93fbf859cae5804f3de8bf Author: Arnd Bergmann Date: Wed Aug 23 09:30:19 2017 -0400 media: omap3isp: fix uninitialized variable use A debug printk statement was copied incorrectly into the new csi1 parser code and causes a warning there: drivers/media/platform/omap3isp/isp.c: In function 'isp_probe': include/linux/dynamic_debug.h:134:3: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized] Since there is only one lane, the index is never set. This changes the debug print to always print a zero instead, keeping the original format of the message. Fixes: 9211434bad30 ("media: omap3isp: Parse CSI1 configuration from the device tree") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70b074df4ed15e46c05ff6c177e694a3e3bbb56e Author: Mauro Carvalho Chehab Date: Sat Aug 26 05:28:26 2017 -0400 media: fix pdf build with Spinx 1.6 Sphinx 1.6 generates some LaTeX code before each table, starting its own environment before calling tabulary, apparently to improve table layout. The problem is that such environment is incompatible with adjustbox. While, in thesis, it should be possible to override it or to redefine tabulary, I was unable to produce such patch. Also, that would likely break on some future Sphinx version. So, instead, let's just change the font size on bigger tables, in order for them to fit into the page size. That is not as good as adjustbox, and require some manual work, but it should be less sensitive to Sphinx changes. While here, adjust a few other tables whose text is exceeding the cell boundaries. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-meta.rst | 2 + Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 23 ++- Documentation/media/uapi/v4l/dev-subdev.rst | 6 +- Documentation/media/uapi/v4l/extended-controls.rst | 6 +- Documentation/media/uapi/v4l/pixfmt-inzi.rst | 7 +- Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst | 30 ++-- Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 186 +++++++++++---------- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 50 +++--- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 7 +- Documentation/media/uapi/v4l/subdev-formats.rst | 17 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 +- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 2 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 2 + Documentation/media/uapi/v4l/vidioc-enumstd.rst | 9 +- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 4 +- .../media/uapi/v4l/vidioc-g-enc-index.rst | 2 +- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 2 +- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 6 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 4 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 2 +- 20 files changed, 202 insertions(+), 167 deletions(-) commit cc4bbaae54cbd6758038f2701cbf27ea222d0fb4 Author: Nikolay Borisov Date: Fri Aug 25 14:29:00 2017 +0300 swap: Remove obsolete sentence Currently there are no ->swap_{in,out} method in address_space_operations sructure definition, so the statement that anything is going to be proxied through them is wrong. Signed-off-by: Nikolay Borisov Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 95a40b86c420ce01c5eeb3330d3583ad5a55ed24 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:28:27 2017 -0300 sphinx.rst: Allow Sphinx version 1.6 at the docs Now that the PDF building issues with Sphinx 1.6 got fixed, update the documentation and scripts accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 646056ec3b8e6f952190a7b92bd8076e1d8c60d4 Author: Mauro Carvalho Chehab Date: Sat Aug 26 06:28:25 2017 -0300 docs-rst: fix verbatim font size on tables On Sphinx 1.6, fancy boxes are used for verbatim. The sphinx.sty sets verbatim font is always \small. That causes a problem inside tables that use smaller fonts, as it can be too big for the box. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e893ca25e9ea87aeb5400af58518111e42582fe Author: Mauro Carvalho Chehab Date: Sat Aug 26 15:34:37 2017 -0400 media: qcom: don't go past the array As reported by smatch: drivers/media/platform/qcom/camss-8x16/camss-vfe.c:1136 vfe_release_wm() error: buffer overflow 'vfe->wm_output_map' 7 <= 7 Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07aac5dc0d1b9ccbf031ef3195bf11f65f732583 Author: Mauro Carvalho Chehab Date: Sat Aug 26 15:33:25 2017 -0400 media: qcom: mark long long consts as such Fix those warnings when building on i386: drivers/media/platform/qcom/camss-8x16/camss-csiphy.c:333:22: warning: constant 1000000000000 is so big it is long long drivers/media/platform/qcom/camss-8x16/camss-csiphy.c:339:32: warning: constant 1000000000000 is so big it is long long Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-csiphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be744eec2327a19543215f08a7f763010ff8a39f Author: Todor Tomov Date: Fri Aug 18 04:16:34 2017 -0400 media: camss: Add abbreviations explanation Add abbreviations explanation at the top header blocks in source files. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-csid.c | 2 +- drivers/media/platform/qcom/camss-8x16/camss-csid.h | 2 +- drivers/media/platform/qcom/camss-8x16/camss-ispif.c | 2 +- drivers/media/platform/qcom/camss-8x16/camss-ispif.h | 2 +- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 55e6efe0d6379c179045081ef527c048f855053d Author: Todor Tomov Date: Fri Aug 18 04:16:33 2017 -0400 media: doc: media/v4l-drivers/qcom_camss: Add abbreviations explanation Add explanations for VFE's PIX and RDI interfaces. Signed-off-by: Todor Tomov Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/qcom_camss.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4dfbd3d90a641a5b606d31f84d8137d1be07c673 Author: Todor Tomov Date: Tue Aug 8 09:30:18 2017 -0400 media: doc: media/v4l-drivers: Qualcomm Camera Subsystem - Media graph Update the Qualcomm Camera Subsystem driver document with a media controller pipeline graph diagram. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/qcom_camss.rst | 27 ++++++-------- .../media/v4l-drivers/qcom_camss_graph.dot | 41 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) commit bbde31047434678f60820c7187ca7b7ed6e1809f Author: Todor Tomov Date: Tue Aug 8 09:30:17 2017 -0400 media: camss: Use optimal clock frequency rates Use standard V4L2 control to get pixel clock rate from a sensor linked in the media controller pipeline. Then calculate clock rates on CSIPHY, CSID and VFE to use the lowest possible. If the currnet pixel clock rate of the sensor cannot be read then use the highest possible. This case covers also the CSID test generator usage. If VFE is already powered on by another pipeline, check that the current VFE clock rate is high enough for the new pipeline. If not return busy error code as VFE clock rate cannot be changed while VFE is running. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-csid.c | 139 ++++++++-- .../media/platform/qcom/camss-8x16/camss-csid.h | 2 +- .../media/platform/qcom/camss-8x16/camss-csiphy.c | 113 ++++++-- .../media/platform/qcom/camss-8x16/camss-csiphy.h | 2 +- .../media/platform/qcom/camss-8x16/camss-ispif.c | 23 +- .../media/platform/qcom/camss-8x16/camss-ispif.h | 4 +- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 289 ++++++++++++++++++--- drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 2 +- drivers/media/platform/qcom/camss-8x16/camss.c | 67 ++++- drivers/media/platform/qcom/camss-8x16/camss.h | 15 +- 10 files changed, 547 insertions(+), 109 deletions(-) commit 474a53d6454fe3bc3dadabf77dca36896608e6a0 Author: Todor Tomov Date: Tue Aug 8 09:30:16 2017 -0400 media: doc: media/v4l-drivers: Qualcomm Camera Subsystem - Scale and crop Update the Qualcomm Camera Subsystem driver document for VFE scale and crop modules support. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/qcom_camss.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 4cd0e35425c772c7e3c9a5df61688e2feade56fb Author: Todor Tomov Date: Tue Aug 8 09:30:15 2017 -0400 media: camss: vfe: Configure crop module in VFE Add crop module configuration support to be able to apply cropping. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 41 +++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 780bf2fe36e028c1f2884b18c327bf5adc6f9e08 Author: Todor Tomov Date: Tue Aug 8 09:30:14 2017 -0400 media: camss: vfe: Add interface for cropping Extend selection ioctls to handle cropping configuration. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 191 ++++++++++++++++----- drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 1 + 2 files changed, 150 insertions(+), 42 deletions(-) commit cce91b14692cb4378fcb6fc32607f6219e1901b3 Author: Todor Tomov Date: Tue Aug 8 09:30:13 2017 -0400 media: camss: vfe: Configure scaler module in VFE Add scaler module configuration support to be able to apply scaling. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 59 +++++++++++++++++----- 1 file changed, 46 insertions(+), 13 deletions(-) commit 810b659880e016e4fcf09f2ef4db8528f25cfe48 Author: Todor Tomov Date: Tue Aug 8 09:30:12 2017 -0400 media: camss: vfe: Add interface for scaling Add compose selection ioctls to handle scaling configuration. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 184 ++++++++++++++++++++- drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 1 + 2 files changed, 183 insertions(+), 2 deletions(-) commit 7b4aff6f810421c44aac57f4e58898d307720e12 Author: Todor Tomov Date: Tue Aug 8 09:30:11 2017 -0400 media: camss: vfe: Support for frame padding Add support for horizontal and vertical frame padding. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 85 +++++++++++++++++----- .../media/platform/qcom/camss-8x16/camss-video.c | 53 ++++++++++---- .../media/platform/qcom/camss-8x16/camss-video.h | 2 + 3 files changed, 109 insertions(+), 31 deletions(-) commit d226efcfd0422a6f0194feb3affa34affd8998b7 Author: Todor Tomov Date: Tue Aug 8 09:30:10 2017 -0400 media: doc: media/v4l-drivers: Qualcomm Camera Subsystem - PIX Interface Update Qualcomm Camera Subsystem driver document for the PIX interface and format conversion support. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/qcom_camss.rst | 46 ++++++++++++++++++++------ 1 file changed, 36 insertions(+), 10 deletions(-) commit 9b5833f7b82f143162f3fe2af5ad05deb1338316 Author: Todor Tomov Date: Tue Aug 8 09:30:09 2017 -0400 media: camss: vfe: Format conversion support using PIX interface Use VFE PIX input interface and do format conversion in VFE. Supported input format is UYVY (single plane YUV 4:2:2) and its different sample order variations. Supported output formats are: - NV12/NV21 (two plane YUV 4:2:0) - NV16/NV61 (two plane YUV 4:2:2) Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-ispif.c | 2 + drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 705 ++++++++++++++++++--- drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 13 +- .../media/platform/qcom/camss-8x16/camss-video.c | 308 ++++++--- .../media/platform/qcom/camss-8x16/camss-video.h | 8 +- 5 files changed, 879 insertions(+), 157 deletions(-) commit f5c074947f56533c5ee41a6c5a6df4408eeafc35 Author: Todor Tomov Date: Tue Aug 8 09:30:08 2017 -0400 media: camss: Enable building Add Makefile and update platform/Kconfig and platform/Makefile to enable building of the QCom CAMSS driver. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 7 +++++++ drivers/media/platform/Makefile | 2 ++ drivers/media/platform/qcom/camss-8x16/Makefile | 11 +++++++++++ 3 files changed, 20 insertions(+) commit a1d7c116fcf77c710d2922a0b75067a30c69baed Author: Todor Tomov Date: Tue Aug 8 09:30:07 2017 -0400 media: camms: Add core files These files implement the platform driver code. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss.c | 699 +++++++++++++++++++++++++ drivers/media/platform/qcom/camss-8x16/camss.h | 97 ++++ 2 files changed, 796 insertions(+) commit 0ac2586c410fe00d58dd09bf270a22f25d5287b8 Author: Todor Tomov Date: Tue Aug 8 09:30:06 2017 -0400 media: camss: Add files which handle the video device nodes These files handle the video device nodes of the camss driver. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-video.c | 681 +++++++++++++++++++++ .../media/platform/qcom/camss-8x16/camss-video.h | 64 ++ 2 files changed, 745 insertions(+) commit 4c98a5f57f90f2c80db85187aac40d9805c2b554 Author: Todor Tomov Date: Tue Aug 8 09:30:05 2017 -0400 media: camss: Add VFE files These files control the VFE module. The VFE has different input interfaces. The PIX input interface feeds the input data to an image processing pipeline. Three RDI input interfaces bypass the image processing pipeline. The VFE also contains the AXI bus interface which writes the output data to memory. RDI interfaces are supported in this version. PIX interface is not supported. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 1906 ++++++++++++++++++++ drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 114 ++ 2 files changed, 2020 insertions(+) commit a3a2e82d28b232f1e4d704ddc5cfab7fdc85eab5 Author: Todor Tomov Date: Tue Aug 8 09:30:04 2017 -0400 media: camss: Add ISPIF files These files control the ISPIF module which handles the routing of the data streams from the CSIDs to the inputs of the VFE. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-ispif.c | 1164 ++++++++++++++++++++ .../media/platform/qcom/camss-8x16/camss-ispif.h | 85 ++ 2 files changed, 1249 insertions(+) commit 0c277ec68561f75cdbe75aa9a03cba286cec2797 Author: Todor Tomov Date: Tue Aug 8 09:30:03 2017 -0400 media: camss: Add CSID files These files control the CSID modules which handle the protocol and application layer of the CSI2 receivers. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-csid.c | 1003 ++++++++++++++++++++ .../media/platform/qcom/camss-8x16/camss-csid.h | 82 ++ 2 files changed, 1085 insertions(+) commit c94d21ffa8147073b3604e919bb61f29132235a5 Author: Todor Tomov Date: Tue Aug 8 09:30:02 2017 -0400 media: camss: Add CSIPHY files These files control the CSIPHY modules which are responsible for the physical layer of the CSI2 receivers. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/qcom/camss-8x16/camss-csiphy.c | 823 +++++++++++++++++++++ .../media/platform/qcom/camss-8x16/camss-csiphy.h | 77 ++ 2 files changed, 900 insertions(+) commit 15fc39aedf8e58654f954e1caf6b91680b1c4a77 Author: Todor Tomov Date: Tue Aug 8 09:30:01 2017 -0400 media: doc: media/v4l-drivers: Add Qualcomm Camera Subsystem driver document Add a document to describe Qualcomm Camera Subsystem driver. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/qcom_camss.rst | 124 +++++++++++++++++++++++++ 1 file changed, 124 insertions(+) commit 5c8cea420d7a378ec3c15a8aa0317d833aff88e7 Author: Todor Tomov Date: Tue Aug 8 09:30:00 2017 -0400 media: MAINTAINERS: Add Qualcomm Camera subsystem driver Add an entry for Qualcomm Camera subsystem driver. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit a379e3f61beefc65ab6efdc3af83f1cb82c8d884 Author: Todor Tomov Date: Tue Aug 8 09:29:59 2017 -0400 media: dt-bindings: media: Binding document for Qualcomm Camera subsystem driver Add DT binding document for Qualcomm Camera subsystem driver. CC: Rob Herring CC: devicetree@vger.kernel.org Signed-off-by: Todor Tomov Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/qcom,camss.txt | 197 +++++++++++++++++++++ 1 file changed, 197 insertions(+) commit d1b3437ed780cd97b4b1300db96a4d8faae6fea1 Author: Sakari Ailus Date: Tue Aug 8 09:29:58 2017 -0400 media: v4l: Add packed Bayer raw12 pixel formats These formats are compressed 12-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are V4L2_PIX_FMT_SBGGR12P V4L2_PIX_FMT_SGBRG12P V4L2_PIX_FMT_SGRBG12P V4L2_PIX_FMT_SRGGB12P Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1 + Documentation/media/uapi/v4l/pixfmt-srggb12p.rst | 103 +++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 12 ++- include/uapi/linux/videodev2.h | 5 ++ 4 files changed, 117 insertions(+), 4 deletions(-) commit 0de0ef6c3f2dd7e9965270683445917e10384ab0 Author: Gustavo A. R. Silva Date: Fri Aug 18 12:07:19 2017 -0400 media: venus: fix copy/paste error in return_buf_error Call function v4l2_m2m_dst_buf_remove_by_buf() instead of v4l2_m2m_src_buf_remove_by_buf() Addresses-Coverity-ID: 1415317 Signed-off-by: Gustavo A. R. Silva Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Cc: # for v4.13 Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 801e3659bf2c87c31b7024087d61e89e172b5651 Author: Colin Ian King Date: Tue Aug 22 10:21:20 2017 -0400 media: em28xx: calculate left volume level correctly The calculation of the left volume looks suspect, the value of 0x1f - ((val << 8) & 0x1f) is always 0x1f. The debug prior to the assignment of value[1] prints the left volume setting using the calculation 0x1f - (val >> 8) & 0x1f which looks correct to me. Fix the left volume by using the correct expression as used in the debug. Detected by CoverityScan, CID#146140 ("Wrong operator used") Fixes: 850d24a5a861 ("[media] em28xx-alsa: add mixer support for AC97 volume controls") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd9f8f750e238f8a6160fb053ae97016f6da1098 Author: Arvind Yadav Date: Tue Aug 22 08:56:35 2017 -0400 media: platform: constify videobuf_queue_ops structures videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpfe_capture.c | 2 +- drivers/media/platform/fsl-viu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 960c15dd171cf9f7172ecb785673b8265c567a53 Author: Arvind Yadav Date: Tue Aug 22 08:56:34 2017 -0400 media: pci: constify videobuf_queue_ops structures videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11c2078bbfc30ac3923b1435612cd91e35820176 Author: Arvind Yadav Date: Tue Aug 22 08:56:33 2017 -0400 media: saa7146: constify videobuf_queue_ops structures videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav 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 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 597c147ba950a3b0c4ecb0d1877668b66425c262 Author: Bhumika Goyal Date: Mon Aug 21 09:35:50 2017 -0400 media: cx18: Make i2c_algo_bit_data const Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d947447cf54a877ac81c4667706892c4b57a1d2 Author: Bhumika Goyal Date: Mon Aug 21 09:33:32 2017 -0400 media: bt8xx: Make i2c_algo_bit_data const Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d3717a12ce4063c7f35839d902e608bbf3ea2c Author: Stanimir Varbanov Date: Fri Aug 18 10:16:01 2017 -0400 media: venus: venc: set correct resolution on compressed stream This change the alignment restriction for output type of buffers only, also set corect input resolution and fill bidirectional vb2 queue flag in order to map output type buffers read/write. The last is needed by encoder firmware to add padding at the bottom of output (input buffers). Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5b6f9abe5a49df81737fbbfba890ee5b093f8168 Author: Stanimir Varbanov Date: Mon Aug 21 07:34:10 2017 -0400 media: vb2: add bidirectional flag in vb2_queue This change is intended to give to the v4l2 drivers a choice to change the default behavior of the v4l2-core DMA mapping direction from DMA_TO/FROM_DEVICE (depending on the buffer type CAPTURE or OUTPUT) to DMA_BIDIRECTIONAL during queue_init time. Initially the issue with DMA mapping direction has been found in Venus encoder driver where the hardware (firmware side) adds few lines padding on bottom of the image buffer, and the consequence is triggering of IOMMU protection faults. This will help supporting venus encoder (and probably other drivers in the future) which wants to map output type of buffers as read/write. Signed-off-by: Stanimir Varbanov Acked-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 17 ++++++++--------- drivers/media/v4l2-core/videobuf2-dma-contig.c | 3 ++- drivers/media/v4l2-core/videobuf2-dma-sg.c | 6 ++++-- drivers/media/v4l2-core/videobuf2-vmalloc.c | 6 ++++-- include/media/videobuf2-core.h | 13 +++++++++++++ 5 files changed, 31 insertions(+), 14 deletions(-) commit d533d5010ec373ea06ae4f253d7d69deb3fe0cfd Author: Hugues Fruchet Date: Tue Aug 22 10:41:11 2017 -0400 media: stm32-dcmi: g_/s_selection crop support Implements g_/s_selection crop support by using DCMI crop hardware feature. User can first get the maximum supported resolution of the sensor by calling g_selection(V4L2_SEL_TGT_CROP_BOUNDS). Then user call to s_selection(V4L2_SEL_TGT_CROP) will reset sensor to its maximum resolution and crop request is saved for later usage in s_fmt(). Next call to s_fmt() will check if sensor can do frame size request with crop request. If sensor supports only discrete frame sizes, the frame size which is larger than user request is selected in order to be able to match the crop request. Then s_fmt() resolution user request is adjusted to match crop request resolution. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 374 +++++++++++++++++++++++++++++- 1 file changed, 370 insertions(+), 4 deletions(-) commit 38e423ee00b6138f8fafba60f2b6f4f3ebfeb1fa Author: Hugues Fruchet Date: Tue Aug 22 10:41:10 2017 -0400 media: stm32-dcmi: cleanup variable/fields namings Uniformize "pixfmt" variables to "pix". Change "current_fmt" & "dcmi_fmt" variables to variables with "sd_" prefix to explicitly refer to subdev format. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 103 ++++++++++++++++-------------- 1 file changed, 54 insertions(+), 49 deletions(-) commit 7b7805e58c0095017e3dce939f1af080fc90db79 Author: Hugues Fruchet Date: Tue Aug 22 10:41:09 2017 -0400 media: stm32-dcmi: revisit control register handling Simplify bits handling of DCMI_CR register. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 134e15e6815921cb6db4fa6a0453df3441989fad Author: Hugues Fruchet Date: Tue Aug 22 10:41:08 2017 -0400 media: stm32-dcmi: catch dma submission error Test cookie return by dmaengine_submit() and return error if any. Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit ad3cdf3e1f37299fc1422f7828243635249a3dde Author: Sakari Ailus Date: Mon Aug 14 06:43:07 2017 -0400 media: v4l: fwnode: Use a less clash-prone name for MAX_DATA_LANES macro Avoid using a generic name such as MAX_DATA_LANES in a header file widely included in drivers. Instead, call it V4L2_FWNODE_CSI2_MAX_DATA_LANES. Fixes: 4ee236219f6d ("media: v4l2-fwnode: suppress a warning at OF parsing logic") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 5 +++-- include/media/v4l2-fwnode.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 1526c704b3c32640b5e6cdc1662b0698603e9d4f Author: Sakari Ailus Date: Mon Aug 14 06:22:14 2017 -0400 media: v4l: fwnode: The clock lane is the first lane in lane_polarities The clock lane is the first lane in the lane_polarities array. Reflect this consistently by putting the number of data lanes after the number of clock lanes. Fixes: 4ee236219f6d ("media: v4l2-fwnode: suppress a warning at OF parsing logic") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 2 +- include/media/v4l2-fwnode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b24f021579c5384ea9ba22decec84e757d5fbd09 Author: Sakari Ailus Date: Mon Aug 14 06:15:21 2017 -0400 media: v4l: fwnode: Fix lane-polarities property parsing fwnode_property_read_u32_array() only returns the number of array elements if the array argument is NULL. The assumption that it always did so lead to lane-polarities properties never being read. Fixes: 4ee236219f6d ("media: v4l2-fwnode: suppress a warning at OF parsing logic") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f758eb2363ecf91adf17dbd1864691819dd3c060 Author: Sakari Ailus Date: Tue Aug 15 05:08:52 2017 -0400 media: dw9714: Remove ACPI match tables, convert to use probe_new The ACPI match table is empty. Remove it. Also convert the drive to use probe_new callback in struct i2c_driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/dw9714.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit c2bc8b06ca48e72c6a9bf0de65f9a636f714af7a Author: Sakari Ailus Date: Tue Aug 15 05:06:59 2017 -0400 media: dw9714: Add Devicetree support Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/dw9714.c | 7 +++++++ 1 file changed, 7 insertions(+) commit aece98a912d92444ea9da03b04269407d1308f1f Author: Sakari Ailus Date: Tue Aug 15 05:03:39 2017 -0400 media: dt-bindings: Add bindings for Dongwoon DW9714 voice coil Dongwoon DW9714 is a voice coil lens driver. Also add a vendor prefix for Dongwoon for one did not exist previously. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt | 9 +++++++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 10 insertions(+) commit b1540ceaed8d62270490d4efd35adcc5ba2d595e Author: Stanimir Varbanov Date: Fri Aug 18 10:16:06 2017 -0400 media: venus: venc: drop VP9 codec support No one of the supported Venus version has implemented VP9 codec for enconding, so drop it from the list of codecs. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc.c | 4 ---- 1 file changed, 4 deletions(-) commit 29f0133ec66c3e49a80fdf362be71482d45684f3 Author: Stanimir Varbanov Date: Fri Aug 18 10:16:05 2017 -0400 media: venus: use helper function to check supported codecs Use the helper function in decoder and encoder find_format to runtime check supported codecs. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 24 +++++++++++++++++------- drivers/media/platform/qcom/venus/venc.c | 28 +++++++++++++++++++--------- 2 files changed, 36 insertions(+), 16 deletions(-) commit d8db57c26f1c9bf7de3f6bf462a78cc555d9d390 Author: Stanimir Varbanov Date: Fri Aug 18 10:16:04 2017 -0400 media: venus: add helper to check supported codecs Adds a helper function to runtime check supported encoder and decoder codecs depending on venus version and platform. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 49 +++++++++++++++++++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 1 + 2 files changed, 50 insertions(+) commit 5c2c165905026a8ec2779710e5fe63d8086587e1 Author: Stanimir Varbanov Date: Fri Aug 18 10:16:03 2017 -0400 media: venus: fill missing video_device name This fills missing (forgotten) video device name with appropriate string so that udev can distinguishes between decoder and encoder devices. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 1 + drivers/media/platform/qcom/venus/venc.c | 1 + 2 files changed, 2 insertions(+) commit 62d625c93ca1f6d3a36ea803a37f34b7d5ae82ce Author: Stanimir Varbanov Date: Fri Aug 18 10:16:02 2017 -0400 media: venus: mark venc and vdec PM functions as __maybe_unused Without PM support gcc could warns about unused functions, thus mark runtime_suspend/resume as __maybe_unused. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/vdec.c | 6 ++---- drivers/media/platform/qcom/venus/venc.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit e0ee62c49fdd8f6780abcc980c4b24e05e3a0af3 Author: Arvind Yadav Date: Sat Aug 19 15:20:47 2017 -0400 media: ths8200: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ths8200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f8dfed83c825b510c6912a3c2e6540ae8e9f27b Author: Arvind Yadav Date: Sat Aug 19 15:20:46 2017 -0400 media: tc358743: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e749d1f1cebb2ad9af01e744bad1d16194146fbd Author: Arvind Yadav Date: Sat Aug 19 15:20:45 2017 -0400 media: saa7127: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/saa7127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77c6cba38575beba4247c2b3f39cb562fc3a51d1 Author: Arvind Yadav Date: Sat Aug 19 15:20:44 2017 -0400 media: adv7842: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bd7466bf73a3b2e7a0308eb510a9746a84ab7dd Author: Arvind Yadav Date: Sat Aug 19 15:20:43 2017 -0400 media: adv7511: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7511.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99b1ddf94d2b25fdfac5d0989a08228870bd4e00 Author: Arvind Yadav Date: Sat Aug 19 15:20:42 2017 -0400 media: ad9389b: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad9389b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6843868fd092406b544064e4db1ca902af13cf48 Author: Bhumika Goyal Date: Sat Aug 19 06:34:15 2017 -0400 media: usb: make i2c_adapter const Make these const as they are only used in a copy operation. Done using Coccinelle Signed-off-by: Bhumika Goyal Acked-by: Mike Isely Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-i2c.c | 2 +- drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +- drivers/media/usb/stk1160/stk1160-i2c.c | 2 +- drivers/media/usb/usbvision/usbvision-i2c.c | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) commit 9a5c43b3d22f17125044f17256a125d2bd13559d Author: Bhumika Goyal Date: Sat Aug 19 06:34:14 2017 -0400 media: radio-usb-si4713: make i2c_adapter const Make this const as it is 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/radio/si4713/radio-usb-si4713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5fffebe6d39cf8ad0a7628822d9c3a519523135 Author: Bhumika Goyal Date: Sat Aug 19 06:34:13 2017 -0400 media: pci: make i2c_adapter 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/cobalt/cobalt-i2c.c | 2 +- drivers/media/pci/cx18/cx18-i2c.c | 2 +- drivers/media/pci/cx23885/cx23885-i2c.c | 2 +- drivers/media/pci/cx25821/cx25821-i2c.c | 2 +- drivers/media/pci/ivtv/ivtv-i2c.c | 4 ++-- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- drivers/media/pci/saa7134/saa7134-i2c.c | 2 +- drivers/media/pci/saa7164/saa7164-i2c.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit ea9b0f31c1acd35b6905dbfa7dd19c01592470f6 Author: Bhumika Goyal Date: Sat Aug 19 04:22:14 2017 -0400 media: i2c: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/mt9t031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d746cf89b4b7e60f5b7239b3ef8e8af01d11f604 Author: Bhumika Goyal Date: Fri Aug 18 12:06:58 2017 -0400 media: usb: make i2c_algorithm const Make these const as they are only used in a copy operation or are stored in the algo field of i2c_adapter structure, which is const. Signed-off-by: Bhumika Goyal Acked-by: Mike Isely Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-i2c.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 43298e768cfc2b9c810e55425e948bf6f767cc75 Author: Hans Verkuil Date: Fri Aug 4 06:41:55 2017 -0400 media: stm32-cec: use CEC_CAP_DEFAULTS Use the new CEC_CAP_DEFAULTS define in this driver. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-cec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c06f6be6a7fd894204dea60f1d5fdb243f9a5138 Author: Hans Verkuil Date: Fri Aug 4 06:41:54 2017 -0400 media: stih-cec: use CEC_CAP_DEFAULTS Use the new CEC_CAP_DEFAULTS define in this driver. This also adds the CEC_CAP_RC capability which was missing here (and this is also the reason for this new define, to avoid missing such capabilities). Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/cec/stih-cec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b0704f8541af36b21483bc1ea639da248ff429d7 Author: Hans Verkuil Date: Sun Aug 20 07:39:42 2017 -0400 media: vivid: fix incorrect HDMI input/output CEC logging Only the first HDMI input has a CEC adapter, so just report 'HDMI 0' as the HDMI input name. For the HDMI outputs use bus_cnt instead of i as the output number. The HDMI name now corresponds to what 'v4l2-ctl --list-outputs' reports. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4f88b0de7803240fa315025ef5ea2d85b2ca16bd Author: Hans Verkuil Date: Sun Aug 20 07:15:25 2017 -0400 media: vivid: add CEC pin monitoring emulation Add support to emulate CEC pin monitoring. There are few hardware devices that support this, so being able to emulate it here helps developing software for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-cec.c | 65 +++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit 28e11b15b6606c3308f87f7c9c4c9e404eddde6d Author: Hans Verkuil Date: Sun Aug 20 06:53:10 2017 -0400 media: cec: replace pin->cur_value by adap->cec_pin_is_high The current CEC pin value (0 or 1) was part of the cec_pin struct, but that assumes that CEC pin monitoring can only be used with a driver that uses the low-level CEC pin framework. But hardware that has both a high-level API and can monitor the CEC pin at low-level at the same time does not need to depend on the cec pin framework. To support such devices remove the cur_value field from struct cec_pin and add a cec_pin_is_high field to cec_adapter. This also makes it possible to drop the '#ifdef CONFIG_CEC_PIN' in cec-api.c. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-api.c | 6 ++---- drivers/media/cec/cec-core.c | 1 + drivers/media/cec/cec-pin.c | 5 ++--- include/media/cec-pin.h | 1 - include/media/cec.h | 1 + 5 files changed, 6 insertions(+), 8 deletions(-) commit 152b0a9a3d62f90e6784a5d35ffc3f552f1c2c54 Author: Hans Verkuil Date: Sun Aug 20 07:41:41 2017 -0400 media: cec: ensure that adap_enable(false) is called from cec_delete_adapter() When the adapter is removed the cec_delete_adapter() call attempts to set the physical address to INVALID by calling __cec_s_phys_addr() and so disabling the adapter. However, __cec_s_phys_addr checks if the device node was unregistered and just returns in that case. This means that the adap_enable callback is never called with 'false' to disable the CEC adapter. Most drivers don't care, but some need to do cleanup here. Change the test so the adapter is correctly disabled, even when the device node is unregistered. Signed-off-by: Hans Verkuil Reported-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ea2800ddb20d6e66042051a61f66e6bea4fa0db7 Author: Brijesh Singh Date: Fri Aug 25 15:55:40 2017 -0500 kvm/x86: Avoid clearing the C-bit in rsvd_bits() The following commit: d0ec49d4de90 ("kvm/x86/svm: Support Secure Memory Encryption within KVM") uses __sme_clr() to remove the C-bit in rsvd_bits(). rsvd_bits() is just a simple function to return some 1 bits. Applying a mask based on properties of the host MMU is incorrect. Additionally, the masks computed by __reset_rsvds_bits_mask also apply to guest page tables, where the C bit is reserved since we don't emulate SME. The fix is to clear the C-bit from rsvd_bits_mask array after it has been populated from __reset_rsvds_bits_mask() Suggested-by: Paolo Bonzini Signed-off-by: Brijesh Singh Acked-by: Paolo Bonzini Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: paolo.bonzini@gmail.com Fixes: d0ec49d ("kvm/x86/svm: Support Secure Memory Encryption within KVM") Link: http://lkml.kernel.org/r/20170825205540.123531-1-brijesh.singh@amd.com Signed-off-by: Ingo Molnar arch/x86/kvm/mmu.c | 30 +++++++++++++++++++++++++++--- arch/x86/kvm/mmu.h | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) commit 6de47a5e371f75f80544986e6c9636211a2ae8af Author: Jan Beulich Date: Fri Aug 25 16:50:19 2017 +0100 efi/bgrt: Use efi_mem_type() Avoid effectively open-coding the function. Signed-off-by: Jan Beulich Signed-off-by: Ard Biesheuvel Cc: Jan Beulich Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170825155019.6740-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi-bgrt.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 23f0571c9fd184504f7a2f27011750e0ad99bb73 Author: Jan Beulich Date: Fri Aug 25 16:50:18 2017 +0100 efi: Move efi_mem_type() to common code This follows efi_mem_attributes(), as it's similarly generic. Drop __weak from that one though (and don't introduce it for efi_mem_type() in the first place) to make clear that other overrides to these functions are really not intended. Signed-off-by: Jan Beulich Signed-off-by: Ard Biesheuvel Cc: Jan Beulich Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170825155019.6740-5-ard.biesheuvel@linaro.org [ Resolved conflict with: f99afd08a45f: (efi: Update efi_mem_type() to return an error rather than 0) ] Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi.c | 19 ------------------- drivers/firmware/efi/efi.c | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 25 deletions(-) commit 68ee51cb773bed81f9ff7144eca0a08550e1f9a1 Author: Colin Ian King Date: Fri Aug 25 16:50:17 2017 +0100 efi/reboot: Make function pointer orig_pm_power_off static The function pointer orig_pm_power_off is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'orig_pm_power_off' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170825155019.6740-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ceb5fd4e921506e86208b82fca716a2c3aad59 Author: Ard Biesheuvel Date: Fri Aug 25 16:50:16 2017 +0100 efi/random: Increase size of firmware supplied randomness The crng code requires at least 64 bytes (2 * CHACHA20_BLOCK_SIZE) to complete the fast boot-time init, so provide that many bytes when invoking UEFI protocols to seed the entropy pool. Also, add a notice so we can tell from the boot log when the seeding actually took place. Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170825155019.6740-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi.c | 3 ++- drivers/firmware/efi/libstub/random.c | 10 ++++------ include/linux/efi.h | 2 ++ 3 files changed, 8 insertions(+), 7 deletions(-) commit ccc829ba3624beb9a703fc995d016b836d9eead8 Author: Matthew Garrett Date: Fri Aug 25 16:50:15 2017 +0100 efi/libstub: Enable reset attack mitigation If a machine is reset while secrets are present in RAM, it may be possible for code executed after the reboot to extract those secrets from untouched memory. The Trusted Computing Group specified a mechanism for requesting that the firmware clear all RAM on reset before booting another OS. This is done by setting the MemoryOverwriteRequestControl variable at startup. If userspace can ensure that all secrets are removed as part of a controlled shutdown, it can reset this variable to 0 before triggering a hardware reboot. Signed-off-by: Matthew Garrett Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170825155019.6740-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 3 ++ drivers/firmware/efi/Kconfig | 10 ++++++ drivers/firmware/efi/libstub/Makefile | 1 + drivers/firmware/efi/libstub/arm-stub.c | 3 ++ drivers/firmware/efi/libstub/tpm.c | 58 +++++++++++++++++++++++++++++++++ include/linux/efi.h | 7 ++++ 6 files changed, 82 insertions(+) commit 3cb9bc85029f2ceb7a5babadcab445c7cb861da8 Merge: f1a5b53 413d63d71b Author: Ingo Molnar Date: Sat Aug 26 09:20:01 2017 +0200 Merge branch 'x86/mm' into efi/core, to pick up dependencies Signed-off-by: Ingo Molnar commit 413d63d71b222108d19703f3fd5cf9108652a730 Merge: d6c8103 90a6cd5 Author: Ingo Molnar Date: Sat Aug 26 09:19:13 2017 +0200 Merge branch 'linus' into x86/mm to pick up fixes and to fix conflicts Conflicts: arch/x86/kernel/head64.c arch/x86/mm/mmap.c Signed-off-by: Ingo Molnar commit ec15ecdee5eb9e33a565e1e8eaef39fd4de565cb Author: Antoine Ténart Date: Fri Aug 25 15:24:46 2017 +0200 net: mvpp2: fix the packet size configuration for 10G The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is defined as BIT(0). Updated its name to contains "OFFS" as in offset and fix its value using the offset value, 0. Reported-by: Stefan Chulski Signed-off-by: Antoine Tenart Fixes: 76eb1b1de5b6 ("net: mvpp2: set maximum packet size for 10G ports") Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49107fcbf436bb37861a924b7ec190a92fb95e36 Merge: fac0cef 2bf0193 Author: David S. Miller Date: Fri Aug 25 19:39:58 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-08-25 This series contains updates to i40e and i40evf only. Mitch adjusts the max packet size to account for two VLAN tags. Sudheer provides a fix to ensure that the watchdog timer is scheduled immediately after admin queue operations are scheduled in i40evf_down(). Fixes an issue by adding locking around the admin queue command and update of state variables so that adminq_subtask will have the accurate information whenever it gets scheduled. Anjali fixes a bug where the PF flag setup should happen before the VMDq RSS queue count is initialized for VMDq VSI to get the right number of queues for RSS in the case of x722 devices. Fixed a problem with the hardware ATR eviction feature where the NVM setting was incorrect. Jake separates the flags into two types, hw_features and flags. The hw_features flags contain a set of features which are enabled at init time and will not contain feature flags that can be toggled. Everything else will remain in the flags variable, and can be modified anytime during run time. We should not be directly copying a cpumask_t, since it is bitmap and might not be copied correctly, so use cpumask_copy() instead. Stefan Assmann makes vf _offload_flags more "generic" by renaming it to vf_cap_flags, which allows other capabilities besides offloading to be added. Alan makes it such that if adaptive-rx/tx is enabled, the user cannot make any manual adjustments to interrupt moderation. Also makes it so that if ITR is disabled by adaptive-rx/tx is then enabled, ITR will be re-enabled. v2: Dropped patches #1 & #8 from the original patch series submission, while Jesse and Jake re-work their patches based on feedback from David Miller. Also removed the duplicate patch 3 that was accidentally sent out twice in the previous submission. ==================== Signed-off-by: David S. Miller commit fac0cef984f9c71331587440fcd5d490553b2fec Merge: bd9dfc5 6abd224 Author: David S. Miller Date: Fri Aug 25 19:24:59 2017 -0700 Merge branch 'nfp-SR-IOV-ndos-support' Jakub Kicinski says: ==================== nfp: SR-IOV ndos support This set adds basic SR-IOV including setting/getting VF MAC addresses, VLANs, link state and spoofcheck settings. It is wired up for both vNICs and representors (note: ip link will not report VF settings on VF/PF representors because they are not linked to the PF PCI device). Pablo and team add the basic implementation, Simon and Dirk follow up with the representor plumbing. ==================== Signed-off-by: David S. Miller commit 6abd224b2554cbbb31db62a8b4de7506df553f38 Author: Simon Horman Date: Thu Aug 24 21:31:50 2017 -0700 nfp: add basic SR-IOV ndo functions to representors Add basic ndo_set/get_vf to support SR-IOV on all types of port representors. Signed-off-by: Simon Horman 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 | 6 ++++++ 1 file changed, 6 insertions(+) commit 25528d90f541fa23cb7b862a7e9dc0b9c44d9adc Author: Pablo Cascón Date: Thu Aug 24 21:31:49 2017 -0700 nfp: add basic SR-IOV ndo functions Add basic ndo_set/get_vf to support SR-IOV. VF to egress phy static mapping by now. Use vfcfg ABI version 2 to write the info to the FW and collect the return value from the mailbox. Signed-off-by: Pablo Cascón Signed-off-by: Jimmy Kizito Signed-off-by: Rami Tomer Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_main.h | 4 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 6 + drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 20 +- drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c | 243 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_sriov.h | 86 ++++++++ drivers/net/ethernet/netronome/nfp/nic/main.c | 12 + 8 files changed, 372 insertions(+), 1 deletion(-) commit bd9dfc54e39266ff67521c09d37e838077385b21 Author: Eric Dumazet Date: Fri Aug 25 06:27:05 2017 -0700 tcp: fix hang in tcp_sendpage_locked() syszkaller got a hang in tcp stack, related to a bug in tcp_sendpage_locked() root@syzkaller:~# cat /proc/3059/stack [] __lock_sock+0x1dc/0x2f0 [] lock_sock_nested+0xf3/0x110 [] tcp_sendmsg+0x21/0x50 [] inet_sendmsg+0x11f/0x5e0 [] sock_sendmsg+0xca/0x110 [] kernel_sendmsg+0x47/0x60 [] sock_no_sendpage+0x1cc/0x280 [] tcp_sendpage_locked+0x10b/0x160 [] tcp_sendpage+0x43/0x60 [] inet_sendpage+0x1aa/0x660 [] kernel_sendpage+0x8d/0xe0 [] sock_sendpage+0x8c/0xc0 [] pipe_to_sendpage+0x290/0x3b0 [] __splice_from_pipe+0x343/0x750 [] splice_from_pipe+0x1e9/0x330 [] generic_splice_sendpage+0x40/0x50 [] SyS_splice+0x7b7/0x1610 [] entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: 306b13eb3cf9 ("proto_ops: Add locked held versions of sendmsg and sendpage") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Cc: Tom Herbert Signed-off-by: David S. Miller net/ipv4/tcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 86df4d2e234dd80cd9e31daeaf1198b38e8382c5 Merge: 7d8697a 3cd904e Author: David S. Miller Date: Fri Aug 25 17:19:11 2017 -0700 Merge branch 'net_sched-clean-up-tc-classes-and-u32-filter' Cong Wang says: ==================== net_sched: clean up tc classes and u32 filter Patch 1 and patch 2 prepare for patch 3. Major changes are in patch 3 and patch 4, details are there too. v2: Add patch 1 and 2, group all into a patchset Fix a coding style issue in patch 4 ==================== Signed-off-by: David S. Miller commit 3cd904ecbb5d0bcf36dfca7e726bdfd6d3644334 Author: WANG Cong Date: Thu Aug 24 16:51:30 2017 -0700 net_sched: kill u32_node pointer in Qdisc It is ugly to hide a u32-filter-specific pointer inside Qdisc, this breaks the TC layers: 1. Qdisc is a generic representation, should not have any specific data of any type 2. Qdisc layer is above filter layer, should only save filters in the list of struct tcf_proto. This pointer is used as the head of the chain of u32 hash tables, that is struct tc_u_hnode, because u32 filter is very special, it allows to create multiple hash tables within one qdisc and across multiple u32 filters. Instead of using this ugly pointer, we can just save it in a global hash table key'ed by (dev ifindex, qdisc handle), therefore we can still treat it as a per qdisc basis data structure conceptually. Of course, because of network namespaces, this key is not unique at all, but it is fine as we already have a pointer to Qdisc in struct tc_u_common, we can just compare the pointers when collision. And this only affects slow paths, has no impact to fast path, thanks to the pointer ->tp_c. Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Acked-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/sch_generic.h | 1 - net/sched/cls_u32.c | 57 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 5 deletions(-) commit 143976ce992fcf3bfc0f4d15d5726bb492dcf262 Author: WANG Cong Date: Thu Aug 24 16:51:29 2017 -0700 net_sched: remove tc class reference counting For TC classes, their ->get() and ->put() are always paired, and the reference counting is completely useless, because: 1) For class modification and dumping paths, we already hold RTNL lock, so all of these ->get(),->change(),->put() are atomic. 2) For filter bindiing/unbinding, we use other reference counter than this one, and they should have RTNL lock too. 3) For ->qlen_notify(), it is special because it is called on ->enqueue() path, but we already hold qdisc tree lock there, and we hold this tree lock when graft or delete the class too, so it should not be gone or changed until we release the tree lock. Therefore, this patch removes ->get() and ->put(), but: 1) Adds a new ->find() to find the pointer to a class by classid, no refcnt. 2) Move the original class destroy upon the last refcnt into ->delete(), right after releasing tree lock. This is fine because the class is already removed from hash when holding the lock. For those who also use ->put() as ->unbind(), just rename them to reflect this change. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/sch_generic.h | 3 +-- net/sched/cls_api.c | 17 ++++++----------- net/sched/sch_api.c | 21 ++++++++------------- net/sched/sch_atm.c | 30 ++++++++++++++++-------------- net/sched/sch_cbq.c | 41 ++++------------------------------------- net/sched/sch_drr.c | 30 +++++------------------------- net/sched/sch_dsmark.c | 17 ++++++++--------- net/sched/sch_fq_codel.c | 9 ++++----- net/sched/sch_hfsc.c | 32 +++++--------------------------- net/sched/sch_htb.c | 33 +++++++-------------------------- net/sched/sch_ingress.c | 20 +++++++++----------- net/sched/sch_mq.c | 9 ++------- net/sched/sch_mqprio.c | 9 ++------- net/sched/sch_multiq.c | 11 +++++------ net/sched/sch_netem.c | 9 ++------- net/sched/sch_prio.c | 11 +++++------ net/sched/sch_qfq.c | 30 +++++------------------------- net/sched/sch_red.c | 9 ++------- net/sched/sch_sfb.c | 9 ++++----- net/sched/sch_sfq.c | 9 ++++----- net/sched/sch_tbf.c | 9 ++------- 21 files changed, 106 insertions(+), 262 deletions(-) commit 14546ba1e5653e5dd00d113e98bd21b5b235192b Author: WANG Cong Date: Thu Aug 24 16:51:28 2017 -0700 net_sched: introduce tclass_del_notify() Like for TC actions, ->delete() is a special case, we have to prepare and fill the notification before delete otherwise would get use-after-free after we remove the reference count. Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/sch_api.c | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) commit 27d7f07c49de289e2a2d48a6bec3e111ed4b1222 Author: WANG Cong Date: Thu Aug 24 16:51:27 2017 -0700 net_sched: get rid of more forward declarations This is not needed if we move them up properly. Signed-off-by: Cong Wang Acked-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/sch_api.c | 348 +++++++++++++++++++++++++--------------------------- 1 file changed, 169 insertions(+), 179 deletions(-) commit 7d8697afae5c61a9495fff54a1c5d053dea4505f Author: Dan Carpenter Date: Fri Aug 25 11:24:28 2017 +0300 hinic: skb_pad() frees on error The skb_pad() function frees the skb on error, so this code has a double free. Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf4828d1666beaef513ce3c8f9e4fe4af1ff4e87 Merge: 3fd8712 891ef8d Author: David S. Miller Date: Fri Aug 25 17:10:24 2017 -0700 Merge branch 'ipv6-sr-updates' David Lebrun says: ==================== net: updates for IPv6 Segment Routing v2: seg6_lwt_headroom() is not relevant for lwtunnel_input_redirect() use cases, and L2ENCAP only uses this redirection. Fix incoherence between arbitrary MAC header size support and fixed headroom computation by setting only LWTUNNEL_STATE_INPUT_REDIRECT for L2ENCAP mode. This patch series provides several updates for the SRv6 implementation. The first patch leverages the existing infrastructure to support encapsulation of IPv4 packets. The second patch implements the T.Encaps.L2 SR function, enabling to encapsulate an L2 Ethernet frame within an IPv6+SRH packet. The last three patches update the seg6local lightweight tunnel, and mainly implement four new actions: End.T, End.DX2, End.DX4 and End.DT6. ==================== Signed-off-by: David S. Miller commit 891ef8dd2a8d14e4e73a81dcdb135b574c57f556 Author: David Lebrun Date: Fri Aug 25 09:58:17 2017 +0200 ipv6: sr: implement additional seg6local actions This patch implements the following seg6local actions. - SEG6_LOCAL_ACTION_END_T: regular SRH processing and forward to the next-hop looked up in the specified routing table. - SEG6_LOCAL_ACTION_END_DX2: decapsulate an L2 frame and forward it to the specified network interface. - SEG6_LOCAL_ACTION_END_DX4: decapsulate an IPv4 packet and forward it, possibly to the specified next-hop. - SEG6_LOCAL_ACTION_END_DT6: decapsulate an IPv6 packet and forward it to the next-hop looked up in the specified routing table. Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_local.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) commit d7a669dd2f8ba07a17423f4ad586dfc0379882f7 Author: David Lebrun Date: Fri Aug 25 09:56:47 2017 +0200 ipv6: sr: add helper functions for seg6local This patch adds three helper functions to be used with the seg6local packet processing actions. The decap_and_validate() function will be used by the End.D* actions, that decapsulate an SR-enabled packet. The advance_nextseg() function applies the fundamental operations to update an SRH for the next segment. The lookup_nexthop() function helps select the next-hop for the processed SR packets. It supports an optional next-hop address to route the packet specifically through it, and an optional routing table to use. Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/Kconfig | 1 + net/ipv6/seg6_local.c | 189 ++++++++++++++++++++++++++------------------------ 2 files changed, 101 insertions(+), 89 deletions(-) commit 6285217f0c29e68b744533a9ddf50e110d36d65e Author: David Lebrun Date: Fri Aug 25 09:56:46 2017 +0200 ipv6: sr: enforce IPv6 packets for seg6local lwt This patch ensures that the seg6local lightweight tunnel is used solely with IPv6 routes and processes only IPv6 packets. Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_local.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 38ee7f2d47565689f35662d488d25e7afc43477d Author: David Lebrun Date: Fri Aug 25 09:56:45 2017 +0200 ipv6: sr: add support for encapsulation of L2 frames This patch implements the L2 frame encapsulation mechanism, referred to as T.Encaps.L2 in the SRv6 specifications [1]. A new type of SRv6 tunnel mode is added (SEG6_IPTUN_MODE_L2ENCAP). It only accepts packets with an existing MAC header (i.e., it will not work for locally generated packets). The resulting packet looks like IPv6 -> SRH -> Ethernet -> original L3 payload. The next header field of the SRH is set to NEXTHDR_NONE. [1] https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-01 Signed-off-by: David Lebrun Signed-off-by: David S. Miller include/uapi/linux/seg6_iptunnel.h | 18 ++++++++++++++---- net/ipv6/seg6_iptunnel.c | 25 +++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 6 deletions(-) commit 32d99d0b670299720dd0db92a974c9612c230889 Author: David Lebrun Date: Fri Aug 25 09:56:44 2017 +0200 ipv6: sr: add support for ip4ip6 encapsulation This patch enables the SRv6 encapsulation mode to carry an IPv4 payload. All the infrastructure was already present, I just had to add a parameter to seg6_do_srh_encap() to specify the inner packet protocol, and perform some additional checks. Usage example: ip route add 1.2.3.4 encap seg6 mode encap segs fc00::1,fc00::2 dev eth0 Signed-off-by: David Lebrun Signed-off-by: David S. Miller include/net/seg6.h | 3 ++- net/ipv6/seg6_iptunnel.c | 47 +++++++++++++++++++++++++++++++++++++---------- net/ipv6/seg6_local.c | 2 +- 3 files changed, 40 insertions(+), 12 deletions(-) commit 27c3b415f6ffe6d29a95c8187e35436fcc9638b6 Author: Bob Peterson Date: Fri Aug 18 09:15:13 2017 -0500 GFS2: Fix up some sparse warnings This patch cleans up various pieces of GFS2 to avoid sparse errors. This doesn't fix them all, but it fixes several. The first error, in function glock_hash_walk was a genuine bug where the rhashtable could be started and not stopped. Signed-off-by: Bob Peterson fs/gfs2/glock.c | 9 ++++++--- fs/gfs2/lock_dlm.c | 4 +--- fs/gfs2/util.h | 1 + fs/gfs2/xattr.c | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) commit 5fe5a6c9acc03bcd98e0d1611b6a0fe17149c6cc Author: Arnd Bergmann Date: Fri Aug 25 01:10:00 2017 +0200 scsi: lpfc: avoid false-positive gcc-8 warning This is an interesting regression with gcc-8, showing a harmless warning for correct code: In file included from include/linux/kernel.h:13:0, ... from drivers/scsi/lpfc/lpfc_debugfs.c:23: include/linux/printk.h:301:2: error: 'eq' may be used uninitialized in this function [-Werror=maybe-uninitialized] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~ In file included from drivers/scsi/lpfc/lpfc_debugfs.c:58:0: drivers/scsi/lpfc/lpfc_debugfs.h:451:31: note: 'eq' was declared here I managed to reduce the warning into a small test case for gcc-8 that I reported in the gcc bugzilla[1]. As a workaround, this changes the logic to move the two assignments of 'eq' out of the conditions and instead make the index conditional. This works for all configurations I tried and avoids adding a bogus initialization. Acked-by: James Smart Link: [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81958 Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7362617319fd2273c7fe5a5f8f8b5fb059a85015 Author: Arnd Bergmann Date: Fri Aug 25 01:09:59 2017 +0200 scsi: lpfc: avoid an unused function warning The only reference to lpfc_nvmet_replenish_context() is inside of an disabled: drivers/scsi/lpfc/lpfc_nvmet.c:1457:1: error: 'lpfc_nvmet_replenish_context' defined but not used [-Werror=unused-function] This replaces the preprocessor conditional with a C condition, so the compiler can see that the function is intentionally unused. Fixes: 9a38e4f1c82f ("scsi: lpfc: Fix MRQ > 1 context list handling") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 07a191f762a7b8d0db13c38036380927116e29bb Author: Uma Krishnan Date: Fri Aug 25 17:18:12 2017 -0500 scsi: cxlflash: Fix vlun resize failure in the shrink path The ioctl DK_CAPI_VLUN_RESIZE can fail if the allocated vlun size is reduced from almost maximum capacity and then increased again. The shrink_lxt() routine is currently using the SISL_ASTATUS_MASK to mask the higher 48 bits of the lxt entry. This is unnecessary and incorrect as it uses a mask designed for the asynchronous interrupt status register. When the 4 port support was added to cxlflash, the SISL_ASTATUS_MASK was updated to reflect the status bits for all 4 ports. This change indirectly affected the shrink_lxt() code path. To extract the base, simply shift the bits without masking. Fixes: 565180723294 ("scsi: cxlflash: SISlite updates to support 4 ports") Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/vlun.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1a9e394154e34728f58c1f697b993aaaf89a4db2 Author: Matthew R. Ochs Date: Fri Aug 25 17:18:03 2017 -0500 scsi: cxlflash: Avoid double mutex unlock The AFU recovery routine uses an interruptible mutex to control the flow of in-flight recoveries. Upon receiving an interruptible signal the code branches to a common exit path which wrongly assumes the mutex is held. Add a local variable to track when the mutex should be unlocked. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 48a17ad5931c3832eec68411620bc3527021c193 Author: Matthew R. Ochs Date: Fri Aug 25 17:17:53 2017 -0500 scsi: cxlflash: Remove unnecessary existence check The AFU termination sequence has been refactored over time such that the main tear down routine, term_afu(), can no longer can be invoked with a NULL AFU pointer. Remove the unnecessary existence check from term_afu(). Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5815625819f7e8045c39b4656f7cc8aa475abbf6 Author: Geert Uytterhoeven Date: Fri Aug 25 16:38:26 2017 +0200 dt-bindings: usb: musb: Grammar s/the/to/, s/is/are/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/am33xx-usb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2bf01935ec5362aee6ff9ffc2476043af321aa42 Author: Sudheer Mogilappagari Date: Wed Jul 12 05:46:07 2017 -0400 i40e: synchronize nvmupdate command and adminq subtask During NVM update, state machine gets into unrecoverable state because i40e_clean_adminq_subtask can get scheduled after the admin queue command but before other state variables are updated. This causes incorrect input to i40e_nvmupd_check_wait_event and state transitions don't happen. This issue existed before but surfaced after commit 373149fc99a0 ("i40e: Decrease the scope of rtnl lock") This fix adds locking around admin queue command and update of state variables so that adminq_subtask will have accurate information whenever it gets scheduled. Signed-off-by: Sudheer Mogilappagari Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 06b2decd924891b6c7570a91f91e11a5a8fed421 Author: Alan Brady Date: Wed Jul 12 05:46:06 2017 -0400 i40e: prevent changing ITR if adaptive-rx/tx enabled Currently the driver allows the user to change (or even disable) interrupt moderation if adaptive-rx/tx is enabled when this should not be the case. Adaptive RX/TX will not respect the user's ITR settings so allowing the user to change it is weird. This bug would also allow the user to disable interrupt moderation with adaptive-rx/tx enabled which doesn't make much sense either. This patch makes it such that if adaptive-rx/tx is enabled, the user cannot make any manual adjustments to interrupt moderation. It also makes it so that if ITR is disabled but adaptive-rx/tx is then enabled, ITR will be re-enabled. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 65 +++++++++++++++++--------- 1 file changed, 43 insertions(+), 22 deletions(-) commit 7e4d01e7d3f7d4f7b0a768a1028cb26ea06c8694 Author: Jacob Keller Date: Wed Jul 12 05:46:05 2017 -0400 i40e: use cpumask_copy instead of direct assignment According to the header file cpumask.h, we shouldn't be directly copying a cpumask_t, since its a bitmap and might not be copied correctly. Lets use the provided cpumask_copy() function instead. 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/i40evf/i40evf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f0db78928783f0a4cce4940e8c03c2e9a760e629 Author: Alan Brady Date: Wed Jul 12 05:46:04 2017 -0400 i40evf: use netdev variable in reset task If we're going to bother initializing a variable to reference it we might as well use it. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbb113f773482496d601e0bd934e680b35876016 Author: Stefan Assmann Date: Thu Jun 29 15:12:24 2017 +0200 i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource The current name of vf_offload_flags indicates that the bitmap is limited to offload related features. Make this more generic by renaming it to vf_cap_flags, which allows for other capabilities besides offloading to be added. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 22 +++++++++++----------- drivers/net/ethernet/intel/i40evf/i40e_common.c | 2 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 10 +++++----- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 12 ++++++------ include/linux/avf/virtchnl.h | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) commit fcf6cfc8a695bd82d123166aeedab9fa12720b57 Author: Jacob Keller Date: Fri Jun 23 04:24:51 2017 -0400 i40e: move check for avoiding VID=0 filters into i40e_vsi_add_vlan In i40e_vsi_add_vlan we treat attempting to add VID=0 as an error, because it does not do what the caller might expect. We already special case VID=0 in i40e_vlan_rx_add_vid so that we avoid this error when adding the VLAN. This special casing is necessary so that we do not add the VLAN=0 filter since we don't want to stop receiving untagged traffic. Unfortunately, not all callers of i40e_vsi_add_vlan are aware of this, including when we add VLANs from a VF device. Rather than special casing every single caller of i40e_vsi_add_vlan, lets just move this check internally. This makes the code simpler because the caller does not need to be aware of how VLAN=0 is special, and we don't forget to add this check in new places. This fixes a harmless error message displaying when adding a VLAN from within a VF. The message was meaningless but there is no reason to confuse end users and system administrators, and this is now avoided. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 841c950d67c6facde32a8644ced20c04aebb7dd8 Author: Jacob Keller Date: Fri Jun 23 04:24:50 2017 -0400 i40e/i40evf: use cmpxchg64 when updating private flags in ethtool When a user gives an invalid command to change a private flag which is not supported, either because it is read-only, or the device is not capable of the feature, we simply ignore the request. A naive solution would simply be to report error codes when one of the flags was not supported. However, this causes problems because it makes the operation not atomic. If a user requests multiple private flags together at once we could end up changing one before failing at the second flag. We can do a bit better if we instead update a temporary copy of the flags variable in the loop, and then copy it into place after. If we aren't careful this has the pitfall of potentially silently overwriting any changes caused by other threads. Avoid this by using cmpxchg64 which will compare and swap the flags variable only if it currently matched the old value. We'll report -EAGAIN in the (hopefully rare!) case where the cmpxchg64 fails. This ensures that we can properly report when flags are not supported in an atomic fashion without the risk of overwriting other threads changes. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 57 +++++++++++++++------- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 41 ++++++++++++---- 2 files changed, 70 insertions(+), 28 deletions(-) commit 10a955ff62e56fe13dae1f29aabc04bc589eaf46 Author: Anjali Singhai Jain Date: Fri Jun 23 04:24:48 2017 -0400 i40e: Detect ATR HW Evict NVM issue and disable the feature This patch fixes a problem with the HW ATR eviction feature where the NVM setting was incorrect. This patch detects the issue on X720 adapters and disables the feature if the NVM setting is incorrect. Without this patch, HW ATR Evict feature does not work on broken NVMs and is not detected either. If the HW ATR Evict feature is disabled the SW Eviction feature will take effect. Signed-off-by: Anjali Singhai Jain Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 28921a0c2f5d4d051eff3f1db0588dea7cb8fe49 Author: Jacob Keller Date: Fri Jun 23 04:24:47 2017 -0400 i40e: remove workaround for Open Firmware MAC address Since commit b499ffb0a22c ("i40e: Look up MAC address in Open Firmware or IDPROM"), we've had support for obtaining the MAC address form Open Firmware or IDPROM. This code relied on sending the Open Firmware address directly to the device firmware instead of relying on our MAC/VLAN filter list. Thus, a work around was introduced in commit b1b15df59232 ("i40e: Explicitly write platform-specific mac address after PF reset") We refactored the Open Firmware address enablement code in the ill-named commit 41c4c2b50d52 ("i40e: allow look-up of MAC address from Open Firmware or IDPROM") Since this refactor, we no longer even set I40E_FLAG_PF_MAC. Further, we don't need this work around, because we actually store the MAC address as part of the MAC/VLAN filter hash. Thus, we will restore the address correctly upon reset. The refactor above failed to revert the workaround, so do that now. 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 | 60 ----------------------------- 2 files changed, 61 deletions(-) commit d36e41dc78d31322f61952a558b817e15e60a855 Author: Jacob Keller Date: Fri Jun 23 04:24:46 2017 -0400 i40e: separate hw_features from runtime changing flags The number of flags found in pf->flags has grown quite large, and there are a lot of different types of flags. Most of the flags are simply hardware features which are enabled on some firmware or some MAC types. Other flags are dynamic run-time flags which enable or disable certain features of the driver. Separate these two types of flags into pf->hw_features and pf->flags. The hw_features list will contain a set of features which are enabled at init time. This will not contain toggles or otherwise dynamically changing features. These flags should not need atomic protections, as they will be set once during init and then be essentially read only. Everything else will remain in the flags variable. These flags may be modified at any time during run time. A future patch may wish to convert these flags into set_bit/clear_bit/test_bit or similar approach to ensure atomic correctness. The I40E_FLAG_MFP_ENABLED flag may be a good fit for hw_features but currently is used by ethtool in the private flags settings, and thus has been left as part of flags. Additionally, I40E_FLAG_DCB_CAPABLE may be a good fit for the hw_features but this patch has not tried to untangle it yet. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 43 +++++++------ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 34 +++++----- drivers/net/ethernet/intel/i40e/i40e_main.c | 72 +++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 6 +- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 +-- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 4 -- drivers/net/ethernet/intel/i40evf/i40evf.h | 2 - drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 9 files changed, 85 insertions(+), 88 deletions(-) commit 5a433199bfde1b5360bf592184a2b89ce4ee2eda Author: Anjali Singhai Jain Date: Fri Jun 23 04:24:45 2017 -0400 i40e: Fix a bug with VMDq RSS queue allocation The X722 pf flag setup should happen before the VMDq RSS queue count is initialized for VMDq VSI to get the right number of queues for RSS in case of X722 devices. Signed-off-by: Anjali Singhai Jain Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit fe2647ab0c9970cfc2895f1671343c23fed27f44 Author: Sudheer Mogilappagari Date: Fri Jun 23 04:24:44 2017 -0400 i40evf: prevent VF close returning before state transitions to DOWN Currently i40evf_close() can return before state transitions to __I40EVF_DOWN because of the latency involved in processing and receiving response from PF driver and scheduling of VF watchdog_task. Due to this inconsistency an immediate call to i40evf_open() fails because state is still DOWN_PENDING. When a VF interface is in up state and we try to add it as slave, The bonding driver calls dev_close() and dev_open() in short duration resulting in dev_open returning error. The ifenslave command needs to be run again for dev_open to succeed. This fix ensures that watchdog timer is scheduled immediately after admin queue operations are scheduled in i40evf_down(). In addition a wait condition is added at the end of i40evf_close so that function wont return when state is still DOWN_PENDING. The timeout value is chosen after some profiling and includes some buffer. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 2 ++ drivers/net/ethernet/intel/i40evf/i40evf_main.c | 19 +++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) commit 1e3a5fd5c0492d2cd37d86dce82ac7899136123f Author: Mitch Williams Date: Fri Jun 23 04:24:43 2017 -0400 i40e/i40evf: adjust packet size to account for double VLANs Now that the kernel supports double VLAN tags, we should at least play nice. Adjust the max packet size to account for two VLAN tags, not just one. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) commit e4df3eaa6e72459767cbf9b883fdfd2d28197583 Author: Arvind Yadav Date: Thu Aug 17 19:15:05 2017 +0530 scsi: ibmvfc: ibmvscsi: ibmvscsi_tgt: 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: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 35c0506f27f6e3f278592d631901163cbccce28d Author: Jonathan Corbet Date: Thu Aug 24 16:11:09 2017 -0600 scsi: Fix the kerneldoc for scsi_initialize_rq() The kerneldoc comment for scsi_initialize_rq() neglected to document the "rq" parameter, leading to this docs build warning: ./drivers/scsi/scsi_lib.c:1116: warning: No description found for parameter 'rq' Document the parameter and make the build slightly quieter. [mkp: used wording suggested by Bart] Signed-off-by: Jonathan Corbet Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) commit a5a039b01729e729ee4cf1e11200f002af787f6e Author: Calvin Owens Date: Thu Aug 24 15:13:52 2017 +0200 scsi: ses: Fix racy cleanup of /sys in remove_dev() Currently we free the resources backing the enclosure device before we call device_unregister(). This is racy: during rmmod of low-level SCSI drivers that hook into enclosure, we end up with a small window of time during which writing to /sys can OOPS. Example trace with mpt3sas: general protection fault: 0000 [#1] SMP KASAN Modules linked in: mpt3sas(-) <...> RIP: [] ses_get_page2_descriptor.isra.6+0x38/0x220 [ses] Call Trace: [] ses_set_fault+0xf4/0x400 [ses] [] set_component_fault+0xa9/0xf0 [enclosure] [] dev_attr_store+0x3c/0x70 [] sysfs_kf_write+0x115/0x180 [] kernfs_fop_write+0x275/0x3a0 [] __vfs_write+0xe0/0x3e0 [] vfs_write+0x13f/0x4a0 [] SyS_write+0x111/0x230 [] entry_SYSCALL_64_fastpath+0x13/0x94 Fortunately the solution is extremely simple: call device_unregister() before we free the resources, and the race no longer exists. The driver core holds a reference over ->remove_dev(), so AFAICT this is safe. Signed-off-by: Calvin Owens Acked-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ee3e2d8392f695343d2fdfd43e881d14fb406d24 Author: Hannes Reinecke Date: Thu Aug 24 14:52:43 2017 +0200 scsi: mptsas: Fixup device hotplug for VMWare ESXi VMWare ESXi emulates an mptsas HBA, but exposes all drives as direct-attached SAS drives. This it not how the driver originally envisioned things; SAS drives were supposed to be connected via an expander, and only SATA drives would be direct attached. As such, any hotplug event for direct-attach SAS drives was silently ignored, and the guest failed to detect new drives from within a VMWare ESXi environment. [mkp: typos] Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1030850 Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/message/fusion/mptsas.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f5cb2d51524a1218bb0c5d8b234044e9104f7062 Author: Bart Van Assche Date: Fri Aug 25 14:24:14 2017 -0700 skd: Remove SKD_ID_INCR The SKD_ID_INCR flag in skd_request_context.id duplicates information that is already available otherwise, e.g. through the block layer request state and through skd_request_context.state. Hence remove the code that manipulates this flag and also the flag itself. Since skd_isr_completion_posted() only uses the lower bits of skd_request_context.id as hardware tag, this patch does not change the behavior of the skd driver. I'm referring to the following code: tag = req_id & SKD_ID_SLOT_AND_TABLE_MASK; Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 5 ----- 1 file changed, 5 deletions(-) commit 4633504c1a3a452ff03a5dbe50beb082fa1bfac6 Author: Bart Van Assche Date: Fri Aug 25 14:24:13 2017 -0700 skd: Make it easier for static analyzers to analyze skd_free_disk() Although it is easy to see that skdev->disk != NULL if skdev->queue != NULL, add a test for skdev->disk to avoid that smatch reports the following warning: drivers/block/skd_main.c:3080 skd_free_disk() error: we previously assumed 'disk' could be null (see line 3074) Reported-by: Dan Carpenter Signed-off-by: Bart Van Assche Cc: Dan Carpenter Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 795bc1b54265ec532d09960762bd3d58d1a63c8f Author: Bart Van Assche Date: Fri Aug 25 14:24:12 2017 -0700 skd: Inline skd_end_request() It is not worth to keep the debug statements in skd_end_request(). Without debug statements that function only consists of two statements. Hence inline skd_end_request(). Suggested-by: Christoph Hellwig Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) commit 296cb94c9ddb63cd34d96f8ac3cfa59988ad485e Author: Bart Van Assche Date: Fri Aug 25 14:24:11 2017 -0700 skd: Rename skd_softirq_done() into skd_complete_rq() The latter name follows more closely the function names used in other blk-mq drivers. Suggested-by: Christoph Hellwig Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7988faf525498170aff8a11005de50a3bc589ba4 Author: Bhumika Goyal Date: Sat Aug 19 13:52:24 2017 +0530 scsi: make device_type const Make these const as they are only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_sysfs.c | 4 ++-- drivers/scsi/scsi_transport_iscsi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5f800c87dadf0857b31ccb6217d6d42d4c1fe157 Author: weiping zhang Date: Fri Aug 18 14:49:30 2017 +0800 scsi: sd: remove duplicated setting of gd->minors gd->minors has been set when call alloc_disk() in sd_probe. Signed-off-by: weiping zhang Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 1 - 1 file changed, 1 deletion(-) commit 8978001a3d4f7e8efedd9ff73eff21f8b5dfba65 Author: Hannes Reinecke Date: Fri Aug 25 13:57:21 2017 +0200 scsi: eata: remove 'arg_done' from eata2x_eh_host_reset() Just displaying some different information; drop it. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/eata.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7bc4e528d9f6fc4677eb1a4b0ddeb989c50e051d Author: Hannes Reinecke Date: Fri Aug 25 13:57:20 2017 +0200 scsi: visorhba: sanitze private device data allocation There's no need to keep the private data for a device in a separate list; better to store it in ->hostdata and do away with the additional list. Signed-off-by: Hannes Reinecke Reviewed-by: David Kershner Signed-off-by: Martin K. Petersen drivers/staging/unisys/visorhba/visorhba_main.c | 123 ++++++++++-------------- 1 file changed, 53 insertions(+), 70 deletions(-) commit 6d415342ad15f7ca6e92b7a67ae49083e313d849 Author: Hannes Reinecke Date: Fri Aug 25 13:57:19 2017 +0200 scsi: megaraid_mbox: drop duplicate bus reset and device reset function megaraid_mbox only has one reset function, and that is a host reset. So drop the duplicate bus reset and device reset functions. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_mbox.c | 2 -- 1 file changed, 2 deletions(-) commit 4c3bb256edbb5c60b385c3ec3374d3d653c2845a Author: Hannes Reinecke Date: Fri Aug 25 13:57:18 2017 +0200 scsi: bnx2fc: remove obsolete bnx2fc_eh_host_reset() definition Never used anywhere. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 1 - 1 file changed, 1 deletion(-) commit 44257a1b36fc7b69c021d25ab0d18bb734846ccb Author: Hannes Reinecke Date: Fri Aug 25 13:57:17 2017 +0200 scsi: 53c700: move bus reset to host reset bus reset always returns SUCCESS, meaning host reset was never tested. At the same time the only difference to the HBA is a missing call to NCR_700_chip_reset(). So add the missing call to bus reset, drop host reset, and move bus reset to host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/53c700.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 819f80c95575286fd4538ab2fbdfcf7ad9cc0b9a Author: Hannes Reinecke Date: Fri Aug 25 13:57:16 2017 +0200 scsi: aha152x: drop host reset The driver has both a bus and a host reset, where the host reset does a bus reset followed by an attempt to reset the chip registers to a default state. However, as the bus reset always returned SUCCESS the host reset was never called, so the functionality of the register reset function was never validated. Additionally, tha AIC-6260 chip has a hard reset line, which actually should be preferred for a host reset. But I haven't found a way how this can be triggered via software, so take the safe approach and drop the host reset. [mkp: typo] Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/aha152x.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 71b2e66336fc2746ad072e22d3104a42561b436f Author: Hannes Reinecke Date: Fri Aug 25 13:57:15 2017 +0200 scsi: nsp32: drop bus reset bus reset is a host reset without nsp32hw_init(), and will always return SUCCESS, thus disabling the use of host reset. So drop bus reset in favour of host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/nsp32.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit a81ac3b046f2dd15b4a6933b18b7a2139d26b204 Author: Hannes Reinecke Date: Fri Aug 25 13:57:14 2017 +0200 scsi: qedf: drop bus reset handler qedf has a host reset handler, but as the bus reset handler is a stub always returning SUCCESS the host reset is never invoked. So drop the bus reset handler. Signed-off-by: Hannes Reinecke Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 11 ----------- 1 file changed, 11 deletions(-) commit b52de75589af34127c90df5e5dbacf877b5ba92f Author: Hannes Reinecke Date: Fri Aug 25 13:57:13 2017 +0200 scsi: ppa: drop duplicate bus_reset handler bus_reset and host_reset are the same functions, so drop bus_reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/ppa.c | 1 - 1 file changed, 1 deletion(-) commit 3e0273a860458a51f4f93157725eb81f9d4db5da Author: Hannes Reinecke Date: Fri Aug 25 13:57:12 2017 +0200 scsi: imm: drop duplicate bus_reset handler host_reset and bus_reset is the same function, so drop bus reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/imm.c | 1 - 1 file changed, 1 deletion(-) commit 4a56c1c166b6764f4fb389fbaca6acc75ea215d7 Author: Hannes Reinecke Date: Fri Aug 25 13:57:11 2017 +0200 scsi: qlogicfas: move bus_reset to host_reset The bus reset handler is really a host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/pcmcia/qlogic_stub.c | 4 ++-- drivers/scsi/qlogicfas.c | 2 +- drivers/scsi/qlogicfas408.c | 6 +++--- drivers/scsi/qlogicfas408.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 12e5fc665a2d8380c1551291a0d7684fc181b02d Author: Hannes Reinecke Date: Fri Aug 25 13:57:10 2017 +0200 scsi: NCR5380: Move bus reset to host reset The bus reset handler really is a host reset, so move it to eh_bus_reset_handler. Signed-off-by: Hannes Reinecke Acked-by: Finn Thain Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 4 ++-- drivers/scsi/arm/cumana_1.c | 2 +- drivers/scsi/arm/oak.c | 2 +- drivers/scsi/atari_scsi.c | 6 +++--- drivers/scsi/dmx3191d.c | 2 +- drivers/scsi/g_NCR5380.c | 4 ++-- drivers/scsi/mac_scsi.c | 4 ++-- drivers/scsi/sun3_scsi.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) commit 74fa80ee3fae5f749ee34bb82421a4c45ac199e3 Author: Hannes Reinecke Date: Fri Aug 25 13:57:09 2017 +0200 scsi: acornscsi: move bus reset to host reset The bus reset function is really a host reset, so move it to eh_host_reset_handler. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/arm/acornscsi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit af167bc42d86907a39a761539cb2990120ebbc8e Author: Hannes Reinecke Date: Fri Aug 25 13:57:08 2017 +0200 scsi: qlogicpti: move bus reset to host reset The bus reset function really is a host reset, so move it to eh_host_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qlogicpti.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 13beb929ab22182cc2daabacc665624a74f4d958 Author: Hannes Reinecke Date: Fri Aug 25 13:57:07 2017 +0200 scsi: rtsx: drop bus reset function Function is a stub, so can as well be dropped. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/staging/rts5208/rtsx.c | 11 ----------- 1 file changed, 11 deletions(-) commit ec05e23896910380ccb6d64f1b95a2310fa0c868 Author: Hannes Reinecke Date: Fri Aug 25 13:57:06 2017 +0200 scsi: drop bus reset for wd33c93-compatible boards The bus reset function is just a wrapper calling host reset under the host lock. So move taking of the host lock into the host reset function and drop bus reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/a2091.c | 17 ----------------- drivers/scsi/a3000.c | 17 ----------------- drivers/scsi/gvp11.c | 18 ------------------ drivers/scsi/mvme147.c | 16 ---------------- drivers/scsi/sgiwd93.c | 15 --------------- drivers/scsi/wd33c93.c | 2 ++ 6 files changed, 2 insertions(+), 83 deletions(-) commit 63cd2f7f9031a91c11583ca16c84280c5debeeae Author: Hannes Reinecke Date: Fri Aug 25 13:57:05 2017 +0200 scsi: fdomain: move bus reset to host reset The bus reset function really is a host reset, so move it to eh_host_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fdomain.c | 6 +++--- drivers/scsi/fdomain.h | 2 +- drivers/scsi/pcmcia/fdomain_stub.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit aceb294823ac8968ff1f282aa72002f40c2de81c Author: Hannes Reinecke Date: Fri Aug 25 13:57:04 2017 +0200 scsi: hptiop: Simplify reset handling The Highpoint driver only has one reset function, and that is a host reset. So stop pretending we're doing anything else. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hptiop.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1b7092f35e0928857f5487c62ca9669218f6b1b0 Author: Hannes Reinecke Date: Fri Aug 25 13:57:03 2017 +0200 scsi: bfa: move bus reset to target reset The bus reset handler is just calling target reset on all targets, which is exactly what SCSI EH will be doing anyway. So move the bus reset function to target reset and drop the loop. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_im.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit cc199e78460565eeab0399875dbf9da8e2901c42 Author: Hannes Reinecke Date: Fri Aug 25 13:57:02 2017 +0200 scsi: libsas: move bus_reset_handler() to target_reset_handler() The bus reset handler is calling I_T Nexus reset, which logically is a target reset as it need to specify both the initiator and the target. So move it to target reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_init.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- drivers/scsi/isci/init.c | 2 +- drivers/scsi/libsas/sas_scsi_host.c | 12 ++++++------ drivers/scsi/mvsas/mv_init.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 2 +- include/scsi/libsas.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) commit e13849b72a0b691d431c9b9964bfe785e3301219 Author: Hannes Reinecke Date: Fri Aug 25 13:57:01 2017 +0200 scsi: uas: move eh_bus_reset_handler to eh_device_reset_handler The bus_reset handler is really a device reset, so move it to eh_device_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c3a50bb9b6ec289126085ccfe205ed0cc3c0a85 Author: Hannes Reinecke Date: Fri Aug 25 13:57:00 2017 +0200 scsi: fnic: do not call host reset from command abort Command abort already returns FAILED, which will then be escalated to a host reset. So no need to call host_reset directly. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 4 ---- 1 file changed, 4 deletions(-) commit 20081c1ba21e11573891138c88eb4b7a2634e37c Author: Hannes Reinecke Date: Fri Aug 25 13:56:59 2017 +0200 scsi: fc_fcp: do not call fc_block_scsi_eh() from host reset When calling host reset we're resetting all ports anyway, so there is no point in waiting for the ports to become unblocked. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_fcp.c | 2 -- 1 file changed, 2 deletions(-) commit 8d8a3f594c2e0f6bd94d3a0503bae67ad653585e Author: Hannes Reinecke Date: Fri Aug 25 13:56:58 2017 +0200 scsi: ibmvfc: Do not call fc_block_scsi_eh() on host reset When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit fdad4aafe4f5ae7c8643a1509c32ce75e8bf7c6c Author: Hannes Reinecke Date: Fri Aug 25 13:56:57 2017 +0200 scsi: mptfc: Do not call fc_block_scsi_eh() on host reset When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/message/fusion/mptfc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 23cb27fd679cec8322a376c046dc79b47c30bbd4 Author: Hannes Reinecke Date: Fri Aug 25 13:56:56 2017 +0200 scsi: fix comment in scsi_device_set_state() The function returns '0' if successful; with the original comment the function doesn't have a way to indicate success ... Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 052d8a7cbfbf90489ed83ab7d65c9559b799b97b Author: Bart Van Assche Date: Fri Aug 25 13:46:43 2017 -0700 scsi: iscsi_tcp: Remove a set-but-not-used variable This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/iscsi_tcp.c:166:24: warning: variable ?session? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Lee Duncan Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 2 -- 1 file changed, 2 deletions(-) commit ab17241cef42ac434dcb544ae69e3fc4d451927f Author: Bart Van Assche Date: Fri Aug 25 13:46:42 2017 -0700 scsi: scsi_debug: Remove a set-but-not-used variable This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/scsi_debug.c:2264:15: warning: variable ?pcontrol? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Douglas Gilbert Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 85aa93be7558b009fd8b9f0171d8b8a2b44397f7 Author: Bart Van Assche Date: Fri Aug 25 13:46:41 2017 -0700 scsi: scsi_transport_srp: Suppress a W=1 compiler warning Avoid that the following compiler warning is reported when building with W=1: drivers/scsi/scsi_transport_srp.c:92:19: warning: comparison is always false due to limited range of data type [-Wtype-limits] 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_transport_srp.c | 2 +- include/scsi/scsi_transport_srp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e1779b4ff5412fcb7f943f6b49cac5e70fc724e2 Author: Bart Van Assche Date: Fri Aug 25 13:46:40 2017 -0700 scsi: scsi_transport_sas: Check kzalloc() return value Check whether memory allocation succeeded before dereferencing the pointer to the allocated memory. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_sas.c | 3 +++ 1 file changed, 3 insertions(+) commit e656f0d07aeb68b120a0033dbd1ac2d48da65a41 Author: Bart Van Assche Date: Fri Aug 25 13:46:39 2017 -0700 scsi: libsas: Annotate fall-through in a switch statement Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 1 + 1 file changed, 1 insertion(+) commit bcba3c22b5e1240f78d26dbcbbe2c87594f0ae0d Author: Bart Van Assche Date: Fri Aug 25 13:46:38 2017 -0700 scsi: libsas: Remove a set-but-not-used variable This was detected by building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_scsi_host.c | 3 --- 1 file changed, 3 deletions(-) commit 4dec6a8fc5c23f5a949d6b3853234dc8ae3f0110 Author: Bart Van Assche Date: Fri Aug 25 13:46:37 2017 -0700 scsi: libiscsi: Fix indentation This patch avoids that smatch reports the following: drivers/scsi/libiscsi.c:1081: iscsi_handle_reject() warn: inconsistent indenting Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7475c8ae1b7bfc20b0fa586e6fc5155bac5d208b Author: Bart Van Assche Date: Fri Aug 25 13:46:36 2017 -0700 scsi: sg: Fix type of last blk_trace_setup() argument Avoid that sparse reports the following: drivers/scsi/sg.c:1114:41: warning: incorrect type in argument 5 (different address spaces) drivers/scsi/sg.c:1114:41: expected char [noderef] *arg drivers/scsi/sg.c:1114:41: got char * This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 830cc351bc3c7f867daf92f17992bca34a647d8c Author: Bart Van Assche Date: Fri Aug 25 13:46:35 2017 -0700 scsi: sd: Remove a useless comparison This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/sd.c:315:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION) Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed91f7ed38a57df422590b0250ae9ab678197777 Author: Bart Van Assche Date: Fri Aug 25 13:46:34 2017 -0700 scsi: sd: Fix indentation This patch avoids that smatch reports the following: drivers/scsi/sd.c:3540: sd_suspend_common() warn: inconsistent indenting Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0624cbb1e2e64ae4d7d55dc81fc39a0af87a2bd7 Author: Bart Van Assche Date: Fri Aug 25 13:46:33 2017 -0700 scsi: sd: sr: Convert two assignments into warning statements Before scsi_prep_fn() calls the ULP .init_command() callback function it stores the SCSI command pointer in request.special. This means that the SCpnt = rq->special assignments in the sd and sr drivers assign a pointer to itself. Hence convert these two assignment statements into warning statements. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 +- drivers/scsi/sr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bed2213d01de474eb8a6f3891070eec6be6fe772 Author: Bart Van Assche Date: Fri Aug 25 13:46:32 2017 -0700 scsi: Use blk_mq_rq_to_pdu() to convert a request to a SCSI command pointer Since commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") struct request and struct scsi_cmnd are adjacent. This means that there is now an alternative to reading req->special to convert a pointer to a prepared request into a SCSI command pointer, namely by using blk_mq_rq_to_pdu(). Make this change where appropriate. Although this patch does not change any functionality, it slightly improves performance and slightly improves readability. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 2 +- drivers/scsi/scsi_lib.c | 18 +++++++++--------- include/scsi/scsi_tcq.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit e7008ff5c61a13e673344d3048baaf8e0652fa87 Author: Bart Van Assche Date: Fri Aug 25 13:46:31 2017 -0700 scsi: Document which queue type a function is intended for Rename several functions to make it easy to see which queue type a function is intended for. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 23 ++++++++++++----------- drivers/scsi/scsi_priv.h | 2 +- drivers/scsi/scsi_scan.c | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) commit 3991e4605dd3a8c7180a5ddd60d802108e880027 Author: Bart Van Assche Date: Fri Aug 25 13:46:30 2017 -0700 scsi: Convert a strncmp() call into a strcmp() call This patch avoids that smatch reports the following warning: drivers/scsi/scsi_sysfs.c:117: check_set() error: strncmp() '"-"' too small (2 vs 20) Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bf2ff6749f0f87d719bf8f67eccecfde742f2b3 Author: Bart Van Assche Date: Fri Aug 25 13:46:29 2017 -0700 scsi: Suppress gcc 7 fall-through warnings reported with W=1 The conclusion of a recent discussion about the new warnings reported by gcc 7 is that the new warnings reported when building with W=1 should be suppressed. However, gcc 7 still warns about fall-through in switch statements when building with W=1. Suppress these warnings by annotating the SCSI core properly. See also Linus Torvalds, Lots of new warnings with gcc-7.1.1, 11 July 2017 (https://www.mail-archive.com/linux-media@vger.kernel.org/msg115428.html). References: commit bd664f6b3e37 ("disable new gcc-7.1.1 warnings for now") 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_error.c | 8 +++++++- drivers/scsi/scsi_ioctl.c | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) commit c2e872a27c610a5e2a71444f86470f765ed9dfce Author: Bart Van Assche Date: Fri Aug 25 13:46:28 2017 -0700 scsi: Avoid sign extension of scsi_device.type This patch avoids that smatch reports the following: drivers/scsi/scsi_sysfs.c:506 scsi_bus_uevent() warn: argument 3 to %02x specifier has type 'char' drivers/scsi/scsi_sysfs.c:872 sdev_show_modalias() warn: argument 4 to %02x specifier has type 'char' Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f52d53a9a0e08e3a003f0f3ff8e163125319af5a Author: Bart Van Assche Date: Fri Aug 25 13:46:27 2017 -0700 scsi: Remove an obsolete function declaration Commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") removed the scsi_get_command() function. Hence also remove the declaration of that function. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi_cmnd.h | 1 - 1 file changed, 1 deletion(-) commit 0d06a42f794bec6061e170fa9468d878051bc8b1 Author: Shaohua Li Date: Fri Aug 25 13:46:25 2017 -0700 block/nullb: fix NULL dereference Dan reported this: The patch 2984c8684f96: "nullb: factor disk parameters" from Aug 14, 2017, leads to the following Smatch complaint: drivers/block/null_blk.c:1759 null_init_tag_set() error: we previously assumed 'nullb' could be null (see line 1750) 1755 set->cmd_size = sizeof(struct nullb_cmd); 1756 set->flags = BLK_MQ_F_SHOULD_MERGE; 1757 set->driver_data = NULL; 1758 1759 if (nullb->dev->blocking) ^^^^^^^^^^^^^^^^^^^^ And an unchecked dereference. nullb could be NULL here. Reported-by: Dan Carpenter Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30d6e0a4190d37740e9447e4e4815f06992dd8c3 Author: Jiri Slaby Date: Thu Aug 24 09:31:05 2017 +0200 futex: Remove duplicated code and fix undefined behaviour There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. This effectively distributes the Will Deacon's arm64 fix for undefined behaviour reported by UBSAN to all architectures. The fix was done in commit 5f16a046f8e1 (arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage). Look there for an example dump. And as suggested by Thomas, check for negative oparg too, because it was also reported to cause undefined behaviour report. Note that s390 removed access_ok check in d12a29703 ("s390/uaccess: remove pointless access_ok() checks") as access_ok there returns true. We introduce it back to the helper for the sake of simplicity (it gets optimized away anyway). Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Acked-by: Russell King Acked-by: Michael Ellerman (powerpc) Acked-by: Heiko Carstens [s390] Acked-by: Chris Metcalf [for tile] Reviewed-by: Darren Hart (VMware) Reviewed-by: Will Deacon [core/arm64] Cc: linux-mips@linux-mips.org Cc: Rich Felker Cc: linux-ia64@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: peterz@infradead.org Cc: Benjamin Herrenschmidt Cc: Max Filippov Cc: Paul Mackerras Cc: sparclinux@vger.kernel.org Cc: Jonas Bonn Cc: linux-s390@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: Yoshinori Sato Cc: linux-hexagon@vger.kernel.org Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Catalin Marinas Cc: Matt Turner Cc: linux-snps-arc@lists.infradead.org Cc: Fenghua Yu Cc: Arnd Bergmann Cc: linux-xtensa@linux-xtensa.org Cc: Stefan Kristiansson Cc: openrisc@lists.librecores.org Cc: Ivan Kokshaysky Cc: Stafford Horne Cc: linux-arm-kernel@lists.infradead.org Cc: Richard Henderson Cc: Chris Zankel Cc: Michal Simek Cc: Tony Luck Cc: linux-parisc@vger.kernel.org Cc: Vineet Gupta Cc: Ralf Baechle Cc: Richard Kuo Cc: linux-alpha@vger.kernel.org Cc: Martin Schwidefsky Cc: linuxppc-dev@lists.ozlabs.org Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20170824073105.3901-1-jslaby@suse.cz arch/alpha/include/asm/futex.h | 26 ++++--------------- arch/arc/include/asm/futex.h | 40 ++++------------------------- arch/arm/include/asm/futex.h | 26 +++---------------- arch/arm64/include/asm/futex.h | 26 +++---------------- arch/frv/include/asm/futex.h | 3 ++- arch/frv/kernel/futex.c | 27 +++----------------- arch/hexagon/include/asm/futex.h | 38 +++------------------------- arch/ia64/include/asm/futex.h | 25 +++---------------- arch/microblaze/include/asm/futex.h | 38 +++------------------------- arch/mips/include/asm/futex.h | 25 +++---------------- arch/openrisc/include/asm/futex.h | 39 +++-------------------------- arch/parisc/include/asm/futex.h | 26 +++---------------- arch/powerpc/include/asm/futex.h | 26 ++++--------------- arch/s390/include/asm/futex.h | 23 ++++------------- arch/sh/include/asm/futex.h | 26 +++---------------- arch/sparc/include/asm/futex_64.h | 26 ++++--------------- arch/tile/include/asm/futex.h | 40 ++++------------------------- arch/x86/include/asm/futex.h | 40 ++++------------------------- arch/xtensa/include/asm/futex.h | 27 ++++---------------- include/asm-generic/futex.h | 50 +++++++------------------------------ kernel/futex.c | 39 +++++++++++++++++++++++++++++ 21 files changed, 130 insertions(+), 506 deletions(-) commit b33394ba5c0974a578c24b2fecbb91a984da5e09 Author: Thomas Gleixner Date: Fri Aug 25 22:34:05 2017 +0200 genirq/proc: Avoid uninitalized variable warning kernel/irq/proc.c: In function ‘show_irq_affinity’: include/linux/cpumask.h:24:29: warning: ‘mask’ may be used uninitialized in this function [-Wmaybe-uninitialized] #define cpumask_bits(maskp) ((maskp)->bits) gcc is silly, but admittedly it can't know that this won't be called with anything else than the enumerated constants. Shut up the warning by creating a default clause. Fixes: 6bc6d4abd22e ("genirq/proc: Use the the accessor to report the effective affinity Signed-off-by: Thomas Gleixner kernel/irq/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20c4d49c0f304f3f945bbd560b26afa98f75a0c4 Author: Dan Carpenter Date: Fri Aug 25 15:14:09 2017 +0300 irqdomain: Prevent potential NULL pointer dereference in irq_domain_push_irq() This code generates a Smatch warning: kernel/irq/irqdomain.c:1511 irq_domain_push_irq() warn: variable dereferenced before check 'root_irq_data' (see line 1508) irq_get_irq_data() can return a NULL pointer, but the code dereferences the returned pointer before checking it. Move the NULL pointer check before the dereference. [ tglx: Rewrote changelog to be precise and conforming to the instructions in submitting-patches and added a Fixes tag. Sigh! ] Fixes: 495c38d3001f ("irqdomain: Add irq_domain_{push,pop}_irq() functions") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Gleixner Acked-by: David Daney Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170825121409.6rfv4vt6ztz2oqkt@mwanda kernel/irq/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce8bdd6957202a38d67038e5ec940eed50f9f3eb Author: kbuild test robot Date: Tue Aug 22 15:50:53 2017 +0800 genirq: Fix semicolon.cocci warnings kernel/irq/proc.c:69:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 0d3f54257dc3 ("genirq: Introduce effective affinity mask") Signed-off-by: Fengguang Wu Signed-off-by: Thomas Gleixner Cc: kbuild-all@01.org Link: http://lkml.kernel.org/r/20170822075053.GA93890@lkp-hsx02 kernel/irq/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d56593eb5eda8f593db92927059697bbf89bc4b3 Author: Tony Luck Date: Thu Aug 24 09:26:52 2017 -0700 x86/intel_rdt: Turn off most RDT features on Skylake Errata list is included in this document: https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/6th-gen-x-series-spec-update.pdf with more details in: https://www.intel.com/content/www/us/en/processors/xeon/scalable/xeon-scalable-spec-update.html But the tl;dr summary (using tags from first of the documents) is: SKZ4 MBM does not accurately track write bandwidth SKZ17 CMT counters may not count accurately SKZ18 CAT may not restrict cacheline allocation under certain conditions SKZ19 MBM counters may undercount Disable all these features on Skylake models. Users who understand the errata may re-enable using boot command line options. Signed-off-by: Tony Luck Cc: Fenghua" Cc: Ravi V" Cc: "Peter Zijlstra" Cc: "Stephane Eranian" Cc: "Andi Kleen" Cc: "David Carrillo-Cisneros" Cc: Vikas Shivappa Link: http://lkml.kernel.org/r/3aea0a3bae219062c812668bd9b7b8f1a25003ba.1503512900.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt.c | 3 +++ 1 file changed, 3 insertions(+) commit 1d9807fc64c131a83a96917f2b2da1c9b00cf127 Author: Tony Luck Date: Thu Aug 24 09:26:51 2017 -0700 x86/intel_rdt: Add command line options for resource director technology Command line options allow us to ignore features that we don't want. Also we can re-enable options that have been disabled on a platform (so long as the underlying h/w actually supports the option). [ tglx: Marked the option array __initdata and the helper function __init ] Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua" Cc: Ravi V" Cc: "Peter Zijlstra" Cc: "Stephane Eranian" Cc: "Andi Kleen" Cc: "David Carrillo-Cisneros" Cc: Vikas Shivappa Link: http://lkml.kernel.org/r/0c37b0d4dbc30977a3c1cee08b66420f83662694.1503512900.git.tony.luck@intel.com Documentation/admin-guide/kernel-parameters.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 6 ++ arch/x86/kernel/cpu/intel_rdt.c | 96 ++++++++++++++++++++++--- 3 files changed, 95 insertions(+), 8 deletions(-) commit 0576113a387e0c8a5d9e24b4cd62605d1c9c0db8 Author: Tony Luck Date: Thu Aug 24 09:26:50 2017 -0700 x86/intel_rdt: Move special case code for Haswell to a quirk function No functional change, but lay the ground work for other per-model quirks. Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua" Cc: Ravi V" Cc: "Peter Zijlstra" Cc: "Stephane Eranian" Cc: "Andi Kleen" Cc: "David Carrillo-Cisneros" Cc: Vikas Shivappa Link: http://lkml.kernel.org/r/f195a83751b5f8b1d8a78bd3c1914300c8fa3142.1503512900.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt.c | 52 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 4c18c9e962eb02e23731e5b40d4474fb04fdcb23 Author: weiping zhang Date: Fri Aug 25 23:49:32 2017 +0800 blkcg: avoid free blkcg_root when failed to alloc blkcg policy this patch fix two errors, firstly avoid kfree blk_root, secondly not free(blkcg) ,if blkcg alloc fail(blkcg == NULL), just unlock that mutex; Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-cgroup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 231b3db18d4be74e8b199916911c2c16db1790de Author: Jens Axboe Date: Fri Aug 25 12:53:15 2017 -0600 null_blk: update email adress Update to a working one, the fusionio address hasn't been valid in 4 years. Signed-off-by: Jens Axboe drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a8e6f84ad10e7a10bde438b42926da0e9bc820f Author: Shaohua Li Date: Fri Aug 18 10:27:59 2017 -0700 md/raid0: attach correct cgroup info in bio The discard bio doesn't attach the original bio cgroup info. Normal bio is cloned, so is fine. Signed-off-by: Shaohua Li block/bio.c | 2 +- drivers/md/raid0.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit b5e0fff19bef3a36631bce742e363d3a99590c3a Author: Denys Vlasenko Date: Sat Aug 12 19:43:46 2017 +0200 lib/raid6: align AVX512 constants to 512 bits, not bytes Signed-off-by: Denys Vlasenko Cc: H. Peter Anvin Cc: mingo@redhat.com Cc: Jim Kukunas Cc: Fenghua Yu Cc: Megha Dey Cc: Gayatri Kammela Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shaohua Li lib/raid6/avx512.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27a4ff8f49a9b912be76f36f7e198824cf0aecd9 Author: Guoqing Jiang Date: Thu Aug 10 16:12:17 2017 +0800 raid5: remove raid5_build_block Now raid5_build_block is just called to set the sector of r5dev, raid5_compute_blocknr can be used directly for the purpose. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid5.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit a72cbf83b0cb2368568d4e78cf1687079aad4d25 Author: Song Liu Date: Tue Aug 8 22:56:52 2017 -0700 md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show In r5c_journal_mode_show(), it is necessary to call mddev_lock() before accessing conf and conf->log. Otherwise, the conf->log may change (and become NULL). Signed-off-by: Song Liu Reported-by: Stephen Rothwell Reported-by: kbuild test robot Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 26e13043b7ea14c0b038f3f5a4af0d5cdda9e95f Author: Cihangir Akturk Date: Sat Jul 29 19:52:45 2017 +0300 md: replace seq_release_private with seq_release Since commit f15146380d28 ("fs: seq_file - add event counter to simplify poll() support"), md.c code has been no longer used the private field of the struct seq_file, but seq_release_private() has been continued to be used to release the allocated seq_file. This seems to have been forgotten. So convert it to use seq_release() instead of seq_release_private(). Signed-off-by: Cihangir Akturk Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5492c46e94b57b5137e3ba2c9ae22b2dcc3fc2cc Author: Alexey Obitotskiy Date: Fri Jul 28 15:49:25 2017 +0200 md: notify about new spare disk in the container In case of external metadata arrays spare disks are added to containers first. mdadm keeps monitoring /proc/mdstat output and when spare disk is available, it moves it from the container to the array. The problem is there is no notification of new spare disk in the container and mdadm waits a long time (until timeout) before it takes the action. Signed-off-by: Alexey Obitotskiy Signed-off-by: Shaohua Li drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) commit 208410b546207cfc4c832635fa46419cfa86b4cd Author: Shaohua Li Date: Thu Aug 24 17:50:40 2017 -0700 md/raid1/10: reset bio allocated from mempool Data allocated from mempool doesn't always get initialized, this happens when the data is reused instead of fresh allocation. In the raid1/10 case, we must reinitialize the bios. Reported-by: Jonathan G. Underwood Fixes: f0250618361d(md: raid10: don't use bio's vec table to manage resync pages) Fixes: 98d30c5812c3(md: raid1: don't use bio's vec table to manage resync pages) Cc: stable@vger.kernel.org (4.12+) Cc: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 19 ++++++++++++++++++- drivers/md/raid10.c | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 4 deletions(-) commit 3140c3cfae41e450f05bdb467a919fdde679c0ae Author: Omar Sandoval Date: Thu Aug 24 11:09:25 2017 -0700 block: update comments to reflect REQ_FLUSH -> REQ_PREFLUSH rename Normally I wouldn't bother with this, but in my opinion the comments are the most important part of this whole file since without them no one would have any clue how this insanity works. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-flush.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 1f87c7c15d77350c4ab1c14d9ab8df2a1f1010d1 Author: Shuah Khan Date: Wed Aug 23 18:46:00 2017 -0600 selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format Change common RUN_TESTS to print messages in user friendly TAP13 format. This change add TAP13 header at the start of RUN_TESTS target run, and prints the resulting pass/fail messages with test number information in the TAP 13 format for each test in the run tests list. This change covers test scripts as well as test programs. Test programs have an option to use ksft_ API, however test scripts won't be able to. With this change, test scripts can print TAP13 format output without any changes to individual scripts. Test programs can provide TAP13 format output as needed as some tests already do. Tests that haven't been converted will benefit from this change. Tests that are converted benefit from the test counts for all the tests in each test directory. Running firmware tests: make --silent -C tools/testing/selftests/firmware/ run_tests Before the change: modprobe: ERROR: could not insert 'test_firmware': Operation not permitted ./fw_filesystem.sh: /sys/devices/virtual/misc/test_firmware not present You must have the following enabled in your kernel: CONFIG_TEST_FIRMWARE=y selftests: fw_filesystem.sh [FAIL] modprobe: ERROR: could not insert 'test_firmware': Operation not permitted selftests: fw_fallback.sh [FAIL] After the change: TAP version 13 selftests: fw_filesystem.sh ======================================== modprobe: ERROR: could not insert 'test_firmware': Operation not permitted ./fw_filesystem.sh: /sys/devices/virtual/misc/test_firmware not present You must have the following enabled in your kernel: CONFIG_TEST_FIRMWARE=y not ok 1..1 selftests: fw_filesystem.sh [FAIL] selftests: fw_fallback.sh ======================================== modprobe: ERROR: could not insert 'test_firmware': Operation not permitted not ok 1..2 selftests: fw_fallback.sh [FAIL] Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 77d802e237c89a8b3d2879510c68625fda8ac0df Author: Shuah Khan Date: Wed Aug 23 14:42:44 2017 -0600 selftests: change lib.mk RUN_TESTS to take test list as an argument Change lib.mk RUN_TESTS to take test list as an argument. This will allow it to be called from individual test makefiles to run additional tests that aren't suitable for a default kselftest run. As an example, timers test includes destructive tests that aren't included in the common run_tests target. Change times/Makefile to use RUN_TESTS call with destructive test list as an argument instead of using its own RUN_TESTS target. Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 4 ++-- tools/testing/selftests/timers/Makefile | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) commit 96a1c173ea6576652df8564fabc5fe95e3d82d52 Author: Bhumika Goyal Date: Fri Aug 25 19:51:43 2017 +0530 ieee802154: 6lowpan: make header_ops const Make this const as it is only stored as a reference in a const field of a net_device structure. Signed-off-by: Bhumika Goyal Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/ieee802154/6lowpan/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49b7364561f034147c9aec2b346451c3f61d0a28 Author: Shuah Khan Date: Fri Aug 18 17:03:53 2017 -0600 selftests: lib.mk: suppress "cd" output from run_tests target Suppress "cd" output from run_tests while running tests to declutter the test results. Running efivarfs test: make --silent -C tools/testing/selftests/efivarfs/ run_tests Before the change: skip all tests: must be run as root selftests: efivarfs.sh [PASS] /lkml/linux-kselftest/tools/testing/selftests/efivarfs After the change: skip all tests: must be run as root selftests: efivarfs.sh [PASS] Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11867a77eb854248a1e7a1b4e8ba58aadadd7701 Author: Shuah Khan Date: Fri Aug 18 20:51:05 2017 -0600 selftests: kselftest framework: change skip exit code to 0 When a test is skipped, instead of using a special exit code of 4, treat it as pass condition and use exit code of 0. It makes sense to treat skip as pass since the test couldn't be run as opposed to a failed test. Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f14e26b63b1b6c7c681409e9db1bbf054e00b32 Author: Benjamin Gaignard Date: Wed Aug 23 18:07:05 2017 +0200 selftests/timers: make loop consistent with array size clocksource_list array is defined as char [10][30] so to initialise it we only have to iterate 10 times. Signed-off-by: Benjamin Gaignard Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 561b796987af8b169c47375194527219ef5b0974 Author: Andreas Gruenbacher Date: Tue Aug 22 12:17:35 2017 -0500 gfs2: Silence gcc format-truncation warning Enlarge sd_fsname to be big enough for the longest long lock table name and an arbitrary journal number. This silences two -Wformat-truncation warnings with gcc 7.1.1. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/incore.h | 2 +- fs/gfs2/ops_fstype.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 942b0cddfbf66295effc9fd879ca85ae10638565 Author: Bob Peterson Date: Wed Aug 16 11:30:06 2017 -0500 GFS2: Withdraw for IO errors writing to the journal or statfs Before this patch, if GFS2 encountered IO errors while writing to the journal, it would not report the problem, so they would go unnoticed, sometimes for many hours. Sometimes this would only be noticed later, when recovery tried to do journal replay and failed due to invalid metadata at the blocks that resulted in IO errors. This patch makes GFS2's log daemon check for IO errors. If it encounters one, it withdraws from the file system and reports why in dmesg. A similar action is taken when IO errors occur when writing to the system statfs file. These errors are also reported back to any callers of fsync, since that requires the journal to be flushed. Therefore, any IO errors that would previously go unnoticed are now noticed and the file system is withdrawn as early as possible, thus preventing further file system damage. Also note that this reintroduces superblock variable sd_log_error, which Christoph removed with commit f729b66fca. Signed-off-by: Bob Peterson fs/gfs2/incore.h | 1 + fs/gfs2/log.c | 9 +++++++++ fs/gfs2/lops.c | 7 +++++-- fs/gfs2/quota.c | 5 ++++- fs/gfs2/super.c | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) commit 6d7e3bf8d12c0ae8b297de428e67301df1b95c5f Author: Andy Shevchenko Date: Fri Aug 25 18:33:13 2017 +0300 of: Use PLATFORM_DEVID_NONE definition Use dedicated definition instead of plain -1 where it's appropriate. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Rob Herring drivers/of/device.c | 2 +- drivers/of/platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a0e7df335afd2a8a8a688251ffee375b58b6517c Author: Alexander Shishkin Date: Fri Feb 24 16:09:40 2017 +0200 intel_th: Perform time resync on capture start On some devices (TH 2.x devices at the moment), the internal time counter is initially not synchronized to the global crystal clock, so the time stamps it produces will not be useful. In this case, the driver needs to force the time counter resync. This applies the workaround to relevant devices. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 3 +- drivers/hwtracing/intel_th/gth.c | 23 ++++++++++---- drivers/hwtracing/intel_th/gth.h | 5 ++++ drivers/hwtracing/intel_th/intel_th.h | 4 +++ drivers/hwtracing/intel_th/pci.c | 56 +++++++++++++++++++++++++++++++++-- 5 files changed, 82 insertions(+), 9 deletions(-) commit 29e15e83a99cdc13d0d38de558fbea641f8fdda8 Author: Alexander Shishkin Date: Fri Aug 25 15:47:22 2017 +0300 intel_th: Add global activate/deactivate callbacks for the glue layers A glue layer may want to install its own hooks into trace capture start and stop paths to apply workarounds. This adds optional callbacks. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 26 ++++++++++++++++++++++---- drivers/hwtracing/intel_th/intel_th.h | 2 ++ 2 files changed, 24 insertions(+), 4 deletions(-) commit 3321371b5d648479058fa6f9441168abbc1467c9 Author: Alexander Shishkin Date: Fri Aug 18 17:57:35 2017 +0300 intel_th: pci: Use drvdata for quirks Allow attaching miscellaneous quirk information to devices as drvdata. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 6 ++++-- drivers/hwtracing/intel_th/intel_th.h | 27 ++++++++++++++++++++------- drivers/hwtracing/intel_th/pci.c | 3 ++- 3 files changed, 26 insertions(+), 10 deletions(-) commit efb3669e14fe17d0ec4ecf57d0365039fe726f59 Author: Alexander Shishkin Date: Thu Jun 30 16:11:31 2016 +0300 intel_th: pci: Add Cannon Lake PCH-LP support This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-LP. Signed-off-by: Alexander Shishkin Cc: drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 84331e1390b6378a5129a3678c87a42c6f697d29 Author: Alexander Shishkin Date: Thu Jun 30 16:11:13 2016 +0300 intel_th: pci: Add Cannon Lake PCH-H support This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-H. Signed-off-by: Alexander Shishkin Cc: drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit f77d22bc1221409b6c0cb6f32c6241161f5c2bc6 Author: Alexander Shishkin Date: Fri Nov 11 12:07:25 2016 +0200 intel_th: pti: Support Low Power Path output port type The Low Power Path (LPP) output port type, looks mostly like PTI to the software, with a few additional bits in the control register. This extends the PTI driver to support LPP ports as well. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/pti.c | 115 +++++++++++++++++++++++++++++++++++++-- drivers/hwtracing/intel_th/pti.h | 8 +++ 2 files changed, 118 insertions(+), 5 deletions(-) commit 92758af39ab73f470f765b7213fb4c88c7e5ca03 Author: Alexander Shishkin Date: Fri Nov 11 12:09:11 2016 +0200 intel_th: Enumerate Low Power Path output port type Trace Hub 2.x adds Low Power Path (LPP) output port type, which provides a low power mode trace path from sources to PTI or BSSB. This adds an output subdevice for the LPP port. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 15 +++++++++++++++ drivers/hwtracing/intel_th/intel_th.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) commit d5c435df4a890be0ef51f3047080756002d140dd Author: Alexander Shishkin Date: Fri Feb 24 16:05:22 2017 +0200 intel_th: msu: Use the real device in case of IOMMU domain allocation When allocating DMA buffers for the MSU, use the real device instead of GTH. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/msu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a753bfcfdb1f31d74b5ec87faa19f15e8c7b44a2 Author: Alexander Shishkin Date: Thu Aug 10 18:28:38 2017 +0300 intel_th: Make the switch allocate its subdevices Instead of allocating devices for every possible output subdevice, allow the switch to allocate only the ones that it knows about. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 288 ++++++++++++++++++++++++---------- drivers/hwtracing/intel_th/gth.c | 17 +- drivers/hwtracing/intel_th/intel_th.h | 13 +- 3 files changed, 230 insertions(+), 88 deletions(-) commit 178b356839a3a9ce4a4e8e5780883a18992a010e Author: Katsuhiro Suzuki Date: Mon Aug 21 20:55:04 2017 +0900 arm64: dts: uniphier: add reset controller node of analog amplifier This patch adds reset controller node of analog signal amplifier core (ADAMV) for UniPhier LD11/LD20 SoCs. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 11 +++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 11 +++++++++++ 2 files changed, 22 insertions(+) commit 8edc514b01e9cfbc037c708e5260f248cbb4d867 Author: Alexander Shishkin Date: Fri Nov 18 15:36:39 2016 +0200 intel_th: Make SOURCE devices children of the root device The switch (GTH) does not directly interact with SOURCE type devices and may not even be present (in host mode). To reflect this and avoid inconsistencies between target and host mode, make SOURCE devices descendant directly from the root (i.e. PCI) device. Their symlinks will no longer appear under the switch device, but they can still be found under intel_th bus. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 6 +++--- drivers/hwtracing/intel_th/intel_th.h | 39 +++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 18 deletions(-) commit 5e06723af998779210dffe9553b36b28955d5860 Author: Alexander Shishkin Date: Fri Nov 18 15:05:01 2016 +0200 intel_th: Streamline the subdevice tree accessors Make to_intel_th*() accessors available from the main header file. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/core.c | 15 --------------- drivers/hwtracing/intel_th/intel_th.h | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 16 deletions(-) commit 5376be63ff4ff357d40dbe75c925d7cd5aef19a9 Author: Alexander Shishkin Date: Fri Nov 18 14:51:05 2016 +0200 intel_th: Output devices without ports don't need assigning Output subdevices that rely on other output subdevices (or otherwise don't directly talk to an output port on the switch) don't need to be assigned an output port either. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/intel_th.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit e9b2b3e7933529647a5f284136f5a6bfa9c679ae Author: Alexander Shishkin Date: Thu Aug 10 11:10:58 2017 +0300 intel_th: pci: Enable bus mastering The driver forgets to enable bus mastering for the PCI device. Fix this. Signed-off-by: Alexander Shishkin drivers/hwtracing/intel_th/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 39fccd2fc33c95de8358451f58c52b9e4b828ddd Author: Chunyan Zhang Date: Thu Mar 23 14:13:25 2017 +0800 stm class: Document the stm_ftrace This patch adds a description to the stm_ftrace device source, an interface for collecting Ftrace's function trace information via STM devices. Signed-off-by: Chunyan Zhang Signed-off-by: Alexander Shishkin Documentation/trace/stm.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 71c488f32b071bfb5cfe9ddf682cd2e0c310c75d Author: Dan Carpenter Date: Thu Aug 10 15:45:10 2017 +0300 stm: Potential read overflow in stm_char_policy_set_ioctl() The "size" variable comes from the user so we need to verify that it's large enough to hold an stp_policy_id struct. Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") Signed-off-by: Dan Carpenter Signed-off-by: Alexander Shishkin drivers/hwtracing/stm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5237e95f63761477b7ea45499d08b89383a77eab Author: Robin Murphy Date: Mon Jul 24 18:29:27 2017 +0100 dma-mapping: reduce dma_mapping_error inline bloat Thanks to the nested inlining, all drivers correctly calling dma_mapping_error() after a mapping a page or single buffer generate two calls to get_arch_dma_ops() per callsite, which all adds up to a fair old chunk of useless code, e.g. ~3KB for an arm64 defconfig plus extras: text data bss dec hex filename 13051391 1503898 327768 14883057 e318f1 vmlinux.o.old 13050751 1503898 327768 14882417 e31671 vmlinux.o.new Give the compiler a hand by making it clear we want the same ops. Signed-off-by: Robin Murphy Reviewed-by: Marek Szyprowski Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6969b2bae6dbe7f277a7c018b66d2f3ad662129f Author: Kuninori Morimoto Date: Fri Aug 25 00:29:41 2017 +0000 ASoC: remove duplicate definition of dapm_routes/num_dapm_routes snd_soc_component and snd_soc_component_driver both have dapm_routes/num_dapm_routes, but these are duplicated. Let's remove duplicated definition. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 -- sound/soc/soc-core.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) commit 688d0ebf49a97aa6959aebec5d177a8b821f27d1 Author: Kuninori Morimoto Date: Fri Aug 25 00:29:20 2017 +0000 ASoC: remove duplicate definition of dapm_widgets/num_dapm_widgets snd_soc_component and snd_soc_component_driver both have dapm_widgets/num_dapm_widgets, but these are duplicated. Let's remove duplicated definition. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) commit b8972bf0521ca7ee3c8d27da0fd101fe648acfc2 Author: Kuninori Morimoto Date: Fri Aug 25 00:29:01 2017 +0000 ASoC: remove duplicate definition of controls/num_controls snd_soc_component and snd_soc_component_driver both have controls/num_controls, but these are duplicated. Let's remove duplicated definition. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) commit 3dfcd3468cf05861654b1c7857500da6c8a9fc88 Author: John Hsu Date: Fri Aug 25 11:35:44 2017 +0800 ASoC: nau8825: correct typo of semaphore comment There are a lot of typo about semaphore in the comment. Correct it from semaphone to semaphore. Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 88c27465dc7e3f11c43de295f623c44f593a0912 Author: Kuninori Morimoto Date: Fri Aug 25 01:06:04 2017 +0000 ASoC: use snd_soc_component_get_dapm() Now we have snd_soc_component_get_dapm(), and as soc.h say below, let's use it. /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91fe0e70dbfb1142e17cebaa9186794b51a28cf7 Author: Jeeja KP Date: Wed Aug 23 19:33:54 2017 +0530 ASoC: Intel: Skylake: Update module id in pin connections Each module's id comes from the topology and gets updated in the driver. This patch updates the input and output pin connections of each module by matching the uuid for each module. Signed-off-by: Jeeja KP Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 41 +++++++++++++++++++++++++++++++--- sound/soc/intel/skylake/skl-topology.h | 1 + 2 files changed, 39 insertions(+), 3 deletions(-) commit f6fa56e22559ade7287ca7c1b7218a08f516f379 Author: Ramesh Babu Date: Wed Aug 23 19:33:53 2017 +0530 ASoC: Intel: Skylake: Parse and update module config structure A dsp path and the modules in the path can support various pcm configurations. The list of supported pcm configurations from topology manifest would be stored and later selected runtime based on the hw pcm params. For legacy, module data is filled in the 0th index of resource and interface table. To accommodate both models, change the relevant structures and populate them by parsing newly defined tokens. This change is backward compatible with the existing model where driver computes the resources required by each dsp module. Signed-off-by: Ramesh Babu Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 59 ++++-- sound/soc/intel/skylake/skl-pcm.c | 3 +- sound/soc/intel/skylake/skl-topology.c | 342 +++++++++++++++++++++++++-------- sound/soc/intel/skylake/skl-topology.h | 25 +++ 4 files changed, 334 insertions(+), 95 deletions(-) commit db6ed55de6da1125ff349bfe4ef12d18c366e893 Author: Shreyas NC Date: Wed Aug 23 19:33:52 2017 +0530 ASoC: Intel: Skylake: Populate module data from topology manifest All the module common data will now be populated in the topology manifest. This includes the resource and interface list supported by the module. With this, driver need not compute the resources required by each dsp module for a particular pcm parameter since it comes as a part of the topology manifest. So, add functions to parse the manifest tokens to populate the module config data structure. Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 320 ++++++++++++++++++++++++++++++++- 1 file changed, 316 insertions(+), 4 deletions(-) commit 822c3b044f7fbecc9894fcd3d19fc2ad51232fdb Author: Shreyas NC Date: Wed Aug 23 19:33:51 2017 +0530 ASoC: Intel: Skylake: Add driver structures to be filled from topology manifest The topology manifest would include module common data including resource and interface table. The resource table consists of resources required by the dsp module such as buffer size, cycles per second, number of input/output pins. And, the interface table consists of pcm parameters per module which can be referenced later. So define the structures accordingly to represent topology manifest data in the driver. Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.h | 52 ++++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl.h | 2 ++ 2 files changed, 54 insertions(+) commit ca312fda690e94c704bcb0e21b73b5d5bd1cf1ff Author: Shreyas NC Date: Wed Aug 23 19:33:50 2017 +0530 ASoC: Intel: Skylake: Commonize parsing of format tokens Format resource tokens can be a part of either the widget or manifest private data. In the current model, format resources come as a part of widget private data and they come as a part of topology manifest in the newly introduced model. So add a common function that can fill up either of the structures. Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 47 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) commit 3d52a7924172adf651eda8f1c95ff38146059307 Author: Shreyas NC Date: Wed Aug 23 19:33:49 2017 +0530 ASoC: Intel: uapi: Add new tokens for module common data The module private data can be modelled independent of its instances so that it can be reused by the module instances. So move module data to common manifest which can be referenced by the module instances. This requires new tokens to be defined to accommodate these changes. The new tokens will specify buffer sizes, DSP cycles and respective indexes corresponding to the pcm params in the topology manifest so that driver need not compute them. Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown include/uapi/sound/snd_sst_tokens.h | 92 ++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit 9fc129f6e5de01ce5fccf033485e40dfa429b45c Author: Shreyas NC Date: Wed Aug 23 19:33:48 2017 +0530 ASoC: Intel: Skylake: Parse multiple manifest data blocks Currently we can parse a single manifest data block. But manifest private data can have multiple data blocks. So, fix the parsing logic to parse multiple data blocks by returning offset of each parsed data block. Signed-off-by: Shreyas NC Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 6a6dafda937cfcdbbfe46a3e093de8bb929ba52d Author: Jeffy Chen Date: Thu Aug 24 12:40:17 2017 +0800 ASoC: Add a sanity check before using dai driver name The dai driver's name is allowed to be NULL. So add a sanity check for that. Signed-off-by: Jeffy Chen Reported-by: Donglin Peng Signed-off-by: Mark Brown sound/soc/soc-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b7e2672d1a23a53bd2657704bf94a8dc8880cc49 Merge: c0d1cb8 9ce7651 Author: Mark Brown Date: Fri Aug 25 14:44:05 2017 +0100 Merge tag 'sound-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-rt5677 sound fixes for 4.13-rc7 We're keeping in a good shape, this batch contains just a few small fixes (a regression fix for ASoC rt5677 codec, NULL dereference and error-path fixes in firewire, and a corner-case ioctl error fix for user TLV), as well as usual quirks for USB-audio and HD-audio. commit 712b12d72451411c40e39d25e2140fb8c7fd0e49 Author: Jim Mattson Date: Thu Aug 24 13:24:47 2017 -0700 kvm: nVMX: Validate the virtual-APIC address on nested VM-entry According to the SDM, if the "use TPR shadow" VM-execution control is 1, bits 11:0 of the virtual-APIC address must be 0 and the address should set any bits beyond the processor's physical-address width. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bbdacdfed2f5fa50a2cc9f500a36e05990a0837d Author: Peter Zijlstra Date: Thu Aug 10 17:10:26 2017 +0200 sched/debug: Optimize sched_domain sysctl generation Currently we unconditionally destroy all sysctl bits and regenerate them after we've rebuild the domains (even if that rebuild is a no-op). And since we unconditionally (re)build the sysctl for all possible CPUs, onlining all CPUs gets us O(n^2) time. Instead change this to only rebuild the bits for CPUs we've actually installed new domains on. Reported-by: Ofer Levi(SW) Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/debug.c | 68 +++++++++++++++++++++++++++++++++++++++---------- kernel/sched/sched.h | 4 +++ kernel/sched/topology.c | 1 + 3 files changed, 59 insertions(+), 14 deletions(-) commit 09e0dd8e0f2e197690d34fed8cb4737114d3dd5f Author: Peter Zijlstra Date: Tue Aug 8 12:16:24 2017 +0200 sched/topology: Avoid pointless rebuild Fix partition_sched_domains() to try and preserve the existing machine wide domain instead of unconditionally destroying it. We do this by attempting to allocate the new single domain, only when that fails to we reuse the fallback_doms. When using fallback_doms we need to first destroy and then recreate because both the old and new could be backed by it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Ofer Levi(SW) Cc: Peter Zijlstra Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vineet.Gupta1@synopsys.com Cc: rusty@rustcorp.com.au Signed-off-by: Ingo Molnar kernel/sched/topology.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 77d1dfda0e79b41894880418f04794e92e4350e2 Author: Peter Zijlstra Date: Tue Aug 8 12:16:24 2017 +0200 sched/topology, cpuset: Avoid spurious/wrong domain rebuilds When disabling cpuset.sched_load_balance we expect to be able to online CPUs without generating sched_domains. However this is currently completely broken. What happens is that we generate the sched_domains and then destroy them. This is because of the spurious 'default' domain build in cpuset_update_active_cpus(). That builds a single machine wide domain and then schedules a work to build the 'real' domains. The work then finds there are _no_ domains and destroys the lot again. Furthermore, if there actually were cpusets, building the machine wide domain is actively wrong, because it would allow tasks to 'escape' their cpuset. Also I don't think its needed, the scheduler really should respect the active mask. Reported-by: Ofer Levi(SW) Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vineet.Gupta1@synopsys.com Cc: rusty@rustcorp.com.au Signed-off-by: Ingo Molnar kernel/cgroup/cpuset.c | 6 ------ 1 file changed, 6 deletions(-) commit a090c4f2cd2cfeb54eaf8ad1e726a6c485f3abc3 Author: Peter Zijlstra Date: Mon Aug 21 15:42:52 2017 +0200 sched/topology: Improve comments Mike provided a better comment for destroy_sched_domain() ... Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 213c5a459ae0a7ef0a092f576aae2d5db6819360 Author: Shu Wang Date: Thu Aug 10 15:52:16 2017 +0800 sched/topology: Fix memory leak in __sdt_alloc() Found this issue by kmemleak: the 'sg' and 'sgc' pointers from __sdt_alloc() might be leaked as each domain holds many groups' ref, but in destroy_sched_domain(), it only declined the first group ref. Onlining and offlining a CPU can trigger this leak, and cause OOM. Reproducer for my 6 CPUs machine: while true do echo 0 > /sys/devices/system/cpu/cpu5/online; echo 1 > /sys/devices/system/cpu/cpu5/online; done unreferenced object 0xffff88007d772a80 (size 64): comm "cpuhp/5", pid 39, jiffies 4294719962 (age 35.251s) hex dump (first 32 bytes): c0 22 77 7d 00 88 ff ff 02 00 00 00 01 00 00 00 ."w}............ 40 2a 77 7d 00 88 ff ff 00 00 00 00 00 00 00 00 @*w}............ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_node+0xf1/0x280 [] build_sched_domains+0x1e8/0xf20 [] partition_sched_domains+0x304/0x360 [] cpuset_update_active_cpus+0x17/0x40 [] sched_cpu_activate+0xae/0xc0 [] cpuhp_invoke_callback+0x90/0x400 [] cpuhp_up_callbacks+0x37/0xb0 [] cpuhp_thread_fun+0xd7/0xf0 [] smpboot_thread_fn+0x110/0x160 [] kthread+0x109/0x140 [] ret_from_fork+0x25/0x30 [] 0xffffffffffffffff unreferenced object 0xffff88007d772a40 (size 64): comm "cpuhp/5", pid 39, jiffies 4294719962 (age 35.251s) hex dump (first 32 bytes): 03 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 ................ 00 04 00 00 00 00 00 00 4f 3c fc ff 00 00 00 00 ........O<...... backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc_node+0xf1/0x280 [] build_sched_domains+0xead/0xf20 [] partition_sched_domains+0x304/0x360 [] cpuset_update_active_cpus+0x17/0x40 [] sched_cpu_activate+0xae/0xc0 [] cpuhp_invoke_callback+0x90/0x400 [] cpuhp_up_callbacks+0x37/0xb0 [] cpuhp_thread_fun+0xd7/0xf0 [] smpboot_thread_fn+0x110/0x160 [] kthread+0x109/0x140 [] ret_from_fork+0x25/0x30 [] 0xffffffffffffffff Reported-by: Chunyu Hu Signed-off-by: Shu Wang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Chunyu Hu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: liwang@redhat.com Link: http://lkml.kernel.org/r/1502351536-9108-1-git-send-email-shuwang@redhat.com Signed-off-by: Ingo Molnar kernel/sched/topology.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit f44d85389e17b2e960620c1c6d89bda978a11f2b Author: Lionel Landwerlin Date: Thu Aug 24 16:08:14 2017 +0100 drm: rename u32 in __u32 in uapi All other fields use __ Cc: Ben Widawsky Fixes: db1689aa61b ("drm: Create a format/modifier blob") Signed-off-by: Lionel Landwerlin Signed-off-by: Daniel Stone Reviewed-by: Chris Wilson Reviewed-by: Emil Velikov Reviewed-by: Ben Widawsky Reviewed-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20170824150814.5878-1-lionel.g.landwerlin@intel.com include/uapi/drm/drm_mode.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3a9ff4fd04cc6ad199419508c8ea6eb839e0262d Merge: 9c878320 90a6cd5 Author: Ingo Molnar Date: Fri Aug 25 11:07:13 2017 +0200 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit ca110694c6950dfd7bc864138c80fe39ea43da5b Author: Peter Zijlstra Date: Wed Aug 23 18:15:20 2017 +0200 Documentation/locking/atomic: Finish the document... Julia reported that the document looked unfinished, and it is. I forgot to include the example cooked up by Paul here: https://lkml.kernel.org/r/20170731174345.GL3730@linux.vnet.ibm.com and I added an explicit example showing how, while it is an ACQUIRE pattern, it really does provide an MB. Reported-by: Julia Cartwright Signed-off-by: Peter Zijlstra (Intel) Cc: Boqun Feng Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Ingo Molnar Documentation/atomic_t.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e6f3faa734a00c606b7b06c6b9f15e5627d3245b Author: Peter Zijlstra Date: Wed Aug 23 13:23:30 2017 +0200 locking/lockdep: Fix workqueue crossrelease annotation The new completion/crossrelease annotations interact unfavourable with the extant flush_work()/flush_workqueue() annotations. The problem is that when a single work class does: wait_for_completion(&C) and complete(&C) in different executions, we'll build dependencies like: lock_map_acquire(W) complete_acquire(C) and lock_map_acquire(W) complete_release(C) which results in the dependency chain: W->C->W, which lockdep thinks spells deadlock, even though there is no deadlock potential since works are ran concurrently. One possibility would be to change the work 'lock' to recursive-read, but that would mean hitting a lockdep limitation on recursive locks. Also, unconditinoally switching to recursive-read here would fail to detect the actual deadlock on single-threaded workqueues, which do have a problem with this. For now, forcefully disregard these locks for crossrelease. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: byungchul.park@lge.com Cc: david@fromorbit.com Cc: johannes@sipsolutions.net Cc: oleg@redhat.com Signed-off-by: Ingo Molnar include/linux/irqflags.h | 4 ++-- include/linux/lockdep.h | 10 +++++---- kernel/locking/lockdep.c | 56 +++++++++++++++++++++++++++++++----------------- kernel/workqueue.c | 23 +++++++++++++++++++- 4 files changed, 66 insertions(+), 27 deletions(-) commit a1d14934ea4b9db816a8dbfeab1c3e7204a0d871 Author: Peter Zijlstra Date: Wed Aug 23 12:52:32 2017 +0200 workqueue/lockdep: 'Fix' flush_work() annotation The flush_work() annotation as introduced by commit: e159489baa71 ("workqueue: relax lockdep annotation on flush_work()") hits on the lockdep problem with recursive read locks. The situation as described is: Work W1: Work W2: Task: ARR(Q) ARR(Q) flush_workqueue(Q) A(W1) A(W2) A(Q) flush_work(W2) R(Q) A(W2) R(W2) if (special) A(Q) else ARR(Q) R(Q) where: A - acquire, ARR - acquire-read-recursive, R - release. Where under 'special' conditions we want to trigger a lock recursion deadlock, but otherwise allow the flush_work(). The allowing is done by using recursive read locks (ARR), but lockdep is broken for recursive stuff. However, there appears to be no need to acquire the lock if we're not 'special', so if we remove the 'else' clause things become much simpler and no longer need the recursion thing at all. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: byungchul.park@lge.com Cc: david@fromorbit.com Cc: johannes@sipsolutions.net Cc: oleg@redhat.com Signed-off-by: Ingo Molnar kernel/workqueue.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit e91498589746065e3ae95d9a00b068e525eec34f Author: Peter Zijlstra Date: Wed Aug 23 13:13:11 2017 +0200 locking/lockdep/selftests: Add mixed read-write ABBA tests Currently lockdep has limited support for recursive readers, add a few mixed read-write ABBA selftests to show the extend of these limitations. [ 0.000000] ---------------------------------------------------------------------------- [ 0.000000] | spin |wlock |rlock |mutex | wsem | rsem | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] mixed read-lock/lock-write ABBA: |FAILED| | ok | [ 0.000000] mixed read-lock/lock-read ABBA: | ok | | ok | [ 0.000000] mixed write-lock/lock-write ABBA: | ok | | ok | This clearly illustrates the case where lockdep fails to find a deadlock. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: byungchul.park@lge.com Cc: david@fromorbit.com Cc: johannes@sipsolutions.net Cc: oleg@redhat.com Cc: tj@kernel.org Signed-off-by: Ingo Molnar lib/locking-selftest.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 2 deletions(-) commit 0e709703af5bbc9ea6e75e1f99c2dd0dae261869 Author: Peter Zijlstra Date: Fri Aug 11 16:04:50 2017 +0200 mm, locking/barriers: Clarify tlb_flush_pending() barriers Better document the ordering around tlb_flush_pending(). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/mm_types.h | 78 ++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 33 deletions(-) commit 10c9850cb2ced2ce528e5b692c639974213a64ec Merge: 0c23647 90a6cd5 Author: Ingo Molnar Date: Fri Aug 25 11:04:51 2017 +0200 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit b00233b5306512a09e339d69ef5e390a77f2d302 Author: Andi Kleen Date: Tue Aug 22 11:52:01 2017 -0700 perf/x86: Export some PMU attributes in caps/ directory It can be difficult to figure out for user programs what features the x86 CPU PMU driver actually supports. Currently it requires grepping in dmesg, but dmesg is not always available. This adds a caps directory to /sys/bus/event_source/devices/cpu/, similar to the caps already used on intel_pt, which can be used to discover the available capabilities cleanly. Three capabilities are defined: - pmu_name: Underlying CPU name known to the driver - max_precise: Max precise level supported - branches: Known depth of LBR. Example: % grep . /sys/bus/event_source/devices/cpu/caps/* /sys/bus/event_source/devices/cpu/caps/branches:32 /sys/bus/event_source/devices/cpu/caps/max_precise:3 /sys/bus/event_source/devices/cpu/caps/pmu_name:skylake 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/20170822185201.9261-3-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 34 +++++++++++++++-------- arch/x86/events/intel/core.c | 66 +++++++++++++++++++++++++++++++++++++++++++- arch/x86/events/perf_event.h | 3 ++ 3 files changed, 91 insertions(+), 12 deletions(-) commit a5df70c354c26e20d5fd8eb64517f724e97ef0b2 Author: Andi Kleen Date: Tue Aug 22 11:52:00 2017 -0700 perf/x86: Only show format attributes when supported Only show the Intel format attributes in sysfs when the feature is actually supported with the current model numbers. This allows programs to probe what format attributes are available, and give a sensible error message to users if they are not. This handles near all cases for intel attributes since Nehalem, except the (obscure) case when the model number if known, but PEBS is disabled in PERF_CAPABILITIES. 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/20170822185201.9261-2-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 48 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) commit d0618410eced4eb092295fad10312a4545fcdfaf Author: Jesper Dangaard Brouer Date: Tue Aug 22 19:22:43 2017 +0200 tracing, perf: Adjust code layout in get_recursion_context() In an XDP redirect applications using tracepoint xdp:xdp_redirect to diagnose TX overrun, I noticed perf_swevent_get_recursion_context() was consuming 2% CPU. This was reduced to 1.85% with this simple change. Looking at the annotated asm code, it was clear that the unlikely case in_nmi() test was chosen (by the compiler) as the most likely event/branch. This small adjustment makes the compiler (GCC version 7.1.1 20170622 (Red Hat 7.1.1-3)) put in_nmi() as an unlikely branch. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150342256382.16595.986861478681783732.stgit@firesoul Signed-off-by: Ingo Molnar kernel/events/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d953111b648e48923171c3c9cf17be2250544fa Author: Oleg Nesterov Date: Tue Aug 22 17:59:28 2017 +0200 perf/core: Don't report zero PIDs for exiting tasks The exiting/dead task has no PIDs and in this case perf_event_pid/tid() return zero, change them to return -1 to distinguish this case from idle threads. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170822155928.GA6892@redhat.com Signed-off-by: Ingo Molnar kernel/events/core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 6ae5fa61d27dcb055f4198bcf6c8dbbf1bb33f52 Author: Andi Kleen Date: Wed Aug 16 15:21:54 2017 -0700 perf/x86: Fix data source decoding for Skylake Skylake changed the encoding of the PEBS data source field. Some combinations are not available anymore, but some new cases e.g. for L4 cache hit are added. Fix up the conversion table for Skylake, similar as had been done for Nehalem. On Skylake server the encoding for L4 actually means persistent memory. Handle this case too. To properly describe it in the abstracted perf format I had to add some new fields. Since a hit can have only one level add a new field that is an enumeration, not a bit field to describe the level. It can describe any level. Some numbers are also used to describe PMEM and LFB. Also add a new generic remote flag that can be combined with the generic level to signify a remote cache. And there is an extension field for the snoop indication to handle the Forward state. I didn't add a generic flag for hops because it's not needed for Skylake. I changed the existing encodings for older CPUs to also fill in the new level and remote fields. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: jolsa@kernel.org Link: http://lkml.kernel.org/r/20170816222156.19953-3-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 ++ arch/x86/events/intel/ds.c | 51 ++++++++++++++++++++++++++--------------- arch/x86/events/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 30 ++++++++++++++++++++++-- 4 files changed, 64 insertions(+), 21 deletions(-) commit 95298355143f9765f0d40ed57dce7fa6571cc623 Author: Andi Kleen Date: Wed Aug 16 15:21:53 2017 -0700 perf/x86: Move Nehalem PEBS code to flag Minor cleanup: use an explicit x86_pmu flag to handle the missing Lock / TLB information on Nehalem, instead of always checking the model number for each PEBS sample. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: jolsa@kernel.org Link: http://lkml.kernel.org/r/20170816222156.19953-2-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 1 + arch/x86/events/intel/ds.c | 5 +---- arch/x86/events/perf_event.h | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) commit d9a50b0256f06bd39a1bed1ba40baec37c356b11 Author: Will Deacon Date: Wed Aug 16 17:18:17 2017 +0100 perf/aux: Ensure aux_wakeup represents most recent wakeup index The aux_watermark member of struct ring_buffer represents the period (in terms of bytes) at which wakeup events should be generated when data is written to the aux buffer in non-snapshot mode. On hardware that cannot generate an interrupt when the aux_head reaches an arbitrary wakeup index (such as ARM SPE), the aux_head sampled from handle->head in perf_aux_output_{skip,end} may in fact be past the wakeup index. This can lead to wakeup slowly falling behind the head. For example, consider the case where hardware can only generate an interrupt on a page-boundary and the aux buffer is initialised as follows: // Buffer size is 2 * PAGE_SIZE rb->aux_head = rb->aux_wakeup = 0 rb->aux_watermark = PAGE_SIZE / 2 following the first perf_aux_output_begin call, the handle is initialised with: handle->head = 0 handle->size = 2 * PAGE_SIZE handle->wakeup = PAGE_SIZE / 2 and the hardware will be programmed to generate an interrupt at PAGE_SIZE. When the interrupt is raised, the hardware head will be at PAGE_SIZE, so calling perf_aux_output_end(handle, PAGE_SIZE) puts the ring buffer into the following state: rb->aux_head = PAGE_SIZE rb->aux_wakeup = PAGE_SIZE / 2 rb->aux_watermark = PAGE_SIZE / 2 and then the next call to perf_aux_output_begin will result in: handle->head = handle->wakeup = PAGE_SIZE for which the semantics are unclear and, for a smaller aux_watermark (e.g. PAGE_SIZE / 4), then the wakeup would in fact be behind head at this point. This patch fixes the problem by rounding down the aux_head (as sampled from the handle) to the nearest aux_watermark boundary when updating rb->aux_wakeup, therefore taking into account any overruns by the hardware. Reported-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1502900297-21839-2-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar kernel/events/internal.h | 2 +- kernel/events/ring_buffer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2ab346cfb0decf01523949e29f5cf542f2304611 Author: Will Deacon Date: Wed Aug 16 17:18:16 2017 +0100 perf/aux: Make aux_{head,wakeup} ring_buffer members long The aux_head and aux_wakeup members of struct ring_buffer are defined using the local_t type, despite the fact that they are only accessed via the perf_aux_output_*() functions, which cannot race with each other for a given ring buffer. This patch changes the type of the members to long, so we can avoid using the local_*() API where it isn't needed. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1502900297-21839-1-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar kernel/events/internal.h | 4 ++-- kernel/events/ring_buffer.c | 31 ++++++++++++++----------------- 2 files changed, 16 insertions(+), 19 deletions(-) commit 290d9bf2811bd83ae907232176d75690c0f7d82b Merge: c7f4f994d 64aee2a Author: Ingo Molnar Date: Fri Aug 25 11:01:05 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 5e857047ba1e748002088bf44b6b0873664d9567 Author: Kuninori Morimoto Date: Mon Aug 21 06:31:57 2017 +0000 dmaengine: rcar-dmac: initialize all data before registering IRQ handler Anton Volkov noticed that engine->dev is NULL before of_dma_controller_register() in probe. Thus there might be a NULL pointer dereference in rcar_dmac_chan_start_xfer while accessing chan->chan.device->dev which is equal to (&dmac->engine)->dev. On same reason, same and similar things will happen if we didn't initialize all necessary data before calling register irq function. To be more safety code, this patch initialize all necessary data before calling register irq function. Reported-by: Anton Volkov Signed-off-by: Kuninori Morimoto Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 85 +++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 42 deletions(-) commit c0bb80cfa3c37fd92f066e328d83656067519a5f Merge: adfaf18 ecda85e Author: Thomas Gleixner Date: Fri Aug 25 08:56:22 2017 +0200 Merge branch 'x86/asm' into x86/apic Pick up dependent changes to avoid merge conflicts commit aa1841b9836f01e3b629368f170f51206a600654 Author: Antonio Borneo Date: Tue Aug 1 22:09:27 2017 +0200 dmaengine: k3dma: remove useless ON_WARN_ONCE() Commit 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 ("k3dma: Fix memory handling in preparation for cyclic mode") adds few calls to ON_WARN_ONCE() to track the use of ds_run/ds_done. After the two fixes: - dmaengine: k3dma: fix non-cyclic mode - dmaengine: k3dma: fix re-free of the same descriptor the behaviour of ds_run/ds_done is properly fixed. The remaining ON_WARN_ONCE() are never triggered and can be removed. Signed-off-by: Antonio Borneo Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 2 -- 1 file changed, 2 deletions(-) commit 132b473cd594183dbd06a00bcee079477f6a7c9c Author: Antonio Borneo Date: Tue Aug 1 22:09:26 2017 +0200 dmaengine: k3dma: fix double free of descriptor Commit 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 ("k3dma: Fix memory handling in preparation for cyclic mode") adds code to free the descriptor in ds_done. In cyclic mode, ds_done is never used and it's always NULL, so the added code is not executed. In non-cyclic mode, ds_done is used as a flag: when not NULL it signals that the descriptor has been consumed. No need to free it because it would be free by vchan_complete(). The fix takes back the code changed by the commit above: - remove the free on the descriptor; - initialize ds_done to NULL for the next run. Signed-off-by: Antonio Borneo Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 626c4e85a107a2dbf9b482371ada8fee39680ce2 Author: Antonio Borneo Date: Tue Aug 1 22:09:25 2017 +0200 dmaengine: k3dma: fix non-cyclic mode Commit 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 ("k3dma: Fix memory handling in preparation for cyclic mode") broke the logic around ds_run/ds_done in case of non-cyclic DMA. This went unnoticed as the only user of k3dma was the i2s audio driver but, with a patch set to enable dma on SPI, the issue popped out. The fix re-applies the initialization to ds_run/ds_done in k3_dma_start_txd() that were removed by the commit above. Also, one of the calls to k3_dma_start_txd() is triggered by (ds_done != NULL), so remove the noisy and useless call to WARN_ON_ONCE(). Signed-off-by: Antonio Borneo Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5b7b1b7fa10145c014750b09ff4cf31ac4e1843a Author: Tobias Jakobi Date: Tue Aug 22 16:19:44 2017 +0200 drm/exynos: simplify set_pixfmt() in DECON and FIMD drivers DRM core already checks the validity of the pixelformat. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 +--- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 7 +------ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 8 +------- 3 files changed, 3 insertions(+), 16 deletions(-) commit ac60944ccf2388901412a0c9a0e7e3e4b56520a4 Author: Tobias Jakobi Date: Tue Aug 22 16:19:43 2017 +0200 drm/exynos: consistent use of cpp A recent commit (272725c7db4da1fd3229d944fc76d2e98e3a144e) has removed the use of 'bits_per_pixel' in DRM. However the corresponding Exynos driver code still uses the ambiguous 'bpp', even though it is now initialized from fb->cpp[0]. Consistenly use 'cpp' in FIMD, DECON7 and DECON5433 drivers. Signed-off-by: Tobias Jakobi drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 12 ++++++------ drivers/gpu/drm/exynos/exynos7_drm_decon.c | 6 +++--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) commit 3fd87127073292538047adf1c9c757e9cab0dd56 Author: Eric Biggers Date: Thu Aug 24 14:38:51 2017 -0700 strparser: initialize all callbacks commit bbb03029a899 ("strparser: Generalize strparser") added more function pointers to 'struct strp_callbacks'; however, kcm_attach() was not updated to initialize them. This could cause the ->lock() and/or ->unlock() function pointers to be set to garbage values, causing a crash in strp_work(). Fix the bug by moving the callback structs into static memory, so unspecified members are zeroed. Also constify them while we're at it. This bug was found by syzkaller, which encountered the following splat: IP: 0x55 PGD 3b1ca067 P4D 3b1ca067 PUD 3b12f067 PMD 0 Oops: 0010 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 2 PID: 1194 Comm: kworker/u8:1 Not tainted 4.13.0-rc4-next-20170811 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: kstrp strp_work task: ffff88006bb0e480 task.stack: ffff88006bb10000 RIP: 0010:0x55 RSP: 0018:ffff88006bb17540 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88006ce4bd60 RCX: 0000000000000000 RDX: 1ffff1000d9c97bd RSI: 0000000000000000 RDI: ffff88006ce4bc48 RBP: ffff88006bb17558 R08: ffffffff81467ab2 R09: 0000000000000000 R10: ffff88006bb17438 R11: ffff88006bb17940 R12: ffff88006ce4bc48 R13: ffff88003c683018 R14: ffff88006bb17980 R15: ffff88003c683000 FS: 0000000000000000(0000) GS:ffff88006de00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000055 CR3: 000000003c145000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: process_one_work+0xbf3/0x1bc0 kernel/workqueue.c:2098 worker_thread+0x223/0x1860 kernel/workqueue.c:2233 kthread+0x35e/0x430 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Code: Bad RIP value. RIP: 0x55 RSP: ffff88006bb17540 CR2: 0000000000000055 ---[ end trace f0e4920047069cee ]--- Here is a C reproducer (requires CONFIG_BPF_SYSCALL=y and CONFIG_AF_KCM=y): #include #include #include #include #include #include #include #include static const struct bpf_insn bpf_insns[3] = { { .code = 0xb7 }, /* BPF_MOV64_IMM(0, 0) */ { .code = 0x95 }, /* BPF_EXIT_INSN() */ }; static const union bpf_attr bpf_attr = { .prog_type = 1, .insn_cnt = 2, .insns = (uintptr_t)&bpf_insns, .license = (uintptr_t)"", }; int main(void) { int bpf_fd = syscall(__NR_bpf, BPF_PROG_LOAD, &bpf_attr, sizeof(bpf_attr)); int inet_fd = socket(AF_INET, SOCK_STREAM, 0); int kcm_fd = socket(AF_KCM, SOCK_DGRAM, 0); ioctl(kcm_fd, SIOCKCMATTACH, &(struct kcm_attach) { .fd = inet_fd, .bpf_fd = bpf_fd }); } Fixes: bbb03029a899 ("strparser: Generalize strparser") Cc: Dmitry Vyukov Cc: Tom Herbert Signed-off-by: Eric Biggers Signed-off-by: David S. Miller Documentation/networking/strparser.txt | 2 +- include/net/strparser.h | 2 +- kernel/bpf/sockmap.c | 10 +++++----- net/kcm/kcmsock.c | 11 +++++------ net/strparser/strparser.c | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) commit c6f71c418fcc46f59fc87ac93ce9336c12d7898b Author: Haiyang Zhang Date: Thu Aug 24 11:50:02 2017 -0700 hv_netvsc: Fix rndis_filter_close error during netvsc_remove We now remove rndis filter before unregister_netdev(), which calls device close. It involves closing rndis filter already removed. This patch fixes this error. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0cf3f4c37d45f68d9c0fe536f819584dc050082d Merge: 256fbe1 4c03e69 Author: David S. Miller Date: Thu Aug 24 21:49:56 2017 -0700 Merge tag 'mlx5-updates-2017-08-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-08-24 This series includes updates to mlx5 core driver. From Gal and Saeed, three cleanup patches. From Matan, Low level flow steering improvements and optimizations, - Use more efficient data structures for flow steering objects handling. - Add tracepoints to flow steering operations. - Overall these patches improve flow steering rule insertion rate by a factor of seven in large scales (~50K rules or more). ==================== Signed-off-by: David S. Miller commit 256fbe111218ccc3de4aff1aab44c9b08cd06c92 Author: Dan Carpenter Date: Thu Aug 24 13:47:39 2017 +0300 hinic: uninitialized variable in hinic_api_cmd_init() We never set the error code in this function. Fixes: eabf0fad81d5 ("net-next/hinic: Initialize api cmd resources") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 1 + 1 file changed, 1 insertion(+) commit 43cee2d2465cab8289dc1d9206b90fcf975a604f Author: Florian Fainelli Date: Thu Aug 24 20:55:40 2017 -0700 net: mv643xx_eth: Be drop monitor friendly txq_reclaim() does the normal transmit queue reclamation and rxq_deinit() does the RX ring cleanup, none of these are packet drops, so use dev_consume_skb() for both locations. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5dff6905293123a6a2e280ef9eaa00dd59064f53 Author: Tobias Jakobi Date: Tue Aug 22 16:19:40 2017 +0200 drm/exynos: mixer: remove src offset from mixer_graph_buffer() We always translate the dma address such that the offsets of the source image are zero. Hence we can remove manipulation of the MXR_GRAPHIC_SXY(win) register and just zero them once in mixer_win_reset(). Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 1e60d62f3811e5c446738a85f61bed5d84de113b Author: Tobias Jakobi Date: Tue Aug 22 16:19:39 2017 +0200 drm/exynos: mixer: simplify mixer_graph_buffer() DRM core already checks in drm_atomic_plane_check() if the pixelformat is valid. Hence we can collapse the default case of the switch statement with the XRGB8888 case. No functional change. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0f75269492c490e2a44ff4e3d52bbe31f60cfdb9 Author: Tobias Jakobi Date: Tue Aug 22 16:19:38 2017 +0200 drm/exynos: mixer: simplify vp_video_buffer() DRM core already checks in drm_atomic_plane_check() if the pixelformat is valid. Hence we can drop the default case of the switch statement and collapse most of the code. Also rename the two booleans to reflect what true/false actually means, and to avoid mixing CrCb/NV21 descriptions. No functional change. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit f40031c2314a592ff348193704e5f71e9a7e0449 Author: Tobias Jakobi Date: Tue Aug 22 16:19:37 2017 +0200 drm/exynos: mixer: enable NV12MT support for the video plane The video processor supports a tiled version of the NV12 format, known as NV12MT in V4L2 terms. The support was removed in commit 083500baefd5f4c215a5a93aef2492c1aa775828 due to not being a real pixel format, but rather NV12 with a special memory layout. With the introduction of FB modifiers, we can now properly support this format again. Tested with a hacked up modetest from libdrm's test suite on an ODROID-X2 (Exynos4412). Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 ++ drivers/gpu/drm/exynos/exynos_drm_plane.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_mixer.c | 6 +++++- 4 files changed, 35 insertions(+), 1 deletion(-) commit dc500cfb869d776e78e4a62b20b65f8208e2c695 Author: Tobias Jakobi Date: Tue Aug 22 16:19:36 2017 +0200 drm/exynos: mixer: fix chroma comment in vp_video_buffer() The current comment sounds like the division op is done to compensate for some hardware erratum. But the chroma plane having half the height of the luma plane is just the way NV12/NV21 is defined, so clarify this behaviour. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88a5e22a90efd12dfde642ed55d4c669ab658b0f Author: Andrzej Hajda Date: Thu Aug 24 15:33:59 2017 +0200 arm64: dts: exynos: remove i80-if-timings nodes Since i80/command mode is determined in runtime by propagating info from panel this property can be removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit 13f82efc3251e4e7f93354dc1a3a63e49ecee477 Author: Andrzej Hajda Date: Thu Aug 24 15:33:58 2017 +0200 dt-bindings: exynos5433-decon: remove i80-if-timings property Since i80/command mode is determined in runtime by propagating info from panel this property can be removed. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae .../devicetree/bindings/display/exynos/exynos5433-decon.txt | 12 ------------ 1 file changed, 12 deletions(-) commit 461e60ea1119e974af60b4d43e39df954477e0c5 Author: Andrzej Hajda Date: Thu Aug 24 15:33:57 2017 +0200 drm/exynos/decon5433: use mode info stored in CRTC to detect i80 mode Since panel's mode of work is propagated properly from panel to DECON, there is no need to use redundant private device tree property. The only issue with such approach is that check for required interrupts should be postponed until panel communicate its requirements, ie to mode validation phase - mode_valid callback. Signed-off-by: Andrzej Hajda drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 40 +++++++++++++++++---------- 1 file changed, 25 insertions(+), 15 deletions(-) commit c3653fede57f301a134b56c4bf62ac92780d5059 Author: Andrzej Hajda Date: Thu Aug 24 15:33:56 2017 +0200 drm/exynos: add mode_valid callback to exynos_drm crtc::mode_valid callback is required to implement proper pipeline validation for command/video modes. Since Exynos uses private framework such callback should be added to it. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 2 files changed, 15 insertions(+) commit 34c3db6c22a0c770c6c9a4c4e6462ee4baa64b30 Author: Andrzej Hajda Date: Thu Aug 24 15:33:55 2017 +0200 drm/exynos/decon5433: refactor irq requesting code To allow runtime validation of mode of work irq request code should be split into two separate phases: - irq reqesting, - irq checking. Following patches will move 2nd phase to mode validation phase. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 54 +++++++++++++++------------ 1 file changed, 30 insertions(+), 24 deletions(-) commit 29c5079d9e67e4c32719077ba619f2782b34e3d0 Author: Andrzej Hajda Date: Thu Aug 24 15:33:54 2017 +0200 drm/exynos/mic: use mode info stored in CRTC to detect i80 mode MIC driver should use info from CRTC to check mode of work instead of illegally peeking into nodes of other devices. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 44 +++------------------------------ 1 file changed, 4 insertions(+), 40 deletions(-) commit e002e65188e0b01adf24da0a0dfed4fd39281e19 Author: Zang Leigang Date: Thu Aug 24 10:57:15 2017 +0800 scsi: ufs: reqs and tasks were put in the wrong order Signed-off-by: Zang Leigang Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 610448367c8232b951df19136e439558c618fd41 Author: Dick Kennedy Date: Wed Aug 23 16:55:49 2017 -0700 scsi: lpfc: lpfc version bump 11.4.0.3 Update driver version to 11.4.0.3 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 286871a6667c3d4d27a4cf1ee519e629527dfc9d Author: Maurizio Lombardi Date: Wed Aug 23 16:55:48 2017 -0700 scsi: lpfc: fix "integer constant too large" error on 32bit archs cc1: warnings being treated as errors drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_get_wwpn': drivers/scsi/lpfc/lpfc_init.c:3253: error: integer constant is too large for 'long' type Signed-off-by: Maurizio Lombardi Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 44fd7fe3dd2ce9dba873a0522e1eeab9ab5d5651 Author: James Smart Date: Wed Aug 23 16:55:47 2017 -0700 scsi: lpfc: Add Buffer to Buffer credit recovery support Add Buffer to buffer credit recovery support to the driver. This is a negotiated feature with the peer that allows for both sides to detect dropped RRDY's and FC Frames and recover credit. 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_attr.c | 41 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_attr.h | 10 ++++++++++ drivers/scsi/lpfc/lpfc_els.c | 14 +++++++++++++- drivers/scsi/lpfc/lpfc_hbadisc.c | 12 ++++++++++-- drivers/scsi/lpfc/lpfc_hw.h | 18 +++++++++++++++--- drivers/scsi/lpfc/lpfc_hw4.h | 23 ++++++++++++++++++---- drivers/scsi/lpfc/lpfc_init.c | 5 +++++ drivers/scsi/lpfc/lpfc_mbox.c | 35 +++++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_sli4.h | 15 +++++++++++++++ 10 files changed, 162 insertions(+), 14 deletions(-) commit d58734f05ff0aaa787eeedd1e790fee6c9e92af8 Author: James Smart Date: Wed Aug 23 16:55:46 2017 -0700 scsi: lpfc: remove console log clutter Change hw queue binding messages to info - not error. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b486ce9ee109c7dc3de31b23724f8e3b3c5ff35 Author: Dick Kennedy Date: Wed Aug 23 16:55:45 2017 -0700 scsi: lpfc: Fix bad sgl reposting after 2nd adapter reset Port issue was fixed, the hbacmd reset would take more than 8 minutes to complete. There were conflicting NVME SGL posting/reposting responsibilities between lpfc_online()/lpfc_sli4_hba_setup() and lpfc_nvme_create_localport(). The lpfc_online() causes a REPOST on existing NVME SGLs which is not released during the fc port reset. However, lpfc_nvme_create_localport() wants to allocate new NVME buffers and post them. Both cancelled out each other which had a side effect of hosing the mailbox handling that was used to remove the sgl lists - causing multiple 60s mbx timeouts. Fix by preserving all SGL lists over the fc port reset. 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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a145fda3816ed516af5c589ef296a50897c42ef9 Author: Dick Kennedy Date: Wed Aug 23 16:55:44 2017 -0700 scsi: lpfc: Fix nvme target failure after 2nd adapter reset The nonrecovery occurred because the lpfc nvme initiator function did not reestablish its localport creation with the nvme host transport in lpfc_oneline. Because of that, an NVME rport binding could not take place. Corrected by recreating the localport in the adapter reset recovery routine. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit c6e0c925064cbff2cf36f590d14641cfdf02f473 Author: Dick Kennedy Date: Wed Aug 23 16:55:43 2017 -0700 scsi: lpfc: Fix relative offset error on large nvmet target ios If the nvmet_fc transport breaks an io into multiple sequences, the driver will improperly set the relative offset on the 2nd through N sequences. Correct by properly formatting the hw cmd so the relative offset is picked up from the hw cmd. 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 66d7ce93a0f5b991d6bf068f797dec49eb8e5c57 Author: Dick Kennedy Date: Wed Aug 23 16:55:42 2017 -0700 scsi: lpfc: Fix MRQ > 1 context list handling Various oops including cpu LOCKUPs were seen. For asynchronously received ius where the driver must assign exchange resources, the resources were on a single get (free) list and put list (finished, waiting to be put on get list). As all cpus are sharing the lists, an interrupt for a receive frame may have to wait for all the other cpus to place their done work onto the put list before it can acquire the lock to pull from the list. Fix by breaking the resource lists into per-cpu lists or at least more than 1 list with cpu's sharing the lists). A cpu would allocate from the free list for its own cpu, and put its done work on the its own put list - avoiding the contention. As cpu load may vary, when empty, a cpu may grab from another cpu, thereby changing resource distribution. But searching for a resource only occurs on 1 or a few cpus until a single resource can be allocated. if the condition reoccurs, it starts looking at a different cpu. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 11 +- drivers/scsi/lpfc/lpfc_crtn.h | 5 +- drivers/scsi/lpfc/lpfc_debugfs.c | 11 +- drivers/scsi/lpfc/lpfc_init.c | 17 +-- drivers/scsi/lpfc/lpfc_nvmet.c | 264 ++++++++++++++++++++++++++++++--------- drivers/scsi/lpfc/lpfc_nvmet.h | 14 +++ drivers/scsi/lpfc/lpfc_sli.c | 2 +- drivers/scsi/lpfc/lpfc_sli4.h | 7 +- 8 files changed, 234 insertions(+), 97 deletions(-) commit e3e2863def0262782aec6745bb4c0a86b3dfdd3b Author: Dick Kennedy Date: Wed Aug 23 16:55:41 2017 -0700 scsi: lpfc: Limit amount of work processed in IRQ Various oops being seen on being in the ISR too long and cpu lockups, when under heavy load. The amount of work being posted off of completion queues kept the ISR running almost all the time Correct the issue by limiting the amount of work per iteration. [mkp: typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 31 +++++++++++++++++++------------ drivers/scsi/lpfc/lpfc_sli4.h | 1 + 2 files changed, 20 insertions(+), 12 deletions(-) commit 176de5bb20271089d2ab120bb7737b66acc3c000 Author: Dick Kennedy Date: Wed Aug 23 16:55:40 2017 -0700 scsi: lpfc: Correct issues with FAWWN and FDISCs When using fabric-assigned WWNs, the switch doesn't like copy of the FLOGI payload, which includes valid VVL bits, to be used as the FDISC payload. Rather than wait for corrected switch firmware, ensure the VVL bits are marked invalid on FDISCs. [mkp: typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 1 + 1 file changed, 1 insertion(+) commit 991f0c0e33e2a57120970d28c08384c77505bfca Author: Dick Kennedy Date: Wed Aug 23 16:55:39 2017 -0700 scsi: lpfc: Fix NVME PRLI handling during RSCN A race condition was found whereby the initiator would receive the RSCN for a new NVME device before it had a chance to register its FC4 support with the fabric. Thus, when queried by the initiator, it would see that the target supported FC-NVME. Corrected by making the assumption that the target always supports FC-NVME thus a PRLI is sent. It's ok for the target to reject it. 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4b40d02b8b2bd549c7751a3c4629077ea5f9a1fd Author: Dick Kennedy Date: Wed Aug 23 16:55:38 2017 -0700 scsi: lpfc: Fix crash in lpfc nvmet when fc port is reset In adapter reset tests, an oops was seen with a NULL pointer in lpfc_free_rq_buffer+0x20/0x60 The driver is failing to properly repost the nvmet sgl list when recovering from the reset. Thus the driver eventually trys to walk an errant buffer list. Corrected the sgl buffer recovery as well as strengthening the initialization of the bufferlist. 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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4adc041b4dccbf315297e504457b096757fdb324 Author: Dick Kennedy Date: Wed Aug 23 16:55:37 2017 -0700 scsi: lpfc: Fix duplicate NVME rport entries and namespaces. After lip, the driver sometimes would have two rports for the same device, allowing the namespaces to be duplicated by nvme. In lpfc_plogi_confirm_nport() the driver was not swapping the nrport maintained by the ndlp's undergoing address swapping. This allowed the 2nd rport to sneak in as it was considered a separate device. This patch adds the fixes to Swap the nrport in each ndlp and take care of the reference counts on the ndlps similar to FCP rports. 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8db1c2b3e7fa1b1a75a8dddc77bf516acfc03e8a Author: Dick Kennedy Date: Wed Aug 23 16:55:36 2017 -0700 scsi: lpfc: Fix handling of FCP and NVME FC4 types in Pt2Pt topology After link bounce in a NVME Pt2Pt config, the driver managed to map the same nport twice, resulting in multiple device nodes for the same namespace. In Pt2Pt, the driver must send PRLI's for both (scsi) FCP and NVME rather than using fabric aids. The driver was inconsistent on handling various PRLI completions, especially rejects, which had reject codes cross the different protocol PRLI completions. Fixed to perform the following: if nvmet mode (fc port can only be a nvme target) - rejects all unsolicitly FCP PRLI's. Never issues a FCP PRLI. The multiple protocol PRLI's are sent simultaneously. However, driver will now only state transition after both PRLI's are complete. New flags were added to aid tracking the responses from the different PRLI's. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_disc.h | 1 + drivers/scsi/lpfc/lpfc_els.c | 28 ++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_nportdisc.c | 9 +++++++++ 3 files changed, 38 insertions(+) commit cd22d6057c0cf1d6753a11c19c1cb62ca3f8fb29 Author: Dick Kennedy Date: Wed Aug 23 16:55:35 2017 -0700 scsi: lpfc: Correct return error codes to align with nvme_fc transport Modify driver return error codes to align with host nvme transport. Driver isn't returning Exxx error codes to properly reflect out of resource or connectivity conditions (-EBUSY), yet there were hard error conditions returning -EBUSY. Ensure the following situations return the proper return code: - Temporary failures or temporary resource availability: -EBUSY - Connectivity issues: -ENODEV All others are treated as hard errors and return an -Exxx value that indicates the type of error. Also, lpfc_sli4_issue_wqe() was modified to not translate error from -Exxx to WQE state. This allows lpfc_nvme_fcp_io_submit() routine to just return whatever -E value was returned from other routines. 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 | 9 ++++----- drivers/scsi/lpfc/lpfc_sli.c | 23 ++++++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) commit ffb70cd6b64ffcbb5f0fb0d9f2bac29a6dffc81b Author: Dick Kennedy Date: Wed Aug 23 16:55:34 2017 -0700 scsi: lpfc: convert info messages to standard messages Transitioned some informational discovery messages to now always be displayed when log_verbose is set. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb6a8a2c24f263cdff78b62ada58cecd8c89c03d Author: Dick Kennedy Date: Wed Aug 23 16:55:33 2017 -0700 scsi: lpfc: Fix oops when NVME Target is discovered in a nonNVME environment lpfc oops when it discovers a NVME target but is configured for SCSI only operation. Oops is in lpfc_nvme_register_port+0x33/0x300. The localport is not valid so it should not have been referenced. Added validity check for localport Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 3 +++ 1 file changed, 3 insertions(+) commit d2aa48761e4f102b672e9ff1b6c8d26af782b286 Author: Dick Kennedy Date: Wed Aug 23 16:55:32 2017 -0700 scsi: lpfc: Fix rediscovery on switch blade pull When the switch blade is pulled out then plugged back in, the driver does not issue a PLOGI to the target When the switch blade is pulled out, it does not reset the link. The driver ends up issuing a LOGO to the target, and finally sees devloss. Since the driver believes that a LOGO is outstanding, it does not issue a PLOGI to the target upon link up Correct by placing the ndlp in UNUSED state When devloss happens in LOGO_ISSUE state. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nportdisc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 2877cbffb79ed121a6bcc5edbe629d3aba36cd29 Author: Dick Kennedy Date: Wed Aug 23 16:55:31 2017 -0700 scsi: lpfc: Fix loop mode target discovery The driver does not discover targets when in loop mode. The NLP type is correctly getting set when a fabric connection is detected but, not for loop. The unknown NLP type means that the driver does not issue a PRLI when in loop topology. Thus target discovery fails. Fix by checking the topology during discovery. If it is loop, set the NLP FC4 type to FCP. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nportdisc.c | 3 +++ 1 file changed, 3 insertions(+) commit 1fe68477d235e42fb2613d01837d49545408c622 Author: Dick Kennedy Date: Wed Aug 23 16:55:30 2017 -0700 scsi: lpfc: Fix plogi collision that causes illegal state transition Message "0271 Illegal State Transition: node" seen in logs, all luns are unuseable for that target. A window exists in the rcv_plogi path where if the state is plogi issue but the driver has not issued a plogi, then two reglogins will be sent for the same RPI. The first one to complete will advance the state to prli issue the second one will be detected as an illegal state, and leave the node in an unusable state. Correct the completion routine for the PLOGI ACC that detects the state change when the driver starts discovery on the node again and drop the REGLOGIN mailbox command. 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 | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 38c980454a7d3adfd710136e9067802202d99b08 Author: himanshu.madhani@cavium.com Date: Wed Aug 23 15:05:25 2017 -0700 scsi: qla2xxx: Update driver version to 10.00.00.01-k Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d61cca60aa79aa5afde29e37e26aff819e5b2f16 Author: Sawan Chandak Date: Wed Aug 23 15:05:24 2017 -0700 scsi: qla2xxx: Do not call abort handler function during chip reset If there are IO's running and host reset or chip reset is triggered, IO's can fail due to rport time out. During chip reset recovery process, driver notifies the transport layer that remote port no longer exist, by calling fc_remote_port_delete(). When this function is called, it actually delays deletion by "blocking" it. It sets the remote port state to "FC_PORTSTATE_BLOCKED" and sets FC_RPORT_DEVLOSS_PENDING. When driver tries to abort the command by calling its abort handler function, abort handler will wait until remote port state is blocked state or wait for dev_loss_tmo time. Due to this blocking, rport times out and results in an IO failure. This patch adds a check for any active reset process before calling abort handler function. [mkp: typo] Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 ++ 1 file changed, 2 insertions(+) commit ce0779c7d72c42b5a625850086b60ec3ddbad17e Author: Giridhar Malavali Date: Wed Aug 23 15:05:23 2017 -0700 scsi: qla2xxx: Ability to process multiple SGEs in Command SGL for CT passthrough commands. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_iocb.c | 55 ++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 20 deletions(-) commit 998722d18321bc718407b26a582d881e69edd382 Author: Joe Carnuccio Date: Wed Aug 23 15:05:22 2017 -0700 scsi: qla2xxx: Skip zero queue count entry during FW dump capture If queue count is zero while reading FW dump template, for entry T263/T274, skip capturing those entries during FW dump capture. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_tmpl.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit a07fc0a42e9ae76e93235f59b089986dc1b751c8 Author: Quinn Tran Date: Wed Aug 23 15:05:21 2017 -0700 scsi: qla2xxx: Recheck session state after RSCN When RSCN is delivered for specific remote port. Use ADISC to verify the session is still valid or not. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 16 +++++++++++----- drivers/scsi/qla2xxx/qla_init.c | 4 +--- 3 files changed, 13 insertions(+), 9 deletions(-) commit d213a4b7a57175b5025392b2c2e29a2f14f06bc5 Author: Michael Hernandez Date: Wed Aug 23 15:05:20 2017 -0700 scsi: qla2xxx: Increase ql2xmaxqdepth to 64 ql2xmaxqdepth is the module parameter that seeds the per target queue depth in the Scsi midlayer (sdev->queue_depth). Performance testing revealed that increasing this value would improve IOPS numbers under certain workloads. Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 043dc1d7e8501e292a29f7be2c3843e8da8e6448 Author: himanshu.madhani@cavium.com Date: Wed Aug 23 15:05:19 2017 -0700 scsi: qla2xxx: Enable Async TMF processing Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdbe24de281e2952e6af6eee24bff66bf94b67d1 Author: Quinn Tran Date: Wed Aug 23 15:05:18 2017 -0700 scsi: qla2xxx: Cleanup NPIV host in target mode during config teardown When we tear down the NPIV host configuration in target mode, the qla_tgt struct was left dangling on the global list. This patch cleans up link list and frees memory. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 11 +++++++---- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) commit 1f4c7c380b2f0cbd060b8582a1723b3a98f354d2 Author: Joe Carnuccio Date: Wed Aug 23 15:05:17 2017 -0700 scsi: qla2xxx: Add LR distance support from nvram bit Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 9 ++++++- drivers/scsi/qla2xxx/qla_fw.h | 24 +++++++++++------- drivers/scsi/qla2xxx/qla_mbx.c | 56 ++++++++++++++++++++++++++++-------------- 3 files changed, 61 insertions(+), 28 deletions(-) commit 92d4408e34667f521cda7192fc8dda3da25d45bc Author: Sawan Chandak Date: Wed Aug 23 15:05:16 2017 -0700 scsi: qla2xxx: Add support for minimum link speed Signed-off-by: Sawan Chandak Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 36 ++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_def.h | 4 ++++ drivers/scsi/qla2xxx/qla_fw.h | 4 +++- drivers/scsi/qla2xxx/qla_isr.c | 5 +++++ drivers/scsi/qla2xxx/qla_mbx.c | 46 ++++++++++++++++++++++++++++++++++++++--- 5 files changed, 91 insertions(+), 4 deletions(-) commit 343f7def32b2abb9c07a15577b7917898496e156 Author: Joe Carnuccio Date: Wed Aug 23 15:05:15 2017 -0700 scsi: qla2xxx: Remove potential macro parameter side-effect in ql_dump_regs() Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 050dc76afb933cf7da8cb8bc92ad1ed155fbeea6 Author: Joe Carnuccio Date: Wed Aug 23 15:05:14 2017 -0700 scsi: qla2xxx: Print correct mailbox registers in failed summary Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mbx.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 72fcd4eb3c046cd59cb2ab5a7fc1555e8621a4b0 Author: Quinn Tran Date: Wed Aug 23 15:05:13 2017 -0700 scsi: qla2xxx: Fix task mgmt handling for NPIV Fix task management response for NPIV Target mode. Current code uses the wrong vp index. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 7 ++++++- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit a14c771125c99bbe7f9075f1da3b1fcd8e3f4d2c Author: Joe Carnuccio Date: Wed Aug 23 15:05:12 2017 -0700 scsi: qla2xxx: Allow SNS fabric login to be retried If SNS fabric login fails, set loop resync flag to retry via dpc. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit b85e0957b8a81003511e4b950ec6e6d2e7fc830d Author: Joe Carnuccio Date: Wed Aug 23 15:05:11 2017 -0700 scsi: qla2xxx: Add timeout ability to wait_for_sess_deletion(). Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit fed0f68aa167e5574b2266595467f5164ecaa8ec Author: Joe Carnuccio Date: Wed Aug 23 15:05:10 2017 -0700 scsi: qla2xxx: Move logging default mask to execute once only. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 2 -- drivers/scsi/qla2xxx/qla_os.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit f3caa9905d496ee7afeb7ef7ed22a529c00866bb Author: Joe Carnuccio Date: Wed Aug 23 15:05:09 2017 -0700 scsi: qla2xxx: Use sp->free instead of hard coded call. Calling sp->free() ensures the context-correct free routine is called. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e0824e69bd557907157e6e1c3649baf8252cf043 Author: Joe Carnuccio Date: Wed Aug 23 15:05:08 2017 -0700 scsi: qla2xxx: Prevent sp->free null/uninitialized pointer dereference. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 12 ++++++------ drivers/scsi/qla2xxx/qla_mr.c | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) commit e4e3a2ce9556cc4da40dadaf94c0d3395b6e91d9 Author: Quinn Tran Date: Wed Aug 23 15:05:07 2017 -0700 scsi: qla2xxx: Add ability to autodetect SFP type SFP can come in 2 formats: short range/SR and long range/LR. For LR, user the can increase the number of Buffer to Buffer credits between end points via Cavium's command line tool. By default, FW uses a lower BB Credit value optimized for SR. This patch will read the SFP for each link up event and during chip reset sequence. If the SFP type and setting are mismatch, then the chip is reset 1 time to use the appropriate setting. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 42 ++---------- drivers/scsi/qla2xxx/qla_def.h | 92 +++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_gbl.h | 3 + drivers/scsi/qla2xxx/qla_init.c | 143 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_isr.c | 5 ++ drivers/scsi/qla2xxx/qla_mbx.c | 83 +++++++++++++++++++++-- drivers/scsi/qla2xxx/qla_os.c | 36 +++++++++- 7 files changed, 361 insertions(+), 43 deletions(-) commit b2e8ae3f0e342a3308b4573790bd42528e51885a Author: Quinn Tran Date: Wed Aug 23 15:05:06 2017 -0700 scsi: qla2xxx: Use fabric name for Get Port Speed command The Get Port Speed switch command needs the fabric port name of the remote device. Current code uses the registered WWPN. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18ada18e5e2dc565731e758785964013cf502650 Author: Quinn Tran Date: Wed Aug 23 15:05:05 2017 -0700 scsi: qla2xxx: Change ha->wq max_active value to default Update ha->wq max_active from 1 to default. MQ interrupts are queued up via this work queue. This allows interrupts to be process in parrallel, instead of serialized by the work queue. Signed-off-by: Quinn Tran 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 dc62c3bea888f0fe2a472eb8264e186ca798180c Author: Quinn Tran Date: Wed Aug 23 15:05:04 2017 -0700 scsi: qla2xxx: Remove extra register read Remove extra register read for each interrupt for performance improvement. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 9 --------- drivers/scsi/qla2xxx/qla_target.c | 1 - 2 files changed, 10 deletions(-) commit 1608cc4abfe46c31c4b0549693fb9dc5244e2c50 Author: Quinn Tran Date: Wed Aug 23 15:05:03 2017 -0700 scsi: qla2xxx: Fix NPIV host enable after chip reset For NPIV ports, call configure_hba() so that NPIV ports can proceed to loop initialization. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_mbx.c | 2 ++ drivers/scsi/qla2xxx/qla_mid.c | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) commit fcc5b5cd726c0779cd689362aea82cc9d5a61346 Author: Sawan Chandak Date: Wed Aug 23 15:05:02 2017 -0700 scsi: qla2xxx: Use BIT_6 to acquire FAWWPN from switch If FA-WWPN feature disabled on the switch side and enabled for the adapter, then driver would update the port name with switch port name. This patch fixes issue by checking correct BIT flag to validate. Fixes: 41dc529a4602 ("qla2xxx: Improve RSCN handling in driver") Cc: Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a17305954d732ace786095ed6c911782c18529b9 Author: Duane Grigsby Date: Wed Aug 23 15:05:01 2017 -0700 scsi: qla2xxx: Fix system panic due to pointer access problem [ 1013.772926] BUG: unable to handle kernel paging request at 0000000300000020 [ 1013.772950] IP: qla24xx_els_ct_entry.isra.17+0x78/0x2a0 [qla2xxx] [ 1013.772951] PGD 0 [ 1013.772952] P4D 0 [ 1013.772952] [ 1013.772953] Oops: 0000 [#1] SMP [ 1013.772955] Modules linked in: qla2xxx(+) scsi_transport_fc nvme_fc nvme_fabrics nvme_core netconsole configfs af_packet iscsi_ibft iscsi_boot_sysfs xfs intel_rapl sb_edac libcrc32c x86_pkg_temp_thermal intel_powerclamp coretemp mgag200 kvm_intel ttm kvm drm_kms_helper ipmi_ssif irqbypass tg3 drm fb_sys_fops crct10dif_pclmul syscopyarea crc32_pclmul ghash_clmulni_intel ptp pcbc sysfillrect pps_core aesni_intel joydev aes_x86_64 sysimgblt crypto_simd iTCO_wdt libphy iTCO_vendor_support i2c_algo_bit glue_helper ipmi_si lpc_ich hpwdt ioatdma cryptd ipmi_devintf pcspkr mfd_core pcc_cpufreq ipmi_msghandler hpilo thermal dca button shpchp btrfs xor raid6_pq hid_generic usbhid sr_mod cdrom sd_mod ata_generic crc32c_intel serio_raw ata_piix ahci libahci uhci_hcd ehci_pci ehci_hcd libata usbcore hpsa scsi_transport_sas [ 1013.772994] sg scsi_mod autofs4 [ 1013.772998] CPU: 0 PID: 374 Comm: systemd-journal Not tainted 4.13.0-rc1-2-default #2 [ 1013.772999] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 07/15/2012 [ 1013.773000] task: ffff88082c188380 task.stack: ffffc90004d7c000 [ 1013.773011] RIP: 0010:qla24xx_els_ct_entry.isra.17+0x78/0x2a0 [qla2xxx] [ 1013.773012] RSP: 0000:ffff88042f603d90 EFLAGS: 00010082 [ 1013.773013] RAX: ffff88039f723ac8 RBX: ffff88039f723ac8 RCX: ffff8803a2e18010 [ 1013.773014] RDX: ffff88039f723ac0 RSI: ffff88042f603dc4 RDI: ffff88041b6787c0 [ 1013.773015] RBP: ffff88042f603e00 R08: 0000000000000002 R09: 000000000000000d [ 1013.773016] R10: 0000000000000002 R11: 0000000000000000 R12: ffff8803a2e80080 [ 1013.773016] R13: ffff88041b6787c0 R14: 0000000300000000 R15: 0000000000000102 [ 1013.773018] FS: 00007fa2e0a73880(0000) GS:ffff88042f600000(0000) knlGS:0000000000000000 [ 1013.773019] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1013.773020] CR2: 0000000300000020 CR3: 000000042cd7e000 CR4: 00000000000406f0 [ 1013.773021] Call Trace: [ 1013.773022] [ 1013.773026] ? consume_skb+0x34/0xa0 [ 1013.773040] qla24xx_process_response_queue+0x319/0x700 [qla2xxx] [ 1013.773050] qla24xx_msix_rsp_q+0x7b/0xd0 [qla2xxx] [ 1013.773054] __handle_irq_event_percpu+0x3c/0x1b0 [ 1013.773056] handle_irq_event_percpu+0x23/0x60 [ 1013.773057] handle_irq_event+0x42/0x70 [ 1013.773059] handle_edge_irq+0x8f/0x190 [ 1013.773062] handle_irq+0x1d/0x30 [ 1013.773065] do_IRQ+0x48/0xd0 [ 1013.773067] common_interrupt+0x93/0x93 [ 1013.773068] RIP: 0033:0xed622c6e42 [ 1013.773069] RSP: 002b:00007ffee8b5c820 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff17 [ 1013.773071] RAX: 000000ed6316a3f0 RBX: 000000ed6316a840 RCX: 00000000000c4e33 [ 1013.773071] RDX: 000000ed6316a878 RSI: 000000ed6316a840 RDI: 000000ed631682d0 [ 1013.773072] RBP: 0000000000000001 R08: 0000000000000001 R09: 000000ed63179b70 [ 1013.773073] R10: 000000000005f6f8 R11: 0000000000000202 R12: 0000000000000001 [ 1013.773074] R13: 00007ffee8b5c85c R14: 000000ed6316a840 R15: 00007ffee8b5c850 [ 1013.773074] [ 1013.773076] Code: a9 8a 9a e0 48 8d 75 c4 48 89 da 4c 89 e1 4c 89 ef e8 54 6e fb ff 48 85 c0 48 89 c3 0f 84 0e 02 00 00 44 0f b7 48 36 4c 8b 70 58 <4d> 8b 7e 20 41 8d 41 fd 66 83 f8 0c 77 6c 0f b7 c0 ff 24 c5 88 [ 1013.773102] RIP: qla24xx_els_ct_entry.isra.17+0x78/0x2a0 [qla2xxx] RSP: ffff88042f603d90 [ 1013.773102] CR2: 0000000300000020 [ 1013.773129] ---[ end trace 532363559924f426 ]--- [ 1013.773131] Kernel panic - not syncing: Fatal exception in interrupt [ 1013.777719] Kernel Offset: disabled [ 1013.827528] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: Duane Grigsby Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efdb57607fb0447e05eb0ce404d6a708a76e4ba7 Author: Sawan Chandak Date: Wed Aug 23 15:05:00 2017 -0700 scsi: qla2xxx: Handle PCIe error for driver Driver will perform following - Set PFLG_DRIVER_REMOVING flag and do not disable PCIe error reporting during adapter shutdown. - If PCIe device count is already zero, return correct error type from PCI error interface. - When device is offline, return correct error type from PCIe error path. - If there is board disable thread active during shutdown and PCIe device count is zero then cancel scheduling board disable thread during shutdown and return. Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit d7936a96e45c8a5b7ad21113f945b4de0c683a37 Author: Darren Trap Date: Wed Aug 23 15:04:59 2017 -0700 scsi: qla2xxx: Fix WWPN/WWNN in debug message Signed-off-by: Darren Trap Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf19c45dba19757e5016cb1acc5ef1529005f8c3 Author: Duane Grigsby Date: Wed Aug 23 15:04:58 2017 -0700 scsi: qla2xxx: Add command completion for error path The driver held spinlocks during callbacks for NVME errors which resulted in a deadlock because recovery LS cmds needed the same lock. Signed-off-by: Duane Grigsby Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_gbl.h | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 1 + drivers/scsi/qla2xxx/qla_mid.c | 7 +++++++ drivers/scsi/qla2xxx/qla_nvme.c | 13 ++++++++++++- drivers/scsi/qla2xxx/qla_os.c | 1 + 6 files changed, 25 insertions(+), 1 deletion(-) commit e6373f33a6bba0de9f543f4a7faeaaa536c62997 Author: himanshu.madhani@cavium.com Date: Wed Aug 23 15:04:57 2017 -0700 scsi: qla2xxx: Update fw_started flags at qpair creation. Fixes: 4b60c82736d0 ("scsi: qla2xxx: Add fw_started flags to qpair") Cc: Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 1 + 1 file changed, 1 insertion(+) commit b7edfa235effb4b4a9816c2345620b11609c123e Author: Michael Hernandez Date: Wed Aug 23 15:04:56 2017 -0700 scsi: qla2xxx: Fix target multiqueue configuration Following error will be logged in to message file while trying to configure target with multiqueue. "Cmd 0x1f aborted with timeout since ISP Abort is pending" "qla25xx_init_queues Rsp que: 1 init failed." Fixes: 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.") Cc: Signed-off-by: Quinn Tran Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_mbx.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 6e98095f8fb6d98da34c4e6c34e69e7c638d79c0 Author: Joe Carnuccio Date: Wed Aug 23 15:04:55 2017 -0700 scsi: qla2xxx: Correction to vha->vref_count timeout Fix incorrect second argument for wait_event_timeout() Fixes: c4a9b538ab2a ("qla2xxx: Allow vref count to timeout on vport delete.") Cc: Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac385df94f4f0317db3edd3609ed0c3406f5883 Author: Shivasharan S Date: Wed Aug 23 04:47:08 2017 -0700 scsi: megaraid_sas: driver version upgrade Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5dd977e3bd7f5d07a8f43e9b18546f1b1c91c1a9 Author: Shivasharan S Date: Wed Aug 23 04:47:07 2017 -0700 scsi: megaraid_sas: call megasas_dump_frame with correct IO frame size Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d2c2331673cf7c525b44f31c766930bad18007a Author: Shivasharan S Date: Wed Aug 23 04:47:06 2017 -0700 scsi: megaraid_sas: modified few prints in OCR and IOC INIT path Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit ba1477aa70f04b1c55b3180e2b9215b00889a67b Author: Shivasharan S Date: Wed Aug 23 04:47:05 2017 -0700 scsi: megaraid_sas: replace internal FALSE/TRUE definitions with false/true Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fp.c | 40 +++++++++++++-------------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit eb3fe263a48b0d27b229c213929c4cb3b1b39a0f Author: Shivasharan S Date: Wed Aug 23 04:47:04 2017 -0700 scsi: megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead After a kill adapter, since the cmd_status is not set, the IOCTLs will be hung in driver resulting in application hang. Set cmd_status MFI_STAT_WRONG_STATE when completing pended IOCTLs. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit def3e8dfe935f293da47c2684bc9fd2a927b7cc5 Author: Shivasharan S Date: Wed Aug 23 04:47:03 2017 -0700 scsi: megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map Driver's local RAID map is accessed frequently. We will first try to get memory from __get_free_pages. If this fails, fall back to using vmalloc. For crash dump buffers always prefer vmalloc. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 121 ++++++++++++++++++---------- 3 files changed, 88 insertions(+), 46 deletions(-) commit 28661c885c7ac06f2c3cc054bd99bd913b253afc Author: Shivasharan S Date: Wed Aug 23 04:47:02 2017 -0700 scsi: megaraid_sas: Use SMID for Task abort case only In TM code, smid_task is valid only in case of task aborts. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 91b3d9f0069c8307d0b3a4c6843b65a439183318 Author: Shivasharan S Date: Wed Aug 23 04:47:01 2017 -0700 scsi: megaraid_sas: Check valid aen class range to avoid kernel panic Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8823abeddbbcefd4603b02e6518311e17557156f Author: Shivasharan S Date: Wed Aug 23 04:47:00 2017 -0700 scsi: megaraid_sas: Fix endianness issues in DCMD handling Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 690e9c38858f870f4d83e7495feaca5417f65c6b Author: Shivasharan S Date: Wed Aug 23 04:46:59 2017 -0700 scsi: megaraid_sas: Do not re-fire shutdown DCMD after OCR Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 14298cf3207803b48d7b132fa7ddfd2433ba4f62 Author: Shivasharan S Date: Wed Aug 23 04:46:58 2017 -0700 scsi: megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands megasas_wait_for_outstanding_fusion checks for pending commands every 1 second. But megasas_complete_cmd_dpc_fusion is only called every 5 seconds. If the commands are already completed by firmware, there is an additional delay of 5 seconds before driver will process completion for these commands. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bdb5c55fffb9cb11ca7053ffc2d076aa70bf4aac Author: Shivasharan S Date: Wed Aug 23 04:46:57 2017 -0700 scsi: megaraid_sas: Use synchronize_irq in target reset case Similar to task abort case, use synchronize_irq API in target reset case. Also, remove redundant call to megasas_complete_cmd_dpc_fusion after calling megasas_sync_irqs in task abort case. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e636a7a430f41efb0ff2727960ce61ef9f8f6769 Author: Shivasharan S Date: Wed Aug 23 04:46:56 2017 -0700 scsi: megaraid_sas: set minimum value of resetwaittime to be 1 secs Setting resetwaittime to 0 during a FW fault will result in driver not calling the OCR. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed2983f458bed9dc827ec60c8486253b1669bb52 Author: Shivasharan S Date: Wed Aug 23 04:46:55 2017 -0700 scsi: megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command Driver allocated 256 byte MFI frames bytes but while sending MFI frame (embedded inside chain frame of MPT frame) to firmware, driver sets the length as 4k. This results in DMA read error messages during boot. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44ed33e6c5d58342a9bc86172ad121c0687bb890 Author: Gustavo A. R. Silva Date: Tue Aug 22 15:53:53 2017 -0500 scsi: lpfc: remove useless code in lpfc_sli4_bsg_link_diag_test Remove variable assignments. The value stored in local variable _rc_ is overwritten at line 2448:rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0); before it can be used. Addresses-Coverity-ID: 1226935 Signed-off-by: Gustavo A. R. Silva Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_bsg.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 6a8dadcca81fceff9976e8828cceb072873b7bd5 Author: Todd Poynor Date: Tue Aug 15 22:41:08 2017 -0700 scsi: sg: protect against races between mmap() and SG_SET_RESERVED_SIZE Take f_mutex around mmap() processing to protect against races with the SG_SET_RESERVED_SIZE ioctl. Ensure the reserve buffer length remains consistent during the mapping operation, and set the "mmap called" flag to prevent further changes to the reserved buffer size as an atomic operation with the mapping. [mkp: fixed whitespace] Signed-off-by: Todd Poynor Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8d26f491116feaa0b16de370b6a7ba40a40fa0b4 Author: Todd Poynor Date: Tue Aug 15 21:48:43 2017 -0700 scsi: sg: recheck MMAP_IO request length with lock held Commit 1bc0eb044615 ("scsi: sg: protect accesses to 'reserved' page array") adds needed concurrency protection for the "reserve" buffer. Some checks that are initially made outside the lock are replicated once the lock is taken to ensure the checks and resulting decisions are made using consistent state. The check that a request with flag SG_FLAG_MMAP_IO set fits in the reserve buffer also needs to be performed again under the lock to ensure the reserve buffer length compared against matches the value in effect when the request is linked to the reserve buffer. An -ENOMEM should be returned in this case, instead of switching over to an indirect buffer as for non-MMAP_IO requests. Signed-off-by: Todd Poynor Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 55e1f9f0881e29cf4974ee551aa36d2bca7ab1d6 Author: Dan Carpenter Date: Thu Aug 17 17:44:44 2017 +0300 scsi: hpsa: fix the device_id in hpsa_update_device_info() The parentheses are in the wrong place so we specify the length as "sizeof(this_device->device_id) < 0" which is zero. Fixes: 988b87edd231 ("scsi: hpsa: Ignore errors for unsupported LV_DEVICE_ID VPD page") Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78453a31d5136cfd8722c111935f6800fa0db0b4 Author: Arvind Yadav Date: Wed Aug 16 10:29:24 2017 +0530 scsi: aha1542: 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: Martin K. Petersen drivers/scsi/aha1542.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92227b8d3d7fd0c9a5b78c3967a756e83a43b36d Author: weiping zhang Date: Fri Aug 11 01:52:17 2017 +0800 scsi: scsi-sysfs: Adjust error returned for adapter reset request If scsi_host_template->host_reset is NULL and the user requests an adapter reset through echo adapter > /sys/class/scsi_host/hostx/host_reset -EINVAL will be returned even though the "adapter" argument is perfectly valid. Change this so that we only return -EINVAL if the provided string is invalid. If the host does not implement a ->host_reset function we'll return -EOPNOTSUPP. [mkp: tweaked patch description] Signed-off-by: weiping zhang Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 085e56766f74e8fdafb0e988c150e28464747cdc Author: Hannes Reinecke Date: Tue Aug 15 16:28:49 2017 +0200 scsi: ch: add refcounting struct scsi_changer needs refcounting as the device might be removed while the fd is still open. [mkp: whitespace] Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ch.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit db269932b97e8e7d2bc974dc6a63cb795ddd7e54 Author: Gustavo A. R. Silva Date: Sat Aug 12 20:26:32 2017 -0500 scsi: pmcraid: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 60747936bd5c0f7de2179f7076fe89ad93675680 Author: Arvind Yadav Date: Wed Aug 16 10:28:40 2017 +0530 scsi: ncr5380: 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 Acked-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7fa2cbda560655df58c418880013a1ed9e01e17 Author: Chad Dupuis Date: Tue Aug 15 10:08:21 2017 -0700 scsi: qedf: Update driver version to 8.20.5.0. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0516abdf2d94b0427e57b46dc0a7d72ba3bffabb Author: Chad Dupuis Date: Tue Aug 15 10:08:20 2017 -0700 scsi: qedf: Fix up modinfo parameter name for 'debug' in modinfo output. Because we were passing 'qedf_debug' instead of 'debug' to the MODULE_PARM_DESC() macro, modinfo listed the parameter name as 'qedf_debug' instead of it's proper name 'debug'. Correct the parameter name. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 428ca6423e5214584a807c10845d81f0805e126a Author: Chad Dupuis Date: Tue Aug 15 10:08:19 2017 -0700 scsi: qedf: Covert single-threaded workqueues to regular workqueues. There is no ordering required for the various workqueues the driver uses so they can be converted to regular workqueues. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf29116375b7868aabe826ceda6fbe3f2451f8a7 Author: Chad Dupuis Date: Tue Aug 15 10:08:18 2017 -0700 scsi: qedf: Corrent VLAN tag insertion in fallback VLAN case. Currently in the driver the qedf_ctx attribute vlan_hw_insert is used to which whether to insert a VLAN tag in FIP frames (except for FIP VLAN request which is explicitly sent out untagged at least from the driver's point of view). When we receive a FIP VLAN response, we set qedf->vlan_hw_insert to 0 which makes the qedf_fip_send function insert the VLAN. However when we exhaust our FIP VLAN retries, we do not set qedf->vlan_hw_insert to 0 which means that the driver will not tag the FIP frame with the correct VLAN ID. The result that was observed on the wire is that some entity either in the LL2 or L2 firmware is adding a NULL VLAN tag which can cause FIP solicitation to fail. The offload FCoE frame function, qedf_xmit, does not use the vlan_hw_insert attribute to decide whether to tag frames with the FIP/FCoE VLAN. Instead it unilaterially tags the offload frames with the VLAN ID stored in qedf->vlan_id. This is the correct behavior so the driver can guarantee that non-offload FIP frames go out with the correct VLAN ID. Also use the Linux network layer helpers instead of doing the VLAN insert manually. Also fix setting the fallback VLAN so that it used the module parameter and is not hardcoded to 1002 (though 1002 is the default). [mkp: fixed typo] Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf.h | 1 - drivers/scsi/qedf/qedf_fip.c | 18 +++++++----------- drivers/scsi/qedf/qedf_main.c | 12 ++++++++---- 3 files changed, 15 insertions(+), 16 deletions(-) commit a3cd42a9d627fd7c472664e454108829886e123f Author: Chad Dupuis Date: Tue Aug 15 10:08:17 2017 -0700 scsi: qedf: Use granted MAC from the FCF for the FCoE source address if it is available. Currently in the driver we've been using the fc_fcoe_set_mac() function to set the source MAC for FCoE traffic. This works well in most cases as it uses the spec. default FCF-MAC. However, if the administrator changes the FCF-MAC switch, then any FCoE traffic we send will be dropped by the switch. Instead we should check the granted MAC from the FLOGI payload and use that address if it is present. Otherwise, fall back to using the the default FCF-MAC and the fabric ID of the port as the FCoE MAC address. Once this address is known we need to set it when doing non-offload traffic, offload traffic and setting the data_src_address libfcoe uses for FIP keep alive messages. Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf.h | 1 - drivers/scsi/qedf/qedf_fip.c | 17 ------------- drivers/scsi/qedf/qedf_main.c | 59 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 51 insertions(+), 26 deletions(-) commit 01fd76a76552b801897ac087e4e2d7667dd7c458 Author: Chad Dupuis Date: Tue Aug 15 10:08:16 2017 -0700 scsi: qedf: Set WWNN and WWPN based on values from qed. If dev_info.wwpn and dev_info.wwnn are set by qed use these values to set the WWNs of the port. Otherwise fall back to the old method using fcoe_wwn_from_mac(). Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit b4a028a57058754e30a1a5df2b980b95c13dac61 Author: Colin Ian King Date: Wed Aug 16 09:51:20 2017 +0100 scsi: qla2xxx: fix spelling mistake of variable sfp_additonal_info Trivial fix to variable name, sfp_additonal_info should be sfp_additional_info (add in missing i). Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 59e3da58705b3d86f45c68b639a6e9f22341bd11 Author: Dan Carpenter Date: Fri Aug 4 11:17:33 2017 +0300 scsi: osst: silence underflow warning in osst_verify_frame() The code looks like this: i = ntohl(aux->filemark_cnt); if (STp->header_cache != NULL && i < OS_FM_TAB_MAX && (i > STp->filemark_cnt || STp->first_frame_position - 1 != ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[i]))) { If i is negative then it's less than OS_FM_TAB_MAX so we read before the start of the STp->header_cache->dat_fm_tab.fm_tab_ent[] array. Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/osst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32690e0b5601f95610f0254202ad2321900ac726 Author: Colin Ian King Date: Tue Aug 15 15:08:28 2017 +0100 scsi: osst: add missing indent on a for loop statement The for loop is statement is missing an indent, add it. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/osst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbaf61e2e9e8bf32fcc77497e4eb26122fdac553 Author: Colin Ian King Date: Tue Aug 15 14:51:45 2017 +0100 scsi: mpt3sas: fix pr_info message continuation An optional discovery status should be printed with a pr_cont and needs a leading space to make it more readable. The final new line should also be a pr_cont and the indentation is out by one, so fix that too. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc56ce12d50c0adc1243bd3d080133bc6b63f403 Author: Hannes Reinecke Date: Tue Aug 15 10:21:43 2017 +0200 scsi: ses: make page2 support optional Simple subenclosures do not need to support SES page 2, so make it optional. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 81b59d7565b8703dfdf738e81e6dc0a417818000 Author: Hannes Reinecke Date: Tue Aug 15 10:21:42 2017 +0200 scsi: ses: Fixup error message 'failed to get diagnostic page 0xffffffea' The printk was using the result as argument, leading to a slightly confusing log message. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit acf8ab9a85bfd6ead185a59c4cfe26b25d5a082f Author: Hannes Reinecke Date: Tue Aug 15 10:21:41 2017 +0200 scsi: ses: check return code from ses_recv_diag() We should be checking the return code from ses_recv_diag() to avoid accessing invalid data. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8cd71f1f32a6227ecadbbbaaf3147a41292ecb5 Author: Hannes Reinecke Date: Tue Aug 15 08:58:09 2017 +0200 scsi: hpsa: Remove 'hpsa_allow_any' module option As the cciss driver has been removed there are no overlapping PCI IDs anymore, and the 'hpsa_allow_any' flag can be removed. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 253d2464df446456c0bba5ed4137a7be0b278aa8 Author: Hannes Reinecke Date: Tue Aug 15 08:58:08 2017 +0200 scsi: cciss: Drop obsolete driver The hpsa driver now has support for all boards the cciss driver used to support, so this patch removes the cciss driver and make hpsa an alias to cciss. Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen Documentation/blockdev/cciss.txt | 194 -- MAINTAINERS | 10 - drivers/block/Kconfig | 27 - drivers/block/Makefile | 1 - drivers/block/cciss.c | 5415 -------------------------------------- drivers/block/cciss.h | 433 --- drivers/block/cciss_cmd.h | 269 -- drivers/block/cciss_scsi.c | 1653 ------------ drivers/block/cciss_scsi.h | 79 - drivers/scsi/hpsa.c | 1 + 10 files changed, 1 insertion(+), 8081 deletions(-) commit 45f769b2f85d71af7ff7b7aa2b80ebf3ebd125a9 Author: Hannes Reinecke Date: Tue Aug 15 08:58:07 2017 +0200 scsi: hpsa: do not print errors for unsupported report luns format Legacy boards might not support the 'extended' report luns format, but as this is to be expected we don't need to print out an error here. Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 65e8697ee6f54e802dcebf546f02db9adec05760 Author: Hannes Reinecke Date: Tue Aug 15 08:58:06 2017 +0200 scsi: hpsa: Ignore errors for unsupported LV_DEVICE_ID VPD page Legacy boards might not support the LV_DEVICE_ID VPD page, so we shouldn't print out an error message here. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d17944a4797f00430ab890d18ec1a5d6fd352d8 Author: Hannes Reinecke Date: Tue Aug 15 08:58:05 2017 +0200 scsi: hpsa: disable volume status check for legacy boards Legacy boards might not support volume status, so assume the volume is online here. Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 135ae6edeb51979d0998daf1357f149a7d6ebb08 Author: Hannes Reinecke Date: Tue Aug 15 08:58:04 2017 +0200 scsi: hpsa: add support for legacy boards Add support for legacy boards, ensuring to enable the driver for those boards only when 'hpsa_allow_any' is set. The attribute 'legacy_board' is set to '1' if the device is a legacy board, and '0' otherwise. Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 67 +++++++++++++++++++++++++++++++++++++++----- drivers/scsi/hpsa.h | 81 ++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 121 insertions(+), 27 deletions(-) commit 9ff870417e56b1fb7b15b2cda74de639d3cd8559 Author: Christophe JAILLET Date: Tue Aug 15 22:18:14 2017 +0200 scsi: cxlflash: Fix an error handling path in 'cxlflash_disk_attach()' 'rc' is known to be 0 at this point. If 'create_context()' fails, returns -ENOMEM instead of 0 which means success. Signed-off-by: Christophe JAILLET Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 1 + 1 file changed, 1 insertion(+) commit c0e8ed04b32307c192bcf37f5810e490e4d2739e Author: Helge Deller Date: Thu Aug 10 21:08:49 2017 +0200 scsi: sym53c8xx: Avoid undefined behaviour On parisc I see this UBSAN warning with a sym53c896: UBSAN: Undefined behaviour in ./drivers/scsi/sym53c8xx_2/sym_hipd.c:762:24 index -1903078336 is out of range for type 'u32 [7]' Avoid this warning by switching to div64_ul(). [mkp: fix typo] Signed-off-by: Helge Deller Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a97712e5314aefe16b3ffb4583a34deaa49de04 Author: Hannes Reinecke Date: Fri Aug 11 08:53:47 2017 +0200 scsi: make 'state' device attribute pollable While the 'state' attribute can (and will) change occasionally, calling 'poll()' or 'select()' on it fails as sysfs is never notified that the state has changed. With this patch calling 'poll()' or 'select()' will work properly. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 3 +++ drivers/scsi/scsi_transport_srp.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 8cd1ec78ca15f1016f6c3c683c21b3383b5cb966 Author: Hannes Reinecke Date: Fri Aug 11 08:53:46 2017 +0200 scsi: scsi_lib: rework scsi_internal_device_unblock_nowait() Rework scsi_internal_device_unblock_nowait() into using a switch statement. No functional changes. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit fe083323bb7ee56b69dacdd2e5d8469be95a8f12 Author: Arvind Yadav Date: Sun Jul 30 14:10:32 2017 +0530 scsi: esas2r: constify pci_device_id. pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Bradley Grove Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 582b0ab200105b06704cef6da814fbde4c2ca00b Author: Richard W.M. Jones Date: Thu Aug 10 17:56:52 2017 +0100 scsi: virtio: virtio_scsi: Set can_queue to the length of the virtqueue. Since switching to blk-mq as the default in commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much kernel memory. qemu currently allocates a fixed 128 entry virtqueue. can_queue currently is set to 1024. But with indirect descriptors, each command in the queue takes 1 virtqueue entry, so the number of commands which can be queued is equal to the length of the virtqueue. Note I intend to send a patch to qemu to allow the virtqueue size to be configured from the qemu command line. Signed-off-by: Richard W.M. Jones Acked-by: Paolo Bonzini Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44ed8089e991a60d614abe0ee4b9057a28b364e4 Author: Richard W.M. Jones Date: Thu Aug 10 17:56:51 2017 +0100 scsi: virtio: Reduce BUG if total_sg > virtqueue size to WARN. If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Signed-off-by: Richard W.M. Jones Reviewed-by: Paolo Bonzini Signed-off-by: Martin K. Petersen drivers/virtio/virtio_ring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 42d7c10f23786ed8521338ba6fd905a2459fa1e0 Author: Manish Rangankar Date: Thu Aug 10 06:32:17 2017 -0700 scsi: qedi: Limit number for CQ queues. [qed_sp_iscsi_func_start:189(host_7-0)]Cannot satisfy CQ amount. Queues requested 8, CQs available 4. Aborting function start Above condition will resolve as management firmware is capable of telling us the number of CQs available for a given PF, qed will communicate the same number to qedi, So that qedi will know how much CQs are allowed. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi.h | 5 ++--- drivers/scsi/qedi/qedi_iscsi.c | 2 +- drivers/scsi/qedi/qedi_main.c | 10 +++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) commit 30b67de31bc6c0cdc80c03358dc94b44cc178ba9 Author: John Garry Date: Fri Aug 11 00:09:44 2017 +0800 scsi: hisi_sas: remove driver versioning The driver version is not updated with changes to the driver, so it has no value, so just get rid of it. 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 | 3 --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 - 3 files changed, 6 deletions(-) commit 76aae5f60bb0029cd1a5b9fa8ed6705498db52ee Author: John Garry Date: Fri Aug 11 00:09:43 2017 +0800 scsi: hisi_sas: replace kfree with scsi_host_put Instances of kfree(shost) should be replaced with scsi_host_put(). In addition, a missing scsi_host_put() is added for error path in hisi_sas_shost_alloc_pci() and v3 driver removal. Signed-off-by: Pan Bian # For main.c changes Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) commit 5aec704f0db7b12663b13b3c73dc1432f9dddcf0 Author: John Garry Date: Fri Aug 11 00:09:42 2017 +0800 scsi: hisi_sas: remove phy_down_v3_hw() res variable Variable res only holds value 0, so remove it. This cleans up a coccicheck warning. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2400620c1fedb503f14f252e4ac799dfa45ed722 Author: Xiang Chen Date: Fri Aug 11 00:09:41 2017 +0800 scsi: hisi_sas: add phy_set_linkrate_v3_hw() Add function to set linkrate for v3 hw. 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 | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 056e4cc66c07d17f39945fec8d2d62e0a27e53ea Author: Xiang Chen Date: Fri Aug 11 00:09:39 2017 +0800 scsi: hisi_sas: update some v3 register init settings This patch updates some register setting according to recommendation from HW designer and experiment. 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 | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit a25d0d3df2a17a245ffa09077d0c4e5fc40088cf Author: Xiang Chen Date: Fri Aug 11 00:09:40 2017 +0800 scsi: hisi_sas: add reset handler for v3 hw Use ACPI "_RST" method to reset the controller, since FLR is not supported. Function hisi_sas_stop_phys() is introduced to remove some code duplication. 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 | 9 ++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 24 +---- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 158 +++++++++++++++++++++++++++++---- 4 files changed, 157 insertions(+), 36 deletions(-) commit c038f53842cf840889473d219ace7f9121694e8d Author: Andrzej Hajda Date: Thu Aug 24 15:33:53 2017 +0200 drm/exynos/dsi: propagate info about command mode from panel mipi_dsi framework provides information about panel's mode of work. This info should be propagated upstream to configure all elements of the pipeline. As CRTC is the common denominator of the pipeline we can put such info into its structures. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++ 2 files changed, 3 insertions(+) commit 295e7954c0d3fdbe0550d13e3cf4dd4604d42c68 Author: Andrzej Hajda Date: Thu Aug 24 15:33:52 2017 +0200 drm/exynos/dsi: refactor panel detection logic Description of drm_helper_hpd_irq_event clearly states that drivers supporting hotplug events per connector should use different helper - drm_kms_helper_hotplug_event. To achieve it following changes have been performed: - moved down all DSI ops - they require exynos_dsi_disable function to be defined earlier, - simplified exynos_dsi_detect - there is no real detection, it just returns if panel is attached, - DSI attach/detach callbacks attaches/detaches DRM panel and sets connector status and other context fields accordingly, all this is performed under mutex, as these callbacks are asynchronous. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 203 ++++++++++++++++---------------- 1 file changed, 102 insertions(+), 101 deletions(-) commit 1ca582f10e212e29165f087705460d9de96eb9f4 Author: Andrzej Hajda Date: Thu Aug 24 15:33:51 2017 +0200 drm/exynos: use helper to set possible crtcs All encoders share the same code to set encoders possible_crtcs field. The patch creates helper to abstract out this code. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_dp.c | 15 +++++---------- drivers/gpu/drm/exynos/exynos_drm_core.c | 1 + drivers/gpu/drm/exynos/exynos_drm_crtc.c | 21 ++++++++++++++++++--- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 10 +++++++--- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 12 ++++-------- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++++--------- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 15 +++++---------- drivers/gpu/drm/exynos/exynos_hdmi.c | 25 +++++++++---------------- 8 files changed, 53 insertions(+), 59 deletions(-) commit 30b8913fd3ebc89d8a261b0d75e7034c3460adb9 Author: Andrzej Hajda Date: Thu Aug 24 15:33:50 2017 +0200 drm/exynos/decon5433: use readl_poll_timeout helpers Linux core provide helpers for polling with timeout, lets use them. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 7075a867ce5748007b299bd28f12754cd51719d4 Author: Chuck Lever Date: Tue Aug 1 12:00:14 2017 -0400 svcrdma: Clean up svc_rdma_build_read_chunk() Dan Carpenter observed that the while() loop in svc_rdma_build_read_chunk() does not document the assumption that the loop interior is always executed at least once. Defensive: the function now returns -EINVAL if this assumption fails. Suggested-by: Dan Carpenter Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_rw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit afea5657c20b11ec9f895ac5cc33b560fb1e0276 Author: Chuck Lever Date: Tue Aug 1 12:00:06 2017 -0400 sunrpc: Const-ify struct sv_serv_ops Close an attack vector by moving the arrays of per-server methods to read-only memory. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 2 +- fs/nfs/callback.c | 10 +++++----- fs/nfsd/nfssvc.c | 2 +- include/linux/sunrpc/svc.h | 6 +++--- net/sunrpc/svc.c | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) commit c1df609d9dcec5dcb89ee3091edc3671da1c9996 Author: Chuck Lever Date: Tue Aug 1 11:59:58 2017 -0400 nfsd: Const-ify NFSv4 encoding and decoding ops arrays Close an attack vector by moving the arrays of encoding and decoding methods to read-only memory. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2412e927604e0af7e17ae4b688b85a1e87e378fe Author: Chuck Lever Date: Tue Aug 1 11:59:49 2017 -0400 sunrpc: Const-ify instances of struct svc_xprt_ops Close an attack vector by moving the arrays of server-side transport methods to read-only memory. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_xprt.h | 4 ++-- net/sunrpc/svcsock.c | 6 +++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit bac966d6065207b6900a4c2a3e6e5f78cfee7b4d Author: J. Bruce Fields Date: Sat May 6 11:12:04 2017 -0400 nfsd4: individual encoders no longer see error cases With a few exceptions, most individual encoders don't handle error cases. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 309 ++++++++++++++++++------------------------------------ 1 file changed, 103 insertions(+), 206 deletions(-) commit b7571e4cd39ae860379138b883bc5f57a8553184 Author: J. Bruce Fields Date: Sat May 6 10:49:21 2017 -0400 nfsd4: skip encoder in trivial error cases Most encoders do nothing in the error case. But they can still screw things up in that case: most errors happen very early in rpc processing, possibly before argument fields are filled in and bounds-tested, so encoders that do anything other than immediately bail on error can easily crash in odd error cases. So just handle errors centrally most of the time to remove the chance of error. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 10 +++++++--- fs/nfsd/nfs4xdr.c | 3 +++ fs/nfsd/xdr4.h | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) commit 34b1744c91ccd44811005822106945fa80ecbff2 Author: J. Bruce Fields Date: Fri May 5 17:09:37 2017 -0400 nfsd4: define ->op_release for compound ops Run a separate ->op_release function if necessary instead of depending on the xdr encoder to do this. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 32 ++++++++++++++++++++++++++++++++ fs/nfsd/nfs4xdr.c | 9 +++------ fs/nfsd/xdr4.h | 1 + 3 files changed, 36 insertions(+), 6 deletions(-) commit 1e9d8e7ad3acd379d071e276f930f39bdebe3727 Author: Florian Fainelli Date: Thu Aug 24 17:47:11 2017 -0700 tg3: Be drop monitor friendly tg3_tx() does the normal packet TX completion, tigon3_dma_hwbug_workaround() and tg3_tso_bug() both need to allocate a new SKB that is suitable to workaround HW bugs, and finally tg3_free_rings() is doing ring cleanup. Use dev_consume_skb_any() for these 3 locations to be SKB drop monitor friendly. Signed-off-by: Florian Fainelli Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45c7ec9dd36c9c645c44689838c8a552730dc2fb Merge: 790c605 b673d6c Author: David S. Miller Date: Thu Aug 24 18:21:17 2017 -0700 Merge branch 'ipv6-Route-ICMPv6-errors-with-the-flow-when-ECMP-in-use' Jakub Sitnicki says: ==================== ipv6: Route ICMPv6 errors with the flow when ECMP in use This patch set is another take at making Path MTU Discovery work when server nodes are behind a router employing multipath routing in a load-balance or anycast setup (that is, when not every end-node can be reached by every path). The problem has been well described in RFC 7690 [1], but in short - in such setups ICMPv6 PTB errors are not guaranteed to be routed back to the server node that sent a reply that exceeds path MTU. The proposed solution is two-fold: (1) on the server side - reflect the Flow Label [2]. This can be done without modifying the application using a new per-netns sysctl knob that has been proposed independently of this patchset in the patch entitled "ipv6: Add sysctl for per namespace flow label reflection" [3]. (2) on the ECMP router - make the ipv6 routing subsystem look into the ICMPv6 error packets and compute the flow-hash from its payload, i.e. the offending packet that triggered the error. This is the same behavior as ipv4 stack has already. With both parts in place Path MTU Discovery can work past the ECMP router when using IPv6. [1] https://tools.ietf.org/html/rfc7690 [2] https://tools.ietf.org/html/draft-wang-6man-flow-label-reflection-01 [3] http://patchwork.ozlabs.org/patch/804870/ v1 -> v2: - don't use "extern" in external function declaration in header file - style change, put as many arguments as possible on the first line of a function call, and align consecutive lines to the first argument - expand the cover letter based on the feedback v2 -> v3: - switch to computing flow-hash using flow dissector to align with recent changes to multipath routing in ipv4 stack - add a sysctl knob for enabling flow label reflection per netns --- Testing has covered multipath routing of ICMPv6 PTB errors in forward and local output path in a simple use-case of an HTTP server sending a reply which is over the path MTU size [3]. I have also checked if the flows get evenly spread over multiple paths (i.e. if there are no regressions) [4]. [3] https://github.com/jsitnicki/tools/tree/master/net/tests/ecmp/pmtud [4] https://github.com/jsitnicki/tools/tree/master/net/tests/ecmp/load-balance ==================== Signed-off-by: David S. Miller commit b673d6cceae2b3e106addd27b79d321cc739bd43 Author: Jakub Sitnicki Date: Wed Aug 23 09:58:31 2017 +0200 ipv6: Use multipath hash from flow info if available Allow our callers to influence the choice of ECMP link by honoring the hash passed together with the flow info. This allows for special treatment of ICMP errors which we would like to route over the same path as the IPv6 datagram that triggered the error. Also go through rt6_multipath_hash(), in the usual case when we aren't dealing with an ICMP error, so that there is one central place where multipath hash is computed. Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller net/ipv6/route.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 956b45318a27cefa5e99fbbbe703ea8a2a3aee13 Author: Jakub Sitnicki Date: Wed Aug 23 09:58:30 2017 +0200 ipv6: Fold rt6_info_hash_nhsfn() into its only caller Commit 644d0e656958 ("ipv6 Use get_hash_from_flowi6 for rt6 hash") has turned rt6_info_hash_nhsfn() into a one-liner, so it no longer makes sense to keep it around. Also remove the accompanying comment that has become outdated. Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller net/ipv6/route.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 23aebdacb05dab9efdf22b9e0413491cbd5f128f Author: Jakub Sitnicki Date: Wed Aug 23 09:58:29 2017 +0200 ipv6: Compute multipath hash for ICMP errors from offending packet When forwarding or sending out an ICMPv6 error, look at the embedded packet that triggered the error and compute a flow hash over its headers. This let's us route the ICMP error together with the flow it belongs to when multipath (ECMP) routing is in use, which in turn makes Path MTU Discovery work in ECMP load-balanced or anycast setups (RFC 7690). Granted, end-hosts behind the ECMP router (aka servers) need to reflect the IPv6 Flow Label for PMTUD to work. The code is organized to be in parallel with ipv4 stack: ip_multipath_l3_keys -> ip6_multipath_l3_keys fib_multipath_hash -> rt6_multipath_hash Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller include/net/ip6_route.h | 1 + net/ipv6/icmp.c | 1 + net/ipv6/route.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) commit 29825717123fb9cfb9e709327d565c2f2fa89903 Author: Jakub Sitnicki Date: Wed Aug 23 09:58:28 2017 +0200 net: Extend struct flowi6 with multipath hash Allow for functions that fill out the IPv6 flow info to also pass a hash computed over the skb contents. The hash value will drive the multipath routing decisions. This is intended for special treatment of ICMPv6 errors, where we would like to make a routing decision based on the flow identifying the offending IPv6 datagram that triggered the error, rather than the flow of the ICMP error itself. Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller include/net/flow.h | 1 + 1 file changed, 1 insertion(+) commit f4f9ef4a1b0a1ca80b152e28e176d69515bdf7e8 Author: J. Bruce Fields Date: Thu Jul 6 17:51:29 2017 -0400 nfsd4: opdesc will be useful outside nfs4proc.c Trivial cleanup, no change in behavior. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 25 +++++++++++-------------- fs/nfsd/nfs4xdr.c | 1 + fs/nfsd/xdr4.h | 2 ++ 3 files changed, 14 insertions(+), 14 deletions(-) commit 790c6056686cc4dd5b149b330bbd5ae208d4d721 Author: David S. Miller Date: Thu Aug 24 18:10:46 2017 -0700 devlink: Fix devlink_dpipe_table_register() stub signature. One too many arguments compared to the non-stub version. Reported-by: kbuild test robot Fixes: ffd3cdccf214 ("devlink: Add support for dynamic table size") Signed-off-by: David S. Miller include/net/devlink.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 22b6722bfa591ba03d6a0c5521b600d4ab2d9a27 Author: Jakub Sitnicki Date: Wed Aug 23 09:55:41 2017 +0200 ipv6: Add sysctl for per namespace flow label reflection Reflecting IPv6 Flow Label at server nodes is useful in environments that employ multipath routing to load balance the requests. As "IPv6 Flow Label Reflection" standard draft [1] points out - ICMPv6 PTB error messages generated in response to a downstream packets from the server can be routed by a load balancer back to the original server without looking at transport headers, if the server applies the flow label reflection. This enables the Path MTU Discovery past the ECMP router in load-balance or anycast environments where each server node is reachable by only one path. Introduce a sysctl to enable flow label reflection per net namespace for all newly created sockets. Same could be earlier achieved only per socket by setting the IPV6_FL_F_REFLECT flag for the IPV6_FLOWLABEL_MGR socket option. [1] https://tools.ietf.org/html/draft-wang-6man-flow-label-reflection-01 Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 9 +++++++++ include/net/netns/ipv6.h | 1 + net/ipv6/af_inet6.c | 1 + net/ipv6/sysctl_net_ipv6.c | 8 ++++++++ 4 files changed, 19 insertions(+) commit 4243c408f7402e254454d4770dfc1437545eba1b Author: Maciej Purski Date: Mon Aug 21 13:07:39 2017 +0200 extcon: max77693: Allow MHL attach notifier Without this patch extcon couldn't notify attaching MHL cable. Signed-off-by: Maciej Purski Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max77693.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e593beaf60e003c4e0d65e6ea9ceb75c2971afbc Author: Arnd Bergmann Date: Thu Aug 24 13:19:08 2017 +0530 phy: ralink: fix 64-bit build warning Casting between an 'int' and a pointer causes a warning on 64-bit architectures in compile-testing this driver: drivers/phy/ralink/phy-ralink-usb.c: In function 'ralink_usb_phy_probe': drivers/phy/ralink/phy-ralink-usb.c:195:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] This changes the code to cast to uintptr_t instead. This is guaranteed to do what we want on all architectures and avoids the warning. Fixes: 2411a736ff09 ("phy: ralink-usb: add driver for Mediatek/Ralink") Acked-by: John Crispin Tested-by Harvey Hunt Reviewed-by Harvey Hunt Signed-off-by: Arnd Bergmann Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman drivers/phy/ralink/phy-ralink-usb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a1139697adac394ce1fb06410b914f070b314f64 Merge: accbef5 050da90 Author: Doug Ledford Date: Thu Aug 24 20:25:15 2017 -0400 Merge branch 'mellanox' into k.o/for-next Signed-off-by: Doug Ledford commit 9d913e43436c840020478463bd72098d8bf1556d Author: David Wu Date: Mon Aug 21 18:58:33 2017 +0800 PM / AVS: rockchip-io: add io selectors and supplies for RV1108 This adds the necessary data for handling io voltage domains on the RV1108. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Rafael J. Wysocki .../bindings/power/rockchip-io-domain.txt | 2 ++ drivers/power/avs/rockchip-io-domain.c | 38 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 9a6e91d08e7707baa2f824257342ca7efcb199bc Author: Christophe Jaillet Date: Sat Aug 19 22:22:46 2017 +0200 cpufreq: ti: Fix 'of_node_put' being called twice in error handling path If 'dev_pm_opp_set_supported_hw()' fails, 'opp_data->opp_node' refcount will be decremented 2 times. One, just a few lines above, and another one in the error handling path. Fix it by simply moving the 'of_node_put' call of the normal path. Signed-off-by: Christophe JAILLET Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d79d148b6451307fd46e30673ce9de28690c8ced Author: Viresh Kumar Date: Wed Aug 16 11:07:28 2017 +0530 cpufreq: dt-platdev: Drop few entries from whitelist Drop few ARM (32 and 64 bit) platforms from the whitelist which always use "operating-points-v2" property from their DT. They should continue to work after this patch. Tested on Hikey platform (only the "hisilicon,hi6220" entry). Signed-off-by: Viresh Kumar Acked-by: Chen-Yu Tsai Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 11 ----------- 1 file changed, 11 deletions(-) commit edeec420de2407618de097977e76b572d9de1bcf Author: Viresh Kumar Date: Wed Aug 16 11:07:27 2017 +0530 cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2 The initial idea of creating the cpufreq-dt-platdev.c file was to keep a list of platforms that use the "operating-points" (V1) bindings and create cpufreq device for them only, as we weren't sure which platforms would want the device to get created automatically as some had their own cpufreq drivers as well, or wanted to initialize cpufreq after doing some stuff from platform code. But that wasn't the case with platforms using "operating-points-v2" property. We wanted the device to get created automatically without the need of adding them to the whitelist. Though, we will still have some exceptions where we don't want to create the device automatically. Rename the earlier platform list as *whitelist* and create a new *blacklist* as well. The cpufreq-dt device will get created if: - The platform is there in the whitelist OR - The platform has "operating-points-v2" property in CPU0's DT node and isn't part of the blacklist . Reported-by: Geert Uytterhoeven Signed-off-by: Viresh Kumar Tested-by: Simon Horman Reviewed-by: Masahiro Yamada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 45 ++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) commit ec4259aa4497d61d7dc168e0c303971b1fc6747d Author: Arnd Bergmann Date: Wed Aug 23 15:27:23 2017 +0200 ARM: ux500: don't select CPUFREQ_DT The new 'select CPUFREQ_DT' statement causes a warning in some configurations: warning: (ARCH_U8500) selects CPUFREQ_DT which has unmet direct dependencies (CPU_FREQ && HAVE_CLK && OF && (!CPU_THERMAL || THERMAL)) No other platform does this, so I think for consistency it's best if we remove it again from ux500 and instead add the driver to the defconfig. Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Rafael J. Wysocki arch/arm/mach-ux500/Kconfig | 1 - 1 file changed, 1 deletion(-) commit e47ef3029ba14e7c2d2cfc7823d042f6f1bb94a2 Merge: 72d45a7 0bd46d7 Author: Dave Airlie Date: Fri Aug 25 09:30:54 2017 +1000 Merge tag 'sunxi-drm-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next sun4i DRM changes for 4.14, take 2 A single patch switching to a new OF helper. * tag 'sunxi-drm-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: use of_graph_get_remote_endpoint() commit 72d45a76039ba5635b989fdcb4e07739a3bde926 Merge: cfcfb65 d1bbc82 Author: Dave Airlie Date: Fri Aug 25 09:30:15 2017 +1000 Merge tag 'omapdrm-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm fixes for 4.14 * fix compilation when compiling omapfb driver * WA for OMAP3 endless sync lost issue * WA for OMAP5 DSI PLL issue * fix analog TV out modecheck * tag 'omapdrm-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: ARM: OMAP2+: fix missing variable declaration drm/omap: work-around for omap3 display enable drm/omap: fix i886 work-around drm/omap: fix analog tv-out modecheck commit 84dc4141f0353bada6af53d32730f3e47e579bc0 Author: Rob Herring Date: Tue Jul 18 16:42:55 2017 -0500 cpuidle: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki drivers/cpuidle/dt_idle_states.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit cfcfb65ad15a1b43cf5cd434c57966fae03db96b Merge: 7c0059d d1f08d8 Author: Dave Airlie Date: Fri Aug 25 09:29:45 2017 +1000 Merge tag 'drm-msm-next-2017-08-22' of git://people.freedesktop.org/~robclark/linux into drm-next Updates for 4.14.. I have some further patches from Jordan to add multiple priority levels and pre-emption, but those will probably be for 4.15 to give me time for the mesa parts. * tag 'drm-msm-next-2017-08-22' of git://people.freedesktop.org/~robclark/linux: drm/msm/mdp5: mark runtime_pm functions as __maybe_unused drm/msm: remove unused variable drm/msm/mdp5: make helper function static drm/msm: make msm_framebuffer_init() static drm/msm: add helper to allocate stolen fb drm/msm: don't track fbdev's gem object separately drm/msm: add modeset module param drm/msm/mdp5: add tracking for clk enable-count drm/msm: remove unused define drm/msm: Add a helper function for in-kernel buffer allocations drm/msm: Attach the GPU MMU when it is created drm/msm: Add A5XX hardware fault detection drm/msm: Remove uneeded platform dev members drm/msm/mdp5: Set up runtime PM for MDSS drm/msm/mdp5: Write to SMP registers even if allocations don't change drm/msm/mdp5: Don't use mode_set helper funcs for encoders and CRTCs drm/msm/dsi: Implement RPM suspend/resume callbacks drm/msm/dsi: Set up runtime PM for DSI drm/msm/hdmi: Set up runtime PM for HDMI drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks commit cc5a7a74943d5c4a8c0ce5ba7ab5284358d4a8d8 Author: Rob Herring Date: Tue Jul 18 16:42:54 2017 -0500 cpufreq: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Acked-by: Viresh Kumar Acked-by: Patrice Chotard Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pmac64-cpufreq.c | 2 +- drivers/cpufreq/sti-cpufreq.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit ea11e94badab2d4d58f9415d0211bc5f85d9d0a9 Author: Rob Herring Date: Tue Jul 18 16:42:50 2017 -0500 PM / Domains: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b54bf2fd156c6294eaaac2861939f679f8616b55 Author: Arvind Yadav Date: Wed Aug 23 11:37:05 2017 -0700 Input: ambakmi - constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov drivers/input/serio/ambakmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dd87c2af651b09e34eed09e60228a1fd2edf969 Author: Loic Pallardy Date: Tue Mar 28 13:49:44 2017 +0200 rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address To specify memory for remoteproc, we declare (dma_declare_coherent_memory()) an area which is ioremap'ed to the vmalloc area. However, this address is not a kernel address so virt_addr_valid(buf) fails. Signed-off-by: Ludovic Barre Signed-off-by: Loic Pallardy Acked-by: Patrice Chotard Tested-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit f93848f9eeb0f87874b8ba8798570bf391eff17f Author: Loic Pallardy Date: Tue Mar 28 13:49:43 2017 +0200 rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable Rpmsg buffer size is currently fixed to 512 bytes. This patch introduces a new capability in struct virtproc_info to tune shared buffer size between host and coprocessor according to the needs. Acked-by: Suman Anna Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit e6b4c525d94e6fb28d5c4b9eb4016caa12f68841 Author: Takashi Iwai Date: Thu Aug 24 22:11:07 2017 +0200 ALSA: pcm: Correct broken procfs set up The commit c8da9be4a75f ("ALSA: pcm: Adjust nine function calls together with a variable assignment") contained a badly incorrect conversion, a "status" PCM procfs creation was replaced with the next one. Luckily, this could be spotted easily by the kernel runtime warning. Fixes: c8da9be4a75f ("ALSA: pcm: Adjust nine function calls together...") Reported-by: Fabio Estevam Tested-by: Fabio Estevam Signed-off-by: Takashi Iwai sound/core/pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 050da902adde8faf6b1bef15ac4876ae145358f4 Author: Bodong Wang Date: Thu Aug 17 15:52:35 2017 +0300 IB/mlx5: Report mlx5 enhanced multi packet WQE capability Expose enhanced multi packet WQE capability to user space through query_device by uhw. Signed-off-by: Bodong Wang Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 +++++ include/linux/mlx5/mlx5_ifc.h | 2 +- include/uapi/rdma/mlx5-abi.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 795b609c8b59f8f20fa9d72bf8b4ae3b8aa5582c Author: Bodong Wang Date: Thu Aug 17 15:52:34 2017 +0300 IB/mlx5: Allow posting multi packet send WQEs if hardware supports Set the field to allow posting multi packet send WQEs if hardware supports this feature. This doesn't mean the send WQEs will be for multi packet unless the send WQE was prepared according to multi packet send WQE format. User space shall use flag MLX5_IB_ALLOW_MPW to check if hardware supports MPW and allows MPW in SQ context. Signed-off-by: Bodong Wang Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 +++-- drivers/infiniband/hw/mlx5/qp.c | 2 ++ include/linux/mlx5/mlx5_ifc.h | 2 +- include/uapi/rdma/mlx5-abi.h | 5 +++++ 4 files changed, 11 insertions(+), 3 deletions(-) commit a550ddfc543e250798048cf4eabe721cd85ac724 Author: Yishai Hadas Date: Thu Aug 17 15:52:33 2017 +0300 IB/mlx5: Add support for multi underlay QP Set underlay QPN as part of flow rule when it's applicable. There is one root flow table in the NIC RX namespace and all the underlay QPs steer the traffic to this flow table. In order to prevent QP to get traffic which is not target to its underlay QP, we need to set the underlay QP number as part of the steering matching. Note: When multicast traffic is sent the QPN filtering is done by the firmware as some early step. Adding the QPN match on the flow table entry is wrong as by that time the target QPN holds the multicast address (e.g. FF(s)) and it won't match. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 49 +++++++++++++++++++++++++++++++++------ include/linux/mlx5/mlx5_ifc.h | 8 +++++-- 2 files changed, 48 insertions(+), 9 deletions(-) commit 7b4cdaae73ee833975a767cf54a3354d355b3f8d Author: Ilya Lesokhin Date: Thu Aug 17 15:52:32 2017 +0300 IB/mlx5: Fix integer overflow when page_shift == 31 Fix a bug where MR registration fails when mlx5_ib_cont_pages indicates that the MR can be mapped using 2GB pages (page_shift == 31). Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Ilya Lesokhin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5942d8ae411775b76e5e1ab0cce57b0666516f2d Author: Kamal Heib Date: Thu Aug 17 15:52:31 2017 +0300 IB/mlx5: Fix memory leak in clean_mr error path In clean_mr error path the 'mr' should be freed. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Kamal Heib Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ff740aefecb98da4605df1cada7904c44eaee161 Author: Ilya Lesokhin Date: Thu Aug 17 15:52:30 2017 +0300 IB/mlx5: Decouple MR allocation and population flows mlx5 compatible devices have two ways of populating the MTT table of an MKEY: using a FW command and using a UMR WQE. A UMR is much faster, so it should be used whenever possible. Unfortunately the code today uses UMR only if the MKEY was allocated from the MR cache. Fix the code to use UMR even for MKEYs that were allocated using a FW command. Signed-off-by: Ilya Lesokhin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 75 ++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 30 deletions(-) commit 8b7ff7f3b301de52924cb2cf3fed47b181893116 Author: Ilya Lesokhin Date: Thu Aug 17 15:52:29 2017 +0300 IB/mlx5: Enable UMR for MRs created with reg_create This patch is the first step in decoupling UMR usage and allocation from the MR cache. The only functional change in this patch is to enables UMR for MRs created with reg_create. This change fixes a bug where ODP memory regions that were not allocated from the MR cache did not have UMR enabled. Signed-off-by: Ilya Lesokhin Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 33 ++++++++++++++------------------- include/linux/mlx5/driver.h | 2 +- 3 files changed, 16 insertions(+), 21 deletions(-) commit 96dc3fc5f1d66b20cdf839d571c7b907e08d5d00 Author: Noa Osherovich Date: Thu Aug 17 15:52:28 2017 +0300 IB/mlx5: Expose software parsing for Raw Ethernet QP Software parsing (SWP) is a feature that can be used to instruct the device to stop using its internal parser and to parse packets on the transmit path according to offsets set for each packets. Through this feature, the device allows the handling of checksum and LSO by the hardware according to the location of IP and TCP/UDP headers. Enable SW parsing on Raw Ethernet send queue by default if firmware supports it and report these capabilities to user space. Signed-off-by: Noa Osherovich Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 21 +++++++++++++++++++++ drivers/infiniband/hw/mlx5/qp.c | 3 +++ include/uapi/rdma/mlx5-abi.h | 17 +++++++++++++++++ 3 files changed, 41 insertions(+) commit accbef5cc624be745c1de903dd3a05681aaa0ac1 Author: Yuval Shaia Date: Thu Aug 24 20:11:42 2017 +0300 RDMA/i40iw: Remove unused argument None of the calls to i40iw_netdev_vlan_ipv6 are using mac so let's remove it from func's args-list. Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 847cb1a3566ca5b47b94a8e90f881b533f35cf07 Author: Colin Ian King Date: Thu Aug 24 09:25:53 2017 +0100 RDMA/qedr: fix spelling mistake: "invlaid" -> "invalid" Trivial fix to spelling mistake in DP_ERR error message Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Reviewed-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e0962d52216f2e5bab59bb055f1210e41f484f Author: Selvin Xavier Date: Wed Aug 23 01:08:07 2017 -0700 IB: Avoid ib_modify_port() failure for RoCE devices IB CM calls ib_modify_port() irrespective of link layer. If the failure is returned, the mad agent gets unregistered for those devices. Recently, modify_port() hook was removed from some of the low level drivers as it was always returning success. This breaks rdma connection establishment over those devices. For ethernet devices, Qkey violation and port capabilities are not applicable. So returning success for RoCE when modify_port hook is is not implemented. Cc: Leon Romanovsky Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a31a2a3b27f18bce0830581057a3fff75b830924 Author: Adit Ranadive Date: Tue Aug 22 23:19:01 2017 -0700 RDMA/vmw_pvrdma: Update device query parameters and port caps Added support for two device caps - max_sge_rd, max_fast_reg_page_list_len and the IP_BASED_GIDS port cap flag. Reviewed-by: Jorgen Hansen Reviewed-by: Bryan Tan Reviewed-by: Aditya Sarwade Signed-off-by: Adit Ranadive Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 9 ++++++++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit 05297b66ad874f6b650498a39af5a4e353e5ba19 Author: Bryan Tan Date: Tue Aug 22 23:19:00 2017 -0700 RDMA/vmw_pvrdma: Add RoCEv2 support The driver version is bumped for compatibility purposes. Also, send correct GID type during register to device. Added compatibility check macros for the device. Reviewed-by: Jorgen Hansen Reviewed-by: Aditya Sarwade Signed-off-by: Bryan Tan Signed-off-by: Adit Ranadive Reviewed-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 2 ++ drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 28 +++++++++++++++++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 36 ++++++++++------------- drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 7 +++++ 4 files changed, 51 insertions(+), 22 deletions(-) commit 31a8236276c1328d6770c30cf0b3dc5c07ede65b Author: Feras Daoud Date: Wed Aug 23 08:37:21 2017 +0300 IB/ipoib: Enable ioctl for to IPoIB rdma netdevs Adds support for ioctl callback in the RDMA netdevs to allow supporting functions not handled by the generic interface code. Signed-off-by: Feras Daoud Signed-off-by: Eitan Rabin Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4b7ee6781f6aab3d236021af36aa4c95a089f402 Author: Leon Romanovsky Date: Thu Aug 17 15:50:55 2017 +0300 RDMA/nes: Remove zeroed parameter from port query callback There is no need to explicitly zero parameters, because the structure requested to be filled already initialized to zeros. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_verbs.c | 5 ----- 1 file changed, 5 deletions(-) commit 17bf1ad2e80db7c9bdafec9c2da72389247194e9 Author: Leon Romanovsky Date: Thu Aug 17 15:50:54 2017 +0300 RDMA/mlx4: Properly annotate link layer variable The rdma_port_get_link_layer() returns enum rdma_link_layer as a return value, hence it is better to store the return value in specially annotated variable and not in int. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 84305d71d6ca9a2e6a33d9b403639f1cdeeee846 Author: Leon Romanovsky Date: Thu Aug 17 15:50:53 2017 +0300 RDMA/mlx5: Limit scope of get vector affinity local function The mlx5_ib_get_vector_affinity() call is local to main.c file and there is no need to be declared globally visible. Fixes: 40b24403f33e ("mlx5: support ->get_vector_affinity") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fab773cb51150ea29ec041d5d001845fac026a3b Author: Kamal Heib Date: Thu Aug 17 15:50:52 2017 +0300 IB/rxe: Make rxe_counter_name static rxe_counter_name is used in rxe_hw_counters.c only. Make it static. Fixes: 0b1e5b99a48b ('IB/rxe: Add port protocol stats') Signed-off-by: Kamal Heib Reviewed-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_hw_counters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69956d83267e29e38cda7d506c4085932789fef2 Author: Erez Shitrit Date: Thu Aug 17 15:50:50 2017 +0300 IB/ipoib: Sync between remove_one to sysfs calls that use rtnl_lock In order to avoid deadlock between sysfs functions (like create/delete child) and remove_one (both of them are using the sysfs lock and rtnl_lock) the driver will use a state mutex for sync. That will fix traces as the following: schedule+0x3e/0x90 kernfs_drain+0x75/0xf0 ? wait_woken+0x90/0x90 __kernfs_remove+0x12e/0x1c0 kernfs_remove+0x25/0x40 sysfs_remove_dir+0x57/0x90 kobject_del+0x22/0x60 device_del+0x195/0x230 pm_runtime_set_memalloc_noio+0xac/0xf0 netdev_unregister_kobject+0x71/0x80 rollback_registered_many+0x205/0x2f0 rollback_registered+0x31/0x40 unregister_netdevice_queue+0x58/0xb0 unregister_netdev+0x20/0x30 ipoib_remove_one+0xb7/0x240 [ib_ipoib] ib_unregister_device+0xbc/0x1b0 [ib_core] ib_unregister_mad_agent+0x29/0x30 [ib_core] mlx4_ib_remove+0x67/0x280 [mlx4_ib] INFO: task echo:24082 blocked for more than 120 seconds. Tainted: G OE 4.1.12-37.5.1.el6uek.x86_64 #2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Call Trace: schedule+0x3e/0x90 schedule_preempt_disabled+0xe/0x10 __mutex_lock_slowpath+0x95/0x110 ? _rcu_barrier+0x177/0x220 mutex_lock+0x23/0x40 rtnl_lock+0x15/0x20 netdev_run_todo+0x81/0x1f0 rtnl_unlock+0xe/0x10 ipoib_vlan_delete+0x12f/0x1c0 [ib_ipoib] delete_child+0x69/0x80 [ib_ipoib] dev_attr_store+0x20/0x30 sysfs_kf_write+0x41/0x50 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 | 8 +++++++- drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 +++++ drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 22 ++++++++++++++++++---- 4 files changed, 31 insertions(+), 5 deletions(-) commit f9bfea992e7d7557c40a58e8536ad8c6f177de25 Author: Guy Levi Date: Thu Aug 17 15:50:49 2017 +0300 IB/mlx4: Check that reserved fields in mlx4_ib_create_qp_rss are zero According to mlx4 convention, need to fail the command due to a non-zero value in the user data which is expected to be zero. Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") Signed-off-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 3 +++ 1 file changed, 3 insertions(+) commit b23673f86fd0d9ccbc088e88e29899b4d3f0f055 Author: Guy Levi Date: Thu Aug 17 15:50:48 2017 +0300 IB/mlx4: Remove redundant attribute in mlx4_ib_create_qp_rss struct rx_key_len is not in use and needs to be removed. Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") Signed-off-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/uapi/rdma/mlx4-abi.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 078b3573030346df0cdc46d798c0f434dc53c2cc Author: Guy Levi Date: Thu Aug 17 15:50:47 2017 +0300 IB/mlx4: Fix struct mlx4_ib_create_wq alignment The mlx4 ABI defines to have structures with alignment of 64B. Fixes: 400b1ebcfe31 ("IB/mlx4: Add support for WQ related verbs") Signed-off-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 9 ++++----- include/uapi/rdma/mlx4-abi.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) commit c3f1ee292f23cf49b43c0e9cf8c52bec821b6649 Author: Guy Levi Date: Thu Aug 17 15:50:46 2017 +0300 IB/mlx4: Fix RSS QP type in creation verb The mlx4 was designed to support QP type of MLX4_IB_QPT_RAW_PACKET. Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") Signed-off-by: Guy Levi 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 4a5fd5d2965cb889f30ad94a3bfd83da70aa2c9c Author: Maor Gottlieb Date: Thu Aug 17 15:50:45 2017 +0300 IB/mlx5: Add necessary delay drop assignment Assign the statistics and configuration structure pointer on success. Fixes: fe248c3a5837 ('IB/mlx5: Add delay drop configuration and statistics') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 4edf8d5caf52968f3ebb58140835cfa1cfd72a2d Author: Talat Batheesh Date: Thu Aug 17 15:50:44 2017 +0300 IB/mlx5: Fix some spelling mistakes Fix spelling mistakes in remarks "retrun"->"return" "Decalring"->"Declaring" Signed-off-by: Talat Batheesh Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 2 +- drivers/infiniband/hw/mlx5/mad.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit faa9141c2268ccbd469bd876ba97e98b38f50fae Author: Talat Batheesh Date: Thu Aug 17 15:50:43 2017 +0300 IB/mlx4: Fix some spelling mistakes Fix spelling mistakes in remarks "retrun"->"return" "cancell"->"cancel" Signed-off-by: Talat Batheesh Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- drivers/infiniband/hw/mlx4/cq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 623248955d985b86cd778c63efe6a7ad03a018c4 Author: Leon Romanovsky Date: Thu Aug 17 15:50:42 2017 +0300 RDMA/mthca: Make explicit conversion to 64bit value The "lg" variable is declared as int so in all places where this variable is used as a shift operand, the output will be int too. This produces the following smatch warning: drivers/infiniband/hw/mthca/mthca_cmd.c:701 mthca_map_cmd() warn: should '1 << lg' be a 64 bit type? Simple declaration of "1" to be "1ULL" will fix the issue. Signed-off-by: Leon Romanovsky Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d50f400e56fbc7a14ef3f8d42ba47710e455881 Author: Leon Romanovsky Date: Thu Aug 17 15:50:41 2017 +0300 RDMA/usnic: Fix remove address space warning Sparse tool complains with the following error: drivers/infiniband/hw/usnic/usnic_ib_main.c:445:16: warning: cast removes address space of expression Fix it by doing casting on correct field and convert function helper which sets ifaddr to be void, because there are no users who are interested in returned value. Fixes: c7845bcafe4d ("IB/usnic: Add UDP support in u*verbs.c, u*main.c and u*util.h") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_fwd.c | 12 ++---------- drivers/infiniband/hw/usnic/usnic_fwd.h | 2 +- drivers/infiniband/hw/usnic/usnic_ib_main.c | 10 ++++++---- 3 files changed, 9 insertions(+), 15 deletions(-) commit 31f97bad06446ca2d929a363a4b5cd494f276ba5 Author: Leon Romanovsky Date: Thu Aug 17 15:50:40 2017 +0300 RDMA/mlx4: Remove gfp_mask argument from acquire_group call All callers of acquire_group() passed the same gfp_mask to it and it is safe to remove it. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mcg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 82901e3eb8f72326b06ac8c7285462d90cd3a56c Author: Leon Romanovsky Date: Thu Aug 17 15:50:39 2017 +0300 RDMA/core: Refactor get link layer wrapper The return values from rdma_node_get_transport() are strict and IB_LINK_LAYER_UNSPECIFIED is unreachable in this flow. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit cdc596d89e39521cf412209a19b8baeb8d788cdc Author: Leon Romanovsky Date: Thu Aug 17 15:50:38 2017 +0300 RDMA/core: Delete BUG() from unreachable flow Remove call to BUG() in case wrong node_type was provided. This flow is unreachable, because node_types are supplied from specific enum. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 78b57f9529225111b440e6e5150f52f5d44e3c60 Author: Leon Romanovsky Date: Thu Aug 17 15:50:37 2017 +0300 RDMA/core: Cleanup device capability enum Cleanup patch prior exporting the ib_device_cap_flags to the user space. In this patch, we are aligning the indentation, removing IB_DEVICE_INIT_TYPE and IB_DEVICE_RESERVED fields, because it is not used in the kernel. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dcc9881e6767559c04faf15804ac145a2ea026cb Author: Leon Romanovsky Date: Thu Aug 17 15:50:36 2017 +0300 RDMA/(core, ulp): Convert register/unregister event handler to be void The functions ib_register_event_handler() and ib_unregister_event_handler() always returned success and they can't fail. Let's convert those functions to be void, remove redundant checks and cleanup tons of goto statements. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 23 ++++++++--------------- drivers/infiniband/core/device.c | 8 ++------ drivers/infiniband/core/sa_query.c | 3 +-- drivers/infiniband/core/uverbs_main.c | 13 +------------ drivers/infiniband/ulp/ipoib/ipoib_main.c | 10 +--------- drivers/infiniband/ulp/iser/iser_verbs.c | 6 ++---- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 7 +------ drivers/infiniband/ulp/srpt/ib_srpt.c | 5 ++--- include/rdma/ib_verbs.h | 4 ++-- 9 files changed, 20 insertions(+), 59 deletions(-) commit 55f2467cd717241dd941153d4db1e23c91aecf98 Author: Maor Gottlieb Date: Thu Aug 17 15:50:35 2017 +0300 RDMA/mlx4: Fix create qp command alignment Avoid extra padding by replacing the order of inl_recv_sz and reserved, otherwise 'mlx4_ib_create_qp' structure might be larger than legacy user input leading to copy of some garbage data from the user space buffer. Fixes: ea30b966f7dd ('IB/mlx4: Add inline-receive support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/uapi/rdma/mlx4-abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fba02e6cb775078bc0bdf207197e0a44b1f85aca Author: Leon Romanovsky Date: Thu Aug 17 15:50:34 2017 +0300 RDMA/mlx4: Don't use uninitialized variable Avoid usage of uninitialized variable. Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") 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 89caa0538ecf2114e1badbb1e75120d25bec985e Author: Parav Pandit Date: Thu Aug 17 15:50:33 2017 +0300 IB/uverbs: Introduce and use helper functions to copy ah attributes This patch introduces two helper functions to copy ah attributes from uverbs to internal ib_ah_attr structure and the other way during modify qp and query qp respectively. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 127 ++++++++++++++--------------------- 1 file changed, 51 insertions(+), 76 deletions(-) commit 5ab2d89b85a6c5c2d7604c9674f77a68f3d24f91 Author: Leon Romanovsky Date: Thu Aug 17 15:50:32 2017 +0300 IB/cma: Fix erroneous validation of supported default GID type When rdma_cm is initializing a cma_device it checks if this device supports the preferred default GID type. This check was done in a wrong way and therefore sometimes rdma_cm is coming up with default GID type that is not supported by the device. Fix that by checking for supported GID type properly. Fixes: 3c7f67d1880d ("IB/cma: Fix default RoCE type setting") Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Reviewed-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 732912c7386120179bf8f666febc232922e3ee17 Merge: e3bf14b ec25587 Author: Doug Ledford Date: Thu Aug 24 15:58:26 2017 -0400 Merge branch 'k.o/for-4.13-rc' into k.o/for-next Pick up -rc fixes. Signed-off-by: Doug Ledford commit c1aa3871fa0f676559f6d0cb6941e5f4ce7de306 Author: Andrii Bordunov Date: Sun Aug 13 23:43:43 2017 +0300 Documentation: stable-kernel-rules: fix broken git urls git.kernel.org links don't work (fatal: repository ... not found). Update them with the current style from https://git.kernel.org There is no HTTP option, so also switch HTTP -> HTTPS. Signed-off-by: Andrii Bordunov Signed-off-by: Jonathan Corbet Documentation/process/stable-kernel-rules.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68a1e349cecf4e24531cba0f1545a436fa18ee51 Author: Alex Shi Date: Mon Jul 31 09:50:54 2017 +0800 rtmutex: update rt-mutex The rtmutex remove a pending owner bit in in rt_mutex::owner, in commit 8161239a8bcc ("rtmutex: Simplify PI algorithm and make highest prio task get lock") But the document was changed accordingly. Updating it to a meaningful state. BTW, as 'Steven Rostedt' mentioned: There is still technically a "Pending Owner", it's just not called that anymore. The pending owner happens to be the top_waiter of a lock that has no owner and has been woken up to grab the lock. Signed-off-by: Alex Shi Cc: Steven Rostedt Cc: Sebastian Siewior Cc: Mathieu Poirier Cc: Juri Lelli Cc: Thomas Gleixner To: linux-doc@vger.kernel.org To: linux-kernel@vger.kernel.org To: Jonathan Corbet To: Ingo Molnar To: Peter Zijlstra Signed-off-by: Jonathan Corbet Documentation/locking/rt-mutex.txt | 58 +++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 32 deletions(-) commit f1824df12ecd495b25c8c116876e201ac764ecea Author: Alex Shi Date: Mon Jul 31 09:50:53 2017 +0800 rtmutex: update rt-mutex-design The rt-mutex-design documents didn't gotten meaningful update from its first version. Even after owner's pending bit was removed in commit 8161239a8bcc ("rtmutex: Simplify PI algorithm and make highest prio task get lock") and priority list 'plist' changed to rbtree. And Peter Zijlstra did some clean up and fix for deadline task changes on tip tree. So update it to latest code and make it meaningful. Steven Rostedt and Sebastian Siewior gave much of comments and input in this doc. Thanks! Signed-off-by: Alex Shi Cc: Steven Rostedt Cc: Sebastian Siewior Cc: Mathieu Poirier Cc: Juri Lelli Cc: Thomas Gleixner To: linux-doc@vger.kernel.org To: linux-kernel@vger.kernel.org To: Jonathan Corbet To: Ingo Molnar To: Peter Zijlstra Signed-off-by: Jonathan Corbet Documentation/locking/rt-mutex-design.txt | 432 ++++++++---------------------- 1 file changed, 105 insertions(+), 327 deletions(-) commit 39a7e5892418514db114ea4842d7d88aee6a61b8 Author: Bhumika Goyal Date: Wed Aug 23 18:22:01 2017 +0530 net/mlx5e: make mlx5e_profile const Make this const as it is only passed as an argument to the function mlx5e_create_netdev and the corresponding argument is of type const. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f2c5fb2d81656e79cdfbe78a5790c35993ed1ff Author: Bhumika Goyal Date: Wed Aug 23 18:17:39 2017 +0530 net/mlx4_core: make mlx4_profile const Make these const as they are only used in a copy operation. Signed-off-by: Bhumika Goyal Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e4c2b75897c6a621546b4f11a42c6072e833f81 Author: Markus Heiser Date: Mon Aug 14 10:53:33 2017 +0200 docs: fix minimal sphinx version in conf.py according to what Documentation/doc-guide/sphinx.rst says:: The ReST markups currently used by the Documentation/ files are meant to be built with ``Sphinx`` version 1.3 or upper. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5303b8d3a2eeaa5fddd20e1061dc2ec4707aaa67 Author: Markus Heiser Date: Mon Aug 14 10:15:16 2017 +0200 docs: fix nested numbering in the TOC With Sphinx 1.6 nested numbering is reported as warning:: ./input/joydev/index.rst:13: WARNING: input/joydev/joystick-api is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-open is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-close is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-ioctl is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-func-poll is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-caps is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-log-addrs is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-adap-g-phys-addr is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-dqevent is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-g-mode is already assigned section numbers (nested numbered toctree?) ./media/uapi/cec/cec-funcs.rst:8: WARNING: media/uapi/cec/cec-ioc-receive is already assigned section numbers (nested numbered toctree?) TOC numbering is already set in:: ./input/devices/index.rst:9: ./media/uapi/cec/cec-api.rst:19: I guess the nested numbering in: ./input/joydev/index.rst ./media/uapi/cec/cec-funcs.rst is just a C&P typo, so lets remove it. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/input/joydev/index.rst | 1 - Documentation/media/uapi/cec/cec-funcs.rst | 1 - 2 files changed, 2 deletions(-) commit be629b441da555eb75b5d41d48caca02da52aaae Author: Naren Date: Wed Aug 16 15:45:57 2017 -0700 NVMEM documentation fix: A minor typo This is a minor patch that fixes the following typo in the NVMEM documentation: When a consumers no longer needs the NVMEM to, When a consumer no longer needs the NVMEM Signed-off-by: Narendran Sankaran Signed-off-by: Jonathan Corbet Documentation/nvmem/nvmem.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd96b8da68d32a9403726db09b229f4b5ac849c7 Author: Randy Dodgen Date: Thu Aug 24 15:26:01 2017 -0400 ext4: fix fault handling when mounted with -o dax,ro If an ext4 filesystem is mounted with both the DAX and read-only options, executables on that filesystem will fail to start (claiming 'Segmentation fault') due to the fault handler returning VM_FAULT_SIGBUS. This is due to the DAX fault handler (see ext4_dax_huge_fault) attempting to write to the journal when FAULT_FLAG_WRITE is set. This is the wrong behavior for write faults which will lead to a COW page; in particular, this fails for readonly mounts. This change avoids journal writes for faults that are expected to COW. It might be the case that this could be better handled in ext4_iomap_begin / ext4_iomap_end (called via iomap_ops inside dax_iomap_fault). These is some overlap already (e.g. grabbing journal handles). Signed-off-by: Randy Dodgen Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Reviewed-by: Ross Zwisler fs/ext4/file.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5148e6ab76ea38e5c06376afb1340acdced52e4c Author: Mauro Carvalho Chehab Date: Wed Aug 23 04:05:43 2017 -0300 docs-rst: pdf: use same vertical margin on all Sphinx versions Currently, on Sphinx up to version 1.4, pdf output uses a vertical margin of 1 inch. For upper versions, it uses a margin of 0.5 inches. That causes both page headers and footers to be very close to the margin of the sheet. Not all printers support writing like that. Also, there's no reason why the layout for newer versions would be different than for previous ones. So, standardize it, by always setting to 1 inch. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95f1fda47c9d8738f858c3861add7bf0a36a7c0b Author: zhangyi (F) Date: Thu Aug 24 15:21:50 2017 -0400 ext4: fix quota inconsistency during orphan cleanup for read-only mounts Quota does not get enabled for read-only mounts if filesystem has quota feature, so that quotas cannot updated during orphan cleanup, which will lead to quota inconsistency. This patch turn on quotas during orphan cleanup for this case, make sure quotas can be updated correctly. Reported-by: Jan Kara Signed-off-by: zhangyi (F) Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org # 3.18+ fs/ext4/super.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit b0a5a9589decd07db755d6a8d9c0910d96ff7992 Author: zhangyi (F) Date: Thu Aug 24 15:19:39 2017 -0400 ext4: fix incorrect quotaoff if the quota feature is enabled Current ext4 quota should always "usage enabled" if the quota feautre is enabled. But in ext4_orphan_cleanup(), it turn quotas off directly (used for the older journaled quota), so we cannot turn it on again via "quotaon" unless umount and remount ext4. Simple reproduce: mkfs.ext4 -O project,quota /dev/vdb1 mount -o prjquota /dev/vdb1 /mnt chattr -p 123 /mnt chattr +P /mnt touch /mnt/aa /mnt/bb exec 100<>/mnt/aa rm -f /mnt/aa sync echo c > /proc/sysrq-trigger #reboot and mount mount -o prjquota /dev/vdb1 /mnt #query status quotaon -Ppv /dev/vdb1 #output quotaon: Cannot find mountpoint for device /dev/vdb1 quotaon: No correct mountpoint specified. This patch add check for journaled quotas to avoid incorrect quotaoff when ext4 has quota feautre. Signed-off-by: zhangyi (F) Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org # 3.18 fs/ext4/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92a037f01ab3e7b8e5b0533faf42d4bbfce04e98 Author: Mauro Carvalho Chehab Date: Sun Jul 16 19:08:06 2017 -0300 doc: Makefile: if sphinx is not found, run a check script Right now, if the building system doesn't find Sphinx, it bails out, without providing any instructions about what should be done. Instead, run a script, providing some guidance about the steps needed for Sphinx build to work. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 918dc9d0ab8565886de3ea8bac329e2b102e7f3a Author: Damien Guibouret Date: Thu Aug 24 15:11:34 2017 -0400 ext4: remove useless test and assignment in strtohash functions On transformation of str to hash, computed value is initialised before first byte modulo 4. But it is already initialised before entering loop and after processing last byte modulo 4. So the corresponding test and initialisation could be removed. Signed-off-by: Damien Guibouret Signed-off-by: Theodore Ts'o fs/ext4/hash.c | 4 ---- 1 file changed, 4 deletions(-) commit adf31eebd75e9e7c2eda222695637398b3872a68 Author: Josh Holland Date: Sat Aug 19 16:21:06 2017 +0100 docs: Fix paths in security/keys Several paths in the security/keys documentation were incorrect. Signed-off-by: Josh Holland Signed-off-by: Jonathan Corbet Documentation/security/keys/core.rst | 4 ++-- Documentation/security/keys/request-key.rst | 2 +- Documentation/security/keys/trusted-encrypted.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit b4daf890578af08f720a2a39b97b62da2f39fc94 Author: Suman Anna Date: Mon Jul 31 15:05:02 2017 -0500 remoteproc/keystone: Add support for Keystone 66AK2G SOCs Add support to the keystone remoteproc driver for managing the DSP present in the Keystone 2 66AK2G SoC. The 66AK2G SoC has a Power Management Micro Controller (PMMC) that manages the individual device's power, clock and reset functionalities. The keystone remoteproc driver already uses standard frameworks for reset and clock control, so it doesn't require any significant modifications other than a new compatible suitable for 66AK2G DSP. The binding document is also updated to reflect the modified property values used by the 66AK2G DSP node as compared to the values used by existing Keystone 2 DSPs. Acked-by: Rob Herring Signed-off-by: Suman Anna Signed-off-by: Andrew F. Davis Signed-off-by: Bjorn Andersson .../bindings/remoteproc/ti,keystone-rproc.txt | 73 +++++++++++++++++++--- drivers/remoteproc/keystone_remoteproc.c | 1 + 2 files changed, 65 insertions(+), 9 deletions(-) commit 616965805f6da028fe164f917d6fbd81b29dc5bd Author: Suman Anna Date: Tue Aug 1 10:48:44 2017 -0500 remoteproc/davinci: Add device tree support for OMAP-L138 DSP The Davinci remoteproc driver currently supports the DSP remoteproc device created in legacy-style on OMAP-L13x SoCs. The driver has been enhanced to support the DSP remoteproc device created through Device Tree now. The current DT support handles the C674x DSP processor subsystem on OMAP-L138 SoCs. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit ae67b8007816a645eead9dff8b2e7cf8d484df10 Author: Suman Anna Date: Tue Aug 1 10:48:43 2017 -0500 dt-bindings: remoteproc: Add bindings for Davinci DSP processors Add the device tree bindings document for the DSP processor subsystem devices on TI Davinci DA8xx/OMAP-L13x SoCs. Acked-by: Rob Herring Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson .../bindings/remoteproc/ti,davinci-rproc.txt | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 59b2355fc90e4a4fade705d7f5254d2e6d50763e Author: Suman Anna Date: Tue Aug 1 10:48:42 2017 -0500 remoteproc/davinci: Add support to parse internal memories The DSP subsystem on OMAP-L13x SoCs has various internal RAM memories that can accessed from the ARM side. These memories can be configured to be used as either RAM or Cache. The Davinci remoteproc driver has been enhanced to parse and store the kernel mappings for these internal RAM memories. These mappings can then be used to support direct loading of text/data into these memories from the remoteproc driver. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 6fb9a8f5ada8c1d660830fde7363b1a3b3368373 Author: Suman Anna Date: Tue Aug 1 10:48:41 2017 -0500 remoteproc/davinci: Switch to platform_get_resource_byname() The davinci remoteproc driver currently uses the platform_get_resource() API for retrieving the IOMEM resources. Switch this function to use the platform_get_resource_byname() API instead in preparation for adding the DT support so that the binding can be agnostic of the IOMEM resource order. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e7d12ce121aa474ea6984ea1255a7bd85c09454f Merge: fb3bbbd 315ec39 Author: David S. Miller Date: Thu Aug 24 11:59:37 2017 -0700 Merge branch 'xdp-more-work-on-xdp-tracepoints' Jesper Dangaard Brouer says: ==================== xdp: more work on xdp tracepoints More work on streamlining and performance optimizing the tracepoints for XDP. I've created a simple xdp_monitor application that uses this tracepoint, and prints statistics. Available at github: https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_monitor_kern.c https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_monitor_user.c The improvement over tracepoint with strcpy: 9810372 - 8428762 = +1381610 pps faster - (1/9810372 - 1/8428762)*10^9 = -16.7 nanosec - 100-(8428762/9810372*100) = strcpy-trace is 14.08% slower - 981037/8428762*100 = removing strcpy made it 11.64% faster V3: Fix merge conflict with commit e4a8e817d3cb ("bpf: misc xdp redirect cleanups") V2: Change trace_xdp_redirect() to align with args of trace_xdp_exception() ==================== Signed-off-by: David S. Miller commit 315ec3990efd71f87e556cf7827a1ac2d565d5e8 Author: Jesper Dangaard Brouer Date: Thu Aug 24 12:33:23 2017 +0200 xdp: get tracepoints xdp_exception and xdp_redirect in sync Remove the net_device string name from the xdp_exception tracepoint, like the xdp_redirect tracepoint. Align the TP_STRUCT to have common entries between these two tracepoint. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/trace/events/xdp.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a873585587205750e7accfb2c93c29239ffa6e09 Author: Jesper Dangaard Brouer Date: Thu Aug 24 12:33:18 2017 +0200 xdp: remove net_device names from xdp_redirect tracepoint There is too much overhead in the current trace_xdp_redirect tracepoint as it does strcpy and strlen on the net_device names. Besides, exposing the ifindex/index is actually the information that is needed in the tracepoint to diagnose issues. When a lookup fails (either ifindex or devmap index) then there is a need for saying which to_index that have issues. V2: Adjust args to be aligned with trace_xdp_exception. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/trace/events/xdp.h | 24 ++++++++++++------------ net/core/filter.c | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) commit 2886447dc5add28226451c163cd9ac1d1b3bf59a Author: Jesper Dangaard Brouer Date: Thu Aug 24 12:33:13 2017 +0200 ixgbe: use return codes from ndo_xdp_xmit that are distinguishable For XDP_REDIRECT the use of return code -EINVAL is confusing, as it is used in three different cases. (1) When the index or ifindex lookup fails, and in the ixgbe driver (2) when link is down and (3) when XDP have not been enabled. The return code can be picked up by the tracepoint xdp:xdp_redirect for diagnosing why XDP_REDIRECT isn't working. Thus, there is a need different return codes to tell the issues apart. I'm considering using a specific err-code scheme for XDP_REDIRECT instead of using these errno codes. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2facaad6000f2322eb40ca379aced31c957f0a41 Author: Jesper Dangaard Brouer Date: Thu Aug 24 12:33:08 2017 +0200 xdp: make generic xdp redirect use tracepoint trace_xdp_redirect If the xdp_do_generic_redirect() call fails, it trigger the trace_xdp_exception tracepoint. It seems better to use the same tracepoint trace_xdp_redirect, as the native xdp_do_redirect{,_map} does. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/filter.h | 3 ++- net/core/dev.c | 4 ++-- net/core/filter.c | 35 +++++++++++++++++++++++------------ 3 files changed, 27 insertions(+), 15 deletions(-) commit d08adb82fda523cb51a767e2833c5c5bb0906162 Author: Jesper Dangaard Brouer Date: Thu Aug 24 12:33:03 2017 +0200 xdp: remove bpf_warn_invalid_xdp_redirect Given there is a tracepoint that can track the error code of xdp_do_redirect calls, the WARN_ONCE in bpf_warn_invalid_xdp_redirect doesn't seem relevant any longer. Simply remove the function. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 8 -------- 1 file changed, 8 deletions(-) commit 403df1f66cc0457221f3be5c210f128ab87de547 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 a1d6b1901a2154e9f44f39738491f0afc3f8608e 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 a6d05676047ec9ef7b98087f8b19a5283dd5a8ce Author: Tahsin Erdogan Date: Thu Aug 24 14:25:02 2017 -0400 ext4: backward compatibility support for Lustre ea_inode implementation Original Lustre ea_inode feature did not have ref counts on xattr inodes because there was always one parent that referenced it. New implementation expects ref count to be initialized which is not true for Lustre case. Handle this by detecting Lustre created xattr inode and set its ref count to 1. The quota handling of xattr inodes have also changed with deduplication support. New implementation manually manages quotas to support sharing across multiple users. A consequence is that, a referencing inode incorporates the blocks of xattr inode into its own i_block field. We need to know how a xattr inode was created so that we can reverse the block charges during reference removal. This is handled by introducing a EXT4_STATE_LUSTRE_EA_INODE flag. The flag is set on a xattr inode if inode appears to have been created by Lustre. During xattr inode reference removal, the manual quota uncharge is skipped if the flag is set. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 1 + fs/ext4/inode.c | 8 ---- fs/ext4/xattr.c | 141 +++++++++++++++++++++++++++++++++++++------------------- 3 files changed, 94 insertions(+), 56 deletions(-) commit eaa093d2c0d15ad48f66eee414452e4eaa2be3d2 Author: Christoph Hellwig Date: Thu Aug 24 13:59:24 2017 -0400 ext4: remove timebomb in ext4_decode_extra_time() Changing behavior based on the version code is a timebomb waiting to happen, and not easily bisectable. Drop it and leave any removal to explicit developer action. (And I don't think file system should _ever_ remove backwards compatibility that has no explicit flag, but I'll leave that to the ext4 folks). Signed-off-by: Christoph Hellwig Signed-off-by: Theodore Ts'o Reviewed-by: Eric Biggers fs/ext4/ext4.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d695a1bea351276615ad270860bc1fbddcfbaeb3 Author: Markus Elfring Date: Thu Aug 24 13:50:24 2017 -0400 ext4: use sizeof(*ptr) 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: Theodore Ts'o Reviewed-by: Eric Sandeen fs/ext4/dir.c | 2 +- fs/ext4/mmp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c42ca04da57aad91689e681a124a174249bc1a70 Author: Bhumika Goyal Date: Sat Aug 19 13:52:22 2017 +0530 remoteproc: 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: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bd8d6cd3e413d64e543ec3e69ff43e75a1cf1ea Author: Darrick J. Wong Date: Thu Aug 24 13:22:06 2017 -0400 ext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets In the ext4 implementations of SEEK_HOLE and SEEK_DATA, make sure we return -ENXIO for negative offsets instead of banging around inside the extent code and returning -EFSCORRUPTED. Reported-by: Mateusz S Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org # 4.6 fs/ext4/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c72a18e46ebe0f09484cce8ebf847abdab58498 Author: Song Liu Date: Thu Aug 24 09:53:59 2017 -0700 md/raid5: release/flush io in raid5_do_work() In raid5, there are scenarios where some ios are deferred to a later time, and some IO need a flush to complete. To make sure we make progress with these IOs, we need to call the following functions: flush_deferred_bios(conf); r5l_flush_stripe_to_raid(conf->log); Both of these functions are called in raid5d(), but missing in raid5_do_work(). As a result, these functions are not called when multi-threading (group_thread_cnt > 0) is enabled. This patch adds calls to these function to raid5_do_work(). Note for stable branches: r5l_flush_stripe_to_raid(conf->log) is need for 4.4+ flush_deferred_bios(conf) is only needed for 4.11+ Cc: stable@vger.kernel.org (4.4+) Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8031c3ddc70ab93099e7d1814382dba39f57b43e Author: Shaohua Li Date: Thu Aug 17 10:35:11 2017 -0700 md/bitmap: copy correct data for bitmap super raid5 cache could write bitmap superblock before bitmap superblock is initialized. The bitmap superblock is less than 512B. The current code will only copy the superblock to a new page and write the whole 512B, which will zero the the data after the superblock. Unfortunately the data could include bitmap, which we should preserve. The patch will make superblock read do 4k chunk and we always copy the 4k data to new page, so the superblock write will old data to disk and we don't change the bitmap. Reported-by: Song Liu Reviewed-by: Song Liu Cc: stable@vger.kernel.org (4.10+) Signed-off-by: Shaohua Li drivers/md/bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 901ed070df3c2c19e3083a734eafc82599fe991b Author: Wang Shilong Date: Thu Aug 24 12:56:35 2017 -0400 ext4: reduce lock contention in __ext4_new_inode While running number of creating file threads concurrently, we found heavy lock contention on group spinlock: FUNC TOTAL_TIME(us) COUNT AVG(us) ext4_create 1707443399 1440000 1185.72 _raw_spin_lock 1317641501 180899929 7.28 jbd2__journal_start 287821030 1453950 197.96 jbd2_journal_get_write_access 33441470 73077185 0.46 ext4_add_nondir 29435963 1440000 20.44 ext4_add_entry 26015166 1440049 18.07 ext4_dx_add_entry 25729337 1432814 17.96 ext4_mark_inode_dirty 12302433 5774407 2.13 most of cpu time blames to _raw_spin_lock, here is some testing numbers with/without patch. Test environment: Server : SuperMicro Sever (2 x E5-2690 v3@2.60GHz, 128GB 2133MHz DDR4 Memory, 8GbFC) Storage : 2 x RAID1 (DDN SFA7700X, 4 x Toshiba PX02SMU020 200GB Read Intensive SSD) format command: mkfs.ext4 -J size=4096 test command: mpirun -np 48 mdtest -n 30000 -d /ext4/mdtest.out -F -C \ -r -i 1 -v -p 10 -u #first run to load inode mpirun -np 48 mdtest -n 30000 -d /ext4/mdtest.out -F -C \ -r -i 3 -v -p 10 -u Kernel version: 4.13.0-rc3 Test 1,440,000 files with 48 directories by 48 processes: Without patch: File Creation File removal 79,033 289,569 ops/per second 81,463 285,359 79,875 288,475 With patch: File Creation File removal 810669 301694 812805 302711 813965 297670 Creation performance is improved more than 10X with large journal size. The main problem here is we test bitmap and do some check and journal operations which could be slept, then we test and set with lock hold, this could be racy, and make 'inode' steal by other process. However, after first try, we could confirm handle has been started and inode bitmap journaled too, then we could find and set bit with lock hold directly, this will mostly gurateee success with second try. Tested-by: Shuichi Ihara Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ialloc.c | 50 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 11 deletions(-) commit c816c2558ed45e2db522ce8400fae82be6662415 Author: Colin Ian King Date: Tue Aug 15 10:50:34 2017 +0100 netfilter: ebtables: fix indent on if statements The returns on some if statements are not indented correctly, add in the missing tab. Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_ip.c | 4 ++-- net/bridge/netfilter/ebt_ip6.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8c2a75e5687e0137ddbb35454c7a1a468079f790 Author: Bjorn Andersson Date: Wed Aug 23 18:03:52 2017 -0700 of/device: Fix of_device_get_modalias() buffer handling of_device_request_module() calls of_device_get_modalias() with "len" 0, to calculate the size of the buffer needed to store the result, but due to integer promotion the ssize_t "len" will be compared as unsigned with strlen(compat) and the loop will generally never break. This results in a call to snprintf() with a negative len, which triggers below warning, followed by a dereference of a invalid pointer: [ 3.060067] WARNING: CPU: 0 PID: 51 at lib/vsprintf.c:2122 vsnprintf+0x348/0x6d8 ... [ 3.060301] [] vsnprintf+0x348/0x6d8 [ 3.060308] [] snprintf+0x48/0x50 [ 3.060316] [] of_device_get_modalias+0x108/0x160 [ 3.060322] [] of_device_request_module+0x20/0x88 ... Further more of_device_get_modalias() is supposed to return the number of bytes needed to store the entire modalias, so the loop needs to continue accumulate the total size even though the buffer is full. Finally the function is not expected to ensure space for the NUL, nor include it in the returned size, so only 1 should be added to the length of "compat" in the loop (to account for the character 'C'). Fixes: bc575064d688 ("of/device: use of_property_for_each_string to parse compatible strings") Cc: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Rob Herring drivers/of/device.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 08ab58d9de3eb8498ae0585001d0975e46217a39 Author: Bjorn Andersson Date: Wed Aug 23 18:04:04 2017 -0700 of/device: Prevent buffer overflow in of_device_modalias() As of_device_get_modalias() returns the number of bytes that would have been written to the target string, regardless of how much did fit in the buffer, it's possible that the returned index points beyond the buffer passed to of_device_modalias() - causing memory beyond the buffer to be null terminated. Fixes: 0634c2958927 ("of: Add function for generating a DT modalias with a newline") Cc: Rob Herring Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson Signed-off-by: Rob Herring drivers/of/device.c | 2 ++ 1 file changed, 2 insertions(+) commit b3480fe059ac9121b5714205b4ddae14b59ef4be Author: Florian Westphal Date: Sat Aug 12 00:57:08 2017 +0200 netfilter: conntrack: make protocol tracker pointers const Doesn't change generated code, but will make it easier to eventually make the actual trackers themselvers const. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 6 +++--- include/net/netfilter/nf_conntrack_l4proto.h | 4 ++-- include/net/netfilter/nf_conntrack_timeout.h | 2 +- net/netfilter/nf_conntrack_core.c | 12 ++++++------ net/netfilter/nf_conntrack_netlink.c | 22 +++++++++++----------- net/netfilter/nf_conntrack_proto.c | 20 ++++++++++---------- net/netfilter/nfnetlink_cttimeout.c | 14 +++++++------- net/netfilter/xt_CT.c | 2 +- net/openvswitch/conntrack.c | 4 ++-- 9 files changed, 43 insertions(+), 43 deletions(-) commit ea48cc83cf612fddb4e8868369348b9f936cfedb Author: Florian Westphal Date: Sat Aug 12 00:57:07 2017 +0200 netfilter: conntrack: print_conntrack only needed if CONFIG_NF_CONNTRACK_PROCFS Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 7 ++++--- net/netfilter/nf_conntrack_proto_dccp.c | 6 ++++++ net/netfilter/nf_conntrack_proto_gre.c | 4 ++++ net/netfilter/nf_conntrack_proto_sctp.c | 6 ++++++ net/netfilter/nf_conntrack_proto_tcp.c | 6 ++++++ 5 files changed, 26 insertions(+), 3 deletions(-) commit 91950833dd5a34ac6336aa88da6d43aaeb56ac6d Author: Florian Westphal Date: Sat Aug 12 00:57:06 2017 +0200 netfilter: conntrack: place print_tuple in procfs part CONFIG_NF_CONNTRACK_PROCFS is deprecated, no need to use a function pointer in the trackers for this. Place the printf formatting in the one place that uses it. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 4 -- include/net/netfilter/nf_conntrack_l4proto.h | 4 -- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 8 ---- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 11 ----- net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 8 ---- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 11 ----- net/netfilter/nf_conntrack_l3proto_generic.c | 6 --- net/netfilter/nf_conntrack_proto_dccp.c | 10 ----- net/netfilter/nf_conntrack_proto_generic.c | 7 ---- net/netfilter/nf_conntrack_proto_gre.c | 10 ----- net/netfilter/nf_conntrack_proto_sctp.c | 11 ----- net/netfilter/nf_conntrack_proto_tcp.c | 11 ----- net/netfilter/nf_conntrack_proto_udp.c | 13 ------ net/netfilter/nf_conntrack_standalone.c | 58 +++++++++++++++++++++++++- 14 files changed, 56 insertions(+), 116 deletions(-) commit 036c69400a34cf8f6d39c88325dd510462809e7b Author: Florian Westphal Date: Sat Aug 12 00:57:05 2017 +0200 netfilter: conntrack: reduce size of l4protocol trackers can use u16 for both, shrinks size by another 8 bytes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09ec82f5af99d1e35614eb0844b920fc335a313d Author: Florian Westphal Date: Sat Aug 12 00:57:04 2017 +0200 netfilter: conntrack: remove protocol name from l4proto struct no need to waste storage for something that is only needed in one place and can be deduced from protocol number. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 3 --- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 1 - net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 1 - net/netfilter/nf_conntrack_proto.c | 8 ++++---- net/netfilter/nf_conntrack_proto_dccp.c | 2 -- net/netfilter/nf_conntrack_proto_generic.c | 1 - net/netfilter/nf_conntrack_proto_gre.c | 1 - net/netfilter/nf_conntrack_proto_sctp.c | 2 -- net/netfilter/nf_conntrack_proto_tcp.c | 2 -- net/netfilter/nf_conntrack_proto_udp.c | 4 ---- net/netfilter/nf_conntrack_standalone.c | 17 ++++++++++++++++- 11 files changed, 20 insertions(+), 22 deletions(-) commit a3134d537f8209f5b149d7ed9f287047158845f0 Author: Florian Westphal Date: Sat Aug 12 00:57:03 2017 +0200 netfilter: conntrack: remove protocol name from l3proto struct no need to waste storage for something that is only needed in one place and can be deduced from protocol number. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 3 --- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 1 - net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 1 - net/netfilter/nf_conntrack_l3proto_generic.c | 1 - net/netfilter/nf_conntrack_standalone.c | 12 +++++++++++- 5 files changed, 11 insertions(+), 7 deletions(-) commit 0d03510038bda70b5a4a252e8216822e6ce0cbdb Author: Florian Westphal Date: Sat Aug 12 00:57:02 2017 +0200 netfilter: conntrack: compute l3proto nla size at compile time avoids a pointer and allows struct to be const later on. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 19 ++++++++----------- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 13 +++++++------ net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 14 ++++++++------ net/netfilter/nf_conntrack_netlink.c | 3 ++- net/netfilter/nf_conntrack_proto.c | 9 +++------ 5 files changed, 28 insertions(+), 30 deletions(-) commit fd46cd55fbc5a8e8c180ee04a30cda26c84569d2 Author: Helge Deller Date: Wed Aug 23 21:52:05 2017 +0200 printk-formats.txt: Add examples for %pF and %pS usage Signed-off-by: Helge Deller Signed-off-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Acked-by: Steven Rostedt (VMware) Documentation/printk-formats.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit eee6ebbac18a189ef33d25ea9b8bcae176515e49 Author: Nick Desaulniers Date: Fri Aug 11 11:16:07 2017 -0700 netfilter: nf_nat_h323: fix logical-not-parentheses warning Clang produces the following warning: net/ipv4/netfilter/nf_nat_h323.c:553:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] if (!set_h225_addr(skb, protoff, data, dataoff, taddr, ^ add parentheses after the '!' to evaluate the comparison first add parentheses around left hand side expression to silence this warning There's not necessarily a bug here, but it's cleaner to return early, ex: if (x) return ... rather than: if (x == 0) ... else return Also added a return code check that seemed to be missing in one instance. Signed-off-by: Nick Desaulniers Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_h323.c | 57 +++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 27 deletions(-) commit d81f734462d439291531266c4004ab97e9a033cc Author: Helge Deller Date: Wed Aug 16 18:53:16 2017 +0200 parisc: Fix up devices below a PCI-PCI MegaRAID controller bridge A MegaRAID PCI card in my rp5470 acts as PCI-PCI bridge. Resource allocation for PCI devices behind such a bridge is quite incomplete, so that syslog reports those warnings: LBA 0:10: PCI host bridge to bus 0000:50 pci_bus 0000:50: root bus resource [io 0x80000-0x8ffff] (bus address [0x0000-0xffff]) pci_bus 0000:50: root bus resource [mem 0xffffffff94000000-0xffffffff95ffffff] (bus address [0x94000000-0x95ffffff]) pci_bus 0000:50: root bus resource [bus 50-57] pci 0000:50:00.0: [8086:0964] type 01 class 0x060400 pci 0000:50:00.1: [8086:1960] type 00 class 0x0e0001 pci 0000:50:00.1: reg 0x10: [mem 0x00000000-0x003fffff pref] pci 0000:50:00.1: reg 0x30: [mem 0x00000000-0x00007fff pref] pci 0000:50:00.0: Changing bridge control from 0x00000000 to 0x00000023 pci_bus 0000:51: busn_res: can not insert [bus 51-ff] under [bus 50-57] (conflicts with (null) [bus 50-57]) pci 0000:50:00.0: PCI bridge to [bus 51-ff] pci 0000:50:00.0: bridge window [io 0x80000-0x80fff] pci 0000:50:00.0: bridge window [mem 0x00000000-0x000fffff] pci 0000:50:00.0: bridge window [mem 0x00000000-0x000fffff pref] pci 0000:50:00.0: can't claim BAR 14 [mem 0x00000000-0x000fffff]: no compatible bridge window pci 0000:50:00.0: can't claim BAR 15 [mem 0x00000000-0x000fffff pref]: no compatible bridge window pci 0000:50:00.0: can't claim BAR 16 [??? 0x00000000 flags 0x0]: no compatible bridge window pci_bus 0000:51: busn_res: [bus 51-ff] end is updated to 51 pci 0000:50:00.0: BAR 16: [??? 0x00000000 flags 0x20000000] has bogus alignment pci 0000:50:00.1: BAR 0: assigned [mem 0xffffffff94000000-0xffffffff943fffff pref] pci 0000:50:00.0: BAR 14: assigned [mem 0xffffffff94400000-0xffffffff944fffff] pci 0000:50:00.0: BAR 15: assigned [mem 0xffffffff94500000-0xffffffff945fffff pref] pci 0000:50:00.1: BAR 6: assigned [mem 0xffffffff94600000-0xffffffff94607fff pref] pci 0000:50:00.0: PCI bridge to [bus 51] pci 0000:50:00.0: bridge window [io 0x80000-0x80fff] pci 0000:50:00.0: bridge window [mem 0xffffffff94400000-0xffffffff944fffff] pci 0000:50:00.0: bridge window [mem 0xffffffff94500000-0xffffffff945fffff pref] The patch below tries to improve the resource allocation. Output is now: LBA 0:10: PCI host bridge to bus 0000:50 pci_bus 0000:50: root bus resource [io 0x80000-0x8ffff] (bus address [0x0000-0xffff]) pci_bus 0000:50: root bus resource [mem 0xffffffff94000000-0xffffffff95ffffff] (bus address [0x94000000-0x95ffffff]) pci_bus 0000:50: root bus resource [bus 50-57] pci 0000:50:00.0: Changing bridge control from 0x00000000 to 0x00000023 pci 0000:50:00.0: PCI bridge to [bus 51-ff] pci 0000:50:00.1: BAR 0: assigned [mem 0xffffffff94000000-0xffffffff943fffff pref] pci 0000:50:00.1: BAR 6: assigned [mem 0xffffffff94400000-0xffffffff94407fff pref] pci 0000:50:00.0: PCI bridge to [bus 51] pci 0000:50:00.0: bridge window [io 0x80000-0x80fff] Signed-off-by: Helge Deller drivers/parisc/lba_pci.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit 2959a5346b8943412226c4b51c78f9b6f077c2a0 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 fb3bbbda5f96512ee94fbc9c8712800087b63182 Merge: a5e2da6 a481d71 Author: David S. Miller Date: Thu Aug 24 09:33:17 2017 -0700 Merge branch 'mlxsw-ipv4-host-dpipe-table' Jiri Pirko says: ==================== mlxsw: Add IPv4 host dpipe table Arkadi says: This patchset adds IPv4 host dpipe table support. This will provide the ability to observe the hardware offloaded IPv4 neighbors. ==================== Signed-off-by: David S. Miller commit a481d71323980da1da74bdfd2c7e01040ec66371 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:10 2017 +0200 mlxsw: spectrum_dpipe: Add support for controlling neighbor counters Add support for controlling neighbor 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 | 33 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 ++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 4 +++ 3 files changed, 49 insertions(+) commit a86f030915f247b70da051506a0e3d889a4002d8 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:09 2017 +0200 mlxsw: spectrum_dpipe: Add support for IPv4 host table dump Add support for IPv4 host 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 | 247 +++++++++++++++++++++ 1 file changed, 247 insertions(+) commit 7cfcbc7591e30aeebbfd3f7b0ff615b5ee4f1da7 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:08 2017 +0200 mlxsw: spectrum_router: Add support for setting counters on neighbors Add support for setting counters on neighbors based on dpipe's host table counter status. This patch also adds the ability for getting the counter value, which will be used by the dpipe host table implementation in the next patches. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 56 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 3 ++ 4 files changed, 71 insertions(+), 2 deletions(-) commit 6bba7e20da12022efb24b5ed2991c904fde9c8e1 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:07 2017 +0200 mlxsw: reg: Make flow counter set type enum to be shared This is done as a preparation before introducing support for neighbor counters. The flow counter's type enum is used by many registers, yet, until now it was used only by mgpc and thus it was private. This patch updates the namespace for more generic usage. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 20 ++++++++++---------- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit 6aecb36bc01fc9c84f24c4155e8850b6a1962f03 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:06 2017 +0200 mlxsw: spectrum_dpipe: Add IPv4 host table initial support Add IPv4 host table initial support. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 102 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 1 + 2 files changed, 103 insertions(+) commit 7e57ae9fc5fc7fa056bfb7fd60ac0d9df938b174 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:05 2017 +0200 mlxsw: spectrum_dpipe: Fix label name Change label name for case of erif table init failure. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f17cc84d1c2f661cb29cb7efc58f9d654ef3c643 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:04 2017 +0200 mlxsw: spectrum_router: Add helpers for neighbor access This is done as a preparation before introducing the ability to dump the host table via dpipe, and to count the table size. The mlxsw's neighbor 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 | 36 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 13 ++++++++ 2 files changed, 49 insertions(+) commit 3580732448f128c39e7325912bc4368ade5dce7d Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:03 2017 +0200 devlink: Move dpipe entry clear function into devlink The entry clear routine can be shared between the drivers, thus it is moved inside devlink. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 24 ++-------------------- include/net/devlink.h | 6 ++++++ net/core/devlink.c | 22 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 22 deletions(-) commit ffd3cdccf214cf0df08856a6738544076c4cd548 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:02 2017 +0200 devlink: Add support for dynamic table size Up until now the dpipe table's size was static and known at registration time. The host table does not have constant size and it is resized in dynamic manner. In order to support this behavior the size is changed to be obtained dynamically via an op. This patch also adjust the current dpipe table for the new API. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 13 +++++++++---- include/net/devlink.h | 7 +++---- net/core/devlink.c | 12 +++++++----- 3 files changed, 19 insertions(+), 13 deletions(-) commit 23ca5ec3afefbd9330bd8d65cb2526ade21a6b96 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:01 2017 +0200 mlxsw: spectrum_dpipe: Fix erif table op name space Fix ERIF's table operations name space. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3fb886ecea93605a8ea14e258ff3158b8966781e Author: Arkadi Sharshevsky Date: Thu Aug 24 08:40:00 2017 +0200 devlink: Add IPv4 header for dpipe This will be used by the IPv4 host table which will be introduced in the following patches. This header is global and can be reused by many drivers. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 1 + include/uapi/linux/devlink.h | 5 +++++ net/core/devlink.c | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) commit 1177009131bee310421f5c04c43d3777cbacbdc8 Author: Arkadi Sharshevsky Date: Thu Aug 24 08:39:59 2017 +0200 devlink: Add Ethernet header for dpipe This will be used by the IPv4 host table which will be introduced in the following patches. This header is global and can be reused by many drivers. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 1 + include/uapi/linux/devlink.h | 8 ++++++++ net/core/devlink.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) commit 9e16b8d68a29a67571ca015faae401ef41e36159 Author: Dongdong Liu Date: Sat Aug 19 17:07:21 2017 +0800 PCI/DPC: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency in DPC driver. No functional change intended. Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch drivers/pci/pcie/pcie-dpc.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit f20c4ea49ec4708de97248927ac6138c2d14eba9 Author: Dongdong Liu Date: Sat Aug 19 17:07:20 2017 +0800 PCI/DPC: Add eDPC support Add eDPC support. Get and print the RP PIO error information when the trigger condition is RP PIO error. For more information on eDPC, please see PCI Express Base Specification Revision 3.1, section 6.2.10.3, or view the PCI-SIG eDPC ECN here: https://pcisig.com/sites/default/files/specification_documents/ECN_Enhanced_DPC_2012-11-19_final.pdf Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch drivers/pci/pcie/pcie-dpc.c | 162 ++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/pci_regs.h | 10 +++ 2 files changed, 172 insertions(+) commit ea5311c7e752dbec9bfbdd79992a8772b37f32fa Author: Alex Williamson Date: Thu Aug 10 10:54:31 2017 -0600 PCI: Fix PCIe capability sizes PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 defines the size of the PCIe capability structure for v1 devices with link, but we also have a need in the vfio code for sizing the capability for devices without link, such as Root Complex Integrated Endpoints. Create a separate define for this ending the structure before the link fields. Additionally, this reveals that PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 is currently incorrect, ending the capability length before the v2 link fields. Rename this to specify an RC Integrated Endpoint (no link) capability length and move PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 to include the link fields as we have for the v1 version. Signed-off-by: Alex Williamson [bhelgaas: add "_" in "PCI_CAP_EXP_RC ENDPOINT_SIZEOF_V2 44"] Signed-off-by: Bjorn Helgaas Reviewed-by: Eric Auger include/uapi/linux/pci_regs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b63773a801ff7f7f047894a9be23616f4491aca8 Author: Rob Herring Date: Tue Jul 18 16:43:21 2017 -0500 PCI: Convert to using %pOF instead of full_name() Now that we have a custom printf format specifier, convert users of full_name() to use %pOF instead. This is preparation for removing storing of the full path string for each node. Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Reviewed-by: Tyrel Datwyler Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Thierry Reding Cc: Jonathan Hunter Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman drivers/pci/host/pci-mvebu.c | 8 ++++---- drivers/pci/host/pci-tegra.c | 3 +-- drivers/pci/hotplug/pnv_php.c | 4 ++-- drivers/pci/hotplug/rpadlpar_core.c | 4 ++-- drivers/pci/hotplug/rpaphp_core.c | 2 +- drivers/pci/hotplug/rpaphp_pci.c | 4 ++-- drivers/pci/hotplug/rpaphp_slot.c | 4 ++-- drivers/pci/pci-sysfs.c | 4 ++-- drivers/pci/pci.c | 4 ++-- 9 files changed, 18 insertions(+), 19 deletions(-) commit 36b8518950f95837d2edc6c9ef8e0ef1fbcf04eb Author: Bhumika Goyal Date: Sat Aug 19 13:52:19 2017 +0530 PCI: Constify endpoint pci_epf_type device_type 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: Bjorn Helgaas drivers/pci/endpoint/pci-epf-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfcf83b1444d90f6e680a0dde0916f3b289b5066 Author: Wanpeng Li Date: Thu Aug 24 03:35:11 2017 -0700 KVM: nVMX: Fix trying to cancel vmlauch/vmresume ------------[ cut here ]------------ WARNING: CPU: 7 PID: 3861 at /home/kernel/ssd/kvm/arch/x86/kvm//vmx.c:11299 nested_vmx_vmexit+0x176e/0x1980 [kvm_intel] CPU: 7 PID: 3861 Comm: qemu-system-x86 Tainted: G W OE 4.13.0-rc4+ #11 RIP: 0010:nested_vmx_vmexit+0x176e/0x1980 [kvm_intel] Call Trace: ? kvm_multiple_exception+0x149/0x170 [kvm] ? handle_emulation_failure+0x79/0x230 [kvm] ? load_vmcs12_host_state+0xa80/0xa80 [kvm_intel] ? check_chain_key+0x137/0x1e0 ? reexecute_instruction.part.168+0x130/0x130 [kvm] nested_vmx_inject_exception_vmexit+0xb7/0x100 [kvm_intel] ? nested_vmx_inject_exception_vmexit+0xb7/0x100 [kvm_intel] vmx_queue_exception+0x197/0x300 [kvm_intel] kvm_arch_vcpu_ioctl_run+0x1b0c/0x2c90 [kvm] ? kvm_arch_vcpu_runnable+0x220/0x220 [kvm] ? preempt_count_sub+0x18/0xc0 ? restart_apic_timer+0x17d/0x300 [kvm] ? kvm_lapic_restart_hv_timer+0x37/0x50 [kvm] ? kvm_arch_vcpu_load+0x1d8/0x350 [kvm] kvm_vcpu_ioctl+0x4e4/0x910 [kvm] ? kvm_vcpu_ioctl+0x4e4/0x910 [kvm] ? kvm_dev_ioctl+0xbe0/0xbe0 [kvm] The flag "nested_run_pending", which can override the decision of which should run next, L1 or L2. nested_run_pending=1 means that we *must* run L2 next, not L1. This is necessary in particular when L1 did a VMLAUNCH of L2 and therefore expects L2 to be run (and perhaps be injected with an event it specified, etc.). Nested_run_pending is especially intended to avoid switching to L1 in the injection decision-point. This can be handled just like the other cases in vmx_check_nested_events, instead of having a special case in vmx_queue_exception. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 5d76117f070d1de8bc12a1b541e4eed88b4a918d Author: Varadarajan Narayanan Date: Fri Aug 18 12:59:53 2017 +0530 PCI: qcom: Add support for IPQ8074 PCIe controller Add support for the IPQ8074 PCIe controller. IPQ8074 supports Gen 1/2, one lane, two PCIe root complex with support for MSI and legacy interrupts, and it conforms to PCI Express Base 2.1 specification. The core init is the similar to the existing SoC, however the clocks and reset lines differ. Signed-off-by: smuthayy Signed-off-by: Varadarajan Narayanan [bhelgaas: fix capitalization and "dev" usage to match existing style] Signed-off-by: Bjorn Helgaas Acked-by: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 207 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 1 deletion(-) commit 8baf0151cd4b6dbc47422b100f1f99432c56b668 Author: Varadarajan Narayanan Date: Fri Aug 18 12:59:52 2017 +0530 dt-bindings: PCI: qcom: Add support for IPQ8074 Add support for the IPQ8074 PCIe controller. IPQ8074 supports Gen 1/2, one lane, two PCIe root complex with support for MSI and legacy interrupts, and it conforms to PCI Express Base 2.1 specification. Signed-off-by: Varadarajan Narayanan Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/qcom,pcie.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit deff11f884f0056d3f3fde2f526aaab70309255f Author: Varadarajan Narayanan Date: Fri Aug 18 12:59:51 2017 +0530 PCI: qcom: Use block IP version for operations Presently, when support for a new SoC is added, the driver ops structures and functions are versioned with plain 1, 2, 3 etc. Instead use the block IP version number. Signed-off-by: Varadarajan Narayanan Signed-off-by: Bjorn Helgaas Acked-by: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 138 +++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 67 deletions(-) commit 244e00071fd8f6ab2768e61f17e23cbbd9b29b21 Author: Philipp Zabel Date: Wed Jul 19 17:25:55 2017 +0200 PCI: qcom: 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. Signed-off-by: Philipp Zabel Signed-off-by: Bjorn Helgaas Cc: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 664f8e26b00c7673a8303b0d40853a0c24ca93e1 Author: Wanpeng Li Date: Thu Aug 24 03:35:09 2017 -0700 KVM: X86: Fix loss of exception which has not yet been injected vmx_complete_interrupts() assumes that the exception is always injected, so it can be dropped by kvm_clear_exception_queue(). However, an exception cannot be injected immediately if it is: 1) originally destined to a nested guest; 2) trapped to cause a vmexit; 3) happening right after VMLAUNCH/VMRESUME, i.e. when nested_run_pending is true. This patch applies to exceptions the same algorithm that is used for NMIs, replacing exception.reinject with "exception.injected" (equivalent to nmi_injected). exception.pending now represents an exception that is queued and whose side effects (e.g., update RFLAGS.RF or DR7) have not been applied yet. If exception.pending is true, the exception might result in a nested vmexit instead, too (in which case the side effects must not be applied). exception.injected instead represents an exception that is going to be injected into the guest at the next vmentry. Reported-by: Radim Krčmář Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 4 +- arch/x86/kvm/x86.c | 90 +++++++++++++++++++++++++++++------------ arch/x86/kvm/x86.h | 4 +- 5 files changed, 70 insertions(+), 32 deletions(-) commit 274bba52a01d6de01f03cfb1b80af2d35772e62e Author: Wanpeng Li Date: Thu Aug 24 03:35:08 2017 -0700 KVM: VMX: use kvm_event_needs_reinjection Use kvm_event_needs_reinjection() encapsulation. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 09f037aa48f34c84e70c5a6ef4870b2dee3aee76 Author: Paolo Bonzini Date: Thu Aug 24 17:37:25 2017 +0200 KVM: MMU: speedup update_permission_bitmask update_permission_bitmask currently does a 128-iteration loop to, essentially, compute a constant array. Computing the 8 bits in parallel reduces it to 16 iterations, and is enough to speed it up substantially because many boolean operations in the inner loop become constants or simplify noticeably. Because update_permission_bitmask is actually the top item in the profile for nested vmexits, this speeds up an L2->L1 vmexit by about ten thousand clock cycles, or up to 30%: before after cpuid 35173 25954 vmcall 35122 27079 inl_from_pmtimer 52635 42675 inl_from_qemu 53604 44599 inl_from_kernel 38498 30798 outl_to_kernel 34508 28816 wr_tsc_adjust_msr 34185 26818 rd_tsc_adjust_msr 37409 27049 mmio-no-eventfd:pci-mem 50563 45276 mmio-wildcard-eventfd:pci-mem 34495 30823 mmio-datamatch-eventfd:pci-mem 35612 31071 portio-no-eventfd:pci-io 44925 40661 portio-wildcard-eventfd:pci-io 29708 27269 portio-datamatch-eventfd:pci-io 31135 27164 (I wrote a small C program to compare the tables for all values of CR0.WP, CR4.SMAP and CR4.SMEP, and they match). Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 121 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 51 deletions(-) commit a8c2038f615ac522aa9eb55dff1b7979bef0f794 Author: Fabio Estevam Date: Sun Jul 16 19:56:38 2017 -0300 PCI: qcom: Use gpiod_set_value_cansleep() to allow reset via expanders The reset GPIO can be connected to a I2C or SPI IO expander, which may sleep, so it is safer to use the gpiod_set_value_cansleep() variant instead. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd8cb433734eeb870156a67f5d56b6564cd2ea94 Author: Yu Zhang Date: Thu Aug 24 20:27:56 2017 +0800 KVM: MMU: Expose the LA57 feature to VM. This patch exposes 5 level page table feature to the VM. At the same time, the canonical virtual address checking is extended to support both 48-bits and 57-bits address width. Signed-off-by: Yu Zhang Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 18 ++---------------- arch/x86/kvm/cpuid.c | 16 ++++++++++------ arch/x86/kvm/emulate.c | 16 +++++++++------- arch/x86/kvm/kvm_cache_regs.h | 2 +- arch/x86/kvm/vmx.c | 8 ++++---- arch/x86/kvm/x86.c | 7 +++++-- arch/x86/kvm/x86.h | 34 ++++++++++++++++++++++++++++++++++ 7 files changed, 65 insertions(+), 36 deletions(-) commit 855feb6736403f398dd43764254c5f0522bfc130 Author: Yu Zhang Date: Thu Aug 24 20:27:55 2017 +0800 KVM: MMU: Add 5 level EPT & Shadow page table support. Extends the shadow paging code, so that 5 level shadow page table can be constructed if VM is running in 5 level paging mode. Also extends the ept code, so that 5 level ept table can be constructed if maxphysaddr of VM exceeds 48 bits. Unlike the shadow logic, KVM should still use 4 level ept table for a VM whose physical address width is less than 48 bits, even when the VM is running in 5 level paging mode. Signed-off-by: Yu Zhang [Unconditionally reset the MMU context in kvm_cpuid_update. Changing MAXPHYADDR invalidates the reserved bit bitmasks. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 10 +++++----- arch/x86/include/asm/vmx.h | 2 ++ arch/x86/kvm/cpuid.c | 1 + arch/x86/kvm/mmu.c | 43 +++++++++++++++++++++++++++-------------- arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/mmu_audit.c | 4 ++-- arch/x86/kvm/svm.c | 4 ++-- arch/x86/kvm/vmx.c | 21 ++++++++++++++------ arch/x86/kvm/x86.h | 10 ++++++++++ 9 files changed, 67 insertions(+), 29 deletions(-) commit 2a7266a8f9074f03c014dca641721d451881a42b Author: Yu Zhang Date: Thu Aug 24 20:27:54 2017 +0800 KVM: MMU: Rename PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL. Now we have 4 level page table and 5 level page table in 64 bits long mode, let's rename the PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL, then we can use PT64_ROOT_5LEVEL for 5 level page table, it's helpful to make the code more clear. Also PT64_ROOT_MAX_LEVEL is defined as 4, so that we can just redefine it to 5 whenever a replacement is needed for 5 level paging. Signed-off-by: Yu Zhang Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 4 +++- arch/x86/kvm/mmu.c | 36 ++++++++++++++++++------------------ arch/x86/kvm/mmu.h | 2 +- arch/x86/kvm/mmu_audit.c | 4 ++-- arch/x86/kvm/svm.c | 2 +- 5 files changed, 25 insertions(+), 23 deletions(-) commit d1cd3ce9004412949163bfaa062a4df98fe75a98 Author: Yu Zhang Date: Thu Aug 24 20:27:53 2017 +0800 KVM: MMU: check guest CR3 reserved bits based on its physical address width. Currently, KVM uses CR3_L_MODE_RESERVED_BITS to check the reserved bits in CR3. Yet the length of reserved bits in guest CR3 should be based on the physical address width exposed to the VM. This patch changes CR3 check logic to calculate the reserved bits at runtime. Signed-off-by: Yu Zhang Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/emulate.c | 14 ++++++++++++-- arch/x86/kvm/mmu.h | 3 +++ arch/x86/kvm/x86.c | 8 ++++---- 4 files changed, 19 insertions(+), 7 deletions(-) commit e911eb3b3414e62cbd9853e0a91c124f4a545c0f Author: Yu Zhang Date: Thu Aug 24 20:27:52 2017 +0800 KVM: x86: Add return value to kvm_cpuid(). Return false in kvm_cpuid() when it fails to find the cpuid entry. Also, this routine(and its caller) is optimized with a new argument - check_limit, so that the check_cpuid_limit() fall back can be avoided. Signed-off-by: Yu Zhang Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_emulate.h | 4 ++-- arch/x86/kvm/cpuid.c | 17 +++++++++++++---- arch/x86/kvm/cpuid.h | 3 ++- arch/x86/kvm/emulate.c | 12 ++++++------ arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/trace.h | 11 +++++++---- arch/x86/kvm/x86.c | 6 +++--- 7 files changed, 34 insertions(+), 21 deletions(-) commit 3db134805c69aae16ba6193946aa8deccd393ead Author: Paolo Bonzini Date: Thu Aug 24 14:48:03 2017 +0200 kvm: vmx: Raise #UD on unsupported XSAVES/XRSTORS A guest may not be configured to support XSAVES/XRSTORS, even when the host does. If the guest does not support XSAVES/XRSTORS, clear the secondary execution control so that the processor will raise #UD. Also clear the "allowed-1" bit for XSAVES/XRSTORS exiting in the IA32_VMX_PROCBASED_CTLS2 MSR, and pass through VMCS12's control in the VMCS02. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 2fe435d8b0746cab8f5e13e1352a22742e84ff1a Author: Wang Shilong Date: Thu Aug 24 11:58:18 2017 -0400 ext4: cleanup goto next group avoid duplicated codes, also we need goto next group in case we found reserved inode. Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ialloc.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 4f9d956d1939f97e2cb278b9615b6c683cd90e97 Author: Jan Kara Date: Thu Aug 24 11:52:21 2017 -0400 ext4: do not unnecessarily allocate buffer in recently_deleted() In recently_deleted() function we want to check whether inode is still cached in buffer cache. Use sb_find_get_block() for that instead of sb_getblk() to avoid unnecessary allocation of bdev page and buffer heads. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ialloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac7afe6b3cf39bf2c02a7463c0b81b145e41a906 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 1d00402b4da29c53e846bd7499ce94643dd055b9 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 457e0fee04b0c6c57a28a10e68b16c5f1386c80c 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 ab7039325f4eef2e545d8cb3d6aed67998514bcb 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 a101a41fca04ea8ee71045b049356f93658ff28f 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 eab2c600fcc8f687f22bd2f2fa2b92ad9a043809 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 faf505672600332369ec08044f1ec9eec73a5ab3 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 5df239ff222509365769ce1a4efdd5924c9a15df 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 547f1091b972cec23feec21611eb33105c86240c 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 6af0883ed9770cf9b0a4f224c91481484cd1b025 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 2e8f9fbe985e930055eb55323b8491cc668b178f 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 db63042b332ae048ca640b3d1aed508973c40c8c 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 871594e78ca1f9a3b3b89a0acc7d8c1330b83779 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 6a934bb81476e7e90baaf2ff766e6b6f04b5febb Author: Bart Van Assche Date: Wed Aug 23 15:29:11 2017 -0700 compat_hdio_ioctl: Fix a declaration This patch avoids that sparse reports the following warning messages: block/compat_ioctl.c:85:11: warning: incorrect type in assignment (different address spaces) block/compat_ioctl.c:85:11: expected unsigned long *[noderef] p block/compat_ioctl.c:85:11: got void [noderef] * block/compat_ioctl.c:91:21: warning: incorrect type in argument 1 (different address spaces) block/compat_ioctl.c:91:21: expected void const volatile [noderef] * block/compat_ioctl.c:91:21: got unsigned long *[noderef] p block/compat_ioctl.c:87:53: warning: dereference of noderef expression block/compat_ioctl.c:91:21: warning: dereference of noderef expression Fixes: commit d597580d3737 ("generic ...copy_..._user primitives") Signed-off-by: Bart Van Assche Cc: Jens Axboe Signed-off-by: Jens Axboe block/compat_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea369ea6d828930c0cf0cacf81f6fd9dff61992d Author: Alexandre Belloni Date: Wed Aug 23 02:33:04 2017 +0200 rtc: remove .open() and .release() There are no driver left using .open and .release. There is no good use case for them as there is nothing the character device interface does that should not be done in the sysfs interface or in-kernel interface. Remove those callbacks now to avoid future confusion. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-dev.c | 20 ++++---------------- include/linux/rtc.h | 2 -- 2 files changed, 4 insertions(+), 18 deletions(-) commit 47570848f0864374dec4accce68d23fc0eaac0b2 Author: weiping zhang Date: Fri Aug 18 23:54:46 2017 +0800 block: remove blk_free_devt in add_partition put_device(pdev) will call pdev->type->release finally, and blk_free_devt has been called in part_release(), so remove it. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/partition-generic.c | 1 - 1 file changed, 1 deletion(-) commit 604c78235a35202e2150866dcf12f27eed5c6a04 Author: Alexandre Belloni Date: Wed Aug 23 23:45:19 2017 +0200 rtc: mxc: avoid disabling interrupts on device close Currently, the IRQs are disabled when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device as is done in rtcwake. Keep the alarm functional on character device release so the platform can actually wakeup. Reviewed-by: Fabio Estevam Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mxc.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 97e05463e0dfa8df709009625302fa5c5049b016 Author: Milan Broz Date: Wed Aug 9 17:47:26 2017 +0200 bio-integrity: Fix regression if profile verify_fn is NULL In dm-integrity target we register integrity profile that have both generate_fn and verify_fn callbacks set to NULL. This is used if dm-integrity is stacked under a dm-crypt device for authenticated encryption (integrity payload contains authentication tag and IV seed). In this case the verification is done through own crypto API processing inside dm-crypt; integrity profile is only holder of these data. (And memory is owned by dm-crypt as well.) After the commit (and previous changes) Commit 7c20f11680a441df09de7235206f70115fbf6290 Author: Christoph Hellwig Date: Mon Jul 3 16:58:43 2017 -0600 bio-integrity: stop abusing bi_end_io we get this crash: : BUG: unable to handle kernel NULL pointer dereference at (null) : IP: (null) : *pde = 00000000 ... : : Workqueue: kintegrityd bio_integrity_verify_fn : task: f48ae180 task.stack: f4b5c000 : EIP: (null) : EFLAGS: 00210286 CPU: 0 : EAX: f4b5debc EBX: 00001000 ECX: 00000001 EDX: 00000000 : ESI: 00001000 EDI: ed25f000 EBP: f4b5dee8 ESP: f4b5dea4 : DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 : CR0: 80050033 CR2: 00000000 CR3: 32823000 CR4: 001406d0 : Call Trace: : ? bio_integrity_process+0xe3/0x1e0 : bio_integrity_verify_fn+0xea/0x150 : process_one_work+0x1c7/0x5c0 : worker_thread+0x39/0x380 : kthread+0xd6/0x110 : ? process_one_work+0x5c0/0x5c0 : ? kthread_worker_fn+0x100/0x100 : ? kthread_worker_fn+0x100/0x100 : ret_from_fork+0x19/0x24 : Code: Bad EIP value. : EIP: (null) SS:ESP: 0068:f4b5dea4 : CR2: 0000000000000000 Patch just skip the whole verify workqueue if verify_fn is set to NULL. Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io") Signed-off-by: Milan Broz [hch: trivial whitespace fix] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio-integrity.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e9a203a7cf852d38017453f203e9356edde68fff Merge: 298f2a3 60fd9f7 Author: Arnd Bergmann Date: Thu Aug 24 15:55:58 2017 +0200 Merge tag 'v4.14-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Pull "second round of Rockchip dts64 changes for 4.14" from Heiko Stübner: 3 new boards, the rk3328-based Rock64 from the Pine64-makers, the Sapphire som+baseboard which is another evaluation board for Rocckhip customers and the rk3399-based som+baseboard from Austria-based Theobroma Systems, which interestingly is in a miniITX formfactor and provides a real PCIe x4 slot. New nodes include on rk3399 graphics (vops, hdmi, etc) and more iommus, on rk3328 iommus, pwm, thermal management, and sound as well as operating points and rk3368 got iommu nodes and cpu operating points. On existing boards firefly got operating points, the rk3328-evb got its pmic and gru boards got some sound-related fixes. * tag 'v4.14-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (29 commits) arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM dt-bindings: add rk3399-q7 SoM arm64: dts: rockchip: add rk3328-rock64 board arm64: dts: rockchip: add rk3328 pdm node arm64: dts: rockchip: add more rk3399 iommu nodes arm64: dts: rockchip: add rk3368 iommu nodes arm64: dts: rockchip: add rk3328 iommu nodes arm64: dts: rockchip: Add basic cpu frequencies for RK3368 arm64: dts: rockchip: add rk805 node for rk3328-evb arm64: dts: rockchip: Assign mic irq to correct device for Gru arm64: dts: rockchip: init rk3399 vop clock rates arm64: dts: rockchip: Add pwm nodes for rk3328 arm64: dts: rockchip: Fix wrong rt5514 dmic delay property for Gru arm64: dts: rockchip: disable tx ipgap linecheck for rk3399 dwc3 arm64: dts: rockchip: remove num-slots property from rk3399-sapphire arm64: dts: rockchip: Enable tsadc module on RK3328 eavluation board arm64: dts: rockchip: add thermal nodes for rk3328 SoC arm64: dts: rockchip: add tsadc node for rk3328 SoC arm64: dts: rockchip: add rk3328 i2s nodes ... commit 7ee7b6663d7057c4c34f81e1d6c13a5ad27c8f67 Merge: 9e3d361 58ed5e5 Author: Arnd Bergmann Date: Thu Aug 24 15:54:33 2017 +0200 Merge tag 'v4.14-rockchip-soc32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc Pull "second round of Rockchip soc32 changes for 4.14" from Heiko Stübner: Enable the ARCH_DMA_ADDR_T_64BIT kconfig option for LPAE builds, as some peripherals like the Mali gpu do support 64bit dma addresses. * tag 'v4.14-rockchip-soc32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: select ARCH_DMA_ADDR_T_64BIT for LPAE commit a48a7b6b54927159bac77735df00e5b9fc3415fb Merge: 3889e85 0d30176 Author: Arnd Bergmann Date: Thu Aug 24 15:51:54 2017 +0200 Merge tag 'scpi-fixes-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "ARM SCPI fixes for v4.14" from Sudeep Holla: Simple endianness fix for dev_id in dev_pstate_set structure * tag 'scpi-fixes-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set commit c32e176ac13b31085d7ef57d5215bfe95831ef0c Merge: 7bf53b9 274ff50 Author: Arnd Bergmann Date: Thu Aug 24 15:49:06 2017 +0200 Merge tag 'v4.14-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "second round of Rockchip dts32 changes for 4.14" from Heiko Stübner: A lot of attention for the rv1108 soc targetted at media-processing (usb, operating points, spi, pwm, adc, watchdog, i2c and devices for its evb). RK3228/3229 gets iommu and spi nodes. Similar to the rk3288 which also gets some more iommu nodes as well as getting converted to 64 bit addresses due to wanting to address more than 4GB of memory via LPAE. * tag 'v4.14-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: enable usb for rv1108-evb ARM: dts: rockchip: add usb nodes for rv1108 SoCs dt-bindings: update grf-binding for rv1108 SoCs ARM: dts: rockchip: add cpu power supply for rv1108 evb ARM: dts: rockchip: add cpu opp table for rv1108 ARM: dts: rockchip: add rk322x iommu nodes ARM: dts: rockchip: add accelerometer bma250e dt node for rv1108 evb ARM: dts: rockchip: add pmic rk805 dt node for rv1108 evb ARM: dts: rockchip: add pwm backlight for rv1108 evb ARM: dts: rockchip: add pwm dt nodes for rv1108 ARM: dts: rockchip: add spi dt node for rv1108 ARM: dts: rockchip: add saradc support for rv1108 ARM: dts: rockchip: add watchdog dt node for rv1108 ARM: dts: rockchip: add i2c dt nodes for rv1108 clk: rockchip: fix up indentation of some RV1108 clock-ids clk: rockchip: rename the clk id for HCLK_I2S1_2CH clk: rockchip: add more clk ids for rv1108 ARM: dts: rockchip: add more iommu nodes on rk3288 ARM: dts: rockchip: convert rk3288 device tree files to 64 bits ARM: dts: rockchip: add spi node and spi pinctrl on rk3228/rk3229 Signed-off-by: Arnd Bergmann commit 75f4fc8da9bd3b56f08ff8ba4113e5c57a85c24c Author: Jim Mattson Date: Wed Aug 23 16:32:03 2017 -0700 kvm: vmx: Raise #UD on unsupported RDSEED A guest may not be configured to support RDSEED, even when the host does. If the guest does not support RDSEED, intercept the instruction and synthesize #UD. Also clear the "allowed-1" bit for RDSEED exiting in the IA32_VMX_PROCBASED_CTLS2 MSR. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 45ec368c9addbbf3fb25fc33d3f22f838ec91714 Author: Jim Mattson Date: Wed Aug 23 16:32:04 2017 -0700 kvm: vmx: Raise #UD on unsupported RDRAND A guest may not be configured to support RDRAND, even when the host does. If the guest does not support RDRAND, intercept the instruction and synthesize #UD. Also clear the "allowed-1" bit for RDRAND exiting in the IA32_VMX_PROCBASED_CTLS2 MSR. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 80154d77c922d0f9bb1e4d115ff760c066c12d8f Author: Paolo Bonzini Date: Thu Aug 24 13:55:35 2017 +0200 KVM: VMX: cache secondary exec controls Currently, secondary execution controls are divided in three groups: - static, depending mostly on the module arguments or the processor (vmx_secondary_exec_control) - static, depending on CPUID (vmx_cpuid_update) - dynamic, depending on nested VMX or local APIC state Because walking CPUID is expensive, prepare_vmcs02 is using only the first group. This however is unnecessarily complicated. Just cache the static secondary execution controls, and then prepare_vmcs02 does not need to compute them every time. Computation of all static secondary execution controls is now kept in a single function, vmx_compute_secondary_exec_control. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 100 +++++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 46 deletions(-) commit 4c03e69ab1ef31877cef63575a1869b130f9c5ce Author: Matan Barak Date: Sun May 28 10:32:09 2017 +0300 net/mlx5: Add tracepoints Add a tracepoint infrastructure for mlx5_core driver. Implemented flow steering tracepoints: 1. Add flow group 2. Remove flow group 3. Add flow table entry 4. Remove flow table entry 5. Add flow table rule 6. Remove flow table rule Signed-off-by: Matan Barak Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 5 +- .../net/ethernet/mellanox/mlx5/core/diag/Makefile | 1 + .../mellanox/mlx5/core/diag/fs_tracepoint.c | 261 +++++++++++++++++++ .../mellanox/mlx5/core/diag/fs_tracepoint.h | 282 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 11 +- 5 files changed, 558 insertions(+), 2 deletions(-) commit 693c6883bbc4f7649750eb9ce49d0b799d073186 Author: Matan Barak Date: Sun May 28 16:45:31 2017 +0300 net/mlx5: Add hash table for flow groups in flow table When adding a flow table entry (fte) to a flow table (ft), we first need to find its flow group (fg). Currently, this is done by traversing a linear list of all flow groups in the flow table. Furthermore, since multiple flow groups which correspond to the same fte mask may exist in the same ft, we can't just stop at the first match. Converting the linear list to rhltable in order to speed things up. The last four patches increases the steering rules update rate by a factor of more than 7 (for insertion of 50K steering rules). Signed-off-by: Matan Barak Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 187 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 + 2 files changed, 152 insertions(+), 37 deletions(-) commit 0d235c3fabb79bddc46527885985f0ae281a89f9 Author: Matan Barak Date: Sun May 28 12:09:06 2017 +0300 net/mlx5: Add hash table to search FTEs in a flow-group When adding a flow table entry (fte) to a flow group (fg), we first need to check whether this fte exist. In such a case we just merge the destinations (if possible). Currently, this is done by traversing the fte list available in a fg. This could take a lot of time when using large flow groups. Speeding this up by using rhashtable, which is much faster. Signed-off-by: Matan Barak Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 228 +++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 3 + 2 files changed, 160 insertions(+), 71 deletions(-) commit 667cb65ae5ad01523505d48d6cfd92bd1d3c9785 Author: Matan Barak Date: Mon Aug 7 11:14:11 2017 +0300 net/mlx5: Don't store reserved part in FTEs and FGs The current code stores fte_match_param in the software representation of FTEs and FGs. fte_match_param contains a large reserved area at the bottom of the struct. Since downstream patches are going to hash this part, we would like to avoid doing so on a reserved part. Signed-off-by: Matan Barak Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 8 -------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 16 ++++++++++++++-- include/linux/mlx5/device.h | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) commit 8ebabaa02fe13e534ae5b0a8aa495762c25ef279 Author: Matan Barak Date: Sun May 28 10:58:40 2017 +0300 net/mlx5: Convert linear search for free index to ida When allocating a flow table entry, we need to allocate a free index in the flow group. Currently, this is done by traversing the existing flow table entries in the flow group, until a free index is found. Replacing this by using a ida, which allows us to find a free index much faster. Signed-off-by: Matan Barak Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 56 ++++++++--------------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 +- 2 files changed, 20 insertions(+), 38 deletions(-) commit 09800305504432eb00b8504645c05ac589f1c02c Author: Gal Pressman Date: Tue Aug 22 14:22:15 2017 +0300 net/mlx5e: Fix wrong code indentation in conditional statement Fix the following checkpatch warning in en_ethtool.c: WARNING: suspect code indent for conditional statements (8, 9) + for (i = 0; i < NUM_PCIE_PERF_STALL_COUNTERS(priv); i++) + strcpy(data + (idx++) * ETH_GSTRING_LEN, Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07533c6765de05199417ec73f9c2a495ddd29473 Author: Gal Pressman Date: Mon Aug 21 17:54:21 2017 +0300 net/mlx5: Remove a leftover unused variable mlx5_core_wq is no longer being used and should be removed from the code. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/mlx5/driver.h | 2 -- 1 file changed, 2 deletions(-) commit 3c0045837d613984c7948775fa315beb68703b5c Author: Saeed Mahameed Date: Thu Aug 24 15:54:11 2017 +0300 net/mlx5: Add a blank line after declarations V2 The blank line should be after u32 val = ... and not after __be32 __iomem *addr = ... Fixes: ad5b39a95c83 ("net/mlx5: Add a blank line after declarations") Signed-off-by: Saeed Mahameed Reported-by: Joe Perches drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1bbc823781f9b325fb25b4af83cf1afd314e6d5 Author: Arnd Bergmann Date: Wed Aug 23 15:28:19 2017 +0200 ARM: OMAP2+: fix missing variable declaration The function that was added doesn't actually build: arch/arm/mach-omap2/display.c: In function 'omapdss_init_fbdev': arch/arm/mach-omap2/display.c:184:2: error: 'r' undeclared (first use in this function) This adds a declaration for 'r' to fix it. Fixes: 5ce783025c82 ("ARM: OMAP2+: Don't register omapdss device for omapdrm") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Acked-by: Tony Lindgren Signed-off-by: Tomi Valkeinen arch/arm/mach-omap2/display.c | 1 + 1 file changed, 1 insertion(+) commit 9d5171a8f248b1b0e69329bf141e17645c0324a0 Author: Rashmica Gupta Date: Thu Jun 1 15:34:38 2017 +1000 powerpc/powernv: Enable removal of memory for in memory tracing The hardware trace macro feature requires access to a chunk of real memory. This patch provides a debugfs interface to do this. By writing an integer containing the size of memory to be unplugged into /sys/kernel/debug/powerpc/memtrace/enable, the code will attempt to remove that much memory from the end of each NUMA node. This patch also adds additional debugsfs files for each node that allows the tracer to interact with the removed memory, as well as a trace file that allows userspace to read the generated trace. Note that this patch does not invoke the hardware trace macro, it only allows memory to be removed during runtime for the trace macro to utilise. Signed-off-by: Rashmica Gupta [mpe: Minor formatting etc fixups] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Kconfig | 8 + arch/powerpc/platforms/powernv/Makefile | 1 + arch/powerpc/platforms/powernv/memtrace.c | 282 ++++++++++++++++++++++++++++++ 3 files changed, 291 insertions(+) commit 5307eca1362492ce28f1572b430997d9053c021d Merge: 2c1dca3 e9bf53a Author: Kalle Valo Date: Thu Aug 24 14:29:12 2017 +0300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git Stephen Rothwell reported quite a few conflicts in iwlwifi between wireless-drivers and wireless-drivers-next. To avoid any problems later in other trees merge w-d to w-d-next to fix those conflicts early. commit 7bf53b96bdccc002fa8adb3ae8d49ee3189a323b Merge: cea9209 bcbd328 Author: Arnd Bergmann Date: Thu Aug 24 13:10:12 2017 +0200 Merge tag 'aspeed-4.14-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt Pull "Aspeed devicetree updates for 4.14" from Joel Stanley: - fix to expose the full flash windows on ast2400. * tag 'aspeed-4.14-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed-g4: fix AHB window size of the SMC controllers commit ec02bf393cff01a64466154394ea696b12408025 Merge: 02fba04 652213c Author: Arnd Bergmann Date: Thu Aug 24 13:03:49 2017 +0200 Merge tag 'aspeed-4.14-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/defconfig Pull "Aspeed defconfig updates for 4.14" from Joel Stanley: - Enable new Aspeed drivers for i2c, lpc snoop and vuart - Set VMSPLIT_2G for ast2400 platforms, required for mtd driver * tag 'aspeed-4.14-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: config: aspeed: Add I2C, VUART, LPC Snoop ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G commit d18420b0a0b8f8f51f55fc654b2e0eb86d8b41d7 Author: Hsin-Yu Chao Date: Wed Aug 23 18:29:31 2017 +0800 ASoC: rt5514: expose Hotword Model control This change exposes mixer control 'Hotword Model' for switching hotword model in runtime. This new function requires updated firmware to load hotword model at address 0x4ff80000. Signed-off-by: Hsin-Yu Chao Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt5514.h | 3 +++ 2 files changed, 55 insertions(+) commit 56026714bd45fccda710114982789c5145285560 Author: Dan Carpenter Date: Thu Aug 24 13:07:41 2017 +0300 ASoC: codecs: msm8916-wcd-analog: always true condition Static checkers complain that unsigned int val is always >= 0. The context is that snd_soc_read() returns -1U on error. This is harmless because we're checking that CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK is not set, and it will always be set for -1U. I could have just removed the check against -1 but I preserved it because I thought it helped with readability. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c1dca3c6b222a389c5dfebfcdd6fe3c87e5aa75 Author: Bhumika Goyal Date: Wed Aug 23 18:06:42 2017 +0530 wireless: ipw2x00: make iw_handler_def const Make these const as they are only stored in the const field of a net_device structure. Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9ea792a48cdd9229c9dd698f68dd4ee831bd8644 Author: Arvind Yadav Date: Wed Aug 23 15:29:34 2017 +0530 net: rsi: mac80211: constify ieee80211_ops ieee80211_ops are not supposed to change at runtime. All functions working with ieee80211_ops provided by work with const ieee80211_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28b75415ad19fef232d8daab4d5de17d753f0b36 Author: Romain Perier Date: Wed Aug 23 09:16:51 2017 +0200 wireless: ipw2200: 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 Reviewed-by: Peter Senna Tschudin Acked-by: Stanislav Yakovlev Signed-off-by: Kalle Valo drivers/net/wireless/intel/ipw2x00/ipw2200.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 2cc8918eb987998ef55a2d961f7b86c13dcf425d Author: Colin Ian King Date: Tue Aug 22 13:59:04 2017 +0100 rtlwifi: rtl8821ae: fix spelling mistake: "faill" -> "failed" Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3b2f62c6238808f74e00767a3224f9be54d606f Author: Christophe Jaillet Date: Tue Aug 22 00:06:17 2017 +0200 mt7601u: check memory allocation failure Check memory allocation failure and return -ENOMEM in such a case, as already done a few lines below. As 'dev->tx_q' can be NULL, we also need to check for that in 'mt7601u_free_tx()', and return early. Signed-off-by: Christophe JAILLET Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +++++ 1 file changed, 5 insertions(+) commit d9ee6015e573176e599693b6d0125ad74b210623 Author: Dan Carpenter Date: Fri Aug 18 11:05:19 2017 +0300 rtlwifi: make a couple arrays larger This is a static checker fix. "cal_num" is 10. We're declaring the tx_dt[] and rx_td[] arrays as 3 element arrays. The static checker complains that we do: tx_dt[cal] = (vdf_y[1]>>20)-(vdf_y[0]>>20); "cal" is the iterator and it is in the 0-9 range so it looks like we could corrupt memory. Signed-off-by: Dan Carpenter Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 14cc696c0a4aac823e41b9c29d04d1936cbf969c Author: Gustavo A. R. Silva Date: Thu Aug 17 19:22:19 2017 -0500 rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1415177 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit d382b9c007827987c7939e2bd828af43c7af9668 Author: Reizer, Eyal Date: Sun Aug 20 12:28:18 2017 +0000 wlcore: add missing nvs file name info for wilink8 The following commits: commit c815fdebef44 ("wlcore: spi: Populate config firmware data") commit d776fc86b82f ("wlcore: sdio: Populate config firmware data") Populated the nvs entry for wilink6 and wilink7 only while it is still needed for wilink8 as well. This broke user space backward compatibility when upgrading from older kernels, as the alternate mac address would not be read from the nvs that is present in the file system (lib/firmware/ti-connectivity/wl1271-nvs.bin) causing mac address change of the wlan interface. This patch fix this and update the structure field with the same default nvs file name that has been used before. In addition, some distros hold a default wl1271-nvs.bin in the file system with a bogus mac address (deadbeef...) that overrides the mac address that is stored inside the device. Warn users about this bogus mac address and use the internal mac address Fixes: c815fdebef44 ("wlcore: spi: Populate config firmware data") Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data") Signed-off-by: Eyal Reizer Reviewed-by: Sebastian Reichel Tested-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/main.c | 23 +++++++++++++++++++++++ drivers/net/wireless/ti/wlcore/sdio.c | 1 + drivers/net/wireless/ti/wlcore/spi.c | 1 + drivers/net/wireless/ti/wlcore/wlcore.h | 3 +++ 4 files changed, 28 insertions(+) commit dfebb5f43a78827a4a493048552e500f89fa3b31 Author: Thierry Reding Date: Wed Aug 16 13:32:40 2017 +0300 usb: chipidea: Add support for Tegra20/30/114/124 All of these Tegra SoC generations have a ChipIdea UDC IP block that can be used for device mode communication with a host. Implement rudimentary support that doesn't allow switching between host and device modes. Tested-by: Michał Mirosław Signed-off-by: Thierry Reding [digetx@gmail.com: rebased patches and added DMA alignment quirk for Tegra20] Signed-off-by: Dmitry Osipenko Acked-by: Peter Chen Signed-off-by: Peter Chen drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/ci_hdrc_tegra.c | 155 +++++++++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) commit 581821ae7f7e2c4547945c65f1bcd357f5915aa5 Author: Dmitry Osipenko Date: Wed Aug 16 13:32:39 2017 +0300 usb: chipidea: udc: Support SKB alignment quirk NVIDIA Tegra20 UDC can't cope with unaligned DMA and require a USB gadget quirk that avoids SKB buffer alignment to be set in order to make Ethernet Gadget working. Later Tegra generations do not require that quirk. Let's add a new platform data flag that allows to enable USB gadget quirk for platforms that require it. Signed-off-by: Dmitry Osipenko Acked-by: Peter Chen Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 3 +++ include/linux/usb/chipidea.h | 1 + 2 files changed, 4 insertions(+) commit 90bc7dfdcbbc1abaf79d83771b8668f6e95ad69f Merge: 1fe79d7 4165cf7 Author: Kalle Valo Date: Thu Aug 24 12:26:17 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.14. Major changes: ath10k * initial UBS bus support (no full support yet) * add tdls support for 10.4 firmware ath9k * add Dell Wireless 1802 wil6210 * support FW RSSI reporting commit 0a53a167224d1c8cb90166f7cce96631b635f33c Author: Alexandre Belloni Date: Wed Aug 23 22:37:22 2017 +0200 rtc: vr41xx: make alarms useful Currently, the IRQs are disabled when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Keep the alarms functional on character device release. Note that the PIE are never enabled and would anyway be disabled by the core. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-vr41xx.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 512053a43d95d4da65565fc74c63906083d419bb Author: Alexandre Belloni Date: Wed Aug 23 01:48:35 2017 +0200 rtc: sa1100: make alarms useful Currently, the driver unregisters the IRQs when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Move the IRQ requests to sa1100_rtc_probe() and use the devm managed versions so we don't need to free them. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sa1100.c | 63 +++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) commit 1cf85b2327a9b03bde5266e72ee64a38d085256d Author: Alexandre Belloni Date: Mon Aug 21 18:00:38 2017 +0200 rtc: sa1100: fix unbalanced clk_prepare_enable/clk_disable_unprepare In the error path of sa1100_rtc_open(), info->clk is disabled which will happen again in sa1100_rtc_remove() when the module is removed whereas it is only enabled once in sa1100_rtc_init(). Fixes: 0cc0c38e9139 ("drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/remove") Acked-by: Robert Jarzmik Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sa1100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 56c0c529848c853bc1049e271975917e8c9f4389 Author: Alexandre Belloni Date: Mon Aug 21 17:57:42 2017 +0200 rtc: pxa: fix possible race condition pxa_rtc_open() registers the interrupt handler which will access the RTC registers. However, pxa_rtc_open() is called before the register range is ioremapped. Instead, call it after devm_ioremap(). Acked-by: Robert Jarzmik Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pxa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit be8e2746462b11e92a882e45317fafcd2c0dc50b Author: Alexandre Belloni Date: Wed Aug 23 01:15:42 2017 +0200 rtc: m41t80: remove debug sysfs attribute The last remaining sysfs attribute is undocumented and useless as it can only be used to debug the driver. Remove it. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) commit d4473b9b778f39f0b5da870a9a96b5778861c60b Author: Eric Cooper Date: Sat Jul 29 20:10:54 2017 -0400 rtc: m41t80: enable wakealarm when "wakeup-source" is specified Don't require an IRQ if the wakeup-source device-tree property is present. Signed-off-by: Eric Cooper Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit c84f5683f6e9fee78e054431d89121225ccb7464 Author: Priit Laes Date: Wed Aug 23 20:23:29 2017 +0300 clk: sunxi-ng: Add sun4i/sun7i CCU driver Introduce a clock controller driver for sun4i A10 and sun7i A20 series SoCs. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 13 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 1456 +++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun4i-a10.h | 61 ++ include/dt-bindings/clock/sun4i-a10-ccu.h | 200 ++++ include/dt-bindings/clock/sun7i-a20-ccu.h | 53 ++ include/dt-bindings/reset/sun4i-a10-ccu.h | 69 ++ 7 files changed, 1853 insertions(+) commit de275d2357fbc2ae385251a38e85f320a6e5382c Author: Priit Laes Date: Wed Aug 23 20:23:31 2017 +0300 dt-bindings: List devicetree binding for the CCU of Allwinner A10 Allwinner A10 is now driven by sunxi-ng CCU driver. Add devicetree binding for it. Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 1 + 1 file changed, 1 insertion(+) commit 0f1053a90b63f7e80a7391d3b7248dd8c0d9d36a Author: Priit Laes Date: Wed Aug 23 20:23:30 2017 +0300 dt-bindings: List devicetree binding for the CCU of Allwinner A20 Allwinner A20 is now driven by sunxi-ng CCU driver. Add devicetree binding for it. Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 1 + 1 file changed, 1 insertion(+) commit c7f4f994dea2e6a513e63f063f6c92202b7c1f3f Merge: 93da8b2 60913e0 Author: Ingo Molnar Date: Thu Aug 24 10:12:59 2017 +0200 Merge tag 'perf-core-for-mingo-4.14-20170823' 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: - Expression parser enhancements for metrics (Andi Kleen) - Fix buffer overflow while freeing events in 'perf stat' (Andi Kleen) - Fix static linking with elfutils's libdf and with libunwind in Debian/Ubuntu (Konstantin Khlebnikov) - Tighten detection of BPF events, avoiding matching some other PMU events such as 'cpu/uops_executed.core,cmask=1/' as a .c source file that ended up being considered a BPF event (Andi Kleen) - Add Skylake server uncore JSON vendor events (Andi Kleen) - Add support for printing new mem_info encodings, including 'perf test' checks (Andi Kleen) - Really install manpages via 'make install-man' (Konstantin Khlebnikov) - Fix documentation for perf_event_paranoid and perf_event_mlock_kb sysctls (Konstantin Khlebnikov) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 93da8b221da95a97316e518c94f03856e5d610a9 Merge: ba63f76 143c97c Author: Ingo Molnar Date: Thu Aug 24 10:12:33 2017 +0200 Merge branch 'linus' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit ecda85e70277ef24e44a1f6bc00243cebd19f985 Author: Juergen Gross Date: Wed Aug 16 19:31:57 2017 +0200 x86/lguest: Remove lguest support Lguest seems to be rather unused these days. It has seen only patches ensuring it still builds the last two years and its official state is "Odd Fixes". Remove it in order to be able to clean up the paravirt code. Signed-off-by: Juergen Gross Acked-by: Rusty Russell Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: lguest@lists.ozlabs.org Cc: rusty@rustcorp.com.au Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20170816173157.8633-3-jgross@suse.com Signed-off-by: Ingo Molnar MAINTAINERS | 11 - arch/x86/Kbuild | 3 - arch/x86/Kconfig | 2 - arch/x86/include/asm/lguest.h | 91 - arch/x86/include/asm/lguest_hcall.h | 74 - arch/x86/include/asm/processor.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/asm-offsets_32.c | 20 - arch/x86/kernel/head_32.S | 2 - arch/x86/kernel/platform-quirks.c | 1 - arch/x86/kvm/Kconfig | 1 - arch/x86/lguest/Kconfig | 14 - arch/x86/lguest/Makefile | 2 - arch/x86/lguest/boot.c | 1558 --------------- arch/x86/lguest/head_32.S | 192 -- drivers/Makefile | 1 - drivers/block/Kconfig | 2 +- drivers/char/Kconfig | 2 +- drivers/char/virtio_console.c | 2 +- drivers/lguest/Kconfig | 13 - drivers/lguest/Makefile | 26 - drivers/lguest/README | 47 - drivers/lguest/core.c | 398 ---- drivers/lguest/hypercalls.c | 304 --- drivers/lguest/interrupts_and_traps.c | 706 ------- drivers/lguest/lg.h | 258 --- drivers/lguest/lguest_user.c | 446 ----- drivers/lguest/page_tables.c | 1239 ------------ drivers/lguest/segments.c | 228 --- drivers/lguest/x86/core.c | 724 ------- drivers/lguest/x86/switcher_32.S | 388 ---- drivers/net/Kconfig | 2 +- drivers/tty/hvc/Kconfig | 2 +- drivers/virtio/Kconfig | 4 +- include/linux/lguest.h | 73 - include/linux/lguest_launcher.h | 44 - include/uapi/linux/virtio_ring.h | 4 +- tools/Makefile | 11 +- tools/lguest/.gitignore | 2 - tools/lguest/Makefile | 14 - tools/lguest/extract | 58 - tools/lguest/lguest.c | 3420 --------------------------------- tools/lguest/lguest.txt | 125 -- 43 files changed, 16 insertions(+), 10502 deletions(-) commit edcb5cf84f05e5d2e2af25422a72ccde359fcca9 Author: Juergen Gross Date: Wed Aug 16 19:31:56 2017 +0200 x86/paravirt/xen: Remove xen_patch() Xen's paravirt patch function xen_patch() does some special casing for irq_ops functions to apply relocations when those functions can be patched inline instead of calls. Unfortunately none of the special case function replacements is small enough to be patched inline, so the special case never applies. As xen_patch() will call paravirt_patch_default() in all cases it can be just dropped. xen-asm.h doesn't seem necessary without xen_patch() as the only thing left in it would be the definition of XEN_EFLAGS_NMI used only once. So move that definition and remove xen-asm.h. Signed-off-by: Juergen Gross Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: lguest@lists.ozlabs.org Cc: rusty@rustcorp.com.au Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20170816173157.8633-2-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/xen/enlighten_pv.c | 59 +-------------------------------------------- arch/x86/xen/xen-asm.S | 26 +++++--------------- arch/x86/xen/xen-asm.h | 12 --------- arch/x86/xen/xen-asm_32.S | 27 ++++----------------- arch/x86/xen/xen-asm_64.S | 20 ++++----------- arch/x86/xen/xen-ops.h | 15 +++--------- 6 files changed, 21 insertions(+), 138 deletions(-) commit bf32f2aeb2f73b7e5cee3c95f232ae5af97d45f6 Author: Hanna Hawa Date: Thu Aug 10 14:28:54 2017 +0300 arm64: dts: marvell: add Device Tree files for Armada-8KP This commit adds the base Device Tree files for the Armada 8KPlus. The Armada 8KP SoCs include several hardware blocks, and this commit only adds support for the AP810 block, that contains the CPU core and basic peripherals. AP810 is a high-performance die, includes octal core application processor based ARMv8-A architecture, two standard high speed DDR4 interface, and GIC-600 interrupt controller. AP810 Built as part of Marvell’s MoChi AP family products. Armada-8080 (8KPlus family), include an AP810 block that contains the CPU core and basic peripherals. This commit creates the following hierarchy: * armada-ap810-ap0.dtsi - definitions common to AP810 * armada-ap810-ap0-octa-core.dtsi - description of the octa cores * armada-8080.dtsi - description of the 8080 SoC * armada-8080-db.dts - description of the 8080 board Signed-off-by: Hanna Hawa Acked-by: Marc Zyngier Signed-off-by: Gregory CLEMENT .../devicetree/bindings/arm/marvell/armada-8kp.txt | 15 ++ arch/arm64/boot/dts/marvell/Makefile | 1 + arch/arm64/boot/dts/marvell/armada-8080-db.dts | 67 +++++++++ arch/arm64/boot/dts/marvell/armada-8080.dtsi | 53 +++++++ .../dts/marvell/armada-ap810-ap0-octa-core.dtsi | 104 +++++++++++++ arch/arm64/boot/dts/marvell/armada-ap810-ap0.dtsi | 163 +++++++++++++++++++++ 6 files changed, 403 insertions(+) commit b8e2204b25a50e389dfb50eeff163fa796a8ec6e Author: Takashi Sakamoto Date: Thu Aug 24 10:46:16 2017 +0900 ALSA: control: TLV data is unavailable at initial state of user-defined element set For user-defined element set, in its initial state, TLV data is not registered. It's firstly available when any application register it by an additional operation. However, in current implementation, it's available in its initial state. As a result, applications get -ENXIO to read it. This commit controls its readability to manage info flags properly. In an initial state, elements don't have SND_CTL_ELEM_ACCESS_TLV_READ flag. Once TLV write operation is executed, they get the flag. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit da4288287b68fe6902629f4e5306aba2a554bc4b Author: Takashi Sakamoto Date: Thu Aug 24 10:46:15 2017 +0900 ALSA: control: queue TLV event for a set of user-defined element In a design of user-defined element set, applications allow to change TLV data on the set. This operation doesn't only affects to a target element, but also to elements in the set. This commit generates TLV event for all of elements in the set when the TLV data is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fb8027ebfd4b8a3050edba66805bc360ed9b3f11 Author: Takashi Sakamoto Date: Thu Aug 24 10:46:14 2017 +0900 ALSA: control: delegate TLV eventing to each driver In a design of ALSA control core, a set of elements is represented by 'struct snd_kcontrol' to share common attributes. The set of elements shares TLV (Type-Length-Value) data, too. On the other hand, in ALSA control interface/protocol for applications, a TLV operation is committed to an element. Totally, the operation can have sub-effect to the other elements in the set. For example, TLV_WRITE operation is expected to change TLV data, which returns to applications. Applications attempt to change the TLV data per element, but in the above design, they can effect to elements in the same set. As a default, ALSA control core has no implementation except for TLV_READ operation. Thus, the above design looks to have no issue. However, in kernel APIs of ALSA control component, developers can program a handler for any request of the TLV operation. Therefore, for elements in a set which has the handler, applications can commit TLV_WRITE and TLV_COMMAND requests. For the above scenario, ALSA control core assist notification. When the handler returns positive value, the core queueing an event for a requested element. However, this includes design defects that the event is not queued for the other element in a set. Actually, developers can program the handlers to keep per-element TLV data, but it depends on each driver. As of v4.13-rc6, there's no driver in tree to utilize the notification, except for user-defined element set. This commit delegates the notification into each driver to prevent developers from the design defects. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 5d3806eea2dd19b083c729a32aded6d012ead5ae Author: Arvind Yadav Date: Thu Aug 24 11:55:28 2017 +0530 ALSA: nm256: constify snd_ac97_res_table snd_ac97_res_table are not supposed to change at runtime. All functions working with snd_ac97_res_table provided by work with const snd_ac97_res_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/pci/nm256/nm256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dea1d9c38e481051fa0e62807e518c5768e62dd Author: Naveen N. Rao Date: Wed Jun 14 21:14:00 2017 +0530 powerpc/uprobes: Implement arch_uretprobe_is_alive() This helper is used to detect if a uprobe'd function has returned through a setjmp/longjmp, rather than branching to the LR that was updated previously by us. This fixes a SIGSEGV that gets generated when programs use setjmp/longjmp with uretprobes. We use the arm64 model (arch/arm64/kernel/probes/uprobes.c: arch_uretprobe_is_alive()) for detecting when stack frames have been removed from under us. Reference: https://marc.info/?l=linux-kernel&m=143748610330073 commit 7b868e4802a86 ("uprobes/x86: Reimplement arch_uretprobe_is_alive()") commit db087ef69a2b1 ("uprobes/x86: Make arch_uretprobe_is_alive(RP_CHECK_CALL) more clever") Tested with the test program from: https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=testsuite/systemtap.base/bz5274.c;hb=HEAD And this script: $ cat test.sh #!/bin/bash perf probe -x ./bz5274 -a bz5274_main_return=main%return perf probe -x ./bz5274 -a bz5274_funca_return=funca%return perf probe -x ./bz5274 -a bz5274_funcb_return=funcb%return perf probe -x ./bz5274 -a bz5274_funcc_return=funcc%return perf probe -x ./bz5274 -a bz5274_funcd_return=funcd%return perf record -e 'probe_bz5274:*' -aR ./bz5274 Reported-by: Gustavo Luiz Duarte Reported-by: zsun@redhat.com Signed-off-by: Naveen N. Rao Acked-by: Srikar Dronamraju Signed-off-by: Michael Ellerman arch/powerpc/kernel/uprobes.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ec4189c4e8eea0c5e7c9b71cb1502cdcbb32aa17 Author: Naveen N. Rao Date: Fri Jun 9 00:46:55 2017 +0530 powerpc/kprobes: Don't save/restore DAR/DSISR to/from pt_regs for optprobes We don't save/restore these across a trap, or with KPROBES_ON_FTRACE. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/optprobes_head.S | 8 -------- 1 file changed, 8 deletions(-) commit a5e2da6e9787187ff104c34aa048419703c1f9cb Author: Daniel Borkmann Date: Thu Aug 24 03:20:11 2017 +0200 bpf: netdev is never null in __dev_map_flush No need to test for it in fast-path, every dev in bpf_dtab_netdev is guaranteed to be non-NULL, otherwise dev_map_update_elem() will fail in the first place. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/devmap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d2aaa3dc419994eefa21de971bb1f544c42541c7 Author: Shubham Bansal Date: Wed Aug 23 21:29:10 2017 +0530 bpf, doc: Add arm32 as arch supporting eBPF JIT As eBPF JIT support for arm32 was added recently with commit 39c13c204bb1150d401e27d41a9d8b332be47c49, it seems appropriate to add arm32 as arch with support for eBPF JIT in bpf and sysctl docs as well. Signed-off-by: Shubham Bansal Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller Documentation/networking/filter.txt | 4 ++-- Documentation/sysctl/net.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 81152518e985e2db22f22ca89b12169851644af6 Merge: 60890e0 8e9cd9c Author: David S. Miller Date: Wed Aug 23 22:38:08 2017 -0700 Merge branch 'bpf-verifier-fixes' Edward Cree says: ==================== bpf: verifier fixes Fix a couple of bugs introduced in my recent verifier patches. Patch #2 does slightly increase the insn count on bpf_lxc.o, but only by about a hundred insns (i.e. 0.2%). v2: added test for write-marks bug (patch #1); reworded comment on propagate_liveness() for clarity. ==================== Signed-off-by: David S. Miller commit 8e9cd9ce90d48369b2c5ddd79fe3d4a4cb1ccb56 Author: Edward Cree Date: Wed Aug 23 15:11:21 2017 +0100 bpf/verifier: document liveness analysis The liveness tracking algorithm is quite subtle; add comments to explain it. Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 13 +++++++++++++ kernel/bpf/verifier.c | 28 +++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) commit 1b688a19a92223cf2d1892c9d05d64dc397b33e3 Author: Edward Cree Date: Wed Aug 23 15:10:50 2017 +0100 bpf/verifier: remove varlen_map_value_access flag The optimisation it does is broken when the 'new' register value has a variable offset and the 'old' was constant. I broke it with my pointer types unification (see Fixes tag below), before which the 'new' value would have type PTR_TO_MAP_VALUE_ADJ and would thus not compare equal; other changes in that patch mean that its original behaviour (ignore min/max values) cannot be restored. Tests on a sample set of cilium programs show no change in count of processed instructions. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 1 - kernel/bpf/verifier.c | 41 ++++++++++++----------------------------- 2 files changed, 12 insertions(+), 30 deletions(-) commit df20cb7ec17577c94ef93fa86c7c80958046a01e Author: Alexei Starovoitov Date: Wed Aug 23 15:10:26 2017 +0100 selftests/bpf: add a test for a pruning bug in the verifier The test makes a read through a map value pointer, then considers pruning a branch where the register holds an adjusted map value pointer. It should not prune, but currently it does. Signed-off-by: Alexei Starovoitov [ecree@solarflare.com: added test-name and patch description] Signed-off-by: Edward Cree Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 63f45f840634ab5fd71bbc07acff915277764068 Author: Edward Cree Date: Wed Aug 23 15:10:03 2017 +0100 bpf/verifier: when pruning a branch, ignore its write marks The fact that writes occurred in reaching the continuation state does not screen off its reads from us, because we're not really its parent. So detect 'not really the parent' in do_propagate_liveness, and ignore write marks in that case. Fixes: dc503a8ad984 ("bpf/verifier: track liveness for pruning") Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d893dc26e3f42e12ae75703c52cc6de5578ff1f5 Author: Edward Cree Date: Wed Aug 23 15:09:46 2017 +0100 selftests/bpf: add a test for a bug in liveness-based pruning Writes in straight-line code should not prevent reads from propagating along jumps. With current verifier code, the jump from 3 to 5 does not add a read mark on 3:R0 (because 5:R0 has a write mark), meaning that the jump from 1 to 3 gets pruned as safe even though R0 is NOT_INIT. Verifier output: 0: (61) r2 = *(u32 *)(r1 +0) 1: (35) if r2 >= 0x0 goto pc+1 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 2: (b7) r0 = 0 3: (35) if r2 >= 0x0 goto pc+1 R0=inv0 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 4: (b7) r0 = 0 5: (95) exit from 3 to 5: safe from 1 to 3: safe processed 8 insns, stack depth 0 Signed-off-by: Edward Cree Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 60890e046081aef61980dbc812ac5100ad078a87 Author: Colin Ian King Date: Wed Aug 23 12:59:48 2017 +0100 gre: remove duplicated assignment of iph iph is being assigned the same value twice; remove the redundant first assignment. (Thanks to Nikolay Aleksandrov for pointing out that the first asssignment should be removed and not the second) Fixes warning: net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read Signed-off-by: Colin Ian King Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 1 - 1 file changed, 1 deletion(-) commit 042a90106b09beff4fa9015d1940e45ce10297ab Author: Arvind Yadav Date: Wed Aug 23 16:22:20 2017 +0530 net: tipc: constify genl_ops genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5719e5eb31e485d9eac8e2303ef9ca2f42c49225 Author: Colin Ian King Date: Wed Aug 23 10:59:40 2017 +0100 net: hinic: make functions set_ctrl0 and set_ctrl1 static The functions set_ctrl0 and set_ctrl1 are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'set_ctrl0' was not declared. Should it be static? symbol 'set_ctrl1' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9dadc1c512807f955f0799e85830b420da47932 Author: Cédric Le Goater Date: Tue Aug 8 11:02:49 2017 +0200 powerpc/xive: Fix the size of the cpumask used in xive_find_target_in_mask() When called from xive_irq_startup(), the size of the cpumask can be larger than nr_cpu_ids. This can result in a WARN_ON such as: WARNING: CPU: 10 PID: 1 at ../arch/powerpc/sysdev/xive/common.c:476 xive_find_target_in_mask+0x110/0x2f0 ... NIP [c00000000008a310] xive_find_target_in_mask+0x110/0x2f0 LR [c00000000008a2e4] xive_find_target_in_mask+0xe4/0x2f0 Call Trace: xive_find_target_in_mask+0x74/0x2f0 (unreliable) xive_pick_irq_target.isra.1+0x200/0x230 xive_irq_startup+0x60/0x180 irq_startup+0x70/0xd0 __setup_irq+0x7bc/0x880 request_threaded_irq+0x14c/0x2c0 request_event_sources_irqs+0x100/0x180 __machine_initcall_pseries_init_ras_IRQ+0x104/0x134 do_one_initcall+0x68/0x1d0 kernel_init_freeable+0x290/0x374 kernel_init+0x24/0x170 ret_from_kernel_thread+0x5c/0x74 This happens because we're being called with our affinity mask set to irq_default_affinity. That in turn was populated using cpumask_setall(), which sets NR_CPUs worth of bits, not nr_cpu_ids worth. Finally cpumask_weight() will return > nr_cpu_ids when passed a mask which has > nr_cpu_ids bits set. Fix it by limiting the value returned by cpumask_weight(). Signed-off-by: Cédric Le Goater [mpe: Add change log details on actual cause] Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 257a73031d29447ee82fe06d2b97d8564f63276d Author: Paolo Abeni Date: Wed Aug 23 11:57:51 2017 +0200 net/sock: allow the user to set negative peek offset This is necessary to allow the user to disable peeking with offset once it's enabled. Unix sockets already allow the above, with this patch we permit it for udp[6] sockets, too. Fixes: 627d2d6b5500 ("udp: enable MSG_PEEK at non-zero offset") Signed-off-by: Paolo Abeni Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/sock.c | 3 --- 1 file changed, 3 deletions(-) commit 110d8465a66aea440ca0012f8b8ac59778dea189 Merge: ae99e18 0ede6ba Author: David S. Miller Date: Wed Aug 23 20:44:32 2017 -0700 Merge branch 'mlxsw-multichain-tc-offload' Jiri Pirko says: ==================== mlxsw: spectrum: Introduce multichain TC offload This patchset introduces offloading of rules added to chain with non-zero index, which was previously forbidden. Also, goto_chain termination action is offloaded allowing to jump to processing of desired chain. ==================== Signed-off-by: David S. Miller commit 0ede6ba2a1de08a2a9a5c5ab78e31f1e6a333ed2 Author: Jiri Pirko Date: Wed Aug 23 10:08:22 2017 +0200 mlxsw: spectrum_flower: Offload goto_chain termination action If action is gact goto_chain, offload it to HW by jumping to another ruleset. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit dbec8ee95ab3ed231cba59f452531d6ce01fe24f Author: Jiri Pirko Date: Wed Aug 23 10:08:21 2017 +0200 mlxsw: spectrum_acl: Provide helper to lookup ruleset We need to lookup ruleset in order to offload goto_chain termination action. This patch adds it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 45 ++++++++++++++++++---- 2 files changed, 41 insertions(+), 8 deletions(-) commit 0ade3b6457b5535548c2bdad44b5bde6ebd1b7e2 Author: Jiri Pirko Date: Wed Aug 23 10:08:20 2017 +0200 mlxsw: spectrum_acl: Allow to get group_id value for a ruleset For goto_chain action we need to know group_id of a ruleset to jump to. Provide infrastructure in order to get it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 7 +++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 15 +++++++++++++++ 3 files changed, 24 insertions(+) commit e457d86ada27cbd2f46ded75d4b4bc06e26d0e2e Author: Jiri Pirko Date: Wed Aug 23 10:08:19 2017 +0200 net: sched: add couple of goto_chain helpers Add helpers to find out if a gact instance is goto_chain termination action and to get chain index. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/tc_act/tc_gact.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 45b62742df6a27fba71f799cd1a2f721e1c0d584 Author: Jiri Pirko Date: Wed Aug 23 10:08:18 2017 +0200 mlxsw: spectrum: Offload multichain TC rules Reflect chain index coming down from TC core and create a ruleset per chain. Note that only chain 0, being the implicit chain, is bound to the device for processing. The rest of chains have to be "jumped-to" by actions. 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 | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 28 +++++++++++++++------- .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 5 ++-- 4 files changed, 25 insertions(+), 15 deletions(-) commit ae99e188928e01dfa0fa45d2e1431ad33a0eaad9 Merge: 5f9ae3d 186cd4d Author: David S. Miller Date: Wed Aug 23 20:42:10 2017 -0700 Merge branch 'mvpp2-software-TSO-support' Antoine Tenart says: ==================== net: mvpp2: software TSO support This series adds the s/w TSO support in the PPv2 driver, in addition to two cosmetic commits. As stated in patch 3/3: Using iperf and 10G ports, using TSO shows a significant performance improvement by a factor 2 to reach around 9.5Gbps in TX; as well as a significant CPU usage drop (from 25% to 15%). ==================== Signed-off-by: David S. Miller commit 186cd4d4e4144803652212eb0b7413141469feee Author: Antoine Ténart Date: Wed Aug 23 09:46:56 2017 +0200 net: mvpp2: software tso support The patch uses the tso API to implement the tso functionality in Marvell PPv2 driver. Using iperf and 10G ports, using TSO shows a significant performance improvement by a factor 2 to reach around 9.5Gbps in TX; as well as a significant CPU usage drop (from 25% to 15%). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 171 ++++++++++++++++++++++++++++++++--- 1 file changed, 157 insertions(+), 14 deletions(-) commit 85affd7e29e78dbf39f6b1e3a3ddf8432168e231 Author: Antoine Ténart Date: Wed Aug 23 09:46:55 2017 +0200 net: mvpp2: unify the txq size define use The txq size is defined by MVPP2_AGGR_TXQ_SIZE, which is sometime not used directly but through variables. As it is a fixed value use the define everywhere in the driver. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f9cbe9a556afca9e82df9aebe4412d93769566b5 Author: Antoine Ténart Date: Wed Aug 23 09:46:54 2017 +0200 net: define the TSO header size in net/tso.h The TSO header size was defined in many drivers. Factorize the code and define its size in net/tso.h. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 1 - drivers/net/ethernet/freescale/fec_main.c | 1 - drivers/net/ethernet/marvell/mv643xx_eth.c | 2 -- drivers/net/ethernet/marvell/mvneta.c | 3 --- include/net/tso.h | 2 ++ 5 files changed, 2 insertions(+), 7 deletions(-) commit 5f9ae3d9e7e4ad6db0491abc7c4ae5452dbeadd8 Author: Xin Long Date: Wed Aug 23 10:07:26 2017 +0800 ipv4: do metrics match when looking up and deleting a route Now when ipv4 route inserts a fib_info, it memcmp fib_metrics. It means ipv4 route identifies one route also with metrics. But when removing a route, it tries to find the route without caring about the metrics. It will cause that the route with right metrics can't be removed. Thomas noticed this issue when doing the testing: 1. add: # ip route append 192.168.7.0/24 dev v window 1000 # ip route append 192.168.7.0/24 dev v window 1001 # ip route append 192.168.7.0/24 dev v window 1002 # ip route append 192.168.7.0/24 dev v window 1003 2. delete: # ip route delete 192.168.7.0/24 dev v window 1002 3. show: 192.168.7.0/24 proto boot scope link window 1001 192.168.7.0/24 proto boot scope link window 1002 192.168.7.0/24 proto boot scope link window 1003 The one with window 1002 wasn't deleted but the first one was. This patch is to do metrics match when looking up and deleting one route. Reported-by: Thomas Haller Signed-off-by: Xin Long Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/fib_lookup.h | 1 + net/ipv4/fib_semantics.c | 34 ++++++++++++++++++++++++++++++++++ net/ipv4/fib_trie.c | 3 ++- 3 files changed, 37 insertions(+), 1 deletion(-) commit d260e9e6ad6fd89488da0fa9e34a1a646ce670e1 Merge: b285477 16e7812 Author: David S. Miller Date: Wed Aug 23 20:30:48 2017 -0700 Merge branch 'tcp-sw-rx-timestamps' Mike Maloney says: ==================== net: Add software rx timestamp for TCP. Add software rx timestamps for TCP, and a test to ensure consistency of behavior between IP, UDP, and TCP implementation. Changes since v1: -Initialize tss->ts[1] to 0 if caller requested any timestamps. -Fix test case to validate that tss->ts[1] is zero. -Fix tests to actually use a raw socket. -Fix --tcp flag to work on the test. ==================== Signed-off-by: David S. Miller commit 16e781224198be06389f6bd8a757c829bf221ea0 Author: Mike Maloney Date: Tue Aug 22 17:08:49 2017 -0400 selftests/net: Add a test to validate behavior of rx timestamps Validate the behavior of the combination of various timestamp socket options, and ensure consistency across ip, udp, and tcp. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller .../selftests/networking/timestamping/.gitignore | 1 + .../selftests/networking/timestamping/Makefile | 4 +- .../networking/timestamping/rxtimestamp.c | 389 +++++++++++++++++++++ 3 files changed, 393 insertions(+), 1 deletion(-) commit 98aaa913b4ed250324429f0a9e6d5f77a3b5276c Author: Mike Maloney Date: Tue Aug 22 17:08:48 2017 -0400 tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg When SOF_TIMESTAMPING_RX_SOFTWARE is enabled for tcp sockets, return the timestamp corresponding to the highest sequence number data returned. Previously the skb->tstamp is overwritten when a TCP packet is placed in the out of order queue. While the packet is in the ooo queue, save the timestamp in the TCB_SKB_CB. This space is shared with the gso_* options which are only used on the tx path, and a previously unused 4 byte hole. When skbs are coalesced either in the sk_receive_queue or the out_of_order_queue always choose the timestamp of the appended skb to maintain the invariant of returning the timestamp of the last byte in the recvmsg buffer. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller include/net/tcp.h | 9 +++++++- net/ipv4/tcp.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 35 ++++++++++++++++++++++++---- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv6/tcp_ipv6.c | 2 ++ 5 files changed, 108 insertions(+), 5 deletions(-) commit b28547728d4fd42a004df2b662724e16ff778db6 Author: Felix Manlunas Date: Tue Aug 22 12:46:37 2017 -0700 liquidio: change manner of detecting whether or not NIC firmware is loaded In the NIC firmware, the 1-bit flag indicating "firmware is loaded" moved from SLI_SCRATCH_1 to SLI_SCRATCH_2 (these are Octeon general-purpose scratch registers). Make the PF driver conform to this change. Remove code that sets the "firmware is loaded" flag because it's now the firmware's job to do that. In the code that detects whether or not the firmware is loaded, don't just rely on checking the "firmware is loaded" flag because that may cause a rare false negative. Add code that deduces whether or not the firmware is loaded; that will never give a false negative. Also bump up driver version to match newer NIC firmware. Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 15 +++++++++++++-- drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 ------ drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 3 ++- 3 files changed, 15 insertions(+), 9 deletions(-) commit 82d2b610586763f21f8f6e1f8c163c1f14b94e1c Author: Bhumika Goyal Date: Mon Aug 21 17:13:07 2017 +0530 ACPI: make device_attribute const Make these const as they are 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: Rafael J. Wysocki drivers/acpi/battery.c | 2 +- drivers/acpi/sbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7dae6326ed76431653793df0388b3a404de1217e Author: Tony Luck Date: Fri Aug 18 16:19:00 2017 -0700 ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region The ACPI sysfs interface provides a way to read each ACPI table from userspace via entries in /sys/firmware/acpi/tables/ The BERT table simply provides the size and address of the error record in BIOS reserved memory and users may want access to this record. In an earlier age we might have used /dev/mem to retrieve this error record, but many systems disable /dev/mem for security reasons. Extend this driver to provide read-only access to the data via a file in a new directory /sys/firmware/acpi/tables/data/BERT Acked-by: Punit Agrawal Signed-off-by: Tony Luck v4: fix typo reported by Punit Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit c4335fdd38227788178953c101b77180504d7ea0 Author: gengdongjiu Date: Thu Aug 17 20:07:18 2017 +0800 ACPI: APEI: fix the wrong iteration of generic error status block The revision 0x300 generic error data entry is different from the old version, but currently iterating through the GHES estatus blocks does not take into account this difference. This will lead to failure to get the right data entry if GHES has revision 0x300 error data entry. Update the GHES estatus iteration macro to properly increment using acpi_hest_get_next(), and correct the iteration termination condition because the status block data length only includes error data length. Convert the CPER estatus checking and printing iteration logic to use same macro. Signed-off-by: Dongjiu Geng Tested-by: Tyler Baicar Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/apei-internal.h | 5 ----- drivers/firmware/efi/cper.c | 12 ++---------- include/acpi/ghes.h | 5 +++++ 3 files changed, 7 insertions(+), 15 deletions(-) commit 0ed780e316f48e38b9dc33d783440da7a22c044d Author: Colin Ian King Date: Tue Aug 15 10:46:30 2017 +0100 ACPI / processor: make function acpi_processor_check_duplicates() static The function acpi_processor_check_duplicates() is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings: symbol 'acpi_processor_check_duplicates' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89ff9d58e6b61bc90638157ae9ec21f6e3186a5a Author: Arnd Bergmann Date: Wed Aug 23 15:22:52 2017 +0200 staging: rtlwifi: add MAC80211 dependency Like the version in drivers/net/wireless, this driver requires the MAC80211 framework, otherwise we run into a link error: ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined! ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined! ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined! ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined! This adds the Kconfig dependency for it. Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03fef6c5c2296ee6d43f59af57973e82c229039c Author: Arnd Bergmann Date: Wed Aug 23 15:22:53 2017 +0200 staging: rtlwifi: simplify logical operation gcc notices a very complicated way to check a value for being equal to one, and warns about it: drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch': drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-Werror=bool-operation] ~switch_polatiry_inverse : ^ drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: note: did you mean to use logical not? ~switch_polatiry_inverse : ^ This simplifies this expression to make it more readable and to make gcc happy. Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a084cda42ece32c83c190db0681f4675d9c41021 Author: Arnd Bergmann Date: Wed Aug 23 15:22:51 2017 +0200 staging: rtlwifi: shut up -Wmaybe-uninitialized warning This function contains a series of interdependent conditions, slightly more than gcc can follow handle apparently: drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key': drivers/staging/rtlwifi/base.c:2546:34: error: 'ht_cap_ie' may be used uninitialized in this function [-Werror=maybe-uninitialized] This moves the code around a bit, to simplify the conditions enough that gcc can see that all variables are correctly initialized. Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit e4f857f739fbd15fd36f10e7caab95779c1dc1e4 Author: Bryan Garza Date: Wed Aug 23 22:37:00 2017 +0000 Staging: comedi: comedi_fops: fix dev_err() warning style Changed dev_err() call to use function name constant instead of hardcoded string. Issue found by checkpatch. Signed-off-by: Bryan Garza Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 737aed947f9b5bd749a2684e13572ee99a1b8bae Author: Gilad Ben-Yossef Date: Wed Aug 23 12:12:05 2017 +0300 staging: ccree: save ciphertext for CTS IV The crypto API requires saving the last blocks of ciphertext in req->info for use as IV for CTS mode. The ccree driver was not doing this. This patch fixes that. The bug was manifested with cts(cbc(aes)) mode in tcrypt tests. Fixes: 302ef8ebb4b2 ("Add CryptoCell skcipher support") Signed-off-by: Gilad Ben-Yossef Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 40 ++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) commit 19dfd8810716060a7075fe420ea4e98d7d65be86 Author: Laurentiu Tudor Date: Wed Aug 23 13:36:16 2017 +0300 staging: fsl-mc: be consistent when checking strcmp() returns Throughout the driver we use == 0 / != 0 to check strcmp() returns except this place, so fix it. Signed-off-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69a6beab085264cdcdb9e3160b1a2ae61b2efde1 Author: Srinivas Kandagatla Date: Mon Aug 14 12:26:34 2017 +0200 clk: msm8996-gcc: add missing smmu clks This patch adds missing LPASS smmu clks which are required by the audio driver. Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 28 ++++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 2 ++ 2 files changed, 30 insertions(+) commit 7157c69a99510c2234fc0b6001f21776085fda73 Author: Alex Frid Date: Tue Jul 25 13:34:15 2017 +0300 clk: tegra: Fix Tegra210 PLLU initialization - Added necessary delays in PLLU enable sequence during initialization - Applied PLLU lock to all secondary gates (PLLU_48M and PLLU_60M were missing). Signed-off-by: Alex Frid Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 71422dbb89ee4198c705ad14c75bfc72625f95c2 Author: Alex Frid Date: Tue Jul 25 13:34:14 2017 +0300 clk: tegra: Correct Tegra210 UTMIPLL poweron delay Increased Tegra210 UTMIPLL power on delay to 20us (spec maximum is 15us). Also remove a few empty lines to make it more clear the ACTIVE_DLY_COUNT and ENABLE_DLY_COUNT fields. Signed-off-by: Alex Frid Reviewed-by: Peter De Schrijver Reviewed-by: Jon Mayo Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f924ac33f6bd46dcf1d1374401515ada5a35f21 Author: Alex Frid Date: Tue Jul 25 13:34:13 2017 +0300 clk: tegra: Fix T210 PLLRE registration Switched Tegra210 PLLRE registration to common PLL ops instead of special PLLRE ops used on previous Tegra chips. The latter ops do not follow chip specific PLL frequency table, and do not apply chip specific rate calculation method. Removed unnecessary default rate setting that duplicates h/w reset state, and is overwritten by clock initialization, anyway. Signed-off-by: Alex Frid Reviewed-by: Peter De Schrijver Reviewed-by: Jon Mayo Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit f7bdb8b78a3d4b2f0ebd76e606ac6ca2925d7b02 Author: Alex Frid Date: Tue Jul 25 13:34:12 2017 +0300 clk: tegra: Update T210 PLLSS (D2/DP) registration Remove from Tegra210 PLLSS registration code sections that - attempt to set PLL minimum rate (unnecessary, and dangerous if PLL is already enabled on boot) - apply pre-Tegra210 defaults settings - check IDDQ setting (duplicated with Tegra210 PLLSS check defaults) Replaced setting of reference clock with check that default oscillator selection is not changed, and failed registration otherwise as validation was only done with the oscillator as the reference clock. Reordered registration, so that PLL initialization is called after VCOmin adjustment. Signed-off-by: Alex Frid Reviewed-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 48 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 39 deletions(-) commit ac99afe55adf1406e367d229a1c5b2f09818b5a6 Author: Alex Frid Date: Tue Jul 25 13:34:11 2017 +0300 clk: tegra: Re-factor T210 PLLX registration Tegra210 PLLX uses the same sequences than then PLLC instances. So there is no need to have a special registration function and ops struct for it. Simplify the code by changing all references to the Tegra210 PLLX registration function to the Tegra210 PLLC registration function and avoid duplicate functionality. Based on work by Alex Frid Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 40 -------------------------------- drivers/clk/tegra/clk-tegra-super-gen4.c | 11 +++++++-- drivers/clk/tegra/clk-tegra210.c | 2 +- drivers/clk/tegra/clk.h | 6 ----- 4 files changed, 10 insertions(+), 49 deletions(-) commit 1934ffd08d79ad746dbb1e2fcaeb76950be57be6 Author: Peter De Schrijver Date: Tue Jul 25 13:34:10 2017 +0300 clk: tegra: don't warn for pll_d2 defaults unnecessarily If the PLL is on, only warn if the defaults are not yet set. Otherwise be silent. Signed-off-by: Peter De Schrijver Reviewed-by: Timo Alho Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3dd065e70e6c6ec54d2fc7d5158d88518d3c5ab9 Author: Peter De Schrijver Date: Tue Jul 25 13:34:09 2017 +0300 clk: tegra: change post IDDQ release delay to 5us Increase delay after PLL IDDQ release to 5us per PLL specifications. based on work by Alex Frid Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82c875ca2b26fcca1a92ed4fd3a10bd653d6f680 Author: Alex Frid Date: Tue Jul 25 13:34:08 2017 +0300 clk: tegra: Add TEGRA_PERIPH_ON_APB flag to I2C I2C controllers are also on the APB bus and therefor need this flag to handle resets correctly. Signed-off-by: Alex Frid Reviewed-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra-periph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a851ea2b9e1084a7bb02403ca03667e162e226fe Author: Alex Frid Date: Tue Jul 25 13:34:07 2017 +0300 clk: tegra: Fix T210 effective NDIV calculation Don't take the fractional part into account to calculate the effective NDIV if fractional ndiv is not enabled. Signed-off-by: Alex Frid Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bc7b34a2fb78661b2980d949aad8edc39c253e3a Author: Peter De Schrijver Date: Tue Jul 25 13:34:06 2017 +0300 clk: tegra: Init cfg structure in _get_pll_mnp Not all fields are read from the hw depending on the PLL type. Make sure the other fields are 0 by clearing the structure beforehand to prevent users such as the rate re-calculation code from using bogus values. Based on work by Alex Frid Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 2 ++ 1 file changed, 2 insertions(+) commit e34e69cc866a26ec42be789a49ea6174ddc801ca Author: Peter De Schrijver Date: Tue Jul 25 13:34:05 2017 +0300 clk: tegra210: remove non-existing VFIR clock Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 1 - 1 file changed, 1 deletion(-) commit 030999fe514d2d6dbabf0ed6727f4c493082d99d Author: Peter De Schrijver Date: Tue Jul 25 13:34:04 2017 +0300 clk: tegra: disable SSC for PLL_D2 PLLD2 is used for HDMI which does not allow Spread Spectrum clocking. Signed-off-by: Peter De Schrijver Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04434cfa2b2032eae52c197ea184844dd76a329d Author: Peter De Schrijver Date: Tue Jul 25 13:34:03 2017 +0300 clk: tegra: Enable PLL_SS for Tegra210 Make sure the pll_ss ops are compiled even when only building for Tegra210. Signed-off-by: Peter De Schrijver Reviewed-by: Shreshtha Sahu Tested-by: Shreshtha Sahu Reviewed-by: Jon Mayo Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a7da87727acfc201141d67e6edf2fb4ddcab7db Author: Peter De Schrijver Date: Tue Jul 25 13:34:02 2017 +0300 clk: tegra: fix SS control on PLL enable/disable PLL SS was only controlled when setting the PLL rate, not when the PLL itself is enabled or disabled. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Mayo Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-pll.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) commit de2245540ed84c56ba3d71d1ce8e14fdaf332720 Author: Georgi Djakov Date: Fri Aug 18 17:22:50 2017 +0300 clk: qcom: msm8916: Fix bimc gpu clock ops The clock bimc_gpu_clk_src is incorrectly set to use the shared rcg2 ops, which are for RCGs with child branches controlled by different CPUs. The result of the incorrect ops is that the GPU's PM runtime may leave this clock set at a very low rate. Fix this issue by using the correct rcg2 ops. Fixes: a2e8272f3f89 ("clk: qcom: Add MSM8916 gpu clocks") Signed-off-by: Georgi Djakov Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8916.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cc566a821a0e0999209a256b80375d08db2840c Author: Bhumika Goyal Date: Tue Aug 22 18:41:15 2017 +0530 clk: ti: 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: Tero Kristo Signed-off-by: Stephen Boyd drivers/clk/ti/adpll.c | 2 +- drivers/clk/ti/apll.c | 2 +- drivers/clk/ti/fapll.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 535b1100d169589f095165c75918ad398943cc76 Merge: 1dfcfa7 c29f829 Author: Stephen Boyd Date: Wed Aug 23 15:39:58 2017 -0700 Merge tag 'clk-renesas-for-v4.14-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 more module clocks for R-Car V2H and M3-W, * Add support for the R-Car Gen3 USB 2.0 clock selector PHY, * Add support for the new R-Car D3 SoC, * Allow compile-testing of all (sub)drivers now all dummy infrastructure is available, * Small fixes and cleanups. * tag 'clk-renesas-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add USB3.0 clock clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY clk: renesas: cpg-mssr: Add R8A77995 support clk: renesas: rcar-gen3: Add support for SCCG/Clean peripheral clocks clk: renesas: rcar-gen3: Add divider support for PLL1 and PLL3 clk: renesas: Add r8a77995 CPG Core Clock Definitions clk: renesas: rcar-gen3-cpg: Refactor checks for accessing the div table clk: renesas: rcar-gen3-cpg: Drop superfluous variable clk: renesas: Allow compile-testing of all (sub)drivers clk: renesas: r8a7792: Add IMR-LX3/LSX3 clocks clk: renesas: div6: Document fields used for parent selection commit 1dfcfa721f9390ed5fd1e9c48e9fd6e8208a4963 Author: Stephen Boyd Date: Wed Aug 23 15:35:41 2017 -0700 clk: rockchip: Mark rockchip_fractional_approximation static Silence the sparse warning clk/rockchip/clk.c:172:6: warning: symbol 'rockchip_fractional_approximation' was not declared. Should it be static? Cc: Elaine Zhang Cc: Heiko Stuebner Signed-off-by: Stephen Boyd drivers/clk/rockchip/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf657bb940b3106a52d329c039fb705fa8437724 Merge: 1fea70b 64a1644 Author: Stephen Boyd Date: Wed Aug 23 15:33:45 2017 -0700 Merge tag 'v4.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull Rockchip clk driver updates from Heiko Stuebner: The biggest change is fixing the jitter on the fractional clock-type Rockchip socs experience with the default approximation. For that we introduce the ability to override it with a clock-specific approximation and use that to create the needed rate settings as described in the Rockchip soc manuals (same for all Rockchip socs). Apart from that we have support for the rk3126 clock controller which is similar to the rk3128 with some minimal differences and a lot of improvements and fixes for the rv1108 clock controller (missing clocks, some clock-ids, naming fixes, register fixes). * tag 'v4.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: fix the rv1108 clk_mac sel register description clk: rockchip: rename rv1108 macphy clock to mac clk: rockchip: add rv1108 ACLK_GMAC and PCLK_GMAC clocks clk: rockchip: add rk3228 SCLK_SDIO_SRC clk id clk: rockchip: add rv1108 ACLK_GAMC and PCLK_GMAC ID clk: rockchip: add rk3228 sclk_sdio_src ID clk: rockchip: add special approximation to fix up fractional clk's jitter clk: fractional-divider: allow overriding of approximation clk: rockchip: modify rk3128 clk driver to also support rk3126 dt-bindings: add documentation for rk3126 clock clk: rockchip: add some critical clocks for rv1108 SoC clk: rockchip: rename some of clks for rv1108 SoC clk: rockchip: fix up some clks describe error for rv1108 SoC clk: rockchip: support more clks for rv1108 clk: rockchip: fix up the pll clks error for rv1108 SoC clk: rockchip: support more rates for rv1108 cpuclk clk: rockchip: fix up indentation of some RV1108 clock-ids clk: rockchip: rename the clk id for HCLK_I2S1_2CH clk: rockchip: add more clk ids for rv1108 commit 1fea70bc1839ac60a89f4b5d50e2b3e160aa74e2 Merge: 4d64556 cd030a7 Author: Stephen Boyd Date: Wed Aug 23 15:31:48 2017 -0700 Merge tag 'sunxi-clk-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next Pull Allwinner clock changes from Chen-Yu Tsai: * Added support for fixed post-divider on divider and NKM-style clocks * Added driver for R40 CCU * Fix sunxi-ng/ccu-sunxi-r.h header file guard macro typo * Make fractional clock modes really used and correctly configured * Make H3 cpu clock rate change correctly to be used with cpufreq * tag 'sunxi-clk-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: support R40 SoC dt-bindings: add compatible string for Allwinner R40 CCU clk: sunxi-ng: nkm: add support for fixed post-divider clk: sunxi-ng: div: Add support for fixed post-divider dt-bindings: clock: sunxi-ccu: Add compatibles for sun5i CCU driver clk: sunxi-ng: allow set parent clock (PLL_CPUX) for CPUX clock on H3 clk: sunxi-ng: h3: gate then ungate PLL CPU clk after rate change clk: sunxi-ng: Wait for lock when using fractional mode clk: sunxi-ng: Make fractional helper less chatty clk: sunxi-ng: multiplier: Fix fractional mode clk: sunxi-ng: Fix fractional mode for N-M clocks clk: sunxi-ng: Fix header guard of ccu-sun8i-r.h commit 4d64556b3622166216db754211858447079e7c96 Merge: 3477a72b 599cebe Author: Stephen Boyd Date: Wed Aug 23 15:30:29 2017 -0700 Merge tag 'clk-v4.14-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-next Pull Samsung clk driver updates from Sylwester Nawrocki: Changes in definitions of audio related clocks for Exynos5420/5422/5800 SoCs: a fix of mau_epll clock definition and changes enabling clock rate setting propagation on a path from the I2S IP block up the EPLL. * tag 'clk-v4.14-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: exynos542x: Enable clock rate propagation up to the EPLL clk: samsung: Add CLK_SET_RATE_PARENT to some AUDSS CLK CON clocks clk: samsung: Fix mau_epll clock definition for exynos5422 commit 3477a72b41f3515913f7da704965884ca51b4352 Merge: e66d57a 62ec0b9 Author: Stephen Boyd Date: Wed Aug 23 15:28:52 2017 -0700 Merge tag 'meson-clk-for-4.14' of git://github.com/baylibre/clk-meson into clk-next Pull Amlogic clock driver updates from Neil Armstrong: * meson8b: add the reset controller to the clkc * meson: expose all clk ids * gxbb-aoclk: Add CEC 32k clock * gxbb: add mmc input 0 clocks * meson: fix protection against undefined clks * gxbb: fix audio divider flags * tag 'meson-clk-for-4.14' of git://github.com/baylibre/clk-meson: clk: meson: gxbb-aoclk: Add CEC 32k clock clk: meson: gxbb-aoclk: Switch to regmap for register access dt-bindings: clock: amlogic, gxbb-aoclkc: Update bindings clk: meson: gxbb: Add sd_emmc clk0 clocks clk: meson: gxbb: fix clk_mclk_i958 divider flags clk: meson: gxbb: fix meson cts_amclk divider flags clk: meson: meson8b: register the built-in reset controller dt-bindings: clock: gxbb-aoclk: Add CEC 32k clock clk: meson: gxbb: Add sd_emmc clk0 clkids clk: meson-gxbb: expose almost every clock in the bindings clk: meson8b: expose every clock in the bindings clk: meson: gxbb: fix protection against undefined clks clk: meson: meson8b: fix protection against undefined clks dt-bindings: clock: meson8b: describe the embedded reset controller commit 37dcd6570f2e95364c26426d4110ba40c07df067 Author: weiping zhang Date: Sat Aug 19 00:37:20 2017 +0800 block, bfq: fix error handle in bfq_init if elv_register fail, bfq_pool should be free. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/bfq-iosched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 86b03b332102327fffda34bbe69ad4b475392242 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 766cff839ddc303ff4e17fd7a03bea7cf890de2d 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 b252903afcb1139dd87605b79f41e0dc325f9ece 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 cea92099c99a186624be6df9701fcec813ebf441 Merge: 9471783 5911fc6 Author: Arnd Bergmann Date: Wed Aug 23 21:48:05 2017 +0200 Merge tag 'samsung-dt-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DTS ARM changes for v4.14, part 2" from Krzysztof Kozłowski: Fix PCI bus dtc warnings. * tag 'samsung-dt-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: fix PCI bus dtc warnings commit 9e3d3619e1f7b399100cfa9c59a4279c006a019b Merge: ac9ae4d 225bd1d Author: Arnd Bergmann Date: Wed Aug 23 21:46:48 2017 +0200 Merge tag 'samsung-soc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung mach/soc changes for v4.14, part 2" from Krzysztof Kozłowski: Fix NAND ECC mode for mini2440 board. * tag 'samsung-soc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c24xx: Fix NAND ECC mode for mini2440 board commit 3889e8510028aa7de0ff84f90cb552a9bb75f0b9 Merge: 9261b43 e83a719 Author: Arnd Bergmann Date: Wed Aug 23 21:46:12 2017 +0200 Merge tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "Samsung soc drivers changes for v4.14" from Krzysztof Kozłowski: Conversion to kbasename from Rob Herring. * tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: Use kbasename instead of open coding commit 74d46992e0d9dee7f1f376de0d56d31614c8a17a Author: Christoph Hellwig Date: Wed Aug 23 19:10:32 2017 +0200 block: replace bi_bdev with a gendisk pointer and partitions index This way we don't need a block_device structure to submit I/O. The block_device has different life time rules from the gendisk and request_queue and is usually only available when the block device node is open. Other callers need to explicitly create one (e.g. the lightnvm passthrough code, or the new nvme multipathing code). For the actual I/O path all that we need is the gendisk, which exists once per block device. But given that the block layer also does partition remapping we additionally need a partition index, which is used for said remapping in generic_make_request. Note that all the block drivers generally want request_queue or sometimes the gendisk, so this removes a layer of indirection all over the stack. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe arch/powerpc/sysdev/axonram.c | 2 +- block/bio-integrity.c | 18 +++---- block/bio.c | 10 ++-- block/blk-core.c | 100 ++++++++++++++++++------------------ block/blk-flush.c | 2 +- block/blk-lib.c | 8 +-- block/blk-merge.c | 2 +- block/blk-zoned.c | 4 +- drivers/block/brd.c | 5 +- drivers/block/drbd/drbd_actlog.c | 2 +- drivers/block/drbd/drbd_bitmap.c | 2 +- drivers/block/drbd/drbd_int.h | 4 +- drivers/block/drbd/drbd_receiver.c | 4 +- drivers/block/drbd/drbd_req.c | 2 +- drivers/block/drbd/drbd_worker.c | 2 +- drivers/block/floppy.c | 2 +- drivers/block/pktcdvd.c | 11 ++-- drivers/block/xen-blkback/blkback.c | 4 +- drivers/md/bcache/debug.c | 2 +- drivers/md/bcache/io.c | 2 +- drivers/md/bcache/journal.c | 6 +-- drivers/md/bcache/request.c | 16 +++--- drivers/md/bcache/super.c | 6 +-- drivers/md/bcache/writeback.c | 5 +- drivers/md/dm-bio-record.h | 9 ++-- drivers/md/dm-bufio.c | 2 +- drivers/md/dm-cache-target.c | 4 +- drivers/md/dm-crypt.c | 4 +- drivers/md/dm-delay.c | 4 +- drivers/md/dm-era-target.c | 2 +- drivers/md/dm-flakey.c | 2 +- drivers/md/dm-integrity.c | 11 ++-- drivers/md/dm-io.c | 2 +- drivers/md/dm-linear.c | 2 +- drivers/md/dm-log-writes.c | 8 +-- drivers/md/dm-mpath.c | 2 +- drivers/md/dm-raid1.c | 12 ++--- drivers/md/dm-snap.c | 16 +++--- drivers/md/dm-stripe.c | 10 ++-- drivers/md/dm-switch.c | 2 +- drivers/md/dm-thin.c | 6 +-- drivers/md/dm-verity-target.c | 2 +- drivers/md/dm-zoned-metadata.c | 6 +-- drivers/md/dm-zoned-target.c | 4 +- drivers/md/dm.c | 10 ++-- drivers/md/faulty.c | 4 +- drivers/md/linear.c | 6 +-- drivers/md/md.c | 10 ++-- drivers/md/md.h | 9 +++- drivers/md/multipath.c | 8 +-- drivers/md/raid0.c | 7 ++- drivers/md/raid1.c | 34 ++++++------ drivers/md/raid10.c | 50 +++++++++--------- drivers/md/raid5-cache.c | 6 +-- drivers/md/raid5-ppl.c | 6 +-- drivers/md/raid5.c | 12 ++--- drivers/nvdimm/nd.h | 4 +- drivers/nvme/host/core.c | 11 +--- drivers/nvme/host/lightnvm.c | 15 +----- drivers/nvme/target/io-cmd.c | 6 +-- drivers/s390/block/dcssblk.c | 4 +- drivers/s390/block/xpram.c | 2 +- drivers/target/target_core_iblock.c | 4 +- fs/block_dev.c | 4 +- fs/btrfs/check-integrity.c | 12 ++--- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 6 +-- fs/btrfs/raid56.c | 8 +-- fs/btrfs/scrub.c | 12 ++--- fs/btrfs/volumes.c | 2 +- fs/buffer.c | 4 +- fs/crypto/bio.c | 2 +- fs/direct-io.c | 8 +-- fs/exofs/ore.c | 2 +- fs/ext4/page-io.c | 4 +- fs/ext4/readpage.c | 2 +- fs/f2fs/data.c | 5 +- fs/f2fs/segment.c | 2 +- fs/gfs2/lops.c | 2 +- fs/gfs2/meta_io.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- fs/hfsplus/wrapper.c | 2 +- fs/iomap.c | 4 +- fs/jfs/jfs_logmgr.c | 4 +- fs/jfs/jfs_metapage.c | 4 +- fs/mpage.c | 2 +- fs/nfs/blocklayout/blocklayout.c | 2 +- fs/nilfs2/segbuf.c | 2 +- fs/ocfs2/cluster/heartbeat.c | 2 +- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_buf.c | 2 +- include/linux/bio.h | 18 +++++++ include/linux/blk_types.h | 3 +- include/trace/events/bcache.h | 6 +-- include/trace/events/block.h | 16 +++--- include/trace/events/f2fs.h | 2 +- kernel/power/swap.c | 5 +- kernel/trace/blktrace.c | 2 +- mm/page_io.c | 17 +++--- 99 files changed, 358 insertions(+), 357 deletions(-) commit c2ee070fb00365d7841f6661dcdc7fbe6620bdf8 Author: Christoph Hellwig Date: Wed Aug 23 19:10:31 2017 +0200 block: cache the partition index in struct block_device Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/block_dev.c | 1 + include/linux/fs.h | 1 + 2 files changed, 2 insertions(+) commit 807d4af2f64ed79fdbb28e582e330be3dbe10d23 Author: Christoph Hellwig Date: Wed Aug 23 19:10:30 2017 +0200 block: add a __disk_get_part helper This helper allows looking up a partion under RCU protection without grabbing a reference to it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk.h | 2 ++ block/genhd.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) commit de65b0123216a8e1dbe3ca1eb20a45572b9e71d9 Author: Christoph Hellwig Date: Wed Aug 23 19:10:29 2017 +0200 block: reject attempts to allocate more than DISK_MAX_PARTS partitions Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/genhd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 10433d04b8e647a50feffec72fd3cf40ce42b084 Author: Christoph Hellwig Date: Wed Aug 23 19:10:28 2017 +0200 raid5: remove a call to get_start_sect The block layer always remaps partitions before calling into the ->make_request methods of drivers. Thus the call to get_start_sect in in_chunk_boundary will always return 0 and can be removed. Reviewed-by: Shaohua Li Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/md/raid5.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f8f84b2dfda5a74c56536a9e9092d2a5d761db78 Author: Christoph Hellwig Date: Wed Aug 23 19:10:27 2017 +0200 btrfs: index check-integrity state hash by a dev_t We won't have the struct block_device available in the bio soon, so switch to the numerical dev_t instead of the block_device pointer for looking up the check-integrity state. Reviewed-by: Liu Bo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/btrfs/check-integrity.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 744353b6951c3b7adbb9e4a1b2a529eabde61970 Author: Bart Van Assche Date: Wed Aug 23 10:56:33 2017 -0700 skd: Change default interrupt mode to MSI-X Since MSI support on some motherboards is unreliable, change the default interrupt mode from MSI to MSI-X. This patch avoids that the following message appears sporadially in the kernel logs of my test setup: do_IRQ: 3.193 No irq handler for vector Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2fe445986c8c53d2c324062f2e2c34263cd79a1 Author: Bart Van Assche Date: Wed Aug 23 10:56:32 2017 -0700 skd: Avoid double completions in case of a timeout Avoid that normal request completion and the timeout handler can run concurrently by calling blk_mq_complete_request() instead of blk_mq_end_request() from skd_end_request(). Avoid that the block layer can reuse a request while the firmware is still processing it. Convert skd_softirq_done() to blk-mq. Pass the pointer to skd_softirq_done() to the block layer core through blk_mq_ops.complete instead of by calling blk_queue_softirq_done(). Pass the pointer to skd_timed_out() to the block layer core through blk_mq_ops.timeout instead of by calling blk_queue_timed_out(). The timeout handler has been tested as follows: echo 1 > /sys/block/skd0/io-timeout-fail && (cd /sys/kernel/debug/fail_io_timeout && echo 100 > probability && echo N > task-filter && echo 1 > times) Fixes: commit a74d5b76fab9 ("skd: Switch to block layer timeout mechanism") Reported-by: Christoph Hellwig Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c39c6c773d61457460fcbe4209816db53cd3cad7 Author: Bart Van Assche Date: Wed Aug 23 10:56:31 2017 -0700 skd: Inline skd_process_request() This patch does not change any functionality but makes the skd driver code more similar to that of other blk-mq kernel drivers. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit 49f16e2f20432a452e47454710fbb25b34f8681b Author: Bart Van Assche Date: Wed Aug 23 10:56:30 2017 -0700 skd: Report completion mismatches once This patch removes one debug statement but otherwise does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/skd_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 130d733a616372ba5d375f9ca8da9378924b6889 Author: Bart Van Assche Date: Wed Aug 23 10:56:29 2017 -0700 block: Warn if blk_queue_rq_timed_out() is called for a blk-mq queue The timeout handler set by blk_queue_rq_timed_out() is only used in single queue mode. Calling this function for blk-mq drivers is wrong. Hence issue a warning if this function is called by a blk-mq driver. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-settings.c | 1 + 1 file changed, 1 insertion(+) commit def12ec59dd74f5b6ff013b874b1e558b1c22f50 Author: Markus Elfring Date: Sat Aug 19 08:13:46 2017 +0200 isofs: Delete an unnecessary variable initialisation in isofs_read_inode() The local variable "bh" will 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: Jan Kara fs/isofs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e96e8a1dc12e3186e24c74e42e03b788d3132377 Author: Markus Elfring Date: Fri Aug 18 21:47:14 2017 +0200 isofs: 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: Jan Kara fs/isofs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 640bd6e5752274f7dbd2a0a6642fe2db85813bd9 Author: Janakarajan Natarajan Date: Wed Aug 23 09:57:19 2017 -0500 KVM: SVM: Enable Virtual GIF feature Enable the Virtual GIF feature. This is done by setting bit 25 at position 60h in the vmcb. With this feature enabled, the processor uses bit 9 at position 60h as the virtual GIF when executing STGI/CLGI instructions. Since the execution of STGI by the L1 hypervisor does not cause a return to the outermost (L0) hypervisor, the enable_irq_window and enable_nmi_window are modified. The IRQ window will be opened even if GIF is not set, under the assumption that on resuming the L1 hypervisor the IRQ will be held pending until the processor executes the STGI instruction. For the NMI window, the STGI intercept is set. This will assist in opening the window only when GIF=1. Signed-off-by: Janakarajan Natarajan Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 6 +++++ arch/x86/kvm/svm.c | 56 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 56 insertions(+), 6 deletions(-) commit d837312dfd5bed79ff6576e83dda3cddbe5c7ec7 Author: Janakarajan Natarajan Date: Wed Aug 23 09:57:18 2017 -0500 KVM: SVM: Add Virtual GIF feature definition Add a new cpufeature definition for Virtual GIF. Signed-off-by: Janakarajan Natarajan Reviewed-by: Borislav Petkov Signed-off-by: Paolo Bonzini arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit 5b8d5ad2308d2d5f77c8b9aa47d386a192dbb3c7 Author: Arvind Yadav Date: Wed Aug 23 21:39:58 2017 +0530 spi: pl022: constify amba_id amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown drivers/spi/spi-pl022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 268e2519f5b7101d707a0df32e628e9990bc0da6 Author: Ujjal Singh Date: Tue Aug 22 20:31:18 2017 -0400 dmaengine: ioatdma: Add intr_coalesce sysfs entry We observed performance increase with DMA copy from memory to MMIO by changing the interrupt coalescing value to 0. The previous set value was projected on the C5xxx Xeon platform and no longer holds true. Removing hard coded value and providing a tune-able in sysfs in order to allow user to tune this on a per channel basis. By default this value will be set to 0. Example of sysfs variable importing for interrupt coalescing value from command line: echo 5> /sys/devices/pci0000:00/0000:00:04.0/dma/dma0chan0/ quickdata/intr_coalesce Reported-by: Nithin Sujir Signed-off-by: Ujjal Singh Acked-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 10 +++++++--- drivers/dma/ioat/dma.h | 3 +++ drivers/dma/ioat/sysfs.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) commit 5904c9d3c9bd52f79718d1806175271b4bd20718 Author: Arnd Bergmann Date: Wed Aug 23 15:34:43 2017 +0200 spi: imx: fix little-endian build The newly added dynamic burst code produces a harmless warning on big-endian configurations: drivers/spi/spi-imx.c: In function 'spi_imx_buf_rx_swap_u32': drivers/spi/spi-imx.c:284:15: error: unused variable 'bytes_per_word' [-Werror=unused-variable] unsigned int bytes_per_word; ^~~~~~~~~~~~~~ drivers/spi/spi-imx.c: In function 'spi_imx_buf_tx_swap_u32': drivers/spi/spi-imx.c:319:15: error: unused variable 'bytes_per_word' [-Werror=unused-variable] unsigned int bytes_per_word; This adds another #ifdef around the variable declaration matching the one on the use. Fixes: 1673c81d9435 ("spi: imx: dynamic burst length adjust for PIO mode") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9149916f1e8c912c585ddebf12a98e99bd81aafe Author: Subhransu S. Prusty Date: Wed Aug 23 19:37:12 2017 +0530 ASoC: Intel: Skylake: Fix uninitialized return On failure to get dsp_ops, dsp_init returns error without assigning ret. ret is assigned in code path which will never be executed. Fix it. Fixes: f77d443c4c29 ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure" Reported-by: kbuild test robot Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd6d6477f130c861c42e6eddc060e7c880e94bf3 Author: Bhumika Goyal Date: Wed Aug 23 20:05:22 2017 +0530 ASoC: rt5645: make rt5645_platform_data const Make these const as they are only used during a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct rt5645_platform_data 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 rt5645_platform_data s; Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d30176819c8738b012ec623c7b3db19df818e70 Author: Sudeep Holla Date: Fri Aug 18 15:39:28 2017 +0100 firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set scpi_device_{g,s}et_power_state correctly handles the conversion of endianness for dev_id using cpu_to_le16. However dev_id is declared as u16 in struct dev_pstate_set which is incorrect. This patch fixes the endianness of dev_id in dev_pstate_set structure. Fixes: 37a441dcd5f4 ("firmware: arm_scpi: add support for device power state management") Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a75d6a4cebcc58c4fb139385fc996a62b6f18f68 Merge: 311bba1 d4092d7 Author: Boris Brezillon Date: Wed Aug 23 17:00:12 2017 +0200 Merge branch 'nand/rename-header-file' of git://git.infradead.org/l2-mtd into nand/next commit 2f54a613c9421ddd5897f861145ed0b8615a2ec4 Author: Shaohua Li Date: Mon Aug 14 15:05:00 2017 -0700 nullb: badbblocks support Sometime disk could have tracks broken and data there is inaccessable, but data in other parts can be accessed in normal way. MD RAID supports such disks. But we don't have a good way to test it, because we can't control which part of a physical disk is bad. For a virtual disk, this can be easily controlled. This patch adds a new 'badblock' attribute. Configure it in this way: echo "+1-100" > xxx/badblock, this will make sector [1-100] as bad blocks. echo "-20-30" > xxx/badblock, this will make sector [20-30] good If badblocks are accessed, the nullb disk will return IO error. Other parts of the disk can accessed in normal way. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) commit deb78b419dfda333318a6ed1fe8e8c6245dd0d43 Author: Shaohua Li Date: Mon Aug 14 15:04:59 2017 -0700 nullb: emulate cache Software must flush disk cache to guarantee data safety. To check if software correctly does disk cache flush, we must know the behavior of disk. But physical disk behavior is uncontrollable. Even software doesn't do the flush, the disk probably does the flush. This patch tries to emulate a cache in the test disk. All write will go to a cache first, when the cache is full, we then flush some data to disk storage. A flush request will flush all data of the cache to disk storage. A FUA write will write to memory store directly and revalidate data in cache. If there is a power failure (by writing to power attribute, 'echo 0 > disk_name/power'), we discard all data in the cache, but preserve the data in disk storage. Later we can power on the disk again as usual (write 1 to 'power' attribute), then we can check data integrity and very if software does everything correctly. A new attribute 'cache_size' (in MB) is added to configure cache size. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 261 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 231 insertions(+), 30 deletions(-) commit eff2c4f108735ddfce37a912a133938d96d70356 Author: Shaohua Li Date: Mon Aug 14 15:04:58 2017 -0700 nullb: bandwidth control In test, we usually expect controllable disk speed. For example, in a raid array, we'd like some disks are fast and some are slow. MD RAID actually has a feature for this. To test the feature, we'd like to make the disk run in specific speed. block throttling probably can be used for this purpose, but it requires cgroup setup. Here we just implement a simple throttling mechanism in the driver. There is slight fluctuation in the mechanism, but it's good enough for test. To configure the bandwidth cap, user sets the 'mbps' attribute. mbps is MB/s. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) commit 306eb6b4ad4f2d51c989b9e3d3a9271c44408431 Author: Shaohua Li Date: Mon Aug 14 15:04:57 2017 -0700 nullb: support discard discard makes sense for memory backed disk. And also it's useful to test if upper layer supports dicard correctly. User configures 'discard' attribute to enable/disable dicard support. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 5bcd0e0c79b513261172d1348f93d1bf00dffbdf Author: Shaohua Li Date: Mon Aug 14 15:04:56 2017 -0700 nullb: support memory backed store This adds memory backed store in nullb. User configure 'memory_backed' attribute for this. By default, nullb disk doesn't use memory backed store. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 339 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 330 insertions(+), 9 deletions(-) commit 94bc02e30fb8d04429ecf91820abbea0eb5c4ee1 Author: Shaohua Li Date: Mon Aug 14 15:04:55 2017 -0700 nullb: use ida to manage index We now dynamically create disks. Managing the disk index with ida to avoid bump up the index too much. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cedcafad8277b3a07e90bf2f68fff5c6b28a183e Author: Shaohua Li Date: Mon Aug 14 15:04:54 2017 -0700 nullb: add interface to power on disk The device created in nullb configfs interface isn't power on by default. After user configures the device, user can do 'echo 1 > xxx/nullb/device_name/power' to power on the device, which will create a disk. the xxx/nullb/device_name/index is the disk index, so if the index is 2, the new created disk should be named as /dev/nullb2. Note, the 'index' is only valid after disk is power on. 'echo 0 > xxx/nullb/device_name/power' will remove the disk. Note, this doesn't remove the device. To remove the device, user should do 'rmdir xxx/nullb/device_name'. Removing the device will remove the disk too. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 3bf2bd20734e3e6ffda53719a9c10fb3ee9c5ffa Author: Shaohua Li Date: Mon Aug 14 15:04:53 2017 -0700 nullb: add configfs interface Add configfs interface for nullb. configfs interface is more flexible and easy to configure in a per-disk basis. Configuration is something like this: mount -t configfs none /mnt Checking which features the driver supports: cat /mnt/nullb/features The 'features' attribute is for future extension. We probably will add new features into the driver, userspace can check this attribute to find the supported features. Create/remove a device: mkdir/rmdir /mnt/nullb/a Then configure the device by setting attributes under /mnt/nullb/a, most of nullb supported module parameters are converted to attributes: size; /* device size in MB */ completion_nsec; /* time in ns to complete a request */ submit_queues; /* number of submission queues */ home_node; /* home node for the device */ queue_mode; /* block interface */ blocksize; /* block size */ irqmode; /* IRQ completion handler */ hw_queue_depth; /* queue depth */ use_lightnvm; /* register as a LightNVM device */ blocking; /* blocking blk-mq device */ use_per_node_hctx; /* use per-node allocation for hardware context */ Note, creating a device doesn't create a disk immediately. Creating a disk is done in two phases: create a device and then power on the device. Next patch will introduce device power on. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/Kconfig | 1 + drivers/block/null_blk.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 210 insertions(+), 1 deletion(-) commit 2984c8684f962c2936b7175ec5df44e9d607cea9 Author: Shaohua Li Date: Mon Aug 14 15:04:52 2017 -0700 nullb: factor disk parameters When we switch to configfs interface, each disk could have different configuration. To prepare for the change, we move most disk setting to a separate data structure. The existing module parameter interface is kept. The 'nr_devices' and 'shared_tags' don't make sense for per-disk setting, so they are remained as global settings. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/null_blk.c | 234 +++++++++++++++++++++++++++++++---------------- 1 file changed, 153 insertions(+), 81 deletions(-) commit 1fe79d7f35a5f8a060b55ddde5b7cdd152b084a6 Merge: 38ef623 8fe34b0 Author: Kalle Valo Date: Wed Aug 23 17:53:07 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-08-18' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Third set of iwlwifi patches for 4.14 * Work for the upcoming A000 device family continues; * Improvements in debugging; * A couple of improvements in block-ack sessions; * Some fixes for channel switch; * A workaround for a HW data bug; * Some FW API updates; * General fixes and cleanups here and there. commit 475c57cce34a12641d10f6653556023d17913039 Author: Shuah Khan Date: Tue Aug 22 14:10:03 2017 -0600 selftests: timers: remove rtctest_setdate from run_destructive_tests Remove rtctest_setdate from run_destructive_tests target. Leave it in TEST_GEN_PROGS_EXTENDED to be included in the install targets. Suggested-by: John Stultz Signed-off-by: Shuah Khan Reviewed-by: Benjamin Gaignard Signed-off-by: Shuah Khan tools/testing/selftests/timers/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 311bba10cb0e232f2f9b0bace8bec873d7dc32a7 Author: Andrea Adami Date: Mon Aug 14 22:48:36 2017 +0200 mtd: nand: tmio: Register partitions using the parsers With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done in the board files using this driver. Use now these parsers. Signed-off-by: Andrea Adami Acked-by: Wolfram Sang Signed-off-by: Boris Brezillon drivers/mtd/nand/tmio_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 827dba9d626325a65727c4074913b2d3c7e7ea4d Author: Andrea Adami Date: Mon Aug 14 22:48:34 2017 +0200 mfd: tmio: Add partition parsers platform data With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done in the board files using this driver. Thus, we need to extend tmio_nand_data to consider the partition parsers. Signed-off-by: Andrea Adami Acked-by: Lee Jones Acked-by: Wolfram Sang Signed-off-by: Boris Brezillon include/linux/mfd/tmio.h | 1 + 1 file changed, 1 insertion(+) commit 482ead931e05b4d5556a5ffd51c2f40cd586f20c Author: Andrea Adami Date: Mon Aug 14 22:48:35 2017 +0200 mtd: nand: sharpsl: Register partitions using the parsers With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done in the board files using this driver. Use now these parsers. Signed-off-by: Andrea Adami Signed-off-by: Boris Brezillon drivers/mtd/nand/sharpsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e59ad6ff83b444517067046bd837595a1ab84900 Author: Andrea Adami Date: Mon Aug 14 22:48:33 2017 +0200 mtd: nand: sharpsl: Add partition parsers platform data With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done in the board files using this driver. Thus, we need to extend sharpsl_nand_platform_data to consider the partition parsers. Signed-off-by: Andrea Adami Signed-off-by: Boris Brezillon include/linux/mtd/sharpsl.h | 1 + 1 file changed, 1 insertion(+) commit dce84760b09f8c3d6c9e001fe5f37be93d2daa46 Author: Abhishek Sahu Date: Thu Aug 17 17:37:54 2017 +0530 mtd: nand: qcom: Support for IPQ8074 QPIC NAND controller Add the compatible string for IPQ8074 QPIC NAND controller version 1.5.0 which uses BAM DMA and its FLASH_DEV_CMD registers starting offset is 0x7000. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a06378341eeb809f9df4e80ddb507418b3e36d97 Author: Abhishek Sahu Date: Thu Aug 17 17:37:53 2017 +0530 mtd: nand: qcom: support for IPQ4019 QPIC NAND controller Add the compatible string for IPQ4019 QPIC NAND controller version 1.4.0 which uses BAM DMA. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d440c4d3601d964dc742730a05f2534535a17f0b Author: Abhishek Sahu Date: Thu Aug 17 17:37:52 2017 +0530 dt-bindings: qcom_nandc: IPQ8074 QPIC NAND documentation Qualcom IPQ8074 SoC uses QPIC NAND controller version 1.5.0 which uses BAM DMA Engine. Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/qcom_nandc.txt | 2 ++ 1 file changed, 2 insertions(+) commit ec170cc853ad4e8c01ee71e619739b9c379eb643 Author: Abhishek Sahu Date: Thu Aug 17 17:37:51 2017 +0530 dt-bindings: qcom_nandc: IPQ4019 QPIC NAND documentation 1. Qualcom IPQ4019 SoC uses QPIC NAND controller version 1.4.0 which uses BAM DMA Engine while IPQ806x uses EBI2 NAND which uses ADM DMA Engine. 2. QPIC NAND will 3 BAM channels: command, data tx and data rx while EBI2 NAND uses only single ADM channel. 3. CRCI is only required for ADM DMA and its not required for BAM DMA. Acked-by: Rob Herring Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon .../devicetree/bindings/mtd/qcom_nandc.txt | 55 +++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 24d8735708b086a8cfb40d962ea2080af558bd1b Author: Abhishek Sahu Date: Thu Aug 17 17:37:50 2017 +0530 dt-bindings: qcom_nandc: fix the ipq806x device tree example 1. Correct the compatible string for IPQ806x 2. Change the NAND controller and NAND chip nodes name for more clarity. Acked-by: Rob Herring Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/qcom_nandc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc409b9a8ec5e88d6f712c535d88b14765f234c4 Author: Abhishek Sahu Date: Thu Aug 17 17:37:47 2017 +0530 mtd: nand: qcom: support for different DEV_CMD register offsets The FLASH_DEV_CMD registers starting offset is not same in different QPIC NAND controller versions. This patch adds the starting offset in NAND controller properties and uses the same for calculating the actual offset of these registers. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 4e2f6c52f4840b0d2ad1a62b71bf139cb0ec0915 Author: Abhishek Sahu Date: Thu Aug 17 17:37:46 2017 +0530 mtd: nand: qcom: QPIC data descriptors handling 1. Add the data descriptor preparation function which will be used only by BAM DMA for forming the data SGL’s 2. Add clear BAM transaction and call it before every new request 3. Check DMA mode for ADM or BAM and call the appropriate descriptor formation function. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 9d43f91569526b60775174115c98768cb48fc828 Author: Abhishek Sahu Date: Thu Aug 17 17:37:45 2017 +0530 mtd: nand: qcom: enable BAM or ADM mode 1. DM_EN is only required for EBI2 NAND controller which uses ADM 2. BAM mode will be disabled after power on reset which needs to be enabled before starting any BAM transfers. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit a86b9c4f57108a1368b7363bda12de704a7a64ec Author: Abhishek Sahu Date: Thu Aug 17 17:37:44 2017 +0530 mtd: nand: qcom: erased codeword detection configuration The NAND controller returns ECC failure during read of completely erased codeword. The NAND controller has hardware functionality to detect erased codeword in case of BCH ECC algorithm. The NAND_ERASED_CW_DETECT_CFG register controls the erased codeword/page detection controller. This register should be reset before every page read by setting and clearing bit 0 of NAND_ERASED_CW_DETECT_CFG. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 91af95c143088d4c17d1fad238c4b0e999f4a5e8 Author: Abhishek Sahu Date: Thu Aug 17 17:37:43 2017 +0530 mtd: nand: qcom: support for read location registers In EBI2, all codeword data will be read in FLASH_BUF_ACC buffer and ADM will copy the data from source (FLASH_BUF_ACC) to destination (memory for data read). In QPIC, there is no FLASH_BUF_ACC and all the codeword data will held in QPIC BAM FIFO buffers. It provides multiple READ_LOCATION registers which will be used for copying the data from FIFO to memory. The READ_LOCATION register will be used to read a specific amount of data from a specific offset within the flash buffer. It supports sequential offset requests. Each request is composed of the following fields: a. Offset within the flash buffer from which data should be read b. Amount of data to be read c. Flag bit specifying the last read request from the flash buffer. Following the last read request the NANDc refers to the buffer as empty. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 67e830aef3f81affe23e50708f16d35550153836 Author: Abhishek Sahu Date: Thu Aug 17 17:37:42 2017 +0530 mtd: nand: qcom: support for passing flags in DMA helper functions The QPIC NAND BAM has multiple flags to control the transfer. This patch adds flags parameter in register and data transfer DMA helper functions and modifies all these functions call with appropriate flags using following rule 1. Read and write can’t go in single command descriptor so separate SGL should be used. 2. For some of the requests, NWD flag should be set in BAM DMA descriptor. 3. For Data write, the BAM has internal buffer for each codeword. All write request will modify the data in internal buffer and this buffer will be flushed to NAND device once EOT flag is set. So for all the write requests in single codeword, the EOT should be cleared for all tx data descriptors except the last one. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 129 +++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 52 deletions(-) commit 381dd24539a85a4bdec155369e3216e6f267df7d Author: Abhishek Sahu Date: Thu Aug 17 17:37:41 2017 +0530 mtd: nand: qcom: add BAM DMA descriptor handling 1. prepare_bam_async_desc is the function which will call all the DMA API’s. It will fetch the outstanding scatter gather list for passed channel and will do the DMA descriptor formation. The DMA flag is dependent upon the type of channel. 2. For ADM DMA, the descriptor is being formed for every DMA request so its sgl count will be always 1 while in BAM DMA, the clubbing of descriptor is being done to increase throughput. 3. ADM DMA uses only one channel while in BAM DMA, data descriptors will be submitted to tx channel (for write) or rx channel (for read) and all the registers read/write descriptors in command channel. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 148 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 136 insertions(+), 12 deletions(-) commit cb80f1140db6ad2cb6841ad656cc6b779b4b58be Author: Abhishek Sahu Date: Thu Aug 17 17:37:40 2017 +0530 mtd: nand: qcom: allocate BAM transaction - The BAM transaction is the core data structure which will be used for all the data transfers in QPIC NAND. Since the core framework in nand_base.c is serializing all the NAND requests so allocating BAM transaction before every transfer will be overhead. The memory for it be allocated during probe time and before every transfer, it will be cleared. - The BAM transaction contains the array of command and data scatter gather list and indexes. For every transfer, all the resource will be taken from BAM transaction. - The size of the buffer used for BAM transactions is calculated based on the NAND device with the maximum page size, among all the devices connected to the controller. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 6192ff7a44c1806f4db110f09168fb4e84d2770b Author: Abhishek Sahu Date: Thu Aug 17 17:37:39 2017 +0530 mtd: nand: qcom: DMA mapping support for register read buffer The EBI2 NAND controller directly remaps register read buffer with dma_map_sg and DMA address of this buffer will be passed to DMA API’s. While, on QPIC NAND controller, which uses BAM DMA, we read the controller registers by preparing a BAM command descriptor. This command descriptor requires the - controller register address - the DMA address in which we want to store the value read back from the controller register. This command descriptor will be remapped with dma_map_sg and its DMA address will be passed to DMA API’s. Therefore, it's required that we also map our register read buffer for DMA (using dma_map_single). We use the returned DMA address for preparing entries in our command descriptor. This patch adds the DMA mapping support for register read buffer. This buffer will be DMA mapped during allocation time. Before starting of any operation, this buffer will be synced for device operation and after operation completion, it will be synced again for CPU. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 497d7d852a48a28b5f98f1a994195d3c16f591fc Author: Abhishek Sahu Date: Fri Aug 11 17:09:19 2017 +0530 mtd: nand: qcom: add and initialize QPIC DMA resources 1. QPIC NAND controller uses 3 BAM channels: command, data tx and data rx while EBI2 NAND controller uses only single ADM channel. 2. CRCI is only required for ADM DMA and it's not required for BAM DMA. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 86 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 18 deletions(-) commit 8c5d5d6a0bc62bebed37f306b80ab125fa3fbb8d Author: Abhishek Sahu Date: Fri Aug 11 17:09:18 2017 +0530 mtd: nand: qcom: add bam property for QPIC NAND controller The current driver only supports EBI2 NAND controller which uses ADM DMA. The latest QCOM SoC uses QPIC NAND controller with BAM DMA. NAND registers and programming sequence are same for EBI2 and QPIC NAND so the same driver can support QPIC NAND also by adding the BAM DMA support. This patch adds the is_bam in NAND property which will be checked for determining the DMA engine type. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 3 +++ 1 file changed, 3 insertions(+) commit 58f1f22ac34c39958344cd1ae8a89e1030dcdbbd Author: Abhishek Sahu Date: Fri Aug 11 17:09:17 2017 +0530 mtd: nand: qcom: support for NAND controller properties Currently driver data is being assigned directly with ECC modes. Now, the plan is to add more NAND controller versions which will have different properties. This patch reorganizes the current driver data assignment by creating NAND controller properties structure which will contain all properties specific to NAND controller. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit d8a9b320a26c1ea28e51e4f3ecfb593d5aac2910 Author: Abhishek Sahu Date: Fri Aug 11 17:09:16 2017 +0530 mtd: nand: qcom: fix read failure without complete bootchain The NAND page read fails without complete boot chain since NAND_DEV_CMD_VLD value is not proper. The default power on reset value for this register is 0xe - ERASE_START_VALID | WRITE_START_VALID | READ_STOP_VALID The READ_START_VALID should be enabled for sending PAGE_READ command. READ_STOP_VALID should be cleared since normal NAND page read does not require READ_STOP command. Fixes: c76b78d8ec05a ("mtd: nand: Qualcomm NAND controller driver") Cc: stable@vger.kernel.org Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 238709b22097a16839078530e0a10812dde86f16 Author: Gustavo A. R. Silva Date: Wed Aug 9 11:35:21 2017 -0500 mtd: nand: mtk: fix error return code in mtk_ecc_probe() platform_get_irq() returns an error code, but the mtk_ecc driver ignores it and always returns -EINVAL. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2192a8ddc11ad7f243bed44eef4add8e37a658fe Author: Gustavo A. R. Silva Date: Wed Aug 9 11:29:21 2017 -0500 mtd: nand: sh_flctl: fix error return code in flctl_probe() platform_get_irq() returns an error code, but the sh_flctl driver ignores it and always returns -ENXIO. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Boris Brezillon drivers/mtd/nand/sh_flctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbf5f6424ed92131b2d5bf363a0176d8a9f531ef Author: Pan Bian Date: Tue Aug 8 22:35:42 2017 +0800 mtd: nand: sh_flctl: use dma_mapping_error to check map errors The return value of dma_map_single() should be checked by dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its return value is checked against NULL, which could result in failures. Signed-off-by: Pan Bian Signed-off-by: Boris Brezillon drivers/mtd/nand/sh_flctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 892dd1831392adbdf4e55d0c284c3aea6ba4d855 Author: Sergei Shtylyov Date: Sun Aug 6 00:14:28 2017 +0300 mtd: nand: atmel: fix of_irq_get() error check of_irq_get() may return 0 as well as negative error number on failure, while the driver only checks for the negative values. The driver would then call devm_request_irq() for IRQ0 in its probe method and never get a valid interrupt. Check for 'nc->irq <= 0' instead and return -ENXIO from the driver's probe if of_irq_get() returned 0. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Signed-off-by: Sergei Shtylyov Acked-by: Wenyou Yang Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit fd213b5bae800dc00a2930dcd07f63ab9bbff3f9 Author: Martin Blumenstingl Date: Sat Aug 5 14:16:24 2017 +0200 mtd: nand: hynix: add support for 20nm NAND chips According to the datasheet of the H27UCG8T2BTR the NAND Technology field (6th byte of the "Device Identifier Description", bits 0-2) the following values are possible: - 0x0 = 48nm - 0x1 = 41nm - 0x2 = 32nm - 0x3 = 26nm - 0x4 = 20nm - (all others are reserved) Fix this by extending the mask for this field to allow detecting value 0x4 (20nm) as valid NAND technology. Without this the detection of the ECC requirements fails, because the code assumes that the device is a 48nm device (0x4 & 0x3 = 0x0) and aborts with "Invalid ECC requirements" because it cannot map the "ECC Level". Extending the mask makes the ECC requirement detection code recognize this chip as <= 26nm and sets up the ECC step size and ECC strength correctly. Signed-off-by: Martin Blumenstingl Fixes: 78f3482d7480 ("mtd: nand: hynix: Rework NAND ID decoding to extract more information") Cc: Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_hynix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bff08dffe3115a25ce04b95ea75f6d868572c60 Author: Boris Brezillon Date: Fri Nov 25 11:32:32 2016 +0100 mtd: nand: mxc: Fix mxc_v1 ooblayout Commit a894cf6c5a82 ("mtd: nand: mxc: switch to mtd_ooblayout_ops") introduced a bug in the OOB layout description. Even if the driver claims that 3 ECC bytes are reserved to protect 512 bytes of data, it's actually 5 ECC bytes to protect 512+6 bytes of data (some OOB bytes are also protected using extra ECC bytes). Fix the mxc_v1_ooblayout_{free,ecc}() functions to reflect this behavior. Signed-off-by: Boris Brezillon Fixes: a894cf6c5a82 ("mtd: nand: mxc: switch to mtd_ooblayout_ops") Cc: Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fcf59f1ff525bc6400a893e2a0820afcf815f4c3 Author: Philipp Zabel Date: Wed Jul 19 17:25:46 2017 +0200 mtd: nand: 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: Boris Brezillon Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Cyrille Pitchen Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-mtd@lists.infradead.org Signed-off-by: Philipp Zabel Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 481815a6193bb7a1e43f8babecde5155e65f3858 Author: Arvind Yadav Date: Tue Aug 1 17:10:58 2017 +0530 mtd: st_spi_fsm: Handle clk_prepare_enable/clk_disable_unprepare. - clk_prepare_enable() can fail here and we must check its return value. - stfsm_probe() can fail here and we must disable clock. Signed-off-by: Arvind Yadav Signed-off-by: Boris Brezillon drivers/mtd/devices/st_spi_fsm.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 4d26f012ab591d7671237a6b5e990cbbfd50b0b8 Author: Arvind Yadav Date: Tue Aug 1 17:10:11 2017 +0530 mtd: nand: lpc32xx_mlc: Handle return value of clk_prepare_enable. clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Boris Brezillon drivers/mtd/nand/lpc32xx_mlc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7c94128127ba6ecbaa1e2085088c7337a99aaf51 Author: Arvind Yadav Date: Tue Aug 1 17:08:06 2017 +0530 mtd: nand: lpc32xx_slc: Handle return value of clk_prepare_enable. clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Boris Brezillon drivers/mtd/nand/lpc32xx_slc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 24c9cd8f8d26194aa1a4077c62df90d657766235 Author: Arvind Yadav Date: Tue Aug 1 17:07:27 2017 +0530 mtd: oxnas_nand: Handle clk_prepare_enable/clk_disable_unprepare. - clk_prepare_enable() can fail here and we must check its return value. - oxnas_nand_probe() can fail here and we must disable clock. Signed-off-by: Arvind Yadav Acked-by: Neil Armstrong Signed-off-by: Boris Brezillon drivers/mtd/nand/oxnas_nand.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit c044179ea14db0855edc3d8f82bd998202167368 Author: Arvind Yadav Date: Tue Aug 1 17:05:09 2017 +0530 mtd: nand: denali: Handle return value of clk_prepare_enable. clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Boris Brezillon drivers/mtd/nand/denali_dt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 55bafbc277dcce7aab0ba28563075f3b517e6134 Author: Arnd Bergmann Date: Fri Jul 21 22:38:06 2017 +0200 mtd: orion-nand: fix build error with ARMv4 orion_nand_read_buf uses an inline assembly with the "ldrd" instruction, which is only available from ARMv5 upwards. This used to be fine, since all users have an ARMv5 or ARMv7 CPU, but now we can also build a multiplatform kernel with ARMv4 support enabled in addition to the "kirkwood" (mvebu) platform. This provides an alternative to call the readsl() function that is supposed to have the same effect and is also optimized for performance. I first posted a version of this patch back in 2014, and there was some discussion about it then. This fixes the bugs identified back then and should be a reasonable alternative for the rare corner case. Link: https://patchwork.kernel.org/patch/4144791/ Cc: Jingoo Han Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon drivers/mtd/nand/orion_nand.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1498fbaf700ff100486e864776743a9e14e5169c Author: Gregory CLEMENT Date: Wed Jul 19 17:31:25 2017 +0200 mtd: nand: pxa3xx_nand: enable building on mvebu 64-bit platforms The controller supported by the pxa3xx_nand driver is also available on the mvebu 64-bit SoCs, such as the Armada 7K and Armada 8K SoCs. This patch updates the Kconfig dependency to allow building the kernel for this SoC family too. Signed-off-by: Gregory CLEMENT Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89f5127c4b0dcd847a2a0b5d0be37ca7366af9e5 Author: Abhishek Sahu Date: Wed Jul 19 17:17:58 2017 +0530 mtd: nand: qcom: reorganize nand devices probing The NAND controller can support multiple NAND devices having different page sizes. Future code will require us to allocate memory based on the maximum number of codewords among all the devices. We reorganize the NAND device probing such that the ONFI parameters are first read for each connected device to identify the maximum number of codewords possible, and only then proceed with MTD device registration (i.e, call nand_scan_tail and mtd_device_register). This is a reorganization of the existing code and will not change any functionality. Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 88 +++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 29 deletions(-) commit eb6df28ef63d0ac9d8bb86483d8840fa95da4a8b Author: Abhishek Sahu Date: Wed Jul 19 17:17:57 2017 +0530 mtd: nand: qcom: remove memset for clearing read register buffer The memset in clear_read_regs is overhead. All the register data will be filled by DMA during NAND operation so making these register variables zero is not required. Signed-off-by: Abhishek Sahu Reviewed-by: Archit Taneja Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 2 -- 1 file changed, 2 deletions(-) commit 77cc5364770387380dd5353625986576209de21c Author: Abhishek Sahu Date: Wed Jul 19 17:17:56 2017 +0530 mtd: nand: qcom: reorganize nand page write Each NAND page consist of multiple codewords. Following is sequence for NAND page write according to hardware guide. 1. Program Power-up configuration, page row, page column address and flash configuration registers. 2. Write NAND_FLASH_CMD followed by NANC_EXEC_CMD for each codeword. 3. Read NAND_FLASH_STATUS for each codeword. The step 1 should be done once for each page and step 2,3 should be done for each codeword. Currently, all the 3 steps are being done for each codeword which is wrong. Now this patch reorganizes page write functions to configure page specific register once and per codeword specific registers for each NAND ECC step. Signed-off-by: Abhishek Sahu Reviewed-by: Archit Taneja Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit bde4330aad1b775853431f9abe014a909c945726 Author: Abhishek Sahu Date: Wed Jul 19 17:17:55 2017 +0530 mtd: nand: qcom: reorganize nand page read Each NAND page consist of multiple codewords. Following is sequence for NAND page read according to hardware guide. 1. Program Power-up configuration, page row, page column address and flash configuration registers. 2. Write NAND_FLASH_CMD followed by NANC_EXEC_CMD for each codeword. 3. Read NAND_FLASH_STATUS for each codeword. The step 1 should be done once for each page and step 2,3 should be done for each codeword. Currently, all the 3 steps are being done for each codeword which is wrong. Now this patch reorganizes read page functions to configure page specific register once and per codeword specific registers for each NAND ECC step. Signed-off-by: Abhishek Sahu Reviewed-by: Archit Taneja Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 4d4f2121369d5f2a4180a6b64046c8494817619f Author: Abhishek Sahu Date: Wed Jul 19 17:17:54 2017 +0530 dt-bindings: qcom_nandc: remove chip select compatible string Currently the compatible “qcom,nandcs” is being used for each connected NAND device to support for multiple NAND devices in the same bus. The same thing can be achieved by looking reg property for each sub nodes which contains the chip select number so this patch removes the use of “qcom,nandcs” for specifying NAND device sub nodes. Since there is no user for this driver currently in so changing compatible string is safe. Signed-off-by: Abhishek Sahu Acked-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/qcom_nandc.txt | 2 -- 1 file changed, 2 deletions(-) commit e806423aca5bf52b1e14e83befa9d4bac8c17ee1 Author: Abhishek Sahu Date: Wed Jul 19 17:17:53 2017 +0530 mtd: nand: qcom: remove redundant chip select compatible string Currently the compatible “qcom,nandcs” is being used for each connected NAND device to support for multiple NAND devices in the same bus. The same thing can be achieved by looking reg property for each sub nodes which contains the chip select number so this patch removes the use of “qcom,nandcs” for specifying NAND device sub nodes. Since there is no user for this driver currently in so changing compatible string is safe. Signed-off-by: Abhishek Sahu Reviewed-by: Archit Taneja Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 10777de570016471fd929869c7830a7772893e39 Author: Abhishek Sahu Date: Thu Aug 3 17:56:39 2017 +0200 mtd: nand: qcom: fix config error for BCH The configuration for BCH is not correct in the current driver. The ECC_CFG_ECC_DISABLE bit defines whether to enable or disable the BCH ECC in which 0x1 : BCH_DISABLED 0x0 : BCH_ENABLED But currently host->bch_enabled is being assigned to BCH_DISABLED. Fixes: c76b78d8ec05a ("mtd: nand: Qualcomm NAND controller driver") Cc: stable@vger.kernel.org Signed-off-by: Abhishek Sahu Reviewed-by: Archit Taneja Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b8103ec33e53b73b60551ca7bb8f5350d06d6d Author: Fabio Estevam Date: Mon Jul 17 21:54:08 2017 -0300 mtd: nand: vf610: Remove unneeded pinctrl_pm_select_default_state() pinctrl_pm_select_default_state() is already the default pinctrl state and since pinctrl_pm_select_sleep_state() is not used in this driver, there is no need to explicitly call pinctrl_pm_select_default_state(). Signed-off-by: Fabio Estevam Signed-off-by: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 3 --- 1 file changed, 3 deletions(-) commit 03fba86b63b95cf4377dd6cf8eaca9b225ed4a2d Author: Fabio Estevam Date: Mon Jul 17 21:54:07 2017 -0300 mtd: nand: vf610: 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: Boris Brezillon drivers/mtd/nand/vf610_nfc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5158bd5597e4c0939db3ecefbcbf492c425e611c Author: Jean-Louis Thekekara Date: Thu Jun 29 19:08:30 2017 +0200 mtd: nand: remove hard-coded NAND ids length This commit removes hard-coded '8' used for looping into struct nand_chip.id.data array. NAND_MAX_ID_LEN has been introduced by Artem Bityutskiy in 53552d22bfe1f for defining ids length in nand_flash_ids[] list. This commit unifies ids length in nand base driver. Signed-off-by: Jean-Louis Thekekara Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 4 ++-- include/linux/mtd/nand.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit f84674b82af2c3ea68b9032d1244f364e46cc75d Author: Boris Brezillon Date: Fri Jun 2 12:18:24 2017 +0200 mtd: nand: Fix various memory leaks in core The nand_scan_ident() function is not expected to allocate resources, and people are usually not calling nand_cleanup() if something fails between nand_scan_ident() and nand_scan_tail(). Move all functions that may allocate resource to the nand_scan_tail() path to prevent such resource leaks. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 118 ++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 62 deletions(-) commit 92d499d4905ce79c41a4b9a399ab6b89188f87e9 Author: Dan Carpenter Date: Wed Aug 23 14:20:57 2017 +0300 skd: error pointer dereference in skd_cons_disk() My initial impulse was to check for IS_ERR_OR_NULL() but when I looked at this code a bit more closely, we should only need to check for IS_ERR(). The blk_mq_alloc_tag_set() returns negative error codes and zero on success so we can just do an "if (rc) goto err_out;". It's better to preserve the error code anyhow. The blk_mq_init_queue() returns error pointers on failure, it never returns NULL. We can also remove the "q = NULL;" at the start because that's no longer needed. Fixes: ca33dd92968b ("skd: Convert to blk-mq") Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe drivers/block/skd_main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c0b3dda7ed4d7f08b6a39ff8b35895780a68e384 Author: Dan Carpenter Date: Wed Aug 23 13:44:20 2017 +0300 skd: Uninitialized variable in skd_isr_completion_posted() Someone got too agressive about removing initializations and accidentally removed the "rc = 0;" which is required. Fixes: c830da8cbc7b ("skd: Remove superfluous initializations from skd_isr_completion_posted()") Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe drivers/block/skd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bd46d703e0892c6519132c012910982e3e65535 Author: Kuninori Morimoto Date: Thu Aug 10 04:36:43 2017 +0000 drm/sun4i: use of_graph_get_remote_endpoint() Now, we can use of_graph_get_remote_endpoint(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff2dcc058946c48afd3f2c8cd9e3a880b466c5b Author: Joerg Roedel Date: Wed Aug 23 16:28:09 2017 +0200 iommu/pamu: Fix PAMU boot crash Commit 68a17f0be6fe introduced an initialization order problem, where devices are linked against an iommu which is not yet initialized. Fix it by initializing the iommu-device before the iommu-ops are registered against the bus. Reported-by: Michael Ellerman Fixes: 68a17f0be6fe ('iommu/pamu: Add support for generic iommu-device') Signed-off-by: Joerg Roedel drivers/iommu/fsl_pamu.c | 17 ----------------- drivers/iommu/fsl_pamu.h | 3 --- drivers/iommu/fsl_pamu_domain.c | 17 ++++++++++++++++- drivers/iommu/fsl_pamu_domain.h | 2 -- 4 files changed, 16 insertions(+), 23 deletions(-) commit faa119099e4942152fd2ff823ae9961ad00db475 Author: Bhumika Goyal Date: Wed Aug 23 17:58:42 2017 +0530 ALSA: ctxfi: make hw structures const Make these const as they are only used in a copy operation. Done using Coccinelle: @match disable optional_qualifier@ identifier s; @@ static struct hw 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 hw s; Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/pci/ctxfi/cthw20k1.c | 2 +- sound/pci/ctxfi/cthw20k2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 668d06165c4a7d5bbb29fadd3e1b2d610b73c456 Author: Arvind Yadav Date: Wed Aug 23 17:39:28 2017 +0530 ALSA: intel8x0: constify ac97_pcm structures ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/pci/intel8x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9715f0bdb61e98652a1c84408f2bc059d01ce85b Author: Arvind Yadav Date: Wed Aug 23 17:39:27 2017 +0530 ALSA: atiixp: constify ac97_pcm structures ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/pci/atiixp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ca8590be8e784d7b2c806f2bb7dcc2b492fdea5 Author: Arvind Yadav Date: Wed Aug 23 17:39:26 2017 +0530 ALSA: ac97c: constify ac97_pcm structures ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/atmel/ac97c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b419cd41b592f44127aeead34d5df24dff800f0 Author: Arvind Yadav Date: Wed Aug 23 17:39:25 2017 +0530 ALSA: aaci: constify ac97_pcm structures ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai sound/arm/aaci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af43173c80e424e2e5bc964c9d6a01cdaece8291 Author: Markus Elfring Date: Wed Aug 23 14:45:20 2017 +0200 ALSA: fireface: Use common error handling code in pcm_open() 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 Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-pcm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d1d0d5ffb3006eaf9b5f41c89fe801e032cbbfe4 Author: Nicholas Piggin Date: Sat Aug 12 02:39:07 2017 +1000 powerpc/64: Optimise set/clear of CTRL[RUN] (runlatch) On modern CPUs the CTRL register is read-only except bit 63 which is the run latch control. This means it can be updated with a mtspr rather than mfspr/mtspr. To accomodate older CPUs (Cell at least), where there are other bits in the register, we still do a read/modify/write on pre 2.06 CPUs. Signed-off-by: Nicholas Piggin [mpe: Update change log to mention 2.06 workaround] Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit c5a94a618e7ac86b20f53d947f68d7cee6a4c6bc Author: Peter Zijlstra Date: Wed Aug 23 13:58:44 2017 +0200 workqueue: Use TASK_IDLE Workqueues don't use signals, it (ab)uses TASK_INTERRUPTIBLE to avoid increasing the loadavg numbers. We've 'recently' introduced TASK_IDLE for this case: 80ed87c8a9ca ("sched/wait: Introduce TASK_NOLOAD and TASK_IDLE") use it. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b76a1f5ed9c7233cfdd35b6f77310ccec293921 Author: Nicholas Piggin Date: Sat Aug 12 02:39:06 2017 +1000 powerpc/64s: Remove spurious IRQ reason in IRQ replay HVI interrupts have always used 0x500, so remove the dead branch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 2 -- 1 file changed, 2 deletions(-) commit ccd5eb837c4dc4012023b723e84a6531b5c4bbac Author: Nicholas Piggin Date: Sat Aug 12 02:39:05 2017 +1000 powerpc/64: Remove redundant instruction in interrupt replay Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 1 - 1 file changed, 1 deletion(-) commit e6c1203d5ce9b3bd36a7951bc7f075b8db4ba971 Author: Nicholas Piggin Date: Sat Aug 12 02:39:04 2017 +1000 powerpc/64s: Use the HV handler for external IRQ replay in HV mode on POWER9 POWER9 host external interrupts use the h_virt_irq_common handler, so use that to replay them rather than using the hardware_interrupt_common handler. Both call do_IRQ, but using the correct handler reduces i-cache footprint. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 ++++ 1 file changed, 4 insertions(+) commit d6f73fc69bf5837ad0d028d2a40f912921ed839f Author: Nicholas Piggin Date: Sat Aug 12 02:39:03 2017 +1000 powerpc/64s: Merge HV and non-HV paths for doorbell IRQ replay This results in smaller code, and fewer branches. This relies on the fact that both the 0xe80 and 0xa00 handlers call the same upper level code, namely doorbell_exception(). Signed-off-by: Nicholas Piggin [mpe: Mention we rely on the implementation of the 0xe80/0xa00 handlers] Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 6 +----- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/irq.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) commit 6f881eaeb552ad27b7e8210919c19b7be3d88d9d Author: Nicholas Piggin Date: Sat Aug 12 02:39:02 2017 +1000 powerpc/64: Cleanup __check_irq_replay() Move the clearing of irq_happened bits into the condition where they were found to be set. This reduces instruction count slightly, and reduces stores into irq_happened. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit c05f0be888225f7228f81825730da3c9ba2088cb Author: Nicholas Piggin Date: Sat Aug 12 02:39:01 2017 +1000 powerpc/64s: masked_interrupt() returns to kernel so avoid restoring r13 Places in the kernel where r13 is not the PACA pointer must have maskable interrupts disabled, so r13 does not have to be restored when returning from a soft-masked interrupt. We should never have interrupts soft disabled when we're in user space. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e9a2f6ebac457dd81c531473c1364514907e5a7 Author: Nicholas Piggin Date: Sat Aug 12 02:39:00 2017 +1000 powerpc/64s: Optimise clearing of MSR_EE in masked_[H]interrupt() MSR_EE is always enabled in SRR1 for masked interrupts, so we can use xor to clear it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e0c827c09c0d04d77616a4506a71b3d5b0cf07e8 Author: Nicholas Piggin Date: Sat Aug 12 02:38:59 2017 +1000 powerpc/64s: Avoid a branch in masked_[H]interrupt() Interrupts which do not require EE to be cleared can all be tested with a single bitwise test. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3a2df3798d4da2fc40052c25f0d9c687b1467d53 Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:28:03 2017 +1000 powerpc/mm: Make switch_mm_irqs_off() out of line It's too big to be inline, there is no reason to keep it that way. Signed-off-by: Benjamin Herrenschmidt [mpe: Rework to incorporate the comment changes via fixes branch] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 89 +----------------------------- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/mmu_context.c | 99 ++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 88 deletions(-) commit a619e59c075c66e530a88e57b45bb0417e2f4fff Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:28:02 2017 +1000 powerpc/mm: Optimize detection of thread local mm's Instead of comparing the whole CPU mask every time, let's keep a counter of how many bits are set in the mask. Thus testing for a local mm only requires testing if that counter is 1 and the current CPU bit is set in the mask. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 3 +++ arch/powerpc/include/asm/mmu_context.h | 9 +++++++++ arch/powerpc/include/asm/tlb.h | 11 ++++++++++- arch/powerpc/mm/mmu_context_book3s64.c | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) commit b426e4bd77fa2f03723cc0bada80b00c664f67da Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:28:01 2017 +1000 powerpc/mm: Use mm_is_thread_local() instread of open-coding We open-code testing for the mm being local to the current CPU in a few places. Use our existing helper instead. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 6 ++---- arch/powerpc/mm/hugetlbpage.c | 3 +-- arch/powerpc/mm/pgtable-hash64.c | 4 +--- arch/powerpc/mm/tlb_hash64.c | 7 ++----- 4 files changed, 6 insertions(+), 14 deletions(-) commit 058ccc3465d9b8fb34d59ca099a8a7ace1a62cdd Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:27:59 2017 +1000 powerpc/mm: Avoid double irq save/restore in activate_mm It calls switch_mm() which already does the irq save/restore these days. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 4 ---- 1 file changed, 4 deletions(-) commit 43ed84a891b70165a621a5c92196949efd57be39 Author: Benjamin Herrenschmidt Date: Mon Jul 24 14:27:58 2017 +1000 powerpc/mm: Move pgdir setting into a helper Makes switch_mm_irqs_off() a bit more readable Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 3e23a12bcaf18b3587088807722cd25b562d7731 Author: Michael Ellerman Date: Tue Aug 22 11:51:37 2017 +1000 powerpc/64s: Fix replay interrupt return label name In __replay_interrupt() we take the address of a local label so we can return to it later. However the assembler turns the local label into a symbol with a name like ".L1^B42" - where "^B" is literally "\002". This does not make for pleasant stack traces. Fix it by giving the label a sensible name. Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 215ee763f8cb9a2912d411f96f6f67a35d644c6b Author: Rob Herring Date: Mon Aug 21 10:16:49 2017 -0500 powerpc: pseries: remove dlpar_attach_node dependency on full path In preparation to stop storing the full node path in full_name, remove the dependency on full_name from dlpar_attach_node(). Callers of dlpar_attach_node() already have the parent device_node, so just pass the parent node into dlpar_attach_node instead of the path. This avoids doing a lookup of the parent node by the path. Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 6 ++---- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- arch/powerpc/platforms/pseries/mobility.c | 2 +- arch/powerpc/platforms/pseries/pseries.h | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) commit b7c670d673d1186e9a6aafaad36aace34046bb6b Author: Rob Herring Date: Mon Aug 21 10:16:47 2017 -0500 powerpc: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Anatolij Gustschin Cc: Scott Wood Cc: Kumar Gala Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Tyrel Datwyler Signed-off-by: Michael Ellerman arch/powerpc/kernel/btext.c | 2 +- arch/powerpc/kernel/cacheinfo.c | 34 ++++--- arch/powerpc/kernel/io-workarounds.c | 4 +- arch/powerpc/kernel/isa-bridge.c | 32 +++---- arch/powerpc/kernel/legacy_serial.c | 12 +-- arch/powerpc/kernel/of_platform.c | 2 +- arch/powerpc/kernel/pci-common.c | 15 ++- arch/powerpc/kernel/pci_32.c | 4 +- arch/powerpc/kernel/pci_64.c | 4 +- arch/powerpc/kernel/pci_of_scan.c | 24 ++--- arch/powerpc/kernel/setup-common.c | 2 +- arch/powerpc/platforms/4xx/cpm.c | 8 +- arch/powerpc/platforms/4xx/gpio.c | 3 +- arch/powerpc/platforms/4xx/msi.c | 3 +- arch/powerpc/platforms/4xx/pci.c | 116 ++++++++++------------- arch/powerpc/platforms/4xx/soc.c | 5 +- arch/powerpc/platforms/4xx/uic.c | 14 +-- arch/powerpc/platforms/512x/mpc512x_shared.c | 12 +-- arch/powerpc/platforms/52xx/efika.c | 8 +- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 +- arch/powerpc/platforms/52xx/mpc52xx_pci.c | 8 +- arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 3 +- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- arch/powerpc/platforms/85xx/p1022_ds.c | 8 +- arch/powerpc/platforms/85xx/xes_mpc85xx.c | 4 +- arch/powerpc/platforms/amigaone/setup.c | 6 +- arch/powerpc/platforms/cell/axon_msi.c | 36 +++---- arch/powerpc/platforms/cell/interrupt.c | 4 +- arch/powerpc/platforms/cell/iommu.c | 24 ++--- arch/powerpc/platforms/cell/ras.c | 4 +- arch/powerpc/platforms/cell/spider-pci.c | 4 +- arch/powerpc/platforms/cell/spider-pic.c | 4 +- arch/powerpc/platforms/cell/spu_manage.c | 26 ++--- arch/powerpc/platforms/chrp/pci.c | 18 ++-- arch/powerpc/platforms/embedded6xx/linkstation.c | 6 +- arch/powerpc/platforms/embedded6xx/mvme5100.c | 2 +- arch/powerpc/platforms/embedded6xx/storcenter.c | 2 +- arch/powerpc/platforms/maple/pci.c | 10 +- arch/powerpc/platforms/pasemi/pci.c | 2 +- arch/powerpc/platforms/powermac/feature.c | 14 +-- arch/powerpc/platforms/powermac/low_i2c.c | 50 +++++----- arch/powerpc/platforms/powermac/pci.c | 6 +- arch/powerpc/platforms/powermac/pfunc_base.c | 24 ++--- arch/powerpc/platforms/powermac/pfunc_core.c | 6 +- arch/powerpc/platforms/powermac/pic.c | 8 +- arch/powerpc/platforms/powermac/setup.c | 2 +- arch/powerpc/platforms/powernv/opal-async.c | 4 +- arch/powerpc/platforms/powernv/opal-xscom.c | 8 +- arch/powerpc/platforms/powernv/pci-ioda.c | 15 ++- arch/powerpc/platforms/powernv/rng.c | 6 +- arch/powerpc/platforms/pseries/dlpar.c | 3 +- arch/powerpc/platforms/pseries/event_sources.c | 6 +- arch/powerpc/platforms/pseries/hotplug-cpu.c | 4 +- arch/powerpc/platforms/pseries/ibmebus.c | 5 +- arch/powerpc/platforms/pseries/iommu.c | 58 ++++++------ arch/powerpc/platforms/pseries/msi.c | 12 +-- arch/powerpc/platforms/pseries/pci_dlpar.c | 2 +- arch/powerpc/platforms/pseries/vio.c | 6 +- arch/powerpc/sysdev/axonram.c | 4 +- arch/powerpc/sysdev/dcr.c | 4 +- arch/powerpc/sysdev/fsl_85xx_cache_sram.c | 12 +-- arch/powerpc/sysdev/fsl_gtm.c | 14 +-- arch/powerpc/sysdev/fsl_msi.c | 16 ++-- arch/powerpc/sysdev/fsl_pci.c | 47 +++++---- arch/powerpc/sysdev/fsl_rio.c | 36 +++---- arch/powerpc/sysdev/fsl_rmu.c | 12 +-- arch/powerpc/sysdev/mpic.c | 4 +- arch/powerpc/sysdev/mpic_msgr.c | 2 +- arch/powerpc/sysdev/mpic_msi.c | 2 +- arch/powerpc/sysdev/mpic_timer.c | 19 ++-- arch/powerpc/sysdev/msi_bitmap.c | 4 +- arch/powerpc/sysdev/mv64x60_dev.c | 20 ++-- arch/powerpc/sysdev/mv64x60_pci.c | 4 +- arch/powerpc/sysdev/of_rtc.c | 12 +-- arch/powerpc/sysdev/scom.c | 5 +- arch/powerpc/sysdev/simple_gpio.c | 3 +- arch/powerpc/sysdev/tsi108_pci.c | 4 +- arch/powerpc/sysdev/xive/native.c | 2 +- 79 files changed, 461 insertions(+), 487 deletions(-) commit bcf21e3a97a1247178338793df9ae332a036e22b Author: Michael Ellerman Date: Tue Aug 22 15:14:50 2017 +1000 powerpc/vio: Use device_type to detect family Currently in the vio.c code we use a comparision against the parent device node's full path to decide if the device is a PFO or VIO family device. Both the ibm,platform-facilities and vdevice nodes are defined by PAPR, and must have a matching device_type. So instead of using the path we can instead compare the device_type. I've checked Qemu and kvmtool both do this correctly, and all the PowerVM systems I have access to do also. So it seems to be safe. This removes the dependency on full_name, which is being removed upstream. Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/vio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15c659ff9d5b367c886166a9854a89b72c524a68 Merge: 516fa8d 1a92a80 Author: Michael Ellerman Date: Wed Aug 23 22:20:10 2017 +1000 Merge branch 'fixes' into next There's a non-trivial dependency between some commits we want to put in next and the KVM prefetch work around that went into fixes. So merge fixes into next. commit 41b0dbfac0da515ad62edf9256414c56ee217364 Author: Dou Liyang Date: Thu Aug 17 14:50:13 2017 +0200 s390/topology: Remove the unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node(). The parent_node() macro in S390 platform is unnecessary. Remove it for cleanup. Reported-by: Michael Ellerman Signed-off-by: Dou Liyang Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/topology.h | 6 ------ 1 file changed, 6 deletions(-) commit 7bf76f0169538279b78536393639859eeb7d93f1 Author: Jan Höppner Date: Tue Aug 15 16:40:18 2017 +0200 s390/dasd: Change unsigned long long to unsigned long Unsigned long long and unsigned long were different in size for 31-bit. For 64-bit the size for both datatypes is 8 Bytes and since the support for 31-bit is long gone we can clean up a little and change everything to unsigned long. Change get_phys_clock() along the way to accept unsigned long as well so that the DASD code can be consistent. Acked-by: Heiko Carstens Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/timex.h | 2 +- arch/s390/kernel/time.c | 2 +- drivers/s390/block/dasd.c | 2 +- drivers/s390/block/dasd_3990_erp.c | 2 +- drivers/s390/block/dasd_diag.c | 2 +- drivers/s390/block/dasd_eckd.c | 8 ++------ drivers/s390/block/dasd_eckd.h | 2 +- drivers/s390/block/dasd_erp.c | 2 +- drivers/s390/block/dasd_int.h | 12 ++++++------ drivers/s390/block/dasd_proc.c | 2 +- 10 files changed, 16 insertions(+), 20 deletions(-) commit e1108e8f0d4b56f1310539fcb695f91f25302704 Author: Heiko Carstens Date: Mon Aug 14 07:54:32 2017 +0200 s390/smp: convert cpuhp_setup_state() return code to zero on success cpuhp_setup_state() returns a state number on CPUHP_AP_ONLINE_DYN if no error occurred. Therefore convert the return code to zero before using it as exit code for s390_smp_init(). Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) commit 673cfddf6e05749c8bdf044140415fcefd5e9546 Author: Heiko Carstens Date: Fri Aug 11 15:54:16 2017 +0200 s390: fix 'novx' early parameter handling Specifying the 'novx' kernel parameter always results in a warning: Malformed early option 'novx' The reason for this is that the novx early parameter handling function always returns a non-zero value which means that an error occurred. Fix this and return the correct zero value instead. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2907225cf9621140664209037bbce5107e02c91 Author: Stefan Haberland Date: Fri Jul 14 10:33:18 2017 +0200 s390/dasd: add average request times to dasd statistics Add average times to the DASD statistics interface. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 34 ++++++++++++++++++++++++++++++---- drivers/s390/block/dasd_int.h | 4 ++++ 2 files changed, 34 insertions(+), 4 deletions(-) commit c26d8389be4dab2bb5a8ac16211a9966bf67091a Author: Pierre-Louis Bossart Date: Tue Aug 22 15:32:37 2017 -0500 ASoC: codecs: rt5670: add jack detection quirk for Dell Venue 5585 Jack is not detected by default, using jdmode=3 works fine Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cb0236eca79c8ceb5cdb8d2a15ce272e754d2921 Author: Pierre-Louis Bossart Date: Tue Aug 22 15:32:35 2017 -0500 ASoC: codecs: rt5645: add quirks for Asus T100HA Fix jack detection and dmic setup Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7b992c24de78a206b3abd07192686d2d5db5012c Author: Subhransu S. Prusty Date: Tue Aug 22 16:45:53 2017 +0530 ASoC: Intel: Skylake: Fix DSP core ref count for init failure During dsp init failure, the ref count is not incremented and dsp is powered down. But as the skl driver calls put_core for the init failure it decrements the dsp core ref count and ref count becomes unbalanced. This results in dsp core powered up in further runtime suspend/resume cycles and never powered down. So increment the ref count before dsp core powerup and for any failure, decrement in put_core will be balanced. Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c360e0c3ab8ef8d0fd6b5501a407b9a2be4f204d Author: Subhransu S. Prusty Date: Tue Aug 22 16:45:52 2017 +0530 ASoC: Intel: Skylake: Fix to free correct dev id in free_irq The dev_id passed by the driver in request_threaded_irq is an ebus pointer, whereas to free_irq it is hdac_bus. Fix by passing correct dev_id to free_irq. Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f77d443c4c299aff5ad9c74811dd063f4d8bebcf Author: Subhransu S. Prusty Date: Tue Aug 22 16:45:51 2017 +0530 ASoC: Intel: Skylake: Fix to free resources for dsp_init failure unmap mmio and free memory resources if dsp_init fails. Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 3b3011adada3bba47c56c205634e1b32512e0c7c Author: Subhransu S. Prusty Date: Tue Aug 22 16:45:50 2017 +0530 ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failure For some dsp init error path, irq and few more resources are not freed. This results in oops. So, fix it by freeing up the resources on ipc_init failure. Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 4 +++- sound/soc/intel/skylake/cnl-sst.c | 4 +++- sound/soc/intel/skylake/skl-sst.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) commit 731209cc041779faac963578d901cb1caacbd738 Author: Markus Elfring Date: Wed Aug 23 12:20:07 2017 +0200 ALSA: usb-midi: Use common error handling code in __snd_usbmidi_create() Add jump targets 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 Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/usb/midi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0995fb7c9802dd76422db384991f32296f8fbe1f Author: Kuninori Morimoto Date: Tue Aug 22 04:57:12 2017 +0000 ASoC: audio-graph-scu-card: Add pm callbacks to platform driver Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM operations are going to happen. This is needed to get suspend/resume working correctly when the audio is using audio-graph-scu-card. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-scu-card.c | 1 + 1 file changed, 1 insertion(+) commit 7b828a35ff834e45e5758a8a3f9d11db0526f9e1 Author: Kuninori Morimoto Date: Tue Aug 22 04:56:44 2017 +0000 ASoC: audio-graph-card: Add pm callbacks to platform driver Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM operations are going to happen. This is needed to get suspend/resume working correctly when the audio is using audio-graph-card. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 1 + 1 file changed, 1 insertion(+) commit b4e0180306f10a9d808b855dd77cdd0d7ae4f3fa Author: Kuninori Morimoto Date: Tue Aug 22 04:56:06 2017 +0000 ASoC: simple-scu-card: Add pm callbacks to platform driver Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM operations are going to happen. This is needed to get suspend/resume working correctly when the audio is using simple-scu-card. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 1 + 1 file changed, 1 insertion(+) commit 6cbcad079ecdb8ecd214d33688fd7f19167fe57a Author: Kuninori Morimoto Date: Wed Aug 23 05:11:44 2017 +0000 ASoC: wm8524: remove unnecessary snd_soc_unregister_platform() wm8524 doesn't register platform, unregister platform is not needed Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8524.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit adcdb94e3180f6b9ffa16c3def6095b5cf41e06d Author: Marc Zyngier Date: Mon Dec 19 19:18:13 2016 +0000 irqchip/gic-v3-its: Generalize LPI configuration We're are going to need to change a bit more than just the enable bit in the LPI property table in the future. So let's change the LPI configuration funtion to take a set of bits to be cleared, and a set of bits to be set. This way, we'll be able to use it when a guest updates an LPI property (priority, for example). Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 70cc81edc08d2ae42414d609dac87e7db8da456d Author: Marc Zyngier Date: Mon Dec 19 18:53:02 2016 +0000 irqchip/gic-v3-its: Generalize device table allocation As we want to use 2-level tables for VCPUs, let's hack the device table allocator in order to make it slightly more generic. It will get reused in subsequent patches. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit cf2be8ba6f264b75eb30ebfe74899e3462669a75 Author: Marc Zyngier Date: Mon Dec 19 18:49:59 2016 +0000 irqchip/gic-v3-its: Rework LPI freeing Rework LPI deallocation so that it can be reused by the v4 support code. Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 7c297a2d5c08cec6444175594a09ccc2035dcc68 Author: Marc Zyngier Date: Mon Dec 19 18:34:38 2016 +0000 irqchip/gic-v3-its: Split out pending table allocation Just as for the property table, let's move the pending table allocation to a separate function. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 4cacac5744d57f321ae17cb15456ec97d775860e Author: Marc Zyngier Date: Mon Dec 19 18:18:34 2016 +0000 irqchip/gic-v3-its: Allow use of indirect VCPU tables The VCPU tables can be quite sparse as well, and it makes sense to use indirect tables as well if possible. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 0e5ccf91e02d3b47ab6a3f5588679f1032370099 Author: Marc Zyngier Date: Mon Dec 19 18:15:05 2016 +0000 irqchip/gic-v3-its: Split out property table allocation Move the LPI property table allocation into its own function, as this is going to be required for those associated with VMs in the future. Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 8d85dcedc4663f7cee840fbdd27f0204e3989ea2 Author: Marc Zyngier Date: Mon Dec 19 18:02:13 2016 +0000 irqchip/gic-v3-its: Implement irq_set_irqchip_state for pending state Allow the pending state of an LPI to be set or cleared via irq_set_irqchip_state. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit e4f9094b54882fa404cfd33609fc5c62b0964082 Author: Marc Zyngier Date: Mon Dec 19 17:56:32 2016 +0000 irqchip/gic-v3-its: Macro-ize its_send_single_command Most ITS commands do operate on a collection object, and require a SYNC command to be performed on that collection in order to guarantee the execution of the first command. With GICv4 ITS, another set of commands perform similar operations on a VPE object, and a VSYNC operations must be executed to guarantee their execution. Given the similarities (post a command, perform a synchronization operation on a sync object), it makes sense to reuse the same mechanism for both class of commands. Let's start with turning its_send_single_command into a huge macro that performs the bulk of the work, and a set of helpers that make this macro usable for the GICv3 ITS commands. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 84 ++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 37 deletions(-) commit 3dfa576bfb453482314b596931a59a4951428058 Author: Marc Zyngier Date: Mon Dec 19 17:25:54 2016 +0000 irqchip/gic-v3-its: Add probing for VLPI properties Add the probing code for the ITS VLPI support. This includes configuring the ITS number if not supporting the single VMOVP command feature. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 71 +++++++++++++++++++++++++++++++++++--- include/linux/irqchip/arm-gic-v3.h | 5 +++ 2 files changed, 72 insertions(+), 4 deletions(-) commit a13b040408bbe6d9fe42c405bbdc48a074a3d299 Author: Marc Zyngier Date: Mon Dec 19 17:15:24 2016 +0000 irqchip/gic-v3-its: Move LPI definitions around The various LPI definitions are in the middle of the code, and would be better placed at the beginning, given that we're going to use some of them much earlier. Reviewed-by: Thomas Gleixner Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 0edc23ea2692fe75e941ec00867e661eb15f67fa Author: Marc Zyngier Date: Mon Dec 19 17:01:52 2016 +0000 irqchip/gic-v3: Add VLPI/DirectLPI discovery Add helper functions that probe for VLPI and DirectLPI properties. Reviewed-by: Eric Auger Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 24 +++++++++++++++++++++++- include/linux/irqchip/arm-gic-v3.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 0d94ded2689dd836f12ba1c64520377549facbde Author: Marc Zyngier Date: Mon Dec 19 17:00:38 2016 +0000 irqchip/gic-v3: Add redistributor iterator In order to discover the VLPI properties, we need to iterate over the redistributor regions. As we already have code that does this, let's factor it out and make it slightly more generic. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 69 ++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 22 deletions(-) commit 0abce64a55ae44d39b92f8e672736f4f324e610f Author: Marc Zyngier Date: Fri Jun 23 21:42:57 2017 +0100 genirq: Let irq_set_vcpu_affinity() iterate over hierarchy When assigning an interrupt to a vcpu, it is not unlikely that the level of the hierarchy implementing irq_set_vcpu_affinity is not the top level (think a generic MSI domain on top of a virtualization aware interrupt controller). In such a case, let's iterate over the hierarchy until we find an irqchip implementing it. Reviewed-by: Thomas Gleixner Signed-off-by: Marc Zyngier kernel/irq/manage.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 9261b43e70b79106deca8f734a5217134ce68f3d Author: Thierry Reding Date: Wed Aug 23 11:25:09 2017 +0200 soc/tegra: fuse: Add missing semi-colon Commit 8a46828e623c ("soc/tegra: Register SoC device") added a new initcall, but forgot to terminate the line with a semi-colon. Some recent versions of GCC seem to report this as an error. Fixes: 8a46828e623c ("soc/tegra: Register SoC device") Reported-by: Arnd Bergmann Signed-off-by: Thierry Reding Signed-off-by: Arnd Bergmann drivers/soc/tegra/fuse/fuse-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 226cff485c803ac0f3a6bc52b9b638eb2c41181c Author: Thierry Reding Date: Wed Aug 23 11:25:08 2017 +0200 soc/tegra: Restrict SoC device registration to Tegra Commit 8a46828e623c ("soc/tegra: Register SoC device") added an initcall to register the SoC device on Tegra. However, that code is unrestricted and will run on all platforms, causing unwanted warnings. Fix this by first checking that we're running on hardware that supports the fuses block that we use to provide SoC information. Fixes: 8a46828e623c ("soc/tegra: Register SoC device") Reported-by: Sudeep Holla Tested-by: Sudeep Holla Signed-off-by: Thierry Reding Signed-off-by: Arnd Bergmann drivers/soc/tegra/fuse/fuse-tegra.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f3f7df7635bd5fb6dbc8de150613d327a3bd6171 Author: Takashi Iwai Date: Wed Aug 23 08:03:43 2017 +0200 ASoC: tegra: Fix unused variable warning Fixes: 2a8bd83af30e ("ASoC: tegra: Remove superfluous snd_soc_jack_free_gpios() call") Reported-by: Stephen Rothwell Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8903.c | 1 - 1 file changed, 1 deletion(-) commit fc5cc9678e130196012c17b37e555d53d3d3476b Author: Tomi Valkeinen Date: Wed Aug 23 12:19:02 2017 +0300 drm/omap: work-around for omap3 display enable Seems that on omap3 enabling a crtc without any planes causes a sync lost flood. This only happens on the first enable, and after that it works. This looks like an HW issue and it's unclear why this is happening or how to fix it. This started happening after 897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9 ("drm/omapdrm: Move commit_modeset_enables() before commit_planes()") which, as a work-around, changed omapdrm first to do the modeset enable, and plane set only after that. This WA should be fine on all DSS versions, but apparently OMAP3 DSS is an exception. This patch reverts that work-around for OMAP3 DSS. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 47 ++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 0c43f1e02598d304d4cfb06187305445c8207675 Author: Tomi Valkeinen Date: Tue Jun 13 12:02:10 2017 +0300 drm/omap: fix i886 work-around 7d267f068a8b4944d52e8b0ae4c8fcc1c1c5c5ba ("drm/omap: work-around for errata i886") changed how the PLL dividers and multipliers are calculated. While the new way should work fine for all the PLLs, it breaks omap5 PLLs. The issues seen are rather odd: seemed that the output clock rate is half of what we asked. It is unclear what's causing there issues. As a work-around this patch adds a "errata_i886" flag, which is set only for DRA7's PLLs, and the PLL setup is done according to that flag. Signed-off-by: Tomi Valkeinen Tested-by: H. Nikolaus Schaller drivers/gpu/drm/omapdrm/dss/dss.h | 3 +++ drivers/gpu/drm/omapdrm/dss/pll.c | 29 ++++++++++++++++++++--------- drivers/gpu/drm/omapdrm/dss/video-pll.c | 2 ++ 3 files changed, 25 insertions(+), 9 deletions(-) commit beea6214d1cc5bb08ce25ffe06b57fb948445bed Author: Tomi Valkeinen Date: Tue Jun 13 12:02:09 2017 +0300 drm/omap: fix analog tv-out modecheck omapdrm rejects all venc (analog tv-out) videomodes, due to somewhat strict checking of the values, making tv-out unusable. We only support two videomodes, one for PAL and one for NTSC, so instead of trying to check every field in the videomode struct, this patch makes the driver check only the pixel clock and the size of the display. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/venc.c | 65 ++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 14 deletions(-) commit e81f54c668d89e50bad38f3fc4c5ea6e4be3a96e Author: Rob Herring Date: Tue Jul 18 16:43:10 2017 -0500 irqchip: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Lee Jones Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Sylvain Lemieux Cc: Maxime Coquelin Cc: Chen-Yu Tsai Cc: Thierry Reding Cc: Jonathan Hunter Cc: Michal Simek Cc: "Sören Brinkmann" Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-tegra@vger.kernel.org Acked-by: Eric Anholt Acked-by: Baruch Siach Acked-by: Vladimir Zapolskiy Acked-by: Matthias Brugger Acked-by: Alexandre Torgue Acked-by: Maxime Ripard Signed-off-by: Rob Herring Signed-off-by: Marc Zyngier drivers/irqchip/irq-bcm2835.c | 9 ++++----- drivers/irqchip/irq-bcm2836.c | 5 ++--- drivers/irqchip/irq-crossbar.c | 6 +++--- drivers/irqchip/irq-digicolor.c | 8 ++++---- drivers/irqchip/irq-dw-apb-ictl.c | 12 ++++++------ drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 +- drivers/irqchip/irq-gic-v3-its.c | 6 +++--- drivers/irqchip/irq-gic-v3.c | 11 ++++------- drivers/irqchip/irq-imx-gpcv2.c | 4 ++-- drivers/irqchip/irq-lpc32xx.c | 2 +- drivers/irqchip/irq-mtk-sysirq.c | 3 +-- drivers/irqchip/irq-mxs.c | 4 ++-- drivers/irqchip/irq-stm32-exti.c | 8 ++++---- drivers/irqchip/irq-sun4i.c | 6 +++--- drivers/irqchip/irq-tegra.c | 16 ++++++++-------- drivers/irqchip/irq-xilinx-intc.c | 4 ++-- 16 files changed, 50 insertions(+), 56 deletions(-) commit 5ed34d3a4387c8967801688f66b90ce0c7facda0 Author: Masahiro Yamada Date: Wed Aug 23 10:31:47 2017 +0900 irqchip: Add UniPhier AIDET irqchip driver UniPhier SoCs contain AIDET (ARM Interrupt Detector). This is intended to provide additional features that are not covered by GIC. The main purpose is to provide logic inverter to support low level and falling edge trigger types for interrupt lines from on-board devices. Acked-by: Rob Herring Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier .../socionext,uniphier-aidet.txt | 32 +++ MAINTAINERS | 1 + drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-uniphier-aidet.c | 261 +++++++++++++++++++++ 5 files changed, 303 insertions(+) commit 1ae0e4ce554fb57dc4d5e1eb8e6d302e3f18b0b4 Author: Markus Elfring Date: Wed Aug 23 09:30:41 2017 +0200 ALSA: timer: Use common error handling code in alsa_timer_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: Takashi Iwai sound/core/timer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit dd1f7ab8a88ddc8fbb304aaca25f549e26fa8529 Author: Markus Elfring Date: Wed Aug 23 09:45:06 2017 +0200 ALSA: timer: Adjust a condition check in snd_timer_resolution() 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: Takashi Iwai sound/core/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8da9be4a75f1f63024a16b976c5be47405c13dc Author: Markus Elfring Date: Wed Aug 23 09:20:29 2017 +0200 ALSA: pcm: Adjust nine 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: Takashi Iwai sound/core/pcm.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 97d15a141f84a02d40d2ee442df5c6bd2f62b3d8 Author: Markus Elfring Date: Wed Aug 23 08:40:37 2017 +0200 ALSA: pcm: Use common error handling code in _snd_pcm_new() 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: Takashi Iwai sound/core/pcm.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 1253baaafff03c695e49d6c63956f4ccf12dc0c8 Author: Masahiro Yamada Date: Wed Aug 23 02:33:55 2017 +0900 gpio: twl6040: remove unneeded forward declaration There is no reference to twl6040gpo_chip before its definition. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/gpio/gpio-twl6040.c | 2 -- 1 file changed, 2 deletions(-) commit adfaf18334cbf16c563e4ebc67e968ea1b17ec51 Author: raymond pang Date: Tue Aug 22 23:44:47 2017 +0800 x86/ioapic: Print the IRTE's index field correctly when enabling INTR When enabling interrupt remap, IOAPIC's RTE contains the interrupt_index field of IRTE. This field is composed of the ->index and the ->index2 members of 'struct IR_IO_APIC_route_entry' - but what we print out currently only uses ->index. Fix it. Signed-off-by: Raymond Pang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: joro@8bytes.org Cc: linux-arch@vger.kernel.org Link: http://lkml.kernel.org/r/CAHG4imNDzpDyOVi7MByVrLQ%3DQFuOVqpzJ5F-Xs5z6OZphubj-Q@mail.gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60fd9f72ce8a353f6371101c788e4d86212b16d7 Author: Klaus Goger Date: Fri Aug 18 21:34:45 2017 +0200 arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM Haikou is a Qseven and μQseven baseboard featuring PCIe, USB3 and a video connector for MIPI-DSI/CSI and eDP adapter. This dts is for usage with the RK3399-Q7 SoM Puma. Signed-off-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 228 +++++++++++++++++++++ 2 files changed, 229 insertions(+) commit 2c66fc34e9457ed10b56265e1dcf55c86d524e9e Author: Klaus Goger Date: Fri Aug 18 21:34:44 2017 +0200 arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM The RK3399-Q7 SoM is a Qseven-compatible (70mm x 70mm, MXM-230 connector) system-on-module from Theobroma Systems, featuring the Rockchip RK3399. It provides the following feature set: * up to 4GB DDR3 * on-module SPI-NOR flash * on-module eMMC (with 8-bit 1.8V interface) * SD card (on a baseboad) via edge connector * Gigabit Ethernet with on-module Micrel KSZ9031 GbE PHY * HDMI/eDP/2x MIPI-DSI * 2x MIPI-CSI * USB - 1x USB 3.0 dual-role (direct connection) - 2x USB 3.0 host + 1x USB 2.0 (on-module USB 3.0 hub) * on-module STM32 Cortex-M0 companion controller, implementing: - low-power RTC functionality (ISL1208 emulation) - fan controller (AMC6821 emulation) - USB<->CAN bridge controller Signed-off-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 547 ++++++++++++++++++++++++++ 1 file changed, 547 insertions(+) commit 68987f4494d27077123c8782b11dcd033657ddef Author: Klaus Goger Date: Fri Aug 18 21:34:43 2017 +0200 dt-bindings: add rk3399-q7 SoM RK3399-Q7 is a Qseven compatible system-on-module by Theobroma Systems. This adds the module and the EVK baseboard "Haikou" Signed-off-by: Klaus Goger Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 274ff50d3ad951bca0adbfb9ffd628d35ba6db6f Author: Frank Wang Date: Mon Aug 21 16:39:28 2017 +0800 ARM: dts: rockchip: enable usb for rv1108-evb Rockchip's rv1108-evb board has one usb otg controller and one usb host controller, each usb controller connect with one usb-phy port through UTMI+ interface. This patch enables them to support usb on rv1108-evb board. Signed-off-by: Frank Wang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108-evb.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 24f9f5bb525d7c0c2fbdaa3734af5ce7e4184a43 Author: Frank Wang Date: Mon Aug 21 16:39:27 2017 +0800 ARM: dts: rockchip: add usb nodes for rv1108 SoCs This patch adds usb otg/host controllers and phys nodes for RV1108 SoCs. Signed-off-by: Frank Wang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108.dtsi | 73 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) commit 4a14af45f70945cfa894188ec35a23e4aa394370 Author: Bhumika Goyal Date: Sun Aug 20 23:57:46 2017 +0530 gpio: zevio: make gpio_chip const Make this const as it is only used as a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Linus Walleij drivers/gpio/gpio-zevio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45a7d2ca832f4b2949693366f55918e87173c9fe Author: Frank Wang Date: Mon Aug 21 16:39:26 2017 +0800 dt-bindings: update grf-binding for rv1108 SoCs This patch adds the compatible of GRF and USBGRF for RV1108 SoCs. Signed-off-by: Frank Wang Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/soc/rockchip/grf.txt | 3 +++ 1 file changed, 3 insertions(+) commit 3946d18765be0b0fe278bea4f87a54cf13858019 Author: Dmitry Torokhov Date: Mon Aug 14 21:59:55 2017 -0700 gpio: add gpio_add_lookup_tables() to add several tables at once When converting legacy board to use gpiod API() there might be several lookup tables in board file, let's provide a way to register them all at once. Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 17 +++++++++++++++++ include/linux/gpio/machine.h | 3 +++ 2 files changed, 20 insertions(+) commit bcbd328d3fe765f333642b7cfe384d59dffc2db2 Author: Cédric Le Goater Date: Wed Apr 19 15:43:15 2017 +0200 ARM: dts: aspeed-g4: fix AHB window size of the SMC controllers The window of the Aspeed AST2400 SMC Controllers to map chips on the AHB Bus has a 256MB size. The full window range is [ 0x20000000 - 0x2FFFFFFF ] for the FMC controller [ 0x30000000 - 0x3FFFFFFF ] for the SPI controller This change requires CONFIG_VMSPLIT_2G to be set. Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 652213cd1081017e2139d57b6c7871670e41bf0b Author: Joel Stanley Date: Wed Aug 23 15:57:34 2017 +0930 ARM: config: aspeed: Add I2C, VUART, LPC Snoop These drivers have been recently upstreamed, so add them to the defconfigs. Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 4 +++- arch/arm/configs/aspeed_g5_defconfig | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit ea1ef2242c3273e94edc73b4c01a0416c2048476 Author: Cédric Le Goater Date: Wed Apr 19 15:45:47 2017 +0200 ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G This is required for the SMC controller mapping windows on the AHB Bus. Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 1 + 1 file changed, 1 insertion(+) commit e3d0328c76dde0b957f62f8c407b79f1d8fe3ef8 Author: William Tu Date: Tue Aug 22 17:04:05 2017 -0700 gre: fix goto statement typo Fix typo: pnet_tap_faied. Signed-off-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 572a5767f1102da8324bd3820b01ded3f3f7381a Merge: cd36c3a af4d045 Author: David S. Miller Date: Tue Aug 22 21:26:30 2017 -0700 Merge branch 'bpf-minor-cleanups' Daniel Borkmann says: ==================== Two minor BPF cleanups Two minor cleanups on devmap and redirect I still had in my queue. ==================== Signed-off-by: David S. Miller commit af4d045ceeca04946d89453206269aea6c338a8e Author: Daniel Borkmann Date: Wed Aug 23 01:47:54 2017 +0200 bpf: minor cleanups for dev_map Some minor code cleanups, while going over it I also noticed that we're accounting the bitmap only for one CPU currently, so fix that up as well. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/devmap.c | 100 +++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 59 deletions(-) commit e4a8e817d3cb2a5108f8bb2e47e81eb25a2c5e30 Author: Daniel Borkmann Date: Wed Aug 23 01:47:53 2017 +0200 bpf: misc xdp redirect cleanups Few cleanups including: bpf_redirect_map() is really XDP only due to the return code. Move it to a more appropriate location where we do the XDP redirect handling and change it's name into bpf_xdp_redirect_map() to make it consistent to the bpf_xdp_redirect() helper. xdp_do_redirect_map() helper can be static since only used out of filter.c file. Drop the goto in xdp_do_generic_redirect() and only return errors directly. In xdp_do_flush_map() only clear ri->map_to_flush which is the arg we're using in that function, ri->map is cleared earlier along with ri->ifindex. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 72 +++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 40 deletions(-) commit 4f9adc8f91ba996374cd9487ecd1180fa99b9438 Author: Todd Kjos Date: Tue Aug 8 15:48:36 2017 -0700 binder: fix incorrect cmd to binder_stat_br commit 26549d177410 ("binder: guarantee txn complete / errors delivered in-order") passed the locally declared and undefined cmd to binder_stat_br() which results in a bogus cmd field in a trace event and BR stats are incremented incorrectly. Change to use e->cmd which has been initialized. Signed-off-by: Todd Kjos Reported-by: Dan Carpenter Fixes: 26549d177410 ("binder: guarantee txn complete / errors delivered in-order") Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22eb9476b5d80a393ac0ba235c42bccc90b82c76 Author: Christian Brauner Date: Mon Aug 21 16:13:28 2017 +0200 binder: free memory on error On binder_init() the devices string is duplicated and smashed into individual device names which are passed along. However, the original duplicated string wasn't freed in case binder_init() failed. Let's free it on error. Signed-off-by: Christian Brauner Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9e18d0c82f0c07f2a41898d4adbb698a953403ee Author: Martijn Coenen Date: Fri Jul 28 13:56:07 2017 +0200 ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES. These will be required going forward. Signed-off-by: Martijn Coenen Cc: stable # 4.11+ Signed-off-by: Greg Kroah-Hartman drivers/android/Kconfig | 2 +- kernel/configs/android-base.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 5cdcf4c6a638591ec0e98c57404a19e7f9997567 Author: Martijn Coenen Date: Fri Jul 28 13:56:06 2017 +0200 ANDROID: binder: add padding to binder_fd_array_object. binder_fd_array_object starts with a 4-byte header, followed by a few fields that are 8 bytes when ANDROID_BINDER_IPC_32BIT=N. This can cause alignment issues in a 64-bit kernel with a 32-bit userspace, as on x86_32 an 8-byte primitive may be aligned to a 4-byte address. Pad with a __u32 to fix this. Signed-off-by: Martijn Coenen Cc: stable # 4.11+ Signed-off-by: Greg Kroah-Hartman include/uapi/linux/android/binder.h | 2 ++ 1 file changed, 2 insertions(+) commit 30b7b04c466d900244831435031dd76d8640ce37 Author: James Simmons Date: Sat Aug 19 22:26:58 2017 -0400 staging: lustre: lnet: cleanup paths for all LNet headers Rationalize include paths in all the lnet header files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 14 +++++++------- drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/socklnd.h | 4 ++-- drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h | 4 ++-- drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h | 2 +- drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) commit d3d09f6f771278eb80a60b92635c165f1113bcbe Author: James Simmons Date: Sat Aug 19 22:26:57 2017 -0400 staging: lustre: libcfs: cleanup paths for libcfs headers Rationalize include paths in all the libcfs header files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 24 +++++++++++----------- .../lustre/include/linux/libcfs/libcfs_debug.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) commit f9f6b24bc5cd38fd3d3661272a87d017e39cafd2 Author: James Simmons Date: Sat Aug 19 22:26:56 2017 -0400 staging: lustre: libcfs: add include path to Makefile Rationalize include paths in the libcfs source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/Makefile | 3 +++ drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/fail.c | 2 +- drivers/staging/lustre/lnet/libcfs/hash.c | 2 +- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 2 +- drivers/staging/lustre/lnet/libcfs/libcfs_lock.c | 2 +- drivers/staging/lustre/lnet/libcfs/libcfs_mem.c | 2 +- drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c | 4 ++-- drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 2 +- drivers/staging/lustre/lnet/libcfs/module.c | 8 ++++---- drivers/staging/lustre/lnet/libcfs/prng.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.h | 2 +- drivers/staging/lustre/lnet/libcfs/workitem.c | 2 +- 21 files changed, 27 insertions(+), 24 deletions(-) commit 95884b8a082886af775643a8b3ad553349b2f951 Author: James Simmons Date: Sat Aug 19 22:26:55 2017 -0400 staging: lustre: ksocklnd: add include path to Makefile Rationalize include paths in the ksocklnd source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/Makefile | 3 +++ drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 895dc4b1bfa551e4966482f0e950b5c835f3f0fd Author: James Simmons Date: Sat Aug 19 22:26:54 2017 -0400 staging: lustre: ko2iblnd: add include path to Makefile Rationalize include paths in the ko2iblnd source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/Makefile | 3 +++ drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 709b4c54e53b600da473aa0868e2e1a75f6c9cd7 Author: James Simmons Date: Sat Aug 19 22:26:53 2017 -0400 staging: lustre: lnet: add include path to Makefile Rationalize include paths in the lnet core source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/Makefile | 3 +++ drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 4 ++-- drivers/staging/lustre/lnet/lnet/config.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-eq.c | 3 ++- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-me.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-socket.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lo.c | 3 ++- drivers/staging/lustre/lnet/lnet/module.c | 5 +++-- drivers/staging/lustre/lnet/lnet/net_fault.c | 4 ++-- drivers/staging/lustre/lnet/lnet/nidstrings.c | 4 ++-- drivers/staging/lustre/lnet/lnet/peer.c | 4 ++-- drivers/staging/lustre/lnet/lnet/router.c | 3 ++- drivers/staging/lustre/lnet/lnet/router_proc.c | 5 +++-- 18 files changed, 32 insertions(+), 24 deletions(-) commit a33e20b66c30ee83355abfd93bbbd62ef9ad034f Author: James Simmons Date: Sat Aug 19 22:26:52 2017 -0400 staging: lustre: lnet: selftest: add include path to Makefile Rationalize include paths in the lnet selftest source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/Makefile | 3 +++ drivers/staging/lustre/lnet/selftest/conctl.c | 6 +++--- drivers/staging/lustre/lnet/selftest/conrpc.c | 4 ++-- drivers/staging/lustre/lnet/selftest/conrpc.h | 6 +++--- drivers/staging/lustre/lnet/selftest/console.c | 4 ++-- drivers/staging/lustre/lnet/selftest/console.h | 6 +++--- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 8 ++++---- 8 files changed, 21 insertions(+), 18 deletions(-) commit 8d4fafa6ae1492d2882b4b43c9025262ceb87bc2 Author: James Simmons Date: Sat Aug 19 22:26:51 2017 -0400 staging: lustre: lustre: cleanup paths for lustre UAPI headers Rationalize include paths for the lustre uapi headers Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 2 +- drivers/staging/lustre/include/uapi/linux/lustre/lustre_fid.h | 2 +- drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h | 6 +++--- drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 2 +- drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h | 2 +- drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 8c355a7a33a8293d864cb086c5b1236e2e463eb0 Author: James Simmons Date: Sat Aug 19 22:26:50 2017 -0400 staging: lustre: lustre: cleanup paths for lustre internal headers Rationalize include paths for the lustre internal headers Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 4 +-- drivers/staging/lustre/lustre/include/llog_swab.h | 2 +- .../staging/lustre/lustre/include/lprocfs_status.h | 6 ++--- drivers/staging/lustre/lustre/include/lu_object.h | 6 ++--- .../staging/lustre/lustre/include/lustre_compat.h | 2 +- .../staging/lustre/lustre/include/lustre_debug.h | 4 +-- .../staging/lustre/lustre/include/lustre_disk.h | 4 ++- drivers/staging/lustre/lustre/include/lustre_dlm.h | 12 ++++----- .../staging/lustre/lustre/include/lustre_export.h | 6 ++--- drivers/staging/lustre/lustre/include/lustre_fid.h | 8 +++--- drivers/staging/lustre/lustre/include/lustre_fld.h | 6 ++--- .../staging/lustre/lustre/include/lustre_handles.h | 2 +- .../staging/lustre/lustre/include/lustre_import.h | 4 +-- .../lustre/lustre/include/lustre_kernelcomm.h | 2 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 12 ++++----- drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 +- drivers/staging/lustre/lustre/include/lustre_log.h | 4 +-- drivers/staging/lustre/lustre/include/lustre_mdc.h | 14 +++++----- drivers/staging/lustre/lustre/include/lustre_mds.h | 10 ++++---- drivers/staging/lustre/lustre/include/lustre_net.h | 30 +++++++++++----------- drivers/staging/lustre/lustre/include/lustre_nrs.h | 2 +- .../staging/lustre/lustre/include/lustre_obdo.h | 2 +- .../staging/lustre/lustre/include/lustre_swab.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 18 ++++++------- drivers/staging/lustre/lustre/include/obd_cksum.h | 6 ++--- drivers/staging/lustre/lustre/include/obd_class.h | 12 ++++----- .../staging/lustre/lustre/include/obd_support.h | 6 ++--- drivers/staging/lustre/lustre/include/seq_range.h | 2 +- 28 files changed, 96 insertions(+), 94 deletions(-) commit fcda61a9f2895172be2f7a5e4c60d43998c9a18d Author: James Simmons Date: Sat Aug 19 22:26:49 2017 -0400 staging: lustre: osc: add include path to Makefile Rationalize include paths in the osc source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/Makefile | 3 ++ drivers/staging/lustre/lustre/osc/lproc_osc.c | 6 ++-- .../staging/lustre/lustre/osc/osc_cl_internal.h | 6 ++-- drivers/staging/lustre/lustre/osc/osc_dev.c | 2 +- drivers/staging/lustre/lustre/osc/osc_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 4 +-- drivers/staging/lustre/lustre/osc/osc_quota.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 32 +++++++++++----------- 9 files changed, 31 insertions(+), 28 deletions(-) commit b69260b962be696c7eb2e03b6bb33d758ad7ff08 Author: James Simmons Date: Sat Aug 19 22:26:48 2017 -0400 staging: lustre: obdecho: add include path to Makefile Rationalize include paths in the obdecho source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdecho/Makefile | 3 +++ .../staging/lustre/lustre/obdecho/echo_client.c | 24 +++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) commit e6f227ef616df0d9fe50e5d2bb62b01a9a815629 Author: James Simmons Date: Sat Aug 19 22:26:47 2017 -0400 staging: lustre: obdclass: add include path to Makefile Rationalize include paths in the obdclass source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/Makefile | 3 +++ drivers/staging/lustre/lustre/obdclass/cl_io.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/cl_object.c | 14 +++++++------- drivers/staging/lustre/lustre/obdclass/cl_page.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/class_obd.c | 14 +++++++------- drivers/staging/lustre/lustre/obdclass/debug.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/linkea.c | 6 +++--- .../lustre/lustre/obdclass/linux/linux-module.c | 14 +++++++------- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/llog.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 2 +- .../staging/lustre/lustre/obdclass/llog_internal.h | 2 +- drivers/staging/lustre/lustre/obdclass/llog_obd.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 4 ++-- .../lustre/lustre/obdclass/lprocfs_counters.c | 4 ++-- .../staging/lustre/lustre/obdclass/lprocfs_status.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/lu_object.c | 20 ++++++++++---------- drivers/staging/lustre/lustre/obdclass/lu_ref.c | 10 +++++----- .../staging/lustre/lustre/obdclass/lustre_handles.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 14 +++++++------- drivers/staging/lustre/lustre/obdclass/obd_config.c | 12 ++++++------ drivers/staging/lustre/lustre/obdclass/obd_mount.c | 14 +++++++------- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/statfs_pack.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/uuid.c | 6 +++--- 28 files changed, 112 insertions(+), 109 deletions(-) commit 7e270b3012a9286fe093ccdaf587db2506e30509 Author: James Simmons Date: Sat Aug 19 22:26:46 2017 -0400 staging: lustre: mgc: add include path to Makefile Rationalize include paths in the mgc source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mgc/Makefile | 3 +++ drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 4 ++-- drivers/staging/lustre/lustre/mgc/mgc_internal.h | 10 +++++----- drivers/staging/lustre/lustre/mgc/mgc_request.c | 12 ++++++------ 4 files changed, 16 insertions(+), 13 deletions(-) commit 28c5522508897ba270fc1d5f801214461270b6f4 Author: James Simmons Date: Sat Aug 19 22:26:45 2017 -0400 staging: lustre: mdc: add include path to Makefile Rationalize include paths in the mdc source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/Makefile | 3 +++ drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 22 ++++++++++---------- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 26 ++++++++++++------------ 7 files changed, 34 insertions(+), 31 deletions(-) commit 2efb9f587760676bd3dff004f532e0ed09460734 Author: James Simmons Date: Sat Aug 19 22:26:44 2017 -0400 staging: lustre: lov: add include path to Makefile Rationalize include paths in the lov source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/Makefile | 3 ++ .../staging/lustre/lustre/lov/lov_cl_internal.h | 6 ++-- drivers/staging/lustre/lustre/lov/lov_dev.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 6 ++-- drivers/staging/lustre/lustre/lov/lov_internal.h | 4 +-- drivers/staging/lustre/lustre/lov/lov_merge.c | 4 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 32 +++++++++++----------- drivers/staging/lustre/lustre/lov/lov_offset.c | 4 +-- drivers/staging/lustre/lustre/lov/lov_pack.c | 10 +++---- drivers/staging/lustre/lustre/lov/lov_pool.c | 4 +-- drivers/staging/lustre/lustre/lov/lov_request.c | 6 ++-- drivers/staging/lustre/lustre/lov/lproc_lov.c | 4 +-- 12 files changed, 44 insertions(+), 41 deletions(-) commit 873d2e7d4f4d41e302ee9a51768dd68db42b11a4 Author: James Simmons Date: Sat Aug 19 22:26:43 2017 -0400 staging: lustre: lmv: add include path to Makefile Rationalize include paths in the lmv source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/Makefile | 3 +++ drivers/staging/lustre/lustre/lmv/lmv_fld.c | 14 +++++++------- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 16 ++++++++-------- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 6 +++--- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 18 +++++++++--------- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 4 ++-- 6 files changed, 32 insertions(+), 29 deletions(-) commit b2e475b16c6dc59cda21146bf977be86615aee50 Author: James Simmons Date: Sat Aug 19 22:26:42 2017 -0400 staging: lustre: llite: add include path to Makefile Rationalize include paths in the llite source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/Makefile | 3 ++ drivers/staging/lustre/lustre/llite/dcache.c | 6 ++-- drivers/staging/lustre/lustre/llite/dir.c | 16 +++++----- drivers/staging/lustre/lustre/llite/file.c | 10 +++---- drivers/staging/lustre/lustre/llite/glimpse.c | 16 +++++----- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 34 +++++++++++----------- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 8 ++--- .../staging/lustre/lustre/llite/llite_internal.h | 20 ++++++------- drivers/staging/lustre/lustre/llite/llite_lib.c | 18 ++++++------ drivers/staging/lustre/lustre/llite/lproc_llite.c | 4 +-- drivers/staging/lustre/lustre/llite/namei.c | 6 ++-- drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/llite/range_lock.h | 4 +-- drivers/staging/lustre/lustre/llite/rw.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +-- drivers/staging/lustre/lustre/llite/super25.c | 6 ++-- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 4 +-- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_lock.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 4 +-- drivers/staging/lustre/lustre/llite/xattr.c | 4 +-- drivers/staging/lustre/lustre/llite/xattr_cache.c | 4 +-- 23 files changed, 92 insertions(+), 89 deletions(-) commit ea6882bfd961b49e679ac9d1853af872f3248c1c Author: James Simmons Date: Sat Aug 19 22:26:41 2017 -0400 staging: lustre: ptlrpc: add include path to Makefile Rationalize include paths in the ptlrpc/ldlm source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/interval_tree.c | 6 +++--- drivers/staging/lustre/lustre/ldlm/l_lock.c | 6 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 12 ++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 8 ++++---- drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 6 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 12 ++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 8 ++++---- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_plain.c | 6 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 8 ++++---- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 8 ++++---- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/Makefile | 3 +++ drivers/staging/lustre/lustre/ptlrpc/client.c | 12 ++++++------ drivers/staging/lustre/lustre/ptlrpc/connection.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/errno.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/events.c | 8 ++++---- drivers/staging/lustre/lustre/ptlrpc/import.c | 16 ++++++++-------- drivers/staging/lustre/lustre/ptlrpc/layout.c | 18 +++++++++--------- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 8 ++++---- drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 12 ++++++------ drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 16 ++++++++-------- drivers/staging/lustre/lustre/ptlrpc/pers.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 8 ++++---- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 18 +++++++++--------- drivers/staging/lustre/lustre/ptlrpc/recover.c | 18 +++++++++--------- drivers/staging/lustre/lustre/ptlrpc/sec.c | 16 ++++++++-------- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 20 ++++++++++---------- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 14 +++++++------- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 16 ++++++++-------- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 10 +++++----- drivers/staging/lustre/lustre/ptlrpc/service.c | 11 ++++++----- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 8 ++++---- 40 files changed, 202 insertions(+), 198 deletions(-) commit b2a0f9e071b8efa3aabfd936526852237a7e99bf Author: James Simmons Date: Sat Aug 19 22:26:40 2017 -0400 staging: lustre: fld: add include path to Makefile Rationalize include paths in the fld source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/Makefile | 3 +++ drivers/staging/lustre/lustre/fld/fld_cache.c | 16 ++++++++-------- drivers/staging/lustre/lustre/fld/fld_internal.h | 8 ++++---- drivers/staging/lustre/lustre/fld/fld_request.c | 18 +++++++++--------- drivers/staging/lustre/lustre/fld/lproc_fld.c | 14 +++++++------- 5 files changed, 31 insertions(+), 28 deletions(-) commit 3bca1c17543a4dfd6a75aa3155b8487d92a7d381 Author: James Simmons Date: Sat Aug 19 22:26:39 2017 -0400 staging: lustre: fid: add include path to Makefile Start to rationalize include paths in the fid source code files. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/Makefile | 3 +++ drivers/staging/lustre/lustre/fid/fid_internal.h | 4 ++-- drivers/staging/lustre/lustre/fid/fid_lib.c | 4 ++-- drivers/staging/lustre/lustre/fid/fid_request.c | 12 ++++++------ drivers/staging/lustre/lustre/fid/lproc_fid.c | 12 ++++++------ 5 files changed, 19 insertions(+), 16 deletions(-) commit 7b76f86b73e5231c8fd454ef759bc20605c3b3f4 Author: James Simmons Date: Sat Aug 19 22:26:38 2017 -0400 staging: lustre: uapi: remove BIT macro from UAPI headers The BIT macro is not available for UAPI headers so remove it from the lustre UAPI headers. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lustre/lustre_idl.h | 38 +++++++++++----------- .../lustre/include/uapi/linux/lustre/lustre_user.h | 12 +++---- 2 files changed, 25 insertions(+), 25 deletions(-) commit aec63d7ab82e870e37b72454e683e610aff2fd2e Author: James Simmons Date: Sat Aug 19 22:26:37 2017 -0400 staging: lustre: uapi: use proper byteorder functions in lustre_idl.h In order for lustre_idl.h to be usable for both user land and kernel space it has to use the proper byteorder functions. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/16916 Reviewed-by: Frank Zago Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/uapi/linux/lustre/lustre_idl.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 72c5290bf90b9e56145719cd1a31c101438ee9be Author: James Simmons Date: Sat Aug 19 22:26:36 2017 -0400 staging: lustre: uapi: remove CONFIG_LUSTRE_OBD_MAX_IOCTL Now that lustre_ioctl.h is a UAPI header the kernel configuration option CONFIG_LUSTRE_OBD_MAX_IOCTL needs to be remove. The user land utilites will no longer be able to see this option and actually they never used this option before. Since this is the case setting the kernel configuration to something other than 8K could actually break things. The best option is just hard code it to 8K. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/25246 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 1 - drivers/staging/lustre/lustre/Kconfig | 10 ---------- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 ++ 3 files changed, 2 insertions(+), 11 deletions(-) commit e86a615146d8d308e8084584eaaf07618dc5f825 Author: James Simmons Date: Sat Aug 19 22:26:35 2017 -0400 staging: lustre: uapi: migrate remaining uapi headers to uapi directory Move all the remaining lustre headers shared between user land and kernel space to the uapi directory. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/25246 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lustre/lustre_cfg.h | 2 +- .../lustre/include/uapi/linux/lustre/lustre_fid.h | 2 +- .../include/uapi/linux/lustre/lustre_fiemap.h | 72 + .../lustre/include/uapi/linux/lustre/lustre_idl.h | 2687 +++++++++++++++++++ .../include/uapi/linux/lustre/lustre_ioctl.h | 2 +- .../include/uapi/linux/lustre/lustre_kernelcomm.h | 94 + .../include/uapi/linux/lustre/lustre_ostid.h | 1 - .../lustre/include/uapi/linux/lustre/lustre_user.h | 1325 ++++++++++ .../lustre/include/uapi/linux/lustre/lustre_ver.h | 27 + drivers/staging/lustre/lustre/fid/fid_internal.h | 2 +- drivers/staging/lustre/lustre/fid/fid_lib.c | 1 - drivers/staging/lustre/lustre/fld/fld_cache.c | 2 +- drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +- drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- drivers/staging/lustre/lustre/include/llog_swab.h | 3 +- .../staging/lustre/lustre/include/lprocfs_status.h | 2 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- .../lustre/lustre/include/lustre/ll_fiemap.h | 76 - .../lustre/lustre/include/lustre/lustre_errno.h | 215 -- .../lustre/lustre/include/lustre/lustre_idl.h | 2689 -------------------- .../lustre/lustre/include/lustre/lustre_user.h | 1325 ---------- .../staging/lustre/lustre/include/lustre_errno.h | 215 ++ .../staging/lustre/lustre/include/lustre_export.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fld.h | 2 +- .../staging/lustre/lustre/include/lustre_import.h | 2 +- .../lustre/lustre/include/lustre_kernelcomm.h | 2 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 4 +- drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 +- drivers/staging/lustre/lustre/include/lustre_log.h | 2 +- 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 | 5 +- .../staging/lustre/lustre/include/lustre_obdo.h | 2 +- .../staging/lustre/lustre/include/lustre_swab.h | 2 +- drivers/staging/lustre/lustre/include/lustre_ver.h | 27 - drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/include/obd_cksum.h | 2 +- drivers/staging/lustre/lustre/include/obd_class.h | 1 - drivers/staging/lustre/lustre/include/seq_range.h | 2 +- .../lustre/lustre/include/uapi_kernelcomm.h | 94 - drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 3 +- drivers/staging/lustre/lustre/llite/dcache.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 1 - .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/namei.c | 1 - drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 2 +- drivers/staging/lustre/lustre/llite/xattr.c | 1 - drivers/staging/lustre/lustre/llite/xattr_cache.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 | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 - drivers/staging/lustre/lustre/lov/lov_ea.c | 2 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 3 - drivers/staging/lustre/lustre/lov/lov_request.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +- drivers/staging/lustre/lustre/mgc/mgc_internal.h | 1 - drivers/staging/lustre/lustre/obdclass/linkea.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- .../lustre/lustre/obdclass/lprocfs_status.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/errno.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/layout.c | 4 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 2 +- 73 files changed, 4472 insertions(+), 4494 deletions(-) commit 1c07bedf73ed866bd3475700301e02ec9efca79a Author: James Simmons Date: Sat Aug 19 22:26:34 2017 -0400 staging: lustre: uapi: remove libcfs.h from lustre_id.h/lustre_user.h These are the last UAPI headers that contain libcfs.h which is internal kernel header. Since it is not available to user land remove libcfs.h and add the need headers that libcfs.h provided. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/22138 Reviewed-by: Dmitry Eremin Reviewed-by: Jinshan Xiong Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 3 ++- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit fa6f479cf74c0ccbc7ad079a110b4b07270ae7a2 Author: James Simmons Date: Sat Aug 19 22:26:33 2017 -0400 staging: lustre: lnet: remove BIT macro from lnetctl.h Now that lnetctl.h is a UAPI header the BIT macro has to be removed. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 150414213e12728952f228bda11be2a022d548e2 Author: James Simmons Date: Sat Aug 19 22:26:32 2017 -0400 staging: lustre: lnet: remove userland function prototype in lnetctl.h Several function prototypes of the form jt_ptl_* are only needed by userland so they can be removed. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lnet/lnetctl.h | 41 ---------------------- 1 file changed, 41 deletions(-) commit 6c1c720130e579876d217506b68c21ae099f232c Author: James Simmons Date: Sat Aug 19 22:26:31 2017 -0400 staging: lustre: libcfs: sort headers in libcfs.h Move all the included headers in libcfs.h to the top of the file. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) commit 037697dc2a2be8fa90f1e9e888f4cd50cdc6b305 Author: James Simmons Date: Sat Aug 19 22:26:30 2017 -0400 staging: lustre: lnet: migrate headers to lnet uapi directory Migrate the headers used by user land and kernel space to the libcfs/lnet uapi directory. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 2 +- .../lustre/include/linux/libcfs/libcfs_ioctl.h | 141 ----- drivers/staging/lustre/include/linux/lnet/api.h | 2 +- .../staging/lustre/include/linux/lnet/lib-dlc.h | 149 ----- .../staging/lustre/include/linux/lnet/lib-lnet.h | 8 +- .../staging/lustre/include/linux/lnet/lib-types.h | 4 +- .../staging/lustre/include/linux/lnet/lnetctl.h | 175 ------ drivers/staging/lustre/include/linux/lnet/lnetst.h | 556 ----------------- drivers/staging/lustre/include/linux/lnet/nidstr.h | 119 ---- .../staging/lustre/include/linux/lnet/socklnd.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 669 --------------------- .../lustre/include/uapi/linux/lnet/libcfs_ioctl.h | 141 +++++ .../lustre/include/uapi/linux/lnet/lnet-dlc.h | 149 +++++ .../lustre/include/uapi/linux/lnet/lnet-types.h | 669 +++++++++++++++++++++ .../lustre/include/uapi/linux/lnet/lnetctl.h | 175 ++++++ .../lustre/include/uapi/linux/lnet/lnetst.h | 556 +++++++++++++++++ .../lustre/include/uapi/linux/lnet/nidstr.h | 119 ++++ drivers/staging/lustre/lnet/libcfs/module.c | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/module.c | 2 +- drivers/staging/lustre/lnet/lnet/net_fault.c | 2 +- drivers/staging/lustre/lnet/lnet/nidstrings.c | 2 +- drivers/staging/lustre/lnet/lnet/peer.c | 2 +- drivers/staging/lustre/lnet/selftest/conctl.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 2 +- drivers/staging/lustre/lnet/selftest/console.h | 2 +- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- .../lustre/lustre/include/lustre/lustre_idl.h | 3 +- .../staging/lustre/lustre/include/lustre_disk.h | 1 - drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 34 files changed, 1834 insertions(+), 1836 deletions(-) commit 28cb3e268fdfdb0ecb058b6f5b7725c09706cd66 Author: James Simmons Date: Sat Aug 19 22:26:29 2017 -0400 staging: lustre: lnet: delete lnet.h The header lnet.h is just a bunch of headers included in a header. Just delete it and include the appropriate headers where needed. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 4 +- drivers/staging/lustre/include/linux/lnet/lnet.h | 44 ---------------------- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 1 - .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 1 - drivers/staging/lustre/lnet/libcfs/module.c | 1 - drivers/staging/lustre/lnet/lnet/nidstrings.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 1 - drivers/staging/lustre/lnet/selftest/console.h | 1 - drivers/staging/lustre/lnet/selftest/selftest.h | 1 - 9 files changed, 4 insertions(+), 52 deletions(-) commit e4d64b3084e5b1b2af7c3e732c038280c0b33989 Author: James Simmons Date: Sat Aug 19 22:26:28 2017 -0400 staging: lustre: socklnd: create socklnd.h UAPI header Break out the parts from libcfs_debug.h that is used by both user land and kernel space into a new UAPI header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/socklnd.h | 10 +---- .../lustre/include/uapi/linux/lnet/socklnd.h | 44 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) commit ad6f42598baa1d9b7aa7293c9a77f526dede1e04 Author: James Simmons Date: Sat Aug 19 22:26:27 2017 -0400 staging: lustre: libcfs: create libcfs_debug.h UAPI header Break out the parts from libcfs_debug.h that is used by both user land and kernel space into a new UAPI header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/28089 Reviewed-by: Dmitry Eremin Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_debug.h | 104 +------------- .../lustre/include/uapi/linux/lnet/libcfs_debug.h | 149 +++++++++++++++++++++ 2 files changed, 151 insertions(+), 102 deletions(-) commit cef7b965ae3c1359a29e04e48f6fc2714820cfcb Author: James Simmons Date: Sat Aug 19 22:26:26 2017 -0400 staging: lustre: libcfs: remove LOGL and LOGU macros The macro LOGU is not used anymore and LOGL is used in one place. No reason to keep LOGL around anymore. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/22138 Reviewed-by: Dmitry Eremin Reviewed-by: Jinshan Xiong Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs_private.h | 14 -------------- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 4 +++- 2 files changed, 3 insertions(+), 15 deletions(-) commit 6efbda3d62c61daf801562486343a1dc46c48c94 Author: James Simmons Date: Sat Aug 19 22:26:25 2017 -0400 staging: lustre: libcfs: remove htonl hack in libcfs.h This is really old hack for earlier gcc version that had a hard time compiling byteorder.h. Lets remove it. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/22138 Reviewed-by: Dmitry Eremin Reviewed-by: Jinshan Xiong Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 12 ------------ 1 file changed, 12 deletions(-) commit d0982327a72fd0a280e29a09abe1bbf569bfe846 Author: James Simmons Date: Sat Aug 19 22:26:24 2017 -0400 staging: lustre: uapi: label lustre_cfg.h as an uapi header Change LUSTRE_CFG_H to _UAPI_LUSTRE_CFG_H_ now that it is a proper UAPI header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6238fbd2f696764a8683a5061de23cb49c2465b7 Author: James Simmons Date: Sat Aug 19 22:26:23 2017 -0400 staging: lustre: uapi: style cleanup of lustre_cfg.h Some style and white space cleanups to make lustre_cfg.h easy to read. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lustre/lustre_cfg.h | 110 +++++++++++---------- 1 file changed, 60 insertions(+), 50 deletions(-) commit ef27faebbad8d936bd2672ed94c4b925b5c92609 Author: James Simmons Date: Sat Aug 19 22:26:22 2017 -0400 staging: lustre: uapi: check if argument for lustre_cfg_buf() is NULL Check if lcfg passed in is NULL and if it is just return NULL. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: https://review.whamcloud.com/22138 Reviewed-by: Dmitry Eremin Reviewed-by: Jinshan Xiong Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 3 +++ 1 file changed, 3 insertions(+) commit 63d384bfa650f066f44c35b92173d54545dbaf25 Author: James Simmons Date: Sat Aug 19 22:26:21 2017 -0400 staging: lustre: uapi: change variable type to match Change i from int to __u32 to match lcfg_bufcount field. Also this matches what the other functions also do. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 955073c4fe4bd87a074d80c1e4098ffd1c49356a Author: James Simmons Date: Sat Aug 19 22:26:20 2017 -0400 staging: lustre: uapi: remove need for libcfs.h from lustre_cfg.h Several libcfs.h macros are present in lustre_cfg.h, but libcfs.h is not available so lets replace those macros with real code. The header libcfs.h also provides errno.h so with libcfs.h gone include errno.h directly. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/uapi/linux/lustre/lustre_cfg.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit f55b74110f119bdfa3706f766272d4c599ef7e31 Author: James Simmons Date: Sat Aug 19 22:26:19 2017 -0400 staging: lustre: uapi: move lustre_cfg.h to uapi directory Move lustre_cfg.h to its proper place. Adjust additonal headers included in lustre_cfg.h. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lustre/lustre_cfg.h | 243 ++++++++++++++++++++ .../staging/lustre/lustre/include/lprocfs_status.h | 2 +- drivers/staging/lustre/lustre/include/lustre_cfg.h | 245 --------------------- drivers/staging/lustre/lustre/include/lustre_lib.h | 2 +- 4 files changed, 245 insertions(+), 247 deletions(-) commit 4599c8ebb2bbec3df5cfa306b3ef102bb8824181 Author: James Simmons Date: Sat Aug 19 22:26:18 2017 -0400 staging: lustre: obdclass: no need to check for kfree In class_config_llog_handler() a flag, inst, was used to determine if it was safe to call kfree. Its not needed so remove the flag. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 90d1e58830ec6060155ebfbb4645257be5d9b37b Author: James Simmons Date: Sat Aug 19 22:26:17 2017 -0400 staging: lustre: uapi: move lustre_cfg_string() to obd_config.c To perserve the truncate warning move lustre_cfg_string() to obd_config.c. A identical function was created for userland. This function was a bit big for a inline function. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_cfg.h | 29 ------------------ drivers/staging/lustre/lustre/include/obd_class.h | 1 + .../staging/lustre/lustre/obdclass/obd_config.c | 34 ++++++++++++++++++++++ drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 1 + 4 files changed, 36 insertions(+), 29 deletions(-) commit 402fba76c3e2029ebcdfb2df9efc9f4e61da44f7 Author: James Simmons Date: Sat Aug 19 22:26:16 2017 -0400 staging: lustre: uapi: don't memory allocate in UAPI header The inline function lustre_cfg_new() calls kzalloc() but this is a UAPI header. Remove kzalloc() and rename the function to lustre_cfg_init(). The lustre kernel code that was calling lustre_cfg_new() can doing the memory allocation and pass the new buffer to lustre_cfg_init() to fill in. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_cfg.h | 11 ++-------- drivers/staging/lustre/lustre/mgc/mgc_request.c | 9 +++++--- .../staging/lustre/lustre/obdclass/obd_config.c | 17 +++++++++++---- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 24 ++++++++++++++++++---- 4 files changed, 41 insertions(+), 20 deletions(-) commit 18bd20841bd3b70d502b1d78e40c0bde2af9e663 Author: James Simmons Date: Sat Aug 19 22:26:15 2017 -0400 staging: lustre: uapi: remove lustre_cfg_free wrapper Replace all lustre_cfg_free() calls with direct kfree() call. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_cfg.h | 6 ------ drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 +++--- 4 files changed, 6 insertions(+), 12 deletions(-) commit e3acb49a30c3c2189126c844b35bc6e6d110836f Author: James Simmons Date: Sat Aug 19 22:26:14 2017 -0400 staging: lustre: uapi: style cleanups for lustre_param.h Remove the white space in the lustre_param.h header and align the code so its easier to read. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../include/uapi/linux/lustre/lustre_param.h | 67 +++++++++++----------- 1 file changed, 34 insertions(+), 33 deletions(-) commit 7326fbb9155f070a94b67518e447c04ab875e289 Author: James Simmons Date: Sat Aug 19 22:26:13 2017 -0400 staging: lustre: uapi: label lustre_param.h as an uapi header Change LUSTRE_PARAM_H_ to _UAPI_LUSTRE_PARAM_H_ now that is a proper UAPI header Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_param.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d563149f06c5790cc70d0d9c2e1526672eee50f9 Author: James Simmons Date: Sat Aug 19 22:26:12 2017 -0400 staging: lustre: uapi: move lustre_param.h to uapi directory Move the header lustre_param.h to proper uapi directory. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../include/uapi/linux/lustre/lustre_param.h | 95 ++++++++++++++++++++++ .../staging/lustre/lustre/include/lustre_param.h | 95 ---------------------- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- 9 files changed, 102 insertions(+), 102 deletions(-) commit bcf0ec951b8bbb7fca7e413d7350d7193bcbb111 Author: James Simmons Date: Sat Aug 19 22:26:11 2017 -0400 staging: lustre: uapi: remove included headers out of lustre_param.h All the included headers in lustre_param.h are lustre kernel internal headers and they are not even needed. Just remove them. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_param.h | 3 --- 1 file changed, 3 deletions(-) commit 64a35c1b71215c98fb044192d26d9d6fcfa51a9d Author: James Simmons Date: Sat Aug 19 22:26:10 2017 -0400 staging: lustre: uapi: move kernel only prototypes out of lustre_param.h Move all the kernel specific function prototypes from lustre_param.h into obd_config.h which is a kernel only header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_param.h | 11 ----------- drivers/staging/lustre/lustre/include/obd_class.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) commit 6fb4eaa2e533dfe2a655d19c6666b9c34e27e29b Author: James Simmons Date: Sat Aug 19 22:26:09 2017 -0400 staging: lustre: uapi: label lustre_ioctl.h as a UAPI header Change LUSTRE_IOCTL_H_ to _UAPI_LUSTRE_IOCTL_H_ now that is a proper UAPI header Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f443e003edd4056bd23214d883f78b6bca5ac1d Author: James Simmons Date: Sat Aug 19 22:26:08 2017 -0400 staging: lustre: uapi: cleanup headers for lustre_ioctl.h With the cleanups we no longer need to drag in tons of user land headers. Lets simplify the include headers. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 30bfc47885a486ee5ce5fc6adefac9b06ed704d7 Author: James Simmons Date: Sat Aug 19 22:26:07 2017 -0400 staging: lustre: uapi: use __ALIGN_KERNEL for lustre_ioctl.h Replace cfs_size_round() standard __ALIGN_KERNEL macro. This removes the dependency of libcfs.h which is a kernel only header. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 325da9674b3c5eb9e4304bcb22fb07981515bbb1 Author: James Simmons Date: Sat Aug 19 22:26:06 2017 -0400 staging: lustre: uapi: move lustre_ioctl.h to uapi directory Move the header lustre_ioctl.h to proper uapi directory. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../include/uapi/linux/lustre/lustre_ioctl.h | 240 ++++++++++++++++++++ .../lustre/lustre/include/lustre/lustre_ioctl.h | 241 --------------------- drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- .../staging/lustre/lustre/obdecho/echo_client.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 13 files changed, 251 insertions(+), 252 deletions(-) commit efd117be43fdc6e742db784ba52877b7236e2c8d Author: James Simmons Date: Sat Aug 19 22:26:05 2017 -0400 staging: lustre: uapi: move obd_ioctl_is_invalid() to linux-module.c The inline function obd_ioctl_is_invalid() is no longer needed by userland and also the function was pretty bug for a inline function. Since this is the case we can move this kernel only code to the linux-module.c which is the only place it is used. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_ioctl.h | 76 ---------------------- .../lustre/lustre/obdclass/linux/linux-module.c | 76 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) commit f344c9e46fb8360b52c4940ce00a1ead7b4d367a Author: James Simmons Date: Sat Aug 19 22:26:04 2017 -0400 staging: lustre: uapi: move obd_ioctl_getdata() declaration Move obd_ioctl_getdata() from lustre_ioctl.h to obd_class.h since this function is only used by kernel space. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h | 2 -- drivers/staging/lustre/lustre/include/obd_class.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit b03679f6a41a6981ab6838cf5110c8e4822f744b Author: James Simmons Date: Sat Aug 19 22:26:03 2017 -0400 staging: lustre: uapi: remove obd_ioctl_popdata() wrapper Replace obd_ioctl_popdata() with direct copy_to_user() call. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_ioctl.h | 1 - drivers/staging/lustre/lustre/obdclass/class_obd.c | 18 +++++++----------- .../lustre/lustre/obdclass/linux/linux-module.c | 8 -------- 3 files changed, 7 insertions(+), 20 deletions(-) commit bb44b987c857ac77d2fe388ceba0aba658ab5613 Author: James Simmons Date: Sat Aug 19 22:26:02 2017 -0400 staging: lustre: uapi: remove obd_ioctl_freedata() wrapper Replace obd_ioctl_freedata() with direct kvfree() call. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_ioctl.h | 5 ----- drivers/staging/lustre/lustre/llite/dir.c | 6 +++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 3 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 +-- 5 files changed, 9 insertions(+), 16 deletions(-) commit d01478627198c7d3ba190cb3f9cfae53e70585cd Author: James Simmons Date: Sat Aug 19 22:26:01 2017 -0400 staging: lustre: uapi: remove userland version of obd_ioctl_*() The header lustre_ioctl.h has both kernel and user space versions of obd_ioctl_*() functions. Lets remove the user land version which have been integrated into the lustre tools. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_ioctl.h | 87 ---------------------- 1 file changed, 87 deletions(-) commit 11dc946720efe5360cb9e3a82f0e4ce40c138f3b Author: James Simmons Date: Sat Aug 19 22:26:00 2017 -0400 staging: lustre: uapi: remove unused function in lustre_disk.h Delete code that is used by only the server or just in user land. Now this file is a normal kernel header. The UAPI version of this header is only needed for server side so no need to create a new header in uapi directory. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/25194 Reviewed-by: Dmitry Eremin Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_disk.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 071277d9c51251671f274c11896be8224fc9536d Author: Ben Evans Date: Sat Aug 19 22:25:59 2017 -0400 staging: lustre: uapi: move lu_fid, ost_id funcs out of lustre_idl.h Move lu_fid functions into lustre/lustre_fid.h Move ost_id functions into lustre/lustre_ostid.h Fix indenting, include new headers as needed. Several inline functions in the header lustre_ostid.h are using debug macros instead of returning proper errors. Remove the debug macros and properly handle the returned error codes. Place both UAPI headers lustre_fid.h and lustre_ostid.h into the uapi directory. Signed-off-by: Ben Evans Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22712 Reviewed-on: https://review.whamcloud.com/24569 Reviewed-by: James Simmons Reviewed-by: Frank Zago Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/uapi/linux/lustre/lustre_fid.h | 293 +++++++++++ .../include/uapi/linux/lustre/lustre_ostid.h | 237 +++++++++ .../lustre/lustre/include/lustre/lustre_idl.h | 541 +-------------------- drivers/staging/lustre/lustre/include/lustre_fid.h | 49 +- drivers/staging/lustre/lustre/include/lustre_fld.h | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 + 7 files changed, 587 insertions(+), 538 deletions(-) commit 8d2003883ec5b3f25c57e394979f803640a7217c Author: Ben Evans Date: Sat Aug 19 22:25:58 2017 -0400 staging: lustre: uapi: update URL doc link in lustre_fid.h The wiki has been revived so update the URL about the FID design in lustre_fid.h. Signed-off-by: Ben Evans Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22712 Reviewed-on: https://review.whamcloud.com/24569 Reviewed-by: James Simmons Reviewed-by: Frank Zago Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d2fa4cbf32ed385fd7364469cce6d390ba5602d Author: Ben Evans Date: Sat Aug 19 22:25:57 2017 -0400 staging: lustre: uapi: return error code for ostid_set_id Currently the function ostid_set_id() just logs an error and just keeps going. This function is also used by user land tools so having special lustre kernel debugging code is not desired. So instead just return an error code and have the calling kernel code print the error instead. Signed-off-by: Ben Evans Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22712 Reviewed-on: https://review.whamcloud.com/24569 Reviewed-by: James Simmons Reviewed-by: Frank Zago Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 23 ++++++++-------------- .../staging/lustre/lustre/obdecho/echo_client.c | 7 +++++-- drivers/staging/lustre/lustre/osc/osc_object.c | 9 ++++++++- 3 files changed, 21 insertions(+), 18 deletions(-) commit 3c42fb123493284aa99638ed2e116ab4d666efc1 Author: James Simmons Date: Sat Aug 19 22:25:56 2017 -0400 staging: lustre: uapi: remove unused functions for lustre_fid.h The inline function fid_is_namespace_visible and ost_fid_from_resid are only used for server code so we can remove it. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_fid.h | 29 ---------------------- 1 file changed, 29 deletions(-) commit 22c147fdd9dec9e2942eabcbd84c59698beea626 Author: Ben Evans Date: Sat Aug 19 22:25:55 2017 -0400 staging: lustre: uapi: Move functions out of lustre_idl.h Migrate functions set/get_mrc_cr_flags, ldlm_res_eq ldlm_extent_overlap, ldlm_extent_contain, ldlm_request_bufsize, and all the PTLRPC dump_* functions out of lustre_idl.h which is a UAPI header to the places in the kernel code they are actually used. Delete unused lmv_mds_md_stripe_count and agent_req_in_final_state. Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: http://review.whamcloud.com/21484 Reviewed-by: Frank Zago Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 73 ---------------------- drivers/staging/lustre/lustre/include/lustre_dlm.h | 13 ++++ .../staging/lustre/lustre/include/lustre_swab.h | 6 ++ drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 6 ++ drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 27 ++++++++ drivers/staging/lustre/lustre/mdc/mdc_lib.c | 6 ++ 6 files changed, 58 insertions(+), 73 deletions(-) commit f942efe73ab17798d23a8e09884338561a24c41f Author: Colin Ian King Date: Tue Aug 22 13:51:08 2017 +0100 staging: r8822be: fix a couple of spelling mistakes Trivial fixes to spelling mistake in pr_err error messages: errorr -> error mismactch -> mismatch Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 +- .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 53b70e5c2ed60135e2b6262bd4f95faddc10a00a Author: Colin Ian King Date: Tue Aug 22 17:02:18 2017 +0100 staging: typec: tcpm: make function tcpm_get_pwr_opmode The function pointer tcpm_get_pwr_opmode is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'tcpm_get_pwr_opmode' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac985b6cd9340bf5c9550edd86e1f94e48cabb63 Author: Srishti Sharma Date: Sun Aug 20 07:14:55 2017 +0530 Staging: fsl-dpaa2: ethernet: dpni.c: Fixed alignment to match open parenthesis. Fixed alignment so that it matched open parenthesis Signed-off-by: Srishti Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccc5d98ae06a6da39c68db2338ce7902765b79f9 Author: Arvind Yadav Date: Mon Aug 21 10:28:24 2017 +0530 staging: greybus: audio: constify snd_soc_dai_ops structures snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by work with const snd_soc_dai_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a27e3e09d2f846905163eb967884a1efb8e6462 Author: Eames Trinh Date: Tue Aug 22 00:11:37 2017 +0200 Staging: greybus: Fix spelling error in comment Fixed a spelling error. Signed-off-by: Eames Trinh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0be5dec503650bebcd070852dd6c0a879773ebc6 Author: Randy Dunlap Date: Tue Aug 22 08:51:09 2017 -0700 staging: rtlwifi: fix multiple build errors Fix many build errors when NETDEVICES is not enabled. Signed-off-by: Randy Dunlap Cc: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cffda2575168054c6c7871fd076f415b49bb547 Author: Klaus Goger Date: Fri Aug 18 21:34:42 2017 +0200 dt-bindings: add amc6821, isl1208 trivial bindings TI AMC6821 fan controller and Intersil ISL1208 are trivial devices, so add them to the binding list. Signed-off-by: Klaus Goger Signed-off-by: Rob Herring Documentation/devicetree/bindings/trivial-devices.txt | 2 ++ 1 file changed, 2 insertions(+) commit a757ebd95114d92ccf9815116eb7f54dbf3f9de0 Author: Klaus Goger Date: Fri Aug 18 21:34:41 2017 +0200 dt-bindings: add vendor prefix for Theobroma Systems Theobroma Systems is a design house specialized in embedded systems and a manufacturer of system-on-modules. Signed-off-by: Klaus Goger Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit be2d026f619906ad94c9a1dbb45e03839ca5dc76 Author: Andy Yan Date: Tue Aug 22 21:13:30 2017 +0800 ARM: dts: rockchip: add cpu power supply for rv1108 evb The cpu is powered by regulator vdd_core on RV1108 evalution board. Add it to the cpu dt node. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108-evb.dts | 4 ++++ 1 file changed, 4 insertions(+) commit cd36c3a21a400cac9c457394b9adf94e0027c136 Author: Daniel Borkmann Date: Wed Aug 23 00:06:09 2017 +0200 bpf: fix map value attribute for hash of maps Currently, iproute2's BPF ELF loader works fine with array of maps when retrieving the fd from a pinned node and doing a selfcheck against the provided map attributes from the object file, but we fail to do the same for hash of maps and thus refuse to get the map from pinned node. Reason is that when allocating hash of maps, fd_htab_map_alloc() will set the value size to sizeof(void *), and any user space map creation requests are forced to set 4 bytes as value size. Thus, selfcheck will complain about exposed 8 bytes on 64 bit archs vs. 4 bytes from object file as value size. Contract is that fdinfo or BPF_MAP_GET_FD_BY_ID returns the value size used to create the map. Fix it by handling it the same way as we do for array of maps, which means that we leave value size at 4 bytes and in the allocation phase round up value size to 8 bytes. alloc_htab_elem() needs an adjustment in order to copy rounded up 8 bytes due to bpf_fd_htab_map_update_elem() calling into htab_map_update_elem() with the pointer of the map pointer as value. Unlike array of maps where we just xchg(), we're using the generic htab_map_update_elem() callback also used from helper calls, which published the key/value already on return, so we need to ensure to memcpy() the right size. Fixes: bcc6b1b7ebf8 ("bpf: Add hash of maps support") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 38baa5a90c61c5a9105f6e649c7ac8542fc3ce5a Author: Andy Yan Date: Tue Aug 22 21:11:55 2017 +0800 ARM: dts: rockchip: add cpu opp table for rv1108 Add cpu opp table for rv1108 to support frequency from 408MHZ to 1008MHZ. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 955bebde057e71b6f29b97b78c027efdd596e62d Author: Heiko Stuebner Date: Mon Aug 21 17:50:20 2017 +0200 arm64: dts: rockchip: add rk3328-rock64 board The ROCK64 is a credit card size 4K60P HDR Media Board Computer using the Rockchip RK3328 Quad-Core ARM Cortex A53 64-Bit Processor and supporting up to 4GB 1600MHz LPDDR3 memory. It provides eMMC module socket, MicroSD Card slot, Pi-2 Bus, Pi-P5+ Bus, USB 3.0 and many others peripheral devices interface for makers to integrate with sensors and devices. The devicetree currently supports basic peripherals, with more to be added later on. Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 333 +++++++++++++++++++++ 3 files changed, 338 insertions(+) commit 13ed1501cbcf44ad4d9eddd0313e10eaba1f5753 Author: Sugar Zhang Date: Mon Aug 21 16:25:06 2017 +0800 arm64: dts: rockchip: add rk3328 pdm node This patch add pdm controller device node for rk3328. Signed-off-by: Sugar Zhang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 4a00aa057759d713e1296ecbc614fa560d569977 Author: Colin Ian King Date: Tue Aug 22 23:46:06 2017 +0100 MIPS,bpf: fix missing break in switch statement There is a missing break causing a fall-through and setting ctx.use_bbit_insns to the wrong value. Fix this by adding the missing break. Detected with cppcheck: "Variable 'ctx.use_bbit_insns' is reassigned a value before the old one has been used. 'break;' missing?" Fixes: 8d8d18c3283f ("MIPS,bpf: Fix using smp_processor_id() in preemptible splat.") Signed-off-by: Colin Ian King Acked-by: David Daney Signed-off-by: David S. Miller arch/mips/net/ebpf_jit.c | 1 + 1 file changed, 1 insertion(+) commit 47884c5c746ee7c02e06fbf60480e0f13aa11dfe Author: Neil Armstrong Date: Fri Aug 4 15:38:04 2017 +0200 ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names This patch describes the GPIO lines usage on the LibreTech CC board. This is useful in the debugfs gpio file and using the cdev gpio API. Signed-off-by: Neil Armstrong [khilman: minor whiespace fix] Signed-off-by: Kevin Hilman .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 4db26f83a7a1f8b844e4543cd82a87bee1d224e2 Merge: b16c71c aae4e7a Author: Kevin Hilman Date: Tue Aug 22 15:37:31 2017 -0700 Merge tag 'v4.13-rc4' into v4.14/dt64 Linux 4.13-rc4 commit b16c71c9f6ff50d4e4398cefd9113d82ee2fe8e6 Author: Neil Armstrong Date: Fri Aug 4 15:12:13 2017 +0200 ARM64: dts: meson-gx: Add AO CEC nodes This patch adds the AO CEC node in all the HDMI enabled boards DTS. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++ arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 8 +++++++- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 7 +++++++ 13 files changed, 86 insertions(+), 1 deletion(-) commit 7fd2c355a2728153f07e5920e140049ba27d0daa Author: Neil Armstrong Date: Fri Aug 4 15:12:12 2017 +0200 ARM64: dts: meson-gx: update AO clkc to new bindings The AO clkc needs to be updated to new bindings with an system control parent node and moving the clkc node as subnode. Also adds the SoC specific compatible following the bindings requirements. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 14 +++++++++----- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 4 ++++ 4 files changed, 21 insertions(+), 5 deletions(-) commit 58308abae892dc6fdcb8c0879829e65fce354c6e Merge: f72d6f6 596f2b7 Author: Kevin Hilman Date: Tue Aug 22 15:29:59 2017 -0700 Merge tag 'meson-clk-headers-for-4.14' of git://github.com/BayLibre/clk-meson into v4.14/dt64 Amlogic clock headers updates for 4.14 * meson8b: add the reset controller to the clkc * meson: expose all clk ids * gxbb-aoclk: Add CEC 32k clock * gxbb: add mmc input 0 clocks * meson: fix protection against undefined clks * tag 'meson-clk-headers-for-4.14' of git://github.com/BayLibre/clk-meson: dt-bindings: clock: gxbb-aoclk: Add CEC 32k clock clk: meson: gxbb: Add sd_emmc clk0 clkids clk: meson-gxbb: expose almost every clock in the bindings clk: meson8b: expose every clock in the bindings clk: meson: gxbb: fix protection against undefined clks clk: meson: meson8b: fix protection against undefined clks dt-bindings: clock: meson8b: describe the embedded reset controller commit aa5ebdeb5d9e5be183721d5105769ad6240d5981 Author: David Kershner Date: Tue Aug 22 13:27:36 2017 -0400 staging: unisys: use ATTRIBUTE_GROUPS instead of creating our own Greg noticed that we were creating our own attribute groups, instead of using the ATTRIBUTE_GROUPS macro, this patch fixes our mistake. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 33 ++++--------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit b74856b4193be752493fa80809abdba508cb3365 Author: Sameer Wadgaonkar Date: Tue Aug 22 13:27:35 2017 -0400 staging: unisys: visorbus: Get rid of passthrough function visorchipset_device_destroy The function visorchipset_device_destroy just called remove_visor_device, we can just combine it with remove_visor_device. 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 | 9 ++------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) commit 51c0f81cca9dbe01c1bada3db62daef839431175 Author: Sameer Wadgaonkar Date: Tue Aug 22 13:27:34 2017 -0400 staging: unisys: visorbus: Get rid of passthrough function visorchipset_device_create The function visorchipset_device_create just called create_visor_device, we can just combine it with create_visor_device. 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 | 18 +++--------------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 3 files changed, 6 insertions(+), 18 deletions(-) commit a7093ba162d942e29ae27a64f8432db65f7f21ab Author: Sameer Wadgaonkar Date: Tue Aug 22 13:27:33 2017 -0400 staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_destroy The function visorchipset_bus_destroy just called viosrbus_remove_instance, we can just combine it with visorbus_remove_instance. 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 | 9 ++------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) commit 17d3208c3fda752a4e15ba3549d7a1d88f47b0b2 Author: David Binder Date: Tue Aug 22 13:27:32 2017 -0400 staging: unisys: include: iochannel.h: Add proper copyright statement Adds the proper Unisys copyright statement to the top of iochannel.h. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit f1aa6b81b2ca2cb98cf4e5ebf13b3663d86c2336 Author: David Binder Date: Tue Aug 22 13:27:31 2017 -0400 staging: unisys: visorinput: ultrainputreport.h: Adjust comment formatting The first line of the top file comment should begin on the line following the block comment opening, thereby following the convention used elsewhere in the driver set. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/ultrainputreport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 761b02d8f12e2502b0df8574e6ac1fcd03df1445 Author: David Binder Date: Tue Aug 22 13:27:30 2017 -0400 staging: unisys: visorhba: Adjust top comment formatting The first line of the top file comment should begin on the line following the block comment opening, thereby following the convention used elsewhere in the driver set. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dba1a0a3c84f1dee63139324d60b0dbb0258acb7 Author: David Binder Date: Tue Aug 22 13:27:29 2017 -0400 staging: unisys: include: visorbus.h: Remove filename in top comment Removes unnecessary filename in the top file comment. 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 | 2 -- 1 file changed, 2 deletions(-) commit 81d3817e857e77ee38cebaa72bcd23ec8bfd785d Author: David Binder Date: Tue Aug 22 13:27:28 2017 -0400 staging: unisys: visorinput: visorinput.c: Remove filename in top comment Removes unnecessary filename in the top file comment. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa96c883da75ae638039b34e5413e2ebf6e8f732 Author: David Binder Date: Tue Aug 22 13:27:27 2017 -0400 staging: unisys: visorbus: visorchannel.c: Remove filename in top comment Removes unnecessary filename in the top file comment. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 66207a336c0b12be5a2eba2df223895a921e2d72 Author: David Binder Date: Tue Aug 22 13:27:26 2017 -0400 staging: unisys: visorbus: visorbus_main.c: Remove filename in top comment Removes unnecessary filename in the top file comment. Signed-off-by: David Binder 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, 2 deletions(-) commit 6df555c13c156017eb93fe4e599058dd12e71369 Author: David Binder Date: Tue Aug 22 13:27:25 2017 -0400 staging: unisys: visorbus: visorchipset.c: Fix SonarQube sprintf findings Fixes two sprintf invocations where we attempt to format an unsigned integer as a signed integer. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df47f0ae9878567bdd33e36f424e3dde0aa88464 Author: David Kershner Date: Tue Aug 22 13:27:07 2017 -0400 staging: unisys: include: iochannel.h: Update comments for #defines Cleaned up some #defines to make the beginning of the file read easier. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fdf5b9ac3e8e91516a85ee43d3b9d63b40639e94 Author: David Kershner Date: Tue Aug 22 13:27:24 2017 -0400 staging: unisys: visorbus: Get rid of passthrough function visorchipset_bus_create The function visorchipset_bus_create just called visorbus_create_instance, we should just combine it with visorbus_create_instance. Reviewed-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 | 19 ++++--------------- drivers/staging/unisys/visorbus/visorbus_private.h | 3 +-- drivers/staging/unisys/visorbus/visorchipset.c | 5 ++--- 3 files changed, 7 insertions(+), 20 deletions(-) commit b253ff5bf8a461812b32be9ed4f8956f94f61fa5 Author: David Kershner Date: Tue Aug 22 13:27:23 2017 -0400 staging: unisys: reference bus_no and dev_no directly Don't store it in a local variable but reference it from the visor_device. Reviewed-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, 2 insertions(+), 4 deletions(-) commit 727bb6485e1db639621eb3d96d7fb067b07810db Author: David Kershner Date: Tue Aug 22 13:27:22 2017 -0400 staging: unisys: don't copy to local variable Do the check with the values in the structure instead of copying them to local variables. Reviewed-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, 2 insertions(+), 4 deletions(-) commit f51963f54d9f5f82f721c6bbf8785a58d29d3fdd Author: David Kershner Date: Tue Aug 22 13:27:21 2017 -0400 staging: unisys: visorbus: Remove confusing comment in controlvmchannel. Referencing a SegmentIndex doesn't make sense in the Linux drivers, get rid of the comment. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 1 - 1 file changed, 1 deletion(-) commit f79e1dfdbcd8e3d6aa2ae1760f2ef272b04e0f4f Author: David Kershner Date: Tue Aug 22 13:27:20 2017 -0400 staging: unisys: Move SIOVM guid to visorbus The SIOVM guid is only used by visorchipset. So define it there instead of a global header file. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 5 ----- drivers/staging/unisys/visorbus/visorchipset.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit 2c1d9820768f80525067fd51f1ae45d5475c0429 Author: David Kershner Date: Tue Aug 22 13:27:19 2017 -0400 staging: unisys: Move VNIC GUID to visornic Instead of including it in the global channel.h, move the VNIC GUID to the visornic module. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 6 ------ drivers/staging/unisys/visornic/visornic_main.c | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) commit 2699f21ab5a24410affa86533043905b23bbee0c Author: David Kershner Date: Tue Aug 22 13:27:18 2017 -0400 staging: unisys: include: remove unnecessary blank line from channel.h Remove unnecessary blank line from channel.h #defines. Reviewed-by: Sameer Wadgaonkar 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 8c3f22c28c9f1da65b79f030f4b44c72318cf1aa Author: David Kershner Date: Tue Aug 22 13:27:17 2017 -0400 staging: unisys: visorinput: Get rid of unused includes Cleanups caused us to not need to include a bunch of headers, got rid of them. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 3 --- 1 file changed, 3 deletions(-) commit 264f19b30b29bb99a655d99dfc0dc310f050cff8 Author: David Kershner Date: Tue Aug 22 13:27:16 2017 -0400 staging: unisys: include: iochannel needs to include skbuff The iochannel.h header file references ETH_HLEN which is defined in skbuff. Removed it from visorhba since it was no longer needed. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 1 + drivers/staging/unisys/visorhba/visorhba_main.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 351c51e37cf32d3529e9b6aebca3c69bc982a5de Author: David Kershner Date: Tue Aug 22 13:27:15 2017 -0400 staging: unisys: visorbus: Remove unnecessary includes for visorchipset.c Visorchipset.c was including unnecessary include files, either included by other headers or not needed at all. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit ab3807d92f806f52aff8acb1a717f02f1e3b81f8 Author: David Kershner Date: Tue Aug 22 13:27:14 2017 -0400 staging: unisys: visorbus: fix include dependency Due to include order, the visorbus_private.h file was missing a required include header visorbus.h. If visorchipset.c or visorbus_main.c ever were to change the order of the includes for visobus.h and visorbus_private.h, the code would fail to compile. Reviewed-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 | 1 + 1 file changed, 1 insertion(+) commit d8d9556ff1985c582b4d362b9ab0763108d35f82 Author: David Kershner Date: Tue Aug 22 13:27:13 2017 -0400 staging: unisys: include: Remove unneeded includes from visorbus.h A bunch of code churn has caused the following include files to not be needed by visorbus.h: linux/poll.h linux/kernel.h linux/uuid.h linux/seq_file.h Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 4 ---- 1 file changed, 4 deletions(-) commit 97cd8aaa09a7176ebd4873abca50e193ac2280e5 Author: David Kershner Date: Tue Aug 22 13:27:12 2017 -0400 staging: unisys: include: Remove unnecessary forward declaration The struct visor_device had a forward declaration that was not needed. Remove it. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 1 - 1 file changed, 1 deletion(-) commit a595a7ff8bb368c14830cf5384b8abffae20d1e9 Author: David Kershner Date: Tue Aug 22 13:27:11 2017 -0400 staging: unisys: include: Fix up comment style in visorbus.h Visorbus.h had comments that did not have /* on its own line, this patch makes it uniform. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 48401ac61fd7ca9d9bd9f033c85d2b78802c8973 Author: David Kershner Date: Tue Aug 22 13:27:10 2017 -0400 staging: unisys: include: cleanup channel comment A comment in channel.h was referencing windows guests, in reality the OS of the guest is agnostic and the comment should reflect that. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0b9e41bdc3699de5a51ebb1f9ca9c17ec12226b0 Author: David Kershner Date: Tue Aug 22 13:27:09 2017 -0400 staging: unisys: include: Remove unused throttling defines. We no longer send messages directly to the s-Par event log, so we do not need the throttling defines anymore. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 17 ----------------- 1 file changed, 17 deletions(-) commit a941c5b76adb55b741f8f7a744e642322c3ec212 Author: David Kershner Date: Tue Aug 22 13:27:08 2017 -0400 staging: unisys: include: Remove unused vdiskmgmt commands The vdisk task management commands are no longer used by s-Par, this patch removes the definitions for them. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 32 ------------------------------ 1 file changed, 32 deletions(-) commit d4999465c9170cec76f0b6d571480c48df3900dd Author: David Kershner Date: Tue Aug 22 13:27:05 2017 -0400 staging: unisys: include: Remove unused #define MAXNUM The MAXNUM #define was not being used, and it shouldn't be used. Remove it. Reviewed-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 1 - 1 file changed, 1 deletion(-) commit 722e73d55feeb4e9ae5d2aef455f6e382c43095b Author: Sameer Wadgaonkar Date: Tue Aug 22 13:27:04 2017 -0400 staging: unisys: visorbus: merging the visorbus_device_pause_response and visorbus_device_resume_response functions into one. The functions viosrbus_device_pause_response() and viosrbus_device_resume_response() are functionally similar. Merging these functions into a single function called visorbus_device_changestate_response(). 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 | 6 ++++-- drivers/staging/unisys/visorbus/visorbus_private.h | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 19 ++++--------------- 3 files changed, 10 insertions(+), 19 deletions(-) commit 76956aa7be7e85b7653adae2dad0a81b959c6247 Author: Sameer Wadgaonkar Date: Tue Aug 22 13:27:03 2017 -0400 staging: unisys: visorbus: merging the visorbus_*_response functions into one. The functions visorbus_create_response(), visorbus_destroy_response(), viosrbus_device_create_response(), viosrbus_device_destroy_response() are all functionally similar. Merging these four functions into a single function called visorbus_response(). 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 | 10 +++--- drivers/staging/unisys/visorbus/visorbus_private.h | 5 +-- drivers/staging/unisys/visorbus/visorchipset.c | 41 ++-------------------- 3 files changed, 10 insertions(+), 46 deletions(-) commit 55515a30d2e583908145817df2fdf31fa04b4401 Author: Steven Matthews Date: Tue Aug 22 13:27:02 2017 -0400 staging: unisys: include: fix improper use of dma_data_direction Replace use of standard Linux dma_data_direction with a Unisys- specific uis_dma_data_direction and provide a function to convert from the latter to the former. This is necessary because Unisys s-Par depends on the exact format of this field in multiple OSs and languages, and so using the standard version creates an unnecessary dependency between the kernel and s-Par. Signed-off-by: Steven Matthews Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 15 +++++++++++--- drivers/staging/unisys/visorhba/visorhba_main.c | 26 ++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 4 deletions(-) commit 12cbd490435ceef86828f66011ece4187a2cbb7d Author: David Binder Date: Tue Aug 22 13:27:01 2017 -0400 staging: unisys: visorbus: Remove unnecessary comments Removes comments that do not provide any valuable information. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit c8684a9d870bfcb16db44bf23c22fd512f9b5289 Author: David Binder Date: Tue Aug 22 13:27:00 2017 -0400 staging: unisys: visorbus: Merge vmcallinterface.h into visorchipset.c The contents of vmcallinterface.h are better placed within visorchipset.c from an organizational perspective. The values are only used in that file. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 42 +++++++++++++++- drivers/staging/unisys/visorbus/vmcallinterface.h | 61 ----------------------- 2 files changed, 41 insertions(+), 62 deletions(-) commit c02c6a0c97f7e58b6914fe0bcaba6a53dcb6a673 Author: Sameer Wadgaonkar Date: Tue Aug 22 13:26:59 2017 -0400 staging: unisys: visornic: visornic_main.c: fix multiline dereference. This patch fixes two checkpatch warnings in the visornic_main.c file to avoid multiline dereference. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5ea5c64b5164e6f70fa45006db7371ada2c97183 Author: Sameer Wadgaonkar Date: Tue Aug 22 13:26:58 2017 -0400 staging: unisys: visornic: update the struct visornic_devdata comments Cleaned up the in-line comments in the structure and added a single block comment for the structure. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 86 ++++++++++++++++++------- 1 file changed, 61 insertions(+), 25 deletions(-) commit e80ffd4b2725d44dd3e98fffffcd30f2c8ac5c99 Author: Charles Daniels Date: Tue Aug 22 13:26:57 2017 -0400 staging: unisys: visorbus: fix multi-line function definition Fixed incorrectly styled function definitions in visorbus/visorchipset.c by placing the function names on the same line as the return. Signed-off-by: Charles Daniels Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 150 ++++++++++--------------- 1 file changed, 61 insertions(+), 89 deletions(-) commit eb30ed5881ec47f57215122e3e7db1a19f9d73a4 Author: Mark Foresta Date: Tue Aug 22 13:26:56 2017 -0400 staging: unisys: visorbus: visorbus_private.h remove filename Remove the filename in the comment at the beginning of the file. Signed-off-by: Mark Foresta Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f77a2eef1f8720899cd6459143d048d6c09716e Author: Mark Foresta Date: Tue Aug 22 13:26:55 2017 -0400 staging: unisys: visorbus: Update comment style vbuschannel.h Moved blocked comment on to own line at beginning of struct to follow standard. Since this is an internal structure, the block comment isn't actually a kernel-doc so we only start the block with one asterisk. Signed-off-by: Mark Foresta Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b32c5cb84fd0c4539227b5973d378111e35bd9c5 Author: Andy Shevchenko Date: Tue Aug 22 13:26:54 2017 -0400 staging: unisys: Switch to use new generic UUID API There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. While here, re-indent couple of lines to increase readability. Cc: David Kershner Cc: Greg Kroah-Hartman Cc: sparmaintainer@unisys.com Cc: devel@driverdev.osuosl.org Signed-off-by: Andy Shevchenko Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/Documentation/overview.txt | 14 +++---- drivers/staging/unisys/include/channel.h | 29 ++++++-------- drivers/staging/unisys/include/iochannel.h | 2 +- drivers/staging/unisys/include/visorbus.h | 14 +++---- drivers/staging/unisys/visorbus/controlvmchannel.h | 16 ++++---- drivers/staging/unisys/visorbus/vbuschannel.h | 8 ++-- drivers/staging/unisys/visorbus/visorbus_main.c | 44 ++++++++++----------- drivers/staging/unisys/visorbus/visorbus_private.h | 6 +-- drivers/staging/unisys/visorbus/visorchannel.c | 46 +++++++++++----------- drivers/staging/unisys/visorbus/visorchipset.c | 33 +++++++++------- drivers/staging/unisys/visorhba/visorhba_main.c | 6 +-- drivers/staging/unisys/visorinput/visorinput.c | 38 +++++++++--------- drivers/staging/unisys/visornic/visornic_main.c | 6 +-- 13 files changed, 130 insertions(+), 132 deletions(-) commit ab61097c7664b108cada2a734a5abfea0883a2ad Author: Zohaib Javed Date: Tue Aug 22 13:26:53 2017 -0400 staging: unisys: visorbus: Adding a new line between function definition Added a new line before issue_vmcall_io_controlvm_addr() function definition. Signed-off-by: Zohaib Javed Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 1 + 1 file changed, 1 insertion(+) commit 30f82e1ce55bbcf5037853397ba61e2161035a57 Author: Zohaib Javed Date: Tue Aug 22 13:26:52 2017 -0400 staging: unisys: include: iochannel.h: Removed unused DEFINE Removed unused #define GPI_ENTRIES_PER_PAGE Signed-off-by: Zohaib Javed Signed-off-by: David Kershner Reviewed-by: David Binder Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 2 -- 1 file changed, 2 deletions(-) commit e517857b19a61655bcb4f59621aafeb472453376 Author: Zohaib Javed Date: Tue Aug 22 13:26:51 2017 -0400 staging: unisys: visorbus: remove filename from beginning of file The filename was in a comment at the beginning of the file. It is not needed. Signed-off-by: Zohaib Javed Signed-off-by: David Kershner Reviewed-by: David Binder 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 9695fe6f21e3b06a7086f62851c0df16369fc223 Author: Eric Dumazet Date: Tue Aug 22 12:26:46 2017 -0700 net: sched: use kvmalloc() for class hash tables High order GFP_KERNEL allocations can stress the host badly. Use modern kvmalloc_array()/kvfree() instead of custom allocations. Signed-off-by: Eric Dumazet Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/sched/sch_api.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 153890b41b0ad467a89a77d48bb96f6bc3b14120 Author: Arvind Yadav Date: Tue Aug 22 23:41:12 2017 +0530 net: amd: constify zorro_device_id zorro_device_id are not supposed to change at runtime. All functions working with zorro_device_id provided by work with const zorro_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/net/ethernet/amd/a2065.c | 2 +- drivers/net/ethernet/amd/ariadne.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9142b673a75743f6530d076125233b9add531f4c Merge: 84e54fe 7afe461 Author: David S. Miller Date: Tue Aug 22 14:32:20 2017 -0700 Merge branch 'net-mvpp2-MAC-GoP-configuration' Antoine Tenart says: ==================== net: mvpp2: MAC/GoP configuration This is based on net-next (e2a7c34fb285). I removed the GoP interrupt and PHY optional parts in this v2 to ease the review process as the MAC/GoP initialization seemed to start less discussions :) This series now only aims at making the PPv2 driver less depending on the firmware/bootloader initialization. Some patches cleanup some parts as well, and add new interface descriptions in the dt. The current implementation of the PPv2 driver relies on the firmware/bootloader initialization to configure some parts, as the Group of Ports (GoP) and the MACs (GMAC and/or XLG MAC --for 10G--). The drawback is the kernel must be configured to match exactly what the bootloader configures which is not convenient and is an issue when using boards having an Ethernet port and an SFP port wired to the same GoP port, as no dynamic configuration can be done. This series adds the GoP and GMAC/XLG MAC initializations so that the PPV2 does not have to rely on a previous initialization. One part is still missing from this series, and that would be the 'comphy' which provides shared serdes PHYs and which must be configured as well for a full kernel initialization to work. This comphy support will be part of a following up series. (This series was also tested with this 'comphy' support, as it's nearly ready). @Dave: patches 9 and 10 should go through the mvebu tree. Thanks! ==================== Signed-off-by: David S. Miller commit 7afe461ee64c03a857adfc146fcda1c98bb6a8ca Author: Antoine Ténart Date: Tue Aug 22 19:08:28 2017 +0200 Documentation/bindings: net: marvell-pp2: add the system controller This patch documents the new marvell,system-controller property used by the Marvell ppv2 network driver. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed, 1 insertion(+) commit f84bf386f3956c4a02c773a59c9c61033c00a5b5 Author: Antoine Ténart Date: Tue Aug 22 19:08:27 2017 +0200 net: mvpp2: initialize the GoP The patch adds GoP (group of ports) initialization functions. The mvpp2 driver was relying on the firmware/bootloader initialization; this patch moves this setup to the mvpp2 driver. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 170 +++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) commit 76eb1b1de5b6467c78bb72311dbf29eea1f10a3a Author: Stefan Chulski Date: Tue Aug 22 19:08:26 2017 +0200 net: mvpp2: set maximum packet size for 10G ports Set maximum packet size for XLG 10G ports. Missing maximum packet size for XLG configuration will cause kernel panic if oversized packet is received by port. Signed-off-by: Stefan Chulski Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 77321959feb9bdcfeeb2a2154d6fb831fb1991c2 Author: Antoine Ténart Date: Tue Aug 22 19:08:25 2017 +0200 net: mvpp2: initialize the XLG MAC when using a port This adds a routine to initialize the XLG MAC at the port level when using a port and the XAUI/10GKR interface mode. This wasn't done until this commit, and the mvpp2 driver was relying on the bootloader/firmware initialization. This doesn't mean everything is configured in the mvpp2 driver now, but it helps reducing the gap. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3919357fb0bbdbc18366cf59cbf0f16c608f81fe Author: Antoine Ténart Date: Tue Aug 22 19:08:24 2017 +0200 net: mvpp2: initialize the GMAC when using a port This adds a routine to initialize the GMAC at the port level when using a port. This wasn't done until this commit, and the mvpp2 driver was relying on the bootloader/firmware initialization. This doesn't mean everything is configured in the mvpp2 driver now, but it helps reducing the gap. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 123 ++++++++++++++++++++++++++++------- 1 file changed, 98 insertions(+), 25 deletions(-) commit 2055d6268d755fdc3f96f1d0bbf22c6164dacfbf Author: Antoine Ténart Date: Tue Aug 22 19:08:23 2017 +0200 net: mvpp2: move the mii configuration in the ndo_open path This moves the mii configuration in the ndo_open path, to allow handling different mii configurations later and to switch between these configurations at runtime. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1068ec79d9cb5481ccfa6ffacdcf174636227b5d Author: Antoine Ténart Date: Tue Aug 22 19:08:22 2017 +0200 net: mvpp2: fix the synchronization module bypass macro name The macro defining the bit to toggle to bypass or not the synchronization module is wrongly named. Writing 1 will disable bypass. This patch s/MVPP22_CTRL4_SYNC_BYPASS/MVPP22_CTRL4_SYNC_BYPASS_DIS/. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81b6630ff7210356fe1843572543c76674e90450 Author: Antoine Ténart Date: Tue Aug 22 19:08:21 2017 +0200 net: mvpp2: unify register definitions coding style Cosmetic patch to use the same formatting rules on all register definitions. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 88 ++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) commit 84e54fe0a5eaed696dee4019c396f8396f5a908b Author: William Tu Date: Tue Aug 22 09:40:28 2017 -0700 gre: introduce native tunnel support for ERSPAN The patch adds ERSPAN type II tunnel support. The implementation is based on the draft at [1]. One of the purposes is for Linux box to be able to receive ERSPAN monitoring traffic sent from the Cisco switch, by creating a ERSPAN tunnel device. In addition, the patch also adds ERSPAN TX, so Linux virtual switch can redirect monitored traffic to the ERSPAN tunnel device. The traffic will be encapsulated into ERSPAN and sent out. The implementation reuses tunnel key as ERSPAN session ID, and field 'erspan' as ERSPAN Index fields: ./ip link add dev ers11 type erspan seq key 100 erspan 123 \ local 172.16.1.200 remote 172.16.1.100 To use the above device as ERSPAN receiver, configure Nexus 5000 switch as below: monitor session 100 type erspan-source erspan-id 123 vrf default destination ip 172.16.1.200 source interface Ethernet1/11 both source interface Ethernet1/12 both no shut monitor erspan origin ip-address 172.16.1.100 global [1] https://tools.ietf.org/html/draft-foschiano-erspan-01 [2] iproute2 patch: http://marc.info/?l=linux-netdev&m=150306086924951&w=2 [3] test script: http://marc.info/?l=linux-netdev&m=150231021807304&w=2 Signed-off-by: William Tu Signed-off-by: Meenakshi Vohra Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Signed-off-by: David S. Miller include/net/erspan.h | 61 ++++++++++ include/net/ip_tunnels.h | 3 + include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_tunnel.h | 1 + net/ipv4/ip_gre.c | 269 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 335 insertions(+) commit ab2fb7e3240d24c68f854aa1b972fe415d8d1b3e Author: Willem de Bruijn Date: Tue Aug 22 11:39:57 2017 -0400 udp: remove unreachable ufo branches Remove two references to ufo in the udp send path that are no longer reachable now that ufo has been removed. Commit 85f1bd9a7b5a ("udp: consistently apply ufo or fragmentation") is a fix to ufo. It is safe to revert what remains of it. Also, no skb can enter ip_append_page with skb_is_gso true now that skb_shinfo(skb)->gso_type is no longer set in ip_append_page/_data. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/ip_output.c | 12 ++++-------- net/ipv4/udp.c | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) commit 41a130f7c61d2adb303852d3fca938ad138a96d8 Author: Bhumika Goyal Date: Tue Aug 22 13:43:29 2017 +0530 net: mdio-gpio: make mdiobb_ops const Make this const as it is only stored in a const field of a mdiobb_ctrl structure. Signed-off-by: Bhumika Goyal Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94494733ba02653d376839cd6ebc761f0cefc4f2 Author: Bhumika Goyal Date: Tue Aug 22 13:45:59 2017 +0530 net: ethernet: freescale: fs_enet: make mdiobb_ops const Make this const as it is only stored in a const field of a mdiobb_ctrl structure. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58e0c0db85097923a46c5dae56d526f61b26c75e Author: Bhumika Goyal Date: Tue Aug 22 13:41:19 2017 +0530 net: ethernet: ax88796: make mdiobb_ops const Make this const as it is only stored in a const field of a mdiobb_ctrl structure. Signed-off-by: Bhumika Goyal Signed-off-by: David S. Miller drivers/net/ethernet/8390/ax88796.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d845ee1222b6ecc7fe59b24711f58b72c463938 Merge: 6c64793 1119936 Author: David S. Miller Date: Tue Aug 22 14:16:13 2017 -0700 Merge branch 'tcp_conn_request-cleanup' Tonghao Zhang says: ==================== tcp: Simplify the tcp_conn_request. Just simplify the tcp_conn_request function. ==================== Signed-off-by: David S. Miller commit 111993692741a7044e6c01b428cecf1071de3d0b Author: Tonghao Zhang Date: Mon Aug 21 23:33:49 2017 -0700 tcp: Remove the unused parameter for tcp_try_fastopen. Signed-off-by: Tonghao Zhang Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++---- net/ipv4/tcp_input.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) commit 49c71586a6a94de168a26ec454eb8ea282ddd827 Author: Tonghao Zhang Date: Mon Aug 21 23:33:48 2017 -0700 tcp: Get a proper dst before checking it. tcp_peer_is_proven needs a proper route to make the determination, but dst always is NULL. This bug may be there at the beginning of git tree. This does not look serious enough to deserve backports to stable versions. Signed-off-by: Tonghao Zhang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6c64793514ca32a90f6f8d955bdf822782cc3313 Merge: 0580b53 3b0c345 Author: David S. Miller Date: Tue Aug 22 14:08:12 2017 -0700 Merge branch 'hv_netvsc-Ethtool-handler-to-change-UDP-hash-levels' Haiyang Zhang says: ==================== hv_netvsc: Ethtool handler to change UDP hash levels The patch set adds the functions to switch UDP hash level between L3 and L4 by ethtool command. UDP 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. The ethtool callback function is triggered by command line, and update the per device variables of the hash level. On Azure, fragmented UDP packets is not yet supported with L4 hashing, and may have high packet loss rate. Using L3 hashing is recommended in this case. This ethtool option allows a user to make this selection. ==================== Signed-off-by: David S. Miller commit 3b0c34580b7ab9bb1d4a375e427af6a75ca45821 Author: Haiyang Zhang Date: Mon Aug 21 19:22:40 2017 -0700 hv_netvsc: Update netvsc Document for UDP hash level setting Update Documentation/networking/netvsc.txt for UDP hash level setting and related info. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller Documentation/networking/netvsc.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 4823eb2f3af44e2b9f7f02bed5a211e9ce79051f Author: Haiyang Zhang Date: Mon Aug 21 19:22:39 2017 -0700 hv_netvsc: Add ethtool handler to set and get UDP hash levels The patch add the functions to switch UDP hash level between L3 and L4 by ethtool command. UDP 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. On Azure, fragmented UDP packets have high loss rate with L4 hashing. Using L3 hashing is recommended in this case. For example, for UDP over IPv4 on eth0: To include UDP port numbers in hasing: ethtool -N eth0 rx-flow-hash udp4 sdfn To exclude UDP port numbers in hasing: ethtool -N eth0 rx-flow-hash udp4 sd To show UDP hash level: ethtool -n eth0 rx-flow-hash udp4 Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc_drv.c | 78 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 72 insertions(+), 8 deletions(-) commit 4c0e2cbfd9b519722529526f4d87f8aab3c32ffd Author: Haiyang Zhang Date: Mon Aug 21 19:22:38 2017 -0700 hv_netvsc: Clean up unused parameter from netvsc_get_rss_hash_opts() The parameter "nvdev" is not in use. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fcba1569a0c87cea40404af9a29b319f4e491839 Author: Haiyang Zhang Date: Mon Aug 21 19:22:37 2017 -0700 hv_netvsc: Clean up unused parameter from netvsc_get_hash() The parameter "sk" is not in use. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3bf14bdc17a8e917f337760cc7cacf3232d7dbc Author: Jason Gunthorpe Date: Mon Aug 14 14:57:39 2017 -0600 rdma: Autoload netlink client modules If a message comes in and we do not have the client in the table, then try to load the module supplying that client using MODULE_ALIAS to find it. This duplicates the scheme seen in other netlink muxes (eg nfnetlink). Signed-off-by: Jason Gunthorpe Reviewed-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/netlink.c | 9 +++++++++ drivers/infiniband/core/nldev.c | 3 +++ include/rdma/rdma_netlink.h | 12 ++++++++++++ 6 files changed, 30 insertions(+) commit 1eb5be0ec79a7b21cd6b5b73d9de294dc1809e0f Author: Jason Gunthorpe Date: Mon Aug 14 14:57:38 2017 -0600 rdma: Allow demand loading of NETLINK_RDMA Provide a module alias so that if userspace opens a netlink socket for RDMA the kernel support is loaded automatically. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/netlink.c | 3 +++ 1 file changed, 3 insertions(+) commit 8c934095fa2f336d92b722f49f78ca7abf47e051 Author: Faiz Abbas Date: Thu Aug 10 16:54:55 2017 +0530 PCI: dwc: Clear MSI interrupt status after it is handled, not before If the interrupt status is cleared before it is handled, it is possible that another interrupt will trigger while servicing the previous one. This is causing timeouts in some wireless lan cards which use PCIe. Clear MSI interrupt status after it gets serviced instead of before calling generic_handler. Signed-off-by: Faiz Abbas Signed-off-by: Bjorn Helgaas Acked-By: Joao Pinto drivers/pci/dwc/pcie-designware-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9105cdefbf64cd7aea300f934c92051e7cb7cff Author: Li Dongyang Date: Wed Aug 16 23:31:23 2017 +1000 IB/mlx4: use kvmalloc_array to allocate wrid We could use kvmalloc_array instead of the kmalloc and __vmalloc combination. After this we don't need to include linux/vmalloc.h Signed-off-by: Li Dongyang Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 15 ++++----------- drivers/infiniband/hw/mlx4/srq.c | 13 ++++--------- 2 files changed, 8 insertions(+), 20 deletions(-) commit b588300801f3502a7de5ca897af68019fbb3bc79 Author: Li Dongyang Date: Wed Aug 16 23:31:22 2017 +1000 IB/mlx5: use kvmalloc_array for mlx5_ib_wq We observed multiple times on our Lustre OSS servers that when the system memory is fragmented, kmalloc() in create_kernel_qp() could fail order 4/5 allocations while we still have many free pages. Switch to kvmalloc_array() to allow the operation to contine. Signed-off-by: Li Dongyang Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 35 ++++++++++++++++++++--------------- drivers/infiniband/hw/mlx5/srq.c | 4 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) commit a0d21ba120d2c7daae847633bb59a3c3375cc1d7 Author: Gustavo A. R. Silva Date: Wed Aug 9 11:16:03 2017 -0500 PCI: dra7xx: Propagate platform_get_irq() errors in dra7xx_pcie_probe() platform_get_irq() returns an error code, but the pci-dra7xx driver ignores it and always returns -EINVAL. This is not correct and prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq() on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-dra7xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7be05753ccc27ce056d45f06a50d150927a88ed7 Author: Selvin Xavier Date: Thu Aug 17 07:58:07 2017 -0700 RDMA: Fix return value check for ib_get_eth_speed() ib_get_eth_speed() return 0 on success. Fixing the condition checking and prevent reporting failure for query_port verb. Fixes: d41861942fc5 ("Add generic function to extract IB speed from netdev") Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++-- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit cad2be29978df5d27475890c153f20b8ee9f41d1 Merge: 34a0036 d9c51f4 Author: Greg Kroah-Hartman Date: Tue Aug 22 13:20:12 2017 -0700 Merge tag 'phy-for-4.14_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.14 *) Add USB PHY driver for Ralink SoC *) Make phy-mt65xx-usb3 driver support PCIe and SATA phy *) Add mediatek directory and rename phy-mt65xx-usb3 to phy-mtk-tphy.c since it now supports USB3.0, PCIe and SATA PHYs *) Make sun4i-usb-phy driver support USB PHYs for A83T SoC *) Make phy-qcom-qmp driver support USB PHYs for IPQ8074 SoC *) Make rockchip-inno-usb2 driver support usb2-phy for rv1108 SoC *) Minor fixes in phy drivers Signed-off-by: Kishon Vijay Abraham I commit 67af6f652f9ccad772c48f7c959ad5aa23bdfb40 Author: Chuck Lever Date: Tue Aug 22 11:19:35 2017 -0400 xprtrdma: Re-arrange struct rx_stats To reduce false cacheline sharing, separate counters that are likely to be accessed in the Call path from those accessed in the Reply path. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/xprt_rdma.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 34a0036748257dd97b22b76ef64aa44559f2ef6f Merge: a85c0f8 0852659 Author: Greg Kroah-Hartman Date: Tue Aug 22 13:16:06 2017 -0700 Merge tag 'usb-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: changes for v4.14 merge window Not a big pull request this time around. Only 49 non-merge commits. This pull request is, however, all over the place. Most of the changes are in the bdc driver adding support for USB Phy layer and PM. Renesas adds support for R-Car H3 ES2.0 and R-Car M3-W SoCs. Also here is PM_RUNTIME support for dwc3-keystone. UDC Core got a DMA unmap fix to make sure we only unmap requests that were, indeed, mapped. Other than these, we have a lot of cleanups, many of them adding 'const' to several places. commit 0c98568c1f00eed16c4b452557ec40f5ac64784d Author: Yuval Shaia Date: Fri Aug 11 00:12:11 2017 +0300 IB/pvrdma: Remove unused function The function pvrdma_idx_ring_is_valid_idx is not in used so let's remove it. Signed-off-by: Yuval Shaia Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h | 17 ----------------- 1 file changed, 17 deletions(-) commit d26875b43d45644e87f4c0b6bb2d7abf3c61d529 Author: Shiraz Saleem Date: Tue Aug 8 20:38:45 2017 -0500 i40iw: Improve CQP timeout logic The current timeout logic for Control Queue-Pair (CQP) OPs does not take into account whether CQP makes progress but rather blindly waits for a large timeout value, 100000 jiffies for the completion event. Improve this by setting the timeout based on whether the CQP is making progress or not. If the CQP is hung, the timeout will happen sooner, in 5000 jiffies. Each time the CQP progress is detetcted, the timeout extends by 5000 jiffies. Signed-off-by: Shiraz Saleem Signed-off-by: Christopher N Bednarz Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 11 +++++++++++ drivers/infiniband/hw/i40iw/i40iw_p.h | 14 +++++++++----- drivers/infiniband/hw/i40iw/i40iw_type.h | 5 +++++ drivers/infiniband/hw/i40iw/i40iw_utils.c | 22 ++++++++++++++-------- 4 files changed, 39 insertions(+), 13 deletions(-) commit 901ef845fa2469c211ce3b1e955d9e7245ab5d50 Author: Antonio Murdaca Date: Thu Feb 9 17:02:42 2017 +0100 selinux: allow per-file labeling for cgroupfs This patch allows genfscon per-file labeling for cgroupfs. For instance, this allows to label the "release_agent" file within each cgroup mount and limit writes to it. Signed-off-by: Antonio Murdaca [PM: subject line and merge tweaks] Signed-off-by: Paul Moore security/selinux/hooks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c0059dd832cc686bf0febefdcf8295cdd93007f Merge: 6b9dfb5 27a451e Author: Dave Airlie Date: Wed Aug 23 05:32:26 2017 +1000 Merge branch 'linux-4.14' of git://github.com/skeggsb/linux into drm-next Not a lot that's ready to be included this round for Nouveau. GP108 modesetting support, and misc other fixes. * 'linux-4.14' of git://github.com/skeggsb/linux: drm/nouveau/kms/nv50: perform null check on msto[i] rathern than msto drm/nouveau/pci/msi: disable MSI on big-endian platforms by default drm/nouveau: silence suspend/resume debugging messages drm/nouveau/kms/nv04-nv4x: fix exposed format list drm/nouveau/kms/nv10-nv40: add NV21 support to overlay drm/nouveau/kms/nv04-nv40: improve overlay error detection, fix pitch setting drm/nouveau/kms/nv04-nv40: prevent undisplayable framebuffers from creation drm/nouveau/mpeg: print more debug info when rejecting dma objects drm/nouveau/fb/gf100-: zero mmu debug buffers drm/nouveau/bar/gf100: add config option to limit BAR2 to 16MiB initial support (display-only) for GP108 drm/nouveau/falcon: use a more reasonable msgqueue timeout value drm/nouveau/disp: Silence DCB warnings. drm/nouveau/bios: Demote missing fp table message to NV_DEBUG. drm/nouveau/pmu/gt215-: abstract detection of whether reset is needed drm/nouveau/pmu/gt215: fix reset drm/nouveau/mc/gf100: add pmu to reset mask drm/nouveau/disp/gf119-: avoid creating non-existent heads drm/nouveau/therm/gm200: Added drm/nouveau/therm: fix spelling mistake on array thresolds commit bf808b5039c66f9843cdc30f18c0608dbbf11374 Author: Kaike Wan Date: Sun Aug 13 08:09:04 2017 -0700 IB/hfi1: Add kernel receive context info to debugfs Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 47 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/driver.c | 59 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/hfi.h | 1 + 3 files changed, 107 insertions(+) commit 6165467921a891bc79675cdb7f2791d8331f592c Author: Grzegorz Morys Date: Sun Aug 13 08:08:58 2017 -0700 IB/hfi1: Remove HFI1_VERBS_31BIT_PSN option Remove HFI1_VERBS_31BIT_PSN Kconfig option leaving only 31-bit PSNs available. The option was implemented in the early days of the driver and is no longer needed. Reviewed-by: Mike Marciniszyn Signed-off-by: Grzegorz Morys Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/Kconfig | 7 ------- drivers/infiniband/hw/hfi1/verbs.h | 5 ----- 2 files changed, 12 deletions(-) commit d392a673e718767049824f99c76bb483d893b881 Author: Jakub Byczkowski Date: Sun Aug 13 08:08:52 2017 -0700 IB/hfi1: Remove pstate from hfi1_pportdata Do not track physical state separately from host_link_state. Deduce physical state from host_link_state when required. Change cache_physical_state to log_physical_state to make sure host_link_state reflects hardwares physical state properly. Reviewed-by: Mike Marciniszyn 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 | 54 ++++++++++++++++++++++----------------- drivers/infiniband/hw/hfi1/chip.h | 3 +-- drivers/infiniband/hw/hfi1/hfi.h | 24 ----------------- drivers/infiniband/hw/hfi1/mad.c | 2 +- 4 files changed, 33 insertions(+), 50 deletions(-) commit ec0d8b8a63ee760bca1bccc6769d6210e05ded29 Author: Kamenee Arumugame Date: Sun Aug 13 08:08:46 2017 -0700 IB/hfi1: Stricter bounds checking of MAD trap index The macro size is valid. This change makes it less ambiguous. Bounds check trap type for better security. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 13 ++++++++++++- include/rdma/rdma_vt.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) commit 76ae6222a4a37098610c0601a814c9caba94ba0b Author: Jakub Byczkowski Date: Sun Aug 13 08:08:40 2017 -0700 IB/hfi1: Load fallback platform configuration per HFI device Currently fallback configuration is loaded once per driver instance. With multiple HFI devices in the same system the current code may not load the platform config data for the device. Change fallback platform config data loading to be per device. Reviewed-by: Easwar Hariharan Reviewed-by: Ira Weiny Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.h | 1 - drivers/infiniband/hw/hfi1/firmware.c | 51 +++-------------------------------- drivers/infiniband/hw/hfi1/platform.c | 41 +++++++++++++++++++--------- 3 files changed, 31 insertions(+), 62 deletions(-) commit 9161860463e38e1046a5fd57130be150cc0cac5d Author: Jakub Byczkowski Date: Sun Aug 13 08:08:34 2017 -0700 IB/hfi1: Add flag for platform config scratch register read Add flag in pport data structure to determine when platform config was read from scratch registers. Change conditions in parse_platform_config and get_platform_config_field to use the new flag. Reviewed-by: Easwar Hariharan 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 | 6 ++++-- drivers/infiniband/hw/hfi1/hfi.h | 3 +++ drivers/infiniband/hw/hfi1/platform.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) commit 55774d09b7a1f0d2bfec3320ed71d30fe05466a1 Author: Dennis Dalessandro Date: Sun Aug 13 08:08:28 2017 -0700 IB/hfi1: Document phys port state bits not used in IB A couple bits are used by OPA for link physical state that are not present as part of InfiniBand. Add a short blurb what those states mean and removed an unused state. Cc: Leon Romanovsky Reviewed-by: Todd Rimmer Reviewed-by: Brent Rothermel Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/opa_compat.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit b6422bc01259aea7e4e11f1cd052e80acdf1275b Author: Sebastian Sanchez Date: Sun Aug 13 08:08:22 2017 -0700 IB/hfi1: Check xchg returned value for queuing link down entry Check xchg returned value for queuing link down entry to guarantee proper atomic value reads. Fixes: 626c077c025f ("IB/hfi1: Prevent link down request double queuing") 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 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 028e0a67ea679ff958176eac97d1319a8d685fad Author: Colin Ian King Date: Sat Aug 5 14:11:50 2017 +0100 IB/hfi1: fix spelling mistake: "Maximim" -> "Maximum" Trivial fix to spelling mistake in pr_warn_ratelimited warning message Signed-off-by: Colin Ian King Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7221403dc958456c77f39b8a7ce6f95d8e65ffa3 Author: Dasaratharaman Chandramouli Date: Fri Aug 4 13:54:53 2017 -0700 IB/hfi1: Enable RDMA_CAP_OPA_AH in hfi driver to support extended LIDs Enabling this bit helps core components query for extended address support using the rdma_cap_opa_ah interface. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 566d53a8264452ee75aa6eb1f2f1970391c1a271 Author: Don Hiatt Date: Fri Aug 4 13:54:47 2017 -0700 IB/hfi1: Enhance PIO/SDMA send for 16B PIO/SDMA send logic now uses the hdr_type field to determine the type of packet that has been constructed. Based on the hdr_type, certain things such as PBC flags, padding count and the LT extra trailing bytes are determined. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 +- drivers/infiniband/hw/hfi1/user_sdma.c | 7 +- drivers/infiniband/hw/hfi1/verbs.c | 197 +++++++++++++++++++++------------ drivers/infiniband/hw/hfi1/verbs.h | 1 + 4 files changed, 135 insertions(+), 72 deletions(-) commit 5b6cabb0db772042906cdc0fc235fe2a4f5a6000 Author: Don Hiatt Date: Fri Aug 4 13:54:41 2017 -0700 IB/hfi1: Add 16B RC/UC support Add 16B bypass packet support for RC/UC traffic types. Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 4 +- drivers/infiniband/hw/hfi1/rc.c | 390 ++++++++++++++++++++++++------------- drivers/infiniband/hw/hfi1/ruc.c | 201 ++++++++++++++----- drivers/infiniband/hw/hfi1/uc.c | 40 ++-- drivers/infiniband/hw/hfi1/verbs.h | 3 +- 5 files changed, 445 insertions(+), 193 deletions(-) commit 51e658f5dd362cc8666f3f5ec1986660e3e51047 Author: Dasaratharaman Chandramouli Date: Fri Aug 4 13:54:35 2017 -0700 IB/rdmavt, hfi1, qib: Enhance rdmavt and hfi1 to use 32 bit lids Increase lid used in hfi1 driver to 32 bits. qib continues to use 16 bit lids. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 12 +++-- drivers/infiniband/hw/hfi1/hfi.h | 2 +- drivers/infiniband/hw/hfi1/mad.c | 91 ++++++++++++++++++++++++++++++++----- drivers/infiniband/hw/hfi1/verbs.c | 23 +--------- drivers/infiniband/hw/hfi1/verbs.h | 2 - drivers/infiniband/hw/qib/qib_mad.c | 4 +- include/rdma/rdma_vt.h | 2 +- 7 files changed, 93 insertions(+), 43 deletions(-) commit 863cf89d472fe7a61305b06de84b9ed2dea02611 Author: Don Hiatt Date: Fri Aug 4 13:54:29 2017 -0700 IB/hfi1: Add 16B trace support Add trace support to 16B bypass packets during send and receive. Sample input header trace: -0 [000] d.h. 271742.509477: input_ibhdr: [0000:05:00.0] (16B) len:24 sc:0 dlid:0xf0000b slid:0x10002 age:0 becn:0 fecn:0 l4:10 rc:0 sc:0 pkey:0x8001 entropy:0x0000 op:0x65,UD_SEND_ONLY_WITH_IMMEDIATE se:0 m:1 pad:3 tver:0 qpn:0xffffff a:0 psn:0x00000001 hlen:248 deth qkey 0x01234567 sqpn 0x000004 Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 25 +++ drivers/infiniband/hw/hfi1/trace.c | 153 ++++++++++++- drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 351 ++++++++++++++++++++---------- 3 files changed, 406 insertions(+), 123 deletions(-) commit 88733e3b845024cb2324a68469a4a25fdd9c0a6c Author: Don Hiatt Date: Fri Aug 4 13:54:23 2017 -0700 IB/hfi1: Add 16B UD support Add 16B bypass packet support for UD traffic types. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 35 +-- drivers/infiniband/hw/hfi1/hfi.h | 117 +++++++++- drivers/infiniband/hw/hfi1/mad.c | 8 +- drivers/infiniband/hw/hfi1/ruc.c | 4 +- drivers/infiniband/hw/hfi1/ud.c | 421 +++++++++++++++++++++++++++--------- drivers/infiniband/hw/hfi1/verbs.h | 2 +- include/rdma/opa_addr.h | 1 + 7 files changed, 457 insertions(+), 131 deletions(-) commit d98bb7f7e6fa29d45008370084d5cabac7ac69ed Author: Don Hiatt Date: Fri Aug 4 13:54:16 2017 -0700 IB/hfi1: Determine 9B/16B L2 header type based on Address handle When address handle attributes are initialized, the LIDs are transformed to be in the 32 bit LID space. When constructing the header, hfi1 driver will look at the LID to determine the packet header to be created. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 21 +++++--- drivers/infiniband/core/uverbs_cmd.c | 3 ++ drivers/infiniband/hw/hfi1/hfi.h | 92 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/qp.c | 28 +++++++++++ drivers/infiniband/hw/hfi1/verbs.c | 12 +++++ drivers/infiniband/hw/hfi1/verbs.h | 1 + include/rdma/ib_verbs.h | 15 ++++++ include/rdma/opa_addr.h | 4 +- 8 files changed, 168 insertions(+), 8 deletions(-) commit 5786adf3fde7aa22a68eedac9c59e40da76ffbfb Author: Don Hiatt Date: Fri Aug 4 13:54:10 2017 -0700 IB/hfi1: Add support to process 16B header errors Enhance hdr_rcverr() to also handle errors during 16B bypass packet receive. Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 58 ++++++++++++++++++++++++++++++------- drivers/infiniband/hw/hfi1/hfi.h | 13 +++++++-- drivers/infiniband/hw/hfi1/ruc.c | 31 +++++++++++++------- drivers/infiniband/hw/hfi1/ud.c | 3 +- drivers/infiniband/hw/hfi1/verbs.c | 39 ++++++++++++++++++++----- drivers/infiniband/hw/hfi1/verbs.h | 1 + 6 files changed, 112 insertions(+), 33 deletions(-) commit 30e07416cf48801f127019c1dfece8039f1da8e2 Author: Don Hiatt Date: Fri Aug 4 13:54:04 2017 -0700 IB/hfi1: Add support to send 16B bypass packets We introduce struct hfi1_opa_header as a union of ib (9B) and 16B headers. Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 33 ++++++++++++++++++------------- drivers/infiniband/hw/hfi1/ruc.c | 17 ++++++++-------- drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 19 +++++++++--------- drivers/infiniband/hw/hfi1/uc.c | 4 ++-- drivers/infiniband/hw/hfi1/ud.c | 25 ++++++++++++----------- drivers/infiniband/hw/hfi1/verbs.c | 24 +++++++++++++++++++--- drivers/infiniband/hw/hfi1/verbs.h | 22 ++++++++++----------- 7 files changed, 84 insertions(+), 60 deletions(-) commit 72c07e2b671eda1cf3e8ebabc664f542f673b997 Author: Don Hiatt Date: Fri Aug 4 13:53:58 2017 -0700 IB/hfi1: Add support to receive 16B bypass packets We introduce a struct hfi1_16b_header to support 16B headers. 16B bypass packets are received by the driver and processed similar to 9B packets. Add basic support to handle 16B packets. Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 6 ++ drivers/infiniband/hw/hfi1/common.h | 1 + drivers/infiniband/hw/hfi1/driver.c | 127 ++++++++++++++++++++++++++++---- drivers/infiniband/hw/hfi1/hfi.h | 131 ++++++++++++++++++++++++++++++++- drivers/infiniband/hw/hfi1/rc.c | 2 +- drivers/infiniband/hw/hfi1/uc.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 4 +- drivers/infiniband/hw/hfi1/verbs.c | 17 +++-- drivers/infiniband/hw/hfi1/verbs.h | 13 ++++ drivers/infiniband/hw/hfi1/vnic.h | 15 ---- drivers/infiniband/hw/hfi1/vnic_main.c | 4 +- include/rdma/opa_vnic.h | 3 - 12 files changed, 274 insertions(+), 51 deletions(-) commit 13c19222889daf91da36b7fb63b5d5d9ce89b377 Author: Don Hiatt Date: Fri Aug 4 13:53:51 2017 -0700 IB/rdmavt, hfi1, qib: Modify check_ah() to account for extended LIDs rvt_check_ah() delegates lid verification to underlying driver. Underlying driver uses different conditions to check for dlid depending on whether the device supports extended LIDs Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/common.h | 9 --------- drivers/infiniband/hw/hfi1/mad.c | 5 +++-- drivers/infiniband/hw/hfi1/verbs.c | 5 +++++ drivers/infiniband/hw/qib/qib_verbs.c | 9 +++++++++ drivers/infiniband/sw/rdmavt/ah.c | 10 ---------- drivers/infiniband/sw/rdmavt/qp.c | 29 +++++++++++++++++++++++------ include/rdma/opa_addr.h | 18 ++++++++++++++++++ 7 files changed, 58 insertions(+), 27 deletions(-) commit d295dbeb2a0c93364444e76b3bb30f587a823e0e Author: Michael J. Ruhl Date: Fri Aug 4 13:52:44 2017 -0700 IB/hf1: User context locking is inconsistent There is a mixture of mutex and spinlocks to protect receive context (rcd/uctxt) information. This is not used consistently. Use the mutex to protect device receive context information only. Use the spinlock to protect sub context information only. Protect access to items in the rcd array with a spinlock and reference count. Remove spinlock around dd->rcd array cleanup. Since interrupts are disabled and cleaned up before this point, this lock is not useful. Reviewed-by: Mike Marciniszyn Reviewed-by: Sebastian Sanchez Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/aspm.h | 35 ++++--- drivers/infiniband/hw/hfi1/chip.c | 30 ++++-- drivers/infiniband/hw/hfi1/debugfs.c | 32 ++++-- drivers/infiniband/hw/hfi1/driver.c | 71 ++++++++----- drivers/infiniband/hw/hfi1/file_ops.c | 185 +++++++++++++++++++++------------ drivers/infiniband/hw/hfi1/hfi.h | 6 +- drivers/infiniband/hw/hfi1/init.c | 134 +++++++++++++++--------- drivers/infiniband/hw/hfi1/trace_rx.h | 12 +-- drivers/infiniband/hw/hfi1/vnic_main.c | 12 +-- 9 files changed, 326 insertions(+), 191 deletions(-) commit f2a3bc00a03c2cc9caa40c8867de973fd4e48c6a Author: Michael J. Ruhl Date: Fri Aug 4 13:52:38 2017 -0700 IB/hfi1: Protect context array set/clear with spinlock The rcd array can be accessed from user context or during interrupts. Protecting this with a mutex isn't a good idea because the mutex should not be used from an IRQ. Protect the allocation and freeing of rcd array elements with a spinlock. Reviewed-by: Mike Marciniszyn 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 | 10 +- drivers/infiniband/hw/hfi1/file_ops.c | 171 ++++++++++++---------------- drivers/infiniband/hw/hfi1/hfi.h | 8 +- drivers/infiniband/hw/hfi1/init.c | 199 +++++++++++++++++++++++---------- drivers/infiniband/hw/hfi1/vnic_main.c | 22 +--- 5 files changed, 229 insertions(+), 181 deletions(-) commit 64a296f579303322ebec9edae09cf87240b1ad78 Author: Bartlomiej Dudek Date: Fri Aug 4 13:52:32 2017 -0700 IB/hfi1: Use host_link_state to read state when DC is shut down When DC is shut down (by e.g. disconnecting the cable), the driver should use host_link_state to get port's current physical state. This is due to the fact that physical state is read from DC's CSRs and when DC is shut down and state is changed, its registers are not impacted. Reviewed-by: Jakub Byczkowski Signed-off-by: Bartlomiej Dudek Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 02a222c7f6c8d17b5fb6803ca453fcd9d5a3853d Author: Byczkowski, Jakub Date: Fri Aug 4 13:52:26 2017 -0700 IB/hfi1: Remove lstate from hfi1_pportdata Do not track logical state separately from host_link_state. Deduce logical state from host_link_state when required. Transitions in set_link_state and goto_offline already make sure host_link_state reflects hardware's logical state properly. 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 | 52 +++++++++++++++++++-------------------- drivers/infiniband/hw/hfi1/chip.h | 3 +-- drivers/infiniband/hw/hfi1/hfi.h | 17 ------------- drivers/infiniband/hw/hfi1/mad.c | 2 +- 4 files changed, 28 insertions(+), 46 deletions(-) commit 16570d3da0938e0c46c31e5f97c9c8452025d2e7 Author: Sebastian Sanchez Date: Fri Aug 4 13:52:20 2017 -0700 IB/hfi1: Remove pmtu from the QP structure The pmtu field doens't have be stored in the QP structure as it can easily be calculated when needed. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 3 +-- include/rdma/rdmavt_qp.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit ecdb19f4b513033e6f2c4326cd5b81e04393e5e1 Author: Alex Estrin Date: Fri Aug 4 13:52:13 2017 -0700 IB/hfi1: Revert egress pkey check enforcement Current code has some serious flaws. Disarm the flag pending an appropriate patch. Fixes: 53526500f301 ("IB/hfi1: Permanently enable P_Key checking in HFI") Cc: stable@vger.kernel.org Reviewed-by: Mike Marciniszyn Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 1 - 1 file changed, 1 deletion(-) commit 0580b53f3867b4b70c9cfbb6a6d49a44268335ea Merge: 7d47e9a ee5b1fa Author: David S. Miller Date: Tue Aug 22 11:08:16 2017 -0700 Merge branch 'liquidio-VF-driver-will-notify-NIC-firmware-of-MTU-change' Veerasenareddy Burru says: ==================== liquidio: VF driver will notify NIC firmware of MTU change Make VF driver notify NIC firmware of MTU change. Firmware needs this information for MTU propagation and enforcement. The first patch in this series moves a macro definition to a proper place to prevent a build error in the second patch which has the code that sends the notification. Change Log: V1 -> V2 * Add "From:" line to patch #1 and #2 to give credit to the author. * In patch #2, order local variable declarations from longest to shortest line. ==================== Signed-off-by: David S. Miller commit ee5b1fac5641515a80ed1b15a84713629b29516d Author: Veerasenareddy Burru Date: Mon Aug 21 12:35:59 2017 -0700 liquidio: make VF driver notify NIC firmware of MTU change Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) commit ad530a1d403a70b5473578e17b65d14132926b86 Author: Veerasenareddy Burru Date: Mon Aug 21 12:35:56 2017 -0700 liquidio: move macro definition to a proper place The macro LIO_CMD_WAIT_TM is not specific to the PF driver; it can be used by the VF driver too, so move its definition from a PF-specific header file to one that's common to PF and VF. Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h | 2 -- drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit e17a85eccfa0b7d0089af218b0c468d4b8a3c3c2 Author: Markus Elfring Date: Tue Aug 22 19:58:30 2017 +0200 ALSA: cmipci: Use common error handling code in snd_cmipci_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: Takashi Iwai sound/pci/cmipci.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 7d47e9a2056f7d4babde19f58c8d236e60308043 Author: Bhumika Goyal Date: Mon Aug 21 23:01:12 2017 +0530 ptp: make ptp_clock_info const Make these const as they are only used in a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct ptp_clock_info 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 ptp_clock_info s; Signed-off-by: Bhumika Goyal Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_dte.c | 2 +- drivers/ptp/ptp_ixp46x.c | 2 +- drivers/ptp/ptp_kvm.c | 2 +- drivers/ptp/ptp_pch.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit b6d08bd81d3044dcd73ea45fa6c28cc049224d41 Author: Bhumika Goyal Date: Mon Aug 21 22:36:50 2017 +0530 net: ethernet: make ptp_clock_info const Make these const as they are only used in a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct ptp_clock_info 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 ptp_clock_info s; Signed-off-by: Bhumika Goyal Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 2 +- drivers/net/ethernet/cadence/macb_ptp.c | 2 +- drivers/net/ethernet/freescale/gianfar_ptp.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 2 +- drivers/net/ethernet/ti/cpts.c | 2 +- drivers/net/ethernet/tile/tilegx.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit e093111ddb6c786e32b882108c1c08ef83d781f4 Author: Amrani, Ram Date: Tue Jun 27 17:04:42 2017 +0300 IB/core: Fix input len in multiple user verbs Most user verbs pass user data to the kernel with the inclusion of the ib_uverbs_cmd_hdr structure. This is problematic because the vendor has no ideas if the verb was called by a legacy verb or an extended verb. Also, the incosistency between the verbs is confusing. Fixes: 565197dd8fb1 ("IB/core: Extend ib_uverbs_create_cq") Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 70 ++++++++++++++++------------ drivers/infiniband/hw/mlx5/cq.c | 6 +-- drivers/infiniband/hw/mlx5/main.c | 11 ++--- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- 4 files changed, 46 insertions(+), 43 deletions(-) commit a8e8b7ff35175ab0a55ef0fa8560c3d5ffdb2818 Author: Salil Date: Mon Aug 21 17:05:24 2017 +0100 net: hns3: Add support to change MTU in HNS3 hardware This patch adds the following support to the HNS3 driver: 1. Support to change the Maximum Transmission Unit of a port in the HNS NIC hardware. 2. Initializes the supported MTU range for the netdevice. Signed-off-by: lipeng Signed-off-by: Salil Mehta Reviewed-by: Andrew Lunn Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 34 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 1 + 2 files changed, 35 insertions(+) commit 18c90df9f2c00cb35ab8ba747aa0f742ee6bbf6a Author: Romain Perier Date: Tue Aug 22 13:46:59 2017 +0200 mlx5: 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 Reviewed-by: Peter Senna Tschudin Acked-by: Doug Ledford Tested-by: Doug Ledford Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 11 ++++++----- include/linux/mlx5/driver.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) commit b9f761aa78126d0937f6ab38d04aec4f9fcce1df Author: Romain Perier Date: Tue Aug 22 13:46:58 2017 +0200 mlx4: 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 Reviewed-by: Leon Romanovsky Acked-by: Doug Ledford Tested-by: Doug Ledford Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 11880a5512ac51b9326507df9acc42a8bd13e2b7 Author: Romain Perier Date: Tue Aug 22 13:46:56 2017 +0200 IB/mthca: 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 Acked-by: Doug Ledford Tested-by: Doug Ledford Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_av.c | 10 +++++----- drivers/infiniband/hw/mthca/mthca_cmd.c | 8 ++++---- drivers/infiniband/hw/mthca/mthca_dev.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit 06552f8e18fb271233318e82e983f29d9cb1d72e Merge: 89c9c16 4d3b632 Author: David S. Miller Date: Tue Aug 22 10:48:54 2017 -0700 Merge branch 'Huawei-HiNIC-Ethernet-Driver' Aviad Krawczyk says: ==================== Huawei HiNIC Ethernet Driver The patch-set contains the support of the HiNIC Ethernet driver for hinic family of PCIE Network Interface Cards. The Huawei's PCIE HiNIC card is a new Ethernet card and hence there was a need of a new driver. The current driver is meant to be used for the Physical Function and there would soon be a support for Virtual Function and more features once the basic PF driver has been accepted. Changes V7 -> V8: 1. Remove unnecessary cast from void * - Stephen Hemminger comment https://lkml.org/lkml/2017/8/17/1008 Changes V6 -> V7: 1. Separate netpoll and MAINTAINERS patch - Sergei Shtylyov comment https://lkml.org/lkml/2017/8/17/479 Changes V5 -> V6: 1. Fix cover letter Message-Id Changes V4 -> V5: 1. Remove select_queue NOP - David Miller comment https://lkml.org/lkml/2017/8/16/625 Changes V3 -> V4: 1. Reverse christmas tree order - David Miller comment https://lkml.org/lkml/2017/8/3/862 Changes V2 -> V3: 1. Replace dev_ functions by netif_ functions - Joe Perches comment https://lkml.org/lkml/2017/7/19/424 2. Fix the driver directory in MAINTAINERS file - Sergei Shtylyov comment https://lkml.org/lkml/2017/7/19/615 3. Add a newline at the end of Makefile - David Miller comment https://lkml.org/lkml/2017/7/19/1345 4. Return a pointer as a val instead of in arg - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 5. Change the error labels to err_xyz - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 6. Remove check of Func Type in free function - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 7. Remove !netdev check in remove function - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 8. Use module_pci_driver - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 9. Move the PCI device ID to the .c file - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 10. Remove void * to avoid passing wrong ptr - Francois Romieu comment https://lkml.org/lkml/2017/7/19/1319 Changes V1 -> V2: 1. remove driver verstion - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/372 2. replace kzalloc by devm_kzalloc for short clean - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/372 3. replace pr_ functions by dev_ functions - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/375 4. seperate last patch by moving ops to a new patch - Andrew Lunn comment https://lkml.org/lkml/2017/7/12/377 ==================== Signed-off-by: David S. Miller commit 4d3b632707be4e4b47febc70e256dab4b3752494 Author: Aviad Krawczyk Date: Mon Aug 21 23:56:08 2017 +0800 net-next/hinic: Add Maintainer Update MAINTAINERS file Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit b553400bb4a65ee4c8bc5c0202cede3c46524e55 Author: Aviad Krawczyk Date: Mon Aug 21 23:56:07 2017 +0800 net-next/hinic: Add netpoll Add more netdev operation - netpoll. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit edd384f682cc2981420628b769a1929db680f02f Author: Aviad Krawczyk Date: Mon Aug 21 23:56:06 2017 +0800 net-next/hinic: Add ethtool and stats Add ethtool operations and statistics operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 3 + drivers/net/ethernet/huawei/hinic/hinic_main.c | 218 ++++++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_port.c | 31 ++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 45 +++++ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 19 +++ drivers/net/ethernet/huawei/hinic/hinic_rx.h | 2 + drivers/net/ethernet/huawei/hinic/hinic_tx.c | 22 +++ drivers/net/ethernet/huawei/hinic/hinic_tx.h | 2 + 8 files changed, 341 insertions(+), 1 deletion(-) commit 00e57a6d4ad345a3910cfd24a5403d49a70d7705 Author: Aviad Krawczyk Date: Mon Aug 21 23:56:05 2017 +0800 net-next/hinic: Add Tx operation Add transmit operation for sending data by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 46 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 22 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c | 257 +++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 48 +++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 12 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 406 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_tx.h | 11 + 8 files changed, 799 insertions(+), 4 deletions(-) commit e2585ea775380ec2b2b1bf9619a5a3a6d26aa72b Author: Aviad Krawczyk Date: Mon Aug 21 23:56:04 2017 +0800 net-next/hinic: Add Rx handler Set the io resources in the nic and handle rx events by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 361 +++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 77 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.c | 36 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 35 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 13 + drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c | 208 +++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 29 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 12 + drivers/net/ethernet/huawei/hinic/hinic_hw_wq.h | 2 + drivers/net/ethernet/huawei/hinic/hinic_main.c | 27 ++ drivers/net/ethernet/huawei/hinic/hinic_port.c | 32 ++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 19 + drivers/net/ethernet/huawei/hinic/hinic_rx.c | 418 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_rx.h | 7 + 16 files changed, 1278 insertions(+) commit 7ef37fe4c1a156a394174bd1b5d849cef2b8b4fa Author: Aviad Krawczyk Date: Mon Aug 21 23:56:03 2017 +0800 net-next/hinic: Add cmdq completion handler Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 12 + 2 files changed, 308 insertions(+), 1 deletion(-) commit 76baca2e92f4ed478ef14d68da118484f134632d Author: Aviad Krawczyk Date: Mon Aug 21 23:56:02 2017 +0800 net-next/hinic: Add cmdq commands Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h | 9 + drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282 +++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 38 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 10 + drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 194 +++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_wq.h | 12 + drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h | 115 +++++++++ 8 files changed, 683 insertions(+), 2 deletions(-) commit fc9319e4025d49875fdb97c06618de2c0088ac31 Author: Aviad Krawczyk Date: Mon Aug 21 23:56:01 2017 +0800 net-next/hinic: Add ceqs Initialize the completion event queues and handle ceq events by calling the registered handlers. Used for cmdq command completion. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 16 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 29 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 +- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 290 +++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h | 75 ++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 15 +- drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 3 + 7 files changed, 427 insertions(+), 8 deletions(-) commit d0b9805e8222e86378c04d6bab366181b707631e Author: Aviad Krawczyk Date: Mon Aug 21 23:56:00 2017 +0800 net-next/hinic: Initialize cmdq Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282 +++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 53 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h | 2 + drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 156 ++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_wq.h | 8 + 6 files changed, 500 insertions(+), 6 deletions(-) commit 53e7d6feb949b4df542897ab13a33fe484a45c72 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:59 2017 +0800 net-next/hinic: Set qp context Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_common.c | 55 ++++++ drivers/net/ethernet/huawei/hinic/hinic_common.h | 4 + drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 87 +++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 84 ++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 4 + drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 151 +++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c | 160 +++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 11 ++ .../net/ethernet/huawei/hinic/hinic_hw_qp_ctxt.h | 214 +++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_wq.h | 9 + 12 files changed, 787 insertions(+), 2 deletions(-) commit f91090f7da3a215e3cf8f678ab71ad65d1d627a1 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:58 2017 +0800 net-next/hinic: Add qp resources Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 164 ++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 27 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c | 266 ++++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 50 ++++- 6 files changed, 507 insertions(+), 5 deletions(-) commit b15a9f37be2bc90f46f7e6b0c615c80e72e96431 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:57 2017 +0800 net-next/hinic: Add wq Create work queues for being used by the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_common.h | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 69 ++- drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 6 + drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 14 + drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 516 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_wq.h | 86 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h | 253 +++++++++++ 8 files changed, 968 insertions(+), 5 deletions(-) commit c3e79baf1b03b3ba53f60a8698f2fd9462a906b5 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:56 2017 +0800 net-next/hinic: Add logical Txq and Rxq Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 131 +++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 20 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 144 +++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.h | 46 ++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h | 32 +++++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 172 ++++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 72 ++++++++++ drivers/net/ethernet/huawei/hinic/hinic_rx.h | 46 ++++++ drivers/net/ethernet/huawei/hinic/hinic_tx.c | 75 ++++++++++ drivers/net/ethernet/huawei/hinic/hinic_tx.h | 49 +++++++ 12 files changed, 793 insertions(+), 4 deletions(-) commit c4d06d2d208a6cd86bc76e52473cc853f83cad03 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:55 2017 +0800 net-next/hinic: Add Rx mode and link event handler Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 17 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 2 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 122 ++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 37 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.c | 17 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 17 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 64 ++++- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 28 +++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 284 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.c | 92 +++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 66 +++++ 11 files changed, 745 insertions(+), 1 deletion(-) commit 25a3ba610609375751aa991f4a4054aca1b7fc5e Author: Aviad Krawczyk Date: Mon Aug 21 23:55:54 2017 +0800 net-next/hinic: Add port management commands Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 4 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 30 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 29 +++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 195 +++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_port.c | 224 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 68 +++++++ 7 files changed, 551 insertions(+), 3 deletions(-) commit f00fe738b5d863d170907de908870b762f1b6387 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:53 2017 +0800 net-next/hinic: Add aeqs Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 463 ++++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h | 81 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.c | 90 +++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 46 +++ 5 files changed, 727 insertions(+), 2 deletions(-) commit 0ac599c7903cb9e315081b731a4401e1726630d5 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:52 2017 +0800 net-next/hinic: Add api cmd commands Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 ++++++++++++++++++++- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 65 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 6 + 3 files changed, 398 insertions(+), 2 deletions(-) commit 6dd8b68214f4af663faec507169a123222dfa7e7 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:51 2017 +0800 net-next/hinic: Add management messages Add the management messages for sending to api cmd and the asynchronous event handler for the completion of the messages. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 35 ++ .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 3 + drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 439 ++++++++++++++++++++- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 59 +++ 5 files changed, 538 insertions(+), 3 deletions(-) commit 3dcea32193d35d9a4cb9ae56f0e831156bd0b479 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:50 2017 +0800 net-next/hinic: Initialize api cmd hw Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 ++++++++++++++++++++- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 38 +++++ drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 26 ++++ 3 files changed, 236 insertions(+), 1 deletion(-) commit eabf0fad81d52b8e23f3a6eb5d2c8cac452f50ee Author: Aviad Krawczyk Date: Mon Aug 21 23:55:49 2017 +0800 net-next/hinic: Initialize api cmd resources Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 446 +++++++++++++++++++++ .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 102 +++++ drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 10 + drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 3 + 5 files changed, 563 insertions(+), 2 deletions(-) commit a5564e7e44268bcac402697eff85286722f753a9 Author: Aviad Krawczyk Date: Mon Aug 21 23:55:48 2017 +0800 net-next/hinic: Initialize hw device components Initialize hw device by calling the initialization functions of aeqs and management channel. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 3 +- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 172 ++++++++++++++++++++-- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 14 +- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 149 +++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h | 107 ++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 8 + drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 92 ++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 45 ++++++ 8 files changed, 576 insertions(+), 14 deletions(-) commit 51ba902a16e68b786028db8b0482f3a5f22e7d4f Author: Aviad Krawczyk Date: Mon Aug 21 23:55:47 2017 +0800 net-next/hinic: Initialize hw interface Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen Signed-off-by: David S. Miller Documentation/networking/hinic.txt | 125 ++++++++++++++ drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/huawei/Kconfig | 19 +++ drivers/net/ethernet/huawei/Makefile | 5 + drivers/net/ethernet/huawei/hinic/Kconfig | 13 ++ drivers/net/ethernet/huawei/hinic/Makefile | 3 + drivers/net/ethernet/huawei/hinic/hinic_dev.h | 33 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 36 ++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 201 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 42 +++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.c | 208 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 160 +++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 195 +++++++++++++++++++++ 14 files changed, 1042 insertions(+) commit 62a939477173fabfe9f52114fab878a00b87f9a3 Author: Takashi Iwai Date: Tue Aug 22 16:52:10 2017 +0200 ALSA: hda - Implement mic-mute LED mode enum Dell laptops have another LED for mic-mute in addition to the master mute. The former is tied with the capture switch (in a reverse way) while the latter is tied with the master playback switch. We already have an enum control to change the behavior for the master mute LED in different ways, e.g. keeping always off or turning off at mute. But, the mic-mute LED has no such management but its behavior is hard-coded. This patch implements an enum control to change the mic-mute LED behavior like what we have for the master mute LED. The ctl provides four modes: keep-on, keep-off, follow-capture and follow-mute. The default mode is the last one, follow-mute, which follows the capture mute, i.e. LED turning on when the capture is off, and turning off when the capture is active. Signed-off-by: Takashi Iwai sound/pci/hda/dell_wmi_helper.c | 87 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 6 deletions(-) commit cbb7eb20bb7c73b27e8ece8f871458ab0eab8253 Author: Markus Elfring Date: Tue Aug 22 18:43:42 2017 +0200 ALSA: ctxfi: Use common error handling code in two functions Add jump targets so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai sound/pci/ctxfi/ctpcm.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit d1be5c99a0341249bf6f74eb1cbc3d5fc4ef2be7 Author: Yury Norov Date: Sun Aug 20 13:20:48 2017 +0300 arm64: cleanup {COMPAT_,}SET_PERSONALITY() macro There is some work that should be done after setting the personality. Currently it's done in the macro, which is not the best idea. In this patch new arch_setup_new_exec() routine is introduced, and all setup code is moved there, as suggested by Catalin: https://lkml.org/lkml/2017/8/4/494 Cc: Pratyush Anand Signed-off-by: Yury Norov [catalin.marinas@arm.com: comments changed or removed] Signed-off-by: Catalin Marinas arch/arm64/include/asm/elf.h | 2 -- arch/arm64/include/asm/thread_info.h | 3 +++ arch/arm64/kernel/process.c | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) commit df9c011c0a23cf1399c01f896cd359d932ab49b5 Author: Shuah Khan Date: Thu Aug 17 16:34:43 2017 -0600 selftests: timers: Fix run_destructive_tests target to handle skipped tests When a test exits with skip exit code of 4, "make run_destructive_tests" halts testing. Fix run_destructive_tests target to handle error exit codes. Cc: stable [4.13+] Reported-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/Makefile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 98b74e1f31045a63f6148b2d129ca9bf244e24ab Author: John Stultz Date: Fri Aug 18 16:23:32 2017 -0700 kselftests: timers: leap-a-day: Change default arguments to help test runs Change default arguments for leap-a-day to always set the time each iteration (rather then waiting for midnight UTC), and to only run 10 interations (rather then infinite). If one wants to wait for midnight UTC, they can use the new -w flag, and we add a note to the argument help that -i -1 will run infinitely. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: John Stultz Cc: stable [4.13+] Signed-off-by: Shuah Khan tools/testing/selftests/timers/leap-a-day.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 89c9c1636f5aeef7b74cdcc141e0abc9bd764afe Author: David Wu Date: Mon Aug 21 18:12:55 2017 +0800 net: ethernet: stmmac: dwmac-rk: Add rv1108 gmac support It only supports rmii interface. Add constants and callback functions for the dwmac on rv1108 socs. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu Signed-off-by: David S. Miller .../devicetree/bindings/net/rockchip-dwmac.txt | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit d3213fbf695490acbffc7b1fff793c7e26989296 Author: Dan Carpenter Date: Mon Aug 21 12:47:30 2017 +0300 ethernet: xircom: small clean up in setup_xirc2ps_cs() The get_options() function takes the whole ARRAY_SIZE(). It doesn't matter here because we don't use more than 7 elements. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1f08d82176246c6d8a2f1dc26be3638ed4a6083 Author: Arnd Bergmann Date: Thu Aug 3 13:50:47 2017 +0200 drm/msm/mdp5: mark runtime_pm functions as __maybe_unused When CONFIG_PM is disabled, we get harmless warnings about unused functions: drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1025:12: error: 'mdp5_runtime_resume' defined but not used [-Werror=unused-function] static int mdp5_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1015:12: error: 'mdp5_runtime_suspend' defined but not used [-Werror=unused-function] static int mdp5_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ This marks both functions as __maybe_unused so the compiler can drop them silently. Fixes: d68fe15b1878 ("drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e05899dc80af26a21746485bb72e9410f03ad36 Author: Arnd Bergmann Date: Thu Aug 3 13:50:46 2017 +0200 drm/msm: remove unused variable A cleanup left behind an unused variable that we have to remove in order to avoid this harmless warning: drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'a5xx_zap_shader_init': drivers/gpu/drm/msm/adreno/a5xx_gpu.c:493:19: error: unused variable 'a5xx_gpu' [-Werror=unused-variable] Fixes: 8d6f08272b6f ("drm/msm: Remove uneeded platform dev members") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 1 - 1 file changed, 1 deletion(-) commit 5c3ddb858549ef9ae93dee30f17c29218fe18a25 Author: Rob Clark Date: Tue Jul 11 12:33:23 2017 -0400 drm/msm/mdp5: make helper function static Not needed outside of mdp5_crtc.c. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c0693b1ed500082516a13df53f688ef37a6b6e1 Author: Rob Clark Date: Tue Jul 11 10:08:05 2017 -0400 drm/msm: make msm_framebuffer_init() static Only needed in msm_fb.c so don't export it. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 2 -- drivers/gpu/drm/msm/msm_fb.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) commit 466e5606cc21fc75e3c6ce2d16c6ddde48e1e4fa Author: Rob Clark Date: Tue Jul 11 10:40:13 2017 -0400 drm/msm: add helper to allocate stolen fb We'll later want to re-use this for state-readback when bootloader enables display, so that we can create an fb for the initial plane->state->fb. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 2 ++ drivers/gpu/drm/msm/msm_fb.c | 41 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_fbdev.c | 35 +++++++---------------------------- 3 files changed, 50 insertions(+), 28 deletions(-) commit 38958bab824a7955138c356a16a3f72562fbcef1 Author: Rob Clark Date: Tue Jul 11 10:13:29 2017 -0400 drm/msm: don't track fbdev's gem object separately The drm_framebuffer is refcnt'd these days and will unref the underlying bo as needed. So we can simplify a little. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_fbdev.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit ba4dd71828bce7dfa46a5e6e33e2605f65d16534 Author: Rob Clark Date: Thu Jul 6 16:33:44 2017 -0400 drm/msm: add modeset module param At least for debugging it is nice to have an easy way to force the driver not to load. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a7d3bb0045365ff84be35e3a4715af5d0216b7bd Author: Rob Clark Date: Mon Jul 3 13:13:57 2017 -0400 drm/msm/mdp5: add tracking for clk enable-count Accessing registers for an unclocked block is an insta-reboot on snapdragon devices. So add a bit of logic to track the enable_count so we can WARN_ON() unclocked register writes. This makes it much easier to track down mistakes. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 5 +++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 ++++ 2 files changed, 9 insertions(+) commit a0ce4d23b13d2b028d20d34655a1a9afa300b625 Author: Rob Clark Date: Mon Jul 3 10:43:27 2017 -0400 drm/msm: remove unused define Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 2 -- 1 file changed, 2 deletions(-) commit 8223286d62e296fb762e11894fbdaa84f471915d Author: Jordan Crouse Date: Thu Jul 27 10:42:40 2017 -0600 drm/msm: Add a helper function for in-kernel buffer allocations Nearly all of the buffer allocations for kernel allocate an buffer object, virtual address and GPU iova at the same time. Make a helper function to handle the details. Signed-off-by: Jordan Crouse [dropped msm_fbdev conversion to new helper, since it interferes with display-handover work, where we want to separate allocation and mapping] Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 22 +++------------- drivers/gpu/drm/msm/adreno/a5xx_power.c | 14 +++------- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 26 +++++-------------- drivers/gpu/drm/msm/msm_drv.h | 6 +++++ drivers/gpu/drm/msm/msm_gem.c | 46 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_ringbuffer.c | 12 ++++----- 6 files changed, 72 insertions(+), 54 deletions(-) commit 1267a4dfe045df42faea5fc1dfe379b480595406 Author: Jordan Crouse Date: Thu Jul 27 10:42:39 2017 -0600 drm/msm: Attach the GPU MMU when it is created Currently the GPU MMU is attached in the adreno_gpu code but as more and more of the GPU initialization moves to the generic GPU path we have a need to map and use GPU memory earlier and earlier. There isn't any reason to defer attaching the MMU until later so attach it right after the address space is created so it can be used immediately. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 27 ++--------- drivers/gpu/drm/msm/msm_gpu.c | 85 ++++++++++++++++++++++----------- 3 files changed, 62 insertions(+), 55 deletions(-) commit b841065043f996e2bf7648786485f3935625592b Author: Shuah Khan Date: Fri Aug 11 10:11:42 2017 -0600 selftests: timers: drop support for !KTEST case There is no need to keep timers tests in sync with external timers repo. Drop support for !KTEST to support for building and running timers tests without kselftest framework. Reference: https://lkml.org/lkml/2017/8/10/952 Signed-off-by: Shuah Khan Acked-by: John Stultz tools/testing/selftests/timers/Makefile | 3 +-- tools/testing/selftests/timers/adjtick.c | 11 ----------- tools/testing/selftests/timers/alarmtimer-suspend.c | 11 ----------- tools/testing/selftests/timers/change_skew.c | 11 ----------- tools/testing/selftests/timers/clocksource-switch.c | 11 ----------- tools/testing/selftests/timers/inconsistency-check.c | 11 ----------- tools/testing/selftests/timers/leap-a-day.c | 11 ----------- tools/testing/selftests/timers/leapcrash.c | 13 ------------- tools/testing/selftests/timers/mqueue-lat.c | 11 ----------- tools/testing/selftests/timers/nanosleep.c | 11 ----------- tools/testing/selftests/timers/nsleep-lat.c | 11 ----------- tools/testing/selftests/timers/raw_skew.c | 12 ------------ tools/testing/selftests/timers/set-2038.c | 11 ----------- tools/testing/selftests/timers/set-tai.c | 11 ----------- tools/testing/selftests/timers/set-timer-lat.c | 11 ----------- tools/testing/selftests/timers/set-tz.c | 11 ----------- tools/testing/selftests/timers/skew_consistency.c | 11 ----------- tools/testing/selftests/timers/threadtest.c | 12 ------------ tools/testing/selftests/timers/valid-adjtimex.c | 11 ----------- 19 files changed, 1 insertion(+), 204 deletions(-) commit 5ce93ab624cee4ed68086c946bd6d18b9b3f64aa Author: Yury Norov Date: Sun Aug 20 13:20:47 2017 +0300 arm64: introduce separated bits for mm_context_t flags Currently mm->context.flags field uses thread_info flags which is not the best idea for many reasons. For example, mm_context_t doesn't need most of thread_info flags. And it would be difficult to add new mm-related flag if needed because it may easily interfere with TIF ones. To deal with it, the new MMCF_AARCH32 flag is introduced for mm_context_t->flags, where MMCF prefix stands for mm_context_t flags. Also, mm_context_t flag doesn't require atomicity and ordering of the access, so using set/clear_bit() is replaced with simple masks. Signed-off-by: Yury Norov Signed-off-by: Catalin Marinas arch/arm64/include/asm/elf.h | 4 ++-- arch/arm64/include/asm/mmu.h | 2 ++ arch/arm64/kernel/probes/uprobes.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 828f193dd62a40ade5ea8b24cb8b0a22c30df673 Author: Steve Capper Date: Tue Aug 22 11:42:49 2017 +0100 arm64: hugetlb: Cleanup setup_hugepagesz Replace a lot of if statements with switch and case labels to make it much clearer which huge page sizes are supported. Also, we prevent PUD_SIZE from being used on systems not running with 4KB PAGE_SIZE. Before if one supplied PUD_SIZE in these circumstances, then unusuable huge page sizes would be in use. Fixes: 084bd29810a5 ("ARM64: mm: HugeTLB support.") Cc: David Woods Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Reviewed-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 5cd028b9d90403bf24c8bf7915ed61c7a9bfce6c Author: Punit Agrawal Date: Tue Aug 22 11:42:48 2017 +0100 arm64: Re-enable support for contiguous hugepages also known as - Revert "Revert "Revert "commit 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit")""" Now that our hugetlb implementation is compliant with the break-before-make requirements of the architecture and we have addressed some of the issues in core code required for properly dealing with hardware poisoning of contiguous hugepages let's re-enable support for contiguous hugepages. This reverts commit 6ae979ab39a368c18ceb0424bf824d172d6ab56f. Signed-off-by: Punit Agrawal Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a8d623eefd780288c0299f517da0845da687fbfc Author: Punit Agrawal Date: Tue Aug 22 11:42:47 2017 +0100 arm64: hugetlb: Override set_huge_swap_pte_at() to support contiguous hugepages The default implementation of set_huge_swap_pte_at() does not support hugepages consisting of contiguous ptes. Override it to add support for contiguous hugepages. Signed-off-by: Punit Agrawal Cc: David Woods Signed-off-by: Catalin Marinas arch/arm64/include/asm/hugetlb.h | 3 +++ arch/arm64/mm/hugetlbpage.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) commit c3e4ed5c3d5d79af940eb24c810dddcec6d2b536 Author: Punit Agrawal Date: Tue Aug 22 11:42:46 2017 +0100 arm64: hugetlb: Override huge_pte_clear() to support contiguous hugepages The default huge_pte_clear() implementation does not clear contiguous page table entries when it encounters contiguous hugepages that are supported on arm64. Fix this by overriding the default implementation to clear all the entries associated with contiguous hugepages. Signed-off-by: Punit Agrawal Cc: David Woods Signed-off-by: Catalin Marinas arch/arm64/include/asm/hugetlb.h | 6 +++++- arch/arm64/mm/hugetlbpage.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) commit 99380edf9efcf3485d1b9ac9203f6aa85b658d2e Author: Vinod Koul Date: Tue Aug 22 22:13:44 2017 +0530 dmaengine: xgene-dma: remove unused xgene_dma_invalidate_buffer Commit c678fa66341c: ("dmaengine: remove DMA_SG as it is dead code in kernel") removes DMA_SG from dmaengine subsystem but missed removing unused xgene_dma_invalidate_buffer function, so remove it drivers/dma/xgene-dma.c:394:13: warning: ‘xgene_dma_invalidate_buffer’ defined but not used [-Wunused-function] static void xgene_dma_invalidate_buffer(__le64 *ext8) Signed-off-by: Vinod Koul drivers/dma/xgene-dma.c | 5 ----- 1 file changed, 5 deletions(-) commit 491bea00a13600eaa146923b910b70e9a326e950 Author: Vinod Koul Date: Tue Aug 22 22:03:43 2017 +0530 dmaengine: altera: remove DMA_SG Commit c678fa66341c: ("dmaengine: remove DMA_SG as it is dead code in kernel") removes DMA_SG from dmaengine subsystem but missed the newly added driver, so remove it from here as well Reported-by: Stephen Rothwell Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 94 --------------------------------------------- 1 file changed, 94 deletions(-) commit 39c13c204bb1150d401e27d41a9d8b332be47c49 Author: Shubham Bansal Date: Tue Aug 22 12:02:33 2017 +0530 arm: eBPF JIT compiler The JIT compiler emits ARM 32 bit instructions. Currently, It supports eBPF only. Classic BPF is supported because of the conversion by BPF core. This patch is essentially changing the current implementation of JIT compiler of Berkeley Packet Filter from classic to internal with almost all instructions from eBPF ISA supported except the following BPF_ALU64 | BPF_DIV | BPF_K BPF_ALU64 | BPF_DIV | BPF_X BPF_ALU64 | BPF_MOD | BPF_K BPF_ALU64 | BPF_MOD | BPF_X BPF_STX | BPF_XADD | BPF_W BPF_STX | BPF_XADD | BPF_DW Implementation is using scratch space to emulate 64 bit eBPF ISA on 32 bit ARM because of deficiency of general purpose registers on ARM. Currently, only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler. Tested on ARMv7 with QEMU by me (Shubham Bansal). Testing results on ARMv7: 1) test_bpf: Summary: 341 PASSED, 0 FAILED, [312/333 JIT'ed] 2) test_tag: OK (40945 tests) 3) test_progs: Summary: 30 PASSED, 0 FAILED 4) test_lpm: OK 5) test_lru_map: OK Above tests are all done with following flags enabled discreatly. 1) bpf_jit_enable=1 a) CONFIG_FRAME_POINTER enabled b) CONFIG_FRAME_POINTER disabled 2) bpf_jit_enable=1 and bpf_jit_harden=2 a) CONFIG_FRAME_POINTER enabled b) CONFIG_FRAME_POINTER disabled See Documentation/networking/filter.txt for more information. Signed-off-by: Shubham Bansal Signed-off-by: David S. Miller arch/arm/Kconfig | 2 +- arch/arm/net/bpf_jit_32.c | 2448 ++++++++++++++++++++++++++++++--------------- arch/arm/net/bpf_jit_32.h | 108 +- 3 files changed, 1747 insertions(+), 811 deletions(-) commit 60913e005c8d19ec5187a638eafdd088509dfb9e Author: Konstantin Khlebnikov Date: Sun Aug 20 14:39:32 2017 +0300 perf tools: Fix static linking with libunwind * libunwind-x86_64 must be linked before libunwind * libunwind requires liblzma * static libunwind conflicts with static libgcc_eh Signed-off-by: Konstantin Khlebnikov Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/150322917247.129799.14247751517961953155.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ba335df4ea2a5011002c5cde53bab6d7f5d714d8 Author: Konstantin Khlebnikov Date: Sun Aug 20 14:39:27 2017 +0300 perf tools: Fix static linking with libdw from elfutils Fix feature test for static libdw: link required dependencies. Backends of libebl are not statically linked thus libdl is required. In Debian/Ubuntu libdw-dev includes libebl.a starting from 0.166-1. Signed-off-by: Konstantin Khlebnikov Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/150322916720.129772.7959925864494283854.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ac0bb6b72f4bbab08f270a919406d971e73698b5 Author: Konstantin Khlebnikov Date: Sun Aug 20 14:39:20 2017 +0300 perf: Fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb Fix misprint CAP_IOC_LOCK -> CAP_IPC_LOCK. This capability have nothing to do with raw tracepoints. This part is about bypassing mlock limits. Sysctl kernel.perf_event_paranoid = -1 allows raw and ftrace function tracepoints without CAP_SYS_ADMIN. Signed-off-by: Konstantin Khlebnikov Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/150322916080.129746.11285255474738558340.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo Documentation/sysctl/kernel.txt | 13 ++++++++++++- tools/perf/util/evsel.c | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) commit 2826478a6660158d261bc49ad8954a8f5c39be07 Author: Konstantin Khlebnikov Date: Sun Aug 20 14:39:13 2017 +0300 perf tools: Really install manpages via 'make install-man' Target install-man builds them but forget to install. Signed-off-by: Konstantin Khlebnikov Cc: Alexander Shishkin Cc: Borislav Petkov Cc: Peter Zijlstra Fixes: af3df2cf17f5 ("perf tools: Try to build Documentation when installing") Link: http://lkml.kernel.org/r/150322915300.129715.13645857235229756834.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3067eaa7ce2dbcde89d87277cdbc91c211480060 Author: Andi Kleen Date: Wed Aug 16 15:21:56 2017 -0700 perf test: Add test cases for new data source encoding Add some simple tests to perf test to test data source printing. v2: Make the tests actually checked for the correct name of Forward v3: Adjust to new encoding Committer notes: Avoid the in place declaration to make this build with older compilers, for instance, in Debian 7 we get: tests/mem.c: In function 'test__mem': tests/mem.c:30:5: error: missing initializer [-Werror=missing-field-initializers] tests/mem.c:30:5: error: (near initialization for '(anonymous)..mem_snoop') [-Werror=missing-field-initializers] So just zero a struct, then go on building the unions as needed, reusing settings from the previous test, i.e. local -> remote, etc. Signed-off-by: Andi Kleen Acked-by: Peter Zijlstra Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170816222156.19953-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 +++ tools/perf/tests/mem.c | 56 +++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/tests.h | 1 + 4 files changed, 62 insertions(+) commit 2d32311cf19bfb8c1d2b4601974ddd951f9cfd0b Author: Carlos Maiolino Date: Fri Aug 18 18:07:04 2017 -0700 xfs: stop searching for free slots in an inode chunk when there are none In a filesystem without finobt, the Space manager selects an AG to alloc a new inode, where xfs_dialloc_ag_inobt() will search the AG for the free slot chunk. When the new inode is in the same AG as its parent, the btree will be searched starting on the parent's record, and then retried from the top if no slot is available beyond the parent's record. To exit this loop though, xfs_dialloc_ag_inobt() relies on the fact that the btree must have a free slot available, once its callers relied on the agi->freecount when deciding how/where to allocate this new inode. In the case when the agi->freecount is corrupted, showing available inodes in an AG, when in fact there is none, this becomes an infinite loop. Add a way to stop the loop when a free slot is not found in the btree, making the function to fall into the whole AG scan which will then, be able to detect the corruption and shut the filesystem down. As pointed by Brian, this might impact performance, giving the fact we don't reset the search distance anymore when we reach the end of the tree, giving it fewer tries before falling back to the whole AG search, but it will only affect searches that start within 10 records to the end of the tree. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc.c | 55 +++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit e67d3d4246e5fbb0c7c700426d11241ca9c6f473 Author: Brian Foster Date: Tue Aug 8 18:21:53 2017 -0700 xfs: add log recovery tracepoint for head/tail Torn write detection and tail overwrite detection can shift the log head and tail respectively in the event of CRC mismatch or corruption errors. Add a high-level log recovery tracepoint to dump the final log head/tail and make those values easily attainable in debug/diagnostic situations. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 2 ++ fs/xfs/xfs_trace.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit a4c9b34d6a17081005ec459b57b8effc08f4c731 Author: Brian Foster Date: Tue Aug 8 18:21:53 2017 -0700 xfs: handle -EFSCORRUPTED during head/tail verification Torn write and tail overwrite detection both trigger only on -EFSBADCRC errors. While this is the most likely failure scenario for each condition, -EFSCORRUPTED is still possible in certain cases depending on what ends up on disk when a torn write or partial tail overwrite occurs. For example, an invalid log record h_len can lead to an -EFSCORRUPTED error when running the log recovery CRC pass. Therefore, update log head and tail verification to trigger the associated head/tail fixups in the event of -EFSCORRUPTED errors along with -EFSBADCRC. Also, -EFSCORRUPTED can currently be returned from xlog_do_recovery_pass() before rhead_blk is initialized if the first record encountered happens to be corrupted. This leads to an incorrect 'first_bad' return value. Initialize rhead_blk earlier in the function to address that problem as well. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7f4d01f36a3ac16f539f0fd3839de5d58fa4940f Author: Brian Foster Date: Tue Aug 8 18:21:52 2017 -0700 xfs: add log item pinning error injection tag Add an error injection tag to force log items in the AIL to the pinned state. This option can be used by test infrastructure to induce head behind tail conditions. Specifically, this is intended to be used by xfstests to reproduce log recovery problems after failed/corrupted log writes overwrite the last good tail LSN in the log. When enabled, AIL push attempts see log items in the AIL in the pinned state. This stalls metadata writeback and thus prevents the current tail of the log from moving forward. When disabled, subsequent AIL pushes observe the log items in their appropriate state and filesystem operation continues as normal. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_error.c | 3 +++ fs/xfs/xfs_error.h | 4 +++- fs/xfs/xfs_trans_ail.c | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) commit 4a4f66eac4681378996a1837ad1ffec3a2e2981f Author: Brian Foster Date: Tue Aug 8 18:21:52 2017 -0700 xfs: fix log recovery corruption error due to tail overwrite If we consider the case where the tail (T) of the log is pinned long enough for the head (H) to push and block behind the tail, we can end up blocked in the following state without enough free space (f) in the log to satisfy a transaction reservation: 0 phys. log N [-------HffT---H'--T'---] The last good record in the log (before H) refers to T. The tail eventually pushes forward (T') leaving more free space in the log for writes to H. At this point, suppose space frees up in the log for the maximum of 8 in-core log buffers to start flushing out to the log. If this pushes the head from H to H', these next writes overwrite the previous tail T. This is safe because the items logged from T to T' have been written back and removed from the AIL. If the next log writes (H -> H') happen to fail and result in partial records in the log, the filesystem shuts down having overwritten T with invalid data. Log recovery correctly locates H on the subsequent mount, but H still refers to the now corrupted tail T. This results in log corruption errors and recovery failure. Since the tail overwrite results from otherwise correct runtime behavior, it is up to log recovery to try and deal with this situation. Update log recovery tail verification to run a CRC pass from the first record past the tail to the head. This facilitates error detection at T and moves the recovery tail to the first good record past H' (similar to truncating the head on torn write detection). If corruption is detected beyond the range possibly affected by the max number of iclogs, the log is legitimately corrupted and log recovery failure is expected. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 108 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 31 deletions(-) commit 5297ac1f6d7cbf45464a49b9558831f271dfc559 Author: Brian Foster Date: Tue Aug 8 18:21:51 2017 -0700 xfs: always verify the log tail during recovery Log tail verification currently only occurs when torn writes are detected at the head of the log. This was introduced because a change in the head block due to torn writes can lead to a change in the tail block (each log record header references the current tail) and the tail block should be verified before log recovery proceeds. Tail corruption is possible outside of torn write scenarios, however. For example, partial log writes can be detected and cleared during the initial head/tail block discovery process. If the partial write coincides with a tail overwrite, the log tail is corrupted and recovery fails. To facilitate correct handling of log tail overwites, update log recovery to always perform tail verification. This is necessary to detect potential tail overwrite conditions when torn writes may not have occurred. This changes normal (i.e., no torn writes) recovery behavior slightly to detect and return CRC related errors near the tail before actual recovery starts. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 284f1c2c9bebf871861184b0e2c40fa921dd380b Author: Brian Foster Date: Tue Aug 8 18:21:51 2017 -0700 xfs: fix recovery failure when log record header wraps log end The high-level log recovery algorithm consists of two loops that walk the physical log and process log records from the tail to the head. The first loop handles the case where the tail is beyond the head and processes records up to the end of the physical log. The subsequent loop processes records from the beginning of the physical log to the head. Because log records can wrap around the end of the physical log, the first loop mentioned above must handle this case appropriately. Records are processed from in-core buffers, which means that this algorithm must split the reads of such records into two partial I/Os: 1.) from the beginning of the record to the end of the log and 2.) from the beginning of the log to the end of the record. This is further complicated by the fact that the log record header and log record data are read into independent buffers. The current handling of each buffer correctly splits the reads when either the header or data starts before the end of the log and wraps around the end. The data read does not correctly handle the case where the prior header read wrapped or ends on the physical log end boundary. blk_no is incremented to or beyond the log end after the header read to point to the record data, but the split data read logic triggers, attempts to read from an invalid log block and ultimately causes log recovery to fail. This can be reproduced fairly reliably via xfstests tests generic/047 and generic/388 with large iclog sizes (256k) and small (10M) logs. If the record header read has pushed beyond the end of the physical log, the subsequent data read is actually contiguous. Update the data read logic to detect the case where blk_no has wrapped, mod it against the log size to read from the correct address and issue one contiguous read for the log data buffer. The log record is processed as normal from the buffer(s), the loop exits after the current iteration and the subsequent loop picks up with the first new record after the start of the log. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit d3a304b6292168b83b45d624784f973fdc1ca674 Author: Carlos Maiolino Date: Tue Aug 8 18:21:50 2017 -0700 xfs: Properly retry failed inode items in case of error during buffer writeback When a buffer has been failed during writeback, the inode items into it are kept flush locked, and are never resubmitted due the flush lock, so, if any buffer fails to be written, the items in AIL are never written to disk and never unlocked. This causes unmount operation to hang due these items flush locked in AIL, but this also causes the items in AIL to never be written back, even when the IO device comes back to normal. I've been testing this patch with a DM-thin device, creating a filesystem larger than the real device. When writing enough data to fill the DM-thin device, XFS receives ENOSPC errors from the device, and keep spinning on xfsaild (when 'retry forever' configuration is set). At this point, the filesystem can not be unmounted because of the flush locked items in AIL, but worse, the items in AIL are never retried at all (once xfs_inode_item_push() will skip the items that are flush locked), even if the underlying DM-thin device is expanded to the proper size. This patch fixes both cases, retrying any item that has been failed previously, using the infra-structure provided by the previous patch. Reviewed-by: Brian Foster Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 28 ++++++++++++++++++++++++++++ fs/xfs/xfs_buf_item.h | 3 +++ fs/xfs/xfs_inode_item.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- fs/xfs/xfs_trans.h | 1 + fs/xfs/xfs_trans_ail.c | 3 ++- fs/xfs/xfs_trans_priv.h | 31 +++++++++++++++++++++++++++++++ 6 files changed, 108 insertions(+), 5 deletions(-) commit 0b80ae6ed13169bd3a244e71169f2cc020b0c57a Author: Carlos Maiolino Date: Tue Aug 8 18:21:50 2017 -0700 xfs: Add infrastructure needed for error propagation during buffer IO failure With the current code, XFS never re-submit a failed buffer for IO, because the failed item in the buffer is kept in the flush locked state forever. To be able to resubmit an log item for IO, we need a way to mark an item as failed, if, for any reason the buffer which the item belonged to failed during writeback. Add a new log item callback to be used after an IO completion failure and make the needed clean ups. Reviewed-by: Brian Foster Signed-off-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 32 +++++++++++++++++++++++++++++++- fs/xfs/xfs_trans.h | 7 +++++-- 2 files changed, 36 insertions(+), 3 deletions(-) commit 6f4a1eefdd0ad4561543270a7fceadabcca075dd Author: Eric Sandeen Date: Tue Aug 8 18:21:49 2017 -0700 xfs: toggle readonly state around xfs_log_mount_finish When we do log recovery on a readonly mount, unlinked inode processing does not happen due to the readonly checks in xfs_inactive(), which are trying to prevent any I/O on a readonly mount. This is misguided - we do I/O on readonly mounts all the time, for consistency; for example, log recovery. So do the same RDONLY flag twiddling around xfs_log_mount_finish() as we do around xfs_log_mount(), for the same reason. This all cries out for a big rework but for now this is a simple fix to an obvious problem. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 757a69ef6cf2bf839bd4088e5609ddddd663b0c4 Author: Eric Sandeen Date: Tue Aug 8 18:19:47 2017 -0700 xfs: write unmount record for ro mounts There are dueling comments in the xfs code about intent for log writes when unmounting a readonly filesystem. In xfs_mountfs, we see the intent: /* * Now the log is fully replayed, we can transition to full read-only * mode for read-only mounts. This will sync all the metadata and clean * the log so that the recovery we just performed does not have to be * replayed again on the next mount. */ and it calls xfs_quiesce_attr(), but by the time we get to xfs_log_unmount_write(), it returns early for a RDONLY mount: * Don't write out unmount record on read-only mounts. Because of this, sequential ro mounts of a filesystem with a dirty log will replay the log each time, which seems odd. Fix this by writing an unmount record even for RO mounts, as long as norecovery wasn't specified (don't write a clean log record if a dirty log may still be there!) and the log device is writable. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f628c4ed3de499f027d3ae70cbb46c6dfadfc098 Author: Jeffy Chen Date: Tue Aug 22 23:35:48 2017 +0800 ASoC: rockchip: Correct 'dmic-delay' property name The 'dmic-delay' property name is different with the dt-binding. So correct it with 'dmic-wakeup-delay-ms'. Fixes: 3a6f9dce6116 (ASoC: rk3399_gru_sound: fix recording pop at first attempt) Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 18f7ce2f449504c31a2f2caaeb65430812dc3c43 Author: Claudiu Beznea Date: Tue Aug 22 12:51:16 2017 +0300 mtd: spi-nor: add support for Microchip sst26vf064b QSPI memory Add support for Microchip sst26vf064b QSPI memory. Signed-off-by: Claudiu Beznea Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit 2cded8c891fe04bea5772fad20c96c72315b9014 Author: Markus Elfring Date: Tue Aug 22 17:33:33 2017 +0200 ALSA: pcsp: Use common error handling code in snd_card_pcsp_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: Takashi Iwai sound/drivers/pcsp/pcsp.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 02fba04ebf78f02ca83b7727779f0df4cd2a7f00 Merge: 5a9c1e1 8c0b16f Author: Arnd Bergmann Date: Tue Aug 22 17:47:21 2017 +0200 Merge tag 'davinci-for-v4.14/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Pull "Enable driver for display used on Lego Mindstorms EV3" from Sekhar Nori: * tag 'davinci-for-v4.14/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable tinydrm and ST7586 commit 94717836b7de702a188cc56114c2d9590dc5852a Merge: 840fa4a 2798c4b Author: Arnd Bergmann Date: Tue Aug 22 17:46:18 2017 +0200 Merge tag 'davinci-for-v4.14/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "Add device-tree node for display on Lego Mindstorms EV3" from Sekhar Nori: * tag 'davinci-for-v4.14/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lego-ev3: Add node for LCD display commit 298f2a3aaa7be97120d1f2aa3babec3d6dc6bcd9 Merge: b2d3b78 0bb6f25 Author: Arnd Bergmann Date: Tue Aug 22 17:40:37 2017 +0200 Merge tag 'zynqmp-dt-for-4.14' of https://github.com/Xilinx/linux-xlnx into next/dt64 Pull "arm64: Xilinx ZynqMP DT fixes for v4.14" from Michal Simek: - Fix DTC warnings - Add idle states, OP, cci-400, RTC, pcie prefetchable memory fpd/lpd dmas, clocks for ep108 - Enable can1 - Fix smmu IRQ, aliases, uart compatible string - Use generic compatible string for i2c eeprom * tag 'zynqmp-dt-for-4.14' of https://github.com/Xilinx/linux-xlnx: arm64: zynqmp: Add generic compatible string for I2C EEPROM arm64: zynqmp: Add missing mmc aliases in ep108 arm64: zynqmp: Enable can1 for ep108 arm64: zynqmp: Added clocks to DT for ep108 arm64: zynqmp: Use C pre-processor for includes arm64: zynqmp: Add fpd/lpd dmas arm64: zynqmp: Set status disabled in dtsi arm64: zynqmp: Add new uartps compatible string arm64: zynqmp: Correct IRQ nr for the SMMU arm64: zynqmp: Add support for RTC arm64: zynqmp: Adding prefetchable memory space to pcie node arm64: zynqmp: Add CCI-400 node arm64: zynqmp: Add dcc console for zynqmp arm64: zynqmp: Add operating points arm64: zynqmp: Add idle state for ZynqMP arm64: zynqmp: Add references to cpu nodes arm64: zynqmp: Move nodes which have no reg property out of bus arm64: zynqmp: Remove leading 0s from mtd table for spi flashes arm64: dts: xilinx: fix PCI bus dtc warnings commit c16293560a1c188a05cba1dcc46548d33b641c06 Author: Kuninori Morimoto Date: Tue Aug 22 00:02:03 2017 +0000 ASoC: rsnd: remove unused rsnd_xxx_to_dma() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 1 - sound/soc/sh/rcar/ssi.c | 1 - 2 files changed, 2 deletions(-) commit 52839e653b5629bd237ad2ecdd8fdd897fcd5712 Author: Andi Kleen Date: Wed Aug 16 15:21:55 2017 -0700 perf tools: Add support for printing new mem_info encodings Add decoding for the new "lvlx" and "snoopx" meminfo fields added earlier to the kernel so that "perf mem report" and other tools can print it properly. v2: Merge with persistent memory patch. Switch to new bit encoding for each combination. v3: Switch to generic lvlnum field. Signed-off-by: Andi Kleen Acked-by: Peter Zijlstra Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170816222156.19953-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 30 ++++++++++++++++++++++-- tools/perf/util/mem-events.c | 43 ++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 5 deletions(-) commit 41d3d6db1767326dd7daf7c6df48e42020647c15 Author: Andi Kleen Date: Fri Mar 10 12:51:38 2017 -0800 perf vendor events: Add Skylake server uncore event list Add JSON uncore events for Skylake Server to perf. Based on JSON list V1.01 This is a much fuller list than with earlier uncores, including more low level (but also harder to understand) events. It does not include the "experimential" events. The previous high level metric (LLC_* etc.) are still available when applicable. C state power events are not included at this point. Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170816220553.GA19463@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/skylakex/uncore-memory.json | 172 +++ .../pmu-events/arch/x86/skylakex/uncore-other.json | 1156 ++++++++++++++++++++ 2 files changed, 1328 insertions(+) commit 630171d4156a257869b3cca5b2e63aacf7bc7948 Author: Andi Kleen Date: Fri Mar 10 15:23:13 2017 -0800 perf vendor events: Add core event list for Skylake Server Based on JSON list version v1.01 Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/3269ae458a883139110ec82bc895423bd8843d65 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + tools/perf/pmu-events/arch/x86/skylakex/cache.json | 1672 ++++++++++++++++++++ .../arch/x86/skylakex/floating-point.json | 88 ++ .../pmu-events/arch/x86/skylakex/frontend.json | 482 ++++++ .../perf/pmu-events/arch/x86/skylakex/memory.json | 1396 ++++++++++++++++ tools/perf/pmu-events/arch/x86/skylakex/other.json | 72 + .../pmu-events/arch/x86/skylakex/pipeline.json | 950 +++++++++++ .../arch/x86/skylakex/virtual-memory.json | 284 ++++ 8 files changed, 4945 insertions(+) commit d66dccdb13c9748f27d8401b45c027953fc833e8 Author: Andi Kleen Date: Fri Aug 11 16:26:25 2017 -0700 perf tools: Dedup events in expression parsing Avoid adding redundant events while parsing an expression. When we add an "other" event check first if it already exists. v2: Fix perf test failure. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-10-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/expr.y | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 8d3db2b97f5cb22cc589ba1e8e5232a26bfeb5d6 Author: Andi Kleen Date: Fri Aug 11 16:26:24 2017 -0700 perf tools: Increase maximum number of events in expressions Some of the upcoming metrics need more than 8 events. Increase the maximum number the parser supports. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-9-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/expr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d73bad06851b8d5745c11dd4ab789464f6c71b39 Author: Andi Kleen Date: Fri Aug 11 16:26:23 2017 -0700 perf tools: Expression parser enhancements for metrics Enhance the expression parser for more complex metric formulas. - Support python style IF ELSE operators - Add an #SMT_On magic variable for formulas that depend on the SMT status. Example: 4 *( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles - Support MIN/MAX operations Example: min(1 , IDQ.MITE_UOPS / ( UPI * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) ) This is useful to fix up problems caused by multiplexing. - Support | & ^ operators - Minor cleanups and fixes - Support an \ escape for operators. This allows to specify event names like c2-residency - Support @ as an alternative for / to be able to specify pmus without conflicts with operators (like msr/tsc/ as msr@tsc@) Example: (cstate_core@c3\\-residency@ / msr@tsc@) * 100 Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-8-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/expr.c | 5 ++++ tools/perf/util/expr.y | 61 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 60 insertions(+), 6 deletions(-) commit de5077c4e38f2a51f50d28bdd5e4a0f14b3d16ff Author: Andi Kleen Date: Fri Aug 11 16:26:22 2017 -0700 perf tools: Add utility function to detect SMT status Add an smt_on() function to return if SMT is enabled or disabled. Used in the next patch. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-7-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/smt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/smt.h | 6 ++++++ 3 files changed, 51 insertions(+) commit e8a91ae18bdc0bcedd2a07e42e66ca09dc2105d2 Author: Takashi Iwai Date: Mon Aug 21 16:13:27 2017 +0200 ALSA: ice1712: Add support for STAudio ADCIII STAudio ADCIII has the same SSID as Hoontech STDSP24, but requires a slightly different configuration. This patch allows user to choose this model via model=staudio option to set the proper configuration for the board. Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1048934 Signed-off-by: Takashi Iwai sound/pci/ice1712/hoontech.c | 39 ++++++++++++++++++++++++++++++++++----- sound/pci/ice1712/hoontech.h | 1 + 2 files changed, 35 insertions(+), 5 deletions(-) commit 30f3ac00ad2f822937839c95cbb22ce483190c4c Author: Punit Agrawal Date: Tue Aug 22 11:42:45 2017 +0100 arm64: hugetlb: Handle swap entries in huge_pte_offset() for contiguous hugepages huge_pte_offset() was updated to correctly handle swap entries for hugepages. With the addition of the size parameter, it is now possible to disambiguate whether the request is for a regular hugepage or a contiguous hugepage. Fix huge_pte_offset() for contiguous hugepages by using the size to find the correct page table entry. Signed-off-by: Punit Agrawal Cc: David Woods Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 77d0871c76bad1093a3d86870fe76dd1ad0ca397 Author: Andi Kleen Date: Fri Aug 11 16:26:19 2017 -0700 perf bpf: Tighten detection of BPF events perf stat -e cpu/uops_executed.core,cmask=1/ would be detected as a BPF source event because the .c matches the .c source BPF pattern. v2: Originally I tried to use lex lookahead, but it doesn't seem to work. This now extends the BPF pattern to match longer events, but then does an extra check in the C code to reject BPF matches that do not end with .c/.o/.obj This uses REJECT, which makes the flex scanner slower, but that shouldn't be a big problem for the perf events. Committer testing: # perf trace -e write -e /home/acme/bpf/tracepoint.c cat /etc/passwd > /dev/null 0.000 ( 0.006 ms): cat/18485 write(fd: 1, buf: 0x7f59eebe1000, count: 3494 ) ... 0.006 ( ): raw_syscalls:sys_enter:NR 1 (1, 7f59eebe1000, da6, 22, 7f59eebe0010, 0)) 0.008 ( ): perf_bpf_probe:_write:(ffffffff9626b2c0)) 0.000 ( 0.010 ms): cat/18485 ... [continued]: write()) = 3494 # It continues doing what was expected, i.e. identifying /home/acme/bpf/tracepoint.c as a BPF event and activates the clang machinery to build an eBPF object and then uses sys_bpf() to hook it up to the raw_syscalls:sys_enter tracepoint, etc. Andi forgot to add Wang to the CC list, fix it. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Wang Nan Link: http://lkml.kernel.org/r/20170811232634.30465-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit d8bdcff2876424d44d08a4d16a54fee518f9d5b8 Author: Steve Capper Date: Tue Aug 22 11:42:44 2017 +0100 arm64: hugetlb: Add break-before-make logic for contiguous entries It has become apparent that one has to take special care when modifying attributes of memory mappings that employ the contiguous bit. Both the requirement and the architecturally correct "Break-Before-Make" technique of updating contiguous entries can be found described in: ARM DDI 0487A.k_iss10775, "Misprogramming of the Contiguous bit", page D4-1762. The huge pte accessors currently replace the attributes of contiguous pte entries in place thus can, on certain platforms, lead to TLB conflict aborts or even erroneous results returned from TLB lookups. This patch adds two helper functions - * get_clear_flush(.) - clears a contiguous entry and returns the head pte (whilst taking care to retain dirty bit information that could have been modified by DBM). * clear_flush(.) that clears a contiguous entry A tlb invalidate is performed to then ensure that there is no possibility of multiple tlb entries being present for the same region. Cc: David Woods Signed-off-by: Steve Capper (Added helper clear_flush(), updated commit log, and some cleanup) Signed-off-by: Punit Agrawal [catalin.marinas@arm.com: remove CONFIG_ARM64_HW_AFDBM check] Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 112 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 21 deletions(-) commit 29a7287dceb76729960a15095fbbfcffa2179b07 Author: Steve Capper Date: Tue Aug 22 11:42:43 2017 +0100 arm64: hugetlb: Spring clean huge pte accessors This patch aims to re-structure the huge pte accessors without affecting their functionality. Control flow is changed to reduce indentation and expanded use is made of post for loop variable modification. It is then much easier to add break-before-make semantics in a subsequent patch. Cc: David Woods Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Reviewed-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 119 ++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 65 deletions(-) commit b5b0be86d7181ed82cee9d8ac5073a48f038a305 Author: Steve Capper Date: Tue Aug 22 11:42:42 2017 +0100 arm64: hugetlb: Introduce pte_pgprot helper Rather than xor pte bits in various places, use this helper function. Cc: David Woods Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Reviewed-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 475fb533fb7d3dcf009a434f9b9ea238b93f4cb8 Author: Andi Kleen Date: Fri Aug 11 16:26:17 2017 -0700 perf evsel: Fix buffer overflow while freeing events Fix buffer overflow for: % perf stat -e msr/tsc/,cstate_core/c7-residency/ true that causes glibc free list corruption. For some reason it doesn't trigger in valgrind, but it is visible in AS: ================================================================= ==32681==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000003f5c at pc 0x0000005671ef bp 0x7ffdaaac9ac0 sp 0x7ffdaaac9ab0 READ of size 4 at 0x603000003f5c thread T0 #0 0x5671ee in perf_evsel__close_fd util/evsel.c:1196 #1 0x56c57a in perf_evsel__close util/evsel.c:1717 #2 0x55ed5f in perf_evlist__close util/evlist.c:1631 #3 0x4647e1 in __run_perf_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:749 #4 0x4648e3 in run_perf_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:767 #5 0x46e1bc in cmd_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:2785 #6 0x52f83d in run_builtin /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:296 #7 0x52fd49 in handle_internal_command /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:348 #8 0x5300de in run_argv /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:392 #9 0x5308f3 in main /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:530 #10 0x7f0672d13400 in __libc_start_main (/lib64/libc.so.6+0x20400) #11 0x428419 in _start (/home/ak/hle/obj-perf/perf+0x428419) 0x603000003f5c is located 0 bytes to the right of 28-byte region [0x603000003f40,0x603000003f5c) allocated by thread T0 here: #0 0x7f0675139020 in calloc (/lib64/libasan.so.3+0xc7020) #1 0x648a2d in zalloc util/util.h:23 #2 0x648a88 in xyarray__new util/xyarray.c:9 #3 0x566419 in perf_evsel__alloc_fd util/evsel.c:1039 #4 0x56b427 in perf_evsel__open util/evsel.c:1529 #5 0x56c620 in perf_evsel__open_per_thread util/evsel.c:1730 #6 0x461dea in create_perf_stat_counter /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:263 #7 0x4637d7 in __run_perf_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:600 #8 0x4648e3 in run_perf_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:767 #9 0x46e1bc in cmd_stat /home/ak/hle/linux-hle-2.6/tools/perf/builtin-stat.c:2785 #10 0x52f83d in run_builtin /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:296 #11 0x52fd49 in handle_internal_command /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:348 #12 0x5300de in run_argv /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:392 #13 0x5308f3 in main /home/ak/hle/linux-hle-2.6/tools/perf/perf.c:530 #14 0x7f0672d13400 in __libc_start_main (/lib64/libc.so.6+0x20400) The event is allocated with cpus == 1, but freed with cpus == real number When the evsel close function walks the file descriptors it exceeds the fd xyarray boundaries and reads random memory. v2: Now that xyarrays save their original dimensions we can use these to iterate the two dimensional fd arrays. Fix some users (close, ioctl) in evsel.c to use these fields directly. This allows simplifying the code and dropping quite a few function arguments. Adjust all callers by removing the unneeded arguments. The actual perf event reading still uses the original values from the evsel list. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-2-andi@firstfloor.org [ Fix up xy_max_[xy]() -> xyarray__max_[xy]() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/openat-syscall-all-cpus.c | 2 +- tools/perf/tests/openat-syscall.c | 2 +- tools/perf/util/evlist.c | 12 +++------- tools/perf/util/evsel.c | 37 ++++++++++-------------------- tools/perf/util/evsel.h | 7 +++--- 5 files changed, 20 insertions(+), 40 deletions(-) commit d74be47673676eded2f0bb8274e752bed32c42d8 Author: Andi Kleen Date: Fri Aug 11 16:26:16 2017 -0700 perf xyarray: Save max_x, max_y Save the original array dimensions in xyarrays, so that users can retrieve them later. Add some inline functions to access these fields. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170811232634.30465-1-andi@firstfloor.org [ As noticed by Jiri, fix up namespacing: xy__method() -> xyarray__method() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/xyarray.c | 2 ++ tools/perf/util/xyarray.h | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit d3ea79527757ba65b3ee08e10c59a3c84f34e4bf Author: Steve Capper Date: Tue Aug 22 11:42:41 2017 +0100 arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present This patch adds a WARN_ON to set_huge_pte_at as the accessor assumes that entries to be written down are all present. (There are separate accessors to clear huge ptes). We will need to handle the !pte_present case where memory offlining is used on hugetlb pages. swap and migration entries will be supplied to set_huge_pte_at in this case. Cc: David Woods Signed-off-by: Steve Capper Signed-off-by: Punit Agrawal Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4f608d382e6fa982655e37d0e1b6c134fdc0e4c3 Author: Yong Wu Date: Mon Aug 21 19:00:21 2017 +0800 memory: mtk-smi: Degrade SMI init to module_init The initialization of MediaTek power manager(SCPSYS) is builtin_platform_driver, and SMI must depend on power-domain. Thus, currently subsys_initcall for SMI is unnecessary, SMI will be always probe defered by power-domain. Degrade it to module_init. In addition, there are two small changes about the probe sequence: 1) Delete this two lines. if (!dev->pm_domain) return -EPROBE_DEFER; This is not helpful. the platform driver framework guarantee this. The "dev_pm_domain_attach" in the "platform_drv_probe" will return EPROBE_DEFER if its powerdomain is not ready. 2) Add the probe-defer for the smi-larb device should waiting for smi-common. In mt2712, there are 2 smi-commons, 10 smi-larbs. All will be probe-defered by the power-domain, there is seldom case that smi-larb probe done before smi-common. then it will hang like this: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ffffff800a4e0000 [00000000] *pgd=00000000beffe003[ 17.610026] , *pud=00000000beffe003 ... [] mtk_smi_enable+0x1c/0xd0 [] mtk_smi_larb_get+0x30/0x98 [] mtk_mipicsi0_resume+0x38/0x1b8 [] pm_generic_runtime_resume+0x3c/0x58 [] __genpd_runtime_resume+0x38/0x98 [] genpd_runtime_resume+0x164/0x220 [] __rpm_callback+0x78/0xa0 [] rpm_callback+0x38/0xa0 [] rpm_resume+0x4a4/0x6f8 [] __pm_runtime_resume+0x64/0xa0 [] mtk_mipicsi0_probe+0x40c/0xb70 [] platform_drv_probe+0x58/0xc0 [] driver_probe_device+0x284/0x438 [] __device_attach_driver+0xb4/0x160 [] bus_for_each_drv+0x68/0xa8 [] __device_attach+0xd4/0x168 [] device_initial_probe+0x24/0x30 [] bus_probe_device+0xa0/0xa8 [] deferred_probe_work_func+0x94/0xf0 [] process_one_work+0x1d8/0x6e0 Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/memory/mtk-smi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 30e2fccf9512380b5cdceffe04d776f5e6de6b49 Author: Yong Wu Date: Mon Aug 21 19:00:20 2017 +0800 iommu/mediatek: Enlarge the validate PA range for 4GB mode This patch is for 4GB mode, mainly for 4 issues: 1) Fix a 4GB bug: if the dram base is 0x4000_0000, the dram size is 0xc000_0000. then the code just meet a corner case because max_pfn is 0x10_0000. data->enable_4GB = !!(max_pfn > (0xffffffffUL >> PAGE_SHIFT)); It's true at the case above. That is unexpected. 2) In mt2712, there is a new register for the 4GB PA range(0x118) we should enlarge the max PA range, or the HW will report error. The dram range is from 0x1_0000_0000 to 0x1_ffff_ffff in the 4GB mode, we cut out the bit[32:30] of the SA(Start address) and EA(End address) into this REG_MMU_VLD_PA_RNG(0x118). 3) In mt2712, the register(0x13c) is extended for 4GB mode. bit[7:6] indicate the valid PA[32:33]. Thus, we don't mask the value and print it directly for debug. 4) if 4GB is enabled, the dram PA range is from 0x1_0000_0000 to 0x1_ffff_ffff. Thus, the PA from iova_to_pa should also '|' BIT(32) Signed-off-by: Honghui Zhang Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 6254b64f570622d4ebb7af00d46229bfc7346212 Author: Yong Wu Date: Mon Aug 21 19:00:19 2017 +0800 iommu/mediatek: Disable iommu clock when system suspend When system suspend, infra power domain may be off, and the iommu's clock must be disabled when system off, or the iommu's bclk clock maybe disabled after system resume. Signed-off-by: Honghui Zhang Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4b00f5ac12fcee634c41b81444d981e1217ef618 Author: Yong Wu Date: Mon Aug 21 19:00:18 2017 +0800 iommu/mediatek: Move pgtable allocation into domain_alloc After adding the global list for M4U HW, We get a chance to move the pagetable allocation into the mtk_iommu_domain_alloc. Let the domain_alloc do the right thing. This patch is for fixing this problem[1]. [1]: https://patchwork.codeaurora.org/patch/53987/ Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 52 ++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 30 deletions(-) commit 7c3a2ec02806a6f83270f34f8ab4e501e7d8ea69 Author: Yong Wu Date: Mon Aug 21 19:00:17 2017 +0800 iommu/mediatek: Merge 2 M4U HWs into one iommu domain In theory, If there are 2 M4U HWs, there should be 2 IOMMU domains. But one IOMMU domain(4GB iova range) is enough for us currently, It's unnecessary to maintain 2 pagetables. Besides, This patch can simplify our consumer code largely. They don't need map a iova range from one domain into another, They can share the iova address easily. Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 92 ++++++++++++++++++++++++++++++++++------------- drivers/iommu/mtk_iommu.h | 2 ++ 2 files changed, 70 insertions(+), 24 deletions(-) commit e6dec92308628cff5f1f8bd1bcdf87581c9dc676 Author: Yong Wu Date: Mon Aug 21 19:00:16 2017 +0800 iommu/mediatek: Add mt2712 IOMMU support The M4U IP blocks in mt2712 is MTK's generation2 M4U which use the ARM Short-descriptor like mt8173, and most of the HW registers are the same. The difference is that there are 2 M4U HWs in mt2712 while there's only one in mt8173. The purpose of 2 M4U HWs is for balance the bandwidth. Normally if there are 2 M4U HWs, there should be 2 iommu domains, each M4U has a iommu domain. Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 71 ++++++++++++++++++++++------------------------ drivers/iommu/mtk_iommu.h | 7 +++++ drivers/memory/mtk-smi.c | 54 +++++++++++++++++++++++++++++++++-- include/soc/mediatek/smi.h | 2 +- 4 files changed, 93 insertions(+), 41 deletions(-) commit a9467d954226f1a513cfe789a3a39d8fc73b5d16 Author: Yong Wu Date: Mon Aug 21 19:00:15 2017 +0800 iommu/mediatek: Move MTK_M4U_TO_LARB/PORT into mtk_iommu.c The definition of MTK_M4U_TO_LARB and MTK_M4U_TO_PORT are shared by all the gen2 M4U HWs. Thus, Move them out from mt8173-larb-port.h, and put them into the c file. Suggested-by: Honghui Zhang Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 8 +++++++- include/dt-bindings/memory/mt8173-larb-port.h | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-) commit 894901b5c9433c6cdc2b997e4d35c1807572bd77 Merge: 46cc815 2926a2aa Author: Joerg Roedel Date: Tue Aug 22 16:35:15 2017 +0200 Merge branch 'iommu/fixes' into arm/mediatek commit 6c706b93b078ca0a802f6987b81899f4650a7810 Author: Helge Deller Date: Mon Aug 21 22:09:30 2017 +0200 parisc/core: Fix section mismatches Signed-off-by: Helge Deller arch/parisc/kernel/processor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0618cdfaeb0733e82d296d9db746b0fe0f07fefe Author: Helge Deller Date: Mon Aug 21 22:07:54 2017 +0200 parisc/ipmi_si_intf: Fix section mismatches on parisc platform Additionally add a MODULE_DEVICE_TABLE entry so that udev can load the driver automatically. Signed-off-by: Helge Deller drivers/char/ipmi/ipmi_si_intf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 98c77c7945241d2268712ac7e8edf7c99d3ad53e Author: Helge Deller Date: Mon Aug 21 22:06:45 2017 +0200 parisc/input/hilkbd: Fix section mismatches Signed-off-by: Helge Deller drivers/input/keyboard/hilkbd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 117c02394a29768573c4c4ea86b61d83970c8391 Author: Helge Deller Date: Mon Aug 21 22:05:51 2017 +0200 parisc/net/lasi_82596: Fix section mismatches Signed-off-by: Helge Deller drivers/net/ethernet/i825xx/lasi_82596.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c1bebd070008e5cca8ab6a0d183068b9f51f6f50 Author: Helge Deller Date: Mon Aug 21 22:03:39 2017 +0200 parisc/serio: Fix section mismatches in gscps2 and hp_sdc drivers Signed-off-by: Helge Deller drivers/input/serio/gscps2.c | 10 +++++----- drivers/input/serio/hp_sdc.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit cfe4fbfb23b3280e9a4d1c3b8438c1558a6a614d Author: Helge Deller Date: Mon Aug 21 22:02:19 2017 +0200 parisc: Fix section mismatches in parisc core drivers Signed-off-by: Helge Deller drivers/parisc/asp.c | 4 ++-- drivers/parisc/ccio-dma.c | 4 ++-- drivers/parisc/ccio-rm-dma.c | 6 +++--- drivers/parisc/dino.c | 4 ++-- drivers/parisc/eisa.c | 4 ++-- drivers/parisc/hppb.c | 6 +++--- drivers/parisc/lasi.c | 4 ++-- drivers/parisc/lba_pci.c | 4 ++-- drivers/parisc/sba_iommu.c | 6 +++--- drivers/parisc/superio.c | 4 ++-- drivers/parisc/wax.c | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) commit f0973443bef706b6bccc8a1b99a19b8e389bf9cd Author: Helge Deller Date: Mon Aug 21 21:58:19 2017 +0200 parisc/parport_gsc: Fix section mismatches Signed-off-by: Helge Deller drivers/parport/parport_gsc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6ade2a0be9ee20bfd7a884436ce73df9a69d1d8c Author: Helge Deller Date: Mon Aug 21 21:57:39 2017 +0200 parisc/scsi/lasi700: Fix section mismatches Signed-off-by: Helge Deller drivers/scsi/lasi700.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5898aa13ab4899d3a12e069f8716f83dd44567eb Author: Helge Deller Date: Mon Aug 21 21:56:59 2017 +0200 parisc/scsi/zalon: Fix section mismatches Signed-off-by: Helge Deller drivers/scsi/zalon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e466f101e19f0836e8040a7bf4cde2205534963 Author: Helge Deller Date: Mon Aug 21 21:56:08 2017 +0200 parisc/8250_gsc: Fix section mismatches Signed-off-by: Helge Deller drivers/tty/serial/8250/8250_gsc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc72b7a3a0d893576afb19b4f38c1d6160e9753b Author: Helge Deller Date: Mon Aug 21 21:55:11 2017 +0200 parisc/mux: Fix section mismatches Signed-off-by: Helge Deller drivers/tty/serial/mux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6aaf7934cfcd3884c852ad88559c228a53b413f7 Author: Helge Deller Date: Mon Aug 21 21:54:23 2017 +0200 parisc/sticore: Fix section mismatches Signed-off-by: Helge Deller drivers/video/console/sticore.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c8dbaa2261197a648673cc14a280fe7dac73ca5d Author: Helge Deller Date: Mon Aug 21 21:52:05 2017 +0200 parisc/harmony: Fix section mismatches Signed-off-by: Helge Deller sound/parisc/harmony.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b6adc16e08e0ee8bbc9cccf7af3882b6e1cb30c2 Author: Helge Deller Date: Sun Aug 20 10:52:22 2017 +0200 parisc: Wire up support for self-extracting kernel Signed-off-by: Helge Deller arch/parisc/Kconfig | 6 ++++++ arch/parisc/Makefile | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) commit f5213b2c40f5749e6b9b8f737ea946495ed0a438 Author: Helge Deller Date: Sun Aug 20 10:52:22 2017 +0200 parisc: Make existing core files reuseable for bootloader Signed-off-by: Helge Deller arch/parisc/include/asm/page.h | 4 ++++ arch/parisc/include/asm/pdc.h | 2 ++ arch/parisc/kernel/firmware.c | 15 ++++++++++++++- arch/parisc/kernel/real2.S | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) commit 2f3c7b8137ef6a3f90850d7cb5dbd05d8940403a Author: Helge Deller Date: Sun Aug 20 10:52:22 2017 +0200 parisc: Add core code for self-extracting kernel Signed-off-by: Helge Deller arch/parisc/boot/.gitignore | 2 + arch/parisc/boot/Makefile | 26 +++ arch/parisc/boot/compressed/.gitignore | 3 + arch/parisc/boot/compressed/Makefile | 86 +++++++++ arch/parisc/boot/compressed/head.S | 85 +++++++++ arch/parisc/boot/compressed/misc.c | 301 ++++++++++++++++++++++++++++++ arch/parisc/boot/compressed/vmlinux.lds.S | 101 ++++++++++ arch/parisc/boot/compressed/vmlinux.scr | 10 + arch/parisc/boot/install.sh | 65 +++++++ 9 files changed, 679 insertions(+) commit e35a2ce692821563583fa8b11ddf4acb24e54580 Author: Helge Deller Date: Fri Aug 4 23:46:16 2017 +0200 parisc: Enable UBSAN support Signed-off-by: Helge Deller arch/parisc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 1ed4714fba25a3730369567b081549ee1da49124 Author: Helge Deller Date: Thu Aug 10 19:20:47 2017 +0200 parisc/random: Add machine specific randomness Add some machine-specific information like values of cr16 cycle counter, machine-specific software ID and machine model to the random generator. Signed-off-by: Helge Deller arch/parisc/kernel/processor.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit d2883fa1a6fcb065362f27f410114dc6b7084655 Author: John David Anglin Date: Wed Jul 26 20:02:52 2017 +0200 parisc: Optimize switch_mm We only need to switch contexts when prev != next, and we don't need to disable interrupts to do the check. Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/include/asm/mmu_context.h | 3 +++ 1 file changed, 3 insertions(+) commit 42593e70004d13baf9f1587aed13911cac01cfd9 Author: Helge Deller Date: Fri Aug 4 21:32:41 2017 +0200 parisc: Drop MADV_SPACEAVAIL, MADV_VPS_PURGE and MADV_VPS_INHERIT Those aren't used or implemented anywhere in Linux. Furthermore, MADV_SPACEAVAIL seems to be a HP-UX related flag which is implemented as null operation in HP-UX. And since we don't support running HP-UX binaries there is no need to keep it. Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/mman.h | 3 --- 1 file changed, 3 deletions(-) commit 8b5bdd850dcc12b2d1c1e1a8418c0c31da56e69b Author: Helge Deller Date: Mon Aug 7 23:28:39 2017 +0200 parisc: Static initialization of pcxl_res_lock spinlock Signed-off-by: Helge Deller arch/parisc/kernel/pci-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit da3dc73ef6dcb226a2a97ac70c53026b7d16d77e Author: Helge Deller Date: Mon Aug 7 23:26:45 2017 +0200 parisc: Drop exception_data struct Signed-off-by: Helge Deller arch/parisc/lib/memcpy.c | 2 -- 1 file changed, 2 deletions(-) commit 76cffeb6ccace1ae487e58d8d72b4519861a9d9e Author: Helge Deller Date: Fri Aug 4 23:54:19 2017 +0200 parisc: Static initialization of spinlocks in perf and unwind code While testing UBSAN I saw this BUG: BUG: spinlock bad magic on CPU#0, swapper/0 in unwind code. Let's avoid that by static initialization. Signed-off-by: Helge Deller arch/parisc/kernel/perf.c | 4 +--- arch/parisc/kernel/unwind.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 54ac8fcbd6e6777929235ac767467991005d2df3 Author: Helge Deller Date: Fri Aug 4 19:23:53 2017 +0200 parisc: PDT: Add full support for memory failure via Page Deallocation Table (PDT) This patch adds full support to read PDT info on all machine types. At bootup the PDT is read and bad memory excluded from usage via memblock_reserve(). Later in the boot process a kernel thread is started (kpdtd) which regularily checks firmare for new reported bad memory and tries to soft offline pages in case of correctable errors and to kill processes and exclude such memory in case of uncorrectable errors via memory_failure(). Signed-off-by: Helge Deller arch/parisc/Kconfig | 1 + arch/parisc/kernel/pdt.c | 280 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 240 insertions(+), 41 deletions(-) commit 8a5aa00e6b9630d36d7681b38062a3d48d8b6ee6 Author: Helge Deller Date: Fri Aug 4 19:12:39 2017 +0200 parisc: PDT/firmware: Add support to read PDT on older PAT-machines Older machines with a PAT firmware (e.g. the rp5470) return their Page Deallocation Table (PDT) info per cell via the PDC_PAT_MEM_PD_INFO PDC call. This patch adds the necessary structures and wrappers to call firmware. Signed-off-by: Helge Deller arch/parisc/include/asm/pdcpat.h | 14 ++++++++++++ arch/parisc/kernel/firmware.c | 47 +++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 8 deletions(-) commit 24587380f61d20e36662fbd4d938431e33e3eda2 Author: Helge Deller Date: Fri Aug 4 20:07:41 2017 +0200 parisc: Add MADV_HWPOISON and MADV_SOFT_OFFLINE Add the missing MADV_HWPOISON (100) and MADV_SOFT_OFFLINE (101) defines which are needed for an upcoming patch which adds page-deallocation for parisc. Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/mman.h | 3 +++ tools/arch/parisc/include/uapi/asm/mman.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 7af9a5fdb9e0ca33c9c18d5a9b1512c98a03120f Author: Magnus Damm Date: Mon Aug 21 14:53:35 2017 +0900 iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove() Extend the driver to make use of iommu_device_sysfs_add()/remove() functions to hook up initial sysfs support. Suggested-by: Joerg Roedel Signed-off-by: Magnus Damm Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 782fbec745d84fa06708e703a92a431c4344daf0 Author: Takashi Sakamoto Date: Tue Aug 22 22:58:15 2017 +0900 ALSA: firewire: add const qualifier to identifiers for read-only symbols Drivers in ALSA firewire stack still includes some symbols which can be moved to a section for read-only symbols. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob.h | 2 +- sound/firewire/bebob/bebob_focusrite.c | 6 +++--- sound/firewire/bebob/bebob_maudio.c | 2 +- sound/firewire/bebob/bebob_terratec.c | 2 +- sound/firewire/bebob/bebob_yamaha_terratec.c | 2 +- sound/firewire/dice/dice.c | 2 +- sound/firewire/fireface/ff-protocol-ff400.c | 2 +- sound/firewire/fireface/ff.c | 2 +- sound/firewire/fireface/ff.h | 4 ++-- sound/firewire/fireworks/fireworks_proc.c | 2 +- sound/firewire/motu/motu.c | 6 +++--- sound/firewire/oxfw/oxfw-scs1x.c | 11 +++++------ sound/firewire/tascam/tascam.c | 2 +- 13 files changed, 22 insertions(+), 23 deletions(-) commit e948bc8fbee077735c2b71b991a5ca5e573f3506 Author: Viresh Kumar Date: Thu Aug 17 09:12:27 2017 +0530 cpufreq: Cap the default transition delay value to 10 ms If transition_delay_us isn't defined by the cpufreq driver, the default value of transition delay (time after which the cpufreq governor will try updating the frequency again) is currently calculated by multiplying transition_latency (nsec) with LATENCY_MULTIPLIER (1000) and then converting this time to usec. That gives the exact same value as transition_latency, just that the time unit is usec instead of nsec. With acpi-cpufreq for example, transition_latency is set to around 10 usec and we get transition delay as 10 ms. Which seems to be a reasonable amount of time to reevaluate the frequency again. But for platforms where frequency switching isn't that fast (like ARM), the transition_latency varies from 500 usec to 3 ms, and the transition delay becomes 500 ms to 3 seconds. Of course, that is a pretty bad default value to start with. We can try to come across a better formula (instead of multiplying with LATENCY_MULTIPLIER) to solve this problem, but will that be worth it ? This patch tries a simple approach and caps the maximum value of default transition delay to 10 ms. Of course, userspace can still come in and change this value anytime or individual drivers can rather provide transition_delay_us instead. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 919096f7f3e55d6bb783e6b42851d720121d6fa7 Author: Linus Walleij Date: Wed Aug 16 10:19:14 2017 +0200 cpufreq: dbx500: Delete obsolete driver We have moved the Ux500 over to use the generic DT based cpufreq driver, so delete the old custom driver. At the same time select CPUFREQ_DT from the machine's Kconfig in order to satisfy the "default ARCH_U8500" selection on the old driver. Acked-by: Viresh Kumar Signed-off-by: Linus Walleij Signed-off-by: Rafael J. Wysocki arch/arm/mach-ux500/Kconfig | 1 + drivers/cpufreq/Kconfig.arm | 9 ---- drivers/cpufreq/Makefile | 1 - drivers/cpufreq/dbx500-cpufreq.c | 103 --------------------------------------- 4 files changed, 1 insertion(+), 113 deletions(-) commit 836a1e25dff8b23d5d54022cf84f841dae2387c7 Author: Linus Walleij Date: Tue Aug 22 15:17:40 2017 +0200 mfd: db8500-prcmu: Get rid of cpufreq dependency The ARMSS clock, also known as the operating point of the CPU, should not cross-depend on cpufreq like this. Move the code to use just frequencies and remove the false frequency (1GHz) and put in the actual frequency provided by the ARMSS clock (998400000 Hz) as part of the process. After this and the related cpufreq patch, the DB8500 will simply use the standard DT cpufreq driver to change the operating points through the common clock framework using the ARMSS clock. Acked-by: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Rafael J. Wysocki drivers/mfd/db8500-prcmu.c | 62 ++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 41 deletions(-) commit 241bc82e62b28fdb7223b85180fd814f4963c971 Merge: 3a93d08 88c54cd Author: Takashi Iwai Date: Tue Aug 22 15:44:45 2017 +0200 Merge branch 'for-linus' into for-next Conflicts: sound/core/control.c commit e480b745386e3911c45e5b281f3471c7aff8cc3b Author: Mika Westerberg Date: Fri Aug 18 13:05:55 2017 +0300 pinctrl: intel: Add Intel Lewisburg GPIO support Intel Lewisburg has the same GPIO hardware than Intel Sunrisepoint-H except few differences in register offsets and pin lists. Because of this we add a separate pinctrl driver for Lewisburg. Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/Kconfig | 8 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-lewisburg.c | 343 ++++++++++++++++++++++++++++++ 3 files changed, 352 insertions(+) commit a663ccf0fea17609b92ecc066ce6e8dda559ca73 Author: Mika Westerberg Date: Fri Aug 18 13:05:54 2017 +0300 pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support This is desktop version Intel Cannon Lake PCH. The GPIO hardware is the same but pin list differs a bit. Add support for this to the existing Cannon Lake pin controller driver. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cannonlake.c | 424 ++++++++++++++++++++++++++++- 1 file changed, 423 insertions(+), 1 deletion(-) commit 33f5dc84680878fb077bd4bcab587e4a5ce228f7 Author: Biju Das Date: Wed Aug 16 12:12:16 2017 +0100 gpio: rcar: Add r8a7745 (RZ/G1E) support Renesas RZ/G1E (R8A7745) SoC GPIO blocks are identical to the R-Car Gen2 family. Add support for its GPIO controllers. Signed-off-by: Biju Das Acked-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit dddd9663d16512ca42c11cd3d0410008a7d258f6 Merge: 1865af2 56d5739 Author: Linus Walleij Date: Tue Aug 22 15:32:28 2017 +0200 Merge tag 'sh-pfc-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.14 - Propagate errors on group config, now r8a7740-armadillo800eva.dts is fixed, - Add MSIOF and USB2.0 pin groups on R-Car H3 ES2.0, - Add USB2.0 and USB3.0 pin groups on R-Car M3-W, - Add a missing MMC pin group on R-Car M2-W and RZ/G1M, - Add initial support for R-Car D3, - Small fixes and cleanups. commit 840fa4a080a5367c0e2999bebf4fcc0923eab1f7 Merge: a435adb 21ad06c Author: Arnd Bergmann Date: Tue Aug 22 15:31:38 2017 +0200 Merge tag 'zynq-dt-for-4.14' of https://github.com/Xilinx/linux-xlnx into next/dt Pull "arm: Xilinx Zynq DT fixes for v4.14" from Michal Simek: - Remove earlycon - Use C pre-processor - Add fpga full region - Add ethernet-phy as device-type - Add adv7511 nodes to zc70x * tag 'zynq-dt-for-4.14' of https://github.com/Xilinx/linux-xlnx: arm: zynq: Remove earlycon from bootargs arm: zynq: Use C pre-processor for includes in dts arm: zynq: Label whole PL part as fpga_full region arm: zynq: Add device-type property for zynq ethernet phy nodes arm: zynq: Add adv7511 on i2c bus for zc70x commit a435adbec264dc1e0d0f4df736bf35f18b8d7c02 Author: Linus Walleij Date: Tue Aug 22 09:28:20 2017 +0200 ARM: dts: augment Ux500 to use DT cpufreq This adds the operating points to the Ux500 device tree and deletes the old special-purpose cpufreq node, as we can now use the generic DT cpufreq driver. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/ste-dbx5x0.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f89c6eafa35ae06390eea50f81c94d9a3c5ee5fe Author: Masahiro Yamada Date: Thu Aug 10 07:51:27 2017 +0900 gpio: brcmstb: check return value of gpiochip_irqchip_add() Because gpiochip_irqchip_add() may fail, its return value should be checked. Signed-off-by: Masahiro Yamada Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1865af212dfa0819ca21c7e5c18c2a75202c1827 Author: Yong Li Date: Wed Aug 16 00:21:50 2017 +0800 pinctrl: aspeed: Fix ast2500 strap register write logic On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li Reviewed-by: Andrew Jeffery Tested-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 19 +++++++++++++++++-- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) commit 1899ccc041069e86557d6952d97f3b41b7333d87 Author: Icenowy Zheng Date: Fri Aug 11 22:27:34 2017 +0800 pinctrl: sunxi: fix wrong irq_banks number for H5 pinctrl The pin controller of Allwinner H5 has three IRQ banks, however in old versions of drivers and device trees, only two are set, which makes PG bank IRQ not available. If it's directly set to 3, the old device trees will fail to boot. Add a workaround (and a warning) for older device trees, and allow new device trees to use correct 3 IRQ banks. Fixes: 838adb576d4a ("drivers: pinctrl: add driver for Allwinner H5 SoC") Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 5ff56b015e85c4a6761968db369b4b2c9d821c86 Author: Rushikesh S Kadam Date: Fri Aug 11 13:53:44 2017 +0530 pinctrl: intel: Disable GPIO pin interrupts in suspend The fix prevents unintended wakes from second level GPIO pin interrupts. On some Intel Kabylake platforms, it is observed that GPIO pin interrupts can wake the platform from suspend-to-idle, even though the IRQ is not configured as IRQF_NO_SUSPEND or enable_irq_wake(). This can cause undesired wakes on Mobile devices such as Laptops and Chromebook devices. For example a headset jack insertion is not a desired wake source on Chromebook devices. The pinctrl-intel (GPIO controller) driver implements a "Shared IRQ" model. All GPIO pin interrupts are OR'ed and mapped to a first level IRQ14 (or IRQ15). The driver registers an irq_chip struct and maps an irq_domain for the GPIO pin interrupts. The IRQ14 handler demuxes and calls the second level IRQ for the respective pin. In the suspend entry flow, at suspend_noirq stage, the kernel disables IRQs that are not marked for wake. The pinctrl-intel driver does not implement a irq_disable() callback (to take advantage of lazy disabling). The pinctrl-intel GPIO interrupts are not disabled in hardware during suspend entry, and thus are able to wake the SoC out of suspend-to-idle. This patch sets the IRQCHIP_MASK_ON_SUSPEND flag for the GPIO irq_chip, to disable the second level interrupts at suspend_noirq stage via the irq_mask callbacks. The irq_mask callback disables the IRQs in hardware by programming the corresponding GPIO pad registers. Only IRQs that are not marked for wake are disabled. Signed-off-by: Rushikesh S Kadam Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Reviewed-and-tested-by: Rajneesh Bhardwaj Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 1 + 1 file changed, 1 insertion(+) commit 4958471b0d2110a34df0b45803e6f24ed89b857b Author: Jeffy Chen Date: Tue Aug 22 15:57:21 2017 +0800 ASoC: soc-core: Allow searching dai driver name in snd_soc_find_dai Currently we are searching dai name in snd_soc_find_dai, which could either be dai driver name or component device name(for legacy naming). Allow searching dai driver name in snd_soc_find_dai too, so that we can use dai driver name to find legacy naming dais. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a228d74f3354b8abdade461209b9aec0dac7cd76 Author: Julia Lawall Date: Thu Aug 10 12:06:29 2017 +0200 pinctrl: vt8500: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/vt8500/pinctrl-wmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a9856ef75982248334420dc3cb6f80680e5ecf45 Author: Julia Lawall Date: Thu Aug 10 12:06:28 2017 +0200 pinctrl: ti-iodelay: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops and pctlops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb190c3402172e0a547097e3bbc20e3e989c7694 Author: Julia Lawall Date: Thu Aug 10 12:06:27 2017 +0200 pinctrl: tz1090: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-tz1090.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78094f19e1547e180023922d7b9ad6b36e83a53b Author: Julia Lawall Date: Thu Aug 10 12:06:26 2017 +0200 pinctrl: tz1090-pdc: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-tz1090-pdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39a303674fa98eed1edb1cc5ffb75bb00149e0ca Author: Julia Lawall Date: Thu Aug 10 12:06:25 2017 +0200 pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (pctlops and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-tb10x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b82bfae143bc519f10a90d784bcc4803d3eccb7b Author: Julia Lawall Date: Thu Aug 10 12:06:24 2017 +0200 pinctrl: rza1: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures This pinmux_ops structure is only stored in the const pmxops field of a pinctrl_desc structure. Make the pinmux_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rza1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bf7b849fb57b963600f5b7715755c43173d8224 Author: Julia Lawall Date: Thu Aug 10 12:06:23 2017 +0200 pinctrl: ingenic: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ingenic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3c9adfadc9994d701cf7ce1f35ab12b891ee6bb Author: Julia Lawall Date: Thu Aug 10 12:06:22 2017 +0200 pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (pctlops and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-adi2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0192fffec3dcb136698092b12ed8f370946babfe Author: Julia Lawall Date: Thu Aug 10 12:06:21 2017 +0200 pinctrl: aspeed: g5: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cfa5760c3bb95b284f21a9ca19317688d4f0c079 Author: Julia Lawall Date: Thu Aug 10 12:06:20 2017 +0200 pinctrl: aspeed: g4: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db74f96d6a98f4c9c707660053f95b751a5ff592 Author: Julia Lawall Date: Thu Aug 10 12:06:19 2017 +0200 pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (pctlops and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Baruch Siach Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-digicolor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecdc722f49e1ec6ccf6c53d63413777cbb469948 Author: Julia Lawall Date: Thu Aug 10 12:06:18 2017 +0200 pinctrl: sirf: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (pctlops and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-sirf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a8bd83af30e3045b8b251191e759a2be9877816 Author: Takashi Iwai Date: Tue Aug 22 13:59:51 2017 +0200 ASoC: tegra: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/tegra/tegra_alc5632.c | 13 ------------- sound/soc/tegra/tegra_max98090.c | 18 ------------------ sound/soc/tegra/tegra_rt5640.c | 13 ------------- sound/soc/tegra/tegra_rt5677.c | 18 ------------------ sound/soc/tegra/tegra_wm8903.c | 5 ----- 5 files changed, 67 deletions(-) commit 790b82898db2f42e3430ca84ac9bc3bd7ab474ce Author: Takashi Iwai Date: Tue Aug 22 13:59:50 2017 +0200 ASoC: samsung: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/samsung/h1940_uda1380.c | 9 --------- sound/soc/samsung/rx1950_uda1380.c | 10 ---------- sound/soc/samsung/smartq_wm8987.c | 9 --------- 3 files changed, 28 deletions(-) commit 7676b40606666547544998e5bc9e7f492fa2e13f Author: Takashi Iwai Date: Tue Aug 22 13:59:49 2017 +0200 ASoC: pxa: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/hx4700.c | 8 -------- 1 file changed, 8 deletions(-) commit 90c265c65a3216ea236ed8e81d0a8d6411c26e88 Author: Takashi Iwai Date: Tue Aug 22 13:59:48 2017 +0200 ASoC: omap: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/omap/ams-delta.c | 10 ---------- sound/soc/omap/omap-twl4030.c | 13 ------------- sound/soc/omap/rx51.c | 9 --------- 3 files changed, 32 deletions(-) commit 51f25e7f9270378cee0526184ecaaae6c847a5f6 Author: Takashi Iwai Date: Tue Aug 22 13:59:47 2017 +0200 ASoC: intel: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/boards/byt-max98090.c | 12 ------------ 1 file changed, 12 deletions(-) commit 71ccb82be752a5b445006a5feacd6996d59a6a72 Author: Julia Lawall Date: Thu Aug 10 12:06:17 2017 +0200 pinctrl: sirf: atlas7: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures This pinmux_ops structure is only stored in the const pmxops field of a pinctrl_desc structure. Make the pinmux_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2661112fcc5fe555130f383a21e6ce5152570403 Author: Takashi Iwai Date: Tue Aug 22 13:59:46 2017 +0200 ASoC: simple-card: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 ---------- 1 file changed, 10 deletions(-) commit 8244fd7e489a586e63a36302105a2a1ece28a3c6 Author: Takashi Iwai Date: Tue Aug 22 13:59:45 2017 +0200 ASoC: fsl: Remove superfluous snd_soc_jack_free_gpios() call Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/fsl/imx-es8328.c | 3 --- 1 file changed, 3 deletions(-) commit bd29ae969042c87413157c02d4f2a787d0212da3 Author: Takashi Iwai Date: Tue Aug 22 13:59:44 2017 +0200 ASoC: jack: Manage gpios via devres Let's be lazy -- this patch adds the devres code to snd_soc_jack_add_gpios() for releasing the gpio resources at device removal automagically. After this patch, you don't have to call snd_soc_jack_free_gpios() manually as long as it's managed from the machine driver. What about the gpios assigned in other levels? Well, you might still need to free the resources manually, depending on how the component unbind works. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/soc-jack.c | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) commit baf918c4abbbf7c8b8931ea024a0c6d56cc2a9c1 Author: Julia Lawall Date: Thu Aug 10 12:06:16 2017 +0200 pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b4e2ba4242bd595dff16cb85676995cc7fb5b32 Author: Julia Lawall Date: Thu Aug 10 12:06:15 2017 +0200 pinctrl: armada-37xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures This pinconf_ops structure is only stored in the const pinconf_ops field of a pinctrl_desc structure. Make the pinconf_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d82a9700093f4360c2d209ba4e8585398d0317ee Author: Julia Lawall Date: Thu Aug 10 12:06:14 2017 +0200 pinctrl: artpec6: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures This pinctrl_ops structure is only stored in the const pctlops field of a pinctrl_desc structure. Make the pinctrl_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Lars Persson Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-artpec6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b2f016c3bf5c5b61979f8d4cfe5f1eb217e3b7c Author: Julia Lawall Date: Thu Aug 10 12:06:13 2017 +0200 pinctrl: bcm281xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures This pinconf_ops structure is only stored in the const confops field of a pinctrl_desc structure. Make the pinconf_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abcac84fef1df51c7f3bfd9e941cdb603ab7179b Author: Katsuhiro Suzuki Date: Wed Aug 9 22:16:14 2017 +0900 pinctrl: uniphier: add Audio out pin-mux settings The UniPhier LD11/20 SoC audio core use following 8 pins: AO1IEC, AO1ARC, AO1DACCK, AO1BCK, AO1LRCK, AO1D[0-2] Signed-off-by: Katsuhiro Suzuki Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 5 +++++ drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 5 +++++ 2 files changed, 10 insertions(+) commit a863e87c3299bfebdf1f73e5fc948af911557cb2 Author: David Daney Date: Thu Aug 17 17:53:36 2017 -0700 MAINTAINERS: Add entry for THUNDERX GPIO Driver. Signed-off-by: David Daney Signed-off-by: Linus Walleij MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit 5a2a30024d8c04cf638be05508e655b66f1c6103 Author: David Daney Date: Thu Aug 17 17:53:35 2017 -0700 gpio: Add gpio driver support for ThunderX and OCTEON-TX Cavium ThunderX and OCTEON-TX are arm64 based SoCs. Add driver for the on-chip GPIO pins. Signed-off-by: David Daney Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-thunderx.c | 639 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 649 insertions(+) commit 2e6424ab852a24cac6d918f3ee002e57febe02c3 Author: Gustavo A. R. Silva Date: Wed Aug 9 11:09:33 2017 -0500 pinctrl: amd: fix error return code in amd_gpio_probe() platform_get_irq() returns an error code, but the pinctrl-amd driver ignores it and always returns -EINVAL. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db95c876c568cef951fbbd4c0118cb5386e4bb99 Author: David Sterba Date: Fri Aug 18 18:16:25 2017 +0200 btrfs: submit superblock io with REQ_META and REQ_PRIO The superblock is also metadata of the filesystem so the relevant IO should be tagged as such. We also tag it as high priority, as it's the last block committed for metadata from a given transaction. Any delays would effectively block the whole transaction, also blocking any other operation holding the device_list_mutex. Reviewed-by: Josef Bacik Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 80b649039240ec41a6ab0a5e347853bc78abfd2d Author: Harsha Priya N Date: Mon Aug 21 12:26:52 2017 -0700 ASoC: Intel: Headset button support in kabylake machine driver This patch adds headset button support for kabylake machine driver (kbl_rt5663_rt5514_max98927). Signed-off-by: Hsin-yu Chao Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ba63f76e22ee723819c8cec86b31f7ea3182b2ed Merge: 9881223 3a555c7 Author: Ingo Molnar Date: Tue Aug 22 12:16:39 2017 +0200 Merge tag 'perf-core-for-mingo-4.14-20170821' 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 --show-nr-samples in annotate's --stdio and --tui, using the existing 't' toggle to circulate 'percent', 'total-period' and 'nr-samples' as the first column (Taeung Song) - Support FCMask and PortMask in JSON vendor events (Andi Kleen) - Fix off by one string allocation problem in 'perf trace' (Arnaldo Carvalho de Melo) - Use just one parse events state struct in yyparse(), fixing one reported segfault when a routine received a different data struct, smaller than the one it expected to use (Arnaldo Carvalho de Melo) - Remove unused cpu_relax() macros, they stopped being used when tools/perf lived in Documentation/ (Arnaldo Carvalho de Melo) - Fix double file test in libbpf's Makefile (Daniel Díaz): Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 60d345521143ed73b7acc4d99d3ad1afb2890520 Author: Alexandre Belloni Date: Tue Aug 22 11:59:07 2017 +0200 rtc: puv3: make alarms useful Currently, the driver unregisters the IRQs when the rtc character device is closed. This means that the device needs to stay open to get alarms while the usual use case will open the device, set the alarm and close the device. Move the IRQ requests to puv3_rtc_probe() and use the devm managed versions so we don't need to free them. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-puv3.c | 56 +++++++++++++------------------------------------- 1 file changed, 14 insertions(+), 42 deletions(-) commit 5539ba54b3ea3952b14bd8692122543d1e31b5ae Author: Alexandre Belloni Date: Tue Aug 22 11:48:41 2017 +0200 rtc: puv3: switch to devm_rtc_allocate_device()/rtc_register_device() Use managed RTC device allocation as this allows for further cleanup. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-puv3.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 27a451e83e78e1167f58cddba189fae4b4fa0d5b Author: Colin Ian King Date: Thu Aug 17 23:03:23 2017 +0100 drm/nouveau/kms/nv50: perform null check on msto[i] rathern than msto The null check on the array msto is incorrect since msto is never null. The null check should be instead on msto[i] since this is being dereferenced in the call to drm_mode_connector_attach_encoder. Thanks to Emil Velikov for pointing out the mistake in my original fix and for suggesting the correct fix. Detected by CoverityScan, CID#1375915 ("Array compared against 0") Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") Signed-off-by: Colin Ian King Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc60c90f472b6e762ea96ef384072145adc8d4af Author: Ilia Mirkin Date: Thu Aug 10 12:13:40 2017 -0400 drm/nouveau/pci/msi: disable MSI on big-endian platforms by default It appears that MSI does not work on either G5 PPC nor on a E5500-based platform, where other hardware is reported to work fine with MSI. Both tests were conducted with NV4x hardware, so perhaps other (or even this) hardware can be made to work. It's still possible to force-enable with config=NvMSI=1 on load. Signed-off-by: Ilia Mirkin Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2d38a5359f9070c3acfbc95e0539ff7688a1cd93 Author: Ben Skeggs Date: Mon Aug 14 08:40:55 2017 +1000 drm/nouveau: silence suspend/resume debugging messages These are particularly annoying on Optimus systems where these paths can be called regularly. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 856718054a1b6f38e085021bbd5b0e74817a8fa6 Author: Ilia Mirkin Date: Sat Aug 5 22:25:05 2017 -0400 drm/nouveau/kms/nv04-nv4x: fix exposed format list drm_crtc_init exposes the XRGB8888 and ARGB8888 formats. In actuality, ARGB8888's 32-bit depth messes up some formulas that weren't meant for it, and the alpha is fairly meaningless for the primary plane. The modesetting logic appears to be fully prepared for RGB565 as well as XRGB1555 however, as tested with modetest. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/crtc.c | 36 ++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit 7fa620d577502670741925198b1ee5c55d3a65cf Author: Ilia Mirkin Date: Sat Aug 5 22:25:04 2017 -0400 drm/nouveau/kms/nv10-nv40: add NV21 support to overlay Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/overlay.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9a6edc3ac968aca9ce51d16917705a857285286b Author: Ilia Mirkin Date: Sat Aug 5 22:25:03 2017 -0400 drm/nouveau/kms/nv04-nv40: improve overlay error detection, fix pitch setting We were previously setting the pitch based on a perfectly packed buffer. This does not necessarily happen. Either modetest started generating such buffers recently, or earlier testing only happened with well-picked overlay sizes. While we're at it, beef up and refactor the error state detection. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/overlay.c | 62 ++++++++++++++++-------------- 1 file changed, 34 insertions(+), 28 deletions(-) commit 3ce72bcf33c200e78b87699d20f8e5a564e29a98 Author: Ilia Mirkin Date: Sat Aug 5 22:25:02 2017 -0400 drm/nouveau/kms/nv04-nv40: prevent undisplayable framebuffers from creation Pre-nv50 YUV overlays have stringent requirements for working with the internal machinery. Instead of rejecting these at update_plane time, we should instead prevent the framebuffers from being created in the first place. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_display.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d257f9bf06129613de539ea71ecea60848b662cd Author: Ilia Mirkin Date: Sat Aug 5 22:19:53 2017 -0400 drm/nouveau/mpeg: print more debug info when rejecting dma objects Signed-off-by: Ilia Mirkin Reviewed-by: Tobias Klausmann Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 7 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 7a1af0f8bb0c8ba2a3a97f8a82f782549b3116df Author: Ben Skeggs Date: Mon Aug 7 13:27:31 2017 +1000 drm/nouveau/fb/gf100-: zero mmu debug buffers These are used for accesses to sparse mappings, and we want reads of such mappings to return 0. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 485c2c91d403185c126dd18bfc98599be9db3acf Author: Ben Skeggs Date: Fri Aug 4 10:44:34 2017 +1000 drm/nouveau/bar/gf100: add config option to limit BAR2 to 16MiB Useful for testing, and for the userspace build where we can't kick a framebuffer driver off the device. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 6 ++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 1 + 2 files changed, 7 insertions(+) commit 2659b4ce284be569b06ea2c13e5d30517f8095ed Author: Ilia Mirkin Date: Mon Jul 3 14:46:21 2017 -0400 initial support (display-only) for GP108 Forked from GP107 implementation. Secboot/gr left out as we don't have signed blobs from NVIDIA in linux-firmware. (Ben): Was unable to mmiotrace the binary driver for unknown reasons, so not able to 100% confirm that no other changes from GP107 are needed. Quick testing shows it seems to work well enough for display. Due to NVIDIA dragging their heels on getting signed firmware to us, this is the best we can do for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101601 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e20868b906417db9b44ccca5865efe7411e93fb6 Author: Ben Skeggs Date: Tue Aug 1 16:15:46 2017 +1000 drm/nouveau/falcon: use a more reasonable msgqueue timeout value Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df00d5da609f59022ee9aafdb4e2313aefeb6bda Author: Rosen Penev Date: Tue Jul 25 17:21:43 2017 -0700 drm/nouveau/disp: Silence DCB warnings. Most of these errors seem to be WFD related. Official documentation says dcb type 8 is reserved. It's probably used for WFD. Silence the warning in either case. Connector type 70 is stated to be a virtual connector for WiFi display. Since we know this, don't warn that we don't. Signed-off by: Rosen Penev Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 1 + drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 4 ++++ 4 files changed, 7 insertions(+) commit 81904932449cf832ab1982d302dc6c8f8b24b289 Author: Rosen Penev Date: Tue Jul 25 14:08:56 2017 -0700 drm/nouveau/bios: Demote missing fp table message to NV_DEBUG. This warning seems to pop up mainly in laptop cards. Silence it as it is expected behavior. Signed-off by: Rosen Penev Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bios.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 6b1277c837630749b55f743dd62023d9dd7a510a Author: Ben Skeggs Date: Fri Jul 21 10:45:32 2017 +1000 drm/nouveau/pmu/gt215-: abstract detection of whether reset is needed GT215, GF100-GP100, and GP10x are all different. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gf100.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 2 ++ 13 files changed, 32 insertions(+), 1 deletion(-) commit 715e7d261dea75911c4dad468a1103168933d913 Author: Ben Skeggs Date: Fri Jul 21 10:33:52 2017 +1000 drm/nouveau/pmu/gt215: fix reset The NV_PMC_ENABLE bit for PMU did not appear until GF100, and some other unknown register needs to be poked instead. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gf100.c | 12 +++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk110.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk208.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 3 ++- 10 files changed, 24 insertions(+), 13 deletions(-) commit 1ccd7d52b16e74366d9f401927c85fb285803fff Author: Ben Skeggs Date: Thu Jul 20 14:04:42 2017 +1000 drm/nouveau/mc/gf100: add pmu to reset mask An upcoming commit will replace direct NV_PMC register bashing from PMU with a call to the proper function. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 1 + 1 file changed, 1 insertion(+) commit eba5e56db65b7a44d57a98f5f382b2a2b9991321 Author: Ilia Mirkin Date: Mon Jul 3 13:06:26 2017 -0400 drm/nouveau/disp/gf119-: avoid creating non-existent heads We assume that each board has 4 heads for GF119+. However this is not necessarily true - in the case of a GP108 board, the register indicated that there were only 2. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101601 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 8 +++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) commit 9d60b9c9d0b6bacee794db9cd18671296b7db072 Author: Karol Herbst Date: Mon Jul 3 20:02:51 2017 +0200 drm/nouveau/therm/gm200: Added This allows temperature readouts on maxwell2 GPUs. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 3 ++ drivers/gpu/drm/nouveau/nvkm/subdev/therm/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/therm/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm200.c | 39 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h | 1 + 6 files changed, 46 insertions(+), 1 deletion(-) commit 4a84a6fd9a50e4a10dccaaff9cf9e12d04f2c83f Author: Colin Ian King Date: Tue Jun 27 09:08:58 2017 +0100 drm/nouveau/therm: fix spelling mistake on array thresolds Array thresolds should be named thresholds, rename it. Also make it static static const char * const Signed-off-by: Colin Ian King Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f16cab19a3d57638dd5d962ff6e87c154a6cab2 Author: Sebastian Reichel Date: Mon Aug 21 16:54:04 2017 +0200 hwmon: da9052: Add support for TSI channel TSI channel has a 4 channel mux connected to it and is normally used for touchscreen support. The hardware may alternatively use it as general purpose adc. Acked-by: Guenter Roeck Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones drivers/hwmon/da9052-hwmon.c | 249 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 245 insertions(+), 4 deletions(-) commit ebf555111bc11a5da9144e4af524260731a8b968 Author: Sebastian Reichel Date: Mon Aug 21 16:54:02 2017 +0200 mfd: da9052: Make touchscreen registration optional If the touchscreen pins are used as general purpose analogue input, the touchscreen driver should not be used. The pins will be handled by the existing hwmon driver instead. Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones drivers/mfd/da9052-core.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 7fe9899ef4e4e6d152a3a54e262cda38e1e1a1d3 Author: Sebastian Reichel Date: Mon Aug 21 16:54:03 2017 +0200 hwmon: da9052: Replace S_IRUGO with 0444 Fix checkpatch warnings about S_IRUGO being less readable than providing the permissions octal as '0444'. Acked-by: Guenter Roeck Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones drivers/hwmon/da9052-hwmon.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 67dfabe3a01be6b0cc4c0056aa546f0279ed6279 Author: Sebastian Reichel Date: Mon Aug 21 16:54:01 2017 +0200 mfd: da9052: Add register details for TSI Add register details an channels definition for using the TSI registers in the hwmon driver. Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones include/linux/mfd/da9052/da9052.h | 6 ++++++ include/linux/mfd/da9052/reg.h | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 2d45a7e89833f88b38112292ff227af437f81f2f Author: Stephan Mueller Date: Thu Aug 10 16:40:03 2017 +0200 crypto: af_alg - get_page upon reassignment to TX SGL When a page is assigned to a TX SGL, call get_page to increment the reference counter. It is possible that one page is referenced in multiple SGLs: - in the global TX SGL in case a previous af_alg_pull_tsgl only reassigned parts of a page to a per-request TX SGL - in the per-request TX SGL as assigned by af_alg_pull_tsgl Note, multiple requests can be active at the same time whose TX SGLs all point to different parts of the same page. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/af_alg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 32e67b9af077e905388f1746bf429ea0c39b6917 Author: Christophe Jaillet Date: Wed Aug 16 07:16:06 2017 +0200 crypto: cavium/nitrox - Fix an error handling path in 'nitrox_probe()' 'err' is known to be 0 at this point. If 'kzalloc()' fails, returns -ENOMEM instead of 0 which means success. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b7d65fe18129e2f557c31126fe6623e8c2731528 Author: Christophe Jaillet Date: Tue Aug 15 21:33:24 2017 +0200 crypto: inside-secure - fix an error handling path in safexcel_probe() 'ret' is known to be 0 at this point. If 'safexcel_request_ring_irq()' fails, it returns an error code. Return this value instead of 0 which means success. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5a7801f6634b1e2888bcb1a85bedc50e46dcd757 Author: Zain Wang Date: Tue Aug 15 15:48:15 2017 +0800 crypto: rockchip - Don't dequeue the request when device is busy The device can only process one request at a time. So if multiple requests came at the same time, we can enqueue them first, and dequeue them one by one when the device is idle. Signed-off-by: zain wang Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 46 ++++++- drivers/crypto/rockchip/rk3288_crypto.h | 11 +- drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c | 118 ++++++++---------- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 133 ++++++++++----------- 4 files changed, 160 insertions(+), 148 deletions(-) commit baf5b752dae2b7c84b3fa5ffb0eb41648d659c09 Author: Corentin LABBE Date: Mon Aug 14 13:58:54 2017 +0200 crypto: cavium - add release_firmware to all return case Two return case misses to call release_firmware() and so leak some memory. This patch create a fw_release label (and so a common error path) and use it on all return case. Detected by CoverityScan, CID#1416422 ("Resource Leak") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptpf_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 249cb0632570302e2c61f900806b92f3fe66783b Author: Arvind Yadav Date: Sun Aug 13 14:34:00 2017 +0530 crypto: sahara - constify platform_device_id platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/sahara.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f93ed02818512f6d1b73d9a19e25526847019083 Author: Lars Persson Date: Thu Aug 10 14:53:54 2017 +0200 MAINTAINERS: Add ARTPEC crypto maintainer Assign the Axis kernel team as maintainer for crypto drivers under drivers/crypto/axis. Signed-off-by: Lars Persson Signed-off-by: Herbert Xu MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a21eb94fc4d3c6472de53bd30a543ec06eaf8914 Author: Lars Persson Date: Thu Aug 10 14:53:53 2017 +0200 crypto: axis - add ARTPEC-6/7 crypto accelerator driver This is an asynchronous crypto API driver for the accelerator present in the ARTPEC-6 and -7 SoCs from Axis Communications AB. The driver supports AES in ECB/CTR/CBC/XTS/GCM modes and SHA1/2 hash standards. Signed-off-by: Lars Persson Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 21 + drivers/crypto/Makefile | 1 + drivers/crypto/axis/Makefile | 1 + drivers/crypto/axis/artpec6_crypto.c | 3192 ++++++++++++++++++++++++++++++++++ 4 files changed, 3215 insertions(+) commit 6f7473c524cc4f875dcd9397ec9a6ec039bd08b6 Author: Rabin Vincent Date: Thu Aug 10 14:53:52 2017 +0200 crypto: hash - add crypto_(un)register_ahashes() There are already helpers to (un)register multiple normal and AEAD algos. Add one for ahashes too. Signed-off-by: Lars Persson Signed-off-by: Rabin Vincent Signed-off-by: Herbert Xu crypto/ahash.c | 29 +++++++++++++++++++++++++++++ include/crypto/internal/hash.h | 2 ++ 2 files changed, 31 insertions(+) commit ac6b6f4531bb0d113ad8ba8c08247df793271a96 Author: Lars Persson Date: Thu Aug 10 14:53:51 2017 +0200 dt-bindings: crypto: add ARTPEC crypto Document the device tree bindings for the ARTPEC crypto accelerator on ARTPEC-6 and ARTPEC-7 SoCs. Acked-by: Rob Herring Signed-off-by: Lars Persson Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/artpec6-crypto.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 75d11e75357c1c643f65b478214008a5bf0230cb Author: Stephan Mueller Date: Wed Aug 9 16:20:00 2017 +0200 crypto: algif_aead - fix comment regarding memory layout Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e90c48efde40f8428777424e6edbbb240b441652 Merge: ef4064b 445a582 Author: Herbert Xu Date: Tue Aug 22 14:53:32 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge the crypto tree to resolve the conflict between the temporary and long-term fixes in algif_skcipher. commit 6b9dfb5991a3fda1ced9062f6c86d8798416ea31 Merge: 735f463 790cb4c Author: Dave Airlie Date: Tue Aug 22 16:51:11 2017 +1000 Merge tag 'imx-drm-next-2017-07-18' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm: lock scanout transfers for consecutive bursts - Lock the IDMAC scanout channel for multiple back-to-back bursts if possible, to improve memory bandwidth utilisation. - Replace a few occurences of state->fb with the already existing local fb variable in ipu_plane_atomic_update * tag 'imx-drm-next-2017-07-18' of git://git.pengutronix.de/git/pza/linux: drm/imx: lock scanout transfers for consecutive bursts drm/imx: ipuv3-plane: use fb local variable instead of state->fb commit fabf08a0cd63ce39287646ceea10ac34781418f4 Author: Peter Rosin Date: Tue Aug 1 15:16:21 2017 +0200 i2c: mux: i2c-arb-gpio-challenge: allow compiling w/o OF support It simplifies some tests. Signed-off-by: Peter Rosin drivers/i2c/muxes/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 234fa0ad4e9d49282391b7f9afa65d2482a2c5d0 Author: Peter Rosin Date: Wed Aug 2 11:48:46 2017 +0200 i2c: Documentation: i2c-topology: mention recent driver additions Specifically mention what drivers are mux-locked and parent-locked. Signed-off-by: Peter Rosin Documentation/i2c/i2c-topology | 6 ++++++ 1 file changed, 6 insertions(+) commit d9c51f4c53ae2af03aa8bd001d46f21b0adcdab8 Author: Dan Carpenter Date: Mon Jun 19 13:56:05 2017 +0300 phy: brcm-sata: fix a timeout test in init We want to timeout with try set to zero so this should be a pre-op instead of post-op. Signed-off-by: Dan Carpenter Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aea430ee0c4228b00e4ad303ff63dec93285b3e8 Author: Dan Carpenter Date: Wed Jun 28 15:19:37 2017 +0300 phy: cpcap-usb: remove a stray tab This line was indented further that it should have been. Signed-off-by: Dan Carpenter 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 df674efa32b522fc024d26b0a667a7985e8b87da Author: Dan Carpenter Date: Fri Jun 30 11:01:47 2017 +0300 phy: phy-twl4030-usb: silence an uninitialized variable warning The "check" variable isn't necessarily initialized when we print it out in the debugging messages. It's a pretty haphazard affair and it doesn't matter very much what we initialize "check" to. Signed-off-by: Dan Carpenter Signed-off-by: Kishon Vijay Abraham I drivers/phy/ti/phy-twl4030-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e39c6cf575f0539a3cac86aa066624d17d86816 Author: Shawn Lin Date: Thu Aug 3 09:26:19 2017 +0800 phy: rockchip-typec: remove unused dfp variable In order to silent the 'W=1' compile warning: drivers/phy/rockchip/phy-rockchip-typec.c: In function 'tcphy_get_mode': drivers/phy/rockchip/phy-rockchip-typec.c:625:7: warning: variable 'dfp' set but not used [-Wunused-but-set-variable] Cc: Chris Zhong Signed-off-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fc938810d950f4846eb05b9af5614677e05c5a65 Author: Frank Wang Date: Fri Aug 11 16:08:48 2017 +0800 phy: rockchip-inno-usb2: add support of usb2-phy for rv1108 SoCs This adds support usb2-phy for rv1108 SoCs and amend phy Documentation. Signed-off-by: Frank Wang Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../bindings/phy/phy-rockchip-inno-usb2.txt | 1 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit 9c1712d5ce1b9009fdac453d785cf7bcddceadac Author: Frank Wang Date: Fri Aug 11 16:07:50 2017 +0800 dt-bindings: phy-rockchip-inno-usb2: add otg-mux interrupt Add otg-mux property to support multiplexed interrupt in otg-port on some Rockchip SoC (e.g RV1108). Signed-off-by: Frank Wang Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0983e2abc8334a0fec1e93a47e712708acaf5ad2 Author: Frank Wang Date: Fri Aug 11 16:07:49 2017 +0800 phy: rockchip-inno-usb2: add support for otg-mux interrupt The otg-id/otg-bvalid/linestate interrupts are multiplexed together in otg-port on some Rockchip SoC (e.g RV1108), this patch add support for it. Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 63 +++++++++++++++++++++------ 1 file changed, 50 insertions(+), 13 deletions(-) commit c7527e07f0550fa98a2a8190c30a1e5a6cab8f93 Author: Frank Wang Date: Fri Aug 11 16:07:48 2017 +0800 dt-bindings: phy-rockchip-inno-usb2: add rockchip,usbgrf property Add rockchip,usbgrf property to support the registers of usb-phy that are distributed in grf and usbgrf on some special Rockchip SoCs (e.g RV1108). Signed-off-by: Frank Wang Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 1543645c3119da117d4cc6fb664c74157e66f237 Author: Frank Wang Date: Fri Aug 11 16:07:47 2017 +0800 phy: rockchip-inno-usb2: add support for rockchip,usbgrf property The registers of usb-phy are distributed in grf and usbgrf on some Rockchip SoCs (e.g RV1108), this patch add a new rockchip,usbgrf property to support this companion grf design. Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 109 +++++++++++++++++--------- 1 file changed, 71 insertions(+), 38 deletions(-) commit 4b63743cdb47281466cd591ce7a2ae2512b23078 Author: Chen-Yu Tsai Date: Thu Aug 3 16:14:07 2017 +0800 phy: sun4i-usb: Support A83T USB PHYs The A83T has 3 USB PHYs, 1 for OTG, 1 for standard USB, 1 for USB HSIC. The phy initialization procedure is very different from other SoCs, but the PMU bits are the same, with additional bits for HSIC. Signed-off-by: Chen-Yu Tsai Tested-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I drivers/phy/allwinner/phy-sun4i-usb.c | 66 ++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 12 deletions(-) commit f0152c58c68f94f86bee8d91c4e4835e0c43ada7 Author: Chen-Yu Tsai Date: Thu Aug 3 16:14:06 2017 +0800 phy: sun4i-usb: Support secondary clock for HSIC PHY On the Allwinner A83T SoC, the last USB PHY is an HSIC PHY. It requires two clocks instead of one. On all Allwinner SoCs that share the common USB PHY design supported by the phy-sun4i-usb driver, the first PHY is always tied to OTG, and there is at most one HSIC PHY, typically the last. In this patch we take advantage of these known constraints and store an index in the compatible-string-related config structure describing which PHY is HSIC, needing the extra hsic_12M clock. Signed-off-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I drivers/phy/allwinner/phy-sun4i-usb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1af556464495006472aa0c023bee088d053112d5 Author: Chen-Yu Tsai Date: Thu Aug 3 16:14:05 2017 +0800 dt-bindings: phy: sun4i-usb-phy: Add compatible string for A83T The A83T has 3 USB PHYs, 1 for OTG, 1 for standard USB, 1 for USB HSIC. Add a compatible string for it, and describe the needed properties. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Tested-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7a1de063028aeb766e19bdc4f37233fc1a586911 Author: Chen-Yu Tsai Date: Thu Aug 3 16:14:04 2017 +0800 dt-bindings: phy: sun4i-usb-phy: Add property descriptions for H3 The Allwinner H3 SoC has 4 USB PHYs, so it needs four sets of pmu regions, clocks, resets, and optional vbus properties. These were not described when the H3 compatible string was added. Fixes: 626a630e003c ("phy-sun4i-usb: Add support for the host usb-phys found on the H3 SoC") Signed-off-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c678fa66341c7b82a57cfed0ba3656162e970f99 Author: Dave Jiang Date: Mon Aug 21 10:23:13 2017 -0700 dmaengine: remove DMA_SG as it is dead code in kernel There are no in kernel consumers for DMA_SG op. Removing operation, dead code, and test code in dmatest. Signed-off-by: Dave Jiang Reviewed-by: Linus Walleij Cc: Gary Hook Cc: Ludovic Desroches Cc: Kedareswara rao Appana Cc: Li Yang Cc: Michal Simek Signed-off-by: Vinod Koul Documentation/dmaengine/provider.txt | 7 -- drivers/crypto/ccp/ccp-dmaengine.c | 23 ----- drivers/dma/at_hdmac.c | 140 +----------------------------- drivers/dma/dmaengine.c | 2 - drivers/dma/dmatest.c | 36 +------- drivers/dma/fsldma.c | 118 ------------------------- drivers/dma/mv_xor.c | 162 +---------------------------------- drivers/dma/nbpfaxi.c | 17 ---- drivers/dma/ste_dma40.c | 18 ---- drivers/dma/xgene-dma.c | 155 +-------------------------------- drivers/dma/xilinx/zynqmp_dma.c | 94 -------------------- include/linux/dmaengine.h | 19 ---- 12 files changed, 5 insertions(+), 786 deletions(-) commit 64a1644bc3baa62b769455d811b7999b9a1c6cd1 Author: Elaine Zhang Date: Mon Aug 21 16:16:07 2017 +0800 clk: rockchip: fix the rv1108 clk_mac sel register description The source clock ordering is wrong, as shown in the TRM: cru_sel24_con[8] rmii_extclk_sel clock source select control register 1'b0: from internal PLL 1'b1: from external IO Signed-off-by: Elaine Zhang Reviewed-by: David Wu Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rv1108.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7d0045b08a36c2fb7874efc48d747613c6a1ccf Author: Elaine Zhang Date: Mon Aug 21 16:16:06 2017 +0800 clk: rockchip: rename rv1108 macphy clock to mac This MAC has no internal phy for rv1108 and the whole clock infrastructure hasn't been used yet, so is safe to fix. Signed-off-by: Elaine Zhang Reviewed-by: David Wu Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rv1108.c | 12 ++++++------ include/dt-bindings/clock/rv1108-cru.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 100542725f605d4399536eb162c036977996b5cc Author: Elaine Zhang Date: Mon Aug 21 16:16:05 2017 +0800 clk: rockchip: add rv1108 ACLK_GMAC and PCLK_GMAC clocks Add gmac aclk and pclk clock gates. Signed-off-by: Elaine Zhang Reviewed-by: David Wu Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rv1108.c | 2 ++ 1 file changed, 2 insertions(+) commit fe53230cf22644e187d688f65e295ad61d9169cf Author: Elaine Zhang Date: Fri Aug 18 11:49:25 2017 +0800 clk: rockchip: add rk3228 SCLK_SDIO_SRC clk id In some special circumstances, may be need to reparent clk for sclk_sdio_src. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3228.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2a7c34fb2856fd5306e307e170e3dde358d0dce Merge: 7d3f0cd 6470812 Author: David S. Miller Date: Mon Aug 21 17:06:42 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 735f463af70e9601881ec879961ec42aef051733 Merge: 3aadb88 a42894e Author: Dave Airlie Date: Tue Aug 22 10:03:07 2017 +1000 Merge tag 'drm-intel-next-2017-08-18' of git://anongit.freedesktop.org/git/drm-intel into drm-next Final pile of features for 4.14 - New ioctl to change NOA configurations, plus prep (Lionel) - CCS (color compression) scanout support, based on the fancy new modifier additions (Ville&Ben) - Document i915 register macro style (Jani) - Many more gen10/cnl patches (Rodrigo, Pualo, ...) - More gpu reset vs. modeset duct-tape to restore the old way. - prep work for cnl: hpd_pin reorg (Rodrigo), support for more power wells (Imre), i2c pin reorg (Anusha) - drm_syncobj support (Jason Ekstrand) - forcewake vs gpu reset fix (Chris) - execbuf speedup for the no-relocs fastpath, anv/vk low-overhead ftw (Chris) - switch to idr/radixtree instead of the resizing ht for execbuf id->vma lookups (Chris) gvt: - MMIO save/restore optimization (Changbin) - Split workload scan vs. dispatch for more parallel exec (Ping) - vGPU full 48bit ppgtt support (Joonas, Tina) - vGPU hw id expose for perf (Zhenyu) Bunch of work all over to make the igt CI runs more complete/stable. Watch https://intel-gfx-ci.01.org/tree/drm-tip/shards-all.html for progress in getting this ready. Next week we're going into production mode (i.e. will send results to intel-gfx) on hsw, more platforms to come. Also, a new maintainer tram, I'm stepping out. Huge thanks to Jani for being an awesome co-maintainer the past few years, and all the best for Jani, Joonas&Rodrigo as the new maintainers! * tag 'drm-intel-next-2017-08-18' of git://anongit.freedesktop.org/git/drm-intel: (179 commits) drm/i915: Update DRIVER_DATE to 20170818 drm/i915/bxt: use NULL for GPIO connection ID drm/i915: Mark the GT as busy before idling the previous request drm/i915: Trivial grammar fix s/opt of/opt out of/ in comment drm/i915: Replace execbuf vma ht with an idr drm/i915: Simplify eb_lookup_vmas() drm/i915: Convert execbuf to use struct-of-array packing for critical fields drm/i915: Check context status before looking up our obj/vma drm/i915: Don't use MI_STORE_DWORD_IMM on Sandybridge/vcs drm/i915: Stop touching forcewake following a gen6+ engine reset MAINTAINERS: drm/i915 has a new maintainer team drm/i915: Split pin mapping into per platform functions drm/i915/opregion: let user specify override VBT via firmware load drm/i915/cnl: Reuse skl_wm_get_hw_state on Cannonlake. drm/i915/gen10: implement gen 10 watermarks calculations drm/i915/cnl: Fix LSPCON support. drm/i915/vbt: ignore extraneous child devices for a port drm/i915/cnl: Setup PAT Index. drm/i915/edp: Allow alternate fixed mode for eDP if available. drm/i915: Add support for drm syncobjs ... commit 969d1b180d987c2be02de890d0fff0f66a0e80de Author: Chao Yu Date: Mon Aug 7 23:09:56 2017 +0800 f2fs: introduce discard_granularity sysfs entry Commit d618ebaf0aa8 ("f2fs: enable small discard by default") enables f2fs to issue 4K size discard in real-time discard mode. However, issuing smaller discard may cost more lifetime but releasing less free space in flash device. Since f2fs has ability of separating hot/cold data and garbage collection, we can expect that small-sized invalid region would expand soon with OPU, deletion or garbage collection on valid datas, so it's better to delay or skip issuing smaller size discards, it could help to reduce overmuch consumption of IO bandwidth and lifetime of flash storage. This patch makes f2fs selectng 64K size as its default minimal granularity, and issue discard with the size which is not smaller than minimal granularity. Also it exposes discard granularity as sysfs entry for configuration in different scenario. Jaegeuk Kim: We must issue all the accumulated discard commands when fstrim is called. So, I've added pend_list_tag[] to indicate whether we should issue the commands or not. If tag sets P_ACTIVE or P_TRIM, we have to issue them. P_TRIM is set once at a time, given fstrim trigger. In addition, issue_discard_thread is calling too much due to the number of discard commands remaining in the pending list. I added a timer to control it likewise gc_thread. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 9 ++++ fs/f2fs/f2fs.h | 12 +++++ fs/f2fs/segment.c | 91 ++++++++++++++++++++++++++++----- fs/f2fs/sysfs.c | 23 +++++++++ 4 files changed, 121 insertions(+), 14 deletions(-) commit f24b150a63b208f4437efc7dc7a42954363641ca Author: Yunlong Song Date: Mon Aug 14 16:52:43 2017 +0800 f2fs: remove unused function overprovision_sections Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 5 ----- 1 file changed, 5 deletions(-) commit 125c9fb1ccb53eb2ea9380df40f3c743f3fb2fed Author: Jaegeuk Kim Date: Sat Aug 12 21:33:23 2017 -0700 f2fs: check hot_data for roll-forward recovery We need to check HOT_DATA to truncate any previous data block when doing roll-forward recovery. Cc: Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c56f16dab0dfc8a37bc6133f2c2a02ffb873648b Author: Chao Yu Date: Fri Aug 11 18:00:15 2017 +0800 f2fs: add tracepoint for f2fs_gc This patch adds tracepoint for f2fs_gc. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 50 +++++++++++++++------ include/trace/events/f2fs.h | 107 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 14 deletions(-) commit 7f2b4e8ea5b49846f7d20f1694dbca81f88b8d50 Author: Chao Yu Date: Tue Aug 8 19:09:08 2017 +0800 f2fs: retry to revoke atomic commit in -ENOMEM case During atomic committing, if we encounter -ENOMEM in revoke path, it's better to give a chance to retry revoking. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit afd2b4da40b3b567ef8d8e6881479345a2312a03 Author: Jaegeuk Kim Date: Thu Aug 10 17:35:04 2017 -0700 f2fs: let fill_super handle roll-forward errors If we set CP_ERROR_FLAG in roll-forward error, f2fs is no longer to proceed any IOs due to f2fs_cp_error(). But, for example, if some stale data is involved on roll-forward process, we're able to get -ENOENT, getting fs stuck. If we get any error, let fill_super set SBI_NEED_FSCK and try to recover back to stable point. Cc: Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 2 -- 1 file changed, 2 deletions(-) commit f2220c7f155c99392b307be3012aae976a503afe Author: Qiuyang Sun Date: Wed Aug 9 17:27:30 2017 +0800 f2fs: merge equivalent flags F2FS_GET_BLOCK_[READ|DIO] Currently, the two flags F2FS_GET_BLOCK_[READ|DIO] are totally equivalent and can be used interchangably in all scenarios they are involved in. Neither of the flags is referenced in f2fs_map_blocks(), making them both the default case. To remove the ambiguity, this patch merges both flags into F2FS_GET_BLOCK_DEFAULT, and introduces an enum for all distinct flags. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- fs/f2fs/f2fs.h | 13 +++++++------ fs/f2fs/file.c | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) commit 4b2414d04e99120ce852ba15a1926c9c3a77d9ce Author: Chao Yu Date: Tue Aug 8 10:54:31 2017 +0800 f2fs: support journalled quota This patch supports to enable f2fs to accept quota information through mount option: - {usr,grp,prj}jquota= - jqfmt= Then, in ->mount flow, we can recover quota file during log replaying, by this, journelled quota can be supported. Signed-off-by: Chao Yu [Jaegeuk Kim: Fix wrong return values.] Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 9 + fs/f2fs/checkpoint.c | 26 ++- fs/f2fs/f2fs.h | 9 + fs/f2fs/recovery.c | 72 +++++++- fs/f2fs/super.c | 326 ++++++++++++++++++++++++++++++++++--- 5 files changed, 412 insertions(+), 30 deletions(-) commit 358efd52ceffdf7389e21a7d4deb945e204f8e75 Merge: 5d890c2 1858698 Author: Heiko Stuebner Date: Tue Aug 22 00:39:00 2017 +0200 Merge branch 'v4.14-shared/clkids' into v4.14-clk/next commit 1858698e0ac63f4fd3a633064893b5fd6ef8aa8d Author: Elaine Zhang Date: Mon Aug 21 16:16:04 2017 +0800 clk: rockchip: add rv1108 ACLK_GAMC and PCLK_GMAC ID This patch exports gmac aclk and pclk for dts reference. Signed-off-by: Elaine Zhang Reviewed-by: David Wu Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rv1108-cru.h | 2 ++ 1 file changed, 2 insertions(+) commit 9762e7ff163213e18ed8e7cc723d74b54bf9cb98 Author: Elaine Zhang Date: Fri Aug 18 11:49:24 2017 +0800 clk: rockchip: add rk3228 sclk_sdio_src ID This patch exports sdio src clock for dts reference. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3228-cru.h | 1 + 1 file changed, 1 insertion(+) commit 4e1b222d8088804a5db0e34d71a2b17e6c141dee Author: Simon Xue Date: Mon Jul 24 10:32:08 2017 +0800 ARM: dts: rockchip: add rk322x iommu nodes Add VPU/VDEC/VOP/IEP iommu nodes Signed-off-by: Simon Xue Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ae4fdccace56b93cec7b13d80132d623d5cb1b23 Author: Simon Xue Date: Mon Jul 24 10:32:10 2017 +0800 arm64: dts: rockchip: add more rk3399 iommu nodes Add VPU/VDEC/IEP/ISP0/ISP1 iommu nodes Signed-off-by: Simon Xue Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit cede4c79de286ae3a2932ed2c3bf43a8b55793e0 Author: Simon Xue Date: Mon Jul 24 10:32:09 2017 +0800 arm64: dts: rockchip: add rk3368 iommu nodes Add IEP/ISP/VOP/HEVC/VPU iommu nodes Signed-off-by: Simon Xue Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 49c82f2b7c5d64e51cc967c3a7e315b34c0f5894 Author: Simon Xue Date: Mon Jul 24 10:32:07 2017 +0800 arm64: dts: rockchip: add rk3328 iommu nodes Add H265e/VEPU/VPU/VDEC/VOP iommu nodes Signed-off-by: Simon Xue Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit bf9790bcdca582a7a3a0c10550a52ba2a9efc5c9 Merge: 728c4a8 f13db33 Author: Mark Brown Date: Mon Aug 21 21:50:23 2017 +0100 Merge branch 'topic/const' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-blackfin commit f13db334bf7b68b0086d04ab6a51517ba41123b4 Merge: eb59d73 b47b91c Author: Mark Brown Date: Mon Aug 21 21:48:37 2017 +0100 Merge branch 'topic/msm8916' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-const commit 7d3f0cd43feea1636dd7746f22fe8249b34d1b79 Author: Gao Feng Date: Fri Aug 18 15:23:24 2017 +0800 net: sched: Add the invalid handle check in qdisc_class_find Add the invalid handle "0" check to avoid unnecessary search, because the qdisc uses the skb->priority as the handle value to look up, and it is "0" usually. Signed-off-by: Gao Feng Signed-off-by: David S. Miller include/net/sch_generic.h | 3 +++ 1 file changed, 3 insertions(+) commit 40501f90ed5d992176ba504910d512d9dd1b2668 Author: Jon Paul Maloy Date: Mon Aug 21 17:59:30 2017 +0200 tipc: don't reset stale broadcast send link When the broadcast send link after 100 attempts has failed to transfer a packet to all peers, we consider it stale, and reset it. Thereafter it needs to re-synchronize with the peers, something currently done by just resetting and re-establishing all links to all peers. This has turned out to be overkill, with potentially unwanted consequences for the remaining cluster. A closer analysis reveals that this can be done much simpler. When this kind of failure happens, for reasons that may lie outside the TIPC protocol, it is typically only one peer which is failing to receive and acknowledge packets. It is hence sufficient to identify and reset the links only to that peer to resolve the situation, without having to reset the broadcast link at all. This solution entails a much lower risk of negative consequences for the own node as well as for the overall cluster. We implement this change in this commit. Reviewed-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 24 ------------------------ net/tipc/bearer.h | 1 - net/tipc/link.c | 23 +++++++++++++---------- net/tipc/node.c | 14 ++++---------- 4 files changed, 17 insertions(+), 45 deletions(-) commit f657b00df22e231da217ca0162a75db452475e8f Author: Sebastian Reichel Date: Tue Jul 25 14:11:34 2017 -0700 Input: atmel_mxt_ts - add support for reset line Provide support for controlling reset pin. If this is not driven correctly the device will be held in reset and will not respond. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/atmel,maxtouch.txt | 2 ++ drivers/input/touchscreen/atmel_mxt_ts.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 8cc8446b9b62ef954b630ed30e53bd1553e916a6 Author: Sebastian Reichel Date: Tue Jul 25 14:08:48 2017 -0700 Input: atmel_mxt_ts - use more managed resources Switch mxt_data and interrupt to resource managed allocation methods, which cleans up the driver slightly and prepares for adding reset GPIO support. Signed-off-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit b47b91c8504c62f95ddff2876620d68697927bd4 Author: Srinivas Kandagatla Date: Thu Aug 17 10:02:11 2017 +0200 ASoC: qcom: apq8016-sbc: Add support to Headset JACK This patch adds support to Headset JACK, also provides board specific vref ranges for mbhc buttons to be detected. This headset supports both 3 pole and 4 pole headset type and 5 buttons. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit de66b3455023e6f78fdf55a387c604c6b0114869 Author: Srinivas Kandagatla Date: Thu Aug 17 10:02:10 2017 +0200 ASoC: codecs: msm8916-wcd-analog: add MBHC support MBHC (MultiButton Headset Control) support is available in pm8921 in two blocks, one to detect mechanical headset insertion and removal and other block to support headset type detection and 5 button detection and othe features like impedance calculation. This patch adds support to: 1> Support to NC and NO type of headset Jacks. 2> Mechanical insertion and detection of headset jack. 3> Detect a 3 pole Headphone and a 4 pole Headset. 4> Detect 5 buttons. Tested it on DB410c with Audio Mezz board with 4 pole and 3 pole headset/headphones. Signed-off-by: Srinivas Kandagatla Tested-by: Damien Riegel Signed-off-by: Mark Brown .../bindings/sound/qcom,msm8916-wcd-analog.txt | 17 +- sound/soc/codecs/msm8916-wcd-analog.c | 373 ++++++++++++++++++++- 2 files changed, 388 insertions(+), 2 deletions(-) commit e269998d588f8ad96eaf86916e23b8ee3d2b9f1b Author: Srinivas Kandagatla Date: Thu Aug 17 10:02:09 2017 +0200 ASoC: codecs: msm8916-wcd-analog: get micbias voltage from dt This patch adds bindings in DT to provide required micbias voltage which could be specific to board. With this new binding, now the mic bias voltage is left at hardware default value if the device tree does not specify any mic bias voltage value. Correct micbias value is required for mbhc buttons to work. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown .../bindings/sound/qcom,msm8916-wcd-analog.txt | 1 + sound/soc/codecs/msm8916-wcd-analog.c | 27 +++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) commit 6329b1bb4e691b24e51ea940b3c2cffd402bd5f8 Merge: 7029923 14ccee7 Author: Mark Brown Date: Mon Aug 21 19:32:58 2017 +0100 Merge tag 'v4.13-rc6' into asoc-msm8916 Linux 4.13-rc6 commit 702992387b759828f58e52f660acb284b3069944 Merge: 8dbed90 a46f1cf 3bb2991 Author: Mark Brown Date: Mon Aug 21 19:31:51 2017 +0100 Merge branches 'topic/dmic' and 'topic/qcom' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-msm8916 commit e65a4955b0bb70ab66e2fbfd5509747fe51d8bf9 Author: David Lamparter Date: Fri Aug 18 14:31:35 2017 +0200 net: check type when freeing metadata dst Commit 3fcece12bc1b ("net: store port/representator id in metadata_dst") added a new type field to metadata_dst, but metadata_dst_free() wasn't updated to check it before freeing the METADATA_IP_TUNNEL specific dst cache entry. This is not currently causing problems since it's far enough back in the struct to be zeroed for the only other type currently in existance (METADATA_HW_PORT_MUX), but nevertheless it's not correct. Fixes: 3fcece12bc1b ("net: store port/representator id in metadata_dst") Signed-off-by: David Lamparter Cc: Jakub Kicinski Cc: Sridhar Samudrala Cc: Simon Horman Cc: David S. Miller Signed-off-by: David S. Miller net/core/dst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 225bd1de16fb2e330be5bad261d427d00293c55e Author: Sylwester Nawrocki Date: Wed Aug 16 22:31:01 2017 +0200 ARM: s3c24xx: Fix NAND ECC mode for mini2440 board After commit e9f66ae23c20 ("mtd: s3c2410: make ecc mode configurable via platform data") booting of the mini2440 board is broken, since for this board we have CONFIG_MTD_NAND_S3C2410_HWECC set. The console gets flooded with errors reported by the mtd subsystem. This patch changes ecc_mode to NAND_ECC_HW which restores proper operation of the NAND flash memory. Cc: Sergio Prado Fixes: e9f66ae23c20 ("mtd: s3c2410: make ecc mode configurable via platform data") Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/mach-mini2440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4832c30d5458387ff2533ff66fbde26ad8bb5a2d Author: David Ahern Date: Thu Aug 17 12:17:20 2017 -0700 net: ipv6: put host and anycast routes on device with address One nagging difference between ipv4 and ipv6 is host routes for ipv6 addresses are installed using the loopback device or VRF / L3 Master device. e.g., 2001:db8:1::/120 dev veth0 proto kernel metric 256 pref medium local 2001:db8:1::1 dev lo table local proto kernel metric 0 pref medium Using the loopback device is convenient -- necessary for local tx, but has some nasty side effects, most notably setting the 'lo' device down causes all host routes for all local IPv6 address to be removed from the FIB and completely breaks IPv6 networking across all interfaces. This patch puts FIB entries for IPv6 routes against the device. This simplifies the routes in the FIB, for example by making dst->dev and rt6i_idev->dev the same (a future patch can look at removing the device reference taken for rt6i_idev for FIB entries). When copies are made on FIB lookups, the cloned route has dst->dev set to loopback (or the L3 master device). This is needed for the local Tx of packets to local addresses. With fib entries allocated against the real network device, the addrconf code that reinserts host routes on admin up of 'lo' is no longer needed. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 42 ------------------------------------------ net/ipv6/icmp.c | 15 +++++++++++++-- net/ipv6/route.c | 46 ++++++++++++++++++++++++++++++++++------------ 3 files changed, 47 insertions(+), 56 deletions(-) commit 89e49506bc62520f93e64a278293444319a6aebb Author: Florian Westphal Date: Thu Aug 17 16:47:00 2017 +0200 dsa: remove unused net_device arg from handlers compile tested only, but saw no warnings/errors with allmodconfig build. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/dsa.h | 6 ++---- net/dsa/dsa.c | 4 ++-- net/dsa/tag_brcm.c | 3 +-- net/dsa/tag_dsa.c | 3 +-- net/dsa/tag_edsa.c | 3 +-- net/dsa/tag_ksz.c | 3 +-- net/dsa/tag_lan9303.c | 2 +- net/dsa/tag_mtk.c | 3 +-- net/dsa/tag_qca.c | 3 +-- net/dsa/tag_trailer.c | 3 +-- 10 files changed, 12 insertions(+), 21 deletions(-) commit d1ef551ac9e0d954c0ed7eea7d953ee1a45d813d Merge: da6817e 6035b3f Author: David S. Miller Date: Mon Aug 21 10:31:34 2017 -0700 Merge branch 'bpf-mips-jit-improvements' David Daney says: ==================== MIPS,bpf: Improvements for MIPS eBPF JIT Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small cleanup/optimization in the use of BPF_OP(insn->code). I suggest that the whole thing go via the BPF/net-next path as there are dependencies on code that is not yet merged to Linus' tree. Still pending are changes to reduce stack usage when the verifier can determine the maximum stack size. ==================== Signed-off-by: David S. Miller commit 6035b3faf3e58ee6eb423a45a1b7b7c3b4c8dc9f Author: David Daney Date: Fri Aug 18 16:40:33 2017 -0700 MIPS,bpf: Cache value of BPF_OP(insn->code) in eBPF JIT. The code looks a little cleaner if we replace BPF_OP(insn->code) with the local variable bpf_op. Caching the value this way also saves 300 bytes (about 1%) in the code size of the JIT. Signed-off-by: David Daney Signed-off-by: David S. Miller arch/mips/net/ebpf_jit.c | 67 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 33 deletions(-) commit a67b375fdc5b21ae3a15761f9c5ef7bd352b5f7d Author: David Daney Date: Fri Aug 18 16:40:32 2017 -0700 MIPS, bpf: Implement JLT, JLE, JSLT and JSLE ops in the eBPF JIT. Signed-off-by: David Daney Signed-off-by: David S. Miller arch/mips/net/ebpf_jit.c | 101 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 29 deletions(-) commit 8d8d18c3283f0cf72f6ac41f337d5b6f818649b6 Author: David Daney Date: Fri Aug 18 16:40:31 2017 -0700 MIPS,bpf: Fix using smp_processor_id() in preemptible splat. If the kernel is configured with preemption enabled we were getting warning stack traces for use of current_cpu_type(). Fix by moving the test between preempt_disable()/preempt_enable() and caching the results of the CPU type tests for use during code generation. Signed-off-by: David Daney Signed-off-by: David S. Miller arch/mips/net/ebpf_jit.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit da6817ebc353c54c5e74676418bfa77d13e64159 Author: Bhumika Goyal Date: Mon Aug 21 17:13:10 2017 +0530 qlogic: make device_attribute const Make these const as they are 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: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 50f9ddaf64e1338eaaef6697ad5b8ae210da0d60 Author: Masahiro Yamada Date: Tue Jul 25 11:23:36 2017 +0900 of: search scripts/dtc/include-prefixes path for both CPP and DTC Since commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory"), cross-arch DT reference works well, but only for CPP style #include directives. It makes as much sense to share DT between different architectures by using DTC's /include/ directives. So, scripts/dtc/include-prefixes should be passed to both CPP and DTC. I refactored Makefile.lib a bit to not repeat the same path. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5ffa2aed389c8f204e57ef361a78340a4bfcffc9 Author: Masahiro Yamada Date: Tue Jul 25 11:23:35 2017 +0900 of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP Having arch/$(SRCARCH)/boot/dts as an include search path is not very useful these days because some architectures such as ARM64, MIPS have no DT in this directory. Instead, they have DT in vendor sub-directories. With some DT files in ARM and PowerPC fixed, we can now drop this include search path. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 1 - 1 file changed, 1 deletion(-) commit b12869a8d519cbb887866c295dc39df00d646898 Author: Masahiro Yamada Date: Tue Jul 25 11:23:34 2017 +0900 of: remove drivers/of/testcase-data from include search path for CPP This search path was added by commit b5190516b282 ("of: Move testcase FDT data into drivers/of"). At that time, it was needed for platform DT files to include testcase data. It became unnecessary when commit ae9304c9d311 ("Adding selftest testdata dynamically into live tree") introduced dynamic addition of testcase data, but it missed to delete this search path. Moreover, the directory drivers/of/testcase-data does not exist since commit 19fd74879a32 ("of/unittest: Rename selftest.c to unittest.c"). Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 1 - 1 file changed, 1 deletion(-) commit 7467c9d9598993d8531b2f76c090a5743000612b Author: Sudeep Holla Date: Mon Jul 24 14:55:13 2017 +0100 of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered Instead of the callsites choosing between of_cpu_device_node_get if the CPUs are registered as of_node is populated by then and of_get_cpu_node when the CPUs are not yet registered as CPU of_nodes are not yet stashed thereby needing to parse the device tree, we can call of_get_cpu_node in case the CPUs are not yet registered. This will allow to use of_cpu_device_node_get anywhere hiding the details from the caller. Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Sudeep Holla Signed-off-by: Rob Herring include/linux/of_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c996b52df44b83d227d7664d2838ed1c6739c850 Author: Donglin Peng Date: Sun Aug 20 14:01:10 2017 +0800 ASoC: ux500: Remove unnecessary function call First of all,the address of pdev->dev is assigned to mop500_card.dev, then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data,but when calling snd_soc_register_card, the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 1 - 1 file changed, 1 deletion(-) commit e4eabf75ad9a0d4afb4a35c8c4fac7e437d5da06 Author: Donglin Peng Date: Sun Aug 20 14:02:17 2017 +0800 ASoC: tegra: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/tegra/tegra_alc5632.c | 1 - sound/soc/tegra/tegra_max98090.c | 1 - sound/soc/tegra/tegra_rt5640.c | 1 - sound/soc/tegra/tegra_rt5677.c | 1 - sound/soc/tegra/tegra_sgtl5000.c | 1 - sound/soc/tegra/tegra_wm8753.c | 1 - sound/soc/tegra/tegra_wm8903.c | 1 - sound/soc/tegra/tegra_wm9712.c | 1 - sound/soc/tegra/trimslice.c | 1 - 9 files changed, 9 deletions(-) commit b286401752c61de9c2335a1c9748243bb53649de Author: Donglin Peng Date: Sun Aug 20 13:22:00 2017 +0800 ASoC: mediatek: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650.c | 1 - 3 files changed, 3 deletions(-) commit 6d284bb11c302a4db4d169ca13d48dbb4d9b5cbe Author: Arvind Yadav Date: Mon Aug 21 22:21:08 2017 +0530 regulator: ltc3589: 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: Mark Brown drivers/regulator/ltc3589.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a88ce63b642cf8cd82cbc278429ccd9de4455a07 Author: Hoeun Ryu Date: Thu Aug 17 11:24:27 2017 +0900 arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly version in panic path) introduced crash_smp_send_stop() which is a weak function and can be overridden by architecture codes to fix the side effect caused by commit f06e515 : (kernel/panic.c: add "crash_kexec_post_ notifiers" option). ARM64 architecture uses the weak version function and the problem is that the weak function simply calls smp_send_stop() which makes other CPUs offline and takes away the chance to save crash information for nonpanic CPUs in machine_crash_shutdown() when crash_kexec_post_notifiers kernel option is enabled. Calling smp_send_crash_stop() in machine_crash_shutdown() is useless because all nonpanic CPUs are already offline by smp_send_stop() in this case and smp_send_crash_stop() only works against online CPUs. The result is that secondary CPUs registers are not saved by crash_save_cpu() and the vmcore file misreports these CPUs as being offline. crash_smp_send_stop() is implemented to fix this problem by replacing the existing smp_send_crash_stop() and adding a check for multiple calling to the function. The function (strong symbol version) saves crash information for nonpanic CPUs and machine_crash_shutdown() tries to save crash information for nonpanic CPUs only when crash_kexec_post_notifiers kernel option is disabled. * crash_kexec_post_notifiers : false panic() __crash_kexec() machine_crash_shutdown() crash_smp_send_stop() <= save crash dump for nonpanic cores * crash_kexec_post_notifiers : true panic() crash_smp_send_stop() <= save crash dump for nonpanic cores __crash_kexec() machine_crash_shutdown() crash_smp_send_stop() <= just return. Signed-off-by: Hoeun Ryu Reviewed-by: James Morse Tested-by: James Morse Signed-off-by: Catalin Marinas arch/arm64/include/asm/smp.h | 2 +- arch/arm64/kernel/machine_kexec.c | 2 +- arch/arm64/kernel/smp.c | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) commit 87c56dcba4573441b5cc4b42ecbb35188fee8f04 Author: Arvind Yadav Date: Mon Aug 7 13:15:19 2017 +0530 dmaengine: at_xdmac: Handle return value of clk_prepare_enable. clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1edc85dc56690aeb490e8058b2515f277bdebd51 Author: Arvind Yadav Date: Mon Aug 7 13:15:18 2017 +0530 dmaengine: at_xdmac: Fix compilation warning. Replace '%d' by '%zu' to fix the compilation warning:- "format ‘%d’ expects argument of type ‘int’,but argument has type ‘size_t’ [-Wformat=]" Signed-off-by: Arvind Yadav Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc59215d4f42084ee13654bafe3e5130b146aeb7 Author: Nikolay Borisov Date: Tue Aug 1 18:25:56 2017 +0300 btrfs: remove unnecessary memory barrier in btrfs_direct_IO Commit 38851cc19adb ("Btrfs: implement unlocked dio write") implemented unlocked dio write, allowing multiple dio writers to write to non-overlapping, and non-eof-extending regions. In doing so it also introduced a broken memory barrier. It is broken due to 2 things: 1. Memory barriers _MUST_ always be paired, this is clearly not the case here 2. Checkpatch actually produces a warning if a memory barrier is introduced that doesn't have a comment explaining how it's being paired. Specifically for inode::i_dio_count that's wrapped inside inode_dio_begin, there is no explicit barrier semantics attached, so removing is fine as the atomic is used in common the waiter/wakeup pattern. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ enhance changelog ] Signed-off-by: David Sterba fs/btrfs/inode.c | 1 - 1 file changed, 1 deletion(-) commit b5d9071c4f5c087614eb477bff04795e325bea70 Author: Nikolay Borisov Date: Fri Aug 18 17:58:23 2017 +0300 btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent Currently this function is always called with the object id of the root key of the chunk_tree, which is always BTRFS_CHUNK_TREE_OBJECTID. So let's subsume it straight into the function itself. No functional change. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 0ca00afb2b8ab37e543e4daa650bf6bdab2005da Author: Nikolay Borisov Date: Fri Aug 18 17:58:22 2017 +0300 btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent THe function is always called with chunk_objectid set to BTRFS_FIRST_CHUNK_TREE_OBJECTID. Let's collapse the parameter in the function itself. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a43dce93587bfb5f65fa40647977ef72a7ba6699 Merge: 0c45d7f 077fbac Author: David S. Miller Date: Mon Aug 21 09:29:47 2017 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-08-21 1) Support RX checksum with IPsec crypto offload for esp4/esp6. From Ilan Tayari. 2) Fixup IPv6 checksums when doing IPsec crypto offload. From Yossi Kuperman. 3) Auto load the xfrom offload modules if a user installs a SA that requests IPsec offload. From Ilan Tayari. 4) Clear RX offload informations in xfrm_input to not confuse the TX path with stale offload informations. From Ilan Tayari. 5) Allow IPsec GSO for local sockets if the crypto operation will be offloaded. 6) Support setting of an output mark to the xfrm_state. This mark can be used to to do the tunnel route lookup. From Lorenzo Colitti. ==================== Signed-off-by: David S. Miller commit e43341ca85e44204424467fcc3d7f38d59338473 Author: Bhumika Goyal Date: Sun Aug 13 18:53:04 2017 +0530 dmaengine: ste_dma40: make stedma40_chan_cfg const Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5d619e9b924c03b4e5e6be7c03f1346150104b9 Author: Lucas Stach Date: Fri Aug 18 18:33:35 2017 +0200 ASoC: fsl-asoc-card: don't print EPROBE_DEFER as error Probe deferral is to be expected during normal operation, so avoid printing an error when it is encountered. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d166e66aca3e832cb0851da7d0183090dd699d4 Author: Yoshihiro Shimoda Date: Wed Aug 2 20:33:34 2017 +0900 dmaengine: usb-dmac: Add soctype for R-Car M3-W This patch adds R-Car M3-W device tree bindings for usb-dmac driver. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt | 1 + 1 file changed, 1 insertion(+) commit a63efead7f8eeefcf08e4e7d0b033ac552f7da23 Author: Anton Vasilyev Date: Thu Aug 10 18:54:25 2017 +0300 dmaengine: qcom_hidma: avoid freeing an uninitialized pointer If device_node np doesn't contain child or first child doesn't have property "reg" then hidma_mgmt_of_populate_channels() perfoms deallocation on uninitialized local variable res. The patch adds res initialization by NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Reviewed-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d2993811a1e07cd128847f07f63aae66a78d14b Author: Marcus Cooper Date: Sat Aug 19 14:48:39 2017 +0200 ASoC: sun4i-i2s: Add support for H3 The sun8i-h3 introduces a lot of changes to the i2s block such as different register locations, extended clock division and more operational modes. As we have to consider the earlier implementation then these changes need to be isolated. None of the new functionality has been implemented yet, the driver has just been expanded to allow it work on the H3 SoC. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown .../devicetree/bindings/sound/sun4i-i2s.txt | 2 + sound/soc/sunxi/sun4i-i2s.c | 176 ++++++++++++++++++++- 2 files changed, 176 insertions(+), 2 deletions(-) commit 043b8daa578f30c2ba685ad13b121fd138b95750 Author: Marcus Cooper Date: Sat Aug 19 14:48:38 2017 +0200 ASoC: sun4i-i2s: Update global enable with bitmask The default value of the config register is different on newer SoCs and therefore enabling/disabling with a register write will clear bits used to set the direction of the clock and frame pins. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d03d2737e2d20c6ffb242154a69e1a9313adb632 Author: Marcus Cooper Date: Sat Aug 19 14:48:37 2017 +0200 ASoC: sun4i-i2s: Check for slave select bit The newer SoCs do not have this setting. Instead they set the pin direction. Add a check to see if the bit is valid and if so set it accordingly. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit dfd2293c8626f1282e6a6e30f591c0a83146f3d4 Author: Marcus Cooper Date: Sat Aug 19 14:48:36 2017 +0200 ASoC: sun4i-i2s: Add regmap field to set DAI format On the newer SoCs the bits to configure the operational mode are located in a different register. Add a regmap field so that this location can be configured. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 5f93b0639634929b8349f9f9d83e1d881c1c7d4a Author: Marcus Cooper Date: Sat Aug 19 14:48:35 2017 +0200 ASoC: sun4i-i2s: Add mclk enable regmap field The location of the mclk output enable bit is different on newer SoCs. Use a regmap field to enable it. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 296935213feb7bcb72ab8750a8cacb66baeb0eb3 Author: Marcus Cooper Date: Sat Aug 19 14:48:34 2017 +0200 ASoC: sun4i-i2s: bclk and lrclk polarity tidyup On newer SoCs the bit fields for the blck and lrclk polarity are in a different locations. Use regmap fields to set the polarity bits as intended. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) commit 771647159125e93547f15daa14131a30a26f9b60 Author: Marcus Cooper Date: Sat Aug 19 14:48:33 2017 +0200 ASoC: sun4i-i2s: Add regfields for word size select and sample resolution On newer SoCs the location of the slot width select and sample resolution are different and also there is a bigger range of support. For the current supported rates then an offset is required. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 6eb4f27419d9250ac632df15d9dcf916d84b9944 Author: Marcus Cooper Date: Sat Aug 19 14:48:32 2017 +0200 ASoC: sun4i-i2s: Add regmap fields for channels On the original i2s block the channel mapping and selection were configured for stereo audio by default: This is not the case with the newer SoCs and they are also located at different offsets. To support the newer SoC then regmap fields have been added to the quirks and these are initialised to their correct settings during probing. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 77 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 8 deletions(-) commit 827807549e690c84bba5aac99b58dfbd52fcef8c Author: Donglin Peng Date: Sun Aug 20 13:55:13 2017 +0800 ASoC: sun4i-codec: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev in create_card,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 1 - 1 file changed, 1 deletion(-) commit 3bb2991c1d4d487323fde7b5b63985798c91a03f Author: Donglin Peng Date: Sun Aug 20 13:44:58 2017 +0800 ASoC: qcom: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Acked-by: Banajit Goswami Signed-off-by: Mark Brown sound/soc/qcom/storm.c | 1 - 1 file changed, 1 deletion(-) commit 70024ebc51cc4a10a2945188e1129ae594830ca2 Author: Donglin Peng Date: Sun Aug 20 13:43:57 2017 +0800 ASoC: qcom: Remove useless function call The function platform_set_drvdata(pdev, data) copies the value of the variable data to pdev->dev.driver_data,but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will override it, so i think that the former copy operation is useless and can be removed. Signed-off-by: Peng Donglin Acked-by: Banajit Goswami Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 1 - 1 file changed, 1 deletion(-) commit 4c316783ee88eee4f045fbb31344471c6607b6ed Author: Donglin Peng Date: Sun Aug 20 13:26:25 2017 +0800 ASoC: mxs-sgtl5000: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/mxs/mxs-sgtl5000.c | 1 - 1 file changed, 1 deletion(-) commit dc94d245a57b76f38c7a936cf900cc38237638de Author: Donglin Peng Date: Sun Aug 20 13:25:46 2017 +0800 ASoC: rockchip: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 2 -- sound/soc/rockchip/rk3399_gru_sound.c | 1 - 2 files changed, 3 deletions(-) commit acd617a461ed811894f4318c9b952fa002f3be21 Author: Donglin Peng Date: Sun Aug 20 13:25:25 2017 +0800 ASoC: atmel: Remove unnecessary function call The function platform_set_drvdata copies the value the variable card to card->dev->driver_data, then the address of &pdev->dev is assigned to card->dev in atmel_pdmic_asoc_card_init, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will do the same copy operation, so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 1 - 1 file changed, 1 deletion(-) commit 5c23bc7cb6b6b40ddf7864e5dead647625e2f386 Author: Donglin Peng Date: Sun Aug 20 13:23:19 2017 +0800 ASoC: atmel: Remove unnecessary function call The function platform_set_drvdata copies the value the variable card to card->dev->driver_data, then the address of &pdev->dev is assigned to card->dev in atmel_classd_asoc_card_init, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will do the same copy operation, so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 1 - 1 file changed, 1 deletion(-) commit 1107a293b7c33723ace2a8d18f5c6febcd576d7a Author: Donglin Peng Date: Sun Aug 20 13:21:35 2017 +0800 ASoC: s3c24xx_uda134x: Remove unnecessary function call First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 1 - 1 file changed, 1 deletion(-) commit 2e442003ab2fbc386bc04b243f6aaaebdbfbb821 Author: Ujjal Singh Date: Tue Aug 8 20:38:51 2017 -0400 dmaengine: ioatdma: Add ABI document ABI document added to describe all sysfs variables for dma Signed-off-by: Ujjal Singh Acked-by: Dave Jiang Signed-off-by: Vinod Koul Documentation/ABI/stable/sysfs-driver-dma-ioatdma | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit fce7358b54c678f047273aba32f15c5dc77db77a Author: Sugar Zhang Date: Mon Aug 21 16:25:07 2017 +0800 ASoC: rockchip: separate pinctrl pins from each other pdm sdi0~3 pins are optional, for example, if 4ch required, only sdi0~1 need to be enabled. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 398443471f1698003832972637d5508a0c0809e0 Author: Borislav Petkov Date: Tue Jul 25 11:09:56 2017 +0200 EDAC, mce_amd: Get rid of local var in amd_filter_mce() ... and use the macro for that. No functionality change. Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b65cb7a590274bf5dbf5bbccbbd0c495c27ab14d Author: Kuninori Morimoto Date: Mon Aug 21 07:03:01 2017 +0000 ASoC: rsnd: tidyup comments position/space/tab Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/dma.c | 2 +- sound/soc/sh/rcar/src.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit fc1111b885437f374ed54aadda44d8b241ebd2a3 Author: Guillaume Tucker Date: Mon Aug 21 13:47:43 2017 +0100 regulator: fan53555: fix I2C device ids The device tree nodes all correctly describe the regulators as syr827 or syr828, but the I2C device id is currently set to the wildcard value of syr82x in the driver. This causes udev to fail to match the driver module with the modalias data from sysfs. Fix this by replacing the I2C device ids with ones that match the device tree descriptions, with syr827 and syr828. Tested on Firefly rk3288 board. The syr82x id was not used anywhere. Fixes: e80c47bd738b (regulator: fan53555: Export I2C module alias information) Signed-off-by: Guillaume Tucker Signed-off-by: Mark Brown drivers/regulator/fan53555.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f3c0891c2feafa008cc35d6ffb8cf593df66c867 Author: Borislav Petkov Date: Tue Jul 25 11:07:03 2017 +0200 EDAC, mce_amd: Get rid of most struct cpuinfo_x86 uses struct mce.cpuid contains CPUID(1).EAX which contains family, model and stepping and thus has enough information for our purposes. Thus get rid of some external dependencies which are not really needed. No functionality change. Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 1cd5447eb677822c5c22bb52161c2105507dcce0 Author: Jeff Mahoney Date: Thu Aug 17 10:25:11 2017 -0400 btrfs: pass fs_info to btrfs_del_root instead of tree_root btrfs_del_roots always uses the tree_root. Let's pass fs_info instead. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 4 ++-- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/free-space-tree.c | 2 +- fs/btrfs/qgroup.c | 3 +-- fs/btrfs/root-tree.c | 7 ++++--- 5 files changed, 9 insertions(+), 9 deletions(-) commit 64ecdb647ddb83dcff9c8e2a5c40119f171ea004 Author: Liu Bo Date: Fri Aug 18 15:15:24 2017 -0600 Btrfs: add one more sanity check for shared ref type Every shared ref has a parent tree block, which can be get from btrfs_extent_inline_ref_offset(). And the tree block must be aligned to the nodesize, so we'd know this inline ref is not valid if this block's bytenr is not aligned to the nodesize, in which case, most likely the ref type has been misused. This adds the above mentioned check and also updates print_extent_item() called by btrfs_print_leaf() to point out the invalid ref while printing the tree structure. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 29 +++++++++++++++++++++++++---- fs/btrfs/print-tree.c | 27 +++++++++++++++++++++------ 2 files changed, 46 insertions(+), 10 deletions(-) commit cdccee993f2f3466f69a358daec19de744a02f92 Author: Liu Bo Date: Fri Aug 18 15:15:23 2017 -0600 Btrfs: remove BUG_ON in __add_tree_block The BUG_ON() can be triggered when the caller is processing an invalid extent inline ref, e.g. a shared data ref is offered instead of an extent data ref, such that it tries to find a non-existent tree block and then btrfs_search_slot returns 1 for no such item. This replaces the BUG_ON() with a WARN() followed by calling btrfs_print_leaf() to show more details about what's going on and returning -EINVAL to upper callers. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit b14c55a191263889c379aeee85223bb72501824d Author: Liu Bo Date: Fri Aug 18 15:15:22 2017 -0600 Btrfs: remove BUG() in add_data_reference Now that we have a helper to report invalid value of extent inline ref type, we need to quit gracefully instead of throwing out a kernel panic. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 07638ea5987e51715b35eb5a9a9e908f18ffabf7 Author: Liu Bo Date: Fri Aug 18 15:15:21 2017 -0600 Btrfs: remove BUG() in print_extent_item btrfs_print_leaf() is used in btrfs_get_extent_inline_ref_type, so here we really want to print the invalid value of ref type instead of causing a kernel panic. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/print-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4335958de2a43c6790c7f6aa0682aa7189983fa4 Author: Liu Bo Date: Fri Aug 18 15:15:20 2017 -0600 Btrfs: remove BUG() in btrfs_extent_inline_ref_size Now that btrfs_get_extent_inline_ref_type() can report if type is a valid one and all callers can gracefully deal with that, we don't need to crash here. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - 1 file changed, 1 deletion(-) commit 3de28d579edbd35294bf44aee8402c804331bc37 Author: Liu Bo Date: Fri Aug 18 15:15:19 2017 -0600 Btrfs: convert to use btrfs_get_extent_inline_ref_type Since we have a helper which can do sanity check, this converts all btrfs_extent_inline_ref_type to it. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 11 +++++++++-- fs/btrfs/extent-tree.c | 36 ++++++++++++++++++++++++++++++------ fs/btrfs/relocation.c | 13 +++++++++++-- 3 files changed, 50 insertions(+), 10 deletions(-) commit 167ce953ca55bdee20fe56c3c0fa51002435f745 Author: Liu Bo Date: Fri Aug 18 15:15:18 2017 -0600 Btrfs: add a helper to retrive extent inline ref type An invalid value of extent inline ref type may be read from a malicious image which may force btrfs to crash. This adds a helper which does sanity check for the ref type, so we can know if it's sane, return he type, otherwise return an error. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ minimal tweak const types, causing warnings due to other cleanup patches ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 11 +++++++++++ fs/btrfs/extent-tree.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit af1cbe0a66cb9e6c3f2acf7f0a7fc647b5dc4f2f Author: David Sterba Date: Fri Mar 31 18:42:57 2017 +0200 btrfs: scrub: simplify scrub worker initialization Minor simplification, merge calls to one. Signed-off-by: David Sterba fs/btrfs/scrub.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1d1bf92d9dee0aeb14dee38151bcf214443f99d5 Author: David Sterba Date: Fri Mar 31 18:02:48 2017 +0200 btrfs: scrub: clean up division in scrub_find_csum Use proper helpers for 64bit division. Signed-off-by: David Sterba fs/btrfs/scrub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7736b0a4313c936dc8ccb87e8acf447e12ae2fd1 Author: David Sterba Date: Fri Mar 31 18:02:48 2017 +0200 btrfs: scrub: clean up division in __scrub_mark_bitmap Use proper helpers for 64bit division and then cast to narrower type. Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2073c4c2e51a9343af10862ba478e7a67d6caf04 Author: David Sterba Date: Fri Mar 31 17:12:51 2017 +0200 btrfs: scrub: use bool for flush_all_writes flush_all_writes is an atomic but does not use the semantics at all, it's just on/off indicator, we can use bool. Signed-off-by: David Sterba fs/btrfs/scrub.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d7d824966530acfe32b94d1ed672e6fe1638cd68 Author: Ernesto A. Fernández Date: Wed Aug 2 03:18:27 2017 -0300 btrfs: preserve i_mode if __btrfs_set_acl() fails When changing a file's acl mask, btrfs_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin with, the system will from now on assume that the mask permission bits are actual group permission bits, potentially granting access to the wrong users. Prevent this by restoring the original mode bits if __btrfs_set_acl fails. Signed-off-by: Ernesto A. Fernández Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/acl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 408fbf19ad78d8ab0656289efea77c10a342f043 Author: Nikolay Borisov Date: Thu Jul 27 14:37:29 2017 +0300 btrfs: Remove extraneous chunk_objectid variable BTRFS_FIRST_CHUNK_TREE_OBJECTIS id the only objectid being used in the chunk_tree. So remove a variable which is always set to that value and collapse its usage in callees which are passed this variable. No functional changes Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 0174484d619460a65e88f594c36983cd2b7f4128 Author: Nikolay Borisov Date: Thu Jul 27 14:22:11 2017 +0300 btrfs: Remove chunk_objectid argument from btrfs_make_block_group btrfs_make_block_group is always called with chunk_objectid set to BTRFS_FIRST_CHUNK_TREE_OBJECTID. There's no reason why this behavior will change anytime soon, so let's remove the argument and decrease the cognitive load when reading the code path. No functional change Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/extent-tree.c | 6 +++--- fs/btrfs/volumes.c | 4 +--- 3 files changed, 5 insertions(+), 8 deletions(-) commit 0dde10bed2c44a4024eb446cc72fe4e0cb97ec06 Author: Matthias Kaehlcke Date: Thu Jul 27 14:30:23 2017 -0700 btrfs: Remove extra parentheses from condition in copy_items() There is no need for the extra pair of parentheses, remove it. This fixes the following warning when building with clang: fs/btrfs/tree-log.c:3694:10: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((i == (nr - 1))) ~~^~~~~~~~~~~ Also remove the unnecessary parentheses around the substraction. Signed-off-by: Matthias Kaehlcke Signed-off-by: David Sterba fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ce1dd2a4ab5513cfa9cce3138251a3c71e446cd Author: Nikolay Borisov Date: Fri Jul 28 10:50:14 2017 +0300 btrfs: Remove redundant setting of uuid in btrfs_block_header btrfs_alloc_dev_extent currently unconditionally sets the uuid in the leaf block header the function is working with. This is unnecessary since this operation is peformed by the core btree handling code (splitting a node, allocating a new btree block etc). So let's remove it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 -- 1 file changed, 2 deletions(-) commit 583b723151794e2ff1691f1510b4e43710293875 Author: Hans van Kranenburg Date: Fri Jul 28 08:31:28 2017 +0200 btrfs: Do not use data_alloc_cluster in ssd mode This patch provides a band aid to improve the 'out of the box' behaviour of btrfs for disks that are detected as being an ssd. In a general purpose mixed workload scenario, the current ssd mode causes overallocation of available raw disk space for data, while leaving behind increasing amounts of unused fragmented free space. This situation leads to early ENOSPC problems which are harming user experience and adoption of btrfs as a general purpose filesystem. This patch modifies the data extent allocation behaviour of the ssd mode to make it behave identical to nossd mode. The metadata behaviour and additional ssd_spread option stay untouched so far. Recommendations for future development are to reconsider the current oversimplified nossd / ssd distinction and the broken detection mechanism based on the rotational attribute in sysfs and provide experienced users with a more flexible way to choose allocator behaviour for data and metadata, optimized for certain use cases, while keeping sane 'out of the box' default settings. The internals of the current btrfs code have more potential than what currently gets exposed to the user to choose from. The SSD story... In the first year of btrfs development, around early 2008, btrfs gained a mount option which enables specific functionality for filesystems on solid state devices. The first occurance of this functionality is in commit e18e4809, labeled "Add mount -o ssd, which includes optimizations for seek free storage". The effect on allocating free space for doing (data) writes is to 'cluster' writes together, writing them out in contiguous space, as opposed to a 'tetris' way of putting all separate writes into any free space fragment that fits (which is what the -o nossd behaviour does). A somewhat simplified explanation of what happens is that, when for example, the 'cluster' size is set to 2MiB, when we do some writes, the data allocator will search for a free space block that is 2MiB big, and put the writes in there. The ssd mode itself might allow a 2MiB cluster to be composed of multiple free space extents with some existing data in between, while the additional ssd_spread mount option kills off this option and requires fully free space. The idea behind this is (commit 536ac8ae): "The [...] clusters make it more likely a given IO will completely overwrite the ssd block, so it doesn't have to do an internal rwm cycle."; ssd block meaning nand erase block. So, effectively this means applying a "locality based algorithm" and trying to outsmart the actual ssd. Since then, various changes have been made to the involved code, but the basic idea is still present, and gets activated whenever the ssd mount option is active. This also happens by default, when the rotational flag as seen at /sys/block//queue/rotational is set to 0. However, there's a number of problems with this approach. First, what the optimization is trying to do is outsmart the ssd by assuming there is a relation between the physical address space of the block device as seen by btrfs and the actual physical storage of the ssd, and then adjusting data placement. However, since the introduction of the Flash Translation Layer (FTL) which is a part of the internal controller of an ssd, these attempts are futile. The use of good quality FTL in consumer ssd products might have been limited in 2008, but this situation has changed drastically soon after that time. Today, even the flash memory in your automatic cat feeding machine or your grandma's wheelchair has a full featured one. Second, the behaviour as described above results in the filesystem being filled up with badly fragmented free space extents because of relatively small pieces of space that are freed up by deletes, but not selected again as part of a 'cluster'. Since the algorithm prefers allocating a new chunk over going back to tetris mode, the end result is a filesystem in which all raw space is allocated, but which is composed of underutilized chunks with a 'shotgun blast' pattern of fragmented free space. Usually, the next problematic thing that happens is the filesystem wanting to allocate new space for metadata, which causes the filesystem to fail in spectacular ways. Third, the default mount options you get for an ssd ('ssd' mode enabled, 'discard' not enabled), in combination with spreading out writes over the full address space and ignoring freed up space leads to worst case behaviour in providing information to the ssd itself, since it will never learn that all the free space left behind is actually free. There are two ways to let an ssd know previously written data does not have to be preserved, which are sending explicit signals using discard or fstrim, or by simply overwriting the space with new data. The worst case behaviour is the btrfs ssd_spread mount option in combination with not having discard enabled. It has a side effect of minimizing the reuse of free space previously written in. Fourth, the rotational flag in /sys/ does not reliably indicate if the device is a locally attached ssd. For example, iSCSI or NBD displays as non-rotational, while a loop device on an ssd shows up as rotational. The combination of the second and third problem effectively means that despite all the good intentions, the btrfs ssd mode reliably causes the ssd hardware and the filesystem structures and performance to be choked to death. The clickbait version of the title of this story would have been "Btrfs ssd optimizations considered harmful for ssds". The current nossd 'tetris' mode (even still without discard) allows a pattern of overwriting much more previously used space, causing many more implicit discards to happen because of the overwrite information the ssd gets. The actual location in the physical address space, as seen from the point of view of btrfs is irrelevant, because the actual writes to the low level flash are reordered anyway thanks to the FTL. Changes made in the code 1. Make ssd mode data allocation identical to tetris mode, like nossd. 2. Adjust and clean up filesystem mount messages so that we can easily identify if a kernel has this patch applied or not, when providing support to end users. Also, make better use of the *_and_info helpers to only trigger messages on actual state changes. Backporting notes Notes for whoever wants to backport this patch to their 4.9 LTS kernel: * First apply commit 951e7966 "btrfs: drop the nossd flag when remounting with -o ssd", or fixup the differences manually. * The rest of the conflicts are because of the fs_info refactoring. So, for example, instead of using fs_info, it's root->fs_info in extent-tree.c Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 +++--- fs/btrfs/disk-io.c | 6 ++---- fs/btrfs/extent-tree.c | 11 ++++++----- fs/btrfs/super.c | 16 +++++++++------- 4 files changed, 20 insertions(+), 19 deletions(-) commit 43a0111103af2d358f6d2d671d8429ba169e53bb Author: Lu Fengqi Date: Fri Aug 18 16:38:07 2017 +0800 btrfs: use btrfsic_submit_bio instead of submit_bio in write_dev_flush Although this bio has no data attached, it will reach this condition (bio->bi_opf & REQ_PREFLUSH) and then update the flush_gen of dev_state in __btrfsic_submit_bio. So we should still submit it through integrity checker. Otherwise, the integrity checker will throw the following warning when I mount a newly created btrfs filesystem. [10264.755497] btrfs: attempt to write superblock which references block M @29523968 (sdb1/1111654400/0) which is not flushed out of disk's write cache (block flush_gen=1, dev->flush_gen=0)! [10264.755498] btrfs: attempt to write superblock which references block M @29523968 (sdb1/37912576/0) which is not flushed out of disk's write cache (block flush_gen=1, dev->flush_gen=0)! Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72610b1b40005fa19a107ea62b8bcc0ca84ef11b Author: Filipe Manana Date: Thu Aug 10 22:54:51 2017 +0100 Btrfs: incremental send, fix emission of invalid clone operations When doing an incremental send it's possible that the computed send stream contains clone operations that will fail on the receiver if the receiver has compression enabled and the clone operations target a sector sized extent that starts at a zero file offset, is not compressed on the source filesystem but ends up being compressed and inlined at the destination filesystem. Example scenario: $ mkfs.btrfs -f /dev/sdb $ mount -o compress /dev/sdb /mnt # By doing a direct IO write, the data is not compressed. $ xfs_io -f -d -c "pwrite -S 0xab 0 4K" /mnt/foobar $ btrfs subvolume snapshot -r /mnt /mnt/mysnap1 $ xfs_io -c "reflink /mnt/foobar 0 8K 4K" /mnt/foobar $ btrfs subvolume snapshot -r /mnt /mnt/mysnap2 $ btrfs send -f /tmp/1.snap /mnt/mysnap1 $ btrfs send -f /tmp/2.snap -p /mnt/mysnap1 /mnt/mysnap2 $ umount /mnt $ mkfs.btrfs -f /dev/sdc $ mount -o compress /dev/sdc /mnt $ btrfs receive -f /tmp/1.snap /mnt $ btrfs receive -f /tmp/2.snap /mnt ERROR: failed to clone extents to foobar Operation not supported The same could be achieved by mounting the source filesystem without compression and doing a buffered IO write instead of a direct IO one, and mounting the destination filesystem with compression enabled. So fix this by issuing regular write operations in the send stream instead of clone operations when the source offset is zero and the range has a length matching the sector size. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo Signed-off-by: Chris Mason Signed-off-by: David Sterba fs/btrfs/send.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f716abd55d1e141772fd44a99c07c89f4aff1978 Author: Liu Bo Date: Wed Aug 9 11:10:16 2017 -0600 Btrfs: fix out of bounds array access while reading extent buffer There is a corner case that slips through the checkers in functions reading extent buffer, ie. if (start < eb->len) and (start + len > eb->len), then a) map_private_extent_buffer() returns immediately because it's thinking the range spans across two pages, b) and the checkers in read_extent_buffer(), WARN_ON(start > eb->len) and WARN_ON(start + len > eb->start + eb->len), both are OK in this corner case, but it'd actually try to access the eb->pages out of bounds because of (start + len > eb->len). The case is found by switching extent inline ref type from shared data ref to non-shared data ref, which is a kind of metadata corruption. It'd use the wrong helper to access the eb, eg. btrfs_extent_data_ref_root(eb, ref) is used but the %ref passing here is "struct btrfs_shared_data_ref". And if the extent item happens to be the first item in the eb, then offset/length will get over eb->len which ends up an invalid memory access. This is adding proper checks in order to avoid invalid memory access, ie. 'general protection fault', before it's too late. Reviewed-by: Filipe Manana Signed-off-by: Liu Bo Signed-off-by: Chris Mason Signed-off-by: David Sterba fs/btrfs/extent_io.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 4ab1784b48b384e52a6539ab10201fed7a3127f5 Author: Borislav Petkov Date: Tue Jul 25 10:44:59 2017 +0200 EDAC, mce_amd: Rename decode_smca_errors() to decode_smca_error() Singular fits better because it decodes a single error. No functionality change. Signed-off-by: Borislav Petkov drivers/edac/mce_amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8165f70648da0a4a51e5871693781b2cc29b29d6 Author: Vladimir Murzin Date: Mon Aug 14 09:55:47 2017 +0100 arm64: 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 Signed-off-by: Vladimir Murzin Signed-off-by: Catalin Marinas arch/arm64/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fa59ec8ccf38bbc2193ae61aed9afa0687974e0 Author: Vladimir Murzin Date: Mon Aug 14 09:55:46 2017 +0100 arm64: 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: Catalin Marinas arch/arm64/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa55457d26eccdb0e750882674f47df6a2bb2505 Author: Julia Lawall Date: Mon Aug 21 16:49:59 2017 +0200 omapfb: constify omap_video_timings structures These omap_video_timings structures are only copied into other structures, so they can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Cc: Tomi Valkeinen Cc: Bhumika Goyal Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c | 2 +- drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7af9a52e33ea07937fc216104e2cf3d4e690b43f Author: Anton Vasilyev Date: Mon Aug 21 16:49:58 2017 +0200 video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path If dlfb_usb_probe drops to error path then there is only one kref_init() call and no kref_get(), so second kref_put() leads to use after free. The patch removes superfluous kref_put on dlfb_usb_probe error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 1 - 1 file changed, 1 deletion(-) commit 8bf25eadb37cedcaedd6099431b95633d487688f Author: Bhumika Goyal Date: Mon Aug 21 16:49:58 2017 +0200 fbdev: i810: make fb_ops const Make the structure const as it is only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Cc: Julia Lawall Cc: Antonino Daplas Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/i810/i810_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ff10485262bf1b9f0e2db4a25287796f6a519c3 Author: Bhumika Goyal Date: Mon Aug 21 16:49:58 2017 +0200 fbdev: matrox: make fb_ops const Make fb_ops const as it is only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Cc: Julia Lawall Cc: Antonino Daplas Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7588f1ecc5f0c914e669d8afb6525f47cd1c4355 Author: Gustavo A. R. Silva Date: Mon Aug 21 16:49:58 2017 +0200 video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe() platform_get_irq() returns an error code, but the pxa3xx_gcu driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Also, notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pxa3xx-gcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3df3e41c31528e9bae969b3299b35ac672bd27ef Author: Michal Simek Date: Mon Aug 21 16:49:57 2017 +0200 video: fbdev: Enable Xilinx FB for ZynqMP Enable this driver for Xilinx ZynqMP. Signed-off-by: Michal Simek Cc: Daniel Vetter Cc: Benjamin Gaignard Cc: Linus Walleij Cc: Tomi Valkeinen Cc: Arnd Bergmann Cc: Krzysztof Kozlowski Cc: Paul Burton Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00a0af9a6b043e063b297251c713cf8a1a30ba51 Author: Hyun Kwon Date: Mon Aug 21 16:49:57 2017 +0200 video: fbdev: Fix multiple style issues in xilinxfb All reported by from checkpatch ./scripts/checkpatch.pl --max-line-length 120 -strict -f drivers/video/fbdev/xilinxfb.c WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines WARNING: please, no space before tabs WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: braces {} are not necessary for single statement blocks WARNING: Missing a blank line after declarations WARNING: struct of_device_id should normally be const CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Alignment should match open parenthesis CHECK: 'Endianess' may be misspelled - perhaps 'Endianness'? CHECK: spaces preferred around that '*' (ctx:VxV) ERROR: that open brace { should be on the previous line Signed-off-by: Hyun Kwon Signed-off-by: Michal Simek Cc: Soren Brinkmann Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/xilinxfb.c | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 69de8496054a40feb4192d5034dcdb3dff45ee76 Author: Arvind Yadav Date: Mon Aug 21 16:49:57 2017 +0200 video: fbdev: udlfb: 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 Cc: Steve Glendinning Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8290d78e66a98f77dddf8c173000377101d73ad6 Author: Arvind Yadav Date: Mon Aug 21 16:49:57 2017 +0200 video: fbdev: smscufx: 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 Cc: Steve Glendinning Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/smscufx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee97638b5737cc0dba2f12a3bdcda761656b7c01 Author: Josh Poimboeuf Date: Fri Aug 11 12:24:15 2017 -0500 objtool: Fix objtool fallthrough detection with function padding When GCC adds NOP padding between functions, those NOPs aren't associated with a function symbol, which breaks objtool's detection of a function falling through to another function. Instead it shows confusing errors like: drivers/mtd/chips/cfi_util.o: warning: objtool: cfi_qry_mode_on()+0x8b: return with modified stack frame drivers/mtd/chips/cfi_util.o: warning: objtool: cfi_qry_mode_on()+0x0: stack state mismatch: cfa1=-4-32 cfa2=7+8 drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: fixup_use_fwh_lock()+0x8: unknown stack-related register move drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: fixup_use_fwh_lock()+0x0: stack state mismatch: cfa1=6+16 cfa2=7+8 drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: do_otp_write()+0xa: unsupported stack pointer realignment drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: do_otp_write()+0x0: stack state mismatch: cfa1=-4-40 cfa2=7+8 Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/43e7aae9a7a7710cd6df597fa9dc501da4ba0602.1502472193.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8898662268778a8dde305719564c456c56c54857 Author: Markus Elfring Date: Fri Aug 18 21:41:24 2017 +0200 isofs: Delete an error message for a failed memory allocation in isofs_read_inode() 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: Jan Kara fs/isofs/inode.c | 1 - 1 file changed, 1 deletion(-) commit 434aafb572d24bfef8aade15b59e195f58d9bc34 Author: Markus Elfring Date: Wed Aug 16 16:16:30 2017 +0200 quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() 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: Jan Kara fs/quota/quota_v2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 75864b301c91bf41ec2fb49ce4efb62fcb48b954 Author: Bhumika Goyal Date: Sat Aug 19 13:52:17 2017 +0530 mtd: 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: Boris Brezillon drivers/mtd/mtdcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bb6f25a6ee5ff0826d2e620cbb78b1579c3d2ee Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:13 2017 +0200 arm64: zynqmp: 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 Acked-by: Michal Simek Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0286f3ea26a473c8b31fe4637ba2a7f763c2143e Author: Michal Simek Date: Tue Feb 23 09:30:15 2016 +0100 arm64: zynqmp: Add missing mmc aliases in ep108 Add missing mmc aliases. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 ++ 1 file changed, 2 insertions(+) commit 142574873e2b1ff9c783b6b475896f5eeb3b51b3 Author: Naga Sureshkumar Relli Date: Tue Apr 12 11:46:11 2016 +0530 arm64: zynqmp: Enable can1 for ep108 This patch enables can1 for ep108. Signed-off-by: Naga Sureshkumar Relli Reviewed-by: Kedareswara rao Appana Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108-clk.dtsi | 4 ++++ arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 4 ++++ 2 files changed, 8 insertions(+) commit 05e0bd10a9ee2fecde3c5ce5787e36190ffef608 Author: VNSL Durga Date: Mon Apr 11 17:43:47 2016 +0530 arm64: zynqmp: Added clocks to DT for ep108 Added clks for ep108 platform. Signed-off-by: VNSL Durga Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108-clk.dtsi | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit e881e58709a7a3f83820be0e9b20362f77ed7986 Author: Alistair Francis Date: Thu Feb 25 09:30:03 2016 -0800 arm64: zynqmp: Use C pre-processor for includes Change the dtsi include code to use the C pre-processor #include instead of the device tree /include/. This enables option to use dt binding headers. Signed-off-by: Alistair Francis Reviewed-by: Sören Brinkmann Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 932bd0d8dbe89fd2dcf6e23f5f2024936174801d Author: Michal Simek Date: Fri Oct 9 14:46:08 2015 +0200 arm64: zynqmp: Add fpd/lpd dmas Wire fpd and lpd dma channels to zynqmp.dtsi. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 165 +++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) commit 2f9ed1999a4110d6698374e62049f6d016193dcf Author: Naga Sureshkumar Relli Date: Thu Mar 9 20:00:13 2017 +0530 arm64: zynqmp: Set status disabled in dtsi Do not enable smmu via dtsi. Enable it in board file when needed. Signed-off-by: Naga Sureshkumar Relli Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 1 + 1 file changed, 1 insertion(+) commit 27af3993f77d44a78600402558b58bfe3b6d4521 Author: Michal Simek Date: Fri Nov 27 13:22:58 2015 +0100 arm64: zynqmp: Add new uartps compatible string Mainline kernel has r1p12 compatible string now. Use this new compatible string and also append generic compatible string. Keep in your mind that using this generic compatible string not all uart features will be available. Signed-off-by: Michal Simek Reviewed-by: Moritz Fischer arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e199f2cc1e5515b57b2a8536321b5a943f932c58 Author: Edgar E. Iglesias Date: Thu Nov 26 14:12:19 2015 +0100 arm64: zynqmp: Correct IRQ nr for the SMMU Signed-off-by: Edgar E. Iglesias Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7fb7820c579ba7124d0fae013c03b58b0e989b36 Author: Michal Simek Date: Fri Oct 9 14:44:50 2015 +0200 arm64: zynqmp: Add support for RTC Add support for RTC. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4a6514d523b50f8041062d334551548a75228e70 Author: Bharat Kumar Gogada Date: Tue Aug 2 20:34:13 2016 +0530 arm64: zynqmp: Adding prefetchable memory space to pcie node Adding prefetchable memory space to pcie device tree node. Shifting configuration space to 64-bit address space. Removing pcie device tree node from amba as it requires size-cells=<2> in order to access 64-bit address space. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8c50b1e435d1f916dac509415c458c97acb76376 Author: Michal Simek Date: Thu Nov 26 11:21:25 2015 +0100 arm64: zynqmp: Add CCI-400 node Add CCI-400 node to DTSI. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 17e76f95a4befbb6d4cd041c06bec9d2b6193a82 Author: Michal Simek Date: Wed Sep 14 13:33:13 2016 +0200 arm64: zynqmp: Add dcc console for zynqmp Add debug console to dtsi to be able to enable it in board dts file. Keep in your mind that every core has separate dcc port in case you want to run SMP kernel. DCC is very helpful communication channel for debugging. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit e31b7bb8e21ed9308b09926b96f5b896bc014973 Author: Shubhrajyoti Datta Date: Mon Feb 6 11:51:00 2017 +0530 arm64: zynqmp: Add operating points Adding operating-points-v2 for zynqmp. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1e4e25c8ae8f05ab8634ade3b848a4c1d95cef53 Author: Stefan Krsmanovic Date: Fri Oct 21 12:44:56 2016 +0200 arm64: zynqmp: Add idle state for ZynqMP Added the idle-states node to describe zynqmp idle states. Only cpu-sleep-0 idle state is added in this patch. References to the idle-states node are added in all CPU nodes. Time values: entry/exit latencies and min-residency, needs to be tuned. arm,psci-suspend-param is selected to comply with PSCIv1.0 and Extended StateID format. Signed-off-by: Stefan Krsmanovic Acked-by: Will Wong Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 400e188fa895c9e77f3dd731d7797f708ff0eed4 Author: Michal Simek Date: Mon Feb 6 10:09:53 2017 +0100 arm64: zynqmp: Add references to cpu nodes Add missing references to all cpu nodes. Signed-off-by: Michal Simek Reviewed-by: Moritz Fischer arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 63301178e9a950bf3e8105926c750794d779bb29 Author: Michal Simek Date: Wed Jul 5 14:51:42 2017 +0200 arm64: zynqmp: Move nodes which have no reg property out of bus Nodes without reg properties shouldn't be placed in amba node. Move them out. Warnings: arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning (simple_bus_reg): Node /amba/misc_clk missing or empty reg/ranges property arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning (simple_bus_reg): Node /amba/i2c_clk missing or empty reg/ranges property arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning (simple_bus_reg): Node /amba/sata_clk missing or empty reg/ranges property arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning (simple_bus_reg): Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108-clk.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c83fd5142c68294acb0e857b7bac2ce8a5077f7 Author: Jan Kara Date: Mon Aug 21 14:06:46 2017 +0200 quota: Add lock annotations to struct members Add annotation which lock protects which struct members to struct dquot and struct mem_dqinfo. Signed-off-by: Jan Kara include/linux/quota.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 21ad06cc9e6399f64447ab316d92142bff7a17dd Author: Michal Simek Date: Tue Feb 16 09:49:27 2016 +0100 arm: zynq: Remove earlycon from bootargs Earlyconsole is used for early kernel debugging that's why this option shouldn't be enabled by default. Earlyconsole is partially copying the part of the bootlog after "bootconsole [uart0] disabled". Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-parallella.dts | 2 +- arch/arm/boot/dts/zynq-zc702.dts | 2 +- arch/arm/boot/dts/zynq-zc706.dts | 2 +- arch/arm/boot/dts/zynq-zed.dts | 2 +- arch/arm/boot/dts/zynq-zybo.dts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 1188c024f2163dc065177b3f20b508902df36960 Author: Michal Simek Date: Thu Apr 7 11:28:12 2016 +0200 arm: zynq: Use C pre-processor for includes in dts Change the dtsi include code to use the C pre-processor #include instead of the device tree /include/. This brings all Zynq device trees inline with each other. Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-zc702.dts | 2 +- arch/arm/boot/dts/zynq-zc706.dts | 2 +- arch/arm/boot/dts/zynq-zed.dts | 2 +- arch/arm/boot/dts/zynq-zybo.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 3c220bf420908319cc1dc0715eb822e6a7c663e3 Author: Michal Simek Date: Tue Feb 14 17:40:21 2017 +0100 arm: zynq: Label whole PL part as fpga_full region This will simplify dt overlay structure for the whole PL. Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-7000.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit e5e6f6872c7a6e2b15295574ecab8391c03808cd Author: Sai Pavan Boddu Date: Mon Mar 6 18:17:19 2017 +0530 arm: zynq: Add device-type property for zynq ethernet phy nodes Mention device-type = "ethernet-phy", as qemu will need this in absence of compatible. Signed-off-by: Sai Pavan Boddu Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-parallella.dts | 1 + arch/arm/boot/dts/zynq-zc702.dts | 1 + arch/arm/boot/dts/zynq-zc706.dts | 1 + arch/arm/boot/dts/zynq-zed.dts | 1 + arch/arm/boot/dts/zynq-zybo.dts | 1 + 5 files changed, 5 insertions(+) commit b09034892210b159c886de8ad776a45d4b5baa7f Author: Christian Kohn Date: Thu Nov 12 15:53:35 2015 -0800 arm: zynq: Add adv7511 on i2c bus for zc70x Describe adv7511 on i2c bus. Signed-off-by: Christian Kohn Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-zc702.dts | 15 +++++++++++++++ arch/arm/boot/dts/zynq-zc706.dts | 15 +++++++++++++++ 2 files changed, 30 insertions(+) commit 2798c4b75a14a4f29a56d6f31dae267b8e22ea9f Author: David Lechner Date: Mon Aug 7 12:39:40 2017 -0500 ARM: dts: da850-lego-ev3: Add node for LCD display This adds a new node for the LEGO MINDSTORMS EV3 LCD display. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8c0b16fb33b2dd3f8cbb0694bef296181fe39949 Author: David Lechner Date: Mon Aug 7 12:39:41 2017 -0500 ARM: davinci_all_defconfig: enable tinydrm and ST7586 This enables the tinydrm and ST7586 panel modules used by the display on LEGO MINDSTORMS EV3. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 3a93d082bacf887b47737c4b75c083dea7570832 Author: Takashi Sakamoto Date: Sun Aug 20 21:25:04 2017 +0900 ALSA: firewire-motu: add support for MOTU Audio Express MOTU Audio Express is one of third generation in MOTU FireWire series, produced in 2011. This model consists of three chips: * TI TSB41AB2 (Physical layer for IEEE 1394 bus) * Microchip USB3300 (Hi-Speed USB Device with ULPI interface) * Xilinx Spartan-3A FPGA, XC3S400A (Link layer for IEEE 1394 bus, packet processing and data block processing layer) This commit adds support for this model. As I expected, it works with current implementaion of protocol version 3. On the other hand, the unit has a quirk to request subaction originated by any driver. 11:45:51.287643 firewire_ohci 0000:03:00.0: AT spd 2 tl 1f, ffc1 -> ffc0, -reserved-, QW req, fffff0000b14 = 02000200 11:45:51.289193 firewire_ohci 0000:03:00.0: AR spd 2 tl 1f, ffc0 -> ffc1, ack_complete, W resp 11:45:51.289381 fireire_core 0000:03:00.0: unsolicited response (source ffc0, tlabel 1f) 11:45:51.313071 firewire_ohci 0000:03:00.0: AT spd 2 tl 20, ffc1 -> ffc0, ack_pending , QW req, fffff0000b14 = 02000200 11:45:51.314539 firewire_ohci 0000:03:00.0: AR spd 2 tl 20, ffc0 -> ffc1, ack_complete, W resp In 1394 OHCI (rev.1.1), after OUTPUT_LAST* descriptors is processed, 'xferStaus' field is filled with 'ContextControl[0:15]' (see clause 7.1.3). 5 bits in LSB side of the field has ack code in acknowledge from the unit (see clause 7.2.2). A list of the code is shown in Table 3-2. As long as I investigated, in a case of the '-reserved-' acknowledge message from the unit, the field has 0x10. On the table, this value is 'Reserved for definition by future 1394 standards'. As long as I know, any specifications of IEEE 1394 has no such extensions, thus the unit is out of specification. Besides, I note that the unit does not always acknowledge with the invalid code. I guess this is a bug of firmware. I confirmed the bug in firmware version 1.04 and this is the latest one. $ cd linux-firewire-utils $ python2 ./src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 0410a756 bus_info_length 4, crc_length 16, crc 42838 404 31333934 bus_name "1394" 408 20ff7000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256) 40c 0001f200 company_id 0001f2 | 410 000a8a7b device_id 00000a8a7b | EUI-64 0001f200000a8a7b root directory ----------------------------------------------------------------- 414 0004ef04 directory_length 4, crc 61188 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 d1000002 --> unit directory at 428 424 8d000005 --> eui-64 leaf at 438 unit directory at 428 ----------------------------------------------------------------- 428 00031680 directory_length 3, crc 5760 42c 120001f2 specifier id 430 13000033 version 434 17104800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 00025ef3 leaf_length 2, crc 24307 43c 0001f200 company_id 0001f2 | 440 000a8a7b device_id 00000a8a7b | EUI-64 0001f200000a8a7b Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8b460c76bd17128db90d69a3f8b4ad2ee744d118 Author: Takashi Sakamoto Date: Sun Aug 20 21:25:03 2017 +0900 ALSA: firewire-motu: add specification flag for position of flag for MIDI messages In protocols of MOTU FireWire series, when transferring MIDI messages, transmitter set existence flag to one byte on first several quadlets. The position differs depending on protocols and models, however two cases are confirmed; in 5th byte and 8th byte from MSB side. This commit adds a series of specification flag to describe them. When the existence flag is in the 5th byte, SND_MOTU_SPEC_[R|T]X_MIDI_2ND_Q is used. Else, another set of the flag is used. Here, '_Q' means quadlet. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-pcm.c | 2 +- sound/firewire/motu/motu-protocol-v2.c | 5 ----- sound/firewire/motu/motu-protocol-v3.c | 5 ----- sound/firewire/motu/motu-stream.c | 38 ++++++++++++++++++++++++++++++++-- sound/firewire/motu/motu.c | 11 +++++++--- sound/firewire/motu/motu.h | 6 +++++- 6 files changed, 50 insertions(+), 17 deletions(-) commit af29678fe785ad79e7386e97b57093482f0dd7c4 Author: Catalin Marinas Date: Thu Jul 6 11:53:08 2017 +0100 arm64: Remove the !CONFIG_ARM64_HW_AFDBM alternative code paths Since the pte handling for hardware AF/DBM works even when the hardware feature is not present, make the pte accessors implementation permanent and remove the corresponding #ifdefs. The Kconfig option is kept as it can still be used to disable the feature at the hardware level. Reviewed-by: Will Deacon Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 9 +-------- arch/arm64/kvm/hyp/s2-setup.c | 2 +- arch/arm64/mm/fault.c | 2 -- 3 files changed, 2 insertions(+), 11 deletions(-) commit 64c26841b34957ef8f33f7a9e8663aeee59c3ded Author: Catalin Marinas Date: Wed Jul 5 10:59:42 2017 +0100 arm64: Ignore hardware dirty bit updates in ptep_set_wrprotect() ptep_set_wrprotect() is only called on CoW mappings which are private (!VM_SHARED) with the pte either read-only (!PTE_WRITE && PTE_RDONLY) or writable and software-dirty (PTE_WRITE && !PTE_RDONLY && PTE_DIRTY). There is no race with the hardware update of the dirty state: clearing of PTE_RDONLY when PTE_WRITE (a.k.a. PTE_DBM) is set. This patch removes the code setting the software PTE_DIRTY bit in ptep_set_wrprotect() as superfluous. A VM_WARN_ONCE is introduced in case the above logic is wrong or the core mm code changes its use of ptep_set_wrprotect(). Reviewed-by: Will Deacon Acked-by: Steve Capper Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 73e86cb03cf2ec0aa3789dc8621c6d53619cac5e Author: Catalin Marinas Date: Tue Jul 4 19:04:18 2017 +0100 arm64: Move PTE_RDONLY bit handling out of set_pte_at() Currently PTE_RDONLY is treated as a hardware only bit and not handled by the pte_mkwrite(), pte_wrprotect() or the user PAGE_* definitions. The set_pte_at() function is responsible for setting this bit based on the write permission or dirty state. This patch moves the PTE_RDONLY handling out of set_pte_at into the pte_mkwrite()/pte_wrprotect() functions. The PAGE_* definitions to need to be updated to explicitly include PTE_RDONLY when !PTE_WRITE. The patch also removes the redundant PAGE_COPY(_EXEC) definitions as they are identical to the corresponding PAGE_READONLY(_EXEC). Reviewed-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable-prot.h | 18 ++++++++---------- arch/arm64/include/asm/pgtable.h | 34 ++++++++++------------------------ arch/arm64/kernel/hibernate.c | 4 ++-- arch/arm64/mm/fault.c | 6 +----- 4 files changed, 21 insertions(+), 41 deletions(-) commit 0966253d7ccddc42a5211b3488bb4f202c04de1b Author: Catalin Marinas Date: Thu Jul 6 11:46:39 2017 +0100 kvm: arm64: Convert kvm_set_s2pte_readonly() from inline asm to cmpxchg() To take advantage of the LSE atomic instructions and also make the code cleaner, convert the kvm_set_s2pte_readonly() function to use the more generic cmpxchg(). Cc: Marc Zyngier Reviewed-by: Will Deacon Reviewed-by: Christoffer Dall Acked-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/kvm_mmu.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 3bbf7157ac66a88d94b291d4d5e2b2a9319a0f90 Author: Catalin Marinas Date: Mon Jun 26 14:27:36 2017 +0100 arm64: Convert pte handling from inline asm to using (cmp)xchg With the support for hardware updates of the access and dirty states, the following pte handling functions had to be implemented using exclusives: __ptep_test_and_clear_young(), ptep_get_and_clear(), ptep_set_wrprotect() and ptep_set_access_flags(). To take advantage of the LSE atomic instructions and also make the code cleaner, convert these pte functions to use the more generic cmpxchg()/xchg(). Reviewed-by: Will Deacon Acked-by: Mark Rutland Acked-by: Steve Capper Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 71 +++++++++++++++++++--------------------- arch/arm64/mm/fault.c | 24 +++++++------- 2 files changed, 44 insertions(+), 51 deletions(-) commit 6f2dea1f5fdb73eb2e050d9ebe990121d557e519 Author: Romain Perier Date: Fri Aug 18 14:17:01 2017 +0200 arm64: dts: rockchip: Add basic cpu frequencies for RK3368 This adds and enable the operating points that have been tested and are currently supported by the SoC. This also adds clocks for ARMCLKL and ARMCLKB. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 72 +++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) commit 1e28037ec88e783b56431f166b73f3801431ff0e Author: Joseph Chen Date: Wed Aug 9 10:03:44 2017 +0800 arm64: dts: rockchip: add rk805 node for rk3328-evb RK805 consists of 4 DCDCs, 3 LDOs. It's different from RK808 and RK818 that there are 2 output only GPIOs, we should add properties "gpio-controller" and "gpio-cells = <2>". Signed-off-by: Joseph Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 136 ++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 558d5ad276c9b2ffbe706e78310a777f87e65c5f Author: Finn Thain Date: Sat Aug 12 17:12:12 2017 +1000 m68k/mac: Avoid soft-lockup warning after mach_power_off Disable interrupts for power-off, like other platforms do. This prevents meaningless warnings from the soft-lockup detector on models with a power supply unit not under software control. Reported-by: Stan Johnson Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 41e93a3087296b14e8f671010420bd29d07c989f Author: Finn Thain Date: Sat Aug 12 17:11:02 2017 +1000 m68k/mac: Don't hang waiting for Cuda power-down command Testing shows that the CUDA_POWERDOWN command never completes (for a Centris 660av or LC 475, at least). So, don't wait for command completion on those Cuda-based models that do not support soft power. Just proceed to log the usual message, "It is now safe to turn off your Macintosh." Reported-by: Stan Johnson Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/misc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 07144be9c156103e19a336c35213bd393392d401 Author: Ben Hutchings Date: Wed Jul 19 01:03:25 2017 +0100 m68k: Restore symbol versions for symbols exported from assembly WARNING: EXPORT symbol "__divsi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__umodsi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__mulsi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__modsi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__udivsi3" [vmlinux] version generation failed, symbol will not be versioned. Add so that genksyms knows the types of these symbols and can generate CRCs for them. Fixes: d13ffb563044 ("m68k: move exports to definitions" Signed-off-by: Ben Hutchings [geert: Add warning messages, match actual prototypes in gccint.info] Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/asm-prototypes.h | 5 +++++ 1 file changed, 5 insertions(+) commit 883e3847d841e8dc94e478497cb73eaf48119913 Author: Geert Uytterhoeven Date: Mon Jul 17 13:40:56 2017 +0200 m68k/defconfig: Update defconfigs for v4.13-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 7 +++++-- arch/m68k/configs/apollo_defconfig | 7 +++++-- arch/m68k/configs/atari_defconfig | 8 ++++++-- arch/m68k/configs/bvme6000_defconfig | 7 +++++-- arch/m68k/configs/hp300_defconfig | 7 +++++-- arch/m68k/configs/mac_defconfig | 7 +++++-- arch/m68k/configs/multi_defconfig | 7 +++++-- arch/m68k/configs/mvme147_defconfig | 7 +++++-- arch/m68k/configs/mvme16x_defconfig | 7 +++++-- arch/m68k/configs/q40_defconfig | 7 +++++-- arch/m68k/configs/sun3_defconfig | 7 +++++-- arch/m68k/configs/sun3x_defconfig | 7 +++++-- 12 files changed, 61 insertions(+), 24 deletions(-) commit 684bcba8eccc59949a70287c5491e20e12359376 Author: Andy Yan Date: Mon Aug 14 16:44:11 2017 +0800 ARM: dts: rockchip: add accelerometer bma250e dt node for rv1108 evb Add dt node of bosch accelerometer bma250e on rv1108 evb. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108-evb.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit a6e31eb34bbffc5c7304c0156fbe5bfca1db0856 Author: Andy Yan Date: Mon Aug 14 16:43:41 2017 +0800 ARM: dts: rockchip: add pmic rk805 dt node for rv1108 evb RK805 is used as the voltage regulator on rv1108 evaluation board. Add device tree node for it. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108-evb.dts | 108 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit d6c8103b0265d8db30e20e948a4f06382bbdaea7 Author: Borislav Petkov Date: Mon Aug 21 10:06:51 2017 +0200 x86/CPU: Align CR3 defines Align them vertically for better readability and use BIT_ULL() macro. No functionality change. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Link: http://lkml.kernel.org/r/20170821080651.4527-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/processor-flags.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7755daf5e7e82499a4cdd7c2ad2be2578cc1df20 Merge: 5771a8c 08a4d8e Author: Thierry Reding Date: Mon Aug 21 10:39:16 2017 +0200 Merge branch 'for-4.14/drivers' into for-next commit 08a4d8ec4262c636010eaac99b5e5ea07f579643 Author: Bartlomiej Zolnierkiewicz Date: Mon Apr 24 12:01:08 2017 +0200 pwm: pwm-samsung: fix suspend/resume support Fix suspend/resume support: - add disabled_mask to struct samsung_pwm_chip to track PWM disabled state information in pwm_samsung_{disable,enable}() - rename pwm_samsung_config() to __pwm_samsung_config() and add extra force_period parameter to be used during resume (to force tin_ns and tcnt recalculation) - add pwm_samsung_config() wrapper for preserving old behavior - properly restore PWM configuration in pwm_samsung_resume() - remove no longer needed pwm_samsung_suspend() - update Copyrights Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Thierry Reding drivers/pwm/pwm-samsung.c | 67 +++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 32 deletions(-) commit 23aa19a22e7fcb49ebe198517d0a15b46810243f Author: Bartlomiej Zolnierkiewicz Date: Mon Apr 24 12:01:07 2017 +0200 pwm: samsung: Remove redundant checks from pwm_samsung_config() If the requested period_ns and duty_ns values are identical to the last programmed ones pwm_samsung_config() returns early and skips the hardware configuration. The same checks are now done by the PWM core so the driver specific ones can be removed. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Thierry Reding drivers/pwm/pwm-samsung.c | 3 --- 1 file changed, 3 deletions(-) commit 8bdb65dc8575978214785462870852a56b6a21ac Author: Zhi Mao Date: Fri Jun 30 14:05:20 2017 +0800 pwm: mediatek: Disable clock on PWM configuration failure Make sure to disable the PWM clock if the PWM cannot be configured due to the clock divider exceeding the maximum value. While at it, replace the hardcoded maximum clock divider with a defined constant to improve code readability. Signed-off-by: Zhi Mao Acked-by: John Crispin Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 62843a6152e7c19f28c368bb51cac1bbfcdf4249 Author: Zhi Mao Date: Fri Jun 30 14:05:19 2017 +0800 dt-bindings: pwm: Add MT2712/MT7622 information Enhance the MediaTek PWM binding with details about the IP found in the MT2712 and MT7622 SoCs. Acked-by: Rob Herring Signed-off-by: Zhi Mao Acked-by: John Crispin Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e7c197ec97c3ac3ed3698be7a21d51a338582e1d Author: Zhi Mao Date: Fri Jun 30 14:05:18 2017 +0800 pwm: mediatek: Fix clock control issue In order to save some power, do not prepare the top and main clocks during mtk_pwm_probe(). Instead, prepare the clocks only when necessary and also make sure to enable the clocks to match the semantics of the common clock framework. While at it, don't explicitly disable all PWM channels in ->remove() because all users should have done that already. Signed-off-by: Zhi Mao Acked-by: John Crispin Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 69 +++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 22 deletions(-) commit cd30798a6c17c1fa182e9b0bb85bd973776ff193 Author: Zhi Mao Date: Fri Jun 30 14:05:17 2017 +0800 pwm: mediatek: Fix PWM source clock selection In original code, the PWM output frequency is not correct when set bit<3>=1 to PWMCON register. Signed-off-by: Zhi Mao Reviewed-by: Matthias Brugger Acked-by: John Crispin Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa12d7a7a978ac5f3202cac8f2f671fd267bf5e3 Author: Zhi Mao Date: Fri Jun 30 14:05:16 2017 +0800 pwm: mediatek: Fix Kconfig description Fix a copy/paste error that sneaked into the Kconfig description of the Mediatek PWM driver. Signed-off-by: Zhi Mao Acked-by: John Crispin Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7c22398f5e95c995a34d4f196d53cfc32562aed Author: Joseph Chen Date: Mon Aug 21 03:28:42 2017 +0200 mfd: rk808: Add RK805 power key support Signed-off-by: Joseph Chen Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/mfd/rk808.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8d249b67c785d48c5aa526b47495f7c88a62f73e Author: Joseph Chen Date: Mon Aug 21 03:28:41 2017 +0200 mfd: rk808: Add RK805 pinctrl support Signed-off-by: Joseph Chen Acked-by: Linus Walleij Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/mfd/rk808.c | 1 + 1 file changed, 1 insertion(+) commit ea479996c79bbd631e014c2492d268bb05e86f9a Author: Joseph Chen Date: Mon Aug 21 03:28:40 2017 +0200 pinctrl: Add pinctrl driver for the RK805 PMIC RK805 is one of Rockchip PMICs family, it has 2 output only GPIOs. This driver is also designed for other Rockchip PMICs to expend. Different PMIC maybe have different pin features, for example, RK816 has one pin which can be used for TS or GPIO(input/out). The mainly difference between PMICs pins are pinmux, direction and output value, that is 'struct rk805_pin_config'. Signed-off-by: Joseph Chen Acked-by: Linus Walleij Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/pinctrl/Kconfig | 9 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-rk805.c | 493 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 503 insertions(+) commit 5b0bb001d37175324e613488ac6a8e981d473c11 Author: Joseph Chen Date: Mon Aug 21 03:28:39 2017 +0200 pinctrl: dt-bindings: Add bindings for Rockchip RK805 PMIC Signed-off-by: Joseph Chen Acked-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones .../devicetree/bindings/pinctrl/pinctrl-rk805.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit d9e616897432d53b40ced69c6c2b1365351d99ac Author: Elaine Zhang Date: Mon Aug 21 03:28:37 2017 +0200 mfd: dt-bindings: Add RK805 device tree bindings document Add device tree bindings documentation for Rockchip's RK805 PMIC. Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/rk808.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 990f05f6a5213be50ff48bf0461e2db254817b0c Author: Elaine Zhang Date: Mon Aug 21 03:28:38 2017 +0200 mfd: rk808: Add RK805 support The RK805 chip is a Power Management IC (PMIC) for multimedia and handheld devices. It contains the following components: - Regulators - RTC - Clocking Both RK808 and RK805 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/mfd/Kconfig | 4 +- drivers/mfd/rk808.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 2 deletions(-) commit c4e0d344c1f086c6675f2a22ea6ea71330fb0b57 Author: Elaine Zhang Date: Mon Aug 21 03:28:36 2017 +0200 regulator: rk808: Add regulator driver for RK805 Add support for the rk805 regulator. The regulator module consists of 4 DCDCs, 3 LDOs. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Acked-by: Mark Brown Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/regulator/Kconfig | 4 +- drivers/regulator/rk808-regulator.c | 130 ++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 2 deletions(-) commit a5247ca6708ff7dc089d2774c131455774153eb6 Author: Elaine Zhang Date: Mon Aug 21 03:28:35 2017 +0200 mfd: rk808: Add rk805 regs addr and ID Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones include/linux/mfd/rk808.h | 120 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 9d6105e19f617406aea46dd19281080c7c5ae0d8 Author: Elaine Zhang Date: Mon Aug 21 03:28:34 2017 +0200 mfd: rk808: Fix up the chip id get failed the rk8xx chip id is: ((MSB << 8) | LSB) & 0xfff0 Signed-off-by: Elaine Zhang Signed-off-by: Joseph Chen Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/mfd/rk808.c | 21 +++++++++++++++------ include/linux/mfd/rk808.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) commit 9e8730b178a2472fca3123e909d6e69cc8127778 Author: Matthias Kaehlcke Date: Thu Aug 17 11:20:47 2017 -0700 x86/build: Use cc-option to validate stack alignment parameter With the following commit: 8f91869766c0 ("x86/build: Fix stack alignment for CLang") cc-option is only used to determine the name of the stack alignment option supported by the compiler, but not to verify that the actual parameter